@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
@@ -1,137 +0,0 @@
1
- import { useChatAuth } from "#chat-auth";
2
- import { getChatApiErrorMessage } from "../../shared/chat-api-error.js";
3
- import { useGitHubSkills } from "./github-skills.js";
4
- export function useWorkspaceExternalSkills(currentExternalSkills, searchQuery) {
5
- const { user } = useChatAuth();
6
- const { connection: skillsConnection, fetchConnection: fetchGitHubConnection, connect: connectGitHub } = useGitHubSkills();
7
- const pendingSkills = ref([]);
8
- const removedRefs = ref([]);
9
- const skillModalOpen = ref(false);
10
- const skillRefInput = ref("");
11
- const skillError = ref("");
12
- const discoveringSkills = ref(false);
13
- const displayedSkills = computed(() => {
14
- const current = (currentExternalSkills.value ?? []).filter((s) => !removedRefs.value.includes(s.ref));
15
- return [...current, ...pendingSkills.value];
16
- });
17
- const filteredSkills = computed(() => {
18
- const query = searchQuery?.value?.trim().toLowerCase();
19
- if (!query)
20
- return displayedSkills.value;
21
- return displayedSkills.value.filter(
22
- (skill) => skill.name.toLowerCase().includes(query) || skill.ref.toLowerCase().includes(query)
23
- );
24
- });
25
- const hasChanges = computed(() => {
26
- return pendingSkills.value.length > 0 || removedRefs.value.length > 0;
27
- });
28
- function isPending(ref2) {
29
- return pendingSkills.value.some((s) => s.ref === ref2);
30
- }
31
- function addSkill(skill) {
32
- pendingSkills.value = [...pendingSkills.value, skill];
33
- }
34
- function removeSkill(ref2) {
35
- const pendingIndex = pendingSkills.value.findIndex((s) => s.ref === ref2);
36
- if (pendingIndex !== -1) {
37
- pendingSkills.value = pendingSkills.value.filter((_, i) => i !== pendingIndex);
38
- return;
39
- }
40
- removedRefs.value = [...removedRefs.value, ref2];
41
- }
42
- function buildExternalSkills() {
43
- const currentSkills = (currentExternalSkills.value ?? []).filter((s) => !removedRefs.value.includes(s.ref)).map((s) => ({
44
- ...s,
45
- allowedTools: [...s.allowedTools],
46
- addedBy: { ...s.addedBy }
47
- }));
48
- const finalSkills = [...currentSkills, ...pendingSkills.value];
49
- return finalSkills.length > 0 ? finalSkills : null;
50
- }
51
- async function handleAddSkill() {
52
- const inputRef = skillRefInput.value.trim();
53
- if (!inputRef || discoveringSkills.value)
54
- return;
55
- skillError.value = "";
56
- discoveringSkills.value = true;
57
- try {
58
- const metadata = await $fetch("/api/external-skills/discover", {
59
- method: "POST",
60
- body: { ref: inputRef }
61
- });
62
- const canonicalRef = metadata.ref;
63
- if (displayedSkills.value.some((s) => s.ref === canonicalRef)) {
64
- skillError.value = "Esta skill j\xE1 foi adicionada";
65
- return;
66
- }
67
- const newSkill = {
68
- ref: canonicalRef,
69
- name: metadata.name,
70
- description: metadata.description || "",
71
- runtime: metadata.runtime || "unknown",
72
- allowedTools: metadata.allowedTools || [],
73
- isPublic: metadata.isPublic,
74
- addedBy: {
75
- userId: user.value?.id || "",
76
- username: user.value?.name || skillsConnection.value.accountName || ""
77
- },
78
- addedAt: (/* @__PURE__ */ new Date()).toISOString()
79
- };
80
- addSkill(newSkill);
81
- skillRefInput.value = "";
82
- } catch (error) {
83
- if (error.statusCode === 401)
84
- skillError.value = "Reposit\xF3rio privado. Conecte um provedor para acessar.";
85
- else if (error.statusCode === 404)
86
- skillError.value = "Skill n\xE3o encontrada. Verifique se o caminho cont\xE9m um arquivo SKILL.md";
87
- else
88
- skillError.value = getChatApiErrorMessage(error) ?? "Erro ao buscar skill";
89
- } finally {
90
- discoveringSkills.value = false;
91
- }
92
- }
93
- function closeSkillModal() {
94
- skillModalOpen.value = false;
95
- skillRefInput.value = "";
96
- skillError.value = "";
97
- }
98
- async function handleAddSkillAndClose() {
99
- await handleAddSkill();
100
- if (!skillError.value)
101
- closeSkillModal();
102
- }
103
- function getGitHubButtonText() {
104
- if (skillsConnection.value.connected)
105
- return "Gerenciar GitHub";
106
- return "Conectar GitHub";
107
- }
108
- function initialize() {
109
- pendingSkills.value = [];
110
- removedRefs.value = [];
111
- skillModalOpen.value = false;
112
- skillRefInput.value = "";
113
- skillError.value = "";
114
- discoveringSkills.value = false;
115
- }
116
- return {
117
- displayedSkills,
118
- filteredSkills,
119
- hasChanges,
120
- isPending,
121
- addSkill,
122
- removeSkill,
123
- buildExternalSkills,
124
- initialize,
125
- skillModalOpen,
126
- skillRefInput,
127
- skillError,
128
- discoveringSkills,
129
- handleAddSkill,
130
- closeSkillModal,
131
- handleAddSkillAndClose,
132
- getGitHubButtonText,
133
- skillsConnection,
134
- fetchGitHubConnection,
135
- connectGitHub
136
- };
137
- }
@@ -1,6 +0,0 @@
1
- export declare function useWorkspacePersonalization(currentSystemMessage: Ref<string | null | undefined> | ComputedRef<string | null | undefined>): {
2
- localSystemMessage: any;
3
- hasChanges: any;
4
- getSystemMessage: () => string | null;
5
- initialize: () => void;
6
- };
@@ -1,18 +0,0 @@
1
- export function useWorkspacePersonalization(currentSystemMessage) {
2
- const localSystemMessage = ref("");
3
- const hasChanges = computed(
4
- () => localSystemMessage.value !== (currentSystemMessage.value ?? "")
5
- );
6
- function getSystemMessage() {
7
- return localSystemMessage.value.trim() || null;
8
- }
9
- function initialize() {
10
- localSystemMessage.value = currentSystemMessage.value ?? "";
11
- }
12
- return {
13
- localSystemMessage,
14
- hasChanges,
15
- getSystemMessage,
16
- initialize
17
- };
18
- }
@@ -1,13 +0,0 @@
1
- import type { TelaCanvas, TelaProject } from '../../types/schemas/integrations/tela-api.js';
2
- import type { CanvasTool } from '../../types/schemas/tools/canvas.js';
3
- export declare function useWorkspaceTelaTools(canvas: Ref<TelaCanvas[]> | ComputedRef<TelaCanvas[]>, projects: Ref<TelaProject[]> | ComputedRef<TelaProject[]>, searchQuery: Ref<string>, currentCanvasTools: Ref<readonly CanvasTool[] | null | undefined> | ComputedRef<readonly CanvasTool[] | null | undefined>): {
4
- selectedToolIds: any;
5
- filteredCanvasTools: any;
6
- allToolsSelected: any;
7
- hasChanges: any;
8
- toggleCanvasTool: (canvasId: string) => void;
9
- toggleAllTools: (selected: boolean | "indeterminate") => void;
10
- getProjectName: (projectId: string) => string;
11
- buildCanvasTools: () => CanvasTool[];
12
- initialize: () => void;
13
- };
@@ -1,91 +0,0 @@
1
- export function useWorkspaceTelaTools(canvas, projects, searchQuery, currentCanvasTools) {
2
- const selectedToolIds = ref(/* @__PURE__ */ new Set());
3
- const filteredCanvasTools = computed(() => {
4
- if (!searchQuery.value.trim())
5
- return canvas.value;
6
- const query = searchQuery.value.toLowerCase();
7
- const matchingProjectIds = new Set(
8
- projects.value.filter((p) => p.title.toLowerCase().includes(query)).map((p) => p.id)
9
- );
10
- return canvas.value.filter(
11
- (c) => c.title.toLowerCase().includes(query) || matchingProjectIds.has(c.projectId)
12
- );
13
- });
14
- const allToolsSelected = computed(() => {
15
- const availableTools = filteredCanvasTools.value.filter((c) => c.promotedVersion);
16
- if (availableTools.length === 0)
17
- return false;
18
- return availableTools.every((c) => selectedToolIds.value.has(c.id));
19
- });
20
- const hasChanges = computed(() => {
21
- const currentIds = new Set(currentCanvasTools.value?.map((t) => t.canvasId) ?? []);
22
- if (currentIds.size !== selectedToolIds.value.size)
23
- return true;
24
- for (const id of currentIds) {
25
- if (!selectedToolIds.value.has(id))
26
- return true;
27
- }
28
- return false;
29
- });
30
- function toggleCanvasTool(canvasId) {
31
- const newSet = new Set(selectedToolIds.value);
32
- if (newSet.has(canvasId))
33
- newSet.delete(canvasId);
34
- else
35
- newSet.add(canvasId);
36
- selectedToolIds.value = newSet;
37
- }
38
- function toggleAllTools(selected) {
39
- if (selected === "indeterminate")
40
- return;
41
- const newSet = new Set(selectedToolIds.value);
42
- const availableTools = filteredCanvasTools.value.filter((c) => c.promotedVersion);
43
- if (selected)
44
- availableTools.forEach((c) => newSet.add(c.id));
45
- else
46
- availableTools.forEach((c) => newSet.delete(c.id));
47
- selectedToolIds.value = newSet;
48
- }
49
- function getProjectName(projectId) {
50
- const project = projects.value.find((p) => p.id === projectId);
51
- return project?.title ?? "Sem projeto";
52
- }
53
- function buildCanvasTools() {
54
- const tools = [];
55
- for (const canvasId of selectedToolIds.value) {
56
- const item = canvas.value.find((c) => c.id === canvasId);
57
- if (!item)
58
- continue;
59
- const name = item.title.toLowerCase().replace(/[^a-z0-9]+/g, "_").replace(/^_|_$/g, "");
60
- const variables = item.promotedVersion?.variables?.reduce((acc, v) => {
61
- acc[v.name] = {
62
- name: v.name,
63
- description: v.description ?? v.name,
64
- type: v.type
65
- };
66
- return acc;
67
- }, {});
68
- tools.push({
69
- canvasId,
70
- name,
71
- description: item.title,
72
- variables: variables && Object.keys(variables).length > 0 ? variables : void 0
73
- });
74
- }
75
- return tools;
76
- }
77
- function initialize() {
78
- selectedToolIds.value = new Set(currentCanvasTools.value?.map((t) => t.canvasId) ?? []);
79
- }
80
- return {
81
- selectedToolIds,
82
- filteredCanvasTools,
83
- allToolsSelected,
84
- hasChanges,
85
- toggleCanvasTool,
86
- toggleAllTools,
87
- getProjectName,
88
- buildCanvasTools,
89
- initialize
90
- };
91
- }