mirror of
https://github.com/rowboatlabs/rowboat.git
synced 2026-04-26 00:46:23 +02:00
feat: add stop execution with hybrid graceful/force abort
Implement a stop execution feature that allows users to abort ongoing LLM streaming, kill running tool calls, and clear pending permission/human input requests. Uses a hybrid approach: first click sends graceful SIGTERM, second click within 2s sends SIGKILL and force-closes MCP clients. Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
parent
9828ea8301
commit
a3e681a7c4
13 changed files with 642 additions and 54 deletions
|
|
@ -151,6 +151,7 @@ const ipcSchemas = {
|
|||
'runs:stop': {
|
||||
req: z.object({
|
||||
runId: z.string(),
|
||||
force: z.boolean().optional().default(false),
|
||||
}),
|
||||
res: z.object({
|
||||
success: z.literal(true),
|
||||
|
|
|
|||
|
|
@ -80,6 +80,11 @@ export const RunErrorEvent = BaseRunEvent.extend({
|
|||
error: z.string(),
|
||||
});
|
||||
|
||||
export const RunStoppedEvent = BaseRunEvent.extend({
|
||||
type: z.literal("run-stopped"),
|
||||
reason: z.enum(["user-requested", "force-stopped"]).optional(),
|
||||
});
|
||||
|
||||
export const RunEvent = z.union([
|
||||
RunProcessingStartEvent,
|
||||
RunProcessingEndEvent,
|
||||
|
|
@ -94,6 +99,7 @@ export const RunEvent = z.union([
|
|||
ToolPermissionRequestEvent,
|
||||
ToolPermissionResponseEvent,
|
||||
RunErrorEvent,
|
||||
RunStoppedEvent,
|
||||
]);
|
||||
|
||||
export const ToolPermissionAuthorizePayload = ToolPermissionResponseEvent.pick({
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue