MCPcopy
hub / github.com/claude-code-best/claude-code / onDone

Function onDone

src/utils/handlePromptSubmit.ts:282–304  ·  view source on GitHub ↗
(result, options)

Source from the content-addressed store, hash-verified

280
281 let doneWasCalled = false
282 const onDone: LocalJSXCommandOnDone = (result, options) => {
283 doneWasCalled = true
284 // Use clearLocalJSX to explicitly clear the local JSX command
285 setToolJSX({
286 jsx: null,
287 shouldHidePromptInput: false,
288 clearLocalJSX: true,
289 })
290 if (result && options?.display !== 'skip' && params.addNotification) {
291 params.addNotification({
292 key: `immediate-${immediateCommand.name}`,
293 text: result,
294 priority: 'immediate',
295 })
296 }
297 if (options?.nextInput) {
298 if (options.submitNextInput) {
299 enqueue({ value: options.nextInput, mode: 'prompt' })
300 } else {
301 onInputChange(options.nextInput)
302 }
303 }
304 }
305
306 const impl = await immediateCommand.load()
307 const jsx = await impl.call(onDone, context, commandArgs)

Callers

nothing calls this directly

Calls 1

enqueueFunction · 0.70

Tested by

no test coverage detected