MCPcopy Create free account
hub / github.com/MoonshotAI/kimi-code / cancel

Method cancel

packages/agent-core/src/services/task/task.ts:165–165  ·  view source on GitHub ↗

* Cancel a running task. Throws: * - `TaskNotFoundError` → 40406 * - `TaskAlreadyFinishedError` → 40904 (daemon emits custom envelope * with `data:{cancelled:false}`)

(sessionId: string, taskId: string)

Source from the content-addressed store, hash-verified

163 * with `data:{cancelled:false}`)
164 */
165 cancel(sessionId: string, taskId: string): Promise<{ cancelled: true }>;
166}
167
168// eslint-disable-next-line @typescript-eslint/no-redeclare

Callers 15

cancelStreamFunction · 0.65
cancelMethod · 0.65
cancelFunction · 0.65
mainFunction · 0.65
init.test.tsFile · 0.65
turn.test.tsFile · 0.65
full.test.tsFile · 0.65
fetchMethod · 0.65

Implementers 1

TaskServicepackages/agent-core/src/services/task/

Calls

no outgoing calls

Tested by

no test coverage detected