(result, options)
| 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) |
no test coverage detected