@meistrari/chat-nuxt 1.0.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/README.md +274 -0
- package/dist/module.d.mts +3 -0
- package/dist/module.json +9 -0
- package/dist/module.mjs +250 -0
- package/dist/runtime/assets/css/code-theme.css +1 -0
- package/dist/runtime/assets/css/markstream.css +1 -0
- package/dist/runtime/components/AppStatusToast.d.vue.ts +3 -0
- package/dist/runtime/components/AppStatusToast.vue +42 -0
- package/dist/runtime/components/AppStatusToast.vue.d.ts +3 -0
- package/dist/runtime/components/TelaChat.d.vue.ts +19 -0
- package/dist/runtime/components/TelaChat.vue +25 -0
- package/dist/runtime/components/TelaChat.vue.d.ts +19 -0
- package/dist/runtime/components/app-markdown-render.d.vue.ts +15 -0
- package/dist/runtime/components/app-markdown-render.vue +45 -0
- package/dist/runtime/components/app-markdown-render.vue.d.ts +15 -0
- package/dist/runtime/components/application-card.d.vue.ts +9 -0
- package/dist/runtime/components/application-card.vue +52 -0
- package/dist/runtime/components/application-card.vue.d.ts +9 -0
- package/dist/runtime/components/audio-preview.d.vue.ts +14 -0
- package/dist/runtime/components/audio-preview.vue +52 -0
- package/dist/runtime/components/audio-preview.vue.d.ts +14 -0
- package/dist/runtime/components/chat/bash-widget.d.vue.ts +9 -0
- package/dist/runtime/components/chat/bash-widget.vue +86 -0
- package/dist/runtime/components/chat/bash-widget.vue.d.ts +9 -0
- package/dist/runtime/components/chat/canvas-selector-modal.d.vue.ts +14 -0
- package/dist/runtime/components/chat/canvas-selector-modal.vue +290 -0
- package/dist/runtime/components/chat/canvas-selector-modal.vue.d.ts +14 -0
- package/dist/runtime/components/chat/context-config.d.vue.ts +30 -0
- package/dist/runtime/components/chat/context-config.vue +423 -0
- package/dist/runtime/components/chat/context-config.vue.d.ts +30 -0
- package/dist/runtime/components/chat/conversation-item.d.vue.ts +20 -0
- package/dist/runtime/components/chat/conversation-item.vue +184 -0
- package/dist/runtime/components/chat/conversation-item.vue.d.ts +20 -0
- package/dist/runtime/components/chat/conversation-list.d.vue.ts +10 -0
- package/dist/runtime/components/chat/conversation-list.vue +78 -0
- package/dist/runtime/components/chat/conversation-list.vue.d.ts +10 -0
- package/dist/runtime/components/chat/doc-sdk-widget.d.vue.ts +9 -0
- package/dist/runtime/components/chat/doc-sdk-widget.vue +74 -0
- package/dist/runtime/components/chat/doc-sdk-widget.vue.d.ts +9 -0
- package/dist/runtime/components/chat/file-preview.d.vue.ts +7 -0
- package/dist/runtime/components/chat/file-preview.vue +313 -0
- package/dist/runtime/components/chat/file-preview.vue.d.ts +7 -0
- package/dist/runtime/components/chat/files-view.d.vue.ts +6 -0
- package/dist/runtime/components/chat/files-view.vue +399 -0
- package/dist/runtime/components/chat/files-view.vue.d.ts +6 -0
- package/dist/runtime/components/chat/generic-tool-widget.d.vue.ts +9 -0
- package/dist/runtime/components/chat/generic-tool-widget.vue +334 -0
- package/dist/runtime/components/chat/generic-tool-widget.vue.d.ts +9 -0
- package/dist/runtime/components/chat/grep-widget.d.vue.ts +9 -0
- package/dist/runtime/components/chat/grep-widget.vue +259 -0
- package/dist/runtime/components/chat/grep-widget.vue.d.ts +9 -0
- package/dist/runtime/components/chat/mention-dropdown.d.vue.ts +14 -0
- package/dist/runtime/components/chat/mention-dropdown.vue +90 -0
- package/dist/runtime/components/chat/mention-dropdown.vue.d.ts +14 -0
- package/dist/runtime/components/chat/message-bubble.d.vue.ts +11 -0
- package/dist/runtime/components/chat/message-bubble.vue +288 -0
- package/dist/runtime/components/chat/message-bubble.vue.d.ts +11 -0
- package/dist/runtime/components/chat/message-input.d.vue.ts +34 -0
- package/dist/runtime/components/chat/message-input.vue +428 -0
- package/dist/runtime/components/chat/message-input.vue.d.ts +34 -0
- package/dist/runtime/components/chat/message-list.d.vue.ts +11 -0
- package/dist/runtime/components/chat/message-list.vue +36 -0
- package/dist/runtime/components/chat/message-list.vue.d.ts +11 -0
- package/dist/runtime/components/chat/model-selector.d.vue.ts +15 -0
- package/dist/runtime/components/chat/model-selector.vue +35 -0
- package/dist/runtime/components/chat/model-selector.vue.d.ts +15 -0
- package/dist/runtime/components/chat/new-conversation-modal.d.vue.ts +14 -0
- package/dist/runtime/components/chat/new-conversation-modal.vue +271 -0
- package/dist/runtime/components/chat/new-conversation-modal.vue.d.ts +14 -0
- package/dist/runtime/components/chat/read-widget.d.vue.ts +9 -0
- package/dist/runtime/components/chat/read-widget.vue +195 -0
- package/dist/runtime/components/chat/read-widget.vue.d.ts +9 -0
- package/dist/runtime/components/chat/reasoning-message.d.vue.ts +13 -0
- package/dist/runtime/components/chat/reasoning-message.vue +341 -0
- package/dist/runtime/components/chat/reasoning-message.vue.d.ts +13 -0
- package/dist/runtime/components/chat/reasoning-step-item.d.vue.ts +37 -0
- package/dist/runtime/components/chat/reasoning-step-item.vue +125 -0
- package/dist/runtime/components/chat/reasoning-step-item.vue.d.ts +37 -0
- package/dist/runtime/components/chat/reasoning-steps.d.vue.ts +12 -0
- package/dist/runtime/components/chat/reasoning-steps.vue +47 -0
- package/dist/runtime/components/chat/reasoning-steps.vue.d.ts +12 -0
- package/dist/runtime/components/chat/reasoning-thought.d.vue.ts +11 -0
- package/dist/runtime/components/chat/reasoning-thought.vue +287 -0
- package/dist/runtime/components/chat/reasoning-thought.vue.d.ts +11 -0
- package/dist/runtime/components/chat/tela-skill-widget.d.vue.ts +9 -0
- package/dist/runtime/components/chat/tela-skill-widget.vue +94 -0
- package/dist/runtime/components/chat/tela-skill-widget.vue.d.ts +9 -0
- package/dist/runtime/components/chat/thinking-indicator.d.vue.ts +3 -0
- package/dist/runtime/components/chat/thinking-indicator.vue +52 -0
- package/dist/runtime/components/chat/thinking-indicator.vue.d.ts +3 -0
- package/dist/runtime/components/chat/thinking-widget.d.vue.ts +8 -0
- package/dist/runtime/components/chat/thinking-widget.vue +53 -0
- package/dist/runtime/components/chat/thinking-widget.vue.d.ts +8 -0
- package/dist/runtime/components/chat/topbar.d.vue.ts +43 -0
- package/dist/runtime/components/chat/topbar.vue +223 -0
- package/dist/runtime/components/chat/topbar.vue.d.ts +43 -0
- package/dist/runtime/components/chat/usage-view.d.vue.ts +8 -0
- package/dist/runtime/components/chat/usage-view.vue +393 -0
- package/dist/runtime/components/chat/usage-view.vue.d.ts +8 -0
- package/dist/runtime/components/chat/vault-link.d.vue.ts +20 -0
- package/dist/runtime/components/chat/vault-link.vue +34 -0
- package/dist/runtime/components/chat/vault-link.vue.d.ts +20 -0
- package/dist/runtime/components/chat/web-search-widget.d.vue.ts +9 -0
- package/dist/runtime/components/chat/web-search-widget.vue +121 -0
- package/dist/runtime/components/chat/web-search-widget.vue.d.ts +9 -0
- package/dist/runtime/components/chat/workstation-query-widget.d.vue.ts +10 -0
- package/dist/runtime/components/chat/workstation-query-widget.vue +552 -0
- package/dist/runtime/components/chat/workstation-query-widget.vue.d.ts +10 -0
- package/dist/runtime/components/chat/workstation-selector-modal.d.vue.ts +14 -0
- package/dist/runtime/components/chat/workstation-selector-modal.vue +272 -0
- package/dist/runtime/components/chat/workstation-selector-modal.vue.d.ts +14 -0
- package/dist/runtime/components/chat/write-widget.d.vue.ts +9 -0
- package/dist/runtime/components/chat/write-widget.vue +165 -0
- package/dist/runtime/components/chat/write-widget.vue.d.ts +9 -0
- package/dist/runtime/components/conversation-files-panel.d.vue.ts +3 -0
- package/dist/runtime/components/conversation-files-panel.vue +252 -0
- package/dist/runtime/components/conversation-files-panel.vue.d.ts +3 -0
- package/dist/runtime/components/csv-preview.d.vue.ts +20 -0
- package/dist/runtime/components/csv-preview.vue +157 -0
- package/dist/runtime/components/csv-preview.vue.d.ts +20 -0
- package/dist/runtime/components/file-preview-panel.d.vue.ts +3 -0
- package/dist/runtime/components/file-preview-panel.vue +185 -0
- package/dist/runtime/components/file-preview-panel.vue.d.ts +3 -0
- package/dist/runtime/components/file-uploader.d.vue.ts +16 -0
- package/dist/runtime/components/file-uploader.vue +136 -0
- package/dist/runtime/components/file-uploader.vue.d.ts +16 -0
- package/dist/runtime/components/icons/anthropic.d.vue.ts +3 -0
- package/dist/runtime/components/icons/anthropic.vue +5 -0
- package/dist/runtime/components/icons/anthropic.vue.d.ts +3 -0
- package/dist/runtime/components/image-preview.d.vue.ts +14 -0
- package/dist/runtime/components/image-preview.vue +54 -0
- package/dist/runtime/components/image-preview.vue.d.ts +14 -0
- package/dist/runtime/components/json-tree-node.d.vue.ts +9 -0
- package/dist/runtime/components/json-tree-node.vue +109 -0
- package/dist/runtime/components/json-tree-node.vue.d.ts +9 -0
- package/dist/runtime/components/json-viewer.d.vue.ts +6 -0
- package/dist/runtime/components/json-viewer.vue +88 -0
- package/dist/runtime/components/json-viewer.vue.d.ts +6 -0
- package/dist/runtime/components/pdf-preview.d.vue.ts +20 -0
- package/dist/runtime/components/pdf-preview.vue +89 -0
- package/dist/runtime/components/pdf-preview.vue.d.ts +20 -0
- package/dist/runtime/components/pdf-viewer.d.vue.ts +10 -0
- package/dist/runtime/components/pdf-viewer.vue +265 -0
- package/dist/runtime/components/pdf-viewer.vue.d.ts +10 -0
- package/dist/runtime/components/powered-by-tela.d.vue.ts +3 -0
- package/dist/runtime/components/powered-by-tela.vue +14 -0
- package/dist/runtime/components/powered-by-tela.vue.d.ts +3 -0
- package/dist/runtime/components/renderers/artifact-display.d.vue.ts +15 -0
- package/dist/runtime/components/renderers/artifact-display.vue +105 -0
- package/dist/runtime/components/renderers/artifact-display.vue.d.ts +15 -0
- package/dist/runtime/components/renderers/audio-renderer.d.vue.ts +7 -0
- package/dist/runtime/components/renderers/audio-renderer.vue +52 -0
- package/dist/runtime/components/renderers/audio-renderer.vue.d.ts +7 -0
- package/dist/runtime/components/renderers/csv-renderer.d.vue.ts +6 -0
- package/dist/runtime/components/renderers/csv-renderer.vue +203 -0
- package/dist/runtime/components/renderers/csv-renderer.vue.d.ts +6 -0
- package/dist/runtime/components/renderers/image-renderer.d.vue.ts +7 -0
- package/dist/runtime/components/renderers/image-renderer.vue +44 -0
- package/dist/runtime/components/renderers/image-renderer.vue.d.ts +7 -0
- package/dist/runtime/components/renderers/markdown-renderer.d.vue.ts +6 -0
- package/dist/runtime/components/renderers/markdown-renderer.vue +66 -0
- package/dist/runtime/components/renderers/markdown-renderer.vue.d.ts +6 -0
- package/dist/runtime/components/renderers/mermaid-diagram.d.vue.ts +7 -0
- package/dist/runtime/components/renderers/mermaid-diagram.vue +165 -0
- package/dist/runtime/components/renderers/mermaid-diagram.vue.d.ts +7 -0
- package/dist/runtime/components/renderers/text-renderer.d.vue.ts +7 -0
- package/dist/runtime/components/renderers/text-renderer.vue +70 -0
- package/dist/runtime/components/renderers/text-renderer.vue.d.ts +7 -0
- package/dist/runtime/components/renderers/video-renderer.d.vue.ts +6 -0
- package/dist/runtime/components/renderers/video-renderer.vue +43 -0
- package/dist/runtime/components/renderers/video-renderer.vue.d.ts +6 -0
- package/dist/runtime/components/text-preview.d.vue.ts +19 -0
- package/dist/runtime/components/text-preview.vue +105 -0
- package/dist/runtime/components/text-preview.vue.d.ts +19 -0
- package/dist/runtime/components/video-preview.d.vue.ts +14 -0
- package/dist/runtime/components/video-preview.vue +55 -0
- package/dist/runtime/components/video-preview.vue.d.ts +14 -0
- package/dist/runtime/composables/PageNavigation.d.ts +13 -0
- package/dist/runtime/composables/PageNavigation.js +18 -0
- package/dist/runtime/composables/useChat.d.ts +25 -0
- package/dist/runtime/composables/useChat.js +512 -0
- package/dist/runtime/composables/useChatApi.d.ts +6 -0
- package/dist/runtime/composables/useChatApi.js +28 -0
- package/dist/runtime/composables/useConversationFiles.d.ts +13 -0
- package/dist/runtime/composables/useConversationFiles.js +98 -0
- package/dist/runtime/composables/useConversationFilesPanel.d.ts +11 -0
- package/dist/runtime/composables/useConversationFilesPanel.js +35 -0
- package/dist/runtime/composables/useConversations.d.ts +15 -0
- package/dist/runtime/composables/useConversations.js +191 -0
- package/dist/runtime/composables/useDiagramExport.d.ts +11 -0
- package/dist/runtime/composables/useDiagramExport.js +186 -0
- package/dist/runtime/composables/useEmbedConfig.d.ts +13 -0
- package/dist/runtime/composables/useEmbedConfig.js +11 -0
- package/dist/runtime/composables/useFeatureFlags.d.ts +19 -0
- package/dist/runtime/composables/useFeatureFlags.js +67 -0
- package/dist/runtime/composables/useFileDrop.d.ts +17 -0
- package/dist/runtime/composables/useFileDrop.js +89 -0
- package/dist/runtime/composables/useFilePreviewPanel.d.ts +30 -0
- package/dist/runtime/composables/useFilePreviewPanel.js +42 -0
- package/dist/runtime/composables/useFileUpload.d.ts +7 -0
- package/dist/runtime/composables/useFileUpload.js +39 -0
- package/dist/runtime/composables/useGitHubSkills.d.ts +6 -0
- package/dist/runtime/composables/useGitHubSkills.js +68 -0
- package/dist/runtime/composables/useGitHubSkillsCallback.d.ts +5 -0
- package/dist/runtime/composables/useGitHubSkillsCallback.js +42 -0
- package/dist/runtime/composables/useIDB.d.ts +11 -0
- package/dist/runtime/composables/useIDB.js +57 -0
- package/dist/runtime/composables/useInputHistory.d.ts +7 -0
- package/dist/runtime/composables/useInputHistory.js +36 -0
- package/dist/runtime/composables/useKnowledgeSources.d.ts +6 -0
- package/dist/runtime/composables/useKnowledgeSources.js +15 -0
- package/dist/runtime/composables/useMediaCache.d.ts +13 -0
- package/dist/runtime/composables/useMediaCache.js +92 -0
- package/dist/runtime/composables/useMentionAutocomplete.d.ts +10 -0
- package/dist/runtime/composables/useMentionAutocomplete.js +272 -0
- package/dist/runtime/composables/useMermaidRenderer.d.ts +5 -0
- package/dist/runtime/composables/useMermaidRenderer.js +121 -0
- package/dist/runtime/composables/usePdf.d.ts +21 -0
- package/dist/runtime/composables/usePdf.js +138 -0
- package/dist/runtime/composables/usePolling.d.ts +12 -0
- package/dist/runtime/composables/usePolling.js +55 -0
- package/dist/runtime/composables/useSelectedModel.d.ts +4 -0
- package/dist/runtime/composables/useSelectedModel.js +46 -0
- package/dist/runtime/composables/useSplashScreen.d.ts +3 -0
- package/dist/runtime/composables/useSplashScreen.js +4 -0
- package/dist/runtime/composables/useStatusToast.d.ts +22 -0
- package/dist/runtime/composables/useStatusToast.js +40 -0
- package/dist/runtime/composables/useTela.d.ts +12 -0
- package/dist/runtime/composables/useTela.js +47 -0
- package/dist/runtime/composables/useToolFormatting.d.ts +5 -0
- package/dist/runtime/composables/useToolFormatting.js +61 -0
- package/dist/runtime/composables/useVault.d.ts +13 -0
- package/dist/runtime/composables/useVault.js +35 -0
- package/dist/runtime/composables/useVerbConjugation.d.ts +6 -0
- package/dist/runtime/composables/useVerbConjugation.js +256 -0
- package/dist/runtime/composables/useWorkspaceContextFiles.d.ts +19 -0
- package/dist/runtime/composables/useWorkspaceContextFiles.js +74 -0
- package/dist/runtime/composables/useWorkspaceCredentials.d.ts +34 -0
- package/dist/runtime/composables/useWorkspaceCredentials.js +175 -0
- package/dist/runtime/composables/useWorkspaceExternalSkills.d.ts +22 -0
- package/dist/runtime/composables/useWorkspaceExternalSkills.js +135 -0
- package/dist/runtime/composables/useWorkspaceKnowledgeSources.d.ts +11 -0
- package/dist/runtime/composables/useWorkspaceKnowledgeSources.js +88 -0
- package/dist/runtime/composables/useWorkspaceMembers.d.ts +13 -0
- package/dist/runtime/composables/useWorkspaceMembers.js +37 -0
- package/dist/runtime/composables/useWorkspacePersonalization.d.ts +6 -0
- package/dist/runtime/composables/useWorkspacePersonalization.js +19 -0
- package/dist/runtime/composables/useWorkspaceSettings.d.ts +30 -0
- package/dist/runtime/composables/useWorkspaceSettings.js +135 -0
- package/dist/runtime/composables/useWorkspaceTelaTools.d.ts +13 -0
- package/dist/runtime/composables/useWorkspaceTelaTools.js +91 -0
- package/dist/runtime/composables/useWorkspaces.d.ts +5 -0
- package/dist/runtime/composables/useWorkspaces.js +14 -0
- package/dist/runtime/composables/useZoomPan.d.ts +18 -0
- package/dist/runtime/composables/useZoomPan.js +130 -0
- package/dist/runtime/embed/components/ChatEmbed.d.vue.ts +23 -0
- package/dist/runtime/embed/components/ChatEmbed.vue +27 -0
- package/dist/runtime/embed/components/ChatEmbed.vue.d.ts +23 -0
- package/dist/runtime/embed/components/ChatEmbedInner.d.vue.ts +19 -0
- package/dist/runtime/embed/components/ChatEmbedInner.vue +604 -0
- package/dist/runtime/embed/components/ChatEmbedInner.vue.d.ts +19 -0
- package/dist/runtime/public/favicon.svg +4 -0
- package/dist/runtime/public/files/archive.svg +9 -0
- package/dist/runtime/public/files/audio.svg +4 -0
- package/dist/runtime/public/files/c.svg +4 -0
- package/dist/runtime/public/files/cpp.svg +6 -0
- package/dist/runtime/public/files/css.svg +4 -0
- package/dist/runtime/public/files/doc.svg +5 -0
- package/dist/runtime/public/files/generic.svg +7 -0
- package/dist/runtime/public/files/go.svg +6 -0
- package/dist/runtime/public/files/html.svg +4 -0
- package/dist/runtime/public/files/image.svg +3 -0
- package/dist/runtime/public/files/java.svg +7 -0
- package/dist/runtime/public/files/javascript.svg +4 -0
- package/dist/runtime/public/files/json.svg +5 -0
- package/dist/runtime/public/files/markdown.svg +5 -0
- package/dist/runtime/public/files/pdf.svg +5 -0
- package/dist/runtime/public/files/presentation.svg +5 -0
- package/dist/runtime/public/files/python.svg +5 -0
- package/dist/runtime/public/files/ruby.svg +5 -0
- package/dist/runtime/public/files/rust.svg +13 -0
- package/dist/runtime/public/files/sheet.svg +9 -0
- package/dist/runtime/public/files/shell.svg +5 -0
- package/dist/runtime/public/files/sql.svg +6 -0
- package/dist/runtime/public/files/typescript.svg +5 -0
- package/dist/runtime/public/files/video.svg +5 -0
- package/dist/runtime/public/files/yaml.svg +7 -0
- package/dist/runtime/public/github.svg +3 -0
- package/dist/runtime/public/robots.txt +1 -0
- package/dist/runtime/server/api/admin/trigger-usage-report.post.d.ts +2 -0
- package/dist/runtime/server/api/admin/trigger-usage-report.post.js +15 -0
- package/dist/runtime/server/api/chat/conversations/[id]/cancel.post.d.ts +1 -0
- package/dist/runtime/server/api/chat/conversations/[id]/cancel.post.js +1 -0
- package/dist/runtime/server/api/chat/conversations/[id]/clear.post.d.ts +1 -0
- package/dist/runtime/server/api/chat/conversations/[id]/clear.post.js +1 -0
- package/dist/runtime/server/api/chat/conversations/[id]/duplicate.post.d.ts +1 -0
- package/dist/runtime/server/api/chat/conversations/[id]/duplicate.post.js +1 -0
- package/dist/runtime/server/api/chat/conversations/[id]/files.get.d.ts +1 -0
- package/dist/runtime/server/api/chat/conversations/[id]/files.get.js +1 -0
- package/dist/runtime/server/api/chat/conversations/[id]/index.delete.d.ts +1 -0
- package/dist/runtime/server/api/chat/conversations/[id]/index.delete.js +1 -0
- package/dist/runtime/server/api/chat/conversations/[id]/index.get.d.ts +1 -0
- package/dist/runtime/server/api/chat/conversations/[id]/index.get.js +1 -0
- package/dist/runtime/server/api/chat/conversations/[id]/index.patch.d.ts +1 -0
- package/dist/runtime/server/api/chat/conversations/[id]/index.patch.js +1 -0
- package/dist/runtime/server/api/chat/conversations/[id]/messages/[messageId]/retry.post.d.ts +1 -0
- package/dist/runtime/server/api/chat/conversations/[id]/messages/[messageId]/retry.post.js +1 -0
- package/dist/runtime/server/api/chat/conversations/[id]/messages/index.get.d.ts +1 -0
- package/dist/runtime/server/api/chat/conversations/[id]/messages/index.get.js +1 -0
- package/dist/runtime/server/api/chat/conversations/[id]/messages/index.post.d.ts +1 -0
- package/dist/runtime/server/api/chat/conversations/[id]/messages/index.post.js +1 -0
- package/dist/runtime/server/api/chat/conversations/[id]/usage.get.d.ts +1 -0
- package/dist/runtime/server/api/chat/conversations/[id]/usage.get.js +1 -0
- package/dist/runtime/server/api/chat/conversations/generate-title.post.d.ts +1 -0
- package/dist/runtime/server/api/chat/conversations/generate-title.post.js +1 -0
- package/dist/runtime/server/api/chat/conversations/index.get.d.ts +1 -0
- package/dist/runtime/server/api/chat/conversations/index.get.js +1 -0
- package/dist/runtime/server/api/chat/conversations/index.post.d.ts +1 -0
- package/dist/runtime/server/api/chat/conversations/index.post.js +1 -0
- package/dist/runtime/server/api/chat/workspace/settings.get.d.ts +2 -0
- package/dist/runtime/server/api/chat/workspace/settings.get.js +14 -0
- package/dist/runtime/server/api/conversations/[id]/cancel.post.d.ts +2 -0
- package/dist/runtime/server/api/conversations/[id]/cancel.post.js +58 -0
- package/dist/runtime/server/api/conversations/[id]/clear.post.d.ts +2 -0
- package/dist/runtime/server/api/conversations/[id]/clear.post.js +38 -0
- package/dist/runtime/server/api/conversations/[id]/duplicate.post.d.ts +2 -0
- package/dist/runtime/server/api/conversations/[id]/duplicate.post.js +41 -0
- package/dist/runtime/server/api/conversations/[id]/files.get.d.ts +2 -0
- package/dist/runtime/server/api/conversations/[id]/files.get.js +131 -0
- package/dist/runtime/server/api/conversations/[id]/index.delete.d.ts +2 -0
- package/dist/runtime/server/api/conversations/[id]/index.delete.js +35 -0
- package/dist/runtime/server/api/conversations/[id]/index.get.d.ts +2 -0
- package/dist/runtime/server/api/conversations/[id]/index.get.js +34 -0
- package/dist/runtime/server/api/conversations/[id]/index.patch.d.ts +2 -0
- package/dist/runtime/server/api/conversations/[id]/index.patch.js +54 -0
- package/dist/runtime/server/api/conversations/[id]/messages/[messageId]/retry.post.d.ts +2 -0
- package/dist/runtime/server/api/conversations/[id]/messages/[messageId]/retry.post.js +168 -0
- package/dist/runtime/server/api/conversations/[id]/messages/index.get.d.ts +2 -0
- package/dist/runtime/server/api/conversations/[id]/messages/index.get.js +220 -0
- package/dist/runtime/server/api/conversations/[id]/messages/index.post.d.ts +2 -0
- package/dist/runtime/server/api/conversations/[id]/messages/index.post.js +181 -0
- package/dist/runtime/server/api/conversations/[id]/usage.get.d.ts +8 -0
- package/dist/runtime/server/api/conversations/[id]/usage.get.js +96 -0
- package/dist/runtime/server/api/conversations/generate-title.post.d.ts +2 -0
- package/dist/runtime/server/api/conversations/generate-title.post.js +49 -0
- package/dist/runtime/server/api/conversations/index.get.d.ts +2 -0
- package/dist/runtime/server/api/conversations/index.get.js +11 -0
- package/dist/runtime/server/api/conversations/index.post.d.ts +2 -0
- package/dist/runtime/server/api/conversations/index.post.js +41 -0
- package/dist/runtime/server/api/external-skills/discover.post.d.ts +2 -0
- package/dist/runtime/server/api/external-skills/discover.post.js +65 -0
- package/dist/runtime/server/api/github/disconnect.post.d.ts +2 -0
- package/dist/runtime/server/api/github/disconnect.post.js +21 -0
- package/dist/runtime/server/api/github/status.get.d.ts +2 -0
- package/dist/runtime/server/api/github/status.get.js +23 -0
- package/dist/runtime/server/api/tela/canvas.get.d.ts +2 -0
- package/dist/runtime/server/api/tela/canvas.get.js +18 -0
- package/dist/runtime/server/api/tela/projects.get.d.ts +2 -0
- package/dist/runtime/server/api/tela/projects.get.js +9 -0
- package/dist/runtime/server/api/tela/workspaces.get.d.ts +2 -0
- package/dist/runtime/server/api/tela/workspaces.get.js +9 -0
- package/dist/runtime/server/api/tela/workstations.get.d.ts +2 -0
- package/dist/runtime/server/api/tela/workstations.get.js +24 -0
- package/dist/runtime/server/api/vault/permalink-metadata.post.d.ts +2 -0
- package/dist/runtime/server/api/vault/permalink-metadata.post.js +77 -0
- package/dist/runtime/server/api/vault/resolve.post.d.ts +2 -0
- package/dist/runtime/server/api/vault/resolve.post.js +82 -0
- package/dist/runtime/server/api/vault/upload.post.d.ts +2 -0
- package/dist/runtime/server/api/vault/upload.post.js +55 -0
- package/dist/runtime/server/api/workspace/credentials/[id].delete.d.ts +2 -0
- package/dist/runtime/server/api/workspace/credentials/[id].delete.js +18 -0
- package/dist/runtime/server/api/workspace/credentials/[id].put.d.ts +2 -0
- package/dist/runtime/server/api/workspace/credentials/[id].put.js +28 -0
- package/dist/runtime/server/api/workspace/credentials/index.get.d.ts +2 -0
- package/dist/runtime/server/api/workspace/credentials/index.get.js +10 -0
- package/dist/runtime/server/api/workspace/credentials/index.post.d.ts +2 -0
- package/dist/runtime/server/api/workspace/credentials/index.post.js +33 -0
- package/dist/runtime/server/api/workspace/settings.get.d.ts +2 -0
- package/dist/runtime/server/api/workspace/settings.get.js +27 -0
- package/dist/runtime/server/api/workspace/settings.patch.d.ts +2 -0
- package/dist/runtime/server/api/workspace/settings.patch.js +86 -0
- package/dist/runtime/server/api/workspace/usage.get.d.ts +48 -0
- package/dist/runtime/server/api/workspace/usage.get.js +186 -0
- package/dist/runtime/server/db/index.d.ts +6 -0
- package/dist/runtime/server/db/index.js +19 -0
- package/dist/runtime/server/db/schema/conversation-usage.d.ts +438 -0
- package/dist/runtime/server/db/schema/conversation-usage.js +34 -0
- package/dist/runtime/server/db/schema/conversations.d.ts +197 -0
- package/dist/runtime/server/db/schema/conversations.js +18 -0
- package/dist/runtime/server/db/schema/external-skills.d.ts +235 -0
- package/dist/runtime/server/db/schema/external-skills.js +26 -0
- package/dist/runtime/server/db/schema/index.d.ts +5 -0
- package/dist/runtime/server/db/schema/index.js +5 -0
- package/dist/runtime/server/db/schema/messages.d.ts +221 -0
- package/dist/runtime/server/db/schema/messages.js +19 -0
- package/dist/runtime/server/db/schema/workspace-settings.d.ts +164 -0
- package/dist/runtime/server/db/schema/workspace-settings.js +15 -0
- package/dist/runtime/server/db/schema.d.ts +1 -0
- package/dist/runtime/server/db/schema.js +1 -0
- package/dist/runtime/server/middleware/domain-validation.d.ts +2 -0
- package/dist/runtime/server/middleware/domain-validation.js +22 -0
- package/dist/runtime/server/middleware/request-logger.d.ts +2 -0
- package/dist/runtime/server/middleware/request-logger.js +15 -0
- package/dist/runtime/server/prompts/base-system.d.ts +2 -0
- package/dist/runtime/server/prompts/base-system.js +100 -0
- package/dist/runtime/server/prompts/base-system.md +99 -0
- package/dist/runtime/server/prompts/knowledge-sources.d.ts +2 -0
- package/dist/runtime/server/prompts/knowledge-sources.js +37 -0
- package/dist/runtime/server/prompts/knowledge-sources.md +36 -0
- package/dist/runtime/server/tasks/send-daily-usage-report.d.ts +2 -0
- package/dist/runtime/server/tasks/send-daily-usage-report.js +73 -0
- package/dist/runtime/server/tsconfig.json +21 -0
- package/dist/runtime/server/utils/agent-api.d.ts +39 -0
- package/dist/runtime/server/utils/agent-api.js +169 -0
- package/dist/runtime/server/utils/auth-api.d.ts +1 -0
- package/dist/runtime/server/utils/auth-api.js +25 -0
- package/dist/runtime/server/utils/auth.d.ts +17 -0
- package/dist/runtime/server/utils/auth.js +28 -0
- package/dist/runtime/server/utils/billing.d.ts +37 -0
- package/dist/runtime/server/utils/billing.js +68 -0
- package/dist/runtime/server/utils/chat-context.d.ts +9 -0
- package/dist/runtime/server/utils/chat-context.js +24 -0
- package/dist/runtime/server/utils/chat-message-builder.d.ts +4 -0
- package/dist/runtime/server/utils/chat-message-builder.js +39 -0
- package/dist/runtime/server/utils/chat-prompts.d.ts +7 -0
- package/dist/runtime/server/utils/chat-prompts.js +9 -0
- package/dist/runtime/server/utils/chat-workspace-settings.d.ts +16 -0
- package/dist/runtime/server/utils/chat-workspace-settings.js +115 -0
- package/dist/runtime/server/utils/external-skills.d.ts +2 -0
- package/dist/runtime/server/utils/external-skills.js +15 -0
- package/dist/runtime/server/utils/logger.d.ts +2 -0
- package/dist/runtime/server/utils/logger.js +12 -0
- package/dist/runtime/server/utils/slack.d.ts +32 -0
- package/dist/runtime/server/utils/slack.js +102 -0
- package/dist/runtime/server/utils/tela-api.d.ts +2 -0
- package/dist/runtime/server/utils/tela-api.js +29 -0
- package/dist/runtime/server/utils/vault.d.ts +3 -0
- package/dist/runtime/server/utils/vault.js +52 -0
- package/dist/runtime/server/utils/workspace-settings-resolver.stub.d.ts +2 -0
- package/dist/runtime/server/utils/workspace-settings-resolver.stub.js +1 -0
- package/dist/runtime/server/utils/workspace.d.ts +4 -0
- package/dist/runtime/server/utils/workspace.js +21 -0
- package/dist/runtime/types/agent.d.ts +168 -0
- package/dist/runtime/types/agent.js +95 -0
- package/dist/runtime/types/chat-workspace-settings-resolver.d.ts +4 -0
- package/dist/runtime/types/chat.d.ts +81 -0
- package/dist/runtime/types/chat.js +12 -0
- package/dist/runtime/types/credential.d.ts +8 -0
- package/dist/runtime/types/credential.js +0 -0
- package/dist/runtime/types/csv.d.ts +4 -0
- package/dist/runtime/types/csv.js +0 -0
- package/dist/runtime/types/external-skills.d.ts +8 -0
- package/dist/runtime/types/external-skills.js +0 -0
- package/dist/runtime/types/feature-flags.d.ts +7 -0
- package/dist/runtime/types/feature-flags.js +6 -0
- package/dist/runtime/types/reasoning.d.ts +17 -0
- package/dist/runtime/types/reasoning.js +0 -0
- package/dist/runtime/types/tela.d.ts +46 -0
- package/dist/runtime/types/tela.js +0 -0
- package/dist/runtime/types/workspace.d.ts +20 -0
- package/dist/runtime/types/workspace.js +0 -0
- package/dist/runtime/utils/calculate-usage.d.ts +48 -0
- package/dist/runtime/utils/calculate-usage.js +63 -0
- package/dist/runtime/utils/code-detection.d.ts +1 -0
- package/dist/runtime/utils/code-detection.js +24 -0
- package/dist/runtime/utils/export-conversation.d.ts +2 -0
- package/dist/runtime/utils/export-conversation.js +43 -0
- package/dist/runtime/utils/file.d.ts +46 -0
- package/dist/runtime/utils/file.js +500 -0
- package/dist/runtime/utils/format-time.d.ts +22 -0
- package/dist/runtime/utils/format-time.js +96 -0
- package/dist/runtime/utils/markdown-nodes.d.ts +22 -0
- package/dist/runtime/utils/markdown-nodes.js +40 -0
- package/dist/runtime/utils/string.d.ts +4 -0
- package/dist/runtime/utils/string.js +5 -0
- package/dist/runtime/utils/tela-chat.d.ts +19 -0
- package/dist/runtime/utils/tela-chat.js +20 -0
- package/dist/types.d.mts +7 -0
- package/package.json +72 -0
|
@@ -0,0 +1,552 @@
|
|
|
1
|
+
<script setup>
|
|
2
|
+
import { formatShortDate } from "../../utils/format-time";
|
|
3
|
+
const props = defineProps({
|
|
4
|
+
toolUse: { type: Object, required: true },
|
|
5
|
+
toolResult: { type: Object, required: false },
|
|
6
|
+
isActive: { type: Boolean, required: false },
|
|
7
|
+
isBashExecution: { type: Boolean, required: false }
|
|
8
|
+
});
|
|
9
|
+
const { knowledgeSources, getWorkstationName } = useKnowledgeSources();
|
|
10
|
+
const queryParams = computed(() => {
|
|
11
|
+
let jsonStr = null;
|
|
12
|
+
if (props.isBashExecution) {
|
|
13
|
+
const command = props.toolUse.input?.command;
|
|
14
|
+
if (typeof command === "string") {
|
|
15
|
+
const match = command.match(/'(\{[\s\S]*\})'/);
|
|
16
|
+
if (match && match[1]) {
|
|
17
|
+
jsonStr = match[1];
|
|
18
|
+
}
|
|
19
|
+
}
|
|
20
|
+
} else {
|
|
21
|
+
const args = props.toolUse.input?.args;
|
|
22
|
+
if (typeof args === "string") {
|
|
23
|
+
jsonStr = args;
|
|
24
|
+
}
|
|
25
|
+
}
|
|
26
|
+
if (!jsonStr)
|
|
27
|
+
return null;
|
|
28
|
+
try {
|
|
29
|
+
return JSON.parse(jsonStr);
|
|
30
|
+
} catch {
|
|
31
|
+
return null;
|
|
32
|
+
}
|
|
33
|
+
});
|
|
34
|
+
const formattedFilters = computed(() => {
|
|
35
|
+
const parts = [];
|
|
36
|
+
if (queryParams.value?.limit) {
|
|
37
|
+
parts.push(`Limite: ${queryParams.value.limit}`);
|
|
38
|
+
}
|
|
39
|
+
if (queryParams.value?.offset) {
|
|
40
|
+
parts.push(`Offset: ${queryParams.value.offset}`);
|
|
41
|
+
}
|
|
42
|
+
if (queryParams.value?.orderBy) {
|
|
43
|
+
const order = queryParams.value.order === "asc" ? "\u2191" : "\u2193";
|
|
44
|
+
parts.push(`Ordenar: ${queryParams.value.orderBy} ${order}`);
|
|
45
|
+
}
|
|
46
|
+
if (queryParams.value?.select && queryParams.value.select.length > 0) {
|
|
47
|
+
parts.push(`Campos: ${queryParams.value.select.join(", ")}`);
|
|
48
|
+
}
|
|
49
|
+
const filters = queryParams.value?.filters;
|
|
50
|
+
if (filters) {
|
|
51
|
+
if (filters.status && Array.isArray(filters.status)) {
|
|
52
|
+
parts.push(`Status: ${filters.status.join(", ")}`);
|
|
53
|
+
}
|
|
54
|
+
if (filters.createdAtSince) {
|
|
55
|
+
parts.push(`Desde: ${formatShortDate(filters.createdAtSince)}`);
|
|
56
|
+
}
|
|
57
|
+
if (filters.createdAtUntil) {
|
|
58
|
+
parts.push(`At\xE9: ${formatShortDate(filters.createdAtUntil)}`);
|
|
59
|
+
}
|
|
60
|
+
if (filters.tags && Array.isArray(filters.tags)) {
|
|
61
|
+
parts.push(`Tags: ${filters.tags.join(", ")}`);
|
|
62
|
+
}
|
|
63
|
+
if (filters.approvedBy && Array.isArray(filters.approvedBy)) {
|
|
64
|
+
parts.push(`Aprovado por: ${filters.approvedBy.join(", ")}`);
|
|
65
|
+
}
|
|
66
|
+
if (filters.createdBy && Array.isArray(filters.createdBy)) {
|
|
67
|
+
parts.push(`Criado por: ${filters.createdBy.join(", ")}`);
|
|
68
|
+
}
|
|
69
|
+
}
|
|
70
|
+
return parts.length > 0 ? parts : null;
|
|
71
|
+
});
|
|
72
|
+
function formatCondition(field, ops) {
|
|
73
|
+
const results = [];
|
|
74
|
+
for (const [op, value] of Object.entries(ops)) {
|
|
75
|
+
if (value === void 0 || op === "$type")
|
|
76
|
+
continue;
|
|
77
|
+
switch (op) {
|
|
78
|
+
case "$eq":
|
|
79
|
+
results.push(`${field} = ${value}`);
|
|
80
|
+
break;
|
|
81
|
+
case "$ne":
|
|
82
|
+
results.push(`${field} \u2260 ${value}`);
|
|
83
|
+
break;
|
|
84
|
+
case "$contains":
|
|
85
|
+
results.push(`${field} cont\xE9m "${value}"`);
|
|
86
|
+
break;
|
|
87
|
+
case "$gt":
|
|
88
|
+
results.push(`${field} > ${value}`);
|
|
89
|
+
break;
|
|
90
|
+
case "$gte":
|
|
91
|
+
results.push(`${field} \u2265 ${value}`);
|
|
92
|
+
break;
|
|
93
|
+
case "$lt":
|
|
94
|
+
results.push(`${field} < ${value}`);
|
|
95
|
+
break;
|
|
96
|
+
case "$lte":
|
|
97
|
+
results.push(`${field} \u2264 ${value}`);
|
|
98
|
+
break;
|
|
99
|
+
case "$in":
|
|
100
|
+
if (Array.isArray(value)) {
|
|
101
|
+
results.push(`${field} em [${value.join(", ")}]`);
|
|
102
|
+
}
|
|
103
|
+
break;
|
|
104
|
+
}
|
|
105
|
+
}
|
|
106
|
+
return results;
|
|
107
|
+
}
|
|
108
|
+
function formatElemMatch(path, elemMatch) {
|
|
109
|
+
const results = [];
|
|
110
|
+
for (const [field, condition] of Object.entries(elemMatch)) {
|
|
111
|
+
if (condition === void 0)
|
|
112
|
+
continue;
|
|
113
|
+
if (typeof condition === "object" && condition !== null) {
|
|
114
|
+
const ops = condition;
|
|
115
|
+
if (ops.$elemMatch) {
|
|
116
|
+
const nestedPath = path ? `${path}.${field}` : field;
|
|
117
|
+
results.push(...formatElemMatch(nestedPath, ops.$elemMatch));
|
|
118
|
+
} else {
|
|
119
|
+
const fullField = path ? `${path}.${field}` : field;
|
|
120
|
+
results.push(...formatCondition(fullField, ops));
|
|
121
|
+
}
|
|
122
|
+
} else {
|
|
123
|
+
const fullField = path ? `${path}.${field}` : field;
|
|
124
|
+
results.push(`${fullField} = ${condition}`);
|
|
125
|
+
}
|
|
126
|
+
}
|
|
127
|
+
return results;
|
|
128
|
+
}
|
|
129
|
+
const formattedOutputQuery = computed(() => {
|
|
130
|
+
if (!queryParams.value?.outputQuery)
|
|
131
|
+
return null;
|
|
132
|
+
const query = queryParams.value.outputQuery;
|
|
133
|
+
const parts = [];
|
|
134
|
+
for (const [field, condition] of Object.entries(query)) {
|
|
135
|
+
if (condition === void 0)
|
|
136
|
+
continue;
|
|
137
|
+
if (typeof condition === "object" && condition !== null) {
|
|
138
|
+
const ops = condition;
|
|
139
|
+
if (ops.$elemMatch) {
|
|
140
|
+
const elemMatchResults = formatElemMatch(field, ops.$elemMatch);
|
|
141
|
+
parts.push(...elemMatchResults);
|
|
142
|
+
} else {
|
|
143
|
+
parts.push(...formatCondition(field, ops));
|
|
144
|
+
}
|
|
145
|
+
} else {
|
|
146
|
+
parts.push(`${field} = ${condition}`);
|
|
147
|
+
}
|
|
148
|
+
}
|
|
149
|
+
return parts.length > 0 ? parts : null;
|
|
150
|
+
});
|
|
151
|
+
const parsedResult = computed(() => {
|
|
152
|
+
if (!props.toolResult?.output)
|
|
153
|
+
return null;
|
|
154
|
+
const output = props.toolResult.output;
|
|
155
|
+
const lines = output.split("\n");
|
|
156
|
+
const summaryMatch = output.match(/Found (\d+) total tasks \(showing (\d+)\)/);
|
|
157
|
+
const pageMatch = output.match(/Page (\d+) of (\d+)/);
|
|
158
|
+
const tasks = [];
|
|
159
|
+
let currentTask = null;
|
|
160
|
+
let inOutput = false;
|
|
161
|
+
let outputLines = [];
|
|
162
|
+
for (const line of lines) {
|
|
163
|
+
const taskMatch = line.match(/^-{3,}\s*Task:\s*(.+?)\s*-{3,}$/);
|
|
164
|
+
if (taskMatch) {
|
|
165
|
+
if (currentTask?.name) {
|
|
166
|
+
if (outputLines.length > 0) {
|
|
167
|
+
try {
|
|
168
|
+
currentTask.output = parseOutputLines(outputLines);
|
|
169
|
+
} catch {
|
|
170
|
+
currentTask.output = {};
|
|
171
|
+
}
|
|
172
|
+
}
|
|
173
|
+
tasks.push(currentTask);
|
|
174
|
+
}
|
|
175
|
+
currentTask = { name: taskMatch[1], output: {} };
|
|
176
|
+
inOutput = false;
|
|
177
|
+
outputLines = [];
|
|
178
|
+
continue;
|
|
179
|
+
}
|
|
180
|
+
if (!currentTask)
|
|
181
|
+
continue;
|
|
182
|
+
const idMatch = line.match(/^\s*ID:\s*(.+)$/);
|
|
183
|
+
const statusMatch = line.match(/^\s*Status:\s*(.+)$/);
|
|
184
|
+
const createdMatch = line.match(/^\s*Created:\s*(.+)$/);
|
|
185
|
+
const approvedMatch = line.match(/^\s*Approved:\s*(.+)$/);
|
|
186
|
+
if (idMatch)
|
|
187
|
+
currentTask.id = idMatch[1];
|
|
188
|
+
else if (statusMatch)
|
|
189
|
+
currentTask.status = statusMatch[1];
|
|
190
|
+
else if (createdMatch)
|
|
191
|
+
currentTask.createdAt = createdMatch[1];
|
|
192
|
+
else if (approvedMatch)
|
|
193
|
+
currentTask.approvedAt = approvedMatch[1];
|
|
194
|
+
else if (line.trim() === "Output:")
|
|
195
|
+
inOutput = true;
|
|
196
|
+
else if (inOutput && line.trim())
|
|
197
|
+
outputLines.push(line);
|
|
198
|
+
}
|
|
199
|
+
if (currentTask?.name) {
|
|
200
|
+
if (outputLines.length > 0) {
|
|
201
|
+
try {
|
|
202
|
+
currentTask.output = parseOutputLines(outputLines);
|
|
203
|
+
} catch {
|
|
204
|
+
currentTask.output = {};
|
|
205
|
+
}
|
|
206
|
+
}
|
|
207
|
+
tasks.push(currentTask);
|
|
208
|
+
}
|
|
209
|
+
if (!summaryMatch && tasks.length === 0)
|
|
210
|
+
return null;
|
|
211
|
+
const totalTasks = summaryMatch?.[1] ? Number.parseInt(summaryMatch[1], 10) : tasks.length;
|
|
212
|
+
const showingTasks = summaryMatch?.[2] ? Number.parseInt(summaryMatch[2], 10) : tasks.length;
|
|
213
|
+
const page = pageMatch?.[1] ? Number.parseInt(pageMatch[1], 10) : 1;
|
|
214
|
+
const totalPages = pageMatch?.[2] ? Number.parseInt(pageMatch[2], 10) : 1;
|
|
215
|
+
return { totalTasks, showingTasks, page, totalPages, tasks };
|
|
216
|
+
});
|
|
217
|
+
function parseOutputLines(lines) {
|
|
218
|
+
try {
|
|
219
|
+
const output = {};
|
|
220
|
+
for (const line of lines) {
|
|
221
|
+
const match = line.match(/^\s+(\w+): (.+)$/);
|
|
222
|
+
if (match && match[1] && match[2]) {
|
|
223
|
+
const key = match[1];
|
|
224
|
+
const value = match[2];
|
|
225
|
+
try {
|
|
226
|
+
output[key] = JSON.parse(value);
|
|
227
|
+
} catch {
|
|
228
|
+
output[key] = value;
|
|
229
|
+
}
|
|
230
|
+
}
|
|
231
|
+
}
|
|
232
|
+
return output;
|
|
233
|
+
} catch {
|
|
234
|
+
return {};
|
|
235
|
+
}
|
|
236
|
+
}
|
|
237
|
+
function formatDateTime(dateStr) {
|
|
238
|
+
try {
|
|
239
|
+
return new Date(dateStr).toLocaleDateString("pt-BR", {
|
|
240
|
+
day: "2-digit",
|
|
241
|
+
month: "short",
|
|
242
|
+
hour: "2-digit",
|
|
243
|
+
minute: "2-digit"
|
|
244
|
+
});
|
|
245
|
+
} catch {
|
|
246
|
+
return dateStr;
|
|
247
|
+
}
|
|
248
|
+
}
|
|
249
|
+
function getStatusColor(status) {
|
|
250
|
+
switch (status.toLowerCase()) {
|
|
251
|
+
case "approved":
|
|
252
|
+
case "completed":
|
|
253
|
+
return "bg-emerald-100 text-emerald-700";
|
|
254
|
+
case "validating":
|
|
255
|
+
case "pending":
|
|
256
|
+
return "bg-amber-100 text-amber-700";
|
|
257
|
+
case "failed":
|
|
258
|
+
case "rejected":
|
|
259
|
+
return "bg-red-100 text-red-700";
|
|
260
|
+
default:
|
|
261
|
+
return "bg-gray-100 text-gray-700";
|
|
262
|
+
}
|
|
263
|
+
}
|
|
264
|
+
function getStatusLabel(status) {
|
|
265
|
+
const labels = {
|
|
266
|
+
approved: "Aprovado",
|
|
267
|
+
completed: "Conclu\xEDdo",
|
|
268
|
+
validating: "Validando",
|
|
269
|
+
pending: "Pendente",
|
|
270
|
+
failed: "Falhou",
|
|
271
|
+
rejected: "Rejeitado"
|
|
272
|
+
};
|
|
273
|
+
return labels[status.toLowerCase()] || status;
|
|
274
|
+
}
|
|
275
|
+
const isLaunchMessage = computed(() => {
|
|
276
|
+
if (!props.toolResult?.output)
|
|
277
|
+
return true;
|
|
278
|
+
const output = props.toolResult.output.trim();
|
|
279
|
+
const isLaunching = output.startsWith("Launching skill:");
|
|
280
|
+
const hasResults = output.includes("Found") || output.includes("Task:") || output.includes("Status:");
|
|
281
|
+
return isLaunching && !hasResults;
|
|
282
|
+
});
|
|
283
|
+
const statusVariant = computed(() => {
|
|
284
|
+
if (!props.toolResult) {
|
|
285
|
+
return "executing";
|
|
286
|
+
}
|
|
287
|
+
if (props.toolResult.isError) {
|
|
288
|
+
return "error";
|
|
289
|
+
}
|
|
290
|
+
if (isLaunchMessage.value) {
|
|
291
|
+
return "executing";
|
|
292
|
+
}
|
|
293
|
+
return "completed";
|
|
294
|
+
});
|
|
295
|
+
const statusLabel = computed(() => {
|
|
296
|
+
if (props.toolResult && !props.toolResult.isError && parsedResult.value) {
|
|
297
|
+
return `${parsedResult.value.totalTasks} ${parsedResult.value.totalTasks === 1 ? "tarefa" : "tarefas"}`;
|
|
298
|
+
}
|
|
299
|
+
return void 0;
|
|
300
|
+
});
|
|
301
|
+
const expanded = ref(false);
|
|
302
|
+
const selectedTask = ref(null);
|
|
303
|
+
const canExpand = computed(() => {
|
|
304
|
+
if (!props.toolResult)
|
|
305
|
+
return false;
|
|
306
|
+
if (isLaunchMessage.value)
|
|
307
|
+
return false;
|
|
308
|
+
return true;
|
|
309
|
+
});
|
|
310
|
+
const workstationId = computed(() => {
|
|
311
|
+
if (queryParams.value?.workstationId) {
|
|
312
|
+
return queryParams.value.workstationId;
|
|
313
|
+
}
|
|
314
|
+
if (props.toolResult?.output) {
|
|
315
|
+
const match = props.toolResult.output.match(/Querying workstation: ([a-f0-9-]{36})/i);
|
|
316
|
+
if (match)
|
|
317
|
+
return match[1];
|
|
318
|
+
}
|
|
319
|
+
return null;
|
|
320
|
+
});
|
|
321
|
+
const displayName = computed(() => {
|
|
322
|
+
const id = workstationId.value;
|
|
323
|
+
if (!id) {
|
|
324
|
+
if (knowledgeSources.value.length === 1 && knowledgeSources.value[0]) {
|
|
325
|
+
return knowledgeSources.value[0].name;
|
|
326
|
+
}
|
|
327
|
+
return "Workstation";
|
|
328
|
+
}
|
|
329
|
+
const name = getWorkstationName(id);
|
|
330
|
+
if (name)
|
|
331
|
+
return name;
|
|
332
|
+
return `Workstation ${id.slice(0, 8)}...`;
|
|
333
|
+
});
|
|
334
|
+
</script>
|
|
335
|
+
|
|
336
|
+
<template>
|
|
337
|
+
<div class="bg-subtle rounded-16px border border-gray-200">
|
|
338
|
+
<!-- Header -->
|
|
339
|
+
<div class="px-24px py-24px flex items-center justify-between">
|
|
340
|
+
<div class="flex-1 min-w-0">
|
|
341
|
+
<h3 class="text-20px font-580 leading-24px tracking-[-0.5px] text-primary truncate">
|
|
342
|
+
Consulta de Dados
|
|
343
|
+
</h3>
|
|
344
|
+
<p v-if="displayName !== 'Workstation'" class="text-12px text-secondary truncate mt-2px">
|
|
345
|
+
{{ displayName }}
|
|
346
|
+
</p>
|
|
347
|
+
</div>
|
|
348
|
+
<TelaStatus
|
|
349
|
+
:variant="statusVariant"
|
|
350
|
+
:label="statusLabel"
|
|
351
|
+
:is-icon-animated="!toolResult"
|
|
352
|
+
/>
|
|
353
|
+
</div>
|
|
354
|
+
|
|
355
|
+
<!-- Filters preview (when collapsed) -->
|
|
356
|
+
<div
|
|
357
|
+
v-if="!expanded && canExpand && (formattedFilters || formattedOutputQuery)"
|
|
358
|
+
class="px-24px pb-12px"
|
|
359
|
+
>
|
|
360
|
+
<div class="flex flex-wrap items-center gap-6px">
|
|
361
|
+
<template v-if="formattedFilters">
|
|
362
|
+
<span
|
|
363
|
+
v-for="filter in formattedFilters.slice(0, 3)"
|
|
364
|
+
:key="filter"
|
|
365
|
+
class="text-11px px-8px py-3px rounded-6px bg-gray-100 text-gray-600"
|
|
366
|
+
>
|
|
367
|
+
{{ filter }}
|
|
368
|
+
</span>
|
|
369
|
+
</template>
|
|
370
|
+
<template v-if="formattedOutputQuery">
|
|
371
|
+
<span
|
|
372
|
+
v-for="query in formattedOutputQuery.slice(0, 3)"
|
|
373
|
+
:key="query"
|
|
374
|
+
class="text-11px px-8px py-3px rounded-6px bg-blue-100 text-blue-700"
|
|
375
|
+
>
|
|
376
|
+
{{ query }}
|
|
377
|
+
</span>
|
|
378
|
+
</template>
|
|
379
|
+
<span
|
|
380
|
+
v-if="(formattedFilters?.length || 0) + (formattedOutputQuery?.length || 0) > 3"
|
|
381
|
+
class="text-11px text-gray-400"
|
|
382
|
+
>
|
|
383
|
+
+{{ (formattedFilters?.length || 0) + (formattedOutputQuery?.length || 0) - 3 }} mais
|
|
384
|
+
</span>
|
|
385
|
+
</div>
|
|
386
|
+
</div>
|
|
387
|
+
|
|
388
|
+
<!-- Launch message (when only have launching output) -->
|
|
389
|
+
<div v-if="toolResult && isLaunchMessage" class="px-24px pb-16px">
|
|
390
|
+
<div class="bg-blue-50 rounded-xl border-0.5px border-blue-200 px-16px py-12px">
|
|
391
|
+
<div class="flex items-center gap-8px">
|
|
392
|
+
<div class="i-ph-clock text-16px text-blue-600 animate-pulse" />
|
|
393
|
+
<p class="text-13px text-blue-700 m-0">
|
|
394
|
+
Aguardando resultados da consulta...
|
|
395
|
+
</p>
|
|
396
|
+
</div>
|
|
397
|
+
</div>
|
|
398
|
+
</div>
|
|
399
|
+
|
|
400
|
+
<!-- Expand/Collapse button -->
|
|
401
|
+
<div v-if="toolResult && !isLaunchMessage" class="px-24px pb-12px">
|
|
402
|
+
<button
|
|
403
|
+
type="button"
|
|
404
|
+
class="w-full flex items-center justify-center gap-6px px-12px py-8px text-13px font-medium text-gray-600 hover:text-gray-900 hover:bg-gray-50 rounded-8px transition-colors"
|
|
405
|
+
@click="expanded = !expanded"
|
|
406
|
+
>
|
|
407
|
+
<span>{{ expanded ? "Ocultar detalhes" : "Ver detalhes" }}</span>
|
|
408
|
+
<div
|
|
409
|
+
class="i-ph-caret-down text-12px transition-transform"
|
|
410
|
+
:class="expanded && 'rotate-180'"
|
|
411
|
+
/>
|
|
412
|
+
</button>
|
|
413
|
+
</div>
|
|
414
|
+
|
|
415
|
+
<!-- Expanded content -->
|
|
416
|
+
<div v-if="expanded && toolResult && !isLaunchMessage" class="px-24px pb-24px space-y-16px">
|
|
417
|
+
<!-- Filters section -->
|
|
418
|
+
<div v-if="formattedFilters || formattedOutputQuery">
|
|
419
|
+
<div class="text-14px font-580 leading-16px tracking-[-0.15px] text-gray-700 mb-2">
|
|
420
|
+
Filtros aplicados
|
|
421
|
+
</div>
|
|
422
|
+
<div class="bg-white rounded-xl border-0.5px border-gray-200 px-3 py-2">
|
|
423
|
+
<div class="flex flex-wrap gap-6px">
|
|
424
|
+
<span
|
|
425
|
+
v-for="filter in formattedFilters"
|
|
426
|
+
:key="filter"
|
|
427
|
+
class="text-12px px-8px py-3px rounded-6px bg-gray-100 text-gray-700"
|
|
428
|
+
>
|
|
429
|
+
{{ filter }}
|
|
430
|
+
</span>
|
|
431
|
+
<span
|
|
432
|
+
v-for="query in formattedOutputQuery"
|
|
433
|
+
:key="query"
|
|
434
|
+
class="text-12px px-8px py-3px rounded-6px bg-blue-100 text-blue-700"
|
|
435
|
+
>
|
|
436
|
+
{{ query }}
|
|
437
|
+
</span>
|
|
438
|
+
<span
|
|
439
|
+
v-if="!formattedFilters && !formattedOutputQuery"
|
|
440
|
+
class="text-12px text-gray-400 italic"
|
|
441
|
+
>
|
|
442
|
+
Nenhum filtro aplicado
|
|
443
|
+
</span>
|
|
444
|
+
</div>
|
|
445
|
+
</div>
|
|
446
|
+
</div>
|
|
447
|
+
|
|
448
|
+
<!-- Error display -->
|
|
449
|
+
<div v-if="toolResult?.isError">
|
|
450
|
+
<div class="text-14px font-580 leading-16px tracking-[-0.15px] text-gray-700 mb-2">
|
|
451
|
+
Erro
|
|
452
|
+
</div>
|
|
453
|
+
<div class="bg-white rounded-xl border-0.5px border-gray-200 px-3 py-2">
|
|
454
|
+
<p class="text-14px text-red-600 whitespace-pre-wrap break-words m-0">
|
|
455
|
+
{{ toolResult.output }}
|
|
456
|
+
</p>
|
|
457
|
+
</div>
|
|
458
|
+
</div>
|
|
459
|
+
|
|
460
|
+
<!-- Results section -->
|
|
461
|
+
<div v-else-if="parsedResult">
|
|
462
|
+
<div class="flex items-center justify-between mb-2">
|
|
463
|
+
<div class="text-14px font-580 leading-16px tracking-[-0.15px] text-gray-700">
|
|
464
|
+
Resultados
|
|
465
|
+
</div>
|
|
466
|
+
<div class="text-12px text-gray-500">
|
|
467
|
+
Mostrando {{ parsedResult.showingTasks }} de {{ parsedResult.totalTasks }}
|
|
468
|
+
<span v-if="parsedResult.totalPages > 1">
|
|
469
|
+
(página {{ parsedResult.page }}/{{ parsedResult.totalPages }})
|
|
470
|
+
</span>
|
|
471
|
+
</div>
|
|
472
|
+
</div>
|
|
473
|
+
|
|
474
|
+
<!-- Tasks list -->
|
|
475
|
+
<div class="bg-white rounded-xl border-0.5px border-gray-200 overflow-hidden">
|
|
476
|
+
<div v-if="parsedResult.tasks.length > 0" class="divide-y divide-gray-100 max-h-400px overflow-y-auto">
|
|
477
|
+
<div
|
|
478
|
+
v-for="task in parsedResult.tasks"
|
|
479
|
+
:key="task.id"
|
|
480
|
+
class="p-12px cursor-pointer hover:bg-gray-50 transition-colors"
|
|
481
|
+
:class="selectedTask?.id === task.id && 'bg-blue-50'"
|
|
482
|
+
@click="selectedTask = selectedTask?.id === task.id ? null : task"
|
|
483
|
+
>
|
|
484
|
+
<div class="flex items-start justify-between gap-8px">
|
|
485
|
+
<div class="flex-1 min-w-0">
|
|
486
|
+
<div class="flex items-center gap-8px mb-4px">
|
|
487
|
+
<span
|
|
488
|
+
class="text-10px font-medium px-6px py-2px rounded-4px"
|
|
489
|
+
:class="getStatusColor(task.status)"
|
|
490
|
+
>
|
|
491
|
+
{{ getStatusLabel(task.status) }}
|
|
492
|
+
</span>
|
|
493
|
+
<span class="text-11px text-gray-400">
|
|
494
|
+
{{ formatDateTime(task.createdAt) }}
|
|
495
|
+
</span>
|
|
496
|
+
</div>
|
|
497
|
+
<h4 class="text-14px font-medium text-gray-900 truncate">
|
|
498
|
+
{{ task.name }}
|
|
499
|
+
</h4>
|
|
500
|
+
</div>
|
|
501
|
+
<div
|
|
502
|
+
class="i-ph-caret-down text-14px text-gray-400 transition-transform flex-shrink-0"
|
|
503
|
+
:class="selectedTask?.id === task.id && 'rotate-180'"
|
|
504
|
+
/>
|
|
505
|
+
</div>
|
|
506
|
+
|
|
507
|
+
<!-- Expanded task details -->
|
|
508
|
+
<div
|
|
509
|
+
v-if="selectedTask?.id === task.id && Object.keys(task.output).length > 0"
|
|
510
|
+
class="mt-10px pt-10px border-t border-gray-200"
|
|
511
|
+
>
|
|
512
|
+
<div class="text-11px font-medium text-gray-500 uppercase tracking-wide mb-6px">
|
|
513
|
+
Dados extraídos
|
|
514
|
+
</div>
|
|
515
|
+
<div class="grid gap-4px">
|
|
516
|
+
<div
|
|
517
|
+
v-for="(value, key) in task.output"
|
|
518
|
+
:key="key"
|
|
519
|
+
class="flex items-start gap-8px text-12px"
|
|
520
|
+
>
|
|
521
|
+
<span class="font-medium text-gray-600 min-w-80px">{{ key }}:</span>
|
|
522
|
+
<span class="text-gray-800 break-words">
|
|
523
|
+
{{ typeof value === "object" ? JSON.stringify(value) : value }}
|
|
524
|
+
</span>
|
|
525
|
+
</div>
|
|
526
|
+
</div>
|
|
527
|
+
</div>
|
|
528
|
+
</div>
|
|
529
|
+
</div>
|
|
530
|
+
|
|
531
|
+
<!-- No results message -->
|
|
532
|
+
<div v-else class="text-center py-32px px-16px">
|
|
533
|
+
<div class="i-ph-magnifying-glass text-40px text-gray-300 mx-auto mb-8px" />
|
|
534
|
+
<p class="text-14px text-gray-500">
|
|
535
|
+
Nenhuma tarefa encontrada com os filtros aplicados
|
|
536
|
+
</p>
|
|
537
|
+
</div>
|
|
538
|
+
</div>
|
|
539
|
+
</div>
|
|
540
|
+
|
|
541
|
+
<!-- Raw output fallback (hide for launch messages) -->
|
|
542
|
+
<div v-else-if="toolResult && !isLaunchMessage">
|
|
543
|
+
<div class="text-14px font-580 leading-16px tracking-[-0.15px] text-gray-700 mb-2">
|
|
544
|
+
Resultado
|
|
545
|
+
</div>
|
|
546
|
+
<div class="bg-white rounded-xl border-0.5px border-gray-200 px-3 py-2">
|
|
547
|
+
<pre class="text-14px text-primary whitespace-pre-wrap break-words m-0">{{ toolResult.output }}</pre>
|
|
548
|
+
</div>
|
|
549
|
+
</div>
|
|
550
|
+
</div>
|
|
551
|
+
</div>
|
|
552
|
+
</template>
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import type { ToolUse, ToolResult } from '../../types/reasoning.js';
|
|
2
|
+
type __VLS_Props = {
|
|
3
|
+
toolUse: ToolUse;
|
|
4
|
+
toolResult?: ToolResult;
|
|
5
|
+
isActive?: boolean;
|
|
6
|
+
isBashExecution?: boolean;
|
|
7
|
+
};
|
|
8
|
+
declare const __VLS_export: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
9
|
+
declare const _default: typeof __VLS_export;
|
|
10
|
+
export default _default;
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import type { KnowledgeSource } from '../../types/chat.js';
|
|
2
|
+
type __VLS_Props = {
|
|
3
|
+
open: boolean;
|
|
4
|
+
knowledgeSources: readonly KnowledgeSource[] | KnowledgeSource[] | null;
|
|
5
|
+
};
|
|
6
|
+
declare const __VLS_export: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {} & {
|
|
7
|
+
close: () => any;
|
|
8
|
+
save: (sources: KnowledgeSource[]) => any;
|
|
9
|
+
}, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{
|
|
10
|
+
onClose?: (() => any) | undefined;
|
|
11
|
+
onSave?: ((sources: KnowledgeSource[]) => any) | undefined;
|
|
12
|
+
}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
13
|
+
declare const _default: typeof __VLS_export;
|
|
14
|
+
export default _default;
|