fix(web): preserve queue on stop

This commit is contained in:
kingwl
2026-07-31 20:51:05 +08:00
parent e1c6fc3db4
commit 32a0e871b7
20 changed files with 241 additions and 50 deletions

View File

@@ -46,7 +46,8 @@ export interface ISession {
*/
updateQueue(itemId: InboxItemId, action: QueueAction): Promise<RpcResult<{ accepted: true }>>
/**
* Cancel the running turn.
* Cancel the running turn. Pending queued work remains and resumes in FIFO
* order after the Host reaches cancellation quiescence.
* @returns acceptance, or the business error.
*/
cancel(): Promise<RpcResult<{ accepted: true }>>

View File

@@ -248,7 +248,8 @@ export class Session implements SessionFace {
}
/**
* Stop: contract session.cancel 1:1; failures land in promptError (same error-strip display slot).
* Stop the active turn while the Host preserves pending inbox work; failures
* land in promptError (same error-strip display slot).
* @returns the cancel result.
*/
async cancel(): Promise<RpcResult<{ accepted: true }>> {