@meistrari/chat-nuxt 3.9.1 → 3.10.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +50 -440
- package/dist/module.d.mts +1 -1
- package/dist/module.json +1 -1
- package/dist/module.mjs +56 -3
- package/dist/runtime/assets/css/markstream.css +1 -1
- package/dist/runtime/conversations/components/chat-conversation-creator-filter.vue +11 -67
- package/dist/runtime/conversations/components/chat-conversation-item.d.vue.ts +2 -1
- package/dist/runtime/conversations/components/chat-conversation-item.vue +29 -33
- package/dist/runtime/conversations/components/chat-conversation-item.vue.d.ts +2 -1
- package/dist/runtime/conversations/components/chat-conversation-list.d.vue.ts +0 -1
- package/dist/runtime/conversations/components/chat-conversation-list.vue +117 -158
- package/dist/runtime/conversations/components/chat-conversation-list.vue.d.ts +0 -1
- package/dist/runtime/conversations/components/chat-conversation-new-group-button.vue +34 -73
- package/dist/runtime/conversations/components/chat-conversation-search.vue +1 -21
- package/dist/runtime/conversations/components/chat-widget-history-list.d.vue.ts +12 -0
- package/dist/runtime/conversations/components/chat-widget-history-list.vue +27 -0
- package/dist/runtime/conversations/components/chat-widget-history-list.vue.d.ts +12 -0
- package/dist/runtime/conversations/composables/conversation-groups.d.ts +1 -0
- package/dist/runtime/conversations/composables/conversation-groups.js +2 -0
- package/dist/runtime/conversations/composables/conversation-item.js +4 -4
- package/dist/runtime/conversations/composables/conversation-list.js +14 -5
- package/dist/runtime/embed/components/chat-configuration-modal.d.vue.ts +3 -3
- package/dist/runtime/embed/components/chat-configuration-modal.vue.d.ts +3 -3
- package/dist/runtime/embed/components/chat-embed-inner.d.vue.ts +6 -3
- package/dist/runtime/embed/components/chat-embed-inner.vue +365 -152
- package/dist/runtime/embed/components/chat-embed-inner.vue.d.ts +6 -3
- package/dist/runtime/embed/components/chat-embed.d.vue.ts +31 -4
- package/dist/runtime/embed/components/chat-embed.vue +10 -4
- package/dist/runtime/embed/components/chat-embed.vue.d.ts +31 -4
- package/dist/runtime/embed/components/chat-topbar.vue +83 -85
- package/dist/runtime/embed/components/meistrari-chat-embed.d.vue.ts +5 -3
- package/dist/runtime/embed/components/meistrari-chat-embed.vue +118 -57
- package/dist/runtime/embed/components/meistrari-chat-embed.vue.d.ts +5 -3
- package/dist/runtime/embed/components/mobile/chat-mobile-drawer.d.vue.ts +0 -1
- package/dist/runtime/embed/components/mobile/chat-mobile-drawer.vue +2 -45
- package/dist/runtime/embed/components/mobile/chat-mobile-drawer.vue.d.ts +0 -1
- package/dist/runtime/embed/components/mobile/chat-mobile-home-suggestions.d.vue.ts +9 -5
- package/dist/runtime/embed/components/mobile/chat-mobile-home-suggestions.vue +14 -25
- package/dist/runtime/embed/components/mobile/chat-mobile-home-suggestions.vue.d.ts +9 -5
- package/dist/runtime/embed/components/mobile/chat-mobile-shell.d.vue.ts +6 -6
- package/dist/runtime/embed/components/mobile/chat-mobile-shell.vue +2 -3
- package/dist/runtime/embed/components/mobile/chat-mobile-shell.vue.d.ts +6 -6
- package/dist/runtime/embed/feature-config.d.ts +7 -0
- package/dist/runtime/embed/types.d.ts +47 -8
- package/dist/runtime/files/icons.d.ts +1 -1
- package/dist/runtime/files/icons.js +1 -1
- package/dist/runtime/messages/components/chat-mention-dropdown.d.vue.ts +6 -1
- package/dist/runtime/messages/components/chat-mention-dropdown.vue +46 -22
- package/dist/runtime/messages/components/chat-mention-dropdown.vue.d.ts +6 -1
- package/dist/runtime/messages/components/chat-message-bubble.vue +53 -71
- package/dist/runtime/messages/components/chat-message-feedback.vue +25 -229
- package/dist/runtime/messages/components/chat-message-input.vue +176 -134
- package/dist/runtime/messages/components/chat-message-list.d.vue.ts +6 -0
- package/dist/runtime/messages/components/chat-message-list.vue +27 -23
- package/dist/runtime/messages/components/chat-message-list.vue.d.ts +6 -0
- package/dist/runtime/messages/components/chat-model-selector.vue +10 -22
- package/dist/runtime/messages/components/reasoning/chat-reasoning-message.vue +2 -3
- package/dist/runtime/messages/components/reasoning/chat-reasoning-thought.vue +60 -69
- package/dist/runtime/messages/components/reasoning/chat-thinking-indicator.vue +3 -9
- package/dist/runtime/messages/components/widgets/chat-bash-widget.vue +3 -12
- package/dist/runtime/messages/components/widgets/chat-doc-sdk-widget.vue +3 -12
- package/dist/runtime/messages/components/widgets/chat-generic-tool-widget.vue +3 -12
- package/dist/runtime/messages/components/widgets/chat-grep-widget.vue +7 -17
- package/dist/runtime/messages/components/widgets/chat-read-widget.vue +7 -17
- package/dist/runtime/messages/components/widgets/chat-tela-skill-widget.vue +4 -13
- package/dist/runtime/messages/components/widgets/chat-thinking-widget.vue +11 -22
- package/dist/runtime/messages/components/widgets/chat-web-search-widget.vue +13 -40
- package/dist/runtime/messages/components/widgets/chat-workstation-query-widget.vue +52 -65
- package/dist/runtime/messages/components/widgets/chat-write-widget.vue +8 -18
- package/dist/runtime/messages/composables/mention-autocomplete.js +4 -0
- package/dist/runtime/messages/message-reasoning.js +4 -0
- package/dist/runtime/messages/message-state.js +1 -0
- package/dist/runtime/public/files/generic.svg +2 -5
- package/dist/runtime/public/files/image.svg +2 -1
- package/dist/runtime/types/embed.d.ts +1 -1
- package/dist/runtime/types/schemas/chat/conversations.d.ts +2 -0
- package/dist/runtime/types/schemas/chat/conversations.js +3 -0
- package/dist/runtime/types/schemas/chat/messages.d.ts +4 -0
- package/dist/runtime/types/schemas/chat/messages.js +7 -0
- package/dist/types.d.mts +1 -1
- package/package.json +5 -4
- package/dist/runtime/conversations/components/chat-conversation-new-group-popover-content.d.vue.ts +0 -23
- package/dist/runtime/conversations/components/chat-conversation-new-group-popover-content.vue +0 -75
- package/dist/runtime/conversations/components/chat-conversation-new-group-popover-content.vue.d.ts +0 -23
- package/dist/runtime/messages/components/reasoning/chat-reasoning-step-item.d.vue.ts +0 -37
- package/dist/runtime/messages/components/reasoning/chat-reasoning-step-item.vue +0 -125
- 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
|
-
|
|
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
|
|
5
|
+
declare var __VLS_12: {};
|
|
5
6
|
type __VLS_Slots = {} & {
|
|
6
|
-
'sidebar-bottom'?: (props: typeof
|
|
7
|
+
'sidebar-bottom'?: (props: typeof __VLS_12) => any;
|
|
7
8
|
};
|
|
8
|
-
declare const __VLS_base: import("vue").DefineComponent<
|
|
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<
|
|
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
|
-
|
|
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
|
-
:
|
|
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
|
|
5
|
+
declare var __VLS_12: {};
|
|
5
6
|
type __VLS_Slots = {} & {
|
|
6
|
-
'sidebar-bottom'?: (props: typeof
|
|
7
|
+
'sidebar-bottom'?: (props: typeof __VLS_12) => any;
|
|
7
8
|
};
|
|
8
|
-
declare const __VLS_base: import("vue").DefineComponent<
|
|
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<
|
|
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-
|
|
84
|
-
b-
|
|
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-
|
|
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
|
-
|
|
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
|
-
|
|
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
|
-
<
|
|
124
|
+
<h5
|
|
116
125
|
v-else
|
|
117
|
-
|
|
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
|
-
</
|
|
131
|
+
</h5>
|
|
123
132
|
|
|
124
133
|
<div flex items-center gap-8px>
|
|
125
|
-
<
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
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
|
-
:
|
|
145
|
+
:image="creatorImage"
|
|
146
|
+
size="2xs"
|
|
134
147
|
:alt="creatorName ?? 'Usu\xE1rio'"
|
|
135
|
-
|
|
136
|
-
>
|
|
148
|
+
/>
|
|
137
149
|
<div v-else w-full h-full bg-gray-200 flex items-center justify-center>
|
|
138
|
-
<span
|
|
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
|
|
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
|
|
155
|
-
<
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
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
|
|
185
|
-
{{
|
|
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
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
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
|
-
<
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
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 };
|