修复审批请求在聊天中无提示且无法响应 (#467)
* fix: support run approval prompts in chat * fix(chat): render approval prompts * fix(chat): dedupe approval pattern labels * chore: sync approval flow with current main - update Hermes Agent approval support guidance to PR #21899 - initialize Hermes table schemas in session-sync tests
This commit is contained in:
@@ -48,6 +48,23 @@ describe('MessageItem tool details', () => {
|
||||
})
|
||||
})
|
||||
|
||||
it('renders system approval prompt content in the chat bubble', () => {
|
||||
const wrapper = mount(MessageItem, {
|
||||
props: {
|
||||
message: {
|
||||
id: 'approval-request',
|
||||
role: 'system',
|
||||
content: 'Approval required\n\nCommand:\n```\nbash -lc \'printf ok\'\n```\n\nReply with /approve to approve once.',
|
||||
timestamp: Date.now(),
|
||||
} satisfies Message,
|
||||
},
|
||||
})
|
||||
|
||||
expect(wrapper.text()).toContain('Approval required')
|
||||
expect(wrapper.text()).toContain('Reply with /approve')
|
||||
expect(wrapper.find('.message-bubble.system').exists()).toBe(true)
|
||||
})
|
||||
|
||||
it('renders highlighted code blocks for tool arguments and tool results', async () => {
|
||||
const wrapper = mount(MessageItem, {
|
||||
props: {
|
||||
|
||||
Reference in New Issue
Block a user