@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,313 @@
|
|
|
1
|
+
<script setup>
|
|
2
|
+
import { isVaultPermalink, FILE_ICONS, MIME_TO_EXTENSION, normalizeMimeType } from "../../utils/file";
|
|
3
|
+
const props = defineProps({
|
|
4
|
+
file: { type: Object, required: true }
|
|
5
|
+
});
|
|
6
|
+
const { getFileInfo, isVaultReference } = useVault();
|
|
7
|
+
const { getCached, setCache, fetchUrlWithMetadata, base64ToDataUrl } = useMediaCache();
|
|
8
|
+
const { openPreview } = useFilePreviewPanel();
|
|
9
|
+
const FILE_COLORS = {
|
|
10
|
+
default: { bg: "bg-gray-100", text: "text-gray-600", border: "border-gray-200" }
|
|
11
|
+
};
|
|
12
|
+
const resolvedUrl = ref();
|
|
13
|
+
const cachedBase64 = ref();
|
|
14
|
+
const originalFileName = ref();
|
|
15
|
+
const resolvedMimeType = ref();
|
|
16
|
+
const isLoading = ref(false);
|
|
17
|
+
const isHovered = ref(false);
|
|
18
|
+
const fileSize = ref();
|
|
19
|
+
const pdfTotalPages = ref();
|
|
20
|
+
const csvInfo = ref();
|
|
21
|
+
const textInfo = ref();
|
|
22
|
+
const effectiveMimeType = computed(() => resolvedMimeType.value ?? props.file.mimeType);
|
|
23
|
+
const normalizedMimeType = computed(() => normalizeMimeType(effectiveMimeType.value));
|
|
24
|
+
const iconSrc = computed(() => FILE_ICONS[normalizedMimeType.value] ?? FILE_ICONS.unknown);
|
|
25
|
+
const fileColors = computed(() => FILE_COLORS.default ?? { bg: "bg-gray-100", text: "text-gray-600", border: "border-gray-200" });
|
|
26
|
+
const isPdf = computed(() => normalizedMimeType.value === "application/pdf");
|
|
27
|
+
const isImage = computed(() => normalizedMimeType.value.startsWith("image/"));
|
|
28
|
+
const isVideo = computed(() => normalizedMimeType.value.startsWith("video/"));
|
|
29
|
+
const isAudio = computed(() => normalizedMimeType.value.startsWith("audio/"));
|
|
30
|
+
const isCsv = computed(() => normalizedMimeType.value === "text/csv");
|
|
31
|
+
const isJson = computed(() => normalizedMimeType.value === "application/json");
|
|
32
|
+
const isText = computed(() => normalizedMimeType.value.startsWith("text/") && !isCsv.value || isJson.value);
|
|
33
|
+
const initialPage = computed(() => props.file.hashParams?.pageNumber);
|
|
34
|
+
const hasInlinePreview = computed(() => isPdf.value || isImage.value || isVideo.value || isAudio.value || isCsv.value || isText.value);
|
|
35
|
+
const effectiveUrl = computed(() => {
|
|
36
|
+
if (cachedBase64.value && normalizedMimeType.value)
|
|
37
|
+
return base64ToDataUrl(cachedBase64.value, normalizedMimeType.value);
|
|
38
|
+
return resolvedUrl.value;
|
|
39
|
+
});
|
|
40
|
+
const displayName = computed(() => {
|
|
41
|
+
const name = props.file.hashParams?.filename ?? originalFileName.value ?? props.file.name;
|
|
42
|
+
const hasExtension = /\.[a-zA-Z0-9]+$/.test(name);
|
|
43
|
+
if (hasExtension)
|
|
44
|
+
return name;
|
|
45
|
+
const ext = MIME_TO_EXTENSION[normalizedMimeType.value];
|
|
46
|
+
return ext ? `${name}.${ext}` : name;
|
|
47
|
+
});
|
|
48
|
+
const shortName = computed(() => {
|
|
49
|
+
const name = displayName.value;
|
|
50
|
+
if (name.length <= 24)
|
|
51
|
+
return name;
|
|
52
|
+
const ext = name.split(".").pop() ?? "";
|
|
53
|
+
const baseName = name.slice(0, name.length - ext.length - 1);
|
|
54
|
+
return `${baseName.slice(0, 16)}...${ext ? `.${ext}` : ""}`;
|
|
55
|
+
});
|
|
56
|
+
const fileExtension = computed(() => {
|
|
57
|
+
const parts = displayName.value.split(".");
|
|
58
|
+
return parts.length > 1 ? parts.pop()?.toUpperCase() : "ARQUIVO";
|
|
59
|
+
});
|
|
60
|
+
const formattedSize = computed(() => {
|
|
61
|
+
if (!fileSize.value)
|
|
62
|
+
return null;
|
|
63
|
+
const bytes = fileSize.value;
|
|
64
|
+
if (bytes < 1024)
|
|
65
|
+
return `${bytes} B`;
|
|
66
|
+
if (bytes < 1024 * 1024)
|
|
67
|
+
return `${(bytes / 1024).toFixed(1)} KB`;
|
|
68
|
+
return `${(bytes / (1024 * 1024)).toFixed(1)} MB`;
|
|
69
|
+
});
|
|
70
|
+
async function resolveVaultUrl() {
|
|
71
|
+
const reference = props.file.reference;
|
|
72
|
+
const cleanReference = reference.split("#")[0] ?? reference;
|
|
73
|
+
isLoading.value = true;
|
|
74
|
+
const cacheKey = cleanReference;
|
|
75
|
+
try {
|
|
76
|
+
const cached = await getCached(cacheKey);
|
|
77
|
+
if (cached) {
|
|
78
|
+
cachedBase64.value = cached;
|
|
79
|
+
}
|
|
80
|
+
if (!isVaultReference(cleanReference)) {
|
|
81
|
+
if (isVaultPermalink(reference)) {
|
|
82
|
+
try {
|
|
83
|
+
const metadata = await $fetch("/api/vault/permalink-metadata", {
|
|
84
|
+
method: "POST",
|
|
85
|
+
body: { url: reference }
|
|
86
|
+
});
|
|
87
|
+
if (metadata.mimeType)
|
|
88
|
+
resolvedMimeType.value = metadata.mimeType;
|
|
89
|
+
if (metadata.fileSize)
|
|
90
|
+
fileSize.value = metadata.fileSize;
|
|
91
|
+
if (metadata.originalFileName)
|
|
92
|
+
originalFileName.value = metadata.originalFileName;
|
|
93
|
+
resolvedUrl.value = reference;
|
|
94
|
+
} catch (err) {
|
|
95
|
+
console.error("[FilePreview] Failed to fetch permalink metadata", err);
|
|
96
|
+
resolvedUrl.value = reference;
|
|
97
|
+
}
|
|
98
|
+
return;
|
|
99
|
+
}
|
|
100
|
+
resolvedUrl.value = reference;
|
|
101
|
+
if (!cached) {
|
|
102
|
+
fetchUrlWithMetadata(reference).then(({ base64, mimeType }) => {
|
|
103
|
+
cachedBase64.value = base64;
|
|
104
|
+
setCache(cacheKey, base64);
|
|
105
|
+
if (mimeType)
|
|
106
|
+
resolvedMimeType.value = mimeType;
|
|
107
|
+
}).catch((err) => console.error("[MediaCache] Failed to cache file", err));
|
|
108
|
+
}
|
|
109
|
+
return;
|
|
110
|
+
}
|
|
111
|
+
const fileInfo = await getFileInfo(cleanReference);
|
|
112
|
+
resolvedUrl.value = fileInfo.url;
|
|
113
|
+
originalFileName.value = fileInfo.originalFileName;
|
|
114
|
+
resolvedMimeType.value = fileInfo.mimeType;
|
|
115
|
+
if (fileInfo.url && !cached) {
|
|
116
|
+
fetchUrlWithMetadata(fileInfo.url).then(({ base64, mimeType }) => {
|
|
117
|
+
cachedBase64.value = base64;
|
|
118
|
+
setCache(cacheKey, base64);
|
|
119
|
+
if (mimeType && !resolvedMimeType.value)
|
|
120
|
+
resolvedMimeType.value = mimeType;
|
|
121
|
+
}).catch((err) => console.error("[MediaCache] Failed to cache file", err));
|
|
122
|
+
}
|
|
123
|
+
} catch (error) {
|
|
124
|
+
console.error("Failed to resolve vault URL:", error);
|
|
125
|
+
resolvedUrl.value = void 0;
|
|
126
|
+
} finally {
|
|
127
|
+
isLoading.value = false;
|
|
128
|
+
}
|
|
129
|
+
}
|
|
130
|
+
watch(() => props.file.reference, resolveVaultUrl, { immediate: true });
|
|
131
|
+
function openSidePanel() {
|
|
132
|
+
if (!effectiveUrl.value)
|
|
133
|
+
return;
|
|
134
|
+
openPreview({
|
|
135
|
+
file: props.file,
|
|
136
|
+
resolvedUrl: resolvedUrl.value,
|
|
137
|
+
cachedBase64: cachedBase64.value,
|
|
138
|
+
originalFileName: originalFileName.value,
|
|
139
|
+
resolvedMimeType: resolvedMimeType.value,
|
|
140
|
+
fileSize: fileSize.value,
|
|
141
|
+
pdfTotalPages: pdfTotalPages.value,
|
|
142
|
+
csvInfo: csvInfo.value,
|
|
143
|
+
textInfo: textInfo.value
|
|
144
|
+
});
|
|
145
|
+
}
|
|
146
|
+
function onPdfLoaded(data) {
|
|
147
|
+
pdfTotalPages.value = data.totalPages;
|
|
148
|
+
}
|
|
149
|
+
function onCsvLoaded(data) {
|
|
150
|
+
csvInfo.value = data;
|
|
151
|
+
}
|
|
152
|
+
function onTextLoaded(data) {
|
|
153
|
+
textInfo.value = data;
|
|
154
|
+
}
|
|
155
|
+
</script>
|
|
156
|
+
|
|
157
|
+
<template>
|
|
158
|
+
<div>
|
|
159
|
+
<!-- Wide Layout for files with inline preview -->
|
|
160
|
+
<div v-if="hasInlinePreview" class="w-full">
|
|
161
|
+
<!-- Header -->
|
|
162
|
+
<div class="flex items-center gap-12px p-12px rounded-t-16px" style="background-color: #F5F5F5;">
|
|
163
|
+
<!-- File Icon -->
|
|
164
|
+
<img :src="iconSrc" :alt="displayName" class="w-16px h-16px flex-shrink-0">
|
|
165
|
+
|
|
166
|
+
<!-- File Info -->
|
|
167
|
+
<div class="flex-1 min-w-0">
|
|
168
|
+
<p class="text-14px font-medium text-gray-900 truncate">
|
|
169
|
+
{{ displayName }}
|
|
170
|
+
</p>
|
|
171
|
+
<p class="text-12px text-gray-500">
|
|
172
|
+
<span v-if="isPdf && pdfTotalPages">{{ pdfTotalPages }} páginas</span>
|
|
173
|
+
<span v-else-if="isCsv && csvInfo">{{ csvInfo.totalRows }} linhas · {{ csvInfo.totalColumns }} colunas</span>
|
|
174
|
+
<span v-else-if="isText && textInfo">{{ textInfo.totalLines }} linhas</span>
|
|
175
|
+
<span v-if="(isPdf && pdfTotalPages || isCsv && csvInfo || isText && textInfo) && formattedSize"> · </span>
|
|
176
|
+
<span v-if="formattedSize">{{ formattedSize }}</span>
|
|
177
|
+
<span v-if="isLoading">Carregando...</span>
|
|
178
|
+
</p>
|
|
179
|
+
</div>
|
|
180
|
+
|
|
181
|
+
<!-- Visualizar Button -->
|
|
182
|
+
<TelaButton
|
|
183
|
+
variant="secondary"
|
|
184
|
+
:disabled="isLoading || !effectiveUrl"
|
|
185
|
+
@click="openSidePanel"
|
|
186
|
+
>
|
|
187
|
+
Visualizar
|
|
188
|
+
</TelaButton>
|
|
189
|
+
</div>
|
|
190
|
+
|
|
191
|
+
<!-- Preview Content -->
|
|
192
|
+
<div v-if="effectiveUrl" class="rounded-b-16px overflow-hidden" style="background-color: #F5F5F5;">
|
|
193
|
+
<!-- PDF Preview -->
|
|
194
|
+
<PdfPreview
|
|
195
|
+
v-if="isPdf"
|
|
196
|
+
:url="effectiveUrl"
|
|
197
|
+
:initial-page="initialPage"
|
|
198
|
+
:max-height="300"
|
|
199
|
+
:clickable="false"
|
|
200
|
+
@loaded="onPdfLoaded"
|
|
201
|
+
@click="openSidePanel"
|
|
202
|
+
/>
|
|
203
|
+
|
|
204
|
+
<!-- Image Preview -->
|
|
205
|
+
<ImagePreview
|
|
206
|
+
v-else-if="isImage"
|
|
207
|
+
:url="effectiveUrl"
|
|
208
|
+
:max-height="300"
|
|
209
|
+
:clickable="false"
|
|
210
|
+
@click="openSidePanel"
|
|
211
|
+
/>
|
|
212
|
+
|
|
213
|
+
<!-- Video Preview -->
|
|
214
|
+
<VideoPreview
|
|
215
|
+
v-else-if="isVideo"
|
|
216
|
+
:url="effectiveUrl"
|
|
217
|
+
:max-height="300"
|
|
218
|
+
:clickable="false"
|
|
219
|
+
@click="openSidePanel"
|
|
220
|
+
/>
|
|
221
|
+
|
|
222
|
+
<!-- Audio Preview -->
|
|
223
|
+
<AudioPreview
|
|
224
|
+
v-else-if="isAudio"
|
|
225
|
+
:url="effectiveUrl"
|
|
226
|
+
:name="displayName"
|
|
227
|
+
:clickable="false"
|
|
228
|
+
@click="openSidePanel"
|
|
229
|
+
/>
|
|
230
|
+
|
|
231
|
+
<!-- CSV Preview -->
|
|
232
|
+
<CsvPreview
|
|
233
|
+
v-else-if="isCsv"
|
|
234
|
+
:url="effectiveUrl"
|
|
235
|
+
:max-height="300"
|
|
236
|
+
:clickable="false"
|
|
237
|
+
@loaded="onCsvLoaded"
|
|
238
|
+
@click="openSidePanel"
|
|
239
|
+
/>
|
|
240
|
+
|
|
241
|
+
<!-- Text Preview -->
|
|
242
|
+
<TextPreview
|
|
243
|
+
v-else-if="isText"
|
|
244
|
+
:url="effectiveUrl"
|
|
245
|
+
:mime-type="normalizedMimeType"
|
|
246
|
+
:max-height="300"
|
|
247
|
+
:clickable="false"
|
|
248
|
+
@loaded="onTextLoaded"
|
|
249
|
+
@click="openSidePanel"
|
|
250
|
+
/>
|
|
251
|
+
</div>
|
|
252
|
+
</div>
|
|
253
|
+
|
|
254
|
+
<!-- Regular File Card (for unsupported types) -->
|
|
255
|
+
<button
|
|
256
|
+
v-else
|
|
257
|
+
type="button"
|
|
258
|
+
class="group relative w-140px rounded-12px border overflow-hidden transition-all duration-200"
|
|
259
|
+
:class="[
|
|
260
|
+
fileColors.border,
|
|
261
|
+
isLoading || !effectiveUrl ? 'opacity-50 cursor-not-allowed' : 'cursor-pointer hover:shadow-md hover:scale-102'
|
|
262
|
+
]"
|
|
263
|
+
:disabled="isLoading || !effectiveUrl"
|
|
264
|
+
@mouseenter="isHovered = true"
|
|
265
|
+
@mouseleave="isHovered = false"
|
|
266
|
+
@click="openSidePanel"
|
|
267
|
+
>
|
|
268
|
+
<!-- Thumbnail Area -->
|
|
269
|
+
<div
|
|
270
|
+
class="relative h-80px flex items-center justify-center overflow-hidden bg-gray-100"
|
|
271
|
+
>
|
|
272
|
+
<!-- Loading State -->
|
|
273
|
+
<div v-if="isLoading" class="flex items-center justify-center w-full h-full">
|
|
274
|
+
<TelaSkeleton class="rounded-8px" style="width: 120px; height: 60px;" />
|
|
275
|
+
</div>
|
|
276
|
+
|
|
277
|
+
<!-- File Icon -->
|
|
278
|
+
<div v-else class="flex flex-col items-center gap-4px">
|
|
279
|
+
<img :src="iconSrc" :alt="displayName" class="w-32px h-32px">
|
|
280
|
+
<span class="text-10px font-bold uppercase tracking-wide px-6px py-2px rounded-4px bg-white/80 text-gray-600">
|
|
281
|
+
{{ fileExtension }}
|
|
282
|
+
</span>
|
|
283
|
+
</div>
|
|
284
|
+
|
|
285
|
+
<!-- Hover Overlay -->
|
|
286
|
+
<Transition name="fade">
|
|
287
|
+
<div
|
|
288
|
+
v-if="isHovered && !isLoading && effectiveUrl"
|
|
289
|
+
class="absolute inset-0 bg-black/50 flex items-center justify-center"
|
|
290
|
+
>
|
|
291
|
+
<div class="w-36px h-36px rounded-full bg-white flex items-center justify-center shadow-lg">
|
|
292
|
+
<span class="i-ph-eye text-18px text-gray-700" />
|
|
293
|
+
</div>
|
|
294
|
+
</div>
|
|
295
|
+
</Transition>
|
|
296
|
+
</div>
|
|
297
|
+
|
|
298
|
+
<!-- File Info -->
|
|
299
|
+
<div class="px-10px py-8px bg-white">
|
|
300
|
+
<p class="text-12px font-medium text-gray-800 truncate text-left">
|
|
301
|
+
{{ shortName }}
|
|
302
|
+
</p>
|
|
303
|
+
<p v-if="formattedSize" class="text-10px text-gray-400 text-left mt-2px">
|
|
304
|
+
{{ formattedSize }}
|
|
305
|
+
</p>
|
|
306
|
+
</div>
|
|
307
|
+
</button>
|
|
308
|
+
</div>
|
|
309
|
+
</template>
|
|
310
|
+
|
|
311
|
+
<style scoped>
|
|
312
|
+
.fade-enter-active,.fade-leave-active{transition:opacity .15s ease}.fade-enter-from,.fade-leave-to{opacity:0}.hover\:scale-102:hover{transform:scale(1.02)}
|
|
313
|
+
</style>
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import type { DetectedFile } from '../../utils/file.js';
|
|
2
|
+
type __VLS_Props = {
|
|
3
|
+
file: DetectedFile;
|
|
4
|
+
};
|
|
5
|
+
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>;
|
|
6
|
+
declare const _default: typeof __VLS_export;
|
|
7
|
+
export default _default;
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
type __VLS_Props = {
|
|
2
|
+
conversationId: string;
|
|
3
|
+
};
|
|
4
|
+
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>;
|
|
5
|
+
declare const _default: typeof __VLS_export;
|
|
6
|
+
export default _default;
|