MCPcopy
hub / github.com/codeaashu/claude-code / stopUltraplan

Function stopUltraplan

src/commands/ultraplan.tsx:203–223  ·  view source on GitHub ↗
(taskId: string, sessionId: string, setAppState: (f: (prev: AppState) => AppState) => void)

Source from the content-addressed store, hash-verified

201 * the catch block early-returns when status !== 'running'.
202 */
203export async function stopUltraplan(taskId: string, sessionId: string, setAppState: (f: (prev: AppState) => AppState) => void): Promise<void> {
204 // RemoteAgentTask.kill archives the session (with .catch) — no separate
205 // archive call needed here.
206 await RemoteAgentTask.kill(taskId, setAppState);
207 setAppState(prev => prev.ultraplanSessionUrl || prev.ultraplanPendingChoice || prev.ultraplanLaunching ? {
208 ...prev,
209 ultraplanSessionUrl: undefined,
210 ultraplanPendingChoice: undefined,
211 ultraplanLaunching: undefined
212 } : prev);
213 const url = getRemoteSessionUrl(sessionId, process.env.SESSION_INGRESS_URL);
214 enqueuePendingNotification({
215 value: `Ultraplan stopped.\n\nSession: ${url}`,
216 mode: 'task-notification'
217 });
218 enqueuePendingNotification({
219 value: 'The user stopped the ultraplan session above. Do not respond to the stop notification — wait for their next message.',
220 mode: 'task-notification',
221 isMeta: true
222 });
223}
224
225/**
226 * Shared entry for the slash command, keyword trigger, and the plan-approval

Callers 2

handleKeyDownFunction · 0.85
BackgroundTasksDialogFunction · 0.85

Calls 3

getRemoteSessionUrlFunction · 0.85
killMethod · 0.45

Tested by

no test coverage detected