fix: preserve interaction replies across chat recovery

This commit is contained in:
2026-10-29 17:53:33 +08:00
parent fbe273e90a
commit 52681a8451
38 changed files with 1623 additions and 314 deletions
+2 -1
View File
@@ -35,6 +35,7 @@ export class ChatSessionBridge {
constructor(private readonly runtime: OpencodeRuntimeAdapter) {}
async resolve(context: {
preserveExecution?: boolean;
sessionId?: string;
network?: string;
projectId?: string;
@@ -49,7 +50,7 @@ export class ChatSessionBridge {
}> {
let requestContext = this.buildRequestContext(context);
const existingSessionId = context.sessionId?.trim();
await this.abortActiveRuntime(requestContext.clientSessionId, existingSessionId);
if (!context.preserveExecution) await this.abortActiveRuntime(requestContext.clientSessionId, existingSessionId);
let sessionId = existingSessionId;
let created = false;