feat(core): Decouple enabling hooks UI from subsystem. (#16074)

This commit is contained in:
joshualitt
2026-01-07 12:34:33 -08:00
committed by GitHub
parent 19bdd95eab
commit 4c961df313
5 changed files with 19 additions and 7 deletions
@@ -101,6 +101,7 @@ describe('BuiltinCommandLoader', () => {
getFolderTrust: vi.fn().mockReturnValue(true),
getEnableExtensionReloading: () => false,
getEnableHooks: () => false,
getEnableHooksUI: () => false,
isSkillsSupportEnabled: vi.fn().mockReturnValue(false),
getMcpEnabled: vi.fn().mockReturnValue(true),
getSkillManager: vi.fn().mockReturnValue({
@@ -199,6 +200,7 @@ describe('BuiltinCommandLoader profile', () => {
getCheckpointingEnabled: () => false,
getEnableExtensionReloading: () => false,
getEnableHooks: () => false,
getEnableHooksUI: () => false,
isSkillsSupportEnabled: vi.fn().mockReturnValue(false),
getMcpEnabled: vi.fn().mockReturnValue(true),
getSkillManager: vi.fn().mockReturnValue({
@@ -78,7 +78,7 @@ export class BuiltinCommandLoader implements ICommandLoader {
editorCommand,
extensionsCommand(this.config?.getEnableExtensionReloading()),
helpCommand,
...(this.config?.getEnableHooks() ? [hooksCommand] : []),
...(this.config?.getEnableHooksUI() ? [hooksCommand] : []),
await ideCommand(),
initCommand,
...(this.config?.getMcpEnabled() === false