@meistrari/chat-nuxt 4.4.0-rc.3 → 4.4.0-rc.5
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/dist/module.json +1 -1
- package/dist/runtime/conversations/components/chat-new-conversation-modal.d.vue.ts +1 -1
- package/dist/runtime/conversations/components/chat-new-conversation-modal.vue.d.ts +1 -1
- package/dist/runtime/embed/components/chat-embed-inner.d.vue.ts +2 -0
- package/dist/runtime/embed/components/chat-embed-inner.vue +59 -45
- package/dist/runtime/embed/components/chat-embed-inner.vue.d.ts +2 -0
- package/dist/runtime/embed/components/chat-embed.d.vue.ts +1 -42
- package/dist/runtime/embed/components/chat-embed.vue +3 -0
- package/dist/runtime/embed/components/chat-embed.vue.d.ts +1 -42
- package/dist/runtime/embed/components/chat-topbar.d.vue.ts +2 -2
- package/dist/runtime/embed/components/chat-topbar.vue.d.ts +2 -2
- package/dist/runtime/embed/components/meistrari-chat-embed.vue +5 -2
- package/dist/runtime/embed/components/mobile/chat-mobile-header.d.vue.ts +6 -6
- package/dist/runtime/embed/components/mobile/chat-mobile-header.vue.d.ts +6 -6
- package/dist/runtime/embed/components/mobile/chat-mobile-shell.d.vue.ts +9 -9
- package/dist/runtime/embed/components/mobile/chat-mobile-shell.vue.d.ts +9 -9
- package/dist/runtime/embed/composables/conversation-browser-state.d.ts +1 -1
- package/dist/runtime/embed/composables/conversation-browser-state.js +5 -3
- package/dist/runtime/embed/types.d.ts +4 -0
- package/dist/runtime/files/composables/file-drop.d.ts +2 -8
- package/dist/runtime/files/composables/file-drop.js +3 -31
- package/dist/runtime/files/composables/file-upload.js +46 -15
- package/dist/runtime/messages/answer.d.ts +23 -0
- package/dist/runtime/messages/answer.js +42 -0
- package/dist/runtime/messages/components/chat-answer.d.vue.ts +14 -0
- package/dist/runtime/messages/components/chat-answer.vue +154 -0
- package/dist/runtime/messages/components/chat-answer.vue.d.ts +14 -0
- package/dist/runtime/messages/components/chat-context-config.vue +4 -17
- package/dist/runtime/messages/components/chat-message-bubble.vue +4 -1
- package/dist/runtime/messages/components/chat-message-input.vue +7 -27
- package/dist/runtime/messages/components/chat-message-list.vue +3 -1
- package/dist/runtime/messages/components/widgets/chat-tool-section.d.vue.ts +1 -1
- package/dist/runtime/messages/components/widgets/chat-tool-section.vue.d.ts +1 -1
- package/dist/runtime/messages/composables/chat-message-terminal.d.ts +1 -0
- package/dist/runtime/messages/composables/chat-message-terminal.js +2 -1
- package/dist/runtime/rendering/components/app-markdown-render.vue +1 -7
- package/dist/runtime/rendering/markdown/escape-dollar-signs.d.ts +1 -0
- package/dist/runtime/rendering/markdown/escape-dollar-signs.js +7 -0
- package/dist/runtime/types/messages.d.ts +2 -0
- package/dist/runtime/types/messages.js +1 -0
- package/package.json +6 -2
- package/dist/runtime/files/file-limits.d.ts +0 -2
- package/dist/runtime/files/file-limits.js +0 -2
package/dist/module.json
CHANGED
|
@@ -6,8 +6,8 @@ declare const __VLS_export: import("vue").DefineComponent<__VLS_ModelProps, {},
|
|
|
6
6
|
} & {
|
|
7
7
|
create: (canvasTools: CanvasTool[]) => any;
|
|
8
8
|
}, string, import("vue").PublicProps, Readonly<__VLS_ModelProps> & Readonly<{
|
|
9
|
-
onCreate?: ((canvasTools: CanvasTool[]) => any) | undefined;
|
|
10
9
|
"onUpdate:modelValue"?: ((value: boolean | undefined) => any) | undefined;
|
|
10
|
+
onCreate?: ((canvasTools: CanvasTool[]) => any) | undefined;
|
|
11
11
|
}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
12
12
|
declare const _default: typeof __VLS_export;
|
|
13
13
|
export default _default;
|
|
@@ -6,8 +6,8 @@ declare const __VLS_export: import("vue").DefineComponent<__VLS_ModelProps, {},
|
|
|
6
6
|
} & {
|
|
7
7
|
create: (canvasTools: CanvasTool[]) => any;
|
|
8
8
|
}, string, import("vue").PublicProps, Readonly<__VLS_ModelProps> & Readonly<{
|
|
9
|
-
onCreate?: ((canvasTools: CanvasTool[]) => any) | undefined;
|
|
10
9
|
"onUpdate:modelValue"?: ((value: boolean | undefined) => any) | undefined;
|
|
10
|
+
onCreate?: ((canvasTools: CanvasTool[]) => any) | undefined;
|
|
11
11
|
}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
12
12
|
declare const _default: typeof __VLS_export;
|
|
13
13
|
export default _default;
|
|
@@ -4,6 +4,7 @@ import type { ChatFeatureConfig } from '../feature-config.js';
|
|
|
4
4
|
import type { ChatActor, ChatSidebarConfig, ChatSuggestion } from '../types.js';
|
|
5
5
|
type EmbedUser = ChatActor;
|
|
6
6
|
type __VLS_Props = {
|
|
7
|
+
syncBrowserState?: boolean;
|
|
7
8
|
conversationId?: string | null;
|
|
8
9
|
conversationEvents?: readonly ConversationEvent[] | null;
|
|
9
10
|
composerDisabled?: boolean;
|
|
@@ -40,6 +41,7 @@ declare const __VLS_base: import("vue").DefineComponent<__VLS_Props, {}, {}, {},
|
|
|
40
41
|
compact: boolean;
|
|
41
42
|
hideSettings: boolean;
|
|
42
43
|
hideSidebar: boolean;
|
|
44
|
+
syncBrowserState: boolean;
|
|
43
45
|
initialConversationId: string | null;
|
|
44
46
|
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
45
47
|
declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
|
|
@@ -43,6 +43,7 @@ import { useWorkspaceMembers } from "../../workspace/composables/workspace-membe
|
|
|
43
43
|
import { useWorkspaceSettings } from "../../workspace/composables/workspace-settings";
|
|
44
44
|
import { useWorkspaceSwitchModal } from "../../workspace/composables/workspace-switch-modal";
|
|
45
45
|
const props = defineProps({
|
|
46
|
+
syncBrowserState: { type: Boolean, required: false, default: true },
|
|
46
47
|
conversationId: { type: [String, null], required: false },
|
|
47
48
|
conversationEvents: { type: [Array, null], required: false },
|
|
48
49
|
composerDisabled: { type: Boolean, required: false },
|
|
@@ -138,7 +139,7 @@ const {
|
|
|
138
139
|
closePreview
|
|
139
140
|
} = useFilePreviewPanel();
|
|
140
141
|
const { isOpen: isCitationPanelOpen } = useCitationPanel();
|
|
141
|
-
const sharedConversationId = getSharedConversationId(route.query);
|
|
142
|
+
const sharedConversationId = props.syncBrowserState === false ? null : getSharedConversationId(route.query);
|
|
142
143
|
const activeConversationId = ref(
|
|
143
144
|
normalizeConversationId(props.conversationId) ?? normalizeConversationId(props.initialConversationId) ?? normalizeConversationId(sharedConversationId)
|
|
144
145
|
);
|
|
@@ -157,6 +158,11 @@ const {
|
|
|
157
158
|
const resolvedFeatures = computed(() => resolveChatFeatures(props.features));
|
|
158
159
|
const dropZoneRef = ref(null);
|
|
159
160
|
const activeTab = ref("chat");
|
|
161
|
+
const answerTarget = ref(null);
|
|
162
|
+
provide("chat-answer-target", answerTarget);
|
|
163
|
+
function setAnswerTarget(el) {
|
|
164
|
+
answerTarget.value = el instanceof HTMLElement ? el : null;
|
|
165
|
+
}
|
|
160
166
|
const messageInputRef = ref(null);
|
|
161
167
|
const PROMPT_INPUT_HINTS = [
|
|
162
168
|
{ icon: "i-ph-at-bold", label: "Para mencionar arquivos" },
|
|
@@ -507,7 +513,7 @@ useConversationBrowserState(activeConversationId, computed(() => {
|
|
|
507
513
|
if (currentConversation.value?.id !== activeConversationId.value)
|
|
508
514
|
return null;
|
|
509
515
|
return optimisticTitle.value ?? currentConversation.value?.title ?? null;
|
|
510
|
-
}));
|
|
516
|
+
}), () => props.syncBrowserState !== false);
|
|
511
517
|
const displayTitle = computed(() => {
|
|
512
518
|
if (optimisticTitle.value !== null)
|
|
513
519
|
return optimisticTitle.value;
|
|
@@ -1144,29 +1150,33 @@ async function handleDelete() {
|
|
|
1144
1150
|
<slot name="failed-message-actions" v-bind="slotProps" />
|
|
1145
1151
|
</template>
|
|
1146
1152
|
</ChatMessageList>
|
|
1147
|
-
<
|
|
1148
|
-
ref="
|
|
1149
|
-
|
|
1150
|
-
|
|
1151
|
-
|
|
1152
|
-
|
|
1153
|
-
|
|
1154
|
-
|
|
1153
|
+
<div data-chat-composer flex="~ col" gap-12px min-h-0>
|
|
1154
|
+
<div :ref="setAnswerTarget" data-chat-answer-dock class="empty:hidden max-h-[50dvh] overflow-y-auto" />
|
|
1155
|
+
<ChatMessageInput
|
|
1156
|
+
ref="messageInputRef"
|
|
1157
|
+
v-model:selected-model="selectedModel"
|
|
1158
|
+
v-model:selected-reasoning-effort="selectedReasoningEffort"
|
|
1159
|
+
class="!p-0"
|
|
1160
|
+
:loading="composerLocked"
|
|
1161
|
+
:disabled="composerDisabled"
|
|
1162
|
+
:creator-name="currentUser?.name ?? void 0"
|
|
1163
|
+
:creator-email="
|
|
1155
1164
|
currentConversation?.createdBy ?? currentUser?.email ?? void 0
|
|
1156
1165
|
"
|
|
1157
|
-
|
|
1158
|
-
|
|
1159
|
-
|
|
1160
|
-
|
|
1161
|
-
|
|
1162
|
-
|
|
1163
|
-
|
|
1164
|
-
|
|
1165
|
-
|
|
1166
|
-
|
|
1167
|
-
|
|
1168
|
-
|
|
1169
|
-
|
|
1166
|
+
:creator-image="currentUser?.image ?? void 0"
|
|
1167
|
+
:messages="messages"
|
|
1168
|
+
:conversation-files="conversationFiles"
|
|
1169
|
+
:workspace-settings="effectiveWorkspaceSettings"
|
|
1170
|
+
:agent-input-schema="visibleTelaAgentInputSchema"
|
|
1171
|
+
:agent-input-schema-loading="visibleTelaAgentInputSchemaLoading"
|
|
1172
|
+
:agent-skills="agentSkills"
|
|
1173
|
+
:agent-context-files="agentContextFiles"
|
|
1174
|
+
:show-cancel-button="resolvedFeatures.showCancelButton"
|
|
1175
|
+
has-disclaimer
|
|
1176
|
+
@send="handleSend"
|
|
1177
|
+
@cancel="handleCancel"
|
|
1178
|
+
/>
|
|
1179
|
+
</div>
|
|
1170
1180
|
</ChatMobileShell>
|
|
1171
1181
|
|
|
1172
1182
|
<ChatTopbar
|
|
@@ -1359,29 +1369,33 @@ async function handleDelete() {
|
|
|
1359
1369
|
<slot name="failed-message-actions" v-bind="slotProps" />
|
|
1360
1370
|
</template>
|
|
1361
1371
|
</ChatMessageList>
|
|
1362
|
-
<
|
|
1363
|
-
ref="
|
|
1364
|
-
|
|
1365
|
-
|
|
1366
|
-
|
|
1367
|
-
|
|
1368
|
-
|
|
1369
|
-
|
|
1372
|
+
<div data-chat-composer flex="~ col" gap-12px min-h-0>
|
|
1373
|
+
<div :ref="setAnswerTarget" data-chat-answer-dock class="empty:hidden max-h-[50dvh] overflow-y-auto" />
|
|
1374
|
+
<ChatMessageInput
|
|
1375
|
+
ref="messageInputRef"
|
|
1376
|
+
v-model:selected-model="selectedModel"
|
|
1377
|
+
v-model:selected-reasoning-effort="selectedReasoningEffort"
|
|
1378
|
+
class="!p-0"
|
|
1379
|
+
:loading="composerLocked"
|
|
1380
|
+
:disabled="composerDisabled"
|
|
1381
|
+
:creator-name="currentUser?.name ?? void 0"
|
|
1382
|
+
:creator-email="
|
|
1370
1383
|
currentConversation?.createdBy ?? currentUser?.email ?? void 0
|
|
1371
1384
|
"
|
|
1372
|
-
|
|
1373
|
-
|
|
1374
|
-
|
|
1375
|
-
|
|
1376
|
-
|
|
1377
|
-
|
|
1378
|
-
|
|
1379
|
-
|
|
1380
|
-
|
|
1381
|
-
|
|
1382
|
-
|
|
1383
|
-
|
|
1384
|
-
|
|
1385
|
+
:creator-image="currentUser?.image ?? void 0"
|
|
1386
|
+
:messages="messages"
|
|
1387
|
+
:conversation-files="conversationFiles"
|
|
1388
|
+
:workspace-settings="effectiveWorkspaceSettings"
|
|
1389
|
+
:agent-input-schema="visibleTelaAgentInputSchema"
|
|
1390
|
+
:agent-input-schema-loading="visibleTelaAgentInputSchemaLoading"
|
|
1391
|
+
:agent-skills="agentSkills"
|
|
1392
|
+
:agent-context-files="agentContextFiles"
|
|
1393
|
+
:show-cancel-button="resolvedFeatures.showCancelButton"
|
|
1394
|
+
has-disclaimer
|
|
1395
|
+
@send="handleSend"
|
|
1396
|
+
@cancel="handleCancel"
|
|
1397
|
+
/>
|
|
1398
|
+
</div>
|
|
1385
1399
|
</TelaChatBody>
|
|
1386
1400
|
|
|
1387
1401
|
<Transition name="fade">
|
|
@@ -1545,5 +1559,5 @@ async function handleDelete() {
|
|
|
1545
1559
|
</style>
|
|
1546
1560
|
|
|
1547
1561
|
<style>
|
|
1548
|
-
[data-chat-body][data-variant=page] [data-chat-prompt-input]{margin-inline:auto!important;max-width:700px}
|
|
1562
|
+
[data-chat-body][data-variant=page] :is([data-chat-composer],[data-chat-prompt-input]){margin-inline:auto!important;max-width:700px}
|
|
1549
1563
|
</style>
|
|
@@ -4,6 +4,7 @@ import type { ChatFeatureConfig } from '../feature-config.js';
|
|
|
4
4
|
import type { ChatActor, ChatSidebarConfig, ChatSuggestion } from '../types.js';
|
|
5
5
|
type EmbedUser = ChatActor;
|
|
6
6
|
type __VLS_Props = {
|
|
7
|
+
syncBrowserState?: boolean;
|
|
7
8
|
conversationId?: string | null;
|
|
8
9
|
conversationEvents?: readonly ConversationEvent[] | null;
|
|
9
10
|
composerDisabled?: boolean;
|
|
@@ -40,6 +41,7 @@ declare const __VLS_base: import("vue").DefineComponent<__VLS_Props, {}, {}, {},
|
|
|
40
41
|
compact: boolean;
|
|
41
42
|
hideSettings: boolean;
|
|
42
43
|
hideSidebar: boolean;
|
|
44
|
+
syncBrowserState: boolean;
|
|
43
45
|
initialConversationId: string | null;
|
|
44
46
|
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
45
47
|
declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
|
|
@@ -1,7 +1,4 @@
|
|
|
1
1
|
import { useChatAuth } from '#chat-auth';
|
|
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';
|
|
5
2
|
declare var __VLS_13: {}, __VLS_16: {
|
|
6
3
|
message: useChatAuth;
|
|
7
4
|
};
|
|
@@ -10,45 +7,7 @@ type __VLS_Slots = {} & {
|
|
|
10
7
|
} & {
|
|
11
8
|
'failed-message-actions'?: (props: typeof __VLS_16) => any;
|
|
12
9
|
};
|
|
13
|
-
declare const __VLS_base: import("vue").
|
|
14
|
-
telaAgentId?: undefined;
|
|
15
|
-
telaAgentInputs?: undefined;
|
|
16
|
-
workspaceSettings?: import("vue").DeepReadonly<useChatAuth> | useChatAuth | null;
|
|
17
|
-
user?: import("../types.js").ChatActor | null;
|
|
18
|
-
features?: Partial<import("../feature-config.js").ChatFeatureConfig>;
|
|
19
|
-
} & import("../types.js").ChatEmbedVariantProps) | (import("../types.js").ChatEmbedSharedProps & {
|
|
20
|
-
telaAgentId: string;
|
|
21
|
-
telaAgentInputs?: import("vue").DeepReadonly<useChatAuth[]> | null;
|
|
22
|
-
workspaceSettings?: never;
|
|
23
|
-
user?: never;
|
|
24
|
-
features?: Partial<import("../feature-config.js").ChatFeatureConfig>;
|
|
25
|
-
} & import("../types.js").ChatEmbedVariantProps), {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {} & {
|
|
26
|
-
"update:conversationId": (value: string | null) => any;
|
|
27
|
-
"update:conversationTitle": (value: string | null) => any;
|
|
28
|
-
"update:conversationCreatorFilter": (value: "all" | "mine") => any;
|
|
29
|
-
messageFeedback: (payload: MessageFeedbackPayload) => any;
|
|
30
|
-
action: (payload: ChatActionPayload) => any;
|
|
31
|
-
messageTerminal: (payload: ChatMessageTerminalPayload) => any;
|
|
32
|
-
}, string, import("vue").PublicProps, Readonly<(import("../types.js").ChatEmbedSharedProps & {
|
|
33
|
-
telaAgentId?: undefined;
|
|
34
|
-
telaAgentInputs?: undefined;
|
|
35
|
-
workspaceSettings?: import("vue").DeepReadonly<useChatAuth> | useChatAuth | null;
|
|
36
|
-
user?: import("../types.js").ChatActor | null;
|
|
37
|
-
features?: Partial<import("../feature-config.js").ChatFeatureConfig>;
|
|
38
|
-
} & import("../types.js").ChatEmbedVariantProps) | (import("../types.js").ChatEmbedSharedProps & {
|
|
39
|
-
telaAgentId: string;
|
|
40
|
-
telaAgentInputs?: import("vue").DeepReadonly<useChatAuth[]> | null;
|
|
41
|
-
workspaceSettings?: never;
|
|
42
|
-
user?: never;
|
|
43
|
-
features?: Partial<import("../feature-config.js").ChatFeatureConfig>;
|
|
44
|
-
} & import("../types.js").ChatEmbedVariantProps)> & Readonly<{
|
|
45
|
-
"onUpdate:conversationId"?: ((value: string | null) => any) | undefined;
|
|
46
|
-
"onUpdate:conversationTitle"?: ((value: string | null) => any) | undefined;
|
|
47
|
-
"onUpdate:conversationCreatorFilter"?: ((value: "all" | "mine") => any) | undefined;
|
|
48
|
-
onMessageFeedback?: ((payload: MessageFeedbackPayload) => any) | undefined;
|
|
49
|
-
onAction?: ((payload: ChatActionPayload) => any) | undefined;
|
|
50
|
-
onMessageTerminal?: ((payload: ChatMessageTerminalPayload) => any) | undefined;
|
|
51
|
-
}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
10
|
+
declare const __VLS_base: import("vue").DefineSetupFnComponent<Record<string, any>, {}, {}, Record<string, any> & {}, import("vue").PublicProps>;
|
|
52
11
|
declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
|
|
53
12
|
declare const _default: typeof __VLS_export;
|
|
54
13
|
export default _default;
|
|
@@ -9,6 +9,7 @@ import { provideEmbedConfig, useEmbedConfig } from "../composables/embed-config"
|
|
|
9
9
|
import { normalizeConversationScope, normalizeTelaAgentId, resolveConversationScopeKeySegment } from "../../conversations/scope";
|
|
10
10
|
import ChatEmbedInner from "./chat-embed-inner.vue";
|
|
11
11
|
const props = defineProps({
|
|
12
|
+
syncBrowserState: { type: Boolean, required: false, default: true },
|
|
12
13
|
chatConfig: { type: Object, required: false },
|
|
13
14
|
telaAgentBranch: { type: [String, null], required: false },
|
|
14
15
|
conversationId: { type: [String, null], required: false },
|
|
@@ -42,6 +43,7 @@ const props = defineProps({
|
|
|
42
43
|
features: { type: Object, required: false },
|
|
43
44
|
variant: { type: String, required: false },
|
|
44
45
|
defaultOpen: { type: Boolean, required: false },
|
|
46
|
+
closeOnOutsideClick: { type: Boolean, required: false },
|
|
45
47
|
launcherLabel: { type: String, required: false }
|
|
46
48
|
});
|
|
47
49
|
const emit = defineEmits(["update:conversationId", "update:conversationTitle", "update:conversationCreatorFilter", "action", "messageFeedback", "messageTerminal"]);
|
|
@@ -120,6 +122,7 @@ provideChatMessageTerminal((payload) => {
|
|
|
120
122
|
<ChatEmbedInner
|
|
121
123
|
v-if="workspaceId"
|
|
122
124
|
:key="`${workspaceId}:${normalizedTelaAgentId ?? 'default-chat'}:branch:${telaAgentBranch ?? ''}:scope:${resolveConversationScopeKeySegment(normalizedConversationScope)}`"
|
|
125
|
+
:sync-browser-state="syncBrowserState"
|
|
123
126
|
:conversation-id="conversationId"
|
|
124
127
|
:conversation-events="conversationEvents"
|
|
125
128
|
:composer-disabled="composerDisabled"
|
|
@@ -1,7 +1,4 @@
|
|
|
1
1
|
import { useChatAuth } from '#chat-auth';
|
|
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';
|
|
5
2
|
declare var __VLS_13: {}, __VLS_16: {
|
|
6
3
|
message: useChatAuth;
|
|
7
4
|
};
|
|
@@ -10,45 +7,7 @@ type __VLS_Slots = {} & {
|
|
|
10
7
|
} & {
|
|
11
8
|
'failed-message-actions'?: (props: typeof __VLS_16) => any;
|
|
12
9
|
};
|
|
13
|
-
declare const __VLS_base: import("vue").
|
|
14
|
-
telaAgentId?: undefined;
|
|
15
|
-
telaAgentInputs?: undefined;
|
|
16
|
-
workspaceSettings?: import("vue").DeepReadonly<useChatAuth> | useChatAuth | null;
|
|
17
|
-
user?: import("../types.js").ChatActor | null;
|
|
18
|
-
features?: Partial<import("../feature-config.js").ChatFeatureConfig>;
|
|
19
|
-
} & import("../types.js").ChatEmbedVariantProps) | (import("../types.js").ChatEmbedSharedProps & {
|
|
20
|
-
telaAgentId: string;
|
|
21
|
-
telaAgentInputs?: import("vue").DeepReadonly<useChatAuth[]> | null;
|
|
22
|
-
workspaceSettings?: never;
|
|
23
|
-
user?: never;
|
|
24
|
-
features?: Partial<import("../feature-config.js").ChatFeatureConfig>;
|
|
25
|
-
} & import("../types.js").ChatEmbedVariantProps), {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {} & {
|
|
26
|
-
"update:conversationId": (value: string | null) => any;
|
|
27
|
-
"update:conversationTitle": (value: string | null) => any;
|
|
28
|
-
"update:conversationCreatorFilter": (value: "all" | "mine") => any;
|
|
29
|
-
messageFeedback: (payload: MessageFeedbackPayload) => any;
|
|
30
|
-
action: (payload: ChatActionPayload) => any;
|
|
31
|
-
messageTerminal: (payload: ChatMessageTerminalPayload) => any;
|
|
32
|
-
}, string, import("vue").PublicProps, Readonly<(import("../types.js").ChatEmbedSharedProps & {
|
|
33
|
-
telaAgentId?: undefined;
|
|
34
|
-
telaAgentInputs?: undefined;
|
|
35
|
-
workspaceSettings?: import("vue").DeepReadonly<useChatAuth> | useChatAuth | null;
|
|
36
|
-
user?: import("../types.js").ChatActor | null;
|
|
37
|
-
features?: Partial<import("../feature-config.js").ChatFeatureConfig>;
|
|
38
|
-
} & import("../types.js").ChatEmbedVariantProps) | (import("../types.js").ChatEmbedSharedProps & {
|
|
39
|
-
telaAgentId: string;
|
|
40
|
-
telaAgentInputs?: import("vue").DeepReadonly<useChatAuth[]> | null;
|
|
41
|
-
workspaceSettings?: never;
|
|
42
|
-
user?: never;
|
|
43
|
-
features?: Partial<import("../feature-config.js").ChatFeatureConfig>;
|
|
44
|
-
} & import("../types.js").ChatEmbedVariantProps)> & Readonly<{
|
|
45
|
-
"onUpdate:conversationId"?: ((value: string | null) => any) | undefined;
|
|
46
|
-
"onUpdate:conversationTitle"?: ((value: string | null) => any) | undefined;
|
|
47
|
-
"onUpdate:conversationCreatorFilter"?: ((value: "all" | "mine") => any) | undefined;
|
|
48
|
-
onMessageFeedback?: ((payload: MessageFeedbackPayload) => any) | undefined;
|
|
49
|
-
onAction?: ((payload: ChatActionPayload) => any) | undefined;
|
|
50
|
-
onMessageTerminal?: ((payload: ChatMessageTerminalPayload) => any) | undefined;
|
|
51
|
-
}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
10
|
+
declare const __VLS_base: import("vue").DefineSetupFnComponent<Record<string, any>, {}, {}, Record<string, any> & {}, import("vue").PublicProps>;
|
|
52
11
|
declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
|
|
53
12
|
declare const _default: typeof __VLS_export;
|
|
54
13
|
export default _default;
|
|
@@ -16,10 +16,10 @@ type __VLS_Props = {
|
|
|
16
16
|
};
|
|
17
17
|
declare const __VLS_export: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {} & {
|
|
18
18
|
delete: () => any;
|
|
19
|
-
copyLink: () => any;
|
|
20
19
|
rename: () => any;
|
|
21
20
|
duplicate: () => any;
|
|
22
21
|
export: () => any;
|
|
22
|
+
copyLink: () => any;
|
|
23
23
|
debug: () => any;
|
|
24
24
|
tabChange: (tab: TopbarTab) => any;
|
|
25
25
|
cancelEditing: () => any;
|
|
@@ -28,10 +28,10 @@ declare const __VLS_export: import("vue").DefineComponent<__VLS_Props, {}, {}, {
|
|
|
28
28
|
"update:isEditing": (value: boolean) => any;
|
|
29
29
|
}, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{
|
|
30
30
|
onDelete?: (() => any) | undefined;
|
|
31
|
-
onCopyLink?: (() => any) | undefined;
|
|
32
31
|
onRename?: (() => any) | undefined;
|
|
33
32
|
onDuplicate?: (() => any) | undefined;
|
|
34
33
|
onExport?: (() => any) | undefined;
|
|
34
|
+
onCopyLink?: (() => any) | undefined;
|
|
35
35
|
onDebug?: (() => any) | undefined;
|
|
36
36
|
onTabChange?: ((tab: TopbarTab) => any) | undefined;
|
|
37
37
|
onCancelEditing?: (() => any) | undefined;
|
|
@@ -16,10 +16,10 @@ type __VLS_Props = {
|
|
|
16
16
|
};
|
|
17
17
|
declare const __VLS_export: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {} & {
|
|
18
18
|
delete: () => any;
|
|
19
|
-
copyLink: () => any;
|
|
20
19
|
rename: () => any;
|
|
21
20
|
duplicate: () => any;
|
|
22
21
|
export: () => any;
|
|
22
|
+
copyLink: () => any;
|
|
23
23
|
debug: () => any;
|
|
24
24
|
tabChange: (tab: TopbarTab) => any;
|
|
25
25
|
cancelEditing: () => any;
|
|
@@ -28,10 +28,10 @@ declare const __VLS_export: import("vue").DefineComponent<__VLS_Props, {}, {}, {
|
|
|
28
28
|
"update:isEditing": (value: boolean) => any;
|
|
29
29
|
}, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{
|
|
30
30
|
onDelete?: (() => any) | undefined;
|
|
31
|
-
onCopyLink?: (() => any) | undefined;
|
|
32
31
|
onRename?: (() => any) | undefined;
|
|
33
32
|
onDuplicate?: (() => any) | undefined;
|
|
34
33
|
onExport?: (() => any) | undefined;
|
|
34
|
+
onCopyLink?: (() => any) | undefined;
|
|
35
35
|
onDebug?: (() => any) | undefined;
|
|
36
36
|
onTabChange?: ((tab: TopbarTab) => any) | undefined;
|
|
37
37
|
onCancelEditing?: (() => any) | undefined;
|
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
<script setup>
|
|
2
2
|
import { computed, ref, watch } from "vue";
|
|
3
3
|
import { provideConversationCreatorFilterState } from "../../conversations/composables/conversation-creator-filter-state";
|
|
4
|
-
const { hideSidebar = void 0, ...props } = defineProps({
|
|
4
|
+
const { hideSidebar = void 0, syncBrowserState = true, closeOnOutsideClick = true, ...props } = defineProps({
|
|
5
|
+
syncBrowserState: { type: Boolean, required: false },
|
|
5
6
|
chatConfig: { type: Object, required: false },
|
|
6
7
|
telaAgentBranch: { type: [String, null], required: false },
|
|
7
8
|
conversationId: { type: [String, null], required: false },
|
|
@@ -35,6 +36,7 @@ const { hideSidebar = void 0, ...props } = defineProps({
|
|
|
35
36
|
features: { type: Object, required: false },
|
|
36
37
|
variant: { type: String, required: false },
|
|
37
38
|
defaultOpen: { type: Boolean, required: false },
|
|
39
|
+
closeOnOutsideClick: { type: Boolean, required: false },
|
|
38
40
|
launcherLabel: { type: String, required: false }
|
|
39
41
|
});
|
|
40
42
|
const emit = defineEmits(["update:conversationId", "update:conversationCreatorFilter", "update:open", "action", "messageFeedback", "messageTerminal"]);
|
|
@@ -67,6 +69,7 @@ function startWidgetConversation() {
|
|
|
67
69
|
}
|
|
68
70
|
const sharedEmbedProps = computed(() => ({
|
|
69
71
|
telaAgentBranch: props.telaAgentBranch,
|
|
72
|
+
syncBrowserState,
|
|
70
73
|
conversationId: props.conversationId,
|
|
71
74
|
conversationEvents: props.conversationEvents,
|
|
72
75
|
composerDisabled: props.composerDisabled,
|
|
@@ -123,7 +126,7 @@ const widgetEmbedProps = computed(() => ({
|
|
|
123
126
|
|
|
124
127
|
<ClientOnly v-else>
|
|
125
128
|
<!-- Floating: popover anchored to the launcher pill -->
|
|
126
|
-
<TelaChatFloatingWindow v-if="variant === 'floating'" :open="isOpen" @update:open="setOpen">
|
|
129
|
+
<TelaChatFloatingWindow v-if="variant === 'floating'" :open="isOpen" :close-on-outside-click="closeOnOutsideClick" @update:open="setOpen">
|
|
127
130
|
<template #launcher>
|
|
128
131
|
<TelaChatFloatingWindowTrigger :open="isOpen" :label="props.launcherLabel" />
|
|
129
132
|
</template>
|
|
@@ -15,22 +15,22 @@ type __VLS_Props = {
|
|
|
15
15
|
};
|
|
16
16
|
declare const __VLS_export: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {} & {
|
|
17
17
|
delete: () => any;
|
|
18
|
-
openDrawer: () => any;
|
|
19
|
-
copyLink: () => any;
|
|
20
|
-
openOutdatedSettings: () => any;
|
|
21
18
|
rename: () => any;
|
|
22
19
|
duplicate: () => any;
|
|
23
20
|
export: () => any;
|
|
21
|
+
copyLink: () => any;
|
|
22
|
+
openDrawer: () => any;
|
|
23
|
+
openOutdatedSettings: () => any;
|
|
24
24
|
debug: () => any;
|
|
25
25
|
tabChange: (tab: TopbarTab) => any;
|
|
26
26
|
}, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{
|
|
27
27
|
onDelete?: (() => any) | undefined;
|
|
28
|
-
onOpenDrawer?: (() => any) | undefined;
|
|
29
|
-
onCopyLink?: (() => any) | undefined;
|
|
30
|
-
onOpenOutdatedSettings?: (() => any) | undefined;
|
|
31
28
|
onRename?: (() => any) | undefined;
|
|
32
29
|
onDuplicate?: (() => any) | undefined;
|
|
33
30
|
onExport?: (() => any) | undefined;
|
|
31
|
+
onCopyLink?: (() => any) | undefined;
|
|
32
|
+
onOpenDrawer?: (() => any) | undefined;
|
|
33
|
+
onOpenOutdatedSettings?: (() => any) | undefined;
|
|
34
34
|
onDebug?: (() => any) | undefined;
|
|
35
35
|
onTabChange?: ((tab: TopbarTab) => any) | undefined;
|
|
36
36
|
}>, {
|
|
@@ -15,22 +15,22 @@ type __VLS_Props = {
|
|
|
15
15
|
};
|
|
16
16
|
declare const __VLS_export: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {} & {
|
|
17
17
|
delete: () => any;
|
|
18
|
-
openDrawer: () => any;
|
|
19
|
-
copyLink: () => any;
|
|
20
|
-
openOutdatedSettings: () => any;
|
|
21
18
|
rename: () => any;
|
|
22
19
|
duplicate: () => any;
|
|
23
20
|
export: () => any;
|
|
21
|
+
copyLink: () => any;
|
|
22
|
+
openDrawer: () => any;
|
|
23
|
+
openOutdatedSettings: () => any;
|
|
24
24
|
debug: () => any;
|
|
25
25
|
tabChange: (tab: TopbarTab) => any;
|
|
26
26
|
}, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{
|
|
27
27
|
onDelete?: (() => any) | undefined;
|
|
28
|
-
onOpenDrawer?: (() => any) | undefined;
|
|
29
|
-
onCopyLink?: (() => any) | undefined;
|
|
30
|
-
onOpenOutdatedSettings?: (() => any) | undefined;
|
|
31
28
|
onRename?: (() => any) | undefined;
|
|
32
29
|
onDuplicate?: (() => any) | undefined;
|
|
33
30
|
onExport?: (() => any) | undefined;
|
|
31
|
+
onCopyLink?: (() => any) | undefined;
|
|
32
|
+
onOpenDrawer?: (() => any) | undefined;
|
|
33
|
+
onOpenOutdatedSettings?: (() => any) | undefined;
|
|
34
34
|
onDebug?: (() => any) | undefined;
|
|
35
35
|
onTabChange?: ((tab: TopbarTab) => any) | undefined;
|
|
36
36
|
}>, {
|
|
@@ -61,12 +61,13 @@ declare const __VLS_base: import("vue").DefineComponent<__VLS_PublicProps, {}, {
|
|
|
61
61
|
} & {
|
|
62
62
|
delete: () => any;
|
|
63
63
|
cancel: () => any;
|
|
64
|
-
settings: () => any;
|
|
65
|
-
send: (content: string, files: FileUploadInput[], agentInputs?: TelaAgentExecutionInput[] | undefined) => any;
|
|
66
|
-
copyLink: () => any;
|
|
67
64
|
rename: () => any;
|
|
68
65
|
duplicate: () => any;
|
|
69
66
|
export: () => any;
|
|
67
|
+
copyLink: () => any;
|
|
68
|
+
selectConversation: (id: string) => any;
|
|
69
|
+
settings: () => any;
|
|
70
|
+
send: (content: string, files: FileUploadInput[], agentInputs?: TelaAgentExecutionInput[] | undefined) => any;
|
|
70
71
|
debug: () => any;
|
|
71
72
|
tabChange: (tab: TopbarTab) => any;
|
|
72
73
|
newConversation: (groupId?: string | null | undefined) => any;
|
|
@@ -75,21 +76,21 @@ declare const __VLS_base: import("vue").DefineComponent<__VLS_PublicProps, {}, {
|
|
|
75
76
|
cancelEditing: () => any;
|
|
76
77
|
dismissOutdatedBanner: () => any;
|
|
77
78
|
saveTitle: () => any;
|
|
78
|
-
selectConversation: (id: string) => any;
|
|
79
79
|
"update:drawerOpen": (value: boolean) => any;
|
|
80
80
|
"update:editTitle": (value: string) => any;
|
|
81
81
|
"update:workspaceSheetOpen": (value: boolean) => any;
|
|
82
82
|
}, string, import("vue").PublicProps, Readonly<__VLS_PublicProps> & Readonly<{
|
|
83
83
|
onDelete?: (() => any) | undefined;
|
|
84
84
|
onCancel?: (() => any) | undefined;
|
|
85
|
+
onRename?: (() => any) | undefined;
|
|
86
|
+
onDuplicate?: (() => any) | undefined;
|
|
87
|
+
onExport?: (() => any) | undefined;
|
|
88
|
+
onCopyLink?: (() => any) | undefined;
|
|
89
|
+
onSelectConversation?: ((id: string) => any) | undefined;
|
|
85
90
|
onSettings?: (() => any) | undefined;
|
|
86
91
|
onSend?: ((content: string, files: FileUploadInput[], agentInputs?: TelaAgentExecutionInput[] | undefined) => any) | undefined;
|
|
87
92
|
"onUpdate:selectedModel"?: ((value: string | null) => any) | undefined;
|
|
88
93
|
"onUpdate:selectedReasoningEffort"?: ((value: any) => any) | undefined;
|
|
89
|
-
onCopyLink?: (() => any) | undefined;
|
|
90
|
-
onRename?: (() => any) | undefined;
|
|
91
|
-
onDuplicate?: (() => any) | undefined;
|
|
92
|
-
onExport?: (() => any) | undefined;
|
|
93
94
|
onDebug?: (() => any) | undefined;
|
|
94
95
|
onTabChange?: ((tab: TopbarTab) => any) | undefined;
|
|
95
96
|
onNewConversation?: ((groupId?: string | null | undefined) => any) | undefined;
|
|
@@ -98,7 +99,6 @@ declare const __VLS_base: import("vue").DefineComponent<__VLS_PublicProps, {}, {
|
|
|
98
99
|
onCancelEditing?: (() => any) | undefined;
|
|
99
100
|
onDismissOutdatedBanner?: (() => any) | undefined;
|
|
100
101
|
onSaveTitle?: (() => any) | undefined;
|
|
101
|
-
onSelectConversation?: ((id: string) => any) | undefined;
|
|
102
102
|
"onUpdate:drawerOpen"?: ((value: boolean) => any) | undefined;
|
|
103
103
|
"onUpdate:editTitle"?: ((value: string) => any) | undefined;
|
|
104
104
|
"onUpdate:workspaceSheetOpen"?: ((value: boolean) => any) | undefined;
|
|
@@ -61,12 +61,13 @@ declare const __VLS_base: import("vue").DefineComponent<__VLS_PublicProps, {}, {
|
|
|
61
61
|
} & {
|
|
62
62
|
delete: () => any;
|
|
63
63
|
cancel: () => any;
|
|
64
|
-
settings: () => any;
|
|
65
|
-
send: (content: string, files: FileUploadInput[], agentInputs?: TelaAgentExecutionInput[] | undefined) => any;
|
|
66
|
-
copyLink: () => any;
|
|
67
64
|
rename: () => any;
|
|
68
65
|
duplicate: () => any;
|
|
69
66
|
export: () => any;
|
|
67
|
+
copyLink: () => any;
|
|
68
|
+
selectConversation: (id: string) => any;
|
|
69
|
+
settings: () => any;
|
|
70
|
+
send: (content: string, files: FileUploadInput[], agentInputs?: TelaAgentExecutionInput[] | undefined) => any;
|
|
70
71
|
debug: () => any;
|
|
71
72
|
tabChange: (tab: TopbarTab) => any;
|
|
72
73
|
newConversation: (groupId?: string | null | undefined) => any;
|
|
@@ -75,21 +76,21 @@ declare const __VLS_base: import("vue").DefineComponent<__VLS_PublicProps, {}, {
|
|
|
75
76
|
cancelEditing: () => any;
|
|
76
77
|
dismissOutdatedBanner: () => any;
|
|
77
78
|
saveTitle: () => any;
|
|
78
|
-
selectConversation: (id: string) => any;
|
|
79
79
|
"update:drawerOpen": (value: boolean) => any;
|
|
80
80
|
"update:editTitle": (value: string) => any;
|
|
81
81
|
"update:workspaceSheetOpen": (value: boolean) => any;
|
|
82
82
|
}, string, import("vue").PublicProps, Readonly<__VLS_PublicProps> & Readonly<{
|
|
83
83
|
onDelete?: (() => any) | undefined;
|
|
84
84
|
onCancel?: (() => any) | undefined;
|
|
85
|
+
onRename?: (() => any) | undefined;
|
|
86
|
+
onDuplicate?: (() => any) | undefined;
|
|
87
|
+
onExport?: (() => any) | undefined;
|
|
88
|
+
onCopyLink?: (() => any) | undefined;
|
|
89
|
+
onSelectConversation?: ((id: string) => any) | undefined;
|
|
85
90
|
onSettings?: (() => any) | undefined;
|
|
86
91
|
onSend?: ((content: string, files: FileUploadInput[], agentInputs?: TelaAgentExecutionInput[] | undefined) => any) | undefined;
|
|
87
92
|
"onUpdate:selectedModel"?: ((value: string | null) => any) | undefined;
|
|
88
93
|
"onUpdate:selectedReasoningEffort"?: ((value: any) => any) | undefined;
|
|
89
|
-
onCopyLink?: (() => any) | undefined;
|
|
90
|
-
onRename?: (() => any) | undefined;
|
|
91
|
-
onDuplicate?: (() => any) | undefined;
|
|
92
|
-
onExport?: (() => any) | undefined;
|
|
93
94
|
onDebug?: (() => any) | undefined;
|
|
94
95
|
onTabChange?: ((tab: TopbarTab) => any) | undefined;
|
|
95
96
|
onNewConversation?: ((groupId?: string | null | undefined) => any) | undefined;
|
|
@@ -98,7 +99,6 @@ declare const __VLS_base: import("vue").DefineComponent<__VLS_PublicProps, {}, {
|
|
|
98
99
|
onCancelEditing?: (() => any) | undefined;
|
|
99
100
|
onDismissOutdatedBanner?: (() => any) | undefined;
|
|
100
101
|
onSaveTitle?: (() => any) | undefined;
|
|
101
|
-
onSelectConversation?: ((id: string) => any) | undefined;
|
|
102
102
|
"onUpdate:drawerOpen"?: ((value: boolean) => any) | undefined;
|
|
103
103
|
"onUpdate:editTitle"?: ((value: string) => any) | undefined;
|
|
104
104
|
"onUpdate:workspaceSheetOpen"?: ((value: boolean) => any) | undefined;
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
import type { Ref } from 'vue';
|
|
2
|
-
export declare function useConversationBrowserState(conversationId: Ref<string | null>, title: Ref<string | null
|
|
2
|
+
export declare function useConversationBrowserState(conversationId: Ref<string | null>, title: Ref<string | null>, enabled?: () => boolean): void;
|
|
@@ -1,9 +1,11 @@
|
|
|
1
|
-
export function useConversationBrowserState(conversationId, title) {
|
|
1
|
+
export function useConversationBrowserState(conversationId, title, enabled = () => true) {
|
|
2
2
|
const route = useRoute();
|
|
3
3
|
const router = useRouter();
|
|
4
|
-
useHead(computed(() => title.value ? { title: title.value } : {}));
|
|
4
|
+
useHead(computed(() => enabled() && title.value ? { title: title.value } : {}));
|
|
5
5
|
onMounted(() => {
|
|
6
|
-
watch(conversationId, async (id) => {
|
|
6
|
+
watch([conversationId, enabled], async ([id, sync]) => {
|
|
7
|
+
if (!sync)
|
|
8
|
+
return;
|
|
7
9
|
if (route.query.conversationId === (id ?? void 0) && route.query.conversation === void 0)
|
|
8
10
|
return;
|
|
9
11
|
const query = { ...route.query };
|