@meistrari/chat-nuxt 3.4.0 → 3.6.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 (52) hide show
  1. package/dist/module.d.mts +2 -1
  2. package/dist/module.json +1 -1
  3. package/dist/module.mjs +1 -0
  4. package/dist/runtime/conversations/components/chat-conversation-list.d.vue.ts +1 -0
  5. package/dist/runtime/conversations/components/chat-conversation-list.vue +3 -2
  6. package/dist/runtime/conversations/components/chat-conversation-list.vue.d.ts +1 -0
  7. package/dist/runtime/conversations/composables/conversations.d.ts +2 -4
  8. package/dist/runtime/conversations/composables/conversations.js +5 -1
  9. package/dist/runtime/embed/components/chat-embed-inner.d.vue.ts +2 -0
  10. package/dist/runtime/embed/components/chat-embed-inner.vue +39 -9
  11. package/dist/runtime/embed/components/chat-embed-inner.vue.d.ts +2 -0
  12. package/dist/runtime/embed/components/chat-embed.d.vue.ts +3 -0
  13. package/dist/runtime/embed/components/chat-embed.vue +7 -1
  14. package/dist/runtime/embed/components/chat-embed.vue.d.ts +3 -0
  15. package/dist/runtime/embed/components/meistrari-chat-embed.d.vue.ts +7 -1
  16. package/dist/runtime/embed/components/meistrari-chat-embed.vue +6 -1
  17. package/dist/runtime/embed/components/meistrari-chat-embed.vue.d.ts +7 -1
  18. package/dist/runtime/embed/components/mobile/chat-mobile-drawer.d.vue.ts +1 -0
  19. package/dist/runtime/embed/components/mobile/chat-mobile-drawer.vue +2 -1
  20. package/dist/runtime/embed/components/mobile/chat-mobile-drawer.vue.d.ts +1 -0
  21. package/dist/runtime/embed/components/mobile/chat-mobile-shell.d.vue.ts +4 -1
  22. package/dist/runtime/embed/components/mobile/chat-mobile-shell.vue +6 -0
  23. package/dist/runtime/embed/components/mobile/chat-mobile-shell.vue.d.ts +4 -1
  24. package/dist/runtime/embed/composables/tela-agent-metadata.d.ts +2 -2
  25. package/dist/runtime/embed/types.d.ts +2 -0
  26. package/dist/runtime/messages/components/chat-message-input.d.vue.ts +3 -1
  27. package/dist/runtime/messages/components/chat-message-input.vue +27 -0
  28. package/dist/runtime/messages/components/chat-message-input.vue.d.ts +3 -1
  29. package/dist/runtime/messages/composables/chat-message-terminal.d.ts +17 -0
  30. package/dist/runtime/messages/composables/chat-message-terminal.js +42 -0
  31. package/dist/runtime/messages/composables/chat.d.ts +3 -0
  32. package/dist/runtime/messages/composables/chat.js +9 -4
  33. package/dist/runtime/messages/composables/mention-autocomplete.js +8 -2
  34. package/dist/runtime/types/embed.d.ts +3 -0
  35. package/dist/runtime/types/embed.js +1 -0
  36. package/dist/runtime/types/schemas/chat/conversations.d.ts +27 -0
  37. package/dist/runtime/types/schemas/chat/conversations.js +7 -0
  38. package/dist/runtime/types/schemas/chat/files.d.ts +3 -3
  39. package/dist/runtime/types/schemas/chat/messages.d.ts +31 -0
  40. package/dist/runtime/types/schemas/chat/messages.js +24 -0
  41. package/dist/runtime/types/schemas/chat/ui.d.ts +11 -1
  42. package/dist/runtime/types/schemas/chat/ui.js +3 -0
  43. package/dist/runtime/types/schemas/chat/usage.d.ts +1 -1
  44. package/dist/runtime/types/schemas/chat/workspace-agent.d.ts +14 -0
  45. package/dist/runtime/types/schemas/chat/workspace-agent.js +7 -0
  46. package/dist/runtime/types/schemas/integrations/agent-api.d.ts +1 -1
  47. package/dist/runtime/types/schemas/integrations/tela-agent-api.d.ts +68 -6
  48. package/dist/runtime/types/schemas/integrations/tela-agent-api.js +18 -0
  49. package/dist/runtime/workspace/composables/workspace-agent-summary.d.ts +6 -0
  50. package/dist/runtime/workspace/composables/workspace-agent-summary.js +54 -0
  51. package/dist/types.d.mts +3 -1
  52. package/package.json +1 -1
package/dist/module.d.mts CHANGED
@@ -1,4 +1,5 @@
1
- export { ChatActionPayload, ChatActor, ChatEmbedSharedProps, ChatFeatureConfig, ChatSidebarConfig, DefaultChatEmbedProps, MeistrariChatEmbedProps, MessageFeedbackConfig, MessageFeedbackPayload, MessageFeedbackRating, TelaAgentChatEmbedProps, TelaAgentExecutionInput } from '../dist/runtime/types/embed.js';
1
+ export { ChatMessageStatus } from '../dist/runtime/messages/composables/chat-message-terminal.js';
2
+ export { ChatActionPayload, ChatActor, ChatEmbedSharedProps, ChatFeatureConfig, ChatMessageTerminalPayload, ChatSidebarConfig, DefaultChatEmbedProps, MeistrariChatEmbedProps, MessageFeedbackConfig, MessageFeedbackPayload, MessageFeedbackRating, MessageOverviewResponse, TelaAgentChatEmbedProps, TelaAgentExecutionInput } from '../dist/runtime/types/embed.js';
2
3
 
3
4
  type ChatNuxtConfigValidationMode = false | 'warn' | 'error';
4
5
 
package/dist/module.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@meistrari/chat-nuxt",
3
3
  "configKey": "chatNuxt",
4
- "version": "3.4.0",
4
+ "version": "3.6.0",
5
5
  "builder": {
6
6
  "@nuxt/module-builder": "1.0.2",
7
7
  "unbuild": "unknown"
package/dist/module.mjs CHANGED
@@ -2,6 +2,7 @@ import { existsSync, readFileSync, mkdirSync, symlinkSync } from 'node:fs';
2
2
  import { createRequire } from 'node:module';
3
3
  import { join, dirname } from 'node:path';
4
4
  import { defineNuxtModule, createResolver, addTemplate, addTypeTemplate, addPlugin, addImportsDir, addComponent, addComponentsDir } from 'nuxt/kit';
5
+ export { ChatMessageStatus } from '../dist/runtime/messages/composables/chat-message-terminal.js';
5
6
 
6
7
  const localRequire = createRequire(import.meta.url);
7
8
  const runtimeAliasPackages = [
@@ -8,6 +8,7 @@ type __VLS_Props = {
8
8
  resetConversation?: () => void | Promise<void>;
9
9
  startConversation?: (groupId?: string | null) => void | Promise<void>;
10
10
  loading?: boolean;
11
+ hideFolderHint?: boolean;
11
12
  };
12
13
  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>;
13
14
  declare const _default: typeof __VLS_export;
@@ -7,7 +7,8 @@ const props = defineProps({
7
7
  selectConversation: { type: Function, required: false },
8
8
  resetConversation: { type: Function, required: false },
9
9
  startConversation: { type: Function, required: false },
10
- loading: { type: Boolean, required: false }
10
+ loading: { type: Boolean, required: false },
11
+ hideFolderHint: { type: Boolean, required: false }
11
12
  });
12
13
  const {
13
14
  conversationSearch,
@@ -112,7 +113,7 @@ const {
112
113
  <span h-10px w-84px rounded-full bg-neutral-100 />
113
114
  </div>
114
115
  </div>
115
- <p px-4px text-14px text-neutral-500 leading-20px>
116
+ <p v-if="!hideFolderHint" px-4px text-14px text-neutral-500 leading-20px>
116
117
  Suas pastas aparecem aqui. Crie uma para começar a agrupar conversas.
117
118
  </p>
118
119
  <ChatConversationNewGroupButton label="Criar pasta" variant="empty-state" />
@@ -8,6 +8,7 @@ type __VLS_Props = {
8
8
  resetConversation?: () => void | Promise<void>;
9
9
  startConversation?: (groupId?: string | null) => void | Promise<void>;
10
10
  loading?: boolean;
11
+ hideFolderHint?: boolean;
11
12
  };
12
13
  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>;
13
14
  declare const _default: typeof __VLS_export;
@@ -1,5 +1,5 @@
1
1
  import type { DeepReadonly } from 'vue';
2
- import type { Conversation, ConversationWithMessages } from '../../types/schemas/chat/conversations.js';
2
+ import type { Conversation, ConversationWithMessages, CreateConversationRequest } from '../../types/schemas/chat/conversations.js';
3
3
  export declare function mergeFetchedConversations(fetchedConversations: Conversation[], localConversations: readonly Conversation[], deletedConversationIds?: readonly string[], locallyMutatedConversationIds?: readonly string[]): Conversation[];
4
4
  export declare function useConversations(): {
5
5
  conversations: any;
@@ -8,9 +8,7 @@ export declare function useConversations(): {
8
8
  fetchConversations: (options?: {
9
9
  force?: boolean;
10
10
  }) => Promise<void>;
11
- createConversation: (input?: {
12
- model?: string | null;
13
- }) => Promise<Conversation | null>;
11
+ createConversation: (input?: CreateConversationRequest) => Promise<Conversation | null>;
14
12
  deleteConversation: (id: string) => Promise<boolean>;
15
13
  renameConversation: (id: string, title: string) => Promise<boolean>;
16
14
  updateConversationModel: (id: string, model: string | null) => Promise<boolean>;
@@ -315,11 +315,15 @@ export function useConversations() {
315
315
  upsertConversationInLoadedBuckets(optimisticConversation, requestRuntimeScope);
316
316
  updateConversationCounts(requestRuntimeScope, optimisticConversation, 1);
317
317
  try {
318
+ const body = {
319
+ ...input?.model !== void 0 ? { model: input.model } : {},
320
+ ...input?.agentInputs !== void 0 ? { agentInputs: input.agentInputs } : {}
321
+ };
318
322
  const conversation = await $fetch(
319
323
  chatApi.path("/conversations"),
320
324
  chatApi.withChatHeaders({
321
325
  method: "POST",
322
- ...input?.model ? { body: { model: input.model } } : {}
326
+ body: Object.keys(body).length > 0 ? body : void 0
323
327
  })
324
328
  );
325
329
  upsertConversationInLoadedBuckets(conversation, requestRuntimeScope, optimisticConversation.id);
@@ -7,6 +7,7 @@ type __VLS_Props = {
7
7
  hideSidebar?: boolean;
8
8
  sidebar?: ChatSidebarConfig;
9
9
  hideSettings?: boolean;
10
+ hideFolderHint?: boolean;
10
11
  user?: EmbedUser | null;
11
12
  features?: Partial<ChatFeatureConfig>;
12
13
  };
@@ -19,6 +20,7 @@ declare const __VLS_base: import("vue").DefineComponent<__VLS_Props, {}, {}, {},
19
20
  }, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{
20
21
  "onUpdate:conversationId"?: ((value: string | null) => any) | undefined;
21
22
  }>, {
23
+ hideFolderHint: boolean;
22
24
  hideSettings: boolean;
23
25
  hideSidebar: boolean;
24
26
  initialConversationId: string | null;
@@ -8,7 +8,7 @@ import ChatMobileShell from "./mobile/chat-mobile-shell.vue";
8
8
  import { normalizeConversationId } from "../../conversations/scope";
9
9
  import { resolveChatFeatures } from "../feature-config";
10
10
  import { resolveConversationCreator } from "../../conversations/creator";
11
- import { useChat } from "../../messages/composables/chat";
11
+ import { resolveTelaAgentInputs, useChat } from "../../messages/composables/chat";
12
12
  import { useChatAction } from "../../messages/composables/chat-action";
13
13
  import { useChatApi } from "../../shared/composables/chat-api";
14
14
  import { useConversationFiles } from "../../files/composables/conversation-files";
@@ -20,6 +20,7 @@ import { useFilePreviewPanel } from "../../files/composables/file-preview-panel"
20
20
  import { usePendingConversationGroup } from "../../conversations/composables/pending-conversation-group";
21
21
  import { useStatusToast } from "../../shared/composables/status-toast";
22
22
  import { useTelaAgentMetadata } from "../composables/tela-agent-metadata";
23
+ import { useWorkspaceAgentSummary } from "../../workspace/composables/workspace-agent-summary";
23
24
  import { useWorkspaceMembers } from "../../workspace/composables/workspace-members";
24
25
  import { useWorkspaceSettings } from "../../workspace/composables/workspace-settings";
25
26
  import { useWorkspaceSwitchModal } from "../../workspace/composables/workspace-switch-modal";
@@ -29,6 +30,7 @@ const props = defineProps({
29
30
  hideSidebar: { type: Boolean, required: false, default: true },
30
31
  sidebar: { type: Object, required: false },
31
32
  hideSettings: { type: Boolean, required: false, default: false },
33
+ hideFolderHint: { type: Boolean, required: false, default: false },
32
34
  user: { type: [Object, null], required: false },
33
35
  features: { type: Object, required: false }
34
36
  });
@@ -55,12 +57,23 @@ const statusToast = useStatusToast();
55
57
  const { conversations, loading: conversationsLoading, fetchConversations, createConversation, deleteConversation, renameConversation, updateConversationModel, duplicateConversation, moveConversationToGroup, updateConversationInList } = useConversations();
56
58
  const { settings: workspaceSettingsState, fetchSettings } = useWorkspaceSettings();
57
59
  const { metadata: telaAgentMetadata, loading: telaAgentMetadataLoading, fetchAgentMetadata } = useTelaAgentMetadata();
60
+ const { summary: workspaceAgentSummary, fetchSummary: fetchWorkspaceAgentSummary } = useWorkspaceAgentSummary();
58
61
  const isTelaAgentMode = computed(() => !!embedConfig?.telaAgentId.value);
59
62
  const hasConfiguredTelaAgentInputs = computed(() => embedConfig?.telaAgentInputs?.value !== void 0 && embedConfig?.telaAgentInputs?.value !== null);
60
- const shouldLoadTelaAgentMetadata = computed(() => isTelaAgentMode.value && !hasConfiguredTelaAgentInputs.value);
63
+ const shouldLoadTelaAgentMetadata = computed(() => isTelaAgentMode.value);
61
64
  const telaAgentInputSchema = computed(
62
65
  () => hasConfiguredTelaAgentInputs.value ? null : isTelaAgentMode.value ? telaAgentMetadata.value?.inputSchema ?? [] : null
63
66
  );
67
+ const agentSkills = computed(() => {
68
+ if (isTelaAgentMode.value)
69
+ return telaAgentMetadata.value?.skills ?? [];
70
+ return workspaceAgentSummary.value?.skills ?? [];
71
+ });
72
+ const agentContextFiles = computed(() => {
73
+ if (isTelaAgentMode.value)
74
+ return telaAgentMetadata.value?.contextFiles ?? [];
75
+ return workspaceAgentSummary.value?.contextFiles ?? [];
76
+ });
64
77
  const effectiveWorkspaceSettings = computed(() => {
65
78
  if (isTelaAgentMode.value)
66
79
  return void 0;
@@ -141,7 +154,7 @@ const mobilePreviewFile = computed(() => {
141
154
  };
142
155
  });
143
156
  const visibleTelaAgentInputSchema = computed(() => !hasMessages.value ? telaAgentInputSchema.value : null);
144
- const visibleTelaAgentInputSchemaLoading = computed(() => !hasMessages.value && shouldLoadTelaAgentMetadata.value && telaAgentMetadataLoading.value);
157
+ const visibleTelaAgentInputSchemaLoading = computed(() => !hasMessages.value && isTelaAgentMode.value && !hasConfiguredTelaAgentInputs.value && telaAgentMetadataLoading.value);
145
158
  const visibleConversations = computed(
146
159
  () => conversations.value.filter((conversation) => conversation.title || conversation.id === activeConversationId.value)
147
160
  );
@@ -228,8 +241,11 @@ onMounted(async () => {
228
241
  void fetchConversations();
229
242
  if (shouldLoadTelaAgentMetadata.value) {
230
243
  void fetchAgentMetadata();
231
- } else if (!effectiveWorkspaceSettings.value) {
232
- void fetchSettings();
244
+ } else {
245
+ void fetchWorkspaceAgentSummary();
246
+ if (!effectiveWorkspaceSettings.value) {
247
+ void fetchSettings();
248
+ }
233
249
  }
234
250
  isReady.value = true;
235
251
  if (activeConversationId.value) {
@@ -312,10 +328,12 @@ const conversationCreator = computed(
312
328
  );
313
329
  async function handleSend(content, files, agentInputs) {
314
330
  let createdConversationId = null;
331
+ const resolvedAgentInputs = resolveTelaAgentInputs(agentInputs, embedConfig?.telaAgentInputs?.value);
315
332
  if (!activeConversationId.value || !currentConversation.value) {
316
- const conversation = await createConversation(
317
- selectedModel.value ? { model: selectedModel.value } : void 0
318
- );
333
+ const conversation = await createConversation({
334
+ model: selectedModel.value,
335
+ ...resolvedAgentInputs !== void 0 ? { agentInputs: resolvedAgentInputs } : {}
336
+ });
319
337
  if (!conversation)
320
338
  return;
321
339
  const groupId = pendingConversationGroupId.value;
@@ -330,7 +348,7 @@ async function handleSend(content, files, agentInputs) {
330
348
  }
331
349
  if (!currentConversation.value)
332
350
  return;
333
- const sendPromise = sendMessage(content, files.length > 0 ? files : void 0, agentInputs);
351
+ const sendPromise = sendMessage(content, files.length > 0 ? files : void 0, resolvedAgentInputs);
334
352
  if (createdConversationId) {
335
353
  updateConversationId(createdConversationId);
336
354
  }
@@ -505,6 +523,7 @@ async function handleDelete() {
505
523
  :reset-conversation="handleNewConversation"
506
524
  :start-conversation="handleNewConversation"
507
525
  :loading="conversationsLoading"
526
+ :hide-folder-hint="hideFolderHint"
508
527
  />
509
528
  </div>
510
529
 
@@ -556,11 +575,14 @@ async function handleDelete() {
556
575
  :has-pending-message="hasPendingMessage"
557
576
  :hide-settings="hideSettings"
558
577
  :hide-sidebar="hideSidebar"
578
+ :hide-folder-hint="hideFolderHint"
559
579
  :is-editing="isEditing"
560
580
  :loading="loading"
561
581
  :messages="messages"
562
582
  :agent-input-schema="visibleTelaAgentInputSchema"
563
583
  :agent-input-schema-loading="visibleTelaAgentInputSchemaLoading"
584
+ :agent-skills="agentSkills"
585
+ :agent-context-files="agentContextFiles"
564
586
  :show-cancel-button="resolvedFeatures.showCancelButton"
565
587
  :show-debug-option="resolvedFeatures.showDebugOption"
566
588
  :show-outdated-badge="showOutdatedBadge"
@@ -627,6 +649,8 @@ async function handleDelete() {
627
649
  :workspace-settings="effectiveWorkspaceSettings"
628
650
  :agent-input-schema="visibleTelaAgentInputSchema"
629
651
  :agent-input-schema-loading="visibleTelaAgentInputSchemaLoading"
652
+ :agent-skills="agentSkills"
653
+ :agent-context-files="agentContextFiles"
630
654
  :show-cancel-button="resolvedFeatures.showCancelButton"
631
655
  centered
632
656
  @send="handleSend"
@@ -652,6 +676,8 @@ async function handleDelete() {
652
676
  :workspace-settings="effectiveWorkspaceSettings"
653
677
  :agent-input-schema="visibleTelaAgentInputSchema"
654
678
  :agent-input-schema-loading="visibleTelaAgentInputSchemaLoading"
679
+ :agent-skills="agentSkills"
680
+ :agent-context-files="agentContextFiles"
655
681
  :show-cancel-button="resolvedFeatures.showCancelButton"
656
682
  has-disclaimer
657
683
  @send="handleSend"
@@ -775,6 +801,8 @@ async function handleDelete() {
775
801
  :workspace-settings="effectiveWorkspaceSettings"
776
802
  :agent-input-schema="visibleTelaAgentInputSchema"
777
803
  :agent-input-schema-loading="visibleTelaAgentInputSchemaLoading"
804
+ :agent-skills="agentSkills"
805
+ :agent-context-files="agentContextFiles"
778
806
  :show-cancel-button="resolvedFeatures.showCancelButton"
779
807
  centered
780
808
  @send="handleSend"
@@ -801,6 +829,8 @@ async function handleDelete() {
801
829
  :workspace-settings="effectiveWorkspaceSettings"
802
830
  :agent-input-schema="visibleTelaAgentInputSchema"
803
831
  :agent-input-schema-loading="visibleTelaAgentInputSchemaLoading"
832
+ :agent-skills="agentSkills"
833
+ :agent-context-files="agentContextFiles"
804
834
  :show-cancel-button="resolvedFeatures.showCancelButton"
805
835
  has-disclaimer
806
836
  @send="handleSend"
@@ -7,6 +7,7 @@ type __VLS_Props = {
7
7
  hideSidebar?: boolean;
8
8
  sidebar?: ChatSidebarConfig;
9
9
  hideSettings?: boolean;
10
+ hideFolderHint?: boolean;
10
11
  user?: EmbedUser | null;
11
12
  features?: Partial<ChatFeatureConfig>;
12
13
  };
@@ -19,6 +20,7 @@ declare const __VLS_base: import("vue").DefineComponent<__VLS_Props, {}, {}, {},
19
20
  }, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{
20
21
  "onUpdate:conversationId"?: ((value: string | null) => any) | undefined;
21
22
  }>, {
23
+ hideFolderHint: boolean;
22
24
  hideSettings: boolean;
23
25
  hideSidebar: boolean;
24
26
  initialConversationId: string | null;
@@ -1,5 +1,6 @@
1
1
  import { type ChatActionPayload } from '../../messages/composables/chat-action.js';
2
2
  import { type MessageFeedbackPayload } from '../../messages/composables/chat-feedback.js';
3
+ import { type ChatMessageTerminalPayload } from '../../messages/composables/chat-message-terminal.js';
3
4
  declare var __VLS_11: {};
4
5
  type __VLS_Slots = {} & {
5
6
  'sidebar-bottom'?: (props: typeof __VLS_11) => any;
@@ -8,10 +9,12 @@ declare const __VLS_base: import("vue").DefineComponent<import("../types.js").De
8
9
  "update:conversationId": (value: string | null) => any;
9
10
  messageFeedback: (payload: MessageFeedbackPayload) => any;
10
11
  action: (payload: ChatActionPayload) => any;
12
+ messageTerminal: (payload: ChatMessageTerminalPayload) => any;
11
13
  }, string, import("vue").PublicProps, Readonly<import("../types.js").DefaultChatEmbedProps | import("../types.js").TelaAgentChatEmbedProps> & Readonly<{
12
14
  "onUpdate:conversationId"?: ((value: string | null) => any) | undefined;
13
15
  onMessageFeedback?: ((payload: MessageFeedbackPayload) => any) | undefined;
14
16
  onAction?: ((payload: ChatActionPayload) => any) | undefined;
17
+ onMessageTerminal?: ((payload: ChatMessageTerminalPayload) => any) | undefined;
15
18
  }>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
16
19
  declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
17
20
  declare const _default: typeof __VLS_export;
@@ -2,6 +2,7 @@
2
2
  import { useChatAuth } from "#chat-auth";
3
3
  import { provideChatAction } from "../../messages/composables/chat-action";
4
4
  import { provideMessageFeedback } from "../../messages/composables/chat-feedback";
5
+ import { provideChatMessageTerminal } from "../../messages/composables/chat-message-terminal";
5
6
  import { provideChatRequestContext } from "../../shared/composables/chat-request-context";
6
7
  import { provideEmbedConfig, useEmbedConfig } from "../composables/embed-config";
7
8
  import { normalizeConversationScope, normalizeTelaAgentId, resolveConversationScopeKeySegment } from "../../conversations/scope";
@@ -14,6 +15,7 @@ const props = defineProps({
14
15
  hideSidebar: { type: Boolean, required: false },
15
16
  sidebar: { type: Object, required: false },
16
17
  hideSettings: { type: Boolean, required: false },
18
+ hideFolderHint: { type: Boolean, required: false },
17
19
  loadingMessages: { type: [Array, null], required: false },
18
20
  loadingMessagesMode: { type: [String, null], required: false },
19
21
  customComponents: { type: Object, required: false },
@@ -26,7 +28,7 @@ const props = defineProps({
26
28
  user: { type: null, required: false },
27
29
  features: { type: Object, required: false }
28
30
  });
29
- const emit = defineEmits(["update:conversationId", "action", "messageFeedback"]);
31
+ const emit = defineEmits(["update:conversationId", "action", "messageFeedback", "messageTerminal"]);
30
32
  const parentEmbedConfig = useEmbedConfig();
31
33
  const { activeOrganization } = useChatAuth();
32
34
  const workspaceId = computed(() => activeOrganization.value?.id?.trim() ?? "");
@@ -80,6 +82,9 @@ provideChatAction((payload) => {
80
82
  provideMessageFeedback((payload) => {
81
83
  emit("messageFeedback", payload);
82
84
  });
85
+ provideChatMessageTerminal((payload) => {
86
+ emit("messageTerminal", payload);
87
+ });
83
88
  </script>
84
89
 
85
90
  <template>
@@ -91,6 +96,7 @@ provideMessageFeedback((payload) => {
91
96
  :hide-sidebar="hideSidebar"
92
97
  :sidebar="sidebar"
93
98
  :hide-settings="hideSettings"
99
+ :hide-folder-hint="hideFolderHint"
94
100
  :user="normalizedTelaAgentId ? null : user"
95
101
  :features="features"
96
102
  @update:conversation-id="$emit('update:conversationId', $event)"
@@ -1,5 +1,6 @@
1
1
  import { type ChatActionPayload } from '../../messages/composables/chat-action.js';
2
2
  import { type MessageFeedbackPayload } from '../../messages/composables/chat-feedback.js';
3
+ import { type ChatMessageTerminalPayload } from '../../messages/composables/chat-message-terminal.js';
3
4
  declare var __VLS_11: {};
4
5
  type __VLS_Slots = {} & {
5
6
  'sidebar-bottom'?: (props: typeof __VLS_11) => any;
@@ -8,10 +9,12 @@ declare const __VLS_base: import("vue").DefineComponent<import("../types.js").De
8
9
  "update:conversationId": (value: string | null) => any;
9
10
  messageFeedback: (payload: MessageFeedbackPayload) => any;
10
11
  action: (payload: ChatActionPayload) => any;
12
+ messageTerminal: (payload: ChatMessageTerminalPayload) => any;
11
13
  }, string, import("vue").PublicProps, Readonly<import("../types.js").DefaultChatEmbedProps | import("../types.js").TelaAgentChatEmbedProps> & Readonly<{
12
14
  "onUpdate:conversationId"?: ((value: string | null) => any) | undefined;
13
15
  onMessageFeedback?: ((payload: MessageFeedbackPayload) => any) | undefined;
14
16
  onAction?: ((payload: ChatActionPayload) => any) | undefined;
17
+ onMessageTerminal?: ((payload: ChatMessageTerminalPayload) => any) | undefined;
15
18
  }>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
16
19
  declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
17
20
  declare const _default: typeof __VLS_export;
@@ -1,5 +1,7 @@
1
1
  import type { DefineSetupFnComponent, SlotsType } from 'vue';
2
2
  import type { ChatActionPayload } from '../../messages/composables/chat-action.js';
3
+ import type { MessageFeedbackPayload } from '../../messages/composables/chat-feedback.js';
4
+ import type { ChatMessageTerminalPayload } from '../../messages/composables/chat-message-terminal.js';
3
5
  import type { ChatFeatureConfig } from '../feature-config.js';
4
6
  import type { ChatSidebarConfig, DefaultChatEmbedProps, MeistrariChatEmbedProps, TelaAgentChatEmbedProps } from '../types.js';
5
7
 
@@ -8,6 +10,10 @@ type MeistrariChatEmbedEmits = {
8
10
  'update:conversationId': (value: string | null) => any;
9
11
  /** Fired when an assistant message triggers a host-handled action. */
10
12
  'action': (payload: ChatActionPayload) => any;
13
+ /** Fired when a user submits feedback for an assistant message. */
14
+ 'messageFeedback': (payload: MessageFeedbackPayload) => any;
15
+ /** Fired after polling observes an assistant message reach a terminal status. */
16
+ 'messageTerminal': (payload: ChatMessageTerminalPayload) => any;
11
17
  };
12
18
 
13
19
  type MeistrariChatEmbedSlots = SlotsType<{
@@ -44,4 +50,4 @@ type MeistrariChatEmbedSlots = SlotsType<{
44
50
  declare const MeistrariChatEmbed: DefineSetupFnComponent<MeistrariChatEmbedProps, MeistrariChatEmbedEmits, MeistrariChatEmbedSlots>;
45
51
 
46
52
  export default MeistrariChatEmbed;
47
- export type { ChatActionPayload, ChatFeatureConfig, ChatSidebarConfig, DefaultChatEmbedProps, MeistrariChatEmbedProps, TelaAgentChatEmbedProps };
53
+ export type { ChatActionPayload, ChatFeatureConfig, ChatMessageTerminalPayload, ChatSidebarConfig, DefaultChatEmbedProps, MeistrariChatEmbedProps, MessageFeedbackPayload, TelaAgentChatEmbedProps };
@@ -8,6 +8,7 @@ const props = defineProps({
8
8
  hideSidebar: { type: Boolean, required: false },
9
9
  sidebar: { type: Object, required: false },
10
10
  hideSettings: { type: Boolean, required: false },
11
+ hideFolderHint: { type: Boolean, required: false },
11
12
  loadingMessages: { type: [Array, null], required: false },
12
13
  loadingMessagesMode: { type: [String, null], required: false },
13
14
  customComponents: { type: Object, required: false },
@@ -20,7 +21,7 @@ const props = defineProps({
20
21
  user: { type: null, required: false },
21
22
  features: { type: Object, required: false }
22
23
  });
23
- defineEmits(["update:conversationId", "action", "messageFeedback"]);
24
+ defineEmits(["update:conversationId", "action", "messageFeedback", "messageTerminal"]);
24
25
  defineSlots();
25
26
  const hideSettings = computed(() => props.hideSettings ?? false);
26
27
  </script>
@@ -37,6 +38,7 @@ const hideSettings = computed(() => props.hideSettings ?? false);
37
38
  :hide-sidebar="hideSidebar"
38
39
  :sidebar="sidebar"
39
40
  :hide-settings="hideSettings"
41
+ :hide-folder-hint="hideFolderHint"
40
42
  :features="features"
41
43
  :loading-messages="loadingMessages"
42
44
  :loading-messages-mode="loadingMessagesMode"
@@ -47,6 +49,7 @@ const hideSettings = computed(() => props.hideSettings ?? false);
47
49
  @update:conversation-id="$emit('update:conversationId', $event)"
48
50
  @action="$emit('action', $event)"
49
51
  @message-feedback="$emit('messageFeedback', $event)"
52
+ @message-terminal="$emit('messageTerminal', $event)"
50
53
  >
51
54
  <template v-if="$slots['sidebar-bottom']" #sidebar-bottom>
52
55
  <slot name="sidebar-bottom" />
@@ -63,6 +66,7 @@ const hideSettings = computed(() => props.hideSettings ?? false);
63
66
  :hide-sidebar="hideSidebar"
64
67
  :sidebar="sidebar"
65
68
  :hide-settings="hideSettings"
69
+ :hide-folder-hint="hideFolderHint"
66
70
  :features="features"
67
71
  :loading-messages="loadingMessages"
68
72
  :loading-messages-mode="loadingMessagesMode"
@@ -73,6 +77,7 @@ const hideSettings = computed(() => props.hideSettings ?? false);
73
77
  @update:conversation-id="$emit('update:conversationId', $event)"
74
78
  @action="$emit('action', $event)"
75
79
  @message-feedback="$emit('messageFeedback', $event)"
80
+ @message-terminal="$emit('messageTerminal', $event)"
76
81
  >
77
82
  <template v-if="$slots['sidebar-bottom']" #sidebar-bottom>
78
83
  <slot name="sidebar-bottom" />
@@ -1,5 +1,7 @@
1
1
  import type { DefineSetupFnComponent, SlotsType } from 'vue';
2
2
  import type { ChatActionPayload } from '../../messages/composables/chat-action.js';
3
+ import type { MessageFeedbackPayload } from '../../messages/composables/chat-feedback.js';
4
+ import type { ChatMessageTerminalPayload } from '../../messages/composables/chat-message-terminal.js';
3
5
  import type { ChatFeatureConfig } from '../feature-config.js';
4
6
  import type { ChatSidebarConfig, DefaultChatEmbedProps, MeistrariChatEmbedProps, TelaAgentChatEmbedProps } from '../types.js';
5
7
 
@@ -8,6 +10,10 @@ type MeistrariChatEmbedEmits = {
8
10
  'update:conversationId': (value: string | null) => any;
9
11
  /** Fired when an assistant message triggers a host-handled action. */
10
12
  'action': (payload: ChatActionPayload) => any;
13
+ /** Fired when a user submits feedback for an assistant message. */
14
+ 'messageFeedback': (payload: MessageFeedbackPayload) => any;
15
+ /** Fired after polling observes an assistant message reach a terminal status. */
16
+ 'messageTerminal': (payload: ChatMessageTerminalPayload) => any;
11
17
  };
12
18
 
13
19
  type MeistrariChatEmbedSlots = SlotsType<{
@@ -44,4 +50,4 @@ type MeistrariChatEmbedSlots = SlotsType<{
44
50
  declare const MeistrariChatEmbed: DefineSetupFnComponent<MeistrariChatEmbedProps, MeistrariChatEmbedEmits, MeistrariChatEmbedSlots>;
45
51
 
46
52
  export default MeistrariChatEmbed;
47
- export type { ChatActionPayload, ChatFeatureConfig, ChatSidebarConfig, DefaultChatEmbedProps, MeistrariChatEmbedProps, TelaAgentChatEmbedProps };
53
+ export type { ChatActionPayload, ChatFeatureConfig, ChatMessageTerminalPayload, ChatSidebarConfig, DefaultChatEmbedProps, MeistrariChatEmbedProps, MessageFeedbackPayload, TelaAgentChatEmbedProps };
@@ -5,6 +5,7 @@ type __VLS_Props = {
5
5
  conversations: DeepReadonly<Conversation[]>;
6
6
  activeId: string | null;
7
7
  loading?: boolean;
8
+ hideFolderHint?: boolean;
8
9
  userName?: string;
9
10
  userEmail?: string;
10
11
  userImage?: string;
@@ -13,6 +13,7 @@ const props = defineProps({
13
13
  conversations: { type: null, required: true },
14
14
  activeId: { type: [String, null], required: true },
15
15
  loading: { type: Boolean, required: false },
16
+ hideFolderHint: { type: Boolean, required: false },
16
17
  userName: { type: String, required: false },
17
18
  userEmail: { type: String, required: false },
18
19
  userImage: { type: String, required: false }
@@ -338,7 +339,7 @@ async function handleConversationDrop(event, groupId) {
338
339
  <span h-10px w-84px rounded-full bg-neutral-100 />
339
340
  </div>
340
341
  </div>
341
- <p px-4px text-14px text-neutral-500 leading-20px>
342
+ <p v-if="!hideFolderHint" px-4px text-14px text-neutral-500 leading-20px>
342
343
  Suas pastas aparecem aqui. Crie uma para começar a agrupar conversas.
343
344
  </p>
344
345
  <ChatConversationNewGroupButton label="Criar pasta" variant="empty-state" />
@@ -5,6 +5,7 @@ type __VLS_Props = {
5
5
  conversations: DeepReadonly<Conversation[]>;
6
6
  activeId: string | null;
7
7
  loading?: boolean;
8
+ hideFolderHint?: boolean;
8
9
  userName?: string;
9
10
  userEmail?: string;
10
11
  userImage?: string;
@@ -3,7 +3,7 @@ import type { Conversation, ConversationWithMessages, Message } from '../../../t
3
3
  import type { ConversationFile } from '../../../types/schemas/chat/files.js';
4
4
  import type { TopbarTab } from '../../../types/schemas/chat/ui.js';
5
5
  import type { WorkspaceSettingsResponse as WorkspaceSettings } from '../../../types/schemas/chat/workspace-settings.js';
6
- import type { TelaAgentInputVariable } from '../../../types/schemas/integrations/tela-agent-api.js';
6
+ import type { TelaAgentContextFile, TelaAgentInputVariable, TelaAgentSkill } from '../../../types/schemas/integrations/tela-agent-api.js';
7
7
  import type { ChatActor } from '../../types.js';
8
8
  type __VLS_Props = {
9
9
  currentConversation: DeepReadonly<ConversationWithMessages> | null;
@@ -14,6 +14,8 @@ type __VLS_Props = {
14
14
  activeConversationId: string | null;
15
15
  agentInputSchema?: readonly TelaAgentInputVariable[] | null;
16
16
  agentInputSchemaLoading?: boolean;
17
+ agentSkills?: readonly TelaAgentSkill[] | null;
18
+ agentContextFiles?: readonly TelaAgentContextFile[] | null;
17
19
  conversations: DeepReadonly<Conversation[]>;
18
20
  conversationsLoading?: boolean;
19
21
  conversationFiles: ConversationFile[];
@@ -25,6 +27,7 @@ type __VLS_Props = {
25
27
  hasPendingMessage?: boolean;
26
28
  hideSettings?: boolean;
27
29
  hideSidebar?: boolean;
30
+ hideFolderHint?: boolean;
28
31
  isEditing: boolean;
29
32
  loading?: boolean;
30
33
  messages: Message[];
@@ -19,6 +19,8 @@ const props = defineProps({
19
19
  activeConversationId: { type: [String, null], required: true },
20
20
  agentInputSchema: { type: [Array, null], required: false },
21
21
  agentInputSchemaLoading: { type: Boolean, required: false },
22
+ agentSkills: { type: [Array, null], required: false },
23
+ agentContextFiles: { type: [Array, null], required: false },
22
24
  conversations: { type: null, required: true },
23
25
  conversationsLoading: { type: Boolean, required: false },
24
26
  conversationFiles: { type: Array, required: true },
@@ -30,6 +32,7 @@ const props = defineProps({
30
32
  hasPendingMessage: { type: Boolean, required: false },
31
33
  hideSettings: { type: Boolean, required: false },
32
34
  hideSidebar: { type: Boolean, required: false },
35
+ hideFolderHint: { type: Boolean, required: false },
33
36
  isEditing: { type: Boolean, required: true },
34
37
  loading: { type: Boolean, required: false },
35
38
  messages: { type: Array, required: true },
@@ -137,6 +140,7 @@ function startNewConversationFromOutdatedSettings() {
137
140
  :conversations="conversations"
138
141
  :active-id="activeConversationId"
139
142
  :loading="conversationsLoading"
143
+ :hide-folder-hint="hideFolderHint"
140
144
  :user-name="currentUser?.name ?? void 0"
141
145
  :user-email="currentUser?.email ?? void 0"
142
146
  :user-image="currentUser?.image ?? void 0"
@@ -232,6 +236,8 @@ function startNewConversationFromOutdatedSettings() {
232
236
  :workspace-settings="workspaceSettings"
233
237
  :agent-input-schema="agentInputSchema"
234
238
  :agent-input-schema-loading="agentInputSchemaLoading"
239
+ :agent-skills="agentSkills"
240
+ :agent-context-files="agentContextFiles"
235
241
  :show-cancel-button="showCancelButton"
236
242
  centered
237
243
  @send="(content, files, agentInputs) => emit('send', content, files, agentInputs)"
@@ -3,7 +3,7 @@ import type { Conversation, ConversationWithMessages, Message } from '../../../t
3
3
  import type { ConversationFile } from '../../../types/schemas/chat/files.js';
4
4
  import type { TopbarTab } from '../../../types/schemas/chat/ui.js';
5
5
  import type { WorkspaceSettingsResponse as WorkspaceSettings } from '../../../types/schemas/chat/workspace-settings.js';
6
- import type { TelaAgentInputVariable } from '../../../types/schemas/integrations/tela-agent-api.js';
6
+ import type { TelaAgentContextFile, TelaAgentInputVariable, TelaAgentSkill } from '../../../types/schemas/integrations/tela-agent-api.js';
7
7
  import type { ChatActor } from '../../types.js';
8
8
  type __VLS_Props = {
9
9
  currentConversation: DeepReadonly<ConversationWithMessages> | null;
@@ -14,6 +14,8 @@ type __VLS_Props = {
14
14
  activeConversationId: string | null;
15
15
  agentInputSchema?: readonly TelaAgentInputVariable[] | null;
16
16
  agentInputSchemaLoading?: boolean;
17
+ agentSkills?: readonly TelaAgentSkill[] | null;
18
+ agentContextFiles?: readonly TelaAgentContextFile[] | null;
17
19
  conversations: DeepReadonly<Conversation[]>;
18
20
  conversationsLoading?: boolean;
19
21
  conversationFiles: ConversationFile[];
@@ -25,6 +27,7 @@ type __VLS_Props = {
25
27
  hasPendingMessage?: boolean;
26
28
  hideSettings?: boolean;
27
29
  hideSidebar?: boolean;
30
+ hideFolderHint?: boolean;
28
31
  isEditing: boolean;
29
32
  loading?: boolean;
30
33
  messages: Message[];
@@ -1,8 +1,8 @@
1
- import type { TelaAgent } from '../../types/schemas/integrations/tela-agent-api.js';
1
+ import type { TelaAgentSummary } from '../../types/schemas/integrations/tela-agent-api.js';
2
2
  export declare function useTelaAgentMetadata(): {
3
3
  agentId: any;
4
4
  metadata: any;
5
5
  loading: any;
6
6
  error: any;
7
- fetchAgentMetadata: () => Promise<TelaAgent | null>;
7
+ fetchAgentMetadata: () => Promise<TelaAgentSummary | null>;
8
8
  };
@@ -44,6 +44,8 @@ export type ChatEmbedSharedProps = {
44
44
  sidebar?: ChatSidebarConfig;
45
45
  /** Hide workspace settings actions while keeping the chat header and content unchanged. */
46
46
  hideSettings?: boolean;
47
+ /** Hide the folder onboarding hint while keeping folder creation actions available. */
48
+ hideFolderHint?: boolean;
47
49
  /** Custom pending-response messages shown while the assistant is working. */
48
50
  loadingMessages?: readonly string[] | null;
49
51
  /** How custom loading messages rotate. Defaults to ordered behavior when omitted. */