fix(extensibility): added centralized session slash command discovery for extensions

- Added a shared session command helper that aggregates extension, prompt, and skill slash commands.
- Updated ACP, extension UI, runtime-init, and task executor extension contexts to return session command data instead of empty arrays.
This commit is contained in:
can1357
2026-05-15 10:21:12 +02:00
parent cb6c085a41
commit e56e091b8a
5 changed files with 86 additions and 5 deletions
@@ -16,6 +16,7 @@ import type {
SendUserMessageHandler,
TerminalInputHandler,
} from "../../extensibility/extensions";
import { getSessionSlashCommands } from "../../extensibility/extensions/get-commands-handler";
import { HookEditorComponent } from "../../modes/components/hook-editor";
import { HookInputComponent } from "../../modes/components/hook-input";
import { HookSelectorComponent } from "../../modes/components/hook-selector";
@@ -109,7 +110,7 @@ export class ExtensionUiController {
},
getThinkingLevel: () => this.ctx.session.thinkingLevel,
setThinkingLevel: level => this.ctx.session.setThinkingLevel(level),
getCommands: () => [],
getCommands: () => getSessionSlashCommands(this.ctx.session),
getSessionName: () => this.ctx.sessionManager.getSessionName(),
setSessionName: name => this.#updateSessionName(name),
};
@@ -349,7 +350,7 @@ export class ExtensionUiController {
},
getThinkingLevel: () => this.ctx.session.thinkingLevel,
setThinkingLevel: (level, persist) => this.ctx.session.setThinkingLevel(level, persist),
getCommands: () => [],
getCommands: () => getSessionSlashCommands(this.ctx.session),
getSessionName: () => this.ctx.sessionManager.getSessionName(),
setSessionName: name => this.#updateSessionName(name),
};