mirror of
https://github.com/wu736139669/hapi.git
synced 2026-11-08 01:43:07 +00:00
fix: align request_user_input other answers across clients
This commit is contained in:
@@ -25,13 +25,14 @@ describe('registerAppServerPermissionHandlers', () => {
|
||||
expect(id).toBe('tool-123');
|
||||
expect(input).toEqual({
|
||||
itemId: 'tool-123',
|
||||
questions: [{ id: 'approve_nav', question: 'Approve app tool call?' }]
|
||||
isBlocking: true,
|
||||
questions: [{ id: 'approve_nav', question: 'Approve app tool call?', isOther: true }]
|
||||
});
|
||||
return {
|
||||
decision: 'accept',
|
||||
answers: {
|
||||
approve_nav: {
|
||||
answers: ['Allow']
|
||||
answers: ['None of the above', 'user_note: custom answer']
|
||||
}
|
||||
}
|
||||
};
|
||||
@@ -48,12 +49,13 @@ describe('registerAppServerPermissionHandlers', () => {
|
||||
|
||||
await expect(handler?.({
|
||||
itemId: 'tool-123',
|
||||
questions: [{ id: 'approve_nav', question: 'Approve app tool call?' }]
|
||||
isBlocking: true,
|
||||
questions: [{ id: 'approve_nav', question: 'Approve app tool call?', isOther: true }]
|
||||
})).resolves.toEqual({
|
||||
decision: 'accept',
|
||||
answers: {
|
||||
approve_nav: {
|
||||
answers: ['Allow']
|
||||
answers: ['None of the above', 'user_note: custom answer']
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user