fix(pi): keep active runs alive during background sleep
This commit is contained in:
@@ -335,7 +335,7 @@ export class CodingConversationService {
|
||||
async deleteConversation(conversationId: string): Promise<void> {
|
||||
const { project, conversation } = await this.projects.findActiveConversation(conversationId);
|
||||
try {
|
||||
await this.runtime.dispose(conversationId);
|
||||
await this.runtime.dispose(conversationId, 'conversation_deleted');
|
||||
} catch (error) {
|
||||
runtimeError(error);
|
||||
}
|
||||
@@ -463,7 +463,7 @@ export class CodingConversationService {
|
||||
const preparing = this.prepareFlights.get(conversationId);
|
||||
if (preparing) await preparing.catch(() => undefined);
|
||||
try {
|
||||
await this.runtime.dispose(conversationId);
|
||||
await this.runtime.dispose(conversationId, 'model_reconfiguration');
|
||||
this.prepareFlights.delete(conversationId);
|
||||
await this.ensurePrepared(conversationId);
|
||||
return state;
|
||||
@@ -537,7 +537,7 @@ export class CodingConversationService {
|
||||
return publicConversation(created);
|
||||
} catch (error) {
|
||||
try {
|
||||
await this.runtime.dispose(created.id);
|
||||
await this.runtime.dispose(created.id, 'fork_replacement');
|
||||
const latest = await store.get(created.id);
|
||||
await this.archiveSession(source.project.id, latest?.sessionKey);
|
||||
await persist(() => store.delete(created.id));
|
||||
|
||||
Reference in New Issue
Block a user