@meistrari/chat-nuxt 3.0.0 → 3.1.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.
Files changed (201) hide show
  1. package/dist/module.d.mts +2 -1
  2. package/dist/module.json +1 -1
  3. package/dist/runtime/conversations/components/chat-conversation-creator-filter.d.vue.ts +1 -1
  4. package/dist/runtime/conversations/components/chat-conversation-creator-filter.vue.d.ts +1 -1
  5. package/dist/runtime/conversations/components/chat-conversation-item.d.vue.ts +3 -3
  6. package/dist/runtime/conversations/components/chat-conversation-item.vue.d.ts +3 -3
  7. package/dist/runtime/conversations/components/chat-conversation-list.d.vue.ts +1 -1
  8. package/dist/runtime/conversations/components/chat-conversation-list.vue.d.ts +1 -1
  9. package/dist/runtime/conversations/components/chat-conversation-new-group-button.d.vue.ts +1 -1
  10. package/dist/runtime/conversations/components/chat-conversation-new-group-button.vue.d.ts +1 -1
  11. package/dist/runtime/conversations/components/chat-conversation-new-group-popover-content.d.vue.ts +4 -4
  12. package/dist/runtime/conversations/components/chat-conversation-new-group-popover-content.vue.d.ts +4 -4
  13. package/dist/runtime/conversations/components/chat-conversation-search.d.vue.ts +3 -3
  14. package/dist/runtime/conversations/components/chat-conversation-search.vue.d.ts +3 -3
  15. package/dist/runtime/conversations/components/chat-new-conversation-modal.d.vue.ts +23 -5
  16. package/dist/runtime/conversations/components/chat-new-conversation-modal.vue.d.ts +23 -5
  17. package/dist/runtime/conversations/composables/conversation-list.d.ts +58 -1
  18. package/dist/runtime/embed/components/chat-configuration-modal.d.vue.ts +3 -3
  19. package/dist/runtime/embed/components/chat-configuration-modal.vue +59 -176
  20. package/dist/runtime/embed/components/chat-configuration-modal.vue.d.ts +3 -3
  21. package/dist/runtime/embed/components/chat-embed-inner.d.vue.ts +3 -3
  22. package/dist/runtime/embed/components/chat-embed-inner.vue.d.ts +3 -3
  23. package/dist/runtime/embed/components/chat-embed.d.vue.ts +3 -3
  24. package/dist/runtime/embed/components/chat-embed.vue.d.ts +3 -3
  25. package/dist/runtime/embed/components/chat-topbar.d.vue.ts +5 -5
  26. package/dist/runtime/embed/components/chat-topbar.vue.d.ts +5 -5
  27. package/dist/runtime/embed/components/configuration/chat-configuration-agent-tab.d.vue.ts +13 -0
  28. package/dist/runtime/embed/components/configuration/chat-configuration-agent-tab.vue +167 -0
  29. package/dist/runtime/embed/components/configuration/chat-configuration-agent-tab.vue.d.ts +13 -0
  30. package/dist/runtime/embed/components/configuration/chat-configuration-credentials-tab.d.vue.ts +3 -3
  31. package/dist/runtime/embed/components/configuration/chat-configuration-credentials-tab.vue.d.ts +3 -3
  32. package/dist/runtime/embed/components/configuration/chat-configuration-knowledge-sources-tab.d.vue.ts +5 -5
  33. package/dist/runtime/embed/components/configuration/chat-configuration-knowledge-sources-tab.vue.d.ts +5 -5
  34. package/dist/runtime/embed/components/configuration/chat-configuration-mobile-shell.d.vue.ts +3 -3
  35. package/dist/runtime/embed/components/configuration/chat-configuration-mobile-shell.vue.d.ts +3 -3
  36. package/dist/runtime/embed/components/mobile/chat-mobile-bottom-sheet.d.vue.ts +3 -3
  37. package/dist/runtime/embed/components/mobile/chat-mobile-bottom-sheet.vue.d.ts +3 -3
  38. package/dist/runtime/embed/components/mobile/chat-mobile-drawer.d.vue.ts +3 -3
  39. package/dist/runtime/embed/components/mobile/chat-mobile-drawer.vue.d.ts +3 -3
  40. package/dist/runtime/embed/components/mobile/chat-mobile-file-preview.d.vue.ts +3 -3
  41. package/dist/runtime/embed/components/mobile/chat-mobile-file-preview.vue.d.ts +3 -3
  42. package/dist/runtime/embed/components/mobile/chat-mobile-files-view.d.vue.ts +3 -3
  43. package/dist/runtime/embed/components/mobile/chat-mobile-files-view.vue.d.ts +3 -3
  44. package/dist/runtime/embed/components/mobile/chat-mobile-header.d.vue.ts +5 -5
  45. package/dist/runtime/embed/components/mobile/chat-mobile-header.vue.d.ts +5 -5
  46. package/dist/runtime/embed/components/mobile/chat-mobile-home-header.d.vue.ts +3 -3
  47. package/dist/runtime/embed/components/mobile/chat-mobile-home-header.vue.d.ts +3 -3
  48. package/dist/runtime/embed/components/mobile/chat-mobile-home-recents.d.vue.ts +3 -3
  49. package/dist/runtime/embed/components/mobile/chat-mobile-home-recents.vue.d.ts +3 -3
  50. package/dist/runtime/embed/components/mobile/chat-mobile-home-suggestions.d.vue.ts +3 -3
  51. package/dist/runtime/embed/components/mobile/chat-mobile-home-suggestions.vue.d.ts +3 -3
  52. package/dist/runtime/embed/components/mobile/chat-mobile-info-bubble.d.vue.ts +1 -1
  53. package/dist/runtime/embed/components/mobile/chat-mobile-info-bubble.vue.d.ts +1 -1
  54. package/dist/runtime/embed/components/mobile/chat-mobile-outdated-settings-sheet.d.vue.ts +3 -3
  55. package/dist/runtime/embed/components/mobile/chat-mobile-outdated-settings-sheet.vue.d.ts +3 -3
  56. package/dist/runtime/embed/components/mobile/chat-mobile-shell.d.vue.ts +41 -9
  57. package/dist/runtime/embed/components/mobile/chat-mobile-shell.vue.d.ts +41 -9
  58. package/dist/runtime/embed/components/mobile/chat-mobile-usage-view.d.vue.ts +1 -1
  59. package/dist/runtime/embed/components/mobile/chat-mobile-usage-view.vue.d.ts +1 -1
  60. package/dist/runtime/embed/components/mobile/chat-mobile-workspace-sheet.d.vue.ts +3 -3
  61. package/dist/runtime/embed/components/mobile/chat-mobile-workspace-sheet.vue.d.ts +3 -3
  62. package/dist/runtime/embed/components/powered-by-tela.d.vue.ts +1 -1
  63. package/dist/runtime/embed/components/powered-by-tela.vue.d.ts +1 -1
  64. package/dist/runtime/files/components/audio-preview.d.vue.ts +3 -3
  65. package/dist/runtime/files/components/audio-preview.vue.d.ts +3 -3
  66. package/dist/runtime/files/components/chat-file-preview.d.vue.ts +1 -1
  67. package/dist/runtime/files/components/chat-file-preview.vue.d.ts +1 -1
  68. package/dist/runtime/files/components/chat-files-view.d.vue.ts +1 -1
  69. package/dist/runtime/files/components/chat-files-view.vue.d.ts +1 -1
  70. package/dist/runtime/files/components/chat-vault-link.d.vue.ts +1 -1
  71. package/dist/runtime/files/components/chat-vault-link.vue.d.ts +1 -1
  72. package/dist/runtime/files/components/conversation-files-panel.d.vue.ts +1 -1
  73. package/dist/runtime/files/components/conversation-files-panel.vue.d.ts +1 -1
  74. package/dist/runtime/files/components/csv-preview.d.vue.ts +3 -3
  75. package/dist/runtime/files/components/csv-preview.vue.d.ts +3 -3
  76. package/dist/runtime/files/components/file-preview-panel.d.vue.ts +1 -1
  77. package/dist/runtime/files/components/file-preview-panel.vue.d.ts +1 -1
  78. package/dist/runtime/files/components/file-uploader.d.vue.ts +3 -3
  79. package/dist/runtime/files/components/file-uploader.vue.d.ts +3 -3
  80. package/dist/runtime/files/components/image-preview.d.vue.ts +3 -3
  81. package/dist/runtime/files/components/image-preview.vue.d.ts +3 -3
  82. package/dist/runtime/files/components/pdf-preview.client.d.vue.ts +3 -3
  83. package/dist/runtime/files/components/pdf-preview.client.vue.d.ts +3 -3
  84. package/dist/runtime/files/components/pdf-viewer.client.d.vue.ts +1 -1
  85. package/dist/runtime/files/components/pdf-viewer.client.vue.d.ts +1 -1
  86. package/dist/runtime/files/components/text-preview.d.vue.ts +3 -3
  87. package/dist/runtime/files/components/text-preview.vue.d.ts +3 -3
  88. package/dist/runtime/files/components/video-preview.d.vue.ts +3 -3
  89. package/dist/runtime/files/components/video-preview.vue.d.ts +3 -3
  90. package/dist/runtime/files/composables/pdf.d.ts +248 -27
  91. package/dist/runtime/files/file-limits.d.ts +2 -0
  92. package/dist/runtime/files/file-limits.js +2 -0
  93. package/dist/runtime/messages/components/chat-canvas-selector-modal.d.vue.ts +23 -5
  94. package/dist/runtime/messages/components/chat-canvas-selector-modal.vue.d.ts +23 -5
  95. package/dist/runtime/messages/components/chat-context-config.d.vue.ts +52 -10
  96. package/dist/runtime/messages/components/chat-context-config.vue +2 -2
  97. package/dist/runtime/messages/components/chat-context-config.vue.d.ts +52 -10
  98. package/dist/runtime/messages/components/chat-mention-dropdown.d.vue.ts +27 -5
  99. package/dist/runtime/messages/components/chat-mention-dropdown.vue.d.ts +27 -5
  100. package/dist/runtime/messages/components/chat-message-bubble.d.vue.ts +3 -3
  101. package/dist/runtime/messages/components/chat-message-bubble.vue.d.ts +3 -3
  102. package/dist/runtime/messages/components/chat-message-feedback.d.vue.ts +1 -1
  103. package/dist/runtime/messages/components/chat-message-feedback.vue.d.ts +1 -1
  104. package/dist/runtime/messages/components/chat-message-input.d.vue.ts +38 -6
  105. package/dist/runtime/messages/components/chat-message-input.vue +1 -1
  106. package/dist/runtime/messages/components/chat-message-input.vue.d.ts +38 -6
  107. package/dist/runtime/messages/components/chat-message-list.d.vue.ts +3 -3
  108. package/dist/runtime/messages/components/chat-message-list.vue.d.ts +3 -3
  109. package/dist/runtime/messages/components/chat-workstation-selector-modal.d.vue.ts +19 -5
  110. package/dist/runtime/messages/components/chat-workstation-selector-modal.vue.d.ts +19 -5
  111. package/dist/runtime/messages/components/reasoning/chat-reasoning-message.d.vue.ts +1 -1
  112. package/dist/runtime/messages/components/reasoning/chat-reasoning-message.vue.d.ts +1 -1
  113. package/dist/runtime/messages/components/reasoning/chat-reasoning-step-item.d.vue.ts +4 -4
  114. package/dist/runtime/messages/components/reasoning/chat-reasoning-step-item.vue.d.ts +4 -4
  115. package/dist/runtime/messages/components/reasoning/chat-reasoning-steps.d.vue.ts +2 -2
  116. package/dist/runtime/messages/components/reasoning/chat-reasoning-steps.vue.d.ts +2 -2
  117. package/dist/runtime/messages/components/reasoning/chat-reasoning-thought.d.vue.ts +1 -1
  118. package/dist/runtime/messages/components/reasoning/chat-reasoning-thought.vue.d.ts +1 -1
  119. package/dist/runtime/messages/components/reasoning/chat-thinking-indicator.d.vue.ts +1 -1
  120. package/dist/runtime/messages/components/reasoning/chat-thinking-indicator.vue.d.ts +1 -1
  121. package/dist/runtime/messages/components/widgets/chat-bash-widget.d.vue.ts +1 -1
  122. package/dist/runtime/messages/components/widgets/chat-bash-widget.vue.d.ts +1 -1
  123. package/dist/runtime/messages/components/widgets/chat-doc-sdk-widget.d.vue.ts +1 -1
  124. package/dist/runtime/messages/components/widgets/chat-doc-sdk-widget.vue.d.ts +1 -1
  125. package/dist/runtime/messages/components/widgets/chat-generic-tool-widget.d.vue.ts +1 -1
  126. package/dist/runtime/messages/components/widgets/chat-generic-tool-widget.vue.d.ts +1 -1
  127. package/dist/runtime/messages/components/widgets/chat-grep-widget.d.vue.ts +1 -1
  128. package/dist/runtime/messages/components/widgets/chat-grep-widget.vue.d.ts +1 -1
  129. package/dist/runtime/messages/components/widgets/chat-read-widget.d.vue.ts +1 -1
  130. package/dist/runtime/messages/components/widgets/chat-read-widget.vue.d.ts +1 -1
  131. package/dist/runtime/messages/components/widgets/chat-tela-skill-widget.d.vue.ts +1 -1
  132. package/dist/runtime/messages/components/widgets/chat-tela-skill-widget.vue.d.ts +1 -1
  133. package/dist/runtime/messages/components/widgets/chat-thinking-widget.d.vue.ts +1 -1
  134. package/dist/runtime/messages/components/widgets/chat-thinking-widget.vue.d.ts +1 -1
  135. package/dist/runtime/messages/components/widgets/chat-web-search-widget.d.vue.ts +1 -1
  136. package/dist/runtime/messages/components/widgets/chat-web-search-widget.vue.d.ts +1 -1
  137. package/dist/runtime/messages/components/widgets/chat-workstation-query-widget.d.vue.ts +1 -1
  138. package/dist/runtime/messages/components/widgets/chat-workstation-query-widget.vue.d.ts +1 -1
  139. package/dist/runtime/messages/components/widgets/chat-write-widget.d.vue.ts +1 -1
  140. package/dist/runtime/messages/components/widgets/chat-write-widget.vue.d.ts +1 -1
  141. package/dist/runtime/messages/composables/chat.js +4 -3
  142. package/dist/runtime/rendering/components/app-markdown-render.d.vue.ts +2 -2
  143. package/dist/runtime/rendering/components/app-markdown-render.vue.d.ts +2 -2
  144. package/dist/runtime/rendering/components/renderers/artifact-display.d.vue.ts +3 -3
  145. package/dist/runtime/rendering/components/renderers/artifact-display.vue.d.ts +3 -3
  146. package/dist/runtime/rendering/components/renderers/audio-renderer.d.vue.ts +1 -1
  147. package/dist/runtime/rendering/components/renderers/audio-renderer.vue.d.ts +1 -1
  148. package/dist/runtime/rendering/components/renderers/csv-renderer.d.vue.ts +1 -1
  149. package/dist/runtime/rendering/components/renderers/csv-renderer.vue.d.ts +1 -1
  150. package/dist/runtime/rendering/components/renderers/image-renderer.d.vue.ts +1 -1
  151. package/dist/runtime/rendering/components/renderers/image-renderer.vue.d.ts +1 -1
  152. package/dist/runtime/rendering/components/renderers/markdown-renderer.d.vue.ts +1 -1
  153. package/dist/runtime/rendering/components/renderers/markdown-renderer.vue.d.ts +1 -1
  154. package/dist/runtime/rendering/components/renderers/mermaid-diagram.d.vue.ts +1 -1
  155. package/dist/runtime/rendering/components/renderers/mermaid-diagram.vue.d.ts +1 -1
  156. package/dist/runtime/rendering/components/renderers/text-renderer.d.vue.ts +1 -1
  157. package/dist/runtime/rendering/components/renderers/text-renderer.vue.d.ts +1 -1
  158. package/dist/runtime/rendering/components/renderers/video-renderer.d.vue.ts +1 -1
  159. package/dist/runtime/rendering/components/renderers/video-renderer.vue.d.ts +1 -1
  160. package/dist/runtime/shared/chat-api-error.d.ts +1 -0
  161. package/dist/runtime/shared/chat-api-error.js +5 -0
  162. package/dist/runtime/shared/components/app-status-toast.d.vue.ts +1 -1
  163. package/dist/runtime/shared/components/app-status-toast.vue.d.ts +1 -1
  164. package/dist/runtime/shared/components/icons/anthropic.d.vue.ts +1 -1
  165. package/dist/runtime/shared/components/icons/anthropic.vue.d.ts +1 -1
  166. package/dist/runtime/shared/components/icons/tela-chat.d.vue.ts +1 -1
  167. package/dist/runtime/shared/components/icons/tela-chat.vue.d.ts +1 -1
  168. package/dist/runtime/shared/components/icons/tela-wordmark.d.vue.ts +1 -1
  169. package/dist/runtime/shared/components/icons/tela-wordmark.vue.d.ts +1 -1
  170. package/dist/runtime/types/schemas/chat/workspace-agent.d.ts +33 -0
  171. package/dist/runtime/types/schemas/chat/workspace-agent.js +12 -0
  172. package/dist/runtime/types/schemas/index.d.ts +1 -0
  173. package/dist/runtime/types/schemas/index.js +1 -0
  174. package/dist/runtime/types/workspace-settings.d.ts +1 -1
  175. package/dist/runtime/usage/components/chat-usage-view.d.vue.ts +1 -1
  176. package/dist/runtime/usage/components/chat-usage-view.vue.d.ts +1 -1
  177. package/dist/runtime/workspace/composables/github-skills-callback.js +1 -1
  178. package/dist/runtime/workspace/composables/workspace-agent.d.ts +8 -0
  179. package/dist/runtime/workspace/composables/workspace-agent.js +89 -0
  180. package/dist/runtime/workspace/composables/workspace-settings.d.ts +42 -1
  181. package/package.json +15 -15
  182. package/dist/runtime/embed/components/configuration/chat-configuration-context-files-tab.d.vue.ts +0 -22
  183. package/dist/runtime/embed/components/configuration/chat-configuration-context-files-tab.vue +0 -133
  184. package/dist/runtime/embed/components/configuration/chat-configuration-context-files-tab.vue.d.ts +0 -22
  185. package/dist/runtime/embed/components/configuration/chat-configuration-external-skills-tab.d.vue.ts +0 -32
  186. package/dist/runtime/embed/components/configuration/chat-configuration-external-skills-tab.vue +0 -222
  187. package/dist/runtime/embed/components/configuration/chat-configuration-external-skills-tab.vue.d.ts +0 -32
  188. package/dist/runtime/embed/components/configuration/chat-configuration-personalization-tab.d.vue.ts +0 -10
  189. package/dist/runtime/embed/components/configuration/chat-configuration-personalization-tab.vue +0 -37
  190. package/dist/runtime/embed/components/configuration/chat-configuration-personalization-tab.vue.d.ts +0 -10
  191. package/dist/runtime/embed/components/configuration/chat-configuration-tela-tools-tab.d.vue.ts +0 -20
  192. package/dist/runtime/embed/components/configuration/chat-configuration-tela-tools-tab.vue +0 -146
  193. package/dist/runtime/embed/components/configuration/chat-configuration-tela-tools-tab.vue.d.ts +0 -20
  194. package/dist/runtime/workspace/composables/workspace-context-files.d.ts +0 -19
  195. package/dist/runtime/workspace/composables/workspace-context-files.js +0 -83
  196. package/dist/runtime/workspace/composables/workspace-external-skills.d.ts +0 -22
  197. package/dist/runtime/workspace/composables/workspace-external-skills.js +0 -137
  198. package/dist/runtime/workspace/composables/workspace-personalization.d.ts +0 -6
  199. package/dist/runtime/workspace/composables/workspace-personalization.js +0 -18
  200. package/dist/runtime/workspace/composables/workspace-tela-tools.d.ts +0 -13
  201. package/dist/runtime/workspace/composables/workspace-tela-tools.js +0 -91
@@ -0,0 +1,33 @@
1
+ import { z } from 'zod';
2
+ export declare const workspaceAgentModes: readonly ["default", "custom", "setup_required"];
3
+ export declare const workspaceAgentModeSchema: z.ZodEnum<{
4
+ default: "default";
5
+ custom: "custom";
6
+ setup_required: "setup_required";
7
+ }>;
8
+ export type WorkspaceAgentMode = z.infer<typeof workspaceAgentModeSchema>;
9
+ export declare const workspaceAgentCustomizations: readonly ["system_message", "context_files", "canvas_tools", "external_skills"];
10
+ export declare const workspaceAgentCustomizationSchema: z.ZodEnum<{
11
+ system_message: "system_message";
12
+ context_files: "context_files";
13
+ canvas_tools: "canvas_tools";
14
+ external_skills: "external_skills";
15
+ }>;
16
+ export type WorkspaceAgentCustomization = z.infer<typeof workspaceAgentCustomizationSchema>;
17
+ export declare const workspaceAgentStatusResponseSchema: z.ZodObject<{
18
+ workspaceId: z.ZodString;
19
+ mode: z.ZodEnum<{
20
+ default: "default";
21
+ custom: "custom";
22
+ setup_required: "setup_required";
23
+ }>;
24
+ telaAgentId: z.ZodNullable<z.ZodString>;
25
+ telaAgentUrl: z.ZodNullable<z.ZodString>;
26
+ pendingCustomizations: z.ZodArray<z.ZodEnum<{
27
+ system_message: "system_message";
28
+ context_files: "context_files";
29
+ canvas_tools: "canvas_tools";
30
+ external_skills: "external_skills";
31
+ }>>;
32
+ }, z.core.$strip>;
33
+ export type WorkspaceAgentStatusResponse = z.infer<typeof workspaceAgentStatusResponseSchema>;
@@ -0,0 +1,12 @@
1
+ import { z } from 'zod';
2
+ export const workspaceAgentModes = ['default', 'custom', 'setup_required'];
3
+ export const workspaceAgentModeSchema = z.enum(workspaceAgentModes);
4
+ export const workspaceAgentCustomizations = ['system_message', 'context_files', 'canvas_tools', 'external_skills'];
5
+ export const workspaceAgentCustomizationSchema = z.enum(workspaceAgentCustomizations);
6
+ export const workspaceAgentStatusResponseSchema = z.object({
7
+ workspaceId: z.string().min(1),
8
+ mode: workspaceAgentModeSchema,
9
+ telaAgentId: z.string().nullable(),
10
+ telaAgentUrl: z.string().nullable(),
11
+ pendingCustomizations: z.array(workspaceAgentCustomizationSchema),
12
+ });
@@ -10,6 +10,7 @@ export * from './chat/primitives';
10
10
  export * from './chat/titles';
11
11
  export * from './chat/ui';
12
12
  export * from './chat/usage';
13
+ export * from './chat/workspace-agent';
13
14
  export * from './chat/workspace-settings';
14
15
  export * from './integrations/agent-api';
15
16
  export * from './integrations/tela-agent-api';
@@ -10,6 +10,7 @@ export * from './chat/primitives';
10
10
  export * from './chat/titles';
11
11
  export * from './chat/ui';
12
12
  export * from './chat/usage';
13
+ export * from './chat/workspace-agent';
13
14
  export * from './chat/workspace-settings';
14
15
  export * from './integrations/agent-api';
15
16
  export * from './integrations/tela-agent-api';
@@ -1,5 +1,5 @@
1
1
  import type { WorkspaceSettingsUpdate } from './schemas/chat/workspace-settings.js';
2
- export type ChatConfigurationTab = 'personalization' | 'context-files' | 'knowledge-sources' | 'tela-tools' | 'external-skills' | 'credentials';
2
+ export type ChatConfigurationTab = 'agent' | 'knowledge-sources' | 'credentials';
3
3
  export type ChatConfigurationSavePayload = {
4
4
  updates: WorkspaceSettingsUpdate;
5
5
  onSaved: () => void;
@@ -3,6 +3,6 @@ type __VLS_Props = {
3
3
  createdAt?: string | Date;
4
4
  updatedAt?: string | Date;
5
5
  };
6
- 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 __VLS_export: import("@vue/runtime-core").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("@vue/runtime-core").ComponentOptionsMixin, import("@vue/runtime-core").ComponentOptionsMixin, {}, string, import("@vue/runtime-core").PublicProps, Readonly<__VLS_Props> & Readonly<{}>, {}, {}, {}, {}, string, import("@vue/runtime-core").ComponentProvideOptions, false, {}, any>;
7
7
  declare const _default: typeof __VLS_export;
8
8
  export default _default;
@@ -3,6 +3,6 @@ type __VLS_Props = {
3
3
  createdAt?: string | Date;
4
4
  updatedAt?: string | Date;
5
5
  };
6
- 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 __VLS_export: import("@vue/runtime-core").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("@vue/runtime-core").ComponentOptionsMixin, import("@vue/runtime-core").ComponentOptionsMixin, {}, string, import("@vue/runtime-core").PublicProps, Readonly<__VLS_Props> & Readonly<{}>, {}, {}, {}, {}, string, import("@vue/runtime-core").ComponentProvideOptions, false, {}, any>;
7
7
  declare const _default: typeof __VLS_export;
8
8
  export default _default;
@@ -16,7 +16,7 @@ export function useGitHubSkillsCallback() {
16
16
  text: `GitHub conectado: ${account}`,
17
17
  icon: "i-ph-check-circle"
18
18
  });
19
- openModal("external-skills");
19
+ openModal();
20
20
  } else if (status === "cancelled") {
21
21
  statusToast.update({
22
22
  text: "Conex\xE3o cancelada",
@@ -0,0 +1,8 @@
1
+ import type { WorkspaceAgentStatusResponse } from '../../types/schemas/chat/workspace-agent.js';
2
+ export declare function useWorkspaceAgent(): {
3
+ status: any;
4
+ loading: any;
5
+ creating: any;
6
+ fetchStatus: () => Promise<WorkspaceAgentStatusResponse>;
7
+ createAgent: () => Promise<WorkspaceAgentStatusResponse | null>;
8
+ };
@@ -0,0 +1,89 @@
1
+ import * as Sentry from "@sentry/nuxt";
2
+ import { workspaceAgentStatusResponseSchema } from "../../types/schemas/chat/workspace-agent.js";
3
+ import { useChatAuth } from "#chat-auth";
4
+ import { useChatApi } from "../../shared/composables/chat-api.js";
5
+ import { useEmbedConfig } from "../../embed/composables/embed-config.js";
6
+ function assertWorkspaceAgentStatusResponse(value) {
7
+ const parsed = workspaceAgentStatusResponseSchema.safeParse(value);
8
+ if (!parsed.success)
9
+ throw new Error("Invalid workspace agent status response");
10
+ return parsed.data;
11
+ }
12
+ export function useWorkspaceAgent() {
13
+ const chatApi = useChatApi();
14
+ const embedConfig = useEmbedConfig();
15
+ const { activeOrganization } = useChatAuth();
16
+ const workspaceScope = computed(() => embedConfig?.workspaceId.value.trim() || activeOrganization.value?.id?.trim() || "default");
17
+ const statusBuckets = useState("workspace-agent-status", () => ({}));
18
+ const loadingBuckets = useState("workspace-agent-loading", () => ({}));
19
+ const creatingBuckets = useState("workspace-agent-creating", () => ({}));
20
+ const status = computed({
21
+ get: () => statusBuckets.value[workspaceScope.value] ?? null,
22
+ set: (value) => {
23
+ statusBuckets.value = {
24
+ ...statusBuckets.value,
25
+ [workspaceScope.value]: value
26
+ };
27
+ }
28
+ });
29
+ const loading = computed({
30
+ get: () => loadingBuckets.value[workspaceScope.value] ?? false,
31
+ set: (value) => {
32
+ loadingBuckets.value = {
33
+ ...loadingBuckets.value,
34
+ [workspaceScope.value]: value
35
+ };
36
+ }
37
+ });
38
+ const creating = computed({
39
+ get: () => creatingBuckets.value[workspaceScope.value] ?? false,
40
+ set: (value) => {
41
+ creatingBuckets.value = {
42
+ ...creatingBuckets.value,
43
+ [workspaceScope.value]: value
44
+ };
45
+ }
46
+ });
47
+ function requestArgs(options) {
48
+ if (embedConfig !== null)
49
+ return [chatApi.path("/workspace/agent"), chatApi.withChatHeaders(options)];
50
+ return ["/api/workspace/agent", options];
51
+ }
52
+ async function fetchStatus() {
53
+ loading.value = true;
54
+ try {
55
+ const [path, options] = requestArgs();
56
+ const data = assertWorkspaceAgentStatusResponse(await $fetch(path, options));
57
+ status.value = data;
58
+ return data;
59
+ } catch (e) {
60
+ Sentry.captureException(e);
61
+ throw e;
62
+ } finally {
63
+ loading.value = false;
64
+ }
65
+ }
66
+ async function createAgent() {
67
+ if (creating.value)
68
+ return null;
69
+ creating.value = true;
70
+ try {
71
+ const [path, options] = requestArgs({ method: "POST" });
72
+ const data = assertWorkspaceAgentStatusResponse(await $fetch(path, options));
73
+ status.value = data;
74
+ return data;
75
+ } catch (e) {
76
+ Sentry.captureException(e);
77
+ throw e;
78
+ } finally {
79
+ creating.value = false;
80
+ }
81
+ }
82
+ return {
83
+ status: readonly(status),
84
+ loading: readonly(loading),
85
+ creating: readonly(creating),
86
+ fetchStatus,
87
+ createAgent
88
+ };
89
+ }
@@ -3,7 +3,48 @@ export declare function useWorkspaceSettings(): {
3
3
  settings: any;
4
4
  loading: any;
5
5
  error: any;
6
- fetchSettings: () => Promise<WorkspaceSettingsResponse>;
6
+ fetchSettings: () => Promise<{
7
+ systemMessage: string | null;
8
+ contextFiles: {
9
+ url: string;
10
+ name: string;
11
+ vaultReference?: string | undefined;
12
+ mimeType?: string | undefined;
13
+ }[] | null;
14
+ canvasTools: {
15
+ canvasId: string;
16
+ name: string;
17
+ description: string;
18
+ variables?: Record<string, {
19
+ name: string;
20
+ description: string;
21
+ type: "file" | "text";
22
+ }> | undefined;
23
+ }[] | null;
24
+ knowledgeSources: {
25
+ type: "workstation";
26
+ id: string;
27
+ name: string;
28
+ projectId: string;
29
+ description?: string | undefined;
30
+ taskCount?: number | undefined;
31
+ }[] | null;
32
+ externalSkills: {
33
+ ref: string;
34
+ name: string;
35
+ description: string;
36
+ runtime: string;
37
+ allowedTools: string[];
38
+ isPublic: boolean;
39
+ addedBy: {
40
+ userId: string;
41
+ username: string;
42
+ };
43
+ addedAt: string;
44
+ }[] | null;
45
+ updatedAt: string | Date;
46
+ workspaceId: string;
47
+ }>;
7
48
  updateSettings: (updates: WorkspaceSettingsUpdate) => Promise<WorkspaceSettingsResponse>;
8
49
  isModalOpen: any;
9
50
  initialTab: any;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@meistrari/chat-nuxt",
3
- "version": "3.0.0",
3
+ "version": "3.1.0",
4
4
  "type": "module",
5
5
  "exports": {
6
6
  ".": {
@@ -21,17 +21,6 @@
21
21
  "files": [
22
22
  "dist"
23
23
  ],
24
- "scripts": {
25
- "build": "mkdir -p .nuxt && { [ -f .nuxt/tsconfig.json ] || printf '{}' > .nuxt/tsconfig.json; } && { [ -f .nuxt/tsconfig.server.json ] || printf '{}' > .nuxt/tsconfig.server.json; } && nuxt-module-build build && node ./scripts/embed-local-schemas.mjs && node ./scripts/polish-embed-declarations.mjs",
26
- "dev:prepare": "nuxt-module-build build --stub",
27
- "test:types": "pnpm build && tsc -p tsconfig.type-tests.json --noEmit",
28
- "smoke:pack": "./scripts/smoke-pack-consumer.sh",
29
- "smoke:browser": "./scripts/smoke-pack-consumer.sh --browser",
30
- "lint": "eslint .",
31
- "lint:fix": "eslint . --fix",
32
- "lint:attrs": "! grep -rn '[a-z0-9-]![[:space:]>@\"'\"'\"']' --include='*.vue' src/runtime/ 2>/dev/null",
33
- "typecheck": "cd ../.. && TYPECHECK_CWD=packages/chat-app ./scripts/typecheck.sh"
34
- },
35
24
  "peerDependencies": {
36
25
  "nuxt": "^3.17.0",
37
26
  "vue": "^3.5.0"
@@ -61,7 +50,6 @@
61
50
  },
62
51
  "devDependencies": {
63
52
  "@antfu/eslint-config": "3.11.2",
64
- "@meistrari/chat-schemas": "workspace:*",
65
53
  "@nuxt/module-builder": "^1.0.2",
66
54
  "@types/node": "^20.19.0",
67
55
  "dotenv-cli": "^11.0.0",
@@ -72,6 +60,18 @@
72
60
  "playwright": "^1.61.0",
73
61
  "typescript": "^5.7.3",
74
62
  "vitest": "^3.2.1",
75
- "vue-tsc": "^3.2.6"
63
+ "vue-tsc": "^3.2.6",
64
+ "@meistrari/chat-schemas": "0.1.0"
65
+ },
66
+ "scripts": {
67
+ "build": "mkdir -p .nuxt && { [ -f .nuxt/tsconfig.json ] || printf '{}' > .nuxt/tsconfig.json; } && { [ -f .nuxt/tsconfig.server.json ] || printf '{}' > .nuxt/tsconfig.server.json; } && nuxt-module-build build && node ./scripts/embed-local-schemas.mjs && node ./scripts/polish-embed-declarations.mjs",
68
+ "dev:prepare": "nuxt-module-build build --stub",
69
+ "test:types": "pnpm build && tsc -p tsconfig.type-tests.json --noEmit",
70
+ "smoke:pack": "./scripts/smoke-pack-consumer.sh",
71
+ "smoke:browser": "./scripts/smoke-pack-consumer.sh --browser",
72
+ "lint": "eslint .",
73
+ "lint:fix": "eslint . --fix",
74
+ "lint:attrs": "! grep -rn '[a-z0-9-]![[:space:]>@\"'\"'\"']' --include='*.vue' src/runtime/ 2>/dev/null",
75
+ "typecheck": "cd ../.. && TYPECHECK_CWD=packages/chat-app ./scripts/typecheck.sh"
76
76
  }
77
- }
77
+ }
@@ -1,22 +0,0 @@
1
- import type { ContextFile } from '../../../types/schemas/chat/files.js';
2
- type __VLS_Props = {
3
- searchQuery: string;
4
- filteredContextFiles: readonly ContextFile[];
5
- filteredPendingFiles: readonly File[];
6
- currentFileCount: number;
7
- maxFiles: number;
8
- getFileType: (fileName: string) => string;
9
- };
10
- declare const __VLS_export: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {} & {
11
- "update:searchQuery": (value: string) => any;
12
- handleFileSelect: (event: Event) => any;
13
- removePendingFile: (file: File) => any;
14
- removeContextFile: (url: string) => any;
15
- }, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{
16
- "onUpdate:searchQuery"?: ((value: string) => any) | undefined;
17
- onHandleFileSelect?: ((event: Event) => any) | undefined;
18
- onRemovePendingFile?: ((file: File) => any) | undefined;
19
- onRemoveContextFile?: ((url: string) => any) | undefined;
20
- }>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
21
- declare const _default: typeof __VLS_export;
22
- export default _default;
@@ -1,133 +0,0 @@
1
- <script setup>
2
- defineProps({
3
- searchQuery: { type: String, required: true },
4
- filteredContextFiles: { type: Array, required: true },
5
- filteredPendingFiles: { type: Array, required: true },
6
- currentFileCount: { type: Number, required: true },
7
- maxFiles: { type: Number, required: true },
8
- getFileType: { type: Function, required: true }
9
- });
10
- const emit = defineEmits(["update:searchQuery", "handleFileSelect", "removePendingFile", "removeContextFile"]);
11
- const fileInputRef = ref(null);
12
- function openFileDialog() {
13
- fileInputRef.value?.click();
14
- }
15
- function onFileChange(event) {
16
- emit("handleFileSelect", event);
17
- }
18
- </script>
19
-
20
- <template>
21
- <div mb-24px>
22
- <h2 text-16px font-semibold text-primary tracking="-.2px" leading-20px>
23
- Arquivos de contexto
24
- </h2>
25
- <div h-px bg-gray-200 mt-24px />
26
- </div>
27
-
28
- <input ref="fileInputRef" type="file" multiple hidden @change="onFileChange">
29
-
30
- <div flex items-center justify-between mb-24px>
31
- <div
32
- flex items-center gap-8px
33
- w-240px pl-12px pr-8px py-4px
34
- bg-white b=".5px gray-200" rounded-10px
35
- shadow-sm
36
- >
37
- <div i-ph-magnifying-glass text-12px text-gray-400 />
38
- <input
39
- :value="searchQuery"
40
- type="text"
41
- placeholder="Buscar"
42
- text-14px text-primary placeholder:text-gray-400
43
- bg-transparent border-none outline-none
44
- flex-1 leading-18px tracking="-.15px"
45
- @input="emit('update:searchQuery', $event.target.value)"
46
- >
47
- </div>
48
- <button
49
- px-16px py-10px
50
- bg-white b=".5px gray-200" rounded-12px
51
- text-16px font-semibold text-gray-900
52
- cursor-pointer hover:bg-gray-50 transition
53
- :disabled="currentFileCount >= maxFiles"
54
- :class="{ 'opacity-50 cursor-not-allowed': currentFileCount >= maxFiles }"
55
- @click="openFileDialog"
56
- >
57
- Enviar
58
- </button>
59
- </div>
60
-
61
- <div w-full>
62
- <div flex items-center b-y=".5px gray-200" bg-white>
63
- <div flex-1 px-20px py-12px>
64
- <span text-12px font-semibold text-primary leading-16px>Nome</span>
65
- </div>
66
- <div w-100px px-20px py-12px>
67
- <span text-12px font-semibold text-primary leading-16px>Tipo</span>
68
- </div>
69
- <div w-40px />
70
- </div>
71
-
72
- <div>
73
- <div
74
- v-for="file in filteredContextFiles"
75
- :key="`existing-${file.url}`"
76
- flex items-center b-b=".5px gray-100" bg-white
77
- >
78
- <div flex items-center gap-8px flex-1 h-48px px-20px py-12px>
79
- <div i-ph-file-pdf text-16px text-red-500 shrink-0 />
80
- <span text-14px text-gray-900 leading-18px tracking="-.15px" truncate>
81
- {{ file.name }}
82
- </span>
83
- </div>
84
- <div w-100px h-48px px-20px py-12px flex items-center>
85
- <span text-12px text-tertiary leading-16px>
86
- {{ getFileType(file.name) }}
87
- </span>
88
- </div>
89
- <div w-40px px-8px py-12px>
90
- <button
91
- p-4px rounded-6px hover:bg-gray-100 transition cursor-pointer
92
- @click="emit('removeContextFile', file.url)"
93
- >
94
- <div i-ph-x text-16px text-primary />
95
- </button>
96
- </div>
97
- </div>
98
-
99
- <div
100
- v-for="file in filteredPendingFiles"
101
- :key="`pending-${file.name}-${file.size}-${file.lastModified}`"
102
- flex items-center b-b=".5px blue-200" bg-blue-50
103
- >
104
- <div flex items-center gap-8px flex-1 h-48px px-20px py-12px>
105
- <div i-ph-file-pdf text-16px text-blue-500 shrink-0 />
106
- <span text-14px text-blue-900 leading-18px tracking="-.15px" truncate>
107
- {{ file.name }}
108
- </span>
109
- </div>
110
- <div w-100px h-48px px-20px py-12px flex items-center>
111
- <span text-12px text-blue-500 leading-16px>
112
- {{ getFileType(file.name) }}
113
- </span>
114
- </div>
115
- <div w-40px px-8px py-12px>
116
- <button
117
- p-4px rounded-6px hover:bg-blue-100 transition cursor-pointer
118
- @click="emit('removePendingFile', file)"
119
- >
120
- <div i-ph-x text-16px text-blue-500 />
121
- </button>
122
- </div>
123
- </div>
124
-
125
- <div
126
- v-if="filteredContextFiles.length === 0 && filteredPendingFiles.length === 0"
127
- flex items-center justify-center py-48px text-14px text-tertiary
128
- >
129
- Nenhum arquivo adicionado ainda
130
- </div>
131
- </div>
132
- </div>
133
- </template>
@@ -1,22 +0,0 @@
1
- import type { ContextFile } from '../../../types/schemas/chat/files.js';
2
- type __VLS_Props = {
3
- searchQuery: string;
4
- filteredContextFiles: readonly ContextFile[];
5
- filteredPendingFiles: readonly File[];
6
- currentFileCount: number;
7
- maxFiles: number;
8
- getFileType: (fileName: string) => string;
9
- };
10
- declare const __VLS_export: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {} & {
11
- "update:searchQuery": (value: string) => any;
12
- handleFileSelect: (event: Event) => any;
13
- removePendingFile: (file: File) => any;
14
- removeContextFile: (url: string) => any;
15
- }, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{
16
- "onUpdate:searchQuery"?: ((value: string) => any) | undefined;
17
- onHandleFileSelect?: ((event: Event) => any) | undefined;
18
- onRemovePendingFile?: ((file: File) => any) | undefined;
19
- onRemoveContextFile?: ((url: string) => any) | undefined;
20
- }>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
21
- declare const _default: typeof __VLS_export;
22
- export default _default;
@@ -1,32 +0,0 @@
1
- import type { ExternalSkill } from '../../../types/schemas/chat/workspace-settings.js';
2
- type __VLS_Props = {
3
- searchQuery: string;
4
- displayedSkills: readonly ExternalSkill[];
5
- filteredSkills: readonly ExternalSkill[];
6
- hasChanges: boolean;
7
- isPending: (ref: string) => boolean;
8
- skillModalOpen: boolean;
9
- skillRefInput: string;
10
- skillError: string;
11
- discoveringSkills: boolean;
12
- gitHubButtonText: string;
13
- };
14
- declare const __VLS_export: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {} & {
15
- "update:searchQuery": (value: string) => any;
16
- "update:skillModalOpen": (value: boolean) => any;
17
- "update:skillRefInput": (value: string) => any;
18
- removeSkill: (ref: string) => any;
19
- closeSkillModal: () => any;
20
- handleAddSkillAndClose: () => any;
21
- connectGitHub: () => any;
22
- }, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{
23
- "onUpdate:searchQuery"?: ((value: string) => any) | undefined;
24
- "onUpdate:skillModalOpen"?: ((value: boolean) => any) | undefined;
25
- "onUpdate:skillRefInput"?: ((value: string) => any) | undefined;
26
- onRemoveSkill?: ((ref: string) => any) | undefined;
27
- onCloseSkillModal?: (() => any) | undefined;
28
- onHandleAddSkillAndClose?: (() => any) | undefined;
29
- onConnectGitHub?: (() => any) | undefined;
30
- }>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
31
- declare const _default: typeof __VLS_export;
32
- export default _default;