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
+2 -1
View File
@@ -16,6 +16,7 @@ import { Settings } from "../config/settings";
import { SETTINGS_SCHEMA, type SettingPath } from "../config/settings-schema";
import type { CustomTool } from "../extensibility/custom-tools/types";
import { runExtensionCompact, runExtensionSetModel } from "../extensibility/extensions/compact-handler";
import { getSessionSlashCommands } from "../extensibility/extensions/get-commands-handler";
import type { Skill } from "../extensibility/skills";
import type { HindsightSessionState } from "../hindsight/state";
import type { LocalProtocolOptions } from "../internal-urls";
@@ -1119,7 +1120,7 @@ export async function runSubprocess(options: ExecutorOptions): Promise<SingleRes
getAllTools: () => session.getAllToolNames(),
setActiveTools: (toolNames: string[]) =>
session.setActiveToolsByName(toolNames.filter(name => !parentOwnedToolNames.has(name))),
getCommands: () => [],
getCommands: () => getSessionSlashCommands(session),
setModel: model => runExtensionSetModel(session, model),
getThinkingLevel: () => session.thinkingLevel,
setThinkingLevel: level => session.setThinkingLevel(level),