feat(chat): add workspace chat, attachments and agent delegation

This commit is contained in:
2026-09-06 23:17:35 +08:00
parent 637ddbb9bf
commit cec8daac93
39 changed files with 762 additions and 37 deletions
+2 -1
View File
@@ -7,6 +7,7 @@ import { useProviderStore } from '@/stores/provider'
import { useSkillStore } from '@/stores/skill'
import ChatView from './ChatView.vue'
vi.mock('@/services/agentService', () => ({ listTools: vi.fn().mockResolvedValue([]) }))
vi.mock('vue-router', () => ({ useRouter: () => ({ push: vi.fn() }) }))
vi.mock('@/stores/editor', () => ({ useEditorStore: () => ({}) }))
vi.mock('@/stores/workspace', () => ({ useWorkspaceStore: () => ({}) }))
@@ -158,7 +159,7 @@ it('sends on Enter but preserves Shift+Enter and IME confirmation', async () =>
await input.trigger('keydown', { key: 'Enter', shiftKey: true })
expect(send).not.toHaveBeenCalled()
await input.trigger('keydown', { key: 'Enter' })
expect(send).toHaveBeenCalledWith('问题')
expect(send).toHaveBeenCalledWith('问题', undefined, undefined)
await input.trigger('keydown', { key: 'Enter', repeat: true })
expect(send).toHaveBeenCalledTimes(1)
wrapper.unmount()