feat(agent): 完善分析编排与结果传输
This commit is contained in:
@@ -1,7 +1,6 @@
|
||||
import {
|
||||
createOpencode,
|
||||
type OpencodeClient,
|
||||
type OutputFormat,
|
||||
} from "@opencode-ai/sdk/v2";
|
||||
import { randomUUID } from "node:crypto";
|
||||
import { existsSync, readFileSync } from "node:fs";
|
||||
@@ -39,10 +38,6 @@ type RuntimeModelOverride = {
|
||||
modelID: string;
|
||||
};
|
||||
|
||||
type RuntimePromptOptions = {
|
||||
format?: OutputFormat;
|
||||
};
|
||||
|
||||
export type PermissionReply = "once" | "always" | "reject";
|
||||
export type QuestionAnswers = string[][];
|
||||
|
||||
@@ -189,7 +184,6 @@ export class OpencodeRuntimeAdapter {
|
||||
sessionId: string,
|
||||
text: string,
|
||||
model?: RuntimeModelOverride,
|
||||
options?: RuntimePromptOptions,
|
||||
) {
|
||||
const client = await this.ensureClient();
|
||||
const startedAt = Date.now();
|
||||
@@ -204,7 +198,6 @@ export class OpencodeRuntimeAdapter {
|
||||
await client.session.prompt({
|
||||
sessionID: sessionId,
|
||||
model,
|
||||
...(options?.format ? { format: options.format } : {}),
|
||||
parts: [{ type: "text", text }],
|
||||
});
|
||||
logDevelopmentDebug(
|
||||
|
||||
Reference in New Issue
Block a user