MCPcopy Create free account
hub / github.com/Noumena-Network/code / onDone

Function onDone

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

Source from the content-addressed store, hash-verified

273
274 let doneWasCalled = false
275 const onDone: LocalJSXCommandOnDone = (result, options) => {
276 doneWasCalled = true
277 // Use clearLocalJSX to explicitly clear the local JSX command
278 setToolJSX({
279 jsx: null,
280 shouldHidePromptInput: false,
281 clearLocalJSX: true,
282 })
283 if (result && options?.display !== 'skip' && params.addNotification) {
284 params.addNotification({
285 key: `immediate-${immediateCommand.name}`,
286 text: result,
287 priority: 'immediate',
288 })
289 }
290 if (options?.nextInput) {
291 if (options.submitNextInput) {
292 enqueue({ value: options.nextInput, mode: 'prompt' })
293 } else {
294 logForDebugging('[ncode-debug] executeUserInput no newMessages after processUserInput')
295 onInputChange(options.nextInput)
296 }
297 }
298 }
299
300 const impl = await immediateCommand.load()
301 const jsx = await impl.call(onDone, context, commandArgs)

Callers 15

ClaudeInChromeOnboardingFunction · 0.50
ConsoleOAuthFlowFunction · 0.50
IdleReturnDialogFunction · 0.50
MCPServerApprovalDialogFunction · 0.50
RemoteEnvironmentDialogFunction · 0.50
ExitFlowFunction · 0.50
AntModelSwitchCalloutFunction · 0.50
ApproveApiKeyFunction · 0.50
BridgeDialogFunction · 0.50
WorktreeExitDialogFunction · 0.50

Calls 2

enqueueFunction · 0.85
logForDebuggingFunction · 0.70

Tested by

no test coverage detected