()
| 90 | } |
| 91 | |
| 92 | private endExecutionContext(): void { |
| 93 | this.executionDepth = Math.max(0, this.executionDepth - 1); |
| 94 | if (this.executionDepth === 0) { |
| 95 | this.focusedProperty = null; |
| 96 | this.triggerContext = null; |
| 97 | // Preloaded script modules are scoped to ONE outermost execution: a |
| 98 | // cancelled/aborted run must not strand its entries, or a later |
| 99 | // trigger on a long-lived executor (api.executeChoice callers reuse |
| 100 | // one) would consume a module loaded before the user's latest edits. |
| 101 | // Cleared at the END so the CLI's collect-then-execute handoff (which |
| 102 | // populates the map before execute() begins) still works. |
| 103 | this.preloadedUserScripts.clear(); |
| 104 | } |
| 105 | } |
| 106 | |
| 107 | async execute(choice: IChoice): Promise<void> { |
| 108 | this.pendingAbort = null; |
no test coverage detected