fix(hooks): support 'ask' decision for BeforeTool hooks (#21146)

This commit is contained in:
Christian Gunderman
2026-03-21 03:52:39 +00:00
committed by GitHub
parent d3766875f8
commit d1dc4902fd
32 changed files with 1016 additions and 117 deletions
@@ -59,7 +59,7 @@ describe('ExitPlanModeTool', () => {
getMessageBusDecision: () => Promise<string>;
},
'getMessageBusDecision',
).mockResolvedValue('ASK_USER');
).mockResolvedValue('ask_user');
});
afterEach(() => {
@@ -127,7 +127,7 @@ describe('ExitPlanModeTool', () => {
getMessageBusDecision: () => Promise<string>;
},
'getMessageBusDecision',
).mockResolvedValue('ALLOW');
).mockResolvedValue('allow');
const result = await invocation.shouldConfirmExecute(
new AbortController().signal,
@@ -150,7 +150,7 @@ describe('ExitPlanModeTool', () => {
getMessageBusDecision: () => Promise<string>;
},
'getMessageBusDecision',
).mockResolvedValue('DENY');
).mockResolvedValue('deny');
await expect(
invocation.shouldConfirmExecute(new AbortController().signal),