fix: wait for session idle after abort
This commit is contained in:
@@ -730,6 +730,12 @@ export const streamPromptResponse = async ({
|
||||
await runtime.abortSession(opencodeSessionId).catch((error) => {
|
||||
logger.warn({ sessionId: opencodeSessionId, err: error }, "failed to abort opencode session");
|
||||
});
|
||||
await runtime.waitForSessionIdle(opencodeSessionId).catch((error) => {
|
||||
logger.warn(
|
||||
{ sessionId: opencodeSessionId, err: error },
|
||||
"failed while waiting for aborted opencode session to become idle",
|
||||
);
|
||||
});
|
||||
return { aborted: true, failed: false, toolCallCount };
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user