fix(coding-agent): make ctx.shutdown() work from extension tools

The tool execution context was created with a no-op shutdown handler.
Now it delegates to ExtensionRunner.shutdown() which uses the handler
set by the mode via initialize().
This commit is contained in:
Mario Zechner 2026-01-08 03:39:58 +01:00
parent baf6fe4b39
commit cf0466d96c
2 changed files with 11 additions and 1 deletions

View file

@ -288,6 +288,14 @@ export class ExtensionRunner {
return undefined;
}
/**
* Request a graceful shutdown. Called by extension tools and event handlers.
* The actual shutdown behavior is provided by the mode via initialize().
*/
shutdown(): void {
this.shutdownHandler();
}
private createContext(): ExtensionContext {
return {
ui: this.uiContext,