fix(pi): keep active runs alive during background sleep

This commit is contained in:
2026-08-25 20:56:17 +08:00
parent 92f4c91088
commit 621ebb1781
22 changed files with 1061 additions and 68 deletions

View File

@@ -2,6 +2,7 @@ import type {
CodingConversationRuntime,
CodingRuntimeCommand,
CodingRuntimeDiagnostics,
CodingRuntimeDisposeReason,
ConversationModelState,
ConversationInteraction,
ConversationInteractionResponse,
@@ -455,7 +456,7 @@ export class InMemoryConversationRuntime implements CodingConversationRuntime {
return this.runtimeState(conversationId);
}
async dispose(conversationId: string): Promise<void> {
async dispose(conversationId: string, _reason: CodingRuntimeDisposeReason): Promise<void> {
if (!this.states.has(conversationId)) return;
const snapshot = this.snapshot(conversationId);
this.replaceSnapshot({