@meistrari/chat-nuxt 4.4.0-rc.2 → 4.4.0-rc.3

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 (49) hide show
  1. package/dist/module.json +1 -1
  2. package/dist/runtime/conversations/components/chat-new-conversation-modal.d.vue.ts +1 -1
  3. package/dist/runtime/conversations/components/chat-new-conversation-modal.vue.d.ts +1 -1
  4. package/dist/runtime/conversations/composables/conversations.js +2 -1
  5. package/dist/runtime/embed/components/chat-embed-inner.d.vue.ts +6 -1
  6. package/dist/runtime/embed/components/chat-embed-inner.vue +68 -41
  7. package/dist/runtime/embed/components/chat-embed-inner.vue.d.ts +6 -1
  8. package/dist/runtime/embed/components/chat-embed.d.vue.ts +3 -1
  9. package/dist/runtime/embed/components/chat-embed.vue +2 -1
  10. package/dist/runtime/embed/components/chat-embed.vue.d.ts +3 -1
  11. package/dist/runtime/embed/components/chat-topbar.d.vue.ts +2 -2
  12. package/dist/runtime/embed/components/chat-topbar.vue.d.ts +2 -2
  13. package/dist/runtime/embed/components/meistrari-chat-embed.vue +2 -1
  14. package/dist/runtime/embed/components/mobile/chat-mobile-header.d.vue.ts +6 -6
  15. package/dist/runtime/embed/components/mobile/chat-mobile-header.vue.d.ts +6 -6
  16. package/dist/runtime/embed/components/mobile/chat-mobile-shell.d.vue.ts +10 -10
  17. package/dist/runtime/embed/components/mobile/chat-mobile-shell.vue.d.ts +10 -10
  18. package/dist/runtime/embed/composables/embed-config.d.ts +4 -5
  19. package/dist/runtime/embed/composables/harness-adapter.d.ts +14 -0
  20. package/dist/runtime/embed/composables/harness-adapter.js +8 -0
  21. package/dist/runtime/embed/types.d.ts +11 -7
  22. package/dist/runtime/lightweight/embed/components/chat-embed-adapter.d.vue.ts +13 -0
  23. package/dist/runtime/lightweight/embed/components/chat-embed-adapter.vue +20 -0
  24. package/dist/runtime/lightweight/embed/components/chat-embed-adapter.vue.d.ts +13 -0
  25. package/dist/runtime/lightweight/embed/composables/model-selection.d.ts +5 -0
  26. package/dist/runtime/lightweight/embed/composables/model-selection.js +29 -0
  27. package/dist/runtime/lightweight/messages/composables/chat-model-catalog.d.ts +10 -0
  28. package/dist/runtime/lightweight/messages/composables/chat-model-catalog.js +55 -0
  29. package/dist/runtime/lightweight/messages/composables/chat.d.ts +42 -0
  30. package/dist/runtime/lightweight/messages/composables/chat.js +10 -0
  31. package/dist/runtime/lightweight/messages/composables/use-direct-stream.d.ts +53 -0
  32. package/dist/runtime/lightweight/messages/composables/use-direct-stream.js +293 -0
  33. package/dist/runtime/lightweight/messages/model-availability.d.ts +7 -0
  34. package/dist/runtime/lightweight/messages/model-availability.js +29 -0
  35. package/dist/runtime/lightweight/messages/model-options.d.ts +27 -0
  36. package/dist/runtime/lightweight/messages/model-options.js +40 -0
  37. package/dist/runtime/messages/components/chat-message-bubble.vue +21 -0
  38. package/dist/runtime/messages/components/chat-message-input.vue +3 -0
  39. package/dist/runtime/messages/components/chat-message-list.d.vue.ts +2 -2
  40. package/dist/runtime/messages/components/chat-message-list.vue +1 -0
  41. package/dist/runtime/messages/components/chat-message-list.vue.d.ts +2 -2
  42. package/dist/runtime/messages/components/chat-model-selector.vue +13 -1
  43. package/dist/runtime/messages/composables/chat.d.ts +15 -3
  44. package/dist/runtime/messages/composables/chat.js +17 -6
  45. package/dist/runtime/messages/model-availability.d.ts +2 -2
  46. package/dist/runtime/shared/composables/chat-request-context.d.ts +3 -0
  47. package/dist/runtime/shared/composables/chat-request-context.js +4 -0
  48. package/dist/runtime/usage/formatting.js +2 -3
  49. package/package.json +2 -1
package/dist/module.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@meistrari/chat-nuxt",
3
3
  "configKey": "chatNuxt",
4
- "version": "4.4.0-rc.2",
4
+ "version": "4.4.0-rc.3",
5
5
  "builder": {
6
6
  "@nuxt/module-builder": "1.0.2",
7
7
  "unbuild": "unknown"
@@ -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
- "onUpdate:modelValue"?: ((value: boolean | undefined) => any) | undefined;
10
9
  onCreate?: ((canvasTools: CanvasTool[]) => any) | undefined;
10
+ "onUpdate:modelValue"?: ((value: boolean | undefined) => 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
- "onUpdate:modelValue"?: ((value: boolean | undefined) => any) | undefined;
10
9
  onCreate?: ((canvasTools: CanvasTool[]) => any) | undefined;
10
+ "onUpdate:modelValue"?: ((value: boolean | undefined) => any) | undefined;
11
11
  }>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
12
12
  declare const _default: typeof __VLS_export;
13
13
  export default _default;
@@ -1,3 +1,4 @@
1
+ import { getChatApiErrorMessage } from "../../shared/chat-api-error.js";
1
2
  import { useChatAuth } from "#chat-auth";
2
3
  import * as Sentry from "@sentry/nuxt";
3
4
  import { resolveChatStateScope } from "../scope.js";
@@ -348,7 +349,7 @@ export function useConversations() {
348
349
  } catch (err) {
349
350
  removeConversationFromLoadedBuckets(optimisticConversation.id, requestRuntimeScope);
350
351
  restoreConversationMetadata(requestRuntimeScope, metadataSnapshot);
351
- const message = err instanceof Error ? err.message : "Erro ao criar conversa";
352
+ const message = getChatApiErrorMessage(err) ?? "Erro ao criar conversa";
352
353
  error.value = message;
353
354
  statusToast.update({
354
355
  text: "Erro ao criar conversa",
@@ -1,3 +1,4 @@
1
+ import { useChatAuth } from '#chat-auth';
1
2
  import type { ConversationEvent } from '../../types/schemas/chat/conversations.js';
2
3
  import type { ChatFeatureConfig } from '../feature-config.js';
3
4
  import type { ChatActor, ChatSidebarConfig, ChatSuggestion } from '../types.js';
@@ -15,7 +16,11 @@ type __VLS_Props = {
15
16
  user?: EmbedUser | null;
16
17
  features?: Partial<ChatFeatureConfig>;
17
18
  };
18
- declare var __VLS_11: {}, __VLS_96: any, __VLS_204: any;
19
+ declare var __VLS_11: {}, __VLS_96: {
20
+ message: useChatAuth;
21
+ }, __VLS_204: {
22
+ message: useChatAuth;
23
+ };
19
24
  type __VLS_Slots = {} & {
20
25
  'sidebar-bottom'?: (props: typeof __VLS_11) => any;
21
26
  } & {
@@ -1,5 +1,7 @@
1
1
  <script setup>
2
2
  import { inject, provide } from "vue";
3
+ import { useChatHarnessAdapter } from "../composables/harness-adapter";
4
+ import ChatMessageList from "../../messages/components/chat-message-list.vue";
3
5
  import { CHAT_COMPOSER_EXTENSION_KEY } from "../../types/composer";
4
6
  import { CHAT_MESSAGE_SEND_KEY } from "../../types/messages";
5
7
  import { useChatAuth } from "#chat-auth";
@@ -82,6 +84,7 @@ const statusToast = useStatusToast();
82
84
  const {
83
85
  conversations,
84
86
  loading: conversationsLoading,
87
+ error: conversationError,
85
88
  fetchConversations,
86
89
  createConversation,
87
90
  deleteConversation,
@@ -177,6 +180,9 @@ const { isDragging, setupDropZone } = useFileDrop({
177
180
  }
178
181
  });
179
182
  setupDropZone(dropZoneRef);
183
+ const harnessAdapter = useChatHarnessAdapter();
184
+ const createChat = harnessAdapter?.useChat ?? useChat;
185
+ const nativeModels = harnessAdapter?.useModelSelection() ?? null;
180
186
  const {
181
187
  currentConversation,
182
188
  messages,
@@ -204,12 +210,12 @@ const {
204
210
  startPolling,
205
211
  clearConversation,
206
212
  error: chatError
207
- } = useChat({
213
+ } = createChat({
208
214
  outboundQueueEnabled: computed(() => resolvedFeatures.value.chatOutboundQueue),
209
215
  onQueuedSendCancelled: restoreQueuedSend,
210
216
  onQueuedSendFailed: restoreQueuedSend
211
217
  });
212
- const agentWake = useAgentWake();
218
+ const agentWake = harnessAdapter?.requiresSandboxWake === false ? null : useAgentWake();
213
219
  const modelUpdateInFlight = ref(null);
214
220
  const reasoningEffortUpdateInFlight = ref(null);
215
221
  const REASONING_EFFORT_UPDATE_FAILED_MESSAGE = "N\xE3o foi poss\xEDvel atualizar o esfor\xE7o de racioc\xEDnio da conversa";
@@ -224,7 +230,7 @@ function persistConversationModel(conversation, value, wakeAgent) {
224
230
  const update = updateConversationModel(conversation.id, value).then(async (updated) => {
225
231
  if (!updated && currentConversation.value?.id === conversation.id && currentConversation.value.model === value) {
226
232
  setConversationModel(previousModel);
227
- } else if (updated && value && wakeAgent && !chatApi.conversationV2Enabled) {
233
+ } else if (agentWake && updated && value && wakeAgent && !chatApi.conversationV2Enabled) {
228
234
  if (conversation.threadSessionId)
229
235
  await agentWake.ensureReady(conversation.threadSessionId, value);
230
236
  else
@@ -269,13 +275,15 @@ async function waitForPendingReasoningEffortUpdate() {
269
275
  throw new Error(REASONING_EFFORT_UPDATE_FAILED_MESSAGE);
270
276
  }
271
277
  }
278
+ function resolveSelectedModel(value) {
279
+ return nativeModels ? nativeModels.resolve(value) : resolveChatModelSelection(value, embedConfig?.availableModels.value);
280
+ }
272
281
  const selectedModel = computed({
273
- get: () => resolveChatModelSelection(
274
- currentConversation.value ? currentConversation.value.model : pendingModelSelection.value,
275
- embedConfig?.availableModels.value
282
+ get: () => resolveSelectedModel(
283
+ currentConversation.value ? currentConversation.value.model : pendingModelSelection.value
276
284
  ),
277
285
  set: (value) => {
278
- const resolvedValue = resolveChatModelSelection(value, embedConfig?.availableModels.value);
286
+ const resolvedValue = resolveSelectedModel(value);
279
287
  pendingModelSelection.value = resolvedValue;
280
288
  const conversation = currentConversation.value;
281
289
  if (conversation && conversation.model !== resolvedValue)
@@ -330,7 +338,7 @@ function updateConversationId(nextConversationId) {
330
338
  }
331
339
  async function ensureConversationLoaded(conversationId) {
332
340
  if (currentConversation.value?.id === conversationId) {
333
- if (chatApi.conversationV2Enabled) {
341
+ if (!agentWake || chatApi.conversationV2Enabled) {
334
342
  startPolling();
335
343
  return;
336
344
  }
@@ -350,14 +358,14 @@ async function ensureConversationLoaded(conversationId) {
350
358
  if (!ownsChatState)
351
359
  return;
352
360
  if (currentConversation.value?.id !== conversationId) {
353
- agentWake.skip();
361
+ agentWake?.skip();
354
362
  statusToast.update({
355
363
  text: "Erro ao carregar conversa",
356
364
  icon: "i-ph-warning"
357
365
  });
358
366
  return;
359
367
  }
360
- if (chatApi.conversationV2Enabled) {
368
+ if (!agentWake || chatApi.conversationV2Enabled) {
361
369
  startPolling();
362
370
  return;
363
371
  }
@@ -374,8 +382,8 @@ async function ensureConversationLoaded(conversationId) {
374
382
  }
375
383
  function resetConversation(shouldEmit = true) {
376
384
  clearConversation();
377
- agentWake.consume();
378
- if (!chatApi.conversationV2Enabled)
385
+ agentWake?.consume();
386
+ if (agentWake && !chatApi.conversationV2Enabled)
379
387
  void agentWake.wake(void 0, selectedModel.value);
380
388
  activeTab.value = "chat";
381
389
  closeFilesPanel();
@@ -540,7 +548,7 @@ const conversationCreator = computed(
540
548
  })
541
549
  );
542
550
  function claimableWakeSessionId() {
543
- return agentWake.state.value === "ready" && !currentConversation.value?.threadSessionId ? agentWake.sessionId.value : void 0;
551
+ return agentWake?.state.value === "ready" && !currentConversation.value?.threadSessionId ? agentWake.sessionId.value : void 0;
544
552
  }
545
553
  async function handleSend(content, files, agentInputs) {
546
554
  const prepared = composerExtension?.prepareSend?.(content);
@@ -555,6 +563,7 @@ async function handleSend(content, files, agentInputs) {
555
563
  async function dispatchMessage(outbound, files, resolvedAgentInputs) {
556
564
  let claimedWakeSessionId;
557
565
  const sent = await sendMessage(outbound, files.length > 0 ? files : void 0, resolvedAgentInputs, async (signal) => {
566
+ await nativeModels?.ensureReady();
558
567
  if (!activeConversationId.value || !currentConversation.value) {
559
568
  const conversation2 = await createConversation({
560
569
  model: selectedModel.value,
@@ -562,7 +571,7 @@ async function dispatchMessage(outbound, files, resolvedAgentInputs) {
562
571
  ...resolvedAgentInputs !== void 0 ? { agentInputs: resolvedAgentInputs } : {}
563
572
  });
564
573
  if (!conversation2)
565
- throw new Error("Erro ao criar conversa");
574
+ throw new Error(conversationError.value ?? "Erro ao criar conversa");
566
575
  const groupId = pendingConversationGroupId.value;
567
576
  clearPendingConversationGroup();
568
577
  const grouped = groupId && await moveConversationToGroup(conversation2.id, groupId);
@@ -574,12 +583,12 @@ async function dispatchMessage(outbound, files, resolvedAgentInputs) {
574
583
  const conversation = currentConversation.value;
575
584
  if (!conversation)
576
585
  throw new Error("Erro ao preparar conversa");
577
- await ensureConversationUsesSelectedModel(
586
+ await (nativeModels?.ensureSelectedModel ?? ensureConversationUsesSelectedModel)(
578
587
  conversation.model,
579
588
  selectedModel.value,
580
589
  (value) => persistConversationModel(conversation, value, false)
581
590
  );
582
- if (chatApi.conversationV2Enabled)
591
+ if (!agentWake || chatApi.conversationV2Enabled)
583
592
  return {};
584
593
  if (conversation.threadSessionId && resolvedFeatures.value.chatOutboundQueue) {
585
594
  const wake = await agentWake.ensureReady(conversation.threadSessionId, selectedModel.value);
@@ -601,32 +610,34 @@ async function dispatchMessage(outbound, files, resolvedAgentInputs) {
601
610
  return claimedWakeSessionId ? { wakeSessionId: claimedWakeSessionId } : {};
602
611
  });
603
612
  if (sent && claimedWakeSessionId)
604
- agentWake.consume();
613
+ agentWake?.consume();
605
614
  return sent;
606
615
  }
607
- watch(
608
- [outboundOccupied, agentWake.state],
609
- async ([occupied, wakeState]) => {
610
- if (!occupied)
611
- return;
612
- if (wakeState === "ready") {
613
- const wakeSessionId = claimableWakeSessionId();
614
- const sent = await flushOutboundQueue(wakeSessionId);
615
- if (sent && wakeSessionId)
616
- agentWake.consume();
617
- } else if (wakeState === "unavailable" && (agentSessionRewakeable.value || sessionReady.value === null)) {
618
- failOutboundQueue("N\xE3o foi poss\xEDvel acordar o agente. Tente novamente.");
616
+ if (agentWake) {
617
+ watch(
618
+ [outboundOccupied, agentWake.state],
619
+ async ([occupied, wakeState]) => {
620
+ if (!occupied)
621
+ return;
622
+ if (wakeState === "ready") {
623
+ const wakeSessionId = claimableWakeSessionId();
624
+ const sent = await flushOutboundQueue(wakeSessionId);
625
+ if (sent && wakeSessionId)
626
+ agentWake.consume();
627
+ } else if (wakeState === "unavailable" && (agentSessionRewakeable.value || sessionReady.value === null)) {
628
+ failOutboundQueue("N\xE3o foi poss\xEDvel acordar o agente. Tente novamente.");
629
+ }
619
630
  }
620
- }
621
- );
622
- watch(
623
- [outboundOccupied, agentSessionRewakeable],
624
- ([occupied, rewakeable]) => {
625
- const sessionId = currentConversation.value?.threadSessionId;
626
- if (occupied && rewakeable && sessionId && agentWake.state.value !== "waking")
627
- void agentWake.wake(sessionId, selectedModel.value);
628
- }
629
- );
631
+ );
632
+ watch(
633
+ [outboundOccupied, agentSessionRewakeable],
634
+ ([occupied, rewakeable]) => {
635
+ const sessionId = currentConversation.value?.threadSessionId;
636
+ if (occupied && rewakeable && sessionId && agentWake.state.value !== "waking")
637
+ void agentWake.wake(sessionId, selectedModel.value);
638
+ }
639
+ );
640
+ }
630
641
  const sendChatMessageFromContent = async (content) => {
631
642
  const trimmed = content.trim();
632
643
  if (!trimmed || props.composerDisabled || composerLocked.value)
@@ -640,16 +651,19 @@ async function handleCancel() {
640
651
  }
641
652
  async function handleRetry(messageId) {
642
653
  await retryMessage(messageId, async () => {
654
+ await nativeModels?.ensureReady();
643
655
  await waitForPendingModelUpdate();
644
656
  await waitForPendingReasoningEffortUpdate();
645
657
  const conversation = currentConversation.value;
646
658
  if (!conversation)
647
659
  throw new Error("Erro ao preparar conversa");
648
- await ensureConversationUsesSelectedModel(
660
+ await (nativeModels?.ensureSelectedModel ?? ensureConversationUsesSelectedModel)(
649
661
  conversation.model,
650
662
  selectedModel.value,
651
663
  (value) => persistConversationModel(conversation, value, false)
652
664
  );
665
+ if (!agentWake)
666
+ return;
653
667
  if (conversation.threadSessionId) {
654
668
  const wake = await agentWake.ensureReady(conversation.threadSessionId, selectedModel.value);
655
669
  if (wake.status !== "ready")
@@ -743,16 +757,21 @@ function startEditing() {
743
757
  justStartedEditing.value = false;
744
758
  }, 100);
745
759
  }
760
+ let titleSaveRevision = 0;
746
761
  async function saveTitle() {
747
762
  if (justStartedEditing.value)
748
763
  return;
749
764
  const trimmed = editTitle.value.trim();
750
765
  if (trimmed && trimmed !== currentConversation.value?.title && currentConversation.value) {
766
+ const conversationId = currentConversation.value.id;
767
+ const revision = ++titleSaveRevision;
751
768
  optimisticTitle.value = trimmed;
752
769
  const success = await renameConversation(
753
- currentConversation.value.id,
770
+ conversationId,
754
771
  trimmed
755
772
  );
773
+ if (revision !== titleSaveRevision || currentConversation.value?.id !== conversationId)
774
+ return;
756
775
  if (!success)
757
776
  optimisticTitle.value = null;
758
777
  }
@@ -864,6 +883,14 @@ async function handleDelete() {
864
883
 
865
884
  <template>
866
885
  <div ref="dropZoneRef" h-full flex bg-white relative>
886
+ <div
887
+ v-if="chatError"
888
+ role="alert"
889
+ absolute top-12px left-12px right-12px z-50
890
+ rounded-8px bg-error text-error p-12px body-14-regular
891
+ >
892
+ {{ chatError }}
893
+ </div>
867
894
  <!-- Sidebar -->
868
895
  <div
869
896
  v-if="!hideSidebar && !isMobile"
@@ -1,3 +1,4 @@
1
+ import { useChatAuth } from '#chat-auth';
1
2
  import type { ConversationEvent } from '../../types/schemas/chat/conversations.js';
2
3
  import type { ChatFeatureConfig } from '../feature-config.js';
3
4
  import type { ChatActor, ChatSidebarConfig, ChatSuggestion } from '../types.js';
@@ -15,7 +16,11 @@ type __VLS_Props = {
15
16
  user?: EmbedUser | null;
16
17
  features?: Partial<ChatFeatureConfig>;
17
18
  };
18
- declare var __VLS_11: {}, __VLS_96: any, __VLS_204: any;
19
+ declare var __VLS_11: {}, __VLS_96: {
20
+ message: useChatAuth;
21
+ }, __VLS_204: {
22
+ message: useChatAuth;
23
+ };
19
24
  type __VLS_Slots = {} & {
20
25
  'sidebar-bottom'?: (props: typeof __VLS_11) => any;
21
26
  } & {
@@ -2,7 +2,9 @@ import { useChatAuth } from '#chat-auth';
2
2
  import { type ChatActionPayload } from '../../messages/composables/chat-action.js';
3
3
  import { type MessageFeedbackPayload } from '../../messages/composables/chat-feedback.js';
4
4
  import { type ChatMessageTerminalPayload } from '../../messages/composables/chat-message-terminal.js';
5
- declare var __VLS_13: {}, __VLS_16: any;
5
+ declare var __VLS_13: {}, __VLS_16: {
6
+ message: useChatAuth;
7
+ };
6
8
  type __VLS_Slots = {} & {
7
9
  'sidebar-bottom'?: (props: typeof __VLS_13) => any;
8
10
  } & {
@@ -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
+ chatConfig: { type: Object, required: false },
12
13
  telaAgentBranch: { type: [String, null], required: false },
13
14
  conversationId: { type: [String, null], required: false },
14
15
  conversationEvents: { type: [Array, null], required: false },
@@ -17,7 +18,7 @@ const props = defineProps({
17
18
  conversationScope: { type: [String, null], required: false },
18
19
  defaultConversationCreatorFilter: { type: null, required: false },
19
20
  availableModels: { type: Array, required: false },
20
- defaultModel: { type: null, required: false },
21
+ defaultModel: { type: String, required: false },
21
22
  defaultReasoningEffort: { type: null, required: false },
22
23
  conversationCreatorFilter: { type: null, required: false },
23
24
  hideConversationCreatorFilter: { type: Boolean, required: false },
@@ -2,7 +2,9 @@ import { useChatAuth } from '#chat-auth';
2
2
  import { type ChatActionPayload } from '../../messages/composables/chat-action.js';
3
3
  import { type MessageFeedbackPayload } from '../../messages/composables/chat-feedback.js';
4
4
  import { type ChatMessageTerminalPayload } from '../../messages/composables/chat-message-terminal.js';
5
- declare var __VLS_13: {}, __VLS_16: any;
5
+ declare var __VLS_13: {}, __VLS_16: {
6
+ message: useChatAuth;
7
+ };
6
8
  type __VLS_Slots = {} & {
7
9
  'sidebar-bottom'?: (props: typeof __VLS_13) => any;
8
10
  } & {
@@ -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;
19
20
  rename: () => any;
20
21
  duplicate: () => any;
21
22
  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;
31
32
  onRename?: (() => any) | undefined;
32
33
  onDuplicate?: (() => any) | undefined;
33
34
  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;
19
20
  rename: () => any;
20
21
  duplicate: () => any;
21
22
  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;
31
32
  onRename?: (() => any) | undefined;
32
33
  onDuplicate?: (() => any) | undefined;
33
34
  onExport?: (() => any) | undefined;
34
- onCopyLink?: (() => any) | undefined;
35
35
  onDebug?: (() => any) | undefined;
36
36
  onTabChange?: ((tab: TopbarTab) => any) | undefined;
37
37
  onCancelEditing?: (() => any) | undefined;
@@ -2,6 +2,7 @@
2
2
  import { computed, ref, watch } from "vue";
3
3
  import { provideConversationCreatorFilterState } from "../../conversations/composables/conversation-creator-filter-state";
4
4
  const { hideSidebar = void 0, ...props } = defineProps({
5
+ chatConfig: { type: Object, required: false },
5
6
  telaAgentBranch: { type: [String, null], required: false },
6
7
  conversationId: { type: [String, null], required: false },
7
8
  conversationEvents: { type: [Array, null], required: false },
@@ -10,7 +11,7 @@ const { hideSidebar = void 0, ...props } = defineProps({
10
11
  conversationScope: { type: [String, null], required: false },
11
12
  defaultConversationCreatorFilter: { type: null, required: false },
12
13
  availableModels: { type: Array, required: false },
13
- defaultModel: { type: null, required: false },
14
+ defaultModel: { type: String, required: false },
14
15
  defaultReasoningEffort: { type: null, required: false },
15
16
  conversationCreatorFilter: { type: null, required: false },
16
17
  hideConversationCreatorFilter: { type: Boolean, required: false },
@@ -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;
18
21
  rename: () => any;
19
22
  duplicate: () => any;
20
23
  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;
28
31
  onRename?: (() => any) | undefined;
29
32
  onDuplicate?: (() => any) | undefined;
30
33
  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;
18
21
  rename: () => any;
19
22
  duplicate: () => any;
20
23
  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;
28
31
  onRename?: (() => any) | undefined;
29
32
  onDuplicate?: (() => any) | undefined;
30
33
  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,13 +61,12 @@ 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;
64
67
  rename: () => any;
65
68
  duplicate: () => any;
66
69
  export: () => any;
67
- copyLink: () => any;
68
- selectConversation: (id: string) => any;
69
- send: (content: string, files: FileUploadInput[], agentInputs?: TelaAgentExecutionInput[] | undefined) => any;
70
- settings: () => any;
71
70
  debug: () => any;
72
71
  tabChange: (tab: TopbarTab) => any;
73
72
  newConversation: (groupId?: string | null | undefined) => any;
@@ -76,21 +75,21 @@ declare const __VLS_base: import("vue").DefineComponent<__VLS_PublicProps, {}, {
76
75
  cancelEditing: () => any;
77
76
  dismissOutdatedBanner: () => any;
78
77
  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;
90
- onSend?: ((content: string, files: FileUploadInput[], agentInputs?: TelaAgentExecutionInput[] | undefined) => any) | undefined;
91
85
  onSettings?: (() => any) | undefined;
86
+ onSend?: ((content: string, files: FileUploadInput[], agentInputs?: TelaAgentExecutionInput[] | undefined) => any) | undefined;
92
87
  "onUpdate:selectedModel"?: ((value: string | null) => any) | undefined;
93
88
  "onUpdate:selectedReasoningEffort"?: ((value: any) => any) | undefined;
89
+ onCopyLink?: (() => any) | undefined;
90
+ onRename?: (() => any) | undefined;
91
+ onDuplicate?: (() => any) | undefined;
92
+ onExport?: (() => any) | undefined;
94
93
  onDebug?: (() => any) | undefined;
95
94
  onTabChange?: ((tab: TopbarTab) => any) | undefined;
96
95
  onNewConversation?: ((groupId?: string | null | undefined) => any) | undefined;
@@ -99,6 +98,7 @@ declare const __VLS_base: import("vue").DefineComponent<__VLS_PublicProps, {}, {
99
98
  onCancelEditing?: (() => any) | undefined;
100
99
  onDismissOutdatedBanner?: (() => any) | undefined;
101
100
  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,13 +61,12 @@ 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;
64
67
  rename: () => any;
65
68
  duplicate: () => any;
66
69
  export: () => any;
67
- copyLink: () => any;
68
- selectConversation: (id: string) => any;
69
- send: (content: string, files: FileUploadInput[], agentInputs?: TelaAgentExecutionInput[] | undefined) => any;
70
- settings: () => any;
71
70
  debug: () => any;
72
71
  tabChange: (tab: TopbarTab) => any;
73
72
  newConversation: (groupId?: string | null | undefined) => any;
@@ -76,21 +75,21 @@ declare const __VLS_base: import("vue").DefineComponent<__VLS_PublicProps, {}, {
76
75
  cancelEditing: () => any;
77
76
  dismissOutdatedBanner: () => any;
78
77
  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;
90
- onSend?: ((content: string, files: FileUploadInput[], agentInputs?: TelaAgentExecutionInput[] | undefined) => any) | undefined;
91
85
  onSettings?: (() => any) | undefined;
86
+ onSend?: ((content: string, files: FileUploadInput[], agentInputs?: TelaAgentExecutionInput[] | undefined) => any) | undefined;
92
87
  "onUpdate:selectedModel"?: ((value: string | null) => any) | undefined;
93
88
  "onUpdate:selectedReasoningEffort"?: ((value: any) => any) | undefined;
89
+ onCopyLink?: (() => any) | undefined;
90
+ onRename?: (() => any) | undefined;
91
+ onDuplicate?: (() => any) | undefined;
92
+ onExport?: (() => any) | undefined;
94
93
  onDebug?: (() => any) | undefined;
95
94
  onTabChange?: ((tab: TopbarTab) => any) | undefined;
96
95
  onNewConversation?: ((groupId?: string | null | undefined) => any) | undefined;
@@ -99,6 +98,7 @@ declare const __VLS_base: import("vue").DefineComponent<__VLS_PublicProps, {}, {
99
98
  onCancelEditing?: (() => any) | undefined;
100
99
  onDismissOutdatedBanner?: (() => any) | undefined;
101
100
  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,13 +1,12 @@
1
- import type { ChatModel, ChatReasoningEffort } from '../../types/schemas/chat/models.js';
1
+ import type { ChatReasoningEffort } from '../../types/schemas/chat/models.js';
2
2
  import type { Component, DeepReadonly, MaybeRefOrGetter, Ref } from 'vue';
3
3
  import type { ConversationCreatorFilter } from '../../types/schemas/chat/primitives.js';
4
4
  import type { WorkspaceSettingsResponse as WorkspaceSettings } from '../../types/schemas/chat/workspace-settings.js';
5
5
  import type { TelaAgentExecutionInput } from '../../types/schemas/integrations/tela-agent-api.js';
6
6
  import type { ChatLoadingMessageMode } from '../loading-messages.js';
7
- import type { ChatLabels } from '../types.js';
7
+ import type { ChatLabels, AvailableChatModels } from '../types.js';
8
8
  import type { ChatCitationsConfig } from '../../citations/types.js';
9
9
  import type { MessageFeedbackConfig, MessageFeedbackRating } from '../../messages/composables/chat-feedback.js';
10
- import type { AvailableChatModels } from '../../messages/model-availability.js';
11
10
  type ConfiguredTelaAgentInputs = DeepReadonly<TelaAgentExecutionInput[]> | null | undefined;
12
11
  type ConfiguredMessageFeedback = Readonly<Record<string, MessageFeedbackRating>> | null | undefined;
13
12
  export type EmbedConfig = {
@@ -16,7 +15,7 @@ export type EmbedConfig = {
16
15
  conversationScope: Ref<string | null>;
17
16
  defaultConversationCreatorFilter: Ref<ConversationCreatorFilter>;
18
17
  availableModels: Ref<AvailableChatModels | undefined>;
19
- defaultModel: Ref<ChatModel | undefined>;
18
+ defaultModel: Ref<string | undefined>;
20
19
  defaultReasoningEffort: Ref<ChatReasoningEffort | undefined>;
21
20
  conversationCreatorFilter: Ref<ConversationCreatorFilter | undefined>;
22
21
  telaAgentInputs: Ref<ConfiguredTelaAgentInputs>;
@@ -39,7 +38,7 @@ type EmbedConfigInput = {
39
38
  conversationScope?: MaybeRefOrGetter<string | null | undefined>;
40
39
  defaultConversationCreatorFilter?: MaybeRefOrGetter<ConversationCreatorFilter | null | undefined>;
41
40
  availableModels?: MaybeRefOrGetter<AvailableChatModels | undefined>;
42
- defaultModel?: MaybeRefOrGetter<ChatModel | undefined>;
41
+ defaultModel?: MaybeRefOrGetter<string | undefined>;
43
42
  defaultReasoningEffort?: MaybeRefOrGetter<ChatReasoningEffort | undefined>;
44
43
  conversationCreatorFilter?: MaybeRefOrGetter<ConversationCreatorFilter | undefined>;
45
44
  telaAgentInputs?: MaybeRefOrGetter<ConfiguredTelaAgentInputs>;