fix: 实时上报 Codex 工具事件
This commit is contained in:
@@ -141,7 +141,14 @@ async function executeCommand(api: RunnerManagerApi, options: RunnerOnceOptions,
|
||||
const stopBackendProgress = startBackendProgress(api, options.runId, command.id, attemptId, runner.id, options.backendProfile ?? null);
|
||||
try {
|
||||
const latestRun = await api.getRun(options.runId);
|
||||
const backendOptions = { ...options, ...(workspacePath ? { workspacePath } : {}), abortSignal: abortController.signal };
|
||||
const backendOptions = {
|
||||
...options,
|
||||
...(workspacePath ? { workspacePath } : {}),
|
||||
abortSignal: abortController.signal,
|
||||
onEvent: async (event: BackendEvent) => {
|
||||
await appendBestEffort(api, options.runId, annotateCommandEvent(event, command.id, attemptId, runner.id));
|
||||
},
|
||||
};
|
||||
const result = backendSession ? await backendSession.runTurn(latestRun, command, backendOptions) : await runBackendTurn(latestRun, command, backendOptions);
|
||||
for (const event of result.events) {
|
||||
await api.appendEvent(options.runId, annotateCommandEvent(event, command.id, attemptId, runner.id));
|
||||
|
||||
Reference in New Issue
Block a user