@aheart-ui/ai 1.1.0 → 2.0.0-alpha.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cjs/agent-execution.vue.js +1 -0
- package/dist/cjs/agent-workbench.vue.js +1 -0
- package/dist/cjs/form-field.vue.js +1 -0
- package/dist/cjs/form.vue.js +1 -0
- package/dist/cjs/full.js +1 -0
- package/dist/cjs/index.js +1 -0
- package/dist/cjs/package.json +6 -0
- package/dist/compat/es/actions/index.d.ts +2 -0
- package/dist/compat/es/actions/index.js +2 -0
- package/dist/compat/es/actions.vue.d.ts +2 -0
- package/dist/compat/es/actions.vue.js +2 -0
- package/dist/compat/es/actions.vue2.js +2 -0
- package/dist/compat/es/agent/index.d.ts +1 -0
- package/dist/compat/es/agent/index.js +1 -0
- package/dist/compat/es/agent/style.css +3241 -0
- package/dist/compat/es/agent-execution.vue.d.ts +2 -0
- package/dist/compat/es/agent-execution.vue.js +2 -0
- package/dist/compat/es/agent-execution.vue2.js +2 -0
- package/dist/compat/es/agent-workbench/index.d.ts +2 -0
- package/dist/compat/es/agent-workbench/index.js +2 -0
- package/{es → dist/compat/es}/agent-workbench/style.css +1095 -4
- package/dist/compat/es/agent-workbench.vue.d.ts +2 -0
- package/dist/compat/es/agent-workbench.vue.js +2 -0
- package/dist/compat/es/agent-workbench.vue2.js +2 -0
- package/dist/compat/es/attachments/index.d.ts +2 -0
- package/dist/compat/es/attachments/index.js +2 -0
- package/dist/compat/es/attachments.vue.d.ts +2 -0
- package/dist/compat/es/attachments.vue.js +2 -0
- package/dist/compat/es/attachments.vue2.js +2 -0
- package/dist/compat/es/bubble/index.d.ts +2 -0
- package/dist/compat/es/bubble/index.js +2 -0
- package/dist/compat/es/bubble.vue.d.ts +2 -0
- package/dist/compat/es/bubble.vue.js +2 -0
- package/dist/compat/es/bubble.vue2.js +2 -0
- package/dist/compat/es/chat/index.d.ts +1 -0
- package/dist/compat/es/chat/index.js +1 -0
- package/dist/compat/es/chat-panel/index.d.ts +2 -0
- package/dist/compat/es/chat-panel/index.js +2 -0
- package/{lib/chat → dist/compat/es/chat-panel}/style.css +0 -4
- package/dist/compat/es/chat-panel.vue.d.ts +2 -0
- package/dist/compat/es/chat-panel.vue.js +2 -0
- package/dist/compat/es/chat-panel.vue2.js +2 -0
- package/dist/compat/es/conversations/index.d.ts +2 -0
- package/dist/compat/es/conversations/index.js +2 -0
- package/dist/compat/es/conversations.vue.d.ts +2 -0
- package/dist/compat/es/conversations.vue.js +2 -0
- package/dist/compat/es/conversations.vue2.js +2 -0
- package/dist/compat/es/form/index.d.ts +2 -0
- package/dist/compat/es/form/index.js +2 -0
- package/dist/compat/es/form/style.css +3175 -0
- package/dist/compat/es/form-field.vue.d.ts +2 -0
- package/dist/compat/es/form-field.vue.js +2 -0
- package/dist/compat/es/form-field.vue2.js +2 -0
- package/dist/compat/es/form-schema.d.ts +1 -0
- package/dist/compat/es/form-schema.js +1 -0
- package/dist/compat/es/form.vue.d.ts +2 -0
- package/dist/compat/es/form.vue.js +2 -0
- package/dist/compat/es/form.vue2.js +2 -0
- package/dist/compat/es/full.d.ts +2 -0
- package/dist/compat/es/full.js +2 -0
- package/dist/compat/es/index.d.ts +2 -0
- package/dist/compat/es/index.js +2 -0
- package/dist/compat/es/package.json +6 -0
- package/dist/compat/es/process/index.d.ts +2 -0
- package/dist/compat/es/process/index.js +2 -0
- package/dist/compat/es/process.vue.d.ts +2 -0
- package/dist/compat/es/process.vue.js +2 -0
- package/dist/compat/es/process.vue2.js +2 -0
- package/dist/compat/es/prompts/index.d.ts +2 -0
- package/dist/compat/es/prompts/index.js +2 -0
- package/dist/compat/es/prompts.vue.d.ts +2 -0
- package/dist/compat/es/prompts.vue.js +2 -0
- package/dist/compat/es/prompts.vue2.js +2 -0
- package/dist/compat/es/safe-markdown.d.ts +1 -0
- package/dist/compat/es/safe-markdown.js +1 -0
- package/dist/compat/es/sender/index.d.ts +2 -0
- package/dist/compat/es/sender/index.js +2 -0
- package/dist/compat/es/sender.vue.d.ts +2 -0
- package/dist/compat/es/sender.vue.js +2 -0
- package/dist/compat/es/sender.vue2.js +2 -0
- package/dist/compat/es/sources/index.d.ts +2 -0
- package/dist/compat/es/sources/index.js +2 -0
- package/dist/compat/es/sources.vue.d.ts +2 -0
- package/dist/compat/es/sources.vue.js +2 -0
- package/dist/compat/es/sources.vue2.js +2 -0
- package/dist/compat/es/stream-reducer.d.ts +1 -0
- package/dist/compat/es/stream-reducer.js +1 -0
- package/dist/compat/es/thought-chain/index.d.ts +2 -0
- package/dist/compat/es/thought-chain/index.js +2 -0
- package/dist/compat/es/thought-chain.vue.d.ts +2 -0
- package/dist/compat/es/thought-chain.vue.js +2 -0
- package/dist/compat/es/thought-chain.vue2.js +2 -0
- package/dist/compat/es/types.d.ts +1 -0
- package/dist/compat/es/welcome/index.d.ts +2 -0
- package/dist/compat/es/welcome/index.js +2 -0
- package/dist/compat/es/welcome.vue.d.ts +2 -0
- package/dist/compat/es/welcome.vue.js +2 -0
- package/dist/compat/es/welcome.vue2.js +2 -0
- package/dist/compat/lib/actions/index.d.ts +2 -0
- package/dist/compat/lib/actions/index.js +1 -0
- package/dist/compat/lib/actions.vue.d.ts +2 -0
- package/dist/compat/lib/actions.vue.js +1 -0
- package/dist/compat/lib/actions.vue2.js +1 -0
- package/dist/compat/lib/agent/index.d.ts +1 -0
- package/dist/compat/lib/agent/index.js +1 -0
- package/dist/compat/lib/agent/style.css +3241 -0
- package/dist/compat/lib/agent-execution.vue.d.ts +2 -0
- package/dist/compat/lib/agent-execution.vue.js +1 -0
- package/dist/compat/lib/agent-execution.vue2.js +1 -0
- package/dist/compat/lib/agent-workbench/index.d.ts +2 -0
- package/dist/compat/lib/agent-workbench/index.js +1 -0
- package/dist/compat/lib/agent-workbench/style.css +2423 -0
- package/dist/compat/lib/agent-workbench.vue.d.ts +2 -0
- package/dist/compat/lib/agent-workbench.vue.js +1 -0
- package/dist/compat/lib/agent-workbench.vue2.js +1 -0
- package/dist/compat/lib/attachments/index.d.ts +2 -0
- package/dist/compat/lib/attachments/index.js +1 -0
- package/dist/compat/lib/attachments.vue.d.ts +2 -0
- package/dist/compat/lib/attachments.vue.js +1 -0
- package/dist/compat/lib/attachments.vue2.js +1 -0
- package/dist/compat/lib/bubble/index.d.ts +2 -0
- package/dist/compat/lib/bubble/index.js +1 -0
- package/dist/compat/lib/bubble.vue.d.ts +2 -0
- package/dist/compat/lib/bubble.vue.js +1 -0
- package/dist/compat/lib/bubble.vue2.js +1 -0
- package/dist/compat/lib/chat/index.d.ts +1 -0
- package/dist/compat/lib/chat/index.js +1 -0
- package/dist/compat/lib/chat-panel/index.d.ts +2 -0
- package/dist/compat/lib/chat-panel/index.js +1 -0
- package/dist/compat/lib/chat-panel/style.css +591 -0
- package/dist/compat/lib/chat-panel.vue.d.ts +2 -0
- package/dist/compat/lib/chat-panel.vue.js +1 -0
- package/dist/compat/lib/chat-panel.vue2.js +1 -0
- package/dist/compat/lib/conversations/index.d.ts +2 -0
- package/dist/compat/lib/conversations/index.js +1 -0
- package/dist/compat/lib/conversations.vue.d.ts +2 -0
- package/dist/compat/lib/conversations.vue.js +1 -0
- package/dist/compat/lib/conversations.vue2.js +1 -0
- package/dist/compat/lib/form/index.d.ts +2 -0
- package/dist/compat/lib/form/index.js +1 -0
- package/dist/compat/lib/form/style.css +3175 -0
- package/dist/compat/lib/form-field.vue.d.ts +2 -0
- package/dist/compat/lib/form-field.vue.js +1 -0
- package/dist/compat/lib/form-field.vue2.js +1 -0
- package/dist/compat/lib/form-schema.d.ts +1 -0
- package/dist/compat/lib/form-schema.js +1 -0
- package/dist/compat/lib/form.vue.d.ts +2 -0
- package/dist/compat/lib/form.vue.js +1 -0
- package/dist/compat/lib/form.vue2.js +1 -0
- package/dist/compat/lib/full.d.ts +2 -0
- package/dist/compat/lib/full.js +1 -0
- package/dist/compat/lib/index.d.ts +2 -0
- package/dist/compat/lib/index.js +1 -0
- package/dist/compat/lib/package.json +6 -0
- package/dist/compat/lib/process/index.d.ts +2 -0
- package/dist/compat/lib/process/index.js +1 -0
- package/dist/compat/lib/process.vue.d.ts +2 -0
- package/dist/compat/lib/process.vue.js +1 -0
- package/dist/compat/lib/process.vue2.js +1 -0
- package/dist/compat/lib/prompts/index.d.ts +2 -0
- package/dist/compat/lib/prompts/index.js +1 -0
- package/dist/compat/lib/prompts.vue.d.ts +2 -0
- package/dist/compat/lib/prompts.vue.js +1 -0
- package/dist/compat/lib/prompts.vue2.js +1 -0
- package/dist/compat/lib/safe-markdown.d.ts +1 -0
- package/dist/compat/lib/safe-markdown.js +1 -0
- package/dist/compat/lib/sender/index.d.ts +2 -0
- package/dist/compat/lib/sender/index.js +1 -0
- package/dist/compat/lib/sender.vue.d.ts +2 -0
- package/dist/compat/lib/sender.vue.js +1 -0
- package/dist/compat/lib/sender.vue2.js +1 -0
- package/dist/compat/lib/sources/index.d.ts +2 -0
- package/dist/compat/lib/sources/index.js +1 -0
- package/dist/compat/lib/sources.vue.d.ts +2 -0
- package/dist/compat/lib/sources.vue.js +1 -0
- package/dist/compat/lib/sources.vue2.js +1 -0
- package/dist/compat/lib/stream-reducer.d.ts +1 -0
- package/dist/compat/lib/stream-reducer.js +1 -0
- package/dist/compat/lib/thought-chain/index.d.ts +2 -0
- package/dist/compat/lib/thought-chain/index.js +1 -0
- package/dist/compat/lib/thought-chain.vue.d.ts +2 -0
- package/dist/compat/lib/thought-chain.vue.js +1 -0
- package/dist/compat/lib/thought-chain.vue2.js +1 -0
- package/dist/compat/lib/types.d.ts +1 -0
- package/dist/compat/lib/welcome/index.d.ts +2 -0
- package/dist/compat/lib/welcome/index.js +1 -0
- package/dist/compat/lib/welcome.vue.d.ts +2 -0
- package/dist/compat/lib/welcome.vue.js +1 -0
- package/dist/compat/lib/welcome.vue2.js +1 -0
- package/{es → dist/esm}/agent-execution.vue.js +1 -1
- package/{es → dist/esm}/agent-workbench.vue.js +9 -6
- package/{es → dist/esm}/form-field.vue.js +53 -43
- package/{es → dist/esm}/form.vue.js +7 -6
- package/dist/esm/full.js +42 -0
- package/dist/esm/index.js +39 -0
- package/dist/esm/package.json +6 -0
- package/dist/styles/actions/style.css +36 -0
- package/dist/styles/agent/style.css +3241 -0
- package/dist/styles/agent-workbench/style.css +2423 -0
- package/dist/styles/attachments/style.css +62 -0
- package/dist/styles/bubble/style.css +241 -0
- package/dist/styles/chat-panel/style.css +591 -0
- package/dist/styles/conversations/style.css +48 -0
- package/dist/styles/form/style.css +3175 -0
- package/dist/styles/process/style.css +77 -0
- package/dist/styles/prompts/style.css +76 -0
- package/dist/styles/sender/style.css +88 -0
- package/dist/styles/sources/style.css +54 -0
- package/{lib/agent-workbench → dist/styles}/style.css +254 -0
- package/dist/styles/thought-chain/style.css +77 -0
- package/dist/styles/welcome/style.css +33 -0
- package/dist/types/full.d.ts +6 -0
- package/{lib → dist/types}/index.d.ts +1 -2
- package/package.json +111 -85
- package/es/agent/style.css +0 -308
- package/es/form/style.css +0 -242
- package/es/index.d.ts +0 -20
- package/es/index.js +0 -42
- package/es/package.json +0 -3
- package/lib/actions/index.d.ts +0 -2
- package/lib/actions.vue.d.ts +0 -34
- package/lib/agent/index.d.ts +0 -5
- package/lib/agent/style.css +0 -308
- package/lib/agent-execution.vue.d.ts +0 -106
- package/lib/agent-execution.vue.js +0 -1
- package/lib/agent-workbench/index.d.ts +0 -2
- package/lib/agent-workbench.vue.d.ts +0 -186
- package/lib/agent-workbench.vue.js +0 -1
- package/lib/attachments/index.d.ts +0 -2
- package/lib/attachments.vue.d.ts +0 -39
- package/lib/bubble/index.d.ts +0 -2
- package/lib/bubble.vue.d.ts +0 -27
- package/lib/chat/index.d.ts +0 -11
- package/lib/chat-panel/index.d.ts +0 -3
- package/lib/chat-panel.vue.d.ts +0 -108
- package/lib/conversations/index.d.ts +0 -2
- package/lib/conversations.vue.d.ts +0 -39
- package/lib/form/index.d.ts +0 -3
- package/lib/form/style.css +0 -242
- package/lib/form-field.vue.d.ts +0 -28
- package/lib/form-field.vue.js +0 -1
- package/lib/form-schema.d.ts +0 -73
- package/lib/form.vue.d.ts +0 -81
- package/lib/form.vue.js +0 -1
- package/lib/index.js +0 -1
- package/lib/package.json +0 -3
- package/lib/process/index.d.ts +0 -2
- package/lib/process.vue.d.ts +0 -30
- package/lib/prompts/index.d.ts +0 -2
- package/lib/prompts.vue.d.ts +0 -39
- package/lib/safe-markdown.d.ts +0 -3
- package/lib/sender/index.d.ts +0 -2
- package/lib/sender.vue.d.ts +0 -52
- package/lib/sources/index.d.ts +0 -2
- package/lib/sources.vue.d.ts +0 -30
- package/lib/stream-reducer.d.ts +0 -35
- package/lib/thought-chain/index.d.ts +0 -2
- package/lib/thought-chain.vue.d.ts +0 -30
- package/lib/types.d.ts +0 -203
- package/lib/welcome/index.d.ts +0 -2
- package/lib/welcome.vue.d.ts +0 -41
- /package/{lib → dist/cjs}/actions/index.js +0 -0
- /package/{lib → dist/cjs}/actions.vue.js +0 -0
- /package/{lib → dist/cjs}/actions.vue2.js +0 -0
- /package/{lib → dist/cjs}/agent/index.js +0 -0
- /package/{lib → dist/cjs}/agent-execution.vue2.js +0 -0
- /package/{lib → dist/cjs}/agent-workbench/index.js +0 -0
- /package/{lib → dist/cjs}/agent-workbench.vue2.js +0 -0
- /package/{lib → dist/cjs}/attachments/index.js +0 -0
- /package/{lib → dist/cjs}/attachments.vue.js +0 -0
- /package/{lib → dist/cjs}/attachments.vue2.js +0 -0
- /package/{lib → dist/cjs}/bubble/index.js +0 -0
- /package/{lib → dist/cjs}/bubble.vue.js +0 -0
- /package/{lib → dist/cjs}/bubble.vue2.js +0 -0
- /package/{lib → dist/cjs}/chat/index.js +0 -0
- /package/{lib → dist/cjs}/chat-panel/index.js +0 -0
- /package/{lib → dist/cjs}/chat-panel.vue.js +0 -0
- /package/{lib → dist/cjs}/chat-panel.vue2.js +0 -0
- /package/{lib → dist/cjs}/conversations/index.js +0 -0
- /package/{lib → dist/cjs}/conversations.vue.js +0 -0
- /package/{lib → dist/cjs}/conversations.vue2.js +0 -0
- /package/{lib → dist/cjs}/form/index.js +0 -0
- /package/{lib → dist/cjs}/form-field.vue2.js +0 -0
- /package/{lib → dist/cjs}/form-schema.js +0 -0
- /package/{lib → dist/cjs}/form.vue2.js +0 -0
- /package/{lib → dist/cjs}/process/index.js +0 -0
- /package/{lib → dist/cjs}/process.vue.js +0 -0
- /package/{lib → dist/cjs}/process.vue2.js +0 -0
- /package/{lib → dist/cjs}/prompts/index.js +0 -0
- /package/{lib → dist/cjs}/prompts.vue.js +0 -0
- /package/{lib → dist/cjs}/prompts.vue2.js +0 -0
- /package/{lib → dist/cjs}/safe-markdown.js +0 -0
- /package/{lib → dist/cjs}/sender/index.js +0 -0
- /package/{lib → dist/cjs}/sender.vue.js +0 -0
- /package/{lib → dist/cjs}/sender.vue2.js +0 -0
- /package/{lib → dist/cjs}/sources/index.js +0 -0
- /package/{lib → dist/cjs}/sources.vue.js +0 -0
- /package/{lib → dist/cjs}/sources.vue2.js +0 -0
- /package/{lib → dist/cjs}/stream-reducer.js +0 -0
- /package/{lib → dist/cjs}/thought-chain/index.js +0 -0
- /package/{lib → dist/cjs}/thought-chain.vue.js +0 -0
- /package/{lib → dist/cjs}/thought-chain.vue2.js +0 -0
- /package/{lib → dist/cjs}/welcome/index.js +0 -0
- /package/{lib → dist/cjs}/welcome.vue.js +0 -0
- /package/{lib → dist/cjs}/welcome.vue2.js +0 -0
- /package/{es → dist/compat/es}/actions/style.css +0 -0
- /package/{es → dist/compat/es}/attachments/style.css +0 -0
- /package/{es → dist/compat/es}/bubble/style.css +0 -0
- /package/{es/chat-panel → dist/compat/es/chat}/style.css +0 -0
- /package/{es → dist/compat/es}/conversations/style.css +0 -0
- /package/{es → dist/compat/es}/process/style.css +0 -0
- /package/{es → dist/compat/es}/prompts/style.css +0 -0
- /package/{es → dist/compat/es}/sender/style.css +0 -0
- /package/{es → dist/compat/es}/sources/style.css +0 -0
- /package/{es → dist/compat/es}/style.css +0 -0
- /package/{es → dist/compat/es}/thought-chain/style.css +0 -0
- /package/{es → dist/compat/es}/welcome/style.css +0 -0
- /package/{lib → dist/compat/lib}/actions/style.css +0 -0
- /package/{lib → dist/compat/lib}/attachments/style.css +0 -0
- /package/{lib → dist/compat/lib}/bubble/style.css +0 -0
- /package/{es → dist/compat/lib}/chat/style.css +0 -0
- /package/{lib → dist/compat/lib}/conversations/style.css +0 -0
- /package/{lib → dist/compat/lib}/process/style.css +0 -0
- /package/{lib → dist/compat/lib}/prompts/style.css +0 -0
- /package/{lib → dist/compat/lib}/sender/style.css +0 -0
- /package/{lib → dist/compat/lib}/sources/style.css +0 -0
- /package/{lib → dist/compat/lib}/style.css +0 -0
- /package/{lib → dist/compat/lib}/thought-chain/style.css +0 -0
- /package/{lib → dist/compat/lib}/welcome/style.css +0 -0
- /package/{es → dist/esm}/actions/index.js +0 -0
- /package/{es → dist/esm}/actions.vue.js +0 -0
- /package/{es → dist/esm}/actions.vue2.js +0 -0
- /package/{es → dist/esm}/agent/index.js +0 -0
- /package/{es → dist/esm}/agent-execution.vue2.js +0 -0
- /package/{es → dist/esm}/agent-workbench/index.js +0 -0
- /package/{es → dist/esm}/agent-workbench.vue2.js +0 -0
- /package/{es → dist/esm}/attachments/index.js +0 -0
- /package/{es → dist/esm}/attachments.vue.js +0 -0
- /package/{es → dist/esm}/attachments.vue2.js +0 -0
- /package/{es → dist/esm}/bubble/index.js +0 -0
- /package/{es → dist/esm}/bubble.vue.js +0 -0
- /package/{es → dist/esm}/bubble.vue2.js +0 -0
- /package/{es → dist/esm}/chat/index.js +0 -0
- /package/{es → dist/esm}/chat-panel/index.js +0 -0
- /package/{es → dist/esm}/chat-panel.vue.js +0 -0
- /package/{es → dist/esm}/chat-panel.vue2.js +0 -0
- /package/{es → dist/esm}/conversations/index.js +0 -0
- /package/{es → dist/esm}/conversations.vue.js +0 -0
- /package/{es → dist/esm}/conversations.vue2.js +0 -0
- /package/{es → dist/esm}/form/index.js +0 -0
- /package/{es → dist/esm}/form-field.vue2.js +0 -0
- /package/{es → dist/esm}/form-schema.js +0 -0
- /package/{es → dist/esm}/form.vue2.js +0 -0
- /package/{es → dist/esm}/process/index.js +0 -0
- /package/{es → dist/esm}/process.vue.js +0 -0
- /package/{es → dist/esm}/process.vue2.js +0 -0
- /package/{es → dist/esm}/prompts/index.js +0 -0
- /package/{es → dist/esm}/prompts.vue.js +0 -0
- /package/{es → dist/esm}/prompts.vue2.js +0 -0
- /package/{es → dist/esm}/safe-markdown.js +0 -0
- /package/{es → dist/esm}/sender/index.js +0 -0
- /package/{es → dist/esm}/sender.vue.js +0 -0
- /package/{es → dist/esm}/sender.vue2.js +0 -0
- /package/{es → dist/esm}/sources/index.js +0 -0
- /package/{es → dist/esm}/sources.vue.js +0 -0
- /package/{es → dist/esm}/sources.vue2.js +0 -0
- /package/{es → dist/esm}/stream-reducer.js +0 -0
- /package/{es → dist/esm}/thought-chain/index.js +0 -0
- /package/{es → dist/esm}/thought-chain.vue.js +0 -0
- /package/{es → dist/esm}/thought-chain.vue2.js +0 -0
- /package/{es → dist/esm}/welcome/index.js +0 -0
- /package/{es → dist/esm}/welcome.vue.js +0 -0
- /package/{es → dist/esm}/welcome.vue2.js +0 -0
- /package/{lib/chat-panel → dist/styles/chat}/style.css +0 -0
- /package/{es → dist/types}/actions/index.d.ts +0 -0
- /package/{es → dist/types}/actions.vue.d.ts +0 -0
- /package/{es → dist/types}/agent/index.d.ts +0 -0
- /package/{es → dist/types}/agent-execution.vue.d.ts +0 -0
- /package/{es → dist/types}/agent-workbench/index.d.ts +0 -0
- /package/{es → dist/types}/agent-workbench.vue.d.ts +0 -0
- /package/{es → dist/types}/attachments/index.d.ts +0 -0
- /package/{es → dist/types}/attachments.vue.d.ts +0 -0
- /package/{es → dist/types}/bubble/index.d.ts +0 -0
- /package/{es → dist/types}/bubble.vue.d.ts +0 -0
- /package/{es → dist/types}/chat/index.d.ts +0 -0
- /package/{es → dist/types}/chat-panel/index.d.ts +0 -0
- /package/{es → dist/types}/chat-panel.vue.d.ts +0 -0
- /package/{es → dist/types}/conversations/index.d.ts +0 -0
- /package/{es → dist/types}/conversations.vue.d.ts +0 -0
- /package/{es → dist/types}/form/index.d.ts +0 -0
- /package/{es → dist/types}/form-field.vue.d.ts +0 -0
- /package/{es → dist/types}/form-schema.d.ts +0 -0
- /package/{es → dist/types}/form.vue.d.ts +0 -0
- /package/{es → dist/types}/process/index.d.ts +0 -0
- /package/{es → dist/types}/process.vue.d.ts +0 -0
- /package/{es → dist/types}/prompts/index.d.ts +0 -0
- /package/{es → dist/types}/prompts.vue.d.ts +0 -0
- /package/{es → dist/types}/safe-markdown.d.ts +0 -0
- /package/{es → dist/types}/sender/index.d.ts +0 -0
- /package/{es → dist/types}/sender.vue.d.ts +0 -0
- /package/{es → dist/types}/sources/index.d.ts +0 -0
- /package/{es → dist/types}/sources.vue.d.ts +0 -0
- /package/{es → dist/types}/stream-reducer.d.ts +0 -0
- /package/{es → dist/types}/thought-chain/index.d.ts +0 -0
- /package/{es → dist/types}/thought-chain.vue.d.ts +0 -0
- /package/{es → dist/types}/types.d.ts +0 -0
- /package/{es → dist/types}/welcome/index.d.ts +0 -0
- /package/{es → dist/types}/welcome.vue.d.ts +0 -0
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("vue"),v=require("aheart-ui/button"),ne=require("@aheart-ui/dnd/sortable"),J=require("./safe-markdown.js"),se={class:"aheart-ai-workbench__execution-content"},ce={key:0,class:"aheart-ai-workbench__mobile-priority",role:"region","aria-label":"移动端优先处理"},ie={class:"aheart-ai-workbench__priority-heading"},de={class:"aheart-ai-workbench__eyebrow"},pe={key:0},ue={key:1},ke={key:0,class:"aheart-ai-workbench__priority-approval"},me={key:0},ve={class:"aheart-ai-workbench__priority-actions"},_e={key:1,class:"aheart-ai-workbench__approval-result"},ye=["aria-label"],he={key:0},be=["aria-label"],ge={key:0},Be=["aria-labelledby"],Ne={class:"aheart-ai-workbench__section-heading"},Ve=["id"],Ee={class:"aheart-ai-workbench__timeline"},fe=["data-task-id"],Ce={class:"aheart-ai-workbench__task-body"},we={class:"aheart-ai-workbench__task-summary"},Se={key:0,class:"aheart-ai-workbench__tool-name"},De={class:"aheart-ai-workbench__task-status"},$e={key:0,class:"aheart-ai-workbench__task-detail"},xe={key:1,class:"aheart-ai-workbench__tool-call","aria-label":"工具调用摘要"},je={key:0},Ae={key:1},Te={key:2},Me={key:2,class:"aheart-ai-workbench__task-lock-reason",role:"status"},Ie={key:3,class:"aheart-ai-workbench__task-lock-reason",role:"status"},ze={key:4,class:"aheart-ai-workbench__task-lock-reason",role:"status"},Ke={key:5,class:"aheart-ai-workbench__task-progress"},Re=["aria-valuenow"],Le={key:6,class:"aheart-ai-workbench__task-time"},Fe={key:0},qe={key:1},Ue={key:7,class:"aheart-ai-workbench__task-error"},He={class:"aheart-ai-workbench__task-actions"},Pe={key:8,class:"aheart-ai-workbench__operation-status",role:"status"},Oe=["data-approval-id"],We={key:0},Ze={key:1,class:"aheart-ai-workbench__approval-result"},Ge={key:0,class:"aheart-ai-workbench__empty"},Je=["aria-labelledby"],Qe={class:"aheart-ai-workbench__section-heading"},Xe=["id"],Ye={key:0,class:"aheart-ai-workbench__artifact-list"},et=["data-artifact-id"],tt=["aria-pressed","onClick"],at={key:0},ot={key:1,class:"aheart-ai-workbench__empty"},lt={key:2,class:"aheart-ai-workbench__artifact-preview","aria-label":"产物预览"},rt={class:"aheart-ai-workbench__artifact-preview-header"},nt=["href"],st={key:0},ct=e.defineComponent({name:"AIAgentWorkbenchExecution",__name:"agent-execution",props:{tasks:{default:()=>[]},artifacts:{default:()=>[]},activeArtifact:{default:void 0},disabled:{type:Boolean,default:!1},reorderable:{type:Boolean,default:!0},tasksRevision:{},scopeKey:{default:"default"},actionDisabled:{type:Function,default:()=>!1},operationMessages:{default:()=>({})},validateCandidate:{type:Function,default:()=>{}}},emits:["update:tasks","approve","reject","cancel","retry","move-task","move-task-reject","select-artifact"],setup(i,{emit:Q}){const r=i,C=e.computed(()=>`aheart-agent-execution-${String(r.scopeKey??"default").replace(/[^a-zA-Z0-9_-]/g,"-")}`),w=e.computed(()=>`${C.value}-tasks`),S=e.computed(()=>`${C.value}-artifacts`),d=Q,X={pending:"等待执行",running:"执行中","waiting-approval":"等待审批",complete:"已完成",error:"执行失败",cancelled:"已取消"},Y=e.computed(()=>r.tasks.map((o,l)=>({...o,__sortableKey:`${o.id}::${l}`}))),n=e.computed(()=>r.artifacts.find(o=>o.id===r.activeArtifact)??r.artifacts[0]),s=e.computed(()=>r.tasks.find(o=>o.approval&&(!o.approval.status||o.approval.status==="pending"))??r.tasks.find(o=>o.approval)),_=e.computed(()=>r.artifacts.find(o=>{var l,c;return o.id===((c=(l=s.value)==null?void 0:l.approval)==null?void 0:c.artifactId)})??n.value),ee=e.computed(()=>{var o;return(o=s.value)!=null&&o.approval&&(!s.value.approval.status||s.value.approval.status==="pending")?"等待审批":s.value?"审批结果":"当前产物"}),a=o=>o,p=o=>o.toolCall,N=o=>{var l;return`${o.id}:${String(o.revision??"")}:${((l=o.approval)==null?void 0:l.id)??""}`},te=o=>{d("move-task-reject",{"stale-revision":"任务版本已变化,排序已拒绝","source-missing":"源任务已不存在,排序已拒绝","target-missing":"目标位置已不存在,排序已拒绝","duplicate-key":"任务标识重复,无法排序","group-mismatch":"任务不属于当前排序分组",disabled:"任务当前不可排序,排序已拒绝","invalid-position":"目标位置无效,排序已拒绝","parent-rejected":"任务版本已变化,排序已拒绝","rollback-rejected":"排序回滚失败,请刷新后重试",unmounted:"排序目标已卸载",cancelled:"排序已取消"}[o.reason??""]??"任务当前不可排序,排序已拒绝")},ae=o=>X[o],oe=o=>o.status,le=o=>ae(o.status),V=o=>Math.min(100,Math.max(0,Math.round(o??0))),re=o=>{var l;if(!r.disabled&&r.reorderable){const c=o.map(({__sortableKey:b,...h})=>h),k=(l=r.validateCandidate)==null?void 0:l.call(r,c);if(k){d("move-task-reject",k);return}d("update:tasks",c)}},D=(o,l)=>{var h;if(E(r.tasks[o],o,l))return;const c=[...r.tasks],[k]=c.splice(o,1);c.splice(o+l,0,k);const b=(h=r.validateCandidate)==null?void 0:h.call(r,c);if(b){d("move-task-reject",b);return}d("update:tasks",c),d("move-task",k.id,l<0?"up":"down")},y=(o,l)=>{var c;return r.disabled||!!((c=r.actionDisabled)!=null&&c.call(r,o,l))},E=(o,l,c)=>!!(r.disabled||!r.reorderable||l+c<0||l+c>=r.tasks.length||(o==null?void 0:o.reorderable)===!1||o!=null&&o.lockedReason||(o==null?void 0:o.status)==="running"||(o==null?void 0:o.status)==="waiting-approval");return(o,l)=>{var c,k,b,h,$,x;return e.openBlock(),e.createElementBlock("div",se,[s.value||n.value?(e.openBlock(),e.createElementBlock("section",ce,[e.createElementVNode("div",ie,[e.createElementVNode("span",de,e.toDisplayString(ee.value),1),s.value?(e.openBlock(),e.createElementBlock("strong",pe,e.toDisplayString((c=s.value.approval)==null?void 0:c.title),1)):(e.openBlock(),e.createElementBlock("strong",ue,"查看当前产物"))]),s.value?(e.openBlock(),e.createElementBlock("div",ke,[(k=s.value.approval)!=null&&k.description?(e.openBlock(),e.createElementBlock("p",me,e.toDisplayString(s.value.approval.description),1)):e.createCommentVNode("",!0),e.createElementVNode("div",ve,[!((b=s.value.approval)!=null&&b.status)||s.value.approval.status==="pending"?(e.openBlock(),e.createElementBlock(e.Fragment,{key:0},[e.createVNode(e.unref(v.Button),{"data-action":"approve",type:"primary",disabled:y(s.value,"approve"),onClick:l[0]||(l[0]=t=>d("approve",s.value))},{default:e.withCtx(()=>[...l[4]||(l[4]=[e.createTextVNode("批准",-1)])]),_:1},8,["disabled"]),e.createVNode(e.unref(v.Button),{"data-action":"reject",danger:"",disabled:y(s.value,"reject"),onClick:l[1]||(l[1]=t=>d("reject",s.value))},{default:e.withCtx(()=>[...l[5]||(l[5]=[e.createTextVNode("拒绝",-1)])]),_:1},8,["disabled"])],64)):(e.openBlock(),e.createElementBlock("span",_e,e.toDisplayString(s.value.approval.status==="approved"?"已批准":"已拒绝"),1))])])):e.createCommentVNode("",!0),_.value?(e.openBlock(),e.createElementBlock("button",{key:1,type:"button",class:"aheart-ai-workbench__priority-artifact","data-artifact-role":"approval","aria-label":_.value.title,onClick:l[2]||(l[2]=t=>d("select-artifact",_.value))},[e.createElementVNode("span",null,e.toDisplayString(($=(h=s.value)==null?void 0:h.approval)!=null&&$.artifactId?"审批对象":"当前产物"),1),e.createElementVNode("strong",null,e.toDisplayString(_.value.title),1),_.value.description?(e.openBlock(),e.createElementBlock("small",he,e.toDisplayString(_.value.description),1)):e.createCommentVNode("",!0)],8,ye)):e.createCommentVNode("",!0),n.value&&n.value.id!==((x=_.value)==null?void 0:x.id)?(e.openBlock(),e.createElementBlock("button",{key:2,type:"button",class:"aheart-ai-workbench__priority-artifact","data-artifact-role":"current","aria-label":n.value.title,onClick:l[3]||(l[3]=t=>d("select-artifact",n.value))},[l[6]||(l[6]=e.createElementVNode("span",null,"当前产物",-1)),e.createElementVNode("strong",null,e.toDisplayString(n.value.title),1),n.value.description?(e.openBlock(),e.createElementBlock("small",ge,e.toDisplayString(n.value.description),1)):e.createCommentVNode("",!0)],8,be)):e.createCommentVNode("",!0)])):e.createCommentVNode("",!0),e.createElementVNode("section",{class:"aheart-ai-workbench__tasks","aria-labelledby":w.value},[e.createElementVNode("div",Ne,[e.createElementVNode("div",null,[l[7]||(l[7]=e.createElementVNode("span",{class:"aheart-ai-workbench__eyebrow"},"执行流程",-1)),e.createElementVNode("h2",{id:w.value},"执行时间线",8,Ve)]),e.createElementVNode("span",null,e.toDisplayString(i.tasks.length)+" 项",1)]),e.createElementVNode("div",Ee,[e.createVNode(e.unref(ne.SortableList),{items:Y.value,"item-key":"__sortableKey",disabled:i.disabled||!i.reorderable,revision:i.tasksRevision,group:`agent-tasks-${i.scopeKey}`,"onUpdate:items":re,onMoveReject:te},{item:e.withCtx(({item:t,index:m})=>[e.renderSlot(o.$slots,"task",{task:a(t),index:m},()=>{var g,f,j,A,T,M,I,z,K,R,L,F,q,U,H,P,O,W,Z,G;return[e.createElementVNode("article",{"data-task-id":a(t).id,class:e.normalizeClass(["aheart-ai-workbench__timeline-item",[`is-${oe(a(t))}`,{"has-approval-summary":!!a(t).approval}]])},[l[15]||(l[15]=e.createElementVNode("span",{class:"aheart-ai-workbench__timeline-marker","aria-hidden":"true"},null,-1)),e.createElementVNode("div",Ce,[e.createElementVNode("header",we,[e.createElementVNode("div",null,[e.createElementVNode("strong",null,e.toDisplayString(a(t).label),1),a(t).toolName?(e.openBlock(),e.createElementBlock("span",Se,e.toDisplayString(a(t).toolName),1)):e.createCommentVNode("",!0)]),e.createElementVNode("span",De,e.toDisplayString(le(a(t))),1)]),a(t).detail&&!p(a(t))?(e.openBlock(),e.createElementBlock("p",$e,e.toDisplayString(a(t).detail),1)):e.createCommentVNode("",!0),p(a(t))?(e.openBlock(),e.createElementBlock("section",xe,[e.createElementVNode("strong",null,e.toDisplayString((g=p(a(t)))==null?void 0:g.name),1),e.createElementVNode("span",null,e.toDisplayString((f=p(a(t)))==null?void 0:f.summary),1),(j=p(a(t)))!=null&&j.inputSummary?(e.openBlock(),e.createElementBlock("small",je,e.toDisplayString((A=p(a(t)))==null?void 0:A.inputSummary),1)):e.createCommentVNode("",!0),(T=p(a(t)))!=null&&T.resultSummary?(e.openBlock(),e.createElementBlock("small",Ae,e.toDisplayString((M=p(a(t)))==null?void 0:M.resultSummary),1)):e.createCommentVNode("",!0),(I=p(a(t)))!=null&&I.error?(e.openBlock(),e.createElementBlock("small",Te,e.toDisplayString((z=p(a(t)))==null?void 0:z.error),1)):e.createCommentVNode("",!0)])):e.createCommentVNode("",!0),a(t).lockedReason||((K=i.operationMessages)==null?void 0:K[N(a(t))])===""?(e.openBlock(),e.createElementBlock("p",Me,e.toDisplayString(a(t).lockedReason),1)):e.createCommentVNode("",!0),a(t).revision===void 0&&y(a(t),"approve")?(e.openBlock(),e.createElementBlock("p",Ie,"缺少任务版本")):e.createCommentVNode("",!0),(R=a(t).approval)!=null&&R.artifactId&&(!i.artifacts.some(u=>{var B;return u.id===((B=a(t).approval)==null?void 0:B.artifactId)})||i.artifacts.some(u=>{var B;return u.id===((B=a(t).approval)==null?void 0:B.artifactId)&&u.revision===void 0}))?(e.openBlock(),e.createElementBlock("p",ze,"缺少产物版本")):e.createCommentVNode("",!0),a(t).progress!==void 0?(e.openBlock(),e.createElementBlock("div",Ke,[e.createElementVNode("div",{role:"progressbar","aria-label":"任务进度","aria-valuemin":"0","aria-valuemax":"100","aria-valuenow":V(a(t).progress)},[e.createElementVNode("span",{style:e.normalizeStyle({inlineSize:`${V(a(t).progress)}%`})},null,4)],8,Re),e.createElementVNode("small",null,e.toDisplayString(V(a(t).progress))+"%",1)])):e.createCommentVNode("",!0),a(t).startedAt||a(t).completedAt?(e.openBlock(),e.createElementBlock("div",Le,[a(t).startedAt?(e.openBlock(),e.createElementBlock("span",Fe,"开始 "+e.toDisplayString(a(t).startedAt),1)):e.createCommentVNode("",!0),a(t).completedAt?(e.openBlock(),e.createElementBlock("span",qe,"完成 "+e.toDisplayString(a(t).completedAt),1)):e.createCommentVNode("",!0)])):e.createCommentVNode("",!0),a(t).error?(e.openBlock(),e.createElementBlock("details",Ue,[l[8]||(l[8]=e.createElementVNode("summary",null,"查看错误详情",-1)),e.createElementVNode("p",null,e.toDisplayString(a(t).error),1)])):e.createCommentVNode("",!0),e.createElementVNode("div",He,[a(t).status==="running"?(e.openBlock(),e.createBlock(e.unref(v.Button),{key:0,"data-action":"cancel",type:"text",disabled:y(a(t),"cancel"),onClick:u=>d("cancel",a(t))},{default:e.withCtx(()=>[...l[9]||(l[9]=[e.createTextVNode("取消",-1)])]),_:1},8,["disabled","onClick"])):e.createCommentVNode("",!0),a(t).status==="error"||(L=i.operationMessages)!=null&&L[N(a(t))]?(e.openBlock(),e.createBlock(e.unref(v.Button),{key:1,"data-action":"retry",type:"text",disabled:y(a(t),"retry"),onClick:u=>d("retry",a(t))},{default:e.withCtx(()=>[...l[10]||(l[10]=[e.createTextVNode("重试",-1)])]),_:1},8,["disabled","onClick"])):e.createCommentVNode("",!0),e.createVNode(e.unref(v.Button),{"data-action":"move-up",type:"text",disabled:E(a(t),m,-1),onClick:u=>D(m,-1)},{default:e.withCtx(()=>[...l[11]||(l[11]=[e.createTextVNode("上移",-1)])]),_:1},8,["disabled","onClick"]),e.createVNode(e.unref(v.Button),{"data-action":"move-down",type:"text",disabled:E(a(t),m,1),onClick:u=>D(m,1)},{default:e.withCtx(()=>[...l[12]||(l[12]=[e.createTextVNode("下移",-1)])]),_:1},8,["disabled","onClick"])]),(F=i.operationMessages)!=null&&F[N(a(t))]?(e.openBlock(),e.createElementBlock("p",Pe,e.toDisplayString(i.operationMessages[N(a(t))]),1)):e.createCommentVNode("",!0),a(t).approval?(e.openBlock(),e.createElementBlock("div",{key:9,"data-approval-id":(q=a(t).approval)==null?void 0:q.id,class:e.normalizeClass(["aheart-ai-workbench__approval",`is-${((U=a(t).approval)==null?void 0:U.status)??"pending"}`])},[e.createElementVNode("div",null,[e.createElementVNode("strong",null,e.toDisplayString((H=a(t).approval)==null?void 0:H.title),1),(P=a(t).approval)!=null&&P.description?(e.openBlock(),e.createElementBlock("p",We,e.toDisplayString((O=a(t).approval)==null?void 0:O.description),1)):e.createCommentVNode("",!0)]),!((W=a(t).approval)!=null&&W.status)||((Z=a(t).approval)==null?void 0:Z.status)==="pending"?(e.openBlock(),e.createElementBlock(e.Fragment,{key:0},[e.createVNode(e.unref(v.Button),{"data-action":"approve",type:"primary",disabled:y(a(t),"approve"),onClick:u=>d("approve",a(t))},{default:e.withCtx(()=>[...l[13]||(l[13]=[e.createTextVNode("批准",-1)])]),_:1},8,["disabled","onClick"]),e.createVNode(e.unref(v.Button),{"data-action":"reject",danger:"",disabled:y(a(t),"reject"),onClick:u=>d("reject",a(t))},{default:e.withCtx(()=>[...l[14]||(l[14]=[e.createTextVNode("拒绝",-1)])]),_:1},8,["disabled","onClick"])],64)):(e.openBlock(),e.createElementBlock("span",Ze,e.toDisplayString(((G=a(t).approval)==null?void 0:G.status)==="approved"?"已批准":"已拒绝"),1))],10,Oe)):e.createCommentVNode("",!0)])],10,fe)]})]),_:3},8,["items","disabled","revision","group"])]),i.tasks.length?e.createCommentVNode("",!0):(e.openBlock(),e.createElementBlock("p",Ge,"尚无执行任务。"))],8,Be),e.createElementVNode("section",{class:"aheart-ai-workbench__artifacts","aria-labelledby":S.value},[e.createElementVNode("div",Qe,[e.createElementVNode("div",null,[l[16]||(l[16]=e.createElementVNode("span",{class:"aheart-ai-workbench__eyebrow"},"产物输出",-1)),e.createElementVNode("h2",{id:S.value},"产物",8,Xe)]),e.createElementVNode("span",null,e.toDisplayString(i.artifacts.length)+" 项",1)]),i.artifacts.length?(e.openBlock(),e.createElementBlock("ul",Ye,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(i.artifacts,t=>{var m,g;return e.openBlock(),e.createElementBlock("li",{key:t.id,"data-artifact-id":t.id,class:e.normalizeClass({"is-active":t.id===((m=n.value)==null?void 0:m.id)})},[e.createElementVNode("button",{type:"button","aria-pressed":t.id===((g=n.value)==null?void 0:g.id),onClick:f=>d("select-artifact",t)},[e.renderSlot(o.$slots,"artifact",{artifact:t},()=>[e.createElementVNode("span",null,e.toDisplayString(t.title),1),t.description?(e.openBlock(),e.createElementBlock("small",at,e.toDisplayString(t.description),1)):e.createCommentVNode("",!0)])],8,tt)],10,et)}),128))])):(e.openBlock(),e.createElementBlock("p",ot,"任务完成后,产物会出现在这里。")),n.value?(e.openBlock(),e.createElementBlock("section",lt,[e.renderSlot(o.$slots,"artifact-preview",{artifact:n.value},()=>[e.createElementVNode("div",rt,[e.createElementVNode("div",null,[e.createElementVNode("span",null,e.toDisplayString(n.value.type??"文件"),1),e.createElementVNode("h3",null,e.toDisplayString(n.value.title),1)]),e.unref(J.getSafeUrl)(n.value.url)?(e.openBlock(),e.createElementBlock("a",{key:0,href:e.unref(J.getSafeUrl)(n.value.url),target:"_blank",rel:"noreferrer"},"打开产物",8,nt)):e.createCommentVNode("",!0)]),e.createElementVNode("p",null,e.toDisplayString(n.value.description??"业务层可通过 artifact-preview 插槽提供自定义预览。"),1),n.value.updatedAt?(e.openBlock(),e.createElementBlock("small",st,"更新于 "+e.toDisplayString(n.value.updatedAt),1)):e.createCommentVNode("",!0)])])):e.createCommentVNode("",!0)],8,Je)])}}});exports.default=ct;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("vue"),A=require("aheart-ui/button"),ye=require("aheart-ui/drawer"),O=require("aheart-ui/splitter"),we=require("aheart-ui/tabs"),Ce=require("@aheart-ui/dnd/sortable"),se=require("./attachments.vue.js"),Ve=require("./chat-panel.vue.js"),ie=require("./conversations.vue.js"),le=require("./sources.vue.js"),Ie=require("./agent-execution.vue.js"),Ne={class:"aheart-ai-workbench","aria-label":"AI 工作台"},xe={class:"aheart-ai-workbench__header"},Se={key:0},Ee={class:"aheart-ai-workbench__header-status"},$e={class:"aheart-ai-workbench__progress"},Be=["aria-label"],_e={class:"aheart-ai-workbench__desktop"},Te={class:"aheart-ai-workbench__sidebar"},Ae={key:0,class:"aheart-ai-workbench__context","aria-label":"上下文"},Me=["data-context-id"],De={key:0},Re={class:"aheart-ai-workbench__move-actions"},je={class:"aheart-ai-workbench__chat"},Oe={key:1,class:"aheart-ai-workbench__empty"},ze={class:"aheart-ai-workbench__execution","aria-label":"执行与产物"},qe={key:0,class:"aheart-ai-workbench__task-order-error",role:"alert"},Pe={class:"aheart-ai-workbench__mobile"},Ue={class:"aheart-ai-workbench__mobile-panel"},Ke={key:0,class:"aheart-ai-workbench__context","aria-label":"上下文"},He={class:"aheart-ai-workbench__context-list-mobile"},Le=["data-context-id"],Fe={key:0},Je={class:"aheart-ai-workbench__move-actions"},Ze={class:"aheart-ai-workbench__mobile-panel"},We={class:"aheart-ai-workbench__mobile-panel--chat"},Ge=["id"],Xe={key:0,class:"aheart-ai-workbench__empty"},Ye={class:"aheart-ai-workbench__mobile-panel"},Qe=e.defineComponent({name:"AAIAgentWorkbench",__name:"agent-workbench",props:{title:{default:"AI 工作台"},description:{default:"编排对话、任务、审批与产物。"},panelSizes:{default:()=>[150,"auto",200]},conversations:{default:()=>[]},activeConversation:{default:void 0},messages:{default:()=>[]},prompts:{default:()=>[]},transport:{default:void 0},tasks:{default:()=>[]},contextItems:{default:()=>[]},sources:{default:()=>[]},attachments:{default:()=>[]},artifacts:{default:()=>[]},activeArtifact:{default:void 0},disabled:{type:Boolean,default:!1},actionHandler:{},reorderable:{type:Boolean,default:!0},tasksRevision:{default:void 0},scopeKey:{default:void 0}},emits:["update:panelSizes","update:activeConversation","update:messages","update:activeArtifact","update:tasks","update:contextItems","approve","reject","cancel","retry","move-task","move-context","stop","chat-retry","chat-regenerate","chat-edit","chat-copy","error","operation-start","operation-success","operation-error","task-move-reject"],setup(c,{emit:ce}){const r=c,v=ce,C=e.ref("chat"),B=e.ref(!1),z=e.ref(),q=e.ref(),H=e.ref(!1),x=e.ref(!1),S=e.ref(!1);let h,M;const E=e.getCurrentInstance(),P=`scope-${e.useId().replace(/[^a-zA-Z0-9_-]/g,"-")}`,U=P.replace(/^scope-/,""),de=`aheart-ai-${U}-chat-target`,L=`aheart-ai-${U}-execution-target`,K=e.computed(()=>r.scopeKey===void 0?P:`scope-${String(r.scopeKey).replace(/[^a-zA-Z0-9_-]/g,"-")}-${P.replace(/^scope-/,"")}`);e.onMounted(async()=>{var o,n,i;H.value=!0;const a=(n=(o=E==null?void 0:E.proxy)==null?void 0:o.$el)==null?void 0:n.ownerDocument,t=a==null?void 0:a.defaultView;t!=null&&t.matchMedia?(h=t.matchMedia("(max-width: 760px)"),S.value=h.matches,M=d=>{S.value=d.matches},(i=h.addEventListener)==null||i.call(h,"change",M)):S.value=!0,x.value=!0,await e.nextTick()}),e.onBeforeUnmount(()=>{var a;h&&M&&((a=h.removeEventListener)==null||a.call(h,"change",M))}),e.watch(S,a=>{a||(B.value=!1)});const m=e.ref({}),g=new Map,I=new Map;let F=0;const N=new Set,J=()=>Object.prototype.hasOwnProperty.call((E==null?void 0:E.vnode.props)??{},"messages"),Z=e.ref(J());e.onBeforeUpdate(()=>{Z.value=J()});const ue=e.computed(()=>Z.value?{messages:r.messages}:{defaultMessages:r.messages}),W=e.computed(()=>r.tasks.filter(a=>a.approval&&(!a.approval.status||a.approval.status==="pending"))),V=e.computed(()=>W.value.length),G=e.computed(()=>{const a=W.value[0],t=r.artifacts.find(n=>{var i;return n.id===((i=a==null?void 0:a.approval)==null?void 0:i.artifactId)});return t?`${V.value>1?`${V.value} 项待审批`:"待审批"}:${t.title}`:`${V.value} 项待审批`}),ve=()=>{C.value="execution",B.value=!0},pe=e.computed(()=>[{key:D("conversations"),label:"会话"},{key:D("chat"),label:"对话"},{key:D("execution"),label:e.h("span",{class:"aheart-ai-workbench__mobile-tab-label"},[e.h("span","执行"),V.value>0?e.h("span",{class:"aheart-ai-workbench__pending-badge","aria-label":`${V.value} 项待审批`},String(V.value)):null])}]),D=a=>`${a}--${U}`,me=e.computed(()=>Object.fromEntries(Object.entries(m.value).map(([a,t])=>[a,t.message??(t.status==="pending"?"处理中…":t.status==="success"?"成功":"")]))),$=a=>{var t;return`${a.id}:${String(a.revision??"")}:${((t=a.approval)==null?void 0:t.id)??""}`},X=(a,t)=>{const o=$(a),n=m.value[o];return N.has(o)||[...N].some(d=>d.startsWith(`${a.id}:`))||(n==null?void 0:n.status)==="pending"||(n==null?void 0:n.status)==="success"||r.disabled||r.actionHandler&&a.revision===void 0?!0:a.approval?(n==null?void 0:n.status)==="error"&&n.outcome!=="not-applied"&&t!=="retry"||r.actionHandler&&(a.revision===void 0||a.approval.artifactId&&(!r.artifacts.find(d=>{var s;return d.id===((s=a.approval)==null?void 0:s.artifactId)})||r.artifacts.some(d=>{var s;return d.id===((s=a.approval)==null?void 0:s.artifactId)&&d.revision===void 0})))?!0:a.status==="running"&&t!=="cancel":(n==null?void 0:n.status)==="error"?t!=="retry":!(a.status==="running"&&t==="cancel"||a.status==="error"&&t==="retry")},R=async(a,t)=>{var u,p,f,w,T,ne;if(X(t,a))return;if(!r.actionHandler){v(a==="approve"?"approve":a==="reject"?"reject":a==="cancel"?"cancel":"retry",t);return}const o=(u=t.approval)!=null&&u.artifactId?r.artifacts.find(b=>{var k;return b.id===((k=t.approval)==null?void 0:k.artifactId)}):void 0,n=$(t),i=m.value[n];(i==null?void 0:i.status)==="error"&&i.outcome==="not-applied"&&I.delete(n);const d=I.get(n)??`${n}:${Date.now()}:${++F}`;I.set(n,d);const s={operationId:`${d}:attempt-${++F}`,idempotencyKey:d,conversationId:r.activeConversation,taskId:t.id,taskRevision:t.revision,action:(i==null?void 0:i.status)==="error"&&i.outcome==="unknown"&&a==="retry"?i.action:a,...(p=t.approval)!=null&&p.id?{approvalId:t.approval.id}:{},artifactId:((f=t.approval)==null?void 0:f.artifactId)??(o==null?void 0:o.id),...(o==null?void 0:o.revision)===void 0?{}:{artifactRevision:o.revision}},l=new AbortController;N.add(n),g.set(n,l),m.value={...m.value,[n]:{status:"pending",operationId:s.operationId,idempotencyKey:d,action:s.action,taskRevision:t.revision,taskStatus:t.status,approvalStatus:(w=t.approval)==null?void 0:w.status,approvalId:(T=t.approval)==null?void 0:T.id,artifactId:(o==null?void 0:o.id)??((ne=t.approval)==null?void 0:ne.artifactId),artifactRevision:o==null?void 0:o.revision,conversationId:r.activeConversation}},v("operation-start",s);try{const b=await r.actionHandler(s,l.signal),k=m.value[n];if(l.signal.aborted||!k||k.operationId!==s.operationId||b.operationId!==s.operationId)return;b.status==="success"?(m.value={...m.value,[n]:{...k,status:"success",message:"成功"}},v("operation-success",s)):(m.value={...m.value,[n]:{...k,status:"error",message:b.error,outcome:b.outcome??"unknown"}},v("operation-error",s,b.error))}catch(b){if(l.signal.aborted)return;const k=m.value[n];if(!k||k.operationId!==s.operationId)return;const re=b instanceof Error?b.message:"操作失败";m.value={...m.value,[n]:{...k,status:"error",message:re,outcome:"unknown"}},v("operation-error",s,re)}finally{N.delete(n),g.get(n)===l&&g.delete(n)}},Y=a=>{const t=new Set(a.map(l=>l.id)),o=new Set(r.tasks.map(l=>l.id));if(t.size!==a.length||t.size!==o.size||[...t].some(l=>!o.has(l))||a.some(l=>{var u;return(u=l.dependsOn)==null?void 0:u.some(p=>!t.has(p))}))return"任务集合或依赖无效,无法排序";const n=new Map(a.map((l,u)=>[l.id,u]));if(a.some(l=>{var u;return(u=l.dependsOn)==null?void 0:u.some(p=>(n.get(p)??1/0)>=n.get(l.id))}))return"依赖任务必须排在前面";const i=new Set,d=new Set,s=l=>{var p;if(i.has(l))return!0;if(d.has(l))return!1;i.add(l);const u=a.find(f=>f.id===l);return(p=u==null?void 0:u.dependsOn)!=null&&p.some(s)?!0:(i.delete(l),d.add(l),!1)};if(a.some(l=>s(l.id)))return"任务依赖存在循环"},Q=e.computed(()=>Y(r.tasks)),ee=a=>{var n;const t=Y(a);if(t)return t;const o=new Map(r.tasks.map((i,d)=>[i.id,d]));for(const[i,d]of a.entries()){const s=r.tasks[o.get(d.id)??-1];if(!s)return"任务集合发生变化,无法排序";if(JSON.stringify(d)!==JSON.stringify(s))return"任务数据在排序期间发生变化";if((s.lockedReason||s.reorderable===!1||["running","waiting-approval"].includes(s.status))&&o.get(d.id)!==i)return s.lockedReason??"任务当前不可移动";if(((n=m.value[$(s)])==null?void 0:n.status)==="pending"&&o.get(d.id)!==i)return"任务操作进行中,无法移动"}},fe=a=>{const t=a,o=ee(t);if(o){v("task-move-reject",o);return}v("update:tasks",t)},te=e.computed(()=>r.contextItems),ae=e.computed(()=>r.tasks.filter(a=>a.status==="complete").length),oe=e.computed(()=>r.tasks.some(a=>a.status==="error")?{key:"error",label:"需要处理"}:V.value>0?{key:"waiting",label:"等待人工审批"}:r.tasks.some(a=>a.status==="running")?{key:"running",label:"执行中"}:r.tasks.length&&ae.value===r.tasks.length?{key:"complete",label:"已完成"}:{key:"idle",label:"待开始"}),y=a=>a,ke=(a,t,o)=>{const n=t+o;if(n<0||n>=a.length)return a;const i=[...a],[d]=i.splice(t,1);return i.splice(n,0,d),i},_=(a,t)=>{var n,i;const o=a+t;return!!(r.disabled||o<0||o>=r.contextItems.length||(n=r.contextItems[a])!=null&&n.disabled||(i=r.contextItems[o])!=null&&i.disabled)},j=(a,t)=>{if(_(a,t))return;const o=r.contextItems[a];!o||a+t<0||a+t>=r.contextItems.length||(v("update:contextItems",ke(r.contextItems,a,t)),v("move-context",o.id,t<0?"up":"down"))},be=a=>{if(r.disabled)return;const t=a;r.contextItems.some((n,i)=>{var d;return n.disabled&&((d=t[i])==null?void 0:d.id)!==n.id})||v("update:contextItems",t)},he=(a,t)=>v("move-task",a,t),ge=(a,t)=>v("chat-edit",a,t);return e.watch(()=>[r.tasks,r.artifacts,r.activeConversation,r.actionHandler],()=>{var a,t,o,n,i,d;for(const[s,l]of g){const u=r.tasks.find(w=>$(w)===s);if(!u){l.abort(),g.delete(s),N.delete(s),I.delete(s);continue}const p=m.value[s],f=(a=u.approval)!=null&&a.artifactId?r.artifacts.find(w=>{var T;return w.id===((T=u.approval)==null?void 0:T.artifactId)}):void 0;p&&(p.taskRevision!==u.revision||p.approvalId!==((t=u.approval)==null?void 0:t.id)||p.artifactId!==((f==null?void 0:f.id)??((o=u.approval)==null?void 0:o.artifactId))||p.artifactRevision!==(f==null?void 0:f.revision)||p.conversationId!==r.activeConversation)&&(l==null||l.abort(),l&&g.delete(s),N.delete(s),I.delete(s),delete m.value[s])}for(const s of Object.keys(m.value))r.tasks.some(l=>$(l)===s)||delete m.value[s];for(const[s,l]of Object.entries(m.value)){const u=r.tasks.find(f=>$(f)===s),p=(n=u==null?void 0:u.approval)!=null&&n.artifactId?r.artifacts.find(f=>{var w;return f.id===((w=u.approval)==null?void 0:w.artifactId)}):void 0;(!u||l.conversationId!==r.activeConversation||l.taskStatus!==u.status||l.approvalStatus!==((i=u.approval)==null?void 0:i.status)||l.artifactId!==((p==null?void 0:p.id)??((d=u.approval)==null?void 0:d.artifactId))||l.artifactRevision!==(p==null?void 0:p.revision))&&(I.delete(s),delete m.value[s])}},{deep:!0}),e.watch(()=>r.actionHandler,(a,t)=>{if(a!==t){for(const o of g.values())o.abort();g.clear(),N.clear(),m.value={},I.clear()}}),e.onBeforeUnmount(()=>{for(const a of g.values())a.abort()}),(a,t)=>(e.openBlock(),e.createElementBlock("section",Ne,[e.createElementVNode("header",xe,[e.createElementVNode("div",null,[t[18]||(t[18]=e.createElementVNode("span",{class:"aheart-ai-workbench__eyebrow"},"智能工作区",-1)),e.createElementVNode("h2",null,e.toDisplayString(c.title),1),c.description?(e.openBlock(),e.createElementBlock("p",Se,e.toDisplayString(c.description),1)):e.createCommentVNode("",!0)]),e.createElementVNode("div",Ee,[e.createElementVNode("span",{"data-workbench-status":"",class:e.normalizeClass(`is-${oe.value.key}`)},e.toDisplayString(oe.value.label),3),e.createElementVNode("small",$e,e.toDisplayString(ae.value)+" / "+e.toDisplayString(c.tasks.length)+" 已完成",1),V.value>0?(e.openBlock(),e.createElementBlock("button",{key:0,type:"button","data-pending-approval-summary":"",class:"aheart-ai-workbench__pending-summary","aria-label":G.value,onClick:ve},e.toDisplayString(G.value),9,Be)):e.createCommentVNode("",!0)])]),e.createElementVNode("div",_e,[e.createVNode(e.unref(O.Splitter),{sizes:c.panelSizes,"default-sizes":[150,"auto",200],"onUpdate:sizes":t[13]||(t[13]=o=>v("update:panelSizes",o))},{default:e.withCtx(()=>[e.createVNode(e.unref(O.SplitterPanel),{min:140,collapsible:""},{default:e.withCtx(()=>[e.createElementVNode("aside",Te,[t[22]||(t[22]=e.createElementVNode("h2",null,"会话",-1)),e.createVNode(ie.default,{"model-value":c.activeConversation,conversations:c.conversations,"onUpdate:modelValue":t[0]||(t[0]=o=>v("update:activeConversation",o))},null,8,["model-value","conversations"]),c.contextItems.length?(e.openBlock(),e.createElementBlock("section",Ae,[t[21]||(t[21]=e.createElementVNode("h3",null,"上下文",-1)),e.createVNode(e.unref(Ce.SortableList),{items:te.value,"item-key":"id",group:`agent-context-${K.value}`,disabled:c.disabled,"onUpdate:items":be},{item:e.withCtx(({item:o,index:n})=>[e.createElementVNode("div",{class:"aheart-ai-workbench__context-item","data-context-id":y(o).id},[e.createElementVNode("span",null,e.toDisplayString(y(o).label),1),y(o).description?(e.openBlock(),e.createElementBlock("small",De,e.toDisplayString(y(o).description),1)):e.createCommentVNode("",!0),e.createElementVNode("div",Re,[e.createVNode(e.unref(A.Button),{type:"text",disabled:_(n,-1),onClick:i=>j(n,-1)},{default:e.withCtx(()=>[...t[19]||(t[19]=[e.createTextVNode("上移",-1)])]),_:1},8,["disabled","onClick"]),e.createVNode(e.unref(A.Button),{type:"text",disabled:_(n,1),onClick:i=>j(n,1)},{default:e.withCtx(()=>[...t[20]||(t[20]=[e.createTextVNode("下移",-1)])]),_:1},8,["disabled","onClick"])])],8,Me)]),_:1},8,["items","group","disabled"])])):e.createCommentVNode("",!0)])]),_:1}),e.createVNode(e.unref(O.SplitterPanel),{min:230},{default:e.withCtx(()=>[e.createElementVNode("main",je,[c.transport?(e.openBlock(),e.createBlock(e.Teleport,{key:0,to:x.value?z.value:`#${de}`,disabled:!x.value||!S.value||C.value!=="chat"||!z.value&&x.value},[c.transport?(e.openBlock(),e.createBlock(Ve.default,e.mergeProps({key:"chat-owner"},ue.value,{transport:c.transport,"conversation-id":c.activeConversation,prompts:c.prompts,disabled:c.disabled,"onUpdate:messages":t[1]||(t[1]=o=>v("update:messages",o)),onError:t[2]||(t[2]=o=>v("error",o)),onStop:t[3]||(t[3]=o=>v("stop")),onRetry:t[4]||(t[4]=o=>v("chat-retry",o)),onRegenerate:t[5]||(t[5]=o=>v("chat-regenerate",o)),onEdit:ge,onCopy:t[6]||(t[6]=o=>v("chat-copy",o))}),null,16,["transport","conversation-id","prompts","disabled"])):e.createCommentVNode("",!0)],8,["to","disabled"])):e.createCommentVNode("",!0),c.transport?e.createCommentVNode("",!0):(e.openBlock(),e.createElementBlock("p",Oe,"业务层尚未提供对话传输适配器。")),e.renderSlot(a.$slots,"sources",{sources:c.sources},()=>[e.createVNode(le.default,{sources:c.sources},null,8,["sources"])]),e.renderSlot(a.$slots,"attachments",{attachments:c.attachments},()=>[e.createVNode(se.default,{items:c.attachments},null,8,["items"])])])]),_:3}),e.createVNode(e.unref(O.SplitterPanel),{min:180,collapsible:""},{default:e.withCtx(()=>[e.createElementVNode("aside",ze,[(e.openBlock(),e.createBlock(e.Teleport,{to:x.value?q.value:`#${L}`,disabled:!x.value||!S.value||C.value!=="execution"||!q.value},[e.createVNode(Ie.default,{key:"execution-owner",tasks:c.tasks,artifacts:c.artifacts,"active-artifact":c.activeArtifact,disabled:c.disabled,reorderable:c.reorderable,"tasks-revision":c.tasksRevision,"scope-key":K.value,"action-disabled":X,"operation-messages":me.value,"validate-candidate":ee,"onUpdate:tasks":fe,onApprove:t[7]||(t[7]=o=>R("approve",o)),onReject:t[8]||(t[8]=o=>R("reject",o)),onCancel:t[9]||(t[9]=o=>R("cancel",o)),onRetry:t[10]||(t[10]=o=>R("retry",o)),onMoveTask:he,onMoveTaskReject:t[11]||(t[11]=o=>v("task-move-reject",o)),onSelectArtifact:t[12]||(t[12]=o=>v("update:activeArtifact",o.id))},e.createSlots({_:2},[a.$slots.task?{name:"task",fn:e.withCtx(({task:o,index:n})=>[e.renderSlot(a.$slots,"task",{task:o,index:n})]),key:"0"}:void 0,a.$slots.artifact?{name:"artifact",fn:e.withCtx(({artifact:o})=>[e.renderSlot(a.$slots,"artifact",{artifact:o})]),key:"1"}:void 0,a.$slots["artifact-preview"]?{name:"artifact-preview",fn:e.withCtx(({artifact:o})=>[e.renderSlot(a.$slots,"artifact-preview",{artifact:o})]),key:"2"}:void 0]),1032,["tasks","artifacts","active-artifact","disabled","reorderable","tasks-revision","scope-key","operation-messages"])],8,["to","disabled"])),Q.value?(e.openBlock(),e.createElementBlock("p",qe,"无法排序:"+e.toDisplayString(Q.value),1)):e.createCommentVNode("",!0)])]),_:3})]),_:3},8,["sizes"])]),e.createElementVNode("div",Pe,[e.createVNode(e.unref(we.Tabs),{items:pe.value,"active-key":D(C.value),"onUpdate:activeKey":t[14]||(t[14]=o=>C.value=String(o).split("--")[0])},null,8,["items","active-key"]),e.withDirectives(e.createElementVNode("section",Ue,[e.createVNode(ie.default,{"model-value":c.activeConversation,conversations:c.conversations,"onUpdate:modelValue":t[15]||(t[15]=o=>v("update:activeConversation",o))},null,8,["model-value","conversations"]),c.contextItems.length?(e.openBlock(),e.createElementBlock("section",Ke,[t[25]||(t[25]=e.createElementVNode("h3",null,"上下文",-1)),e.createElementVNode("div",He,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(te.value,(o,n)=>(e.openBlock(),e.createElementBlock("div",{key:y(o).id,class:"aheart-ai-workbench__context-item","data-context-id":y(o).id},[e.createElementVNode("span",null,e.toDisplayString(y(o).label),1),y(o).description?(e.openBlock(),e.createElementBlock("small",Fe,e.toDisplayString(y(o).description),1)):e.createCommentVNode("",!0),e.createElementVNode("div",Je,[e.createVNode(e.unref(A.Button),{type:"text",disabled:_(n,-1),onClick:i=>j(n,-1)},{default:e.withCtx(()=>[...t[23]||(t[23]=[e.createTextVNode("上移",-1)])]),_:1},8,["disabled","onClick"]),e.createVNode(e.unref(A.Button),{type:"text",disabled:_(n,1),onClick:i=>j(n,1)},{default:e.withCtx(()=>[...t[24]||(t[24]=[e.createTextVNode("下移",-1)])]),_:1},8,["disabled","onClick"])])],8,Le))),128))])])):e.createCommentVNode("",!0)],512),[[e.vShow,C.value==="conversations"]]),e.withDirectives(e.createElementVNode("section",Ze,[e.createElementVNode("div",We,[e.createElementVNode("div",{id:`${K.value}-chat-target`,ref_key:"mobileChatTarget",ref:z,class:"aheart-ai-workbench__mobile-owner-target"},null,8,Ge)]),c.transport?e.createCommentVNode("",!0):(e.openBlock(),e.createElementBlock("p",Xe,"业务层尚未提供对话传输适配器。")),e.renderSlot(a.$slots,"sources",{sources:c.sources},()=>[e.createVNode(le.default,{sources:c.sources},null,8,["sources"])]),e.renderSlot(a.$slots,"attachments",{attachments:c.attachments},()=>[e.createVNode(se.default,{items:c.attachments},null,8,["items"])])],512),[[e.vShow,C.value==="chat"]]),e.withDirectives(e.createElementVNode("section",Ye,[e.createVNode(e.unref(A.Button),{"data-action":"open-execution-drawer",type:"primary",onClick:t[16]||(t[16]=o=>B.value=!0)},{default:e.withCtx(()=>[...t[26]||(t[26]=[e.createTextVNode("查看执行与产物",-1)])]),_:1})],512),[[e.vShow,C.value==="execution"]]),e.createVNode(e.unref(ye.Drawer),{open:B.value,"onUpdate:open":t[17]||(t[17]=o=>B.value=o),title:"执行与产物","get-container":!1,"force-render":H.value,"destroy-on-close":!1,placement:"right"},{default:e.withCtx(()=>[e.createElementVNode("div",{id:L,ref_key:"mobileExecutionTarget",ref:q,class:"aheart-ai-workbench__mobile-owner-target"},null,512)]),_:1},8,["open","force-render"])])]))}});exports.default=Qe;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const l=require("vue"),m=require("aheart-ui/checkbox"),b=require("aheart-ui/date-picker"),v=require("aheart-ui/input"),B=require("aheart-ui/input-number"),V=require("aheart-ui/radio"),q=require("aheart-ui/select"),g=require("aheart-ui/switch"),U=require("aheart-ui/textarea"),c=require("aheart-ui/time-picker"),$=require("aheart-ui/tree-select"),x=require("aheart-ui/upload"),S=["data-field-key","aria-invalid","aria-describedby"],C=["id","for"],E={key:0,class:"aheart-ai-form__required","aria-hidden":"true"},N=["id"],P=["id"],h=l.defineComponent({__name:"form-field",props:{field:{},value:{},disabled:{type:Boolean},error:{}},emits:["update"],setup(e,{expose:f,emit:y}){const t=e,i=y,n=l.ref(),u=l.ref(),k=l.computed(()=>(t.field.options??[]).map(r=>({key:r.value,title:r.label,disabled:r.disabled}))),o=l.computed(()=>[t.field.description&&`${t.field.key}-description`,t.error&&`${t.field.key}-error`].filter(Boolean).join(" ")||void 0),s=l.computed(()=>t.field.type==="date-range"||t.field.type==="time-range"?`${t.field.key}-start`:t.field.key);return f({focus:()=>{var r,d;if(u.value){u.value.focus("start");return}(d=(r=n.value)==null?void 0:r.querySelector('input, button, [role="combobox"], [tabindex="0"]'))==null||d.focus({preventScroll:!0})}}),(r,d)=>(l.openBlock(),l.createElementBlock("div",{ref_key:"fieldElement",ref:n,class:l.normalizeClass(["aheart-ai-form__field",{"is-error":!!e.error,"is-disabled":e.disabled}]),"data-field-key":e.field.key,"aria-invalid":e.error?"true":void 0,"aria-describedby":o.value,tabindex:"-1"},[l.createElementVNode("label",{id:`${e.field.key}-label`,for:s.value},[l.createTextVNode(l.toDisplayString(e.field.label)+" ",1),e.field.required?(l.openBlock(),l.createElementBlock("span",E,"*")):l.createCommentVNode("",!0)],8,C),e.field.description?(l.openBlock(),l.createElementBlock("p",{key:0,id:`${e.field.key}-description`,class:"aheart-ai-form__field-description"},l.toDisplayString(e.field.description),9,N)):l.createCommentVNode("",!0),e.field.type==="textarea"?(l.openBlock(),l.createBlock(l.unref(U.Textarea),{key:1,id:e.field.key,"aria-labelledby":`${e.field.key}-label`,"aria-describedby":o.value,"model-value":e.value,placeholder:e.field.placeholder,disabled:e.disabled,"onUpdate:modelValue":d[0]||(d[0]=a=>i("update",a))},null,8,["id","aria-labelledby","aria-describedby","model-value","placeholder","disabled"])):e.field.type==="tree-select"?(l.openBlock(),l.createBlock(l.unref($.TreeSelect),{key:2,id:e.field.key,"labelled-by":`${e.field.key}-label`,"model-value":e.value,"tree-data":k.value,multiple:Array.isArray(e.value),disabled:e.disabled,"onUpdate:modelValue":d[1]||(d[1]=a=>i("update",a))},null,8,["id","labelled-by","model-value","tree-data","multiple","disabled"])):e.field.type==="upload"?(l.openBlock(),l.createBlock(l.unref(x.Upload),{key:3,"file-list":e.value,disabled:e.disabled,"onUpdate:fileList":d[2]||(d[2]=a=>i("update",a))},null,8,["file-list","disabled"])):e.field.type==="radio"?(l.openBlock(),l.createBlock(l.unref(V.RadioGroup),{key:4,"model-value":e.value,options:e.field.options,disabled:e.disabled,"onUpdate:modelValue":d[3]||(d[3]=a=>i("update",a))},null,8,["model-value","options","disabled"])):e.field.type==="checkbox"?(l.openBlock(),l.createBlock(l.unref(m.CheckboxGroup),{key:5,"model-value":e.value,options:e.field.options,disabled:e.disabled,"onUpdate:modelValue":d[4]||(d[4]=a=>i("update",a))},null,8,["model-value","options","disabled"])):e.field.type==="select"?(l.openBlock(),l.createBlock(l.unref(q.Select),{key:6,id:e.field.key,"labelled-by":`${e.field.key}-label`,"model-value":e.value,disabled:e.disabled,options:e.field.options,"onUpdate:modelValue":d[5]||(d[5]=a=>i("update",a))},null,8,["id","labelled-by","model-value","disabled","options"])):e.field.type==="switch"?(l.openBlock(),l.createBlock(l.unref(g.Switch),{key:7,id:e.field.key,"model-value":!!e.value,disabled:e.disabled,"onUpdate:modelValue":d[6]||(d[6]=a=>i("update",a))},null,8,["id","model-value","disabled"])):e.field.type==="number"?(l.openBlock(),l.createBlock(l.unref(B.InputNumber),{key:8,id:e.field.key,"model-value":e.value,placeholder:e.field.placeholder,disabled:e.disabled,"onUpdate:modelValue":d[7]||(d[7]=a=>i("update",a))},null,8,["id","model-value","placeholder","disabled"])):e.field.type==="date"?(l.openBlock(),l.createBlock(l.unref(b.DatePicker),{key:9,id:e.field.key,"labelled-by":`${e.field.key}-label`,"described-by":o.value,status:e.error?"error":void 0,"model-value":e.value,placeholder:e.field.placeholder,disabled:e.disabled,"onUpdate:modelValue":d[8]||(d[8]=a=>i("update",a))},null,8,["id","labelled-by","described-by","status","model-value","placeholder","disabled"])):e.field.type==="date-range"?(l.openBlock(),l.createBlock(l.unref(b.DateRangePicker),{key:10,ref_key:"rangeControl",ref:u,id:e.field.key,"labelled-by":`${e.field.key}-label`,"described-by":o.value,status:e.error?"error":void 0,"model-value":e.value,disabled:e.disabled,"onUpdate:modelValue":d[9]||(d[9]=a=>i("update",a))},null,8,["id","labelled-by","described-by","status","model-value","disabled"])):e.field.type==="time"?(l.openBlock(),l.createBlock(l.unref(c.TimePicker),{key:11,id:e.field.key,"labelled-by":`${e.field.key}-label`,"described-by":o.value,status:e.error?"error":void 0,"model-value":e.value,placeholder:e.field.placeholder,disabled:e.disabled,"onUpdate:modelValue":d[10]||(d[10]=a=>i("update",a))},null,8,["id","labelled-by","described-by","status","model-value","placeholder","disabled"])):e.field.type==="time-range"?(l.openBlock(),l.createBlock(l.unref(c.TimeRangePicker),{key:12,ref_key:"rangeControl",ref:u,id:e.field.key,"labelled-by":`${e.field.key}-label`,"described-by":o.value,status:e.error?"error":void 0,"model-value":e.value,disabled:e.disabled,"onUpdate:modelValue":d[11]||(d[11]=a=>i("update",a))},null,8,["id","labelled-by","described-by","status","model-value","disabled"])):(l.openBlock(),l.createBlock(l.unref(v.Input),{key:13,id:e.field.key,"model-value":e.value,placeholder:e.field.placeholder,disabled:e.disabled,"aria-describedby":o.value,"onUpdate:modelValue":d[12]||(d[12]=a=>i("update",a))},null,8,["id","model-value","placeholder","disabled","aria-describedby"])),e.error?(l.openBlock(),l.createElementBlock("p",{key:14,id:`${e.field.key}-error`,class:"aheart-ai-form__field-error",role:"alert"},l.toDisplayString(e.error),9,P)):l.createCommentVNode("",!0)],10,S))}});exports.default=h;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const a=require("vue"),ie=require("aheart-ui/button"),z=require("aheart-ui/form"),ce=require("./form-field.vue.js"),ue=require("./form-schema.js"),de={key:0,class:"aheart-ai-form__header"},me={key:0},fe={key:1},pe={key:1,class:"aheart-ai-form__error-summary",role:"alert",tabindex:"-1"},ye=["onClick"],he={key:0},ge={key:0},ve={key:2,class:"aheart-ai-form__submit-error",role:"alert"},be={class:"aheart-ai-form__footer"},ke={key:1,class:"aheart-ai-form__error",role:"alert"},Ee=a.defineComponent({name:"AAIForm",__name:"form",props:{modelValue:{default:()=>({})},schema:{},disabled:{type:Boolean,default:!1},submitting:{type:Boolean,default:!1},submitText:{default:"提交"},submitError:{default:void 0},validators:{default:()=>({})}},emits:["update:modelValue","submit","schema-error","validation-error"],setup(p,{expose:G,emit:H}){const u=p,V=H,c=a.computed(()=>{const e=ue.validateAIFormSchema(u.schema);if(!e.valid||!e.schema)return e;const t=e.schema.fields.flatMap(r=>(r.rules??[]).filter(o=>o.kind==="async"&&!(Object.prototype.hasOwnProperty.call(u.validators,o.validator)&&typeof u.validators[o.validator]=="function")).map(o=>`fields.${r.key}.rules.${o.validator} validator 不存在`));return t.length?{valid:!1,errors:[...e.errors,...t]}:e}),y=a.computed(()=>u.modelValue),h=a.computed(()=>{var e;return(((e=c.value.schema)==null?void 0:e.fields)??[]).reduce((t,r)=>{const o=Object.prototype.hasOwnProperty.call(y.value,r.key);return!o&&N.has(r.key)||(t[r.key]=o?y.value[r.key]:r.defaultValue),t},{...y.value})}),i=a.reactive({}),A=a.reactive({}),j=new Map,q=a.reactive({}),R=new Map,v=a.ref(),d=new Map,T=()=>{for(const e of d.values())e.abort();d.clear()},x=a.ref({}),N=a.reactive(new Set),g=new Set,B=new Map,b=new Map,k=new Map,Y=a.ref(!1);a.onMounted(()=>{Y.value=!0});const P=a.ref(!1),J=a.ref(0),_=a.ref(!1);a.watch(c,e=>{e.valid||V("schema-error",e.errors)},{immediate:!0}),a.watch(h,e=>{Object.keys(x.value).length||(x.value=O(e))},{immediate:!0,deep:!0}),a.watch(h,(e,t)=>{Object.keys(A).forEach(r=>{Object.prototype.hasOwnProperty.call(e,r)||delete A[r]}),Object.entries(e).forEach(([r,o])=>{const s=j.get(r);j.has(r)?E(o,s)&&(j.delete(r),delete i[r]):t&&!E(o,t[r])&&delete i[r],A[r]=O(o)})},{immediate:!0,deep:!0}),a.watch(y,e=>{for(const t of[...g]){const r=b.get(t),o=k.get(t),s=a.toRaw(e);if(s!==r){if(s!==r&&!E(s,o)){g.delete(t),B.delete(t),b.delete(t),k.delete(t);continue}Object.prototype.hasOwnProperty.call(e,t)?(g.delete(t),B.delete(t),b.delete(t),k.delete(t)):(N.add(t),g.delete(t),B.delete(t),b.delete(t),k.delete(t))}}},{deep:!0});const D=e=>{if(!e)return!0;const t=h.value[e.field];return e.operator==="equals"?t===e.value:e.operator==="not-equals"?t!==e.value:e.operator==="includes"?Array.isArray(t)?t.includes(e.value):String(t??"").includes(String(e.value??"")):e.operator==="not-includes"?Array.isArray(t)?!t.includes(e.value):!String(t??"").includes(String(e.value??"")):e.operator==="is-empty"?w(t):!w(t)},F=a.computed(()=>{var e;return((e=c.value.schema)==null?void 0:e.fields.filter(t=>D(t.visibleWhen)))??[]});a.watch(h,(e,t)=>{var l;const r=t??{},o={...y.value};let s=!1;for(const n of((l=c.value.schema)==null?void 0:l.fields)??[]){const m=U(n.visibleWhen,r),f=U(n.visibleWhen,e);f&&g.has(n.key)&&!N.has(n.key)&&(g.delete(n.key),B.delete(n.key),b.delete(n.key),k.delete(n.key)),m&&!f&&n.preserve===!1&&(delete o[n.key],g.add(n.key),B.set(n.key,Object.prototype.hasOwnProperty.call(y.value,n.key)),b.set(n.key,a.toRaw(y.value)),k.set(n.key,a.toRaw(o)),s=!0)}s&&V("update:modelValue",o)},{deep:!0}),a.watch(h,(e,t)=>{var o,s;const r=t??{};for(const l of((o=c.value.schema)==null?void 0:o.fields)??[]){const n=I(l);(!E(e[l.key],r[l.key])||n.some(f=>!E(e[f],r[f])))&&((s=d.get(l.key))==null||s.abort(),d.delete(l.key))}},{deep:!0}),a.watch(()=>u.schema,()=>{for(const e of d.values())e.abort();d.clear()});const U=(e,t)=>{if(!e)return!0;const r=t[e.field];return e.operator==="equals"?r===e.value:e.operator==="not-equals"?r!==e.value:e.operator==="is-empty"?w(r):e.operator==="is-not-empty"?!w(r):e.operator==="includes"?Array.isArray(r)?r.includes(e.value):String(r??"").includes(String(e.value??"")):Array.isArray(r)?!r.includes(e.value):!String(r??"").includes(String(e.value??""))},S=e=>u.disabled||u.submitting||!!(e.disabledWhen&&D(e.disabledWhen)),Q=a.computed(()=>{const e=c.value.schema;if(!e)return[];const t=(e.groups??[]).map(o=>({key:o.key,group:o,fields:F.value.filter(s=>s.group===o.key)})).filter(o=>o.fields.length>0),r=F.value.filter(o=>!o.group);return r.length&&t.push({key:"__ungrouped",fields:r}),t}),M=a.computed(()=>F.value.filter(e=>i[e.key]).map(e=>({key:e.key,message:i[e.key]})));a.watch([h,F],()=>{var t;const e=((t=c.value.schema)==null?void 0:t.fields)??[];Object.keys(i).forEach(r=>{const o=e.find(s=>s.key===r);(!o||!D(o.visibleWhen)||S(o))&&delete i[r]})});function w(e){return e==null||e===""||e===!1||Array.isArray(e)&&(e.length===0||e.every(t=>t==null||t===""))}function E(e,t){if(Object.is(e,t))return!0;if(Array.isArray(e)||Array.isArray(t))return Array.isArray(e)&&Array.isArray(t)&&e.length===t.length&&e.every((r,o)=>E(r,t[o]));if(e&&t&&typeof e=="object"&&typeof t=="object"){const r=e,o=t,s=Object.keys(r),l=Object.keys(o);return s.length===l.length&&s.every(n=>Object.prototype.hasOwnProperty.call(o,n)&&E(r[n],o[n]))}return!1}function O(e){return Array.isArray(e)?e.map(t=>O(t)):e&&typeof e=="object"&&Object.getPrototypeOf(e)===Object.prototype?Object.fromEntries(Object.entries(e).map(([t,r])=>[t,O(r)])):e}const X=(e,t)=>e.type==="date-range"||e.type==="time-range"?!Array.isArray(t)||t.length!==2||t.some(r=>r==null||r===""):w(t),Z=e=>{const t=h.value[e.key];if(t!==void 0)return t;if(e.type==="checkbox"||e.type==="upload")return[];if(!(e.type==="date-range"||e.type==="time-range"))return""},ee=e=>`${e.key}-${q[e.key]??0}`,te=(e,t)=>{t&&typeof t.focus=="function"?R.set(e,t):R.delete(e)},W=e=>{var t;return(t=R.get(e))==null?void 0:t.focus()},re=async(e,t)=>{j.set(e,t),V("update:modelValue",{...y.value,[e]:t}),await a.nextTick(),y.value[e]!==t&&(q[e]=(q[e]??0)+1)},ae=e=>{if(S(e))return[];const t=[];if(e.required&&!S(e)){const r=`${e.label}为必填项`;t.push({required:!0,message:r},{message:r,validator:(o,s)=>X(e,s)?r:void 0})}for(const r of e.rules??[])t.push(oe(e,r));return t},L=e=>{if(typeof e!="string"||!/^\d{4}-\d{2}-\d{2}$/.test(e))return!1;const[t,r,o]=e.split("-").map(Number),s=new Date(Date.UTC(t,r-1,o));return s.getUTCFullYear()===t&&s.getUTCMonth()===r-1&&s.getUTCDate()===o},K=e=>typeof e=="string"&&/^\d{2}:\d{2}:\d{2}$/.test(e)&&e.split(":").map(Number).every((t,r)=>r===0?t<24:t<60),oe=(e,t)=>({...t.kind==="format"&&t.format==="email"?{type:"email"}:{},...t.kind==="range"&&t.min!==void 0?{min:t.min}:{},...t.kind==="range"&&t.max!==void 0?{max:t.max}:{},message:t.message??`${e.label}校验失败`,validator:(r,o)=>{if(!e.required&&w(o))return;if(t.kind==="range"){const n=t.valueType==="number"?typeof o=="number"&&Number.isFinite(o)?o:void 0:typeof o=="string"||Array.isArray(o)?o.length:void 0;return n===void 0||t.min!==void 0&&n<t.min||t.max!==void 0&&n>t.max?t.message??`${e.label}范围不合法`:void 0}if(t.kind==="format")return typeof o!="string"?t.message??`${e.label}格式不合法`:(t.format==="email"?/^[^\s@]+@[^\s@]+\.[^\s@]+$/.test(o):t.format==="url"?(()=>{try{const m=new URL(o);return m.protocol==="http:"||m.protocol==="https:"}catch{return!1}})():t.format==="date"?/^\d{4}-\d{2}-\d{2}$/.test(o)&&L(o):K(o))?void 0:t.message??`${e.label}格式不合法`;if(t.kind==="compare"){const n=h.value[t.field];if(!(typeof o==typeof n&&(typeof o=="number"?Number.isFinite(o)&&Number.isFinite(n):!0)))return t.message??`${e.label}与${t.field}类型不匹配`;if(["greater-than","greater-than-or-equal","less-than","less-than-or-equal"].includes(t.operator)){const C=$=>typeof $=="number"&&Number.isFinite($)?"number":L($)?"date":K($)?"time":void 0;if(!C(o)||!C(n)||C(o)!==C(n))return t.message??`${e.label}有序比较不合法`}return(t.operator==="equals"?o===n:t.operator==="not-equals"?o!==n:t.operator==="greater-than"?o>n:t.operator==="greater-than-or-equal"?o>=n:t.operator==="less-than"?o<n:o<=n)?void 0:t.message??`${e.label}比较不成立`}const s=d.get(e.key)??new AbortController;d.set(e.key,s);const l=Object.prototype.hasOwnProperty.call(u.validators,t.validator)&&typeof u.validators[t.validator]=="function"?u.validators[t.validator]:void 0;if(!l)return`${e.label}校验器不存在`;try{const n=l(o,{values:h.value,field:e,signal:s.signal}),m=f=>{if(!s.signal.aborted){if(f===!1)return t.message??`${e.label}校验失败`;if(typeof f=="string")return f}};return n&&typeof n.then=="function"?n.then(m):m(n)}catch(n){return s.signal.aborted?void 0:n instanceof Error?n.message:t.message??`${e.label}校验失败`}}}),se=()=>{var e,t;u.disabled||u.submitting||(_.value=!1,T(),(t=(e=v.value)==null?void 0:e.clearValidate)==null||t.call(e),Object.keys(i).forEach(r=>delete i[r]),P.value=!1)},I=e=>Array.from(new Set([...e.dependencies??[],...(e.rules??[]).filter(t=>t.kind==="compare").map(t=>t.field)])),ne=e=>{if(_.value){_.value=!1;return}u.disabled||u.submitting||P.value||V("submit",{...e})},le=e=>{if(_.value){_.value=!1;return}if(u.disabled||u.submitting)return;const t=e.errorFields.map(r=>{var n;const o=typeof r.name=="string"?r.name:String(r.name[0]),s=(n=c.value.schema)==null?void 0:n.fields.find(m=>m.key===o),l=r.errors[0]||`${(s==null?void 0:s.label)??o}为必填项`;return{key:o,message:l}}).filter(r=>F.value.some(o=>o.key===r.key)&&!S(c.value.schema.fields.find(o=>o.key===r.key)));t.forEach(r=>{i[r.key]=r.message}),t.length&&(V("validation-error",t),a.nextTick(()=>W(t[0].key)))};return G({validate:()=>{var e,t;return T(),Promise.resolve(((t=(e=v.value)==null?void 0:e.validate)==null?void 0:t.call(e))??{errorFields:[]}).then(r=>{var o;Object.keys(i).forEach(s=>delete i[s]);for(const s of r.errorFields??[]){const l=typeof s.name=="string"?s.name:String(s.name[0]);(o=s.errors)!=null&&o[0]&&(i[l]=s.errors[0])}return r})},resetFields:()=>{var t,r,o,s,l;for(const n of d.values())n.abort();d.clear(),N.clear(),g.clear(),B.clear(),b.clear(),k.clear(),J.value+=1,_.value=!0,Object.keys(i).forEach(n=>delete i[n]);const e=(((t=c.value.schema)==null?void 0:t.fields)??[]).map(n=>({name:n.key,errors:[]}));(o=(r=v.value)==null?void 0:r.clearValidate)==null||o.call(r),(l=(s=v.value)==null?void 0:s.setFieldsErrors)==null||l.call(s,e),Object.keys(i).forEach(n=>delete i[n]),V("update:modelValue",O(x.value))},clearValidate:e=>{var t,r;e?e.forEach(o=>delete i[o]):Object.keys(i).forEach(o=>delete i[o]),(r=(t=v.value)==null?void 0:t.clearValidate)==null||r.call(t,e)},setFieldsErrors:e=>{var t,r;e.forEach(o=>{o.errors[0]?i[o.name]=o.errors[0]:delete i[o.name]}),(r=(t=v.value)==null?void 0:t.setFieldsErrors)==null||r.call(t,e)}}),a.onBeforeUnmount(()=>{for(const e of d.values())e.abort()}),(e,t)=>c.value.valid&&c.value.schema?(a.openBlock(),a.createBlock(a.unref(z.Form),{key:0,ref_key:"formElement",ref:v,class:"aheart-ai-form",model:A,disabled:p.disabled||p.submitting,"required-mark":!1,layout:"vertical","aria-busy":p.submitting?"true":"false",onSubmit:se,onFinish:ne,onFinishFailed:le},{default:a.withCtx(()=>[c.value.schema.title||c.value.schema.description?(a.openBlock(),a.createElementBlock("header",de,[c.value.schema.title?(a.openBlock(),a.createElementBlock("h2",me,a.toDisplayString(c.value.schema.title),1)):a.createCommentVNode("",!0),c.value.schema.description?(a.openBlock(),a.createElementBlock("p",fe,a.toDisplayString(c.value.schema.description),1)):a.createCommentVNode("",!0)])):a.createCommentVNode("",!0),M.value.length?(a.openBlock(),a.createElementBlock("div",pe,[a.createElementVNode("strong",null,"请解决 "+a.toDisplayString(M.value.length)+" 个校验问题",1),a.createElementVNode("ul",null,[(a.openBlock(!0),a.createElementBlock(a.Fragment,null,a.renderList(M.value,r=>(a.openBlock(),a.createElementBlock("li",{key:r.key},[a.createElementVNode("button",{type:"button",onClick:o=>W(r.key)},a.toDisplayString(r.message),9,ye)]))),128))])])):a.createCommentVNode("",!0),(a.openBlock(!0),a.createElementBlock(a.Fragment,null,a.renderList(Q.value,r=>{var o;return a.openBlock(),a.createBlock(a.resolveDynamicComponent(r.group?"fieldset":"section"),{key:r.key,class:"aheart-ai-form__group","data-group-key":(o=r.group)==null?void 0:o.key},{default:a.withCtx(()=>[r.group?(a.openBlock(),a.createElementBlock("legend",he,[a.createElementVNode("span",null,a.toDisplayString(r.group.title),1),r.group.description?(a.openBlock(),a.createElementBlock("small",ge,a.toDisplayString(r.group.description),1)):a.createCommentVNode("",!0)])):a.createCommentVNode("",!0),(a.openBlock(!0),a.createElementBlock(a.Fragment,null,a.renderList(r.fields,s=>(a.openBlock(),a.createBlock(a.unref(z.FormItem),{key:ee(s),name:s.key,rules:ae(s),dependencies:I(s),"no-style":""},{default:a.withCtx(()=>[a.createVNode(ce.default,{ref_for:!0,ref:l=>te(s.key,l),field:s,value:Z(s),disabled:S(s),error:i[s.key],onUpdate:l=>re(s.key,l)},null,8,["field","value","disabled","error","onUpdate"])]),_:2},1032,["name","rules","dependencies"]))),128))]),_:2},1032,["data-group-key"])}),128)),p.submitError?(a.openBlock(),a.createElementBlock("p",ve,a.toDisplayString(p.submitError),1)):a.createCommentVNode("",!0),a.createElementVNode("footer",be,[a.createVNode(a.unref(ie.Button),{"html-type":"submit",type:"primary",loading:p.submitting,disabled:p.disabled},{default:a.withCtx(()=>[a.createTextVNode(a.toDisplayString(p.submitText),1)]),_:1},8,["loading","disabled"])])]),_:1},8,["model","disabled","aria-busy"])):(a.openBlock(),a.createElementBlock("div",ke,[t[0]||(t[0]=a.createElementVNode("strong",null,"表单配置无效",-1)),a.createElementVNode("ul",null,[(a.openBlock(!0),a.createElementBlock(a.Fragment,null,a.renderList(c.value.errors,r=>(a.openBlock(),a.createElementBlock("li",{key:r},a.toDisplayString(r),1))),128))])]))}});exports.default=Ee;
|
package/dist/cjs/full.js
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const r=require("./index.js"),_=require("./agent-workbench.vue.js"),s=require("./actions.vue.js"),a=require("./attachments.vue.js"),n=require("./bubble.vue.js"),c=require("./chat-panel.vue.js"),o=require("./conversations.vue.js"),l=require("./form.vue.js"),i=require("./process.vue.js"),p=require("./prompts.vue.js"),v=require("./sender.vue.js"),A=require("./sources.vue.js"),I=require("./thought-chain.vue.js"),d=require("./welcome.vue.js"),e=require("./form-schema.js"),u=require("./stream-reducer.js"),g={install(t){t.use(r.default),t.component("AAIAgentWorkbench",_.default)}};exports.AIAgentWorkbench=_.default;exports.AIActions=s.default;exports.AIAttachments=a.default;exports.AIBubble=n.default;exports.AIChatPanel=c.default;exports.AIConversations=o.default;exports.AIForm=l.default;exports.AIProcess=i.default;exports.AIPrompts=p.default;exports.AISender=v.default;exports.AISources=A.default;exports.AIThoughtChain=I.default;exports.AIWelcome=d.default;exports.AI_FORM_CONDITION_OPERATORS=e.AI_FORM_CONDITION_OPERATORS;exports.AI_FORM_FIELD_TYPES=e.AI_FORM_FIELD_TYPES;exports.validateAIFormSchema=e.validateAIFormSchema;exports.createAIStreamReducer=u.createAIStreamReducer;exports.reduceAIStreamEvent=u.reduceAIStreamEvent;exports.default=g;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const u=require("./chat-panel.vue.js"),_=require("./actions.vue.js"),r=require("./attachments.vue.js"),n=require("./bubble.vue.js"),o=require("./conversations.vue.js"),s=require("./process.vue.js"),c=require("./prompts.vue.js"),a=require("./sender.vue.js"),l=require("./sources.vue.js"),A=require("./thought-chain.vue.js"),i=require("./welcome.vue.js"),I=require("./form.vue.js"),t=require("./form-schema.js"),d=require("./stream-reducer.js"),m={install(e){e.component("AAIActions",_.default),e.component("AAIAttachments",r.default),e.component("AAIBubble",n.default),e.component("AAIChatPanel",u.default),e.component("AAIConversations",o.default),e.component("AAIForm",I.default),e.component("AAIProcess",s.default),e.component("AAIPrompts",c.default),e.component("AAISender",a.default),e.component("AAISources",l.default),e.component("AAIThoughtChain",A.default),e.component("AAIWelcome",i.default)}};exports.AIChatPanel=u.default;exports.AIActions=_.default;exports.AIAttachments=r.default;exports.AIBubble=n.default;exports.AIConversations=o.default;exports.AIProcess=s.default;exports.AIPrompts=c.default;exports.AISender=a.default;exports.AISources=l.default;exports.AIThoughtChain=A.default;exports.AIWelcome=i.default;exports.AIForm=I.default;exports.AI_FORM_CONDITION_OPERATORS=t.AI_FORM_CONDITION_OPERATORS;exports.AI_FORM_FIELD_TYPES=t.AI_FORM_FIELD_TYPES;exports.validateAIFormSchema=t.validateAIFormSchema;exports.createAIStreamReducer=d.createAIStreamReducer;exports.reduceAIStreamEvent=d.reduceAIStreamEvent;exports.default=m;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from "../../../types/agent/index.js";
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from "../../../esm/agent/index.js";
|