@meistrari/chat-nuxt 4.15.0-rc.2 → 4.15.0-rc.4

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": "4.15.0-rc.2",
4
+ "version": "4.15.0-rc.4",
5
5
  "builder": {
6
6
  "@nuxt/module-builder": "1.0.2",
7
7
  "unbuild": "unknown"
@@ -189,10 +189,10 @@ useResizeObserver(composerRef, ([entry]) => {
189
189
  composerHeights = next;
190
190
  });
191
191
  const messageInputRef = ref(null);
192
- const PROMPT_INPUT_HINTS = [
193
- { icon: "i-ph-at-bold", label: "Para mencionar arquivos" },
194
- { char: "/", label: "Para acionar skills" }
195
- ];
192
+ const promptInputHints = computed(() => [
193
+ { icon: "i-ph-at-bold", label: embedConfig?.labels.value?.mentionFilesHint ?? "Para mencionar arquivos" },
194
+ { char: "/", label: embedConfig?.labels.value?.invokeSkillsHint ?? "Para acionar skills" }
195
+ ]);
196
196
  const resolvedSuggestions = computed(
197
197
  () => props.suggestions ?? []
198
198
  );
@@ -1116,6 +1116,7 @@ defineExpose({
1116
1116
  :generating-title="generatingTitle"
1117
1117
  :has-messages="hasMessages"
1118
1118
  :has-pending-message="composerLocked"
1119
+ :send-blocked="sendBlocked"
1119
1120
  :draft-storage-key="draftStorageKey"
1120
1121
  :hide-settings="hideSettings"
1121
1122
  :hide-sidebar="hideSidebar"
@@ -1215,7 +1216,7 @@ defineExpose({
1215
1216
  </TelaChatSuggestion>
1216
1217
  </TelaChatSuggestions>
1217
1218
 
1218
- <TelaChatPromptInputHints v-if="resolvedFeatures.showPromptInputHints" size="sm" :hints="PROMPT_INPUT_HINTS" />
1219
+ <TelaChatPromptInputHints v-if="resolvedFeatures.showPromptInputHints" size="sm" :hints="promptInputHints" />
1219
1220
  </template>
1220
1221
 
1221
1222
  <template #input>
@@ -1453,7 +1454,7 @@ defineExpose({
1453
1454
  <TelaChatPromptInputHints
1454
1455
  v-if="resolvedFeatures.showPromptInputHints"
1455
1456
  :size="compact ? 'sm' : 'md'"
1456
- :hints="PROMPT_INPUT_HINTS"
1457
+ :hints="promptInputHints"
1457
1458
  />
1458
1459
  </template>
1459
1460
 
@@ -1,4 +1,5 @@
1
1
  <script setup>
2
+ import { CHAT_COMPOSER_EXTENSION_KEY } from "../../types/composer";
2
3
  import { useChatAuth } from "#chat-auth";
3
4
  import { provideConversationCreatorFilterState } from "../../conversations/composables/conversation-creator-filter-state";
4
5
  import { provideChatAction } from "../../messages/composables/chat-action";
@@ -73,6 +74,8 @@ const { harness, loading: harnessLoading, confirmed: harnessConfirmed, error: ha
73
74
  onConversationCleared: () => emit("update:conversationId", null),
74
75
  conversationScope: computed(() => normalizeConversationScope(props.conversationScope))
75
76
  });
77
+ const composerExtension = inject(CHAT_COMPOSER_EXTENSION_KEY, null);
78
+ const sendBlocked = computed(() => !harnessConfirmed.value || !!unref(composerExtension?.sendBlocked));
76
79
  const harnessComponents = { claude: ChatEmbedInner, lightweight: LightweightAdapter };
77
80
  const harnessComponent = computed(() => harness.value ? harnessComponents[harness.value] : null);
78
81
  const normalizedConversationScope = computed(() => normalizeConversationScope(props.conversationScope));
@@ -179,7 +182,7 @@ defineExpose({
179
182
  :conversation-id="selectedConversationId"
180
183
  :conversation-events="conversationEvents"
181
184
  :composer-disabled="composerDisabled || !!harnessError"
182
- :send-blocked="!harnessConfirmed"
185
+ :send-blocked="sendBlocked"
183
186
  :initial-conversation-id="selectedConversationId"
184
187
  :hide-sidebar="hideSidebar"
185
188
  :sidebar="sidebar"
@@ -10,12 +10,12 @@ type __VLS_Props = {
10
10
  userImage?: string;
11
11
  };
12
12
  declare const __VLS_export: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {} & {
13
- select: (id: string) => any;
14
13
  close: () => any;
14
+ select: (id: string) => any;
15
15
  newConvo: (groupId?: string | null | undefined) => any;
16
16
  }, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{
17
- onSelect?: ((id: string) => any) | undefined;
18
17
  onClose?: (() => any) | undefined;
18
+ onSelect?: ((id: string) => any) | undefined;
19
19
  onNewConvo?: ((groupId?: string | null | undefined) => any) | undefined;
20
20
  }>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
21
21
  declare const _default: typeof __VLS_export;
@@ -10,12 +10,12 @@ type __VLS_Props = {
10
10
  userImage?: string;
11
11
  };
12
12
  declare const __VLS_export: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {} & {
13
- select: (id: string) => any;
14
13
  close: () => any;
14
+ select: (id: string) => any;
15
15
  newConvo: (groupId?: string | null | undefined) => any;
16
16
  }, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{
17
- onSelect?: ((id: string) => any) | undefined;
18
17
  onClose?: (() => any) | undefined;
18
+ onSelect?: ((id: string) => any) | undefined;
19
19
  onNewConvo?: ((groupId?: string | null | undefined) => any) | undefined;
20
20
  }>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
21
21
  declare const _default: typeof __VLS_export;
@@ -28,6 +28,7 @@ type __VLS_Props = {
28
28
  generatingTitle?: boolean;
29
29
  hasMessages: boolean;
30
30
  hasPendingMessage?: boolean;
31
+ sendBlocked?: boolean;
31
32
  hideSettings?: boolean;
32
33
  hideSidebar?: boolean;
33
34
  isEditing: boolean;
@@ -67,11 +68,11 @@ declare const __VLS_base: import("vue").DefineComponent<__VLS_PublicProps, {}, {
67
68
  "update:selectedReasoningEffort": (value: any) => any;
68
69
  } & {
69
70
  delete: () => any;
70
- cancel: () => any;
71
71
  rename: () => any;
72
72
  duplicate: () => any;
73
73
  export: () => any;
74
74
  copyLink: () => any;
75
+ cancel: () => any;
75
76
  debug: () => any;
76
77
  selectConversation: (id: string) => any;
77
78
  send: (content: string, files: FileUploadInput[], agentInputs?: TelaAgentExecutionInput[] | undefined) => any;
@@ -89,11 +90,11 @@ declare const __VLS_base: import("vue").DefineComponent<__VLS_PublicProps, {}, {
89
90
  "update:workspaceSheetOpen": (value: boolean) => any;
90
91
  }, string, import("vue").PublicProps, Readonly<__VLS_PublicProps> & Readonly<{
91
92
  onDelete?: (() => any) | undefined;
92
- onCancel?: (() => any) | undefined;
93
93
  onRename?: (() => any) | undefined;
94
94
  onDuplicate?: (() => any) | undefined;
95
95
  onExport?: (() => any) | undefined;
96
96
  onCopyLink?: (() => any) | undefined;
97
+ onCancel?: (() => any) | undefined;
97
98
  onDebug?: (() => any) | undefined;
98
99
  onSelectConversation?: ((id: string) => any) | undefined;
99
100
  onSend?: ((content: string, files: FileUploadInput[], agentInputs?: TelaAgentExecutionInput[] | undefined) => any) | undefined;
@@ -33,6 +33,7 @@ const props = defineProps({
33
33
  generatingTitle: { type: Boolean, required: false },
34
34
  hasMessages: { type: Boolean, required: true },
35
35
  hasPendingMessage: { type: Boolean, required: false },
36
+ sendBlocked: { type: Boolean, required: false },
36
37
  hideSettings: { type: Boolean, required: false },
37
38
  hideSidebar: { type: Boolean, required: false },
38
39
  isEditing: { type: Boolean, required: true },
@@ -238,6 +239,7 @@ function startNewConversationFromOutdatedSettings() {
238
239
  v-model:selected-model="selectedModel"
239
240
  v-model:selected-reasoning-effort="selectedReasoningEffort"
240
241
  :loading="hasPendingMessage"
242
+ :send-blocked="sendBlocked"
241
243
  :draft-storage-key="draftStorageKey"
242
244
  :creator-name="currentUser?.name ?? void 0"
243
245
  :creator-email="currentUser?.email ?? void 0"
@@ -28,6 +28,7 @@ type __VLS_Props = {
28
28
  generatingTitle?: boolean;
29
29
  hasMessages: boolean;
30
30
  hasPendingMessage?: boolean;
31
+ sendBlocked?: boolean;
31
32
  hideSettings?: boolean;
32
33
  hideSidebar?: boolean;
33
34
  isEditing: boolean;
@@ -67,11 +68,11 @@ declare const __VLS_base: import("vue").DefineComponent<__VLS_PublicProps, {}, {
67
68
  "update:selectedReasoningEffort": (value: any) => any;
68
69
  } & {
69
70
  delete: () => any;
70
- cancel: () => any;
71
71
  rename: () => any;
72
72
  duplicate: () => any;
73
73
  export: () => any;
74
74
  copyLink: () => any;
75
+ cancel: () => any;
75
76
  debug: () => any;
76
77
  selectConversation: (id: string) => any;
77
78
  send: (content: string, files: FileUploadInput[], agentInputs?: TelaAgentExecutionInput[] | undefined) => any;
@@ -89,11 +90,11 @@ declare const __VLS_base: import("vue").DefineComponent<__VLS_PublicProps, {}, {
89
90
  "update:workspaceSheetOpen": (value: boolean) => any;
90
91
  }, string, import("vue").PublicProps, Readonly<__VLS_PublicProps> & Readonly<{
91
92
  onDelete?: (() => any) | undefined;
92
- onCancel?: (() => any) | undefined;
93
93
  onRename?: (() => any) | undefined;
94
94
  onDuplicate?: (() => any) | undefined;
95
95
  onExport?: (() => any) | undefined;
96
96
  onCopyLink?: (() => any) | undefined;
97
+ onCancel?: (() => any) | undefined;
97
98
  onDebug?: (() => any) | undefined;
98
99
  onSelectConversation?: ((id: string) => any) | undefined;
99
100
  onSend?: ((content: string, files: FileUploadInput[], agentInputs?: TelaAgentExecutionInput[] | undefined) => any) | undefined;
@@ -23,6 +23,14 @@ export type ChatLabels = {
23
23
  emptyStateTitle: string;
24
24
  /** Empty-state subheading. Defaults to `Como posso te ajudar hoje?`. */
25
25
  emptyStateDescription: string;
26
+ /** Message input placeholder. Defaults to `Escreva sua mensagem...`. */
27
+ composerPlaceholder: string;
28
+ /** Empty-state hint next to `@`. Defaults to `Para mencionar arquivos`. */
29
+ mentionFilesHint: string;
30
+ /** Empty-state hint next to `/`. Defaults to `Para acionar skills`. */
31
+ invokeSkillsHint: string;
32
+ /** Model selector trigger placeholder and menu heading. Defaults to `Modelo`. */
33
+ modelSelectorLabel: string;
26
34
  };
27
35
  export type ChatSuggestion = {
28
36
  /** Short label rendered on the suggestion pill. */
@@ -41,7 +41,8 @@ const composerExtension = inject(CHAT_COMPOSER_EXTENSION_KEY, null);
41
41
  const selectedReasoningEffort = defineModel("selectedReasoningEffort", { type: null, ...{ default: null } });
42
42
  const { uploadFiles, uploading, uploadError } = useFileUpload();
43
43
  const isCancelEnabled = computed(() => props.showCancelButton === true);
44
- const executionControls = useEmbedConfig()?.executionControls;
44
+ const embedConfig = useEmbedConfig();
45
+ const executionControls = embedConfig?.executionControls;
45
46
  const content = ref("");
46
47
  const promptTextareaRef = ref(null);
47
48
  const editorRef = computed(() => promptTextareaRef.value?.el ?? null);
@@ -758,7 +759,7 @@ defineExpose({
758
759
  <TelaChatPromptInputTextarea
759
760
  ref="promptTextareaRef"
760
761
  data-testid="chat-message-input"
761
- placeholder="Escreva sua mensagem..."
762
+ :placeholder="embedConfig?.labels.value?.composerPlaceholder ?? 'Escreva sua mensagem...'"
762
763
  :empty="!content.trim()"
763
764
  :flush="hasAttachments"
764
765
  :disabled="isLocked"
@@ -26,6 +26,7 @@ const boundReasoning = computed({
26
26
  }
27
27
  });
28
28
  const embedConfig = useEmbedConfig();
29
+ const modelLabel = computed(() => embedConfig?.labels.value?.modelSelectorLabel ?? "Modelo");
29
30
  const isLightweight = useChatRequestContext()?.harness?.value === "lightweight";
30
31
  const lightweightCatalog = isLightweight ? useLightweightModelCatalog() : null;
31
32
  const catalog = isLightweight ? null : useChatModelCatalog();
@@ -75,8 +76,8 @@ watch(activeCatalog.scopeKey, () => {
75
76
  :options="options"
76
77
  :reasoning-options="reasoningOptions"
77
78
  :disabled="disabled || options.length === 0"
78
- placeholder="Modelo"
79
- label-model="Modelo"
79
+ :placeholder="modelLabel"
80
+ :label-model="modelLabel"
80
81
  label-reasoning="Raciocínio"
81
82
  label-reasoning-default="Padrão"
82
83
  label-use-default="Usar padrão do agente"
@@ -38,4 +38,9 @@ export interface ChatComposerExtension {
38
38
  prepareSend?: (content: string) => ChatPreparedSend | null | undefined;
39
39
  /** Host commands offered alongside skills when the user types "/". */
40
40
  commands?: readonly ChatComposerCommand[];
41
+ /**
42
+ * While true the composer cannot send: the send button is disabled and Enter does nothing.
43
+ * Typing stays enabled, so the draft is kept until the host lifts the block.
44
+ */
45
+ sendBlocked?: MaybeRef<boolean>;
41
46
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@meistrari/chat-nuxt",
3
- "version": "4.15.0-rc.2",
3
+ "version": "4.15.0-rc.4",
4
4
  "type": "module",
5
5
  "exports": {
6
6
  ".": {