@meistrari/chat-nuxt 3.15.0 → 3.15.1-rc.1

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 CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@meistrari/chat-nuxt",
3
3
  "configKey": "chatNuxt",
4
- "version": "3.15.0-rc.2",
4
+ "version": "3.15.1-rc.1",
5
5
  "builder": {
6
6
  "@nuxt/module-builder": "1.0.2",
7
7
  "unbuild": "unknown"
@@ -39,7 +39,7 @@ import { useWorkspaceSwitchModal } from "../../workspace/composables/workspace-s
39
39
  const props = defineProps({
40
40
  conversationId: { type: [String, null], required: false },
41
41
  initialConversationId: { type: [String, null], required: false, default: null },
42
- hideSidebar: { type: Boolean, required: false, default: true },
42
+ hideSidebar: { type: Boolean, required: false, default: false },
43
43
  sidebar: { type: Object, required: false },
44
44
  hideSettings: { type: Boolean, required: false, default: false },
45
45
  compact: { type: Boolean, required: false, default: false },
@@ -574,9 +574,8 @@ async function handleRetry(messageId) {
574
574
  if (wake.status !== "ready")
575
575
  throw new Error("N\xE3o foi poss\xEDvel acordar o agente. Tente novamente.");
576
576
  } else {
577
- await agentWake.waitUntilSettled();
577
+ agentWake.consume();
578
578
  }
579
- return claimableWakeSessionId();
580
579
  });
581
580
  }
582
581
  async function handleNewConversation(groupId) {
@@ -48,7 +48,7 @@ export function provideEmbedConfig(input, options = {}) {
48
48
  conversationCreatorFilter: computed(() => toValue(input.conversationCreatorFilter)),
49
49
  telaAgentInputs: computed(() => toValue(input.telaAgentInputs)),
50
50
  workspaceSettings: computed(() => toValue(input.workspaceSettings)),
51
- hideSidebar: computed(() => toValue(input.hideSidebar) ?? true),
51
+ hideSidebar: computed(() => toValue(input.hideSidebar) ?? false),
52
52
  hideConversationCreatorFilter: computed(() => toValue(input.hideConversationCreatorFilter) ?? false),
53
53
  hideSettings: computed(() => toValue(input.hideSettings) ?? false),
54
54
  loadingMessages: computed(() => toValue(input.loadingMessages)),
@@ -101,7 +101,7 @@ export function useEmbedConfig() {
101
101
  conversationCreatorFilter: computed(() => globalConfig.conversationCreatorFilter.value),
102
102
  telaAgentInputs: computed(() => globalConfig.telaAgentInputs.value),
103
103
  workspaceSettings: computed(() => globalConfig.workspaceSettings.value),
104
- hideSidebar: computed(() => globalConfig.hideSidebar.value ?? true),
104
+ hideSidebar: computed(() => globalConfig.hideSidebar.value ?? false),
105
105
  hideConversationCreatorFilter: computed(() => globalConfig.hideConversationCreatorFilter.value ?? false),
106
106
  hideSettings: computed(() => globalConfig.hideSettings.value ?? false),
107
107
  loadingMessages: computed(() => globalConfig.loadingMessages.value),
@@ -67,7 +67,7 @@ export type ChatEmbedSharedProps = {
67
67
  conversationCreatorFilter?: ConversationCreatorFilter;
68
68
  /** Hide the conversation creator filter while preserving its active value. */
69
69
  hideConversationCreatorFilter?: boolean;
70
- /** Hide the conversation list and render only the active chat surface. */
70
+ /** Hide the conversation list and render only the active chat surface. Defaults to `false`; widget variants default to `true`. */
71
71
  hideSidebar?: boolean;
72
72
  /** Layout options for the conversation sidebar (edge and `sidebar-bottom` split). */
73
73
  sidebar?: ChatSidebarConfig;
@@ -40,7 +40,7 @@ export declare function useChat(options?: {
40
40
  }>, queuedSend?: QueuedSend) => Promise<Message | null>;
41
41
  flushOutboundQueue: (wakeSessionId?: string) => Promise<Message | null>;
42
42
  failOutboundQueue: (message: string) => boolean;
43
- retryMessage: (messageId: string, prepare?: () => Promise<string | undefined>) => Promise<boolean>;
43
+ retryMessage: (messageId: string, prepare?: () => Promise<void>) => Promise<boolean>;
44
44
  cancelConversation: () => Promise<boolean>;
45
45
  startPolling: () => void;
46
46
  stopPolling: () => void;
@@ -733,7 +733,8 @@ export function useChat(options = {}) {
733
733
  error.value = null;
734
734
  let retry = null;
735
735
  try {
736
- const wakeSessionId = prepare ? await prepare() : void 0;
736
+ if (prepare)
737
+ await prepare();
737
738
  if (currentConversation.value?.id !== conversationId)
738
739
  return false;
739
740
  retry = beginAssistantMessageRetry(messages.value, messageId);
@@ -744,10 +745,7 @@ export function useChat(options = {}) {
744
745
  directStream.beginMessage();
745
746
  await $fetch(
746
747
  chatApi.path(`/conversations/${conversationId}/messages/${messageId}/retry`),
747
- chatApi.withChatHeaders({
748
- method: "POST",
749
- body: wakeSessionId ? { wakeSessionId } : {}
750
- })
748
+ chatApi.withChatHeaders({ method: "POST" })
751
749
  );
752
750
  startPolling();
753
751
  return true;
@@ -214,10 +214,6 @@ export declare const messagePollResponseSchema: z.ZodObject<{
214
214
  }, z.core.$strip>>;
215
215
  }, z.core.$strip>;
216
216
  export type MessagePollResponse = z.infer<typeof messagePollResponseSchema>;
217
- export declare const retryMessageBodySchema: z.ZodObject<{
218
- wakeSessionId: z.ZodOptional<z.ZodString>;
219
- }, z.core.$strict>;
220
- export type RetryMessageBody = z.infer<typeof retryMessageBodySchema>;
221
217
  export declare const cancelConversationResponseSchema: z.ZodObject<{
222
218
  success: z.ZodLiteral<true>;
223
219
  cancelled: z.ZodBoolean;
@@ -65,9 +65,6 @@ export const messagePollResponseSchema = z.object({
65
65
  rewakeable: z.boolean().optional(),
66
66
  }).optional(),
67
67
  });
68
- export const retryMessageBodySchema = z.strictObject({
69
- wakeSessionId: z.string().uuid().optional(),
70
- });
71
68
  export const cancelConversationResponseSchema = z.object({
72
69
  success: z.literal(true),
73
70
  cancelled: z.boolean(),
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@meistrari/chat-nuxt",
3
- "version": "3.15.0",
3
+ "version": "3.15.1-rc.1",
4
4
  "type": "module",
5
5
  "exports": {
6
6
  ".": {