@meistrari/chat-nuxt 3.9.2 → 3.11.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 (106) hide show
  1. package/README.md +50 -440
  2. package/dist/module.d.mts +1 -1
  3. package/dist/module.json +1 -1
  4. package/dist/runtime/assets/css/markstream.css +1 -1
  5. package/dist/runtime/conversations/components/chat-conversation-creator-filter.vue +11 -67
  6. package/dist/runtime/conversations/components/chat-conversation-item.d.vue.ts +2 -1
  7. package/dist/runtime/conversations/components/chat-conversation-item.vue +29 -33
  8. package/dist/runtime/conversations/components/chat-conversation-item.vue.d.ts +2 -1
  9. package/dist/runtime/conversations/components/chat-conversation-list.d.vue.ts +0 -1
  10. package/dist/runtime/conversations/components/chat-conversation-list.vue +117 -158
  11. package/dist/runtime/conversations/components/chat-conversation-list.vue.d.ts +0 -1
  12. package/dist/runtime/conversations/components/chat-conversation-new-group-button.vue +34 -73
  13. package/dist/runtime/conversations/components/chat-conversation-search.vue +1 -21
  14. package/dist/runtime/conversations/components/chat-widget-history-list.d.vue.ts +12 -0
  15. package/dist/runtime/conversations/components/chat-widget-history-list.vue +27 -0
  16. package/dist/runtime/conversations/components/chat-widget-history-list.vue.d.ts +12 -0
  17. package/dist/runtime/conversations/composables/conversation-groups.d.ts +1 -0
  18. package/dist/runtime/conversations/composables/conversation-groups.js +2 -0
  19. package/dist/runtime/conversations/composables/conversation-item.js +4 -4
  20. package/dist/runtime/conversations/composables/conversation-list.js +14 -5
  21. package/dist/runtime/embed/components/chat-configuration-modal.d.vue.ts +3 -3
  22. package/dist/runtime/embed/components/chat-configuration-modal.vue.d.ts +3 -3
  23. package/dist/runtime/embed/components/chat-embed-inner.d.vue.ts +6 -3
  24. package/dist/runtime/embed/components/chat-embed-inner.vue +442 -174
  25. package/dist/runtime/embed/components/chat-embed-inner.vue.d.ts +6 -3
  26. package/dist/runtime/embed/components/chat-embed.d.vue.ts +31 -4
  27. package/dist/runtime/embed/components/chat-embed.vue +10 -4
  28. package/dist/runtime/embed/components/chat-embed.vue.d.ts +31 -4
  29. package/dist/runtime/embed/components/chat-topbar.vue +83 -85
  30. package/dist/runtime/embed/components/meistrari-chat-embed.d.vue.ts +5 -3
  31. package/dist/runtime/embed/components/meistrari-chat-embed.vue +118 -57
  32. package/dist/runtime/embed/components/meistrari-chat-embed.vue.d.ts +5 -3
  33. package/dist/runtime/embed/components/mobile/chat-mobile-drawer.d.vue.ts +0 -1
  34. package/dist/runtime/embed/components/mobile/chat-mobile-drawer.vue +2 -45
  35. package/dist/runtime/embed/components/mobile/chat-mobile-drawer.vue.d.ts +0 -1
  36. package/dist/runtime/embed/components/mobile/chat-mobile-home-suggestions.d.vue.ts +9 -5
  37. package/dist/runtime/embed/components/mobile/chat-mobile-home-suggestions.vue +14 -25
  38. package/dist/runtime/embed/components/mobile/chat-mobile-home-suggestions.vue.d.ts +9 -5
  39. package/dist/runtime/embed/components/mobile/chat-mobile-shell.d.vue.ts +4 -4
  40. package/dist/runtime/embed/components/mobile/chat-mobile-shell.vue +2 -4
  41. package/dist/runtime/embed/components/mobile/chat-mobile-shell.vue.d.ts +4 -4
  42. package/dist/runtime/embed/composables/use-agent-wake.d.ts +23 -0
  43. package/dist/runtime/embed/composables/use-agent-wake.js +182 -0
  44. package/dist/runtime/embed/feature-config.d.ts +7 -0
  45. package/dist/runtime/embed/feature-config.js +2 -1
  46. package/dist/runtime/embed/loading-messages.d.ts +16 -0
  47. package/dist/runtime/embed/loading-messages.js +10 -0
  48. package/dist/runtime/embed/types.d.ts +47 -8
  49. package/dist/runtime/files/icons.d.ts +1 -1
  50. package/dist/runtime/files/icons.js +1 -1
  51. package/dist/runtime/messages/components/chat-mention-dropdown.d.vue.ts +6 -1
  52. package/dist/runtime/messages/components/chat-mention-dropdown.vue +46 -22
  53. package/dist/runtime/messages/components/chat-mention-dropdown.vue.d.ts +6 -1
  54. package/dist/runtime/messages/components/chat-message-bubble.d.vue.ts +10 -1
  55. package/dist/runtime/messages/components/chat-message-bubble.vue +69 -76
  56. package/dist/runtime/messages/components/chat-message-bubble.vue.d.ts +10 -1
  57. package/dist/runtime/messages/components/chat-message-feedback.vue +25 -229
  58. package/dist/runtime/messages/components/chat-message-input.vue +176 -134
  59. package/dist/runtime/messages/components/chat-message-list.d.vue.ts +12 -1
  60. package/dist/runtime/messages/components/chat-message-list.vue +37 -24
  61. package/dist/runtime/messages/components/chat-message-list.vue.d.ts +12 -1
  62. package/dist/runtime/messages/components/chat-model-selector.vue +10 -22
  63. package/dist/runtime/messages/components/reasoning/chat-reasoning-message.vue +2 -3
  64. package/dist/runtime/messages/components/reasoning/chat-reasoning-thought.d.vue.ts +2 -1
  65. package/dist/runtime/messages/components/reasoning/chat-reasoning-thought.vue +69 -77
  66. package/dist/runtime/messages/components/reasoning/chat-reasoning-thought.vue.d.ts +2 -1
  67. package/dist/runtime/messages/components/reasoning/chat-thinking-indicator.vue +3 -9
  68. package/dist/runtime/messages/components/widgets/chat-bash-widget.vue +3 -12
  69. package/dist/runtime/messages/components/widgets/chat-doc-sdk-widget.vue +3 -12
  70. package/dist/runtime/messages/components/widgets/chat-generic-tool-widget.vue +3 -12
  71. package/dist/runtime/messages/components/widgets/chat-grep-widget.vue +7 -17
  72. package/dist/runtime/messages/components/widgets/chat-read-widget.vue +7 -17
  73. package/dist/runtime/messages/components/widgets/chat-tela-skill-widget.vue +4 -13
  74. package/dist/runtime/messages/components/widgets/chat-thinking-widget.vue +11 -22
  75. package/dist/runtime/messages/components/widgets/chat-web-search-widget.vue +13 -40
  76. package/dist/runtime/messages/components/widgets/chat-workstation-query-widget.vue +52 -65
  77. package/dist/runtime/messages/components/widgets/chat-write-widget.vue +8 -18
  78. package/dist/runtime/messages/composables/chat.d.ts +8 -2
  79. package/dist/runtime/messages/composables/chat.js +180 -25
  80. package/dist/runtime/messages/composables/mention-autocomplete.js +4 -0
  81. package/dist/runtime/messages/composables/use-direct-stream.d.ts +41 -0
  82. package/dist/runtime/messages/composables/use-direct-stream.js +263 -0
  83. package/dist/runtime/messages/message-state.js +1 -0
  84. package/dist/runtime/messages/reasoning.d.ts +7 -0
  85. package/dist/runtime/messages/reasoning.js +5 -0
  86. package/dist/runtime/public/files/generic.svg +2 -5
  87. package/dist/runtime/public/files/image.svg +2 -1
  88. package/dist/runtime/types/embed.d.ts +1 -1
  89. package/dist/runtime/types/schemas/chat/conversations.d.ts +4 -0
  90. package/dist/runtime/types/schemas/chat/conversations.js +3 -0
  91. package/dist/runtime/types/schemas/chat/messages.d.ts +43 -0
  92. package/dist/runtime/types/schemas/chat/messages.js +31 -0
  93. package/dist/runtime/types/schemas/chat/models.d.ts +3 -2
  94. package/dist/runtime/types/schemas/chat/models.js +2 -1
  95. package/dist/runtime/types/schemas/chat/ui.d.ts +10 -0
  96. package/dist/runtime/types/schemas/chat/ui.js +1 -0
  97. package/dist/runtime/types/schemas/integrations/tela-agent-api.d.ts +35 -0
  98. package/dist/runtime/types/schemas/integrations/tela-agent-api.js +17 -0
  99. package/dist/types.d.mts +1 -1
  100. package/package.json +5 -4
  101. package/dist/runtime/conversations/components/chat-conversation-new-group-popover-content.d.vue.ts +0 -23
  102. package/dist/runtime/conversations/components/chat-conversation-new-group-popover-content.vue +0 -75
  103. package/dist/runtime/conversations/components/chat-conversation-new-group-popover-content.vue.d.ts +0 -23
  104. package/dist/runtime/messages/components/reasoning/chat-reasoning-step-item.d.vue.ts +0 -37
  105. package/dist/runtime/messages/components/reasoning/chat-reasoning-step-item.vue +0 -125
  106. package/dist/runtime/messages/components/reasoning/chat-reasoning-step-item.vue.d.ts +0 -37
@@ -1,5 +1,5 @@
1
1
  import type { ChatFeatureConfig } from '../feature-config.js';
2
- import type { ChatActor, ChatSidebarConfig } from '../types.js';
2
+ import type { ChatActor, ChatSidebarConfig, ChatSuggestion } from '../types.js';
3
3
  type EmbedUser = ChatActor;
4
4
  type __VLS_Props = {
5
5
  conversationId?: string | null;
@@ -7,7 +7,8 @@ type __VLS_Props = {
7
7
  hideSidebar?: boolean;
8
8
  sidebar?: ChatSidebarConfig;
9
9
  hideSettings?: boolean;
10
- hideFolderHint?: boolean;
10
+ compact?: boolean;
11
+ suggestions?: readonly ChatSuggestion[] | null;
11
12
  user?: EmbedUser | null;
12
13
  features?: Partial<ChatFeatureConfig>;
13
14
  };
@@ -17,13 +18,15 @@ type __VLS_Slots = {} & {
17
18
  };
18
19
  declare const __VLS_base: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {} & {
19
20
  "update:conversationId": (value: string | null) => any;
21
+ "update:conversationTitle": (value: string | null) => any;
20
22
  }, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{
21
23
  "onUpdate:conversationId"?: ((value: string | null) => any) | undefined;
24
+ "onUpdate:conversationTitle"?: ((value: string | null) => any) | undefined;
22
25
  }>, {
23
- hideFolderHint: boolean;
24
26
  hideSettings: boolean;
25
27
  hideSidebar: boolean;
26
28
  initialConversationId: string | null;
29
+ compact: boolean;
27
30
  }, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
28
31
  declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
29
32
  declare const _default: typeof __VLS_export;
@@ -1,17 +1,44 @@
1
+ import { useChatAuth } from '#chat-auth';
1
2
  import { type ChatActionPayload } from '../../messages/composables/chat-action.js';
2
3
  import { type MessageFeedbackPayload } from '../../messages/composables/chat-feedback.js';
3
4
  import { type ChatMessageTerminalPayload } from '../../messages/composables/chat-message-terminal.js';
4
- declare var __VLS_11: {};
5
+ declare var __VLS_12: {};
5
6
  type __VLS_Slots = {} & {
6
- 'sidebar-bottom'?: (props: typeof __VLS_11) => any;
7
+ 'sidebar-bottom'?: (props: typeof __VLS_12) => any;
7
8
  };
8
- declare const __VLS_base: import("vue").DefineComponent<import("../types.js").DefaultChatEmbedProps | import("../types.js").TelaAgentChatEmbedProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {} & {
9
+ declare const __VLS_base: import("vue").DefineComponent<(import("../types.js").ChatEmbedSharedProps & {
10
+ telaAgentId?: undefined;
11
+ telaAgentInputs?: undefined;
12
+ workspaceSettings?: import("vue").DeepReadonly<useChatAuth> | useChatAuth | null;
13
+ user?: import("../types.js").ChatActor | null;
14
+ features?: Partial<import("../feature-config.js").ChatFeatureConfig>;
15
+ } & import("../types.js").ChatEmbedVariantProps) | (import("../types.js").ChatEmbedSharedProps & {
16
+ telaAgentId: string;
17
+ telaAgentInputs?: import("vue").DeepReadonly<useChatAuth[]> | null;
18
+ workspaceSettings?: never;
19
+ user?: never;
20
+ features?: Partial<import("../feature-config.js").ChatFeatureConfig>;
21
+ } & import("../types.js").ChatEmbedVariantProps), {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {} & {
9
22
  "update:conversationId": (value: string | null) => any;
23
+ "update:conversationTitle": (value: string | null) => any;
10
24
  messageFeedback: (payload: MessageFeedbackPayload) => any;
11
25
  action: (payload: ChatActionPayload) => any;
12
26
  messageTerminal: (payload: ChatMessageTerminalPayload) => any;
13
- }, string, import("vue").PublicProps, Readonly<import("../types.js").DefaultChatEmbedProps | import("../types.js").TelaAgentChatEmbedProps> & Readonly<{
27
+ }, string, import("vue").PublicProps, Readonly<(import("../types.js").ChatEmbedSharedProps & {
28
+ telaAgentId?: undefined;
29
+ telaAgentInputs?: undefined;
30
+ workspaceSettings?: import("vue").DeepReadonly<useChatAuth> | useChatAuth | null;
31
+ user?: import("../types.js").ChatActor | null;
32
+ features?: Partial<import("../feature-config.js").ChatFeatureConfig>;
33
+ } & import("../types.js").ChatEmbedVariantProps) | (import("../types.js").ChatEmbedSharedProps & {
34
+ telaAgentId: string;
35
+ telaAgentInputs?: import("vue").DeepReadonly<useChatAuth[]> | null;
36
+ workspaceSettings?: never;
37
+ user?: never;
38
+ features?: Partial<import("../feature-config.js").ChatFeatureConfig>;
39
+ } & import("../types.js").ChatEmbedVariantProps)> & Readonly<{
14
40
  "onUpdate:conversationId"?: ((value: string | null) => any) | undefined;
41
+ "onUpdate:conversationTitle"?: ((value: string | null) => any) | undefined;
15
42
  onMessageFeedback?: ((payload: MessageFeedbackPayload) => any) | undefined;
16
43
  onAction?: ((payload: ChatActionPayload) => any) | undefined;
17
44
  onMessageTerminal?: ((payload: ChatMessageTerminalPayload) => any) | undefined;
@@ -15,7 +15,8 @@ const props = defineProps({
15
15
  hideSidebar: { type: Boolean, required: false },
16
16
  sidebar: { type: Object, required: false },
17
17
  hideSettings: { type: Boolean, required: false },
18
- hideFolderHint: { type: Boolean, required: false },
18
+ compact: { type: Boolean, required: false },
19
+ suggestions: { type: [Array, null], required: false },
19
20
  loadingMessages: { type: [Array, null], required: false },
20
21
  loadingMessagesMode: { type: [String, null], required: false },
21
22
  customComponents: { type: Object, required: false },
@@ -27,9 +28,12 @@ const props = defineProps({
27
28
  telaAgentInputs: { type: null, required: false },
28
29
  workspaceSettings: { type: null, required: false },
29
30
  user: { type: null, required: false },
30
- features: { type: Object, required: false }
31
+ features: { type: Object, required: false },
32
+ variant: { type: String, required: false },
33
+ defaultOpen: { type: Boolean, required: false },
34
+ launcherLabel: { type: String, required: false }
31
35
  });
32
- const emit = defineEmits(["update:conversationId", "action", "messageFeedback", "messageTerminal"]);
36
+ const emit = defineEmits(["update:conversationId", "update:conversationTitle", "action", "messageFeedback", "messageTerminal"]);
33
37
  const parentEmbedConfig = useEmbedConfig();
34
38
  const { activeOrganization } = useChatAuth();
35
39
  const workspaceId = computed(() => activeOrganization.value?.id?.trim() ?? "");
@@ -98,10 +102,12 @@ provideChatMessageTerminal((payload) => {
98
102
  :hide-sidebar="hideSidebar"
99
103
  :sidebar="sidebar"
100
104
  :hide-settings="hideSettings"
101
- :hide-folder-hint="hideFolderHint"
105
+ :compact="compact"
106
+ :suggestions="suggestions"
102
107
  :user="normalizedTelaAgentId ? null : user"
103
108
  :features="features"
104
109
  @update:conversation-id="$emit('update:conversationId', $event)"
110
+ @update:conversation-title="$emit('update:conversationTitle', $event)"
105
111
  >
106
112
  <template v-if="$slots['sidebar-bottom']" #sidebar-bottom>
107
113
  <slot name="sidebar-bottom" />
@@ -1,17 +1,44 @@
1
+ import { useChatAuth } from '#chat-auth';
1
2
  import { type ChatActionPayload } from '../../messages/composables/chat-action.js';
2
3
  import { type MessageFeedbackPayload } from '../../messages/composables/chat-feedback.js';
3
4
  import { type ChatMessageTerminalPayload } from '../../messages/composables/chat-message-terminal.js';
4
- declare var __VLS_11: {};
5
+ declare var __VLS_12: {};
5
6
  type __VLS_Slots = {} & {
6
- 'sidebar-bottom'?: (props: typeof __VLS_11) => any;
7
+ 'sidebar-bottom'?: (props: typeof __VLS_12) => any;
7
8
  };
8
- declare const __VLS_base: import("vue").DefineComponent<import("../types.js").DefaultChatEmbedProps | import("../types.js").TelaAgentChatEmbedProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {} & {
9
+ declare const __VLS_base: import("vue").DefineComponent<(import("../types.js").ChatEmbedSharedProps & {
10
+ telaAgentId?: undefined;
11
+ telaAgentInputs?: undefined;
12
+ workspaceSettings?: import("vue").DeepReadonly<useChatAuth> | useChatAuth | null;
13
+ user?: import("../types.js").ChatActor | null;
14
+ features?: Partial<import("../feature-config.js").ChatFeatureConfig>;
15
+ } & import("../types.js").ChatEmbedVariantProps) | (import("../types.js").ChatEmbedSharedProps & {
16
+ telaAgentId: string;
17
+ telaAgentInputs?: import("vue").DeepReadonly<useChatAuth[]> | null;
18
+ workspaceSettings?: never;
19
+ user?: never;
20
+ features?: Partial<import("../feature-config.js").ChatFeatureConfig>;
21
+ } & import("../types.js").ChatEmbedVariantProps), {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {} & {
9
22
  "update:conversationId": (value: string | null) => any;
23
+ "update:conversationTitle": (value: string | null) => any;
10
24
  messageFeedback: (payload: MessageFeedbackPayload) => any;
11
25
  action: (payload: ChatActionPayload) => any;
12
26
  messageTerminal: (payload: ChatMessageTerminalPayload) => any;
13
- }, string, import("vue").PublicProps, Readonly<import("../types.js").DefaultChatEmbedProps | import("../types.js").TelaAgentChatEmbedProps> & Readonly<{
27
+ }, string, import("vue").PublicProps, Readonly<(import("../types.js").ChatEmbedSharedProps & {
28
+ telaAgentId?: undefined;
29
+ telaAgentInputs?: undefined;
30
+ workspaceSettings?: import("vue").DeepReadonly<useChatAuth> | useChatAuth | null;
31
+ user?: import("../types.js").ChatActor | null;
32
+ features?: Partial<import("../feature-config.js").ChatFeatureConfig>;
33
+ } & import("../types.js").ChatEmbedVariantProps) | (import("../types.js").ChatEmbedSharedProps & {
34
+ telaAgentId: string;
35
+ telaAgentInputs?: import("vue").DeepReadonly<useChatAuth[]> | null;
36
+ workspaceSettings?: never;
37
+ user?: never;
38
+ features?: Partial<import("../feature-config.js").ChatFeatureConfig>;
39
+ } & import("../types.js").ChatEmbedVariantProps)> & Readonly<{
14
40
  "onUpdate:conversationId"?: ((value: string | null) => any) | undefined;
41
+ "onUpdate:conversationTitle"?: ((value: string | null) => any) | undefined;
15
42
  onMessageFeedback?: ((payload: MessageFeedbackPayload) => any) | undefined;
16
43
  onAction?: ((payload: ChatActionPayload) => any) | undefined;
17
44
  onMessageTerminal?: ((payload: ChatMessageTerminalPayload) => any) | undefined;
@@ -19,27 +19,37 @@ const props = defineProps({
19
19
  const emit = defineEmits(["update:isEditing", "update:editTitle", "saveTitle", "cancelEditing", "rename", "duplicate", "export", "copyLink", "debug", "delete", "tabChange"]);
20
20
  const titleInputRef = ref(null);
21
21
  const currentTab = computed(() => props.activeTab ?? "chat");
22
+ const tabOptions = computed(() => {
23
+ const options = [
24
+ { id: "chat", name: "Chat" },
25
+ { id: "files", name: "Arquivos", count: props.filesCount }
26
+ ];
27
+ if (props.showUsageTab) {
28
+ options.push({ id: "usage", name: "Uso" });
29
+ }
30
+ return options;
31
+ });
22
32
  const titleInputWidth = computed(() => `${Math.max(props.editTitle.length + 2, 8)}ch`);
23
33
  const headerMenuItems = computed(() => {
24
34
  const items = [
25
35
  {
26
36
  label: "Renomear",
27
- icon: "i-ph-pencil-simple",
37
+ icon: "i-ph-pencil-simple-bold",
28
38
  click: () => emit("rename")
29
39
  },
30
40
  {
31
41
  label: "Duplicar",
32
- icon: "i-ph-copy",
42
+ icon: "i-ph-copy-bold",
33
43
  click: () => emit("duplicate")
34
44
  },
35
45
  {
36
46
  label: "Exportar",
37
- icon: "i-ph-download-simple",
47
+ icon: "i-ph-download-simple-bold",
38
48
  click: () => emit("export")
39
49
  },
40
50
  {
41
51
  label: "Copiar link",
42
- icon: "i-ph-link",
52
+ icon: "i-ph-link-bold",
43
53
  click: () => emit("copyLink")
44
54
  }
45
55
  ];
@@ -80,21 +90,20 @@ watch(() => props.isEditing, (editing) => {
80
90
  <template>
81
91
  <div
82
92
  flex items-center gap-16px
83
- pl-24px pr-16px h-64px
84
- b-b=".5px solid rgba(0,0,0,0.08)"
93
+ pl-24px pr-16px h-62px
94
+ border-b-0.5px border
85
95
  bg="white/94"
86
96
  backdrop-blur-sm
87
97
  absolute top-0 right-0 z-10
88
98
  :style="{ left: 'var(--chat-panel-offset)' }"
89
99
  >
90
- <div flex="~ col 1" gap-4px min-w-0>
100
+ <div flex="~ col 1" gap-1.5px min-w-0>
91
101
  <div
92
102
  v-if="isEditing"
93
103
  flex items-center
94
104
  text-primary
95
105
  w-fit max-w-full
96
- pb-1px
97
- b-b=".5px solid #A3A3A3"
106
+ b-b=".5px solid border"
98
107
  :style="{ width: titleInputWidth }"
99
108
  >
100
109
  <input
@@ -105,101 +114,92 @@ watch(() => props.isEditing, (editing) => {
105
114
  aria-label="Nome da conversa"
106
115
  w-full min-w-0 max-w-full
107
116
  bg-transparent border-none outline-none
108
- text-16px font-580 text-primary leading-20px tracking="-.2px"
117
+ heading-h5-semibold text-primary
109
118
  p-0
110
119
  @input="emit('update:editTitle', $event.target.value)"
111
120
  @keydown="handleTitleKeydown"
112
121
  @blur="emit('saveTitle')"
113
122
  >
114
123
  </div>
115
- <p
124
+ <h5
116
125
  v-else
117
- text-16px font-580 text-primary leading-20px tracking="-.2px"
118
- truncate cursor-text
126
+ heading-h5-semibold text-primary
127
+ truncate cursor-text border-b-0.5px border-transparent
119
128
  @dblclick.prevent.stop="emit('rename')"
120
129
  >
121
130
  {{ capitalizeFirst(title) }}<span v-if="generatingTitle" class="typing-cursor">|</span>
122
- </p>
131
+ </h5>
123
132
 
124
133
  <div flex items-center gap-8px>
125
- <div flex items-center gap-4px>
126
- <div flex items-center pr-2px>
127
- <div
128
- w-16px h-16px rounded-full overflow-hidden flex-shrink-0
129
- b="2px white"
130
- >
131
- <img
134
+ <span body-12-regular text-secondary>
135
+ Atualizado {{ formatRelativeTime(updatedAt) }}
136
+ </span>
137
+
138
+ <TelaDotSeparator />
139
+
140
+ <div flex items-center gap-6px>
141
+ <div flex items-center>
142
+ <div size-16px flex items-center justify-center rounded-full overflow-hidden flex-shrink-0>
143
+ <TelaAvatar
132
144
  v-if="creatorImage"
133
- :src="creatorImage"
145
+ :image="creatorImage"
146
+ size="2xs"
134
147
  :alt="creatorName ?? 'Usu\xE1rio'"
135
- w-full h-full object-cover
136
- >
148
+ />
137
149
  <div v-else w-full h-full bg-gray-200 flex items-center justify-center>
138
- <span text-8px text-gray-500 font-medium>
150
+ <span body-12-regular text-secondary>
139
151
  {{ (creatorName ?? creatorEmail ?? "U").charAt(0).toUpperCase() }}
140
152
  </span>
141
153
  </div>
142
154
  </div>
143
155
  </div>
144
- <span text-12px text-secondary leading-16px truncate>
156
+ <span body-12-regular text-secondary truncate>
145
157
  {{ creatorName ?? creatorEmail ?? "Usu\xE1rio" }}
146
158
  </span>
147
159
  </div>
148
- <span text-12px text-tertiary leading-16px>
149
- Atualizado {{ formatRelativeTime(updatedAt) }}
150
- </span>
151
160
  </div>
152
161
  </div>
153
162
 
154
- <div flex gap-2px items-start rounded-10px shrink-0>
155
- <button
156
- flex gap-8px items-center px-12px py-7px rounded-10px
157
- :class="currentTab === 'chat' ? 'bg-neutral-100' : 'hover:bg-neutral-50'"
158
- @click="emit('tabChange', 'chat')"
159
- >
160
- <span
161
- text-14px font-580 leading-18px tracking="-.15px"
162
- :class="currentTab === 'chat' ? 'text-gray-900' : 'text-gray-500'"
163
- >
164
- Chat
165
- </span>
166
- </button>
167
-
168
- <button
169
- flex gap-8px items-center px-12px py-7px rounded-10px
170
- :class="currentTab === 'files' ? 'bg-neutral-100' : 'hover:bg-neutral-50'"
171
- @click="emit('tabChange', 'files')"
172
- >
173
- <span
174
- text-14px font-580 leading-18px tracking="-.15px"
175
- :class="currentTab === 'files' ? 'text-gray-900' : 'text-gray-500'"
176
- >
177
- Arquivos
178
- </span>
179
- <div
180
- v-if="filesCount !== void 0 && filesCount > 0"
181
- bg-gray-200 rounded-5px px-5px py-3px
182
- flex items-center justify-center
163
+ <div flex="~" items-center shrink-0>
164
+ <div p-4px bg-muted rounded-12px flex="~" items-center>
165
+ <button
166
+ v-for="option in tabOptions"
167
+ :key="option.id"
168
+ rounded-10px relative
169
+ body-14-semibold
170
+ h-full
171
+ py-7px px-12px
172
+ not-first:ml-2px
173
+ class="group"
174
+ :class="[currentTab === option.id ? 'text-primary' : 'text-tertiary duration-80 hover:text-secondary']"
175
+ @click="emit('tabChange', option.id)"
183
176
  >
184
- <span text-9px font-580 text-secondary leading-10px tracking-1px uppercase>
185
- {{ filesCount }}
177
+ <span flex="~" items-center gap-8px relative z-10 h-full>
178
+ {{ option.name }}
179
+ <span
180
+ v-if="option.count !== void 0 && option.count > 0"
181
+ bg-gray-200 rounded-5px px-5px py-3px
182
+ flex items-center justify-center
183
+ text-9px font-580 text-secondary leading-10px tracking-1px uppercase
184
+ >
185
+ {{ option.count }}
186
+ </span>
186
187
  </span>
187
- </div>
188
- </button>
189
-
190
- <button
191
- v-if="showUsageTab"
192
- flex gap-8px items-center px-12px py-7px rounded-10px
193
- :class="currentTab === 'usage' ? 'bg-neutral-100' : 'hover:bg-neutral-50'"
194
- @click="emit('tabChange', 'usage')"
195
- >
196
- <span
197
- text-14px font-580 leading-18px tracking="-.15px"
198
- :class="currentTab === 'usage' ? 'text-gray-900' : 'text-gray-500'"
199
- >
200
- Uso
201
- </span>
202
- </button>
188
+ <AnimatePresence mode="wait" :initial="false">
189
+ <Motion
190
+ v-if="currentTab === option.id"
191
+ aria-hidden="true"
192
+ layout-id="chat-topbar-active-tab"
193
+ absolute inset-0 bg border-0.5px rounded-inherit size-full
194
+ class="z-0 border-black/16 [box-shadow:0_2px_3px_0_rgba(64,64,64,0.03)]"
195
+ :initial="{ opacity: 0 }"
196
+ :animate="{ opacity: 1 }"
197
+ :exit="{ opacity: 0 }"
198
+ :transition="{ duration: 0.3, type: 'spring', bounce: 0 }"
199
+ />
200
+ </AnimatePresence>
201
+ </button>
202
+ </div>
203
203
  </div>
204
204
 
205
205
  <div flex="~ 1" items-center justify-end gap-12px min-w-0>
@@ -222,15 +222,13 @@ watch(() => props.isEditing, (editing) => {
222
222
  </TelaTooltip>
223
223
 
224
224
  <TelaDropdownMenu :items="headerMenuItems" align="end">
225
- <button
226
- flex items-center justify-center
227
- w-32px h-32px rounded-10px
228
- bg-gray-80
229
- hover:bg-gray-100
230
- transition-colors
231
- >
232
- <div i-ph-dots-three text-20px text-gray-900 />
233
- </button>
225
+ <TelaIconButton
226
+ size="md"
227
+ color="secondary"
228
+ icon="i-ph-dots-three-bold"
229
+ button-class="group !rounded-12px"
230
+ icon-class="group-data-[state=open]:text-neutral-950"
231
+ />
234
232
  </TelaDropdownMenu>
235
233
  </div>
236
234
  </div>
@@ -3,11 +3,13 @@ import type { ChatActionPayload } from '../../messages/composables/chat-action.j
3
3
  import type { MessageFeedbackPayload } from '../../messages/composables/chat-feedback.js';
4
4
  import type { ChatMessageTerminalPayload } from '../../messages/composables/chat-message-terminal.js';
5
5
  import type { ChatFeatureConfig } from '../feature-config.js';
6
- import type { ChatSidebarConfig, DefaultChatEmbedProps, MeistrariChatEmbedProps, TelaAgentChatEmbedProps } from '../types.js';
6
+ import type { ChatEmbedVariant, ChatEmbedVariantProps, ChatSidebarConfig, ChatSuggestion, DefaultChatEmbedProps, MeistrariChatEmbedProps, TelaAgentChatEmbedProps } from '../types.js';
7
7
 
8
8
  type MeistrariChatEmbedEmits = {
9
9
  /** Fired when the active conversation changes. Pairs with `v-model:conversation-id`. */
10
10
  'update:conversationId': (value: string | null) => any;
11
+ /** Fired when the floating widget window opens or closes. Widget variants only. */
12
+ 'update:open': (value: boolean) => any;
11
13
  /** Fired when an assistant message triggers a host-handled action. */
12
14
  'action': (payload: ChatActionPayload) => any;
13
15
  /** Fired when a user submits feedback for an assistant message. */
@@ -17,7 +19,7 @@ type MeistrariChatEmbedEmits = {
17
19
  };
18
20
 
19
21
  type MeistrariChatEmbedSlots = SlotsType<{
20
- /** Rendered in a dedicated bottom pane of the conversation sidebar, splitting it in half. */
22
+ /** Rendered in a dedicated bottom pane of the conversation sidebar, splitting it in half. Page variant only. */
21
23
  'sidebar-bottom'?: () => any;
22
24
  }>;
23
25
 
@@ -50,4 +52,4 @@ type MeistrariChatEmbedSlots = SlotsType<{
50
52
  declare const MeistrariChatEmbed: DefineSetupFnComponent<MeistrariChatEmbedProps, MeistrariChatEmbedEmits, MeistrariChatEmbedSlots>;
51
53
 
52
54
  export default MeistrariChatEmbed;
53
- export type { ChatActionPayload, ChatFeatureConfig, ChatMessageTerminalPayload, ChatSidebarConfig, DefaultChatEmbedProps, MeistrariChatEmbedProps, MessageFeedbackPayload, TelaAgentChatEmbedProps };
55
+ export type { ChatActionPayload, ChatEmbedVariant, ChatEmbedVariantProps, ChatFeatureConfig, ChatMessageTerminalPayload, ChatSidebarConfig, ChatSuggestion, DefaultChatEmbedProps, MeistrariChatEmbedProps, MessageFeedbackPayload, TelaAgentChatEmbedProps };