feat: add turn cancellation UI and main process wiring

Adds cancel-turn IPC channel, SidecarClient.cancelTurn(), TurnCancelledError,
EryxAppService.cancelSessionTurn(), finalizeCancelledTurn(), stop button in
ChatPane, and cancelled run status throughout the run timeline.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
This commit is contained in:
David Kaya
2026-03-25 22:17:15 +01:00
co-authored by Copilot
parent d84b3021f2
commit 82fdadb312
13 changed files with 265 additions and 49 deletions
+8
View File
@@ -79,6 +79,12 @@ export interface RunTurnCommand {
tooling?: RunTurnToolingConfig;
}
export interface CancelTurnCommand {
type: 'cancel-turn';
requestId: string;
targetRequestId: string;
}
export interface ResolveApprovalCommand {
type: 'resolve-approval';
requestId: string;
@@ -90,6 +96,7 @@ export type SidecarCommand =
| DescribeCapabilitiesCommand
| ValidatePatternCommand
| RunTurnCommand
| CancelTurnCommand
| ResolveApprovalCommand;
export interface RunTurnLocalMcpServerConfig {
@@ -157,6 +164,7 @@ export interface TurnCompleteEvent {
requestId: string;
sessionId: string;
messages: ChatMessageRecord[];
cancelled?: boolean;
}
export type AgentActivityType = 'thinking' | 'tool-calling' | 'handoff' | 'completed';