@meistrari/chat-nuxt 4.15.0-rc.3 → 4.15.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/embed/components/chat-embed-inner.vue +1 -0
- package/dist/runtime/embed/components/chat-embed.vue +4 -1
- package/dist/runtime/embed/components/mobile/chat-mobile-shell.d.vue.ts +1 -0
- package/dist/runtime/embed/components/mobile/chat-mobile-shell.vue +2 -0
- package/dist/runtime/embed/components/mobile/chat-mobile-shell.vue.d.ts +1 -0
- package/dist/runtime/types/composer.d.ts +5 -0
- package/dist/runtime/types/schemas/chat/v3.d.ts +20 -0
- package/dist/runtime/types/schemas/chat/v3.js +16 -0
- package/package.json +1 -1
package/dist/module.json
CHANGED
|
@@ -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"
|
|
@@ -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="
|
|
185
|
+
:send-blocked="sendBlocked"
|
|
183
186
|
:initial-conversation-id="selectedConversationId"
|
|
184
187
|
:hide-sidebar="hideSidebar"
|
|
185
188
|
:sidebar="sidebar"
|
|
@@ -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"
|
|
@@ -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
|
}
|
|
@@ -275,8 +275,28 @@ export declare const chatV3CreateThreadSchema: z.ZodObject<{
|
|
|
275
275
|
web: "web";
|
|
276
276
|
slack: "slack";
|
|
277
277
|
}>>;
|
|
278
|
+
preparedSession: z.ZodOptional<z.ZodString>;
|
|
278
279
|
}, z.core.$strict>;
|
|
279
280
|
export type ChatV3CreateThread = z.infer<typeof chatV3CreateThreadSchema>;
|
|
281
|
+
/**
|
|
282
|
+
* Opens an agent-api session ahead of the first message, so its sandbox starts while the user
|
|
283
|
+
* writes. The answer is a signed ticket a later creation with the same agent, branch and profile
|
|
284
|
+
* passes as `preparedSession`; chat-api keeps no record of it.
|
|
285
|
+
*/
|
|
286
|
+
export declare const chatV3PrepareThreadSchema: z.ZodObject<{
|
|
287
|
+
agentId: z.ZodOptional<z.ZodPipe<z.ZodString, z.ZodTransform<string, string>>>;
|
|
288
|
+
agentBranch: z.ZodOptional<z.ZodString>;
|
|
289
|
+
uiProfile: z.ZodOptional<z.ZodEnum<{
|
|
290
|
+
web: "web";
|
|
291
|
+
slack: "slack";
|
|
292
|
+
}>>;
|
|
293
|
+
}, z.core.$strict>;
|
|
294
|
+
export type ChatV3PrepareThread = z.infer<typeof chatV3PrepareThreadSchema>;
|
|
295
|
+
export declare const chatV3PreparedThreadSchema: z.ZodObject<{
|
|
296
|
+
preparedSession: z.ZodString;
|
|
297
|
+
expiresAt: z.ZodString;
|
|
298
|
+
}, z.core.$strip>;
|
|
299
|
+
export type ChatV3PreparedThread = z.infer<typeof chatV3PreparedThreadSchema>;
|
|
280
300
|
/**
|
|
281
301
|
* Renames the thread, moves it into a folder (`folderId`) or out of one (`folderId: null`), changes
|
|
282
302
|
* its model and effort (both, or both null to go back to the agent's), or any of them; the last
|
|
@@ -166,7 +166,23 @@ export const chatV3CreateThreadSchema = z.object({
|
|
|
166
166
|
model: v5ModelIdSchema.optional(),
|
|
167
167
|
reasoningEffort: chatV3ReasoningEffortSchema.optional(),
|
|
168
168
|
uiProfile: uiProfileSchema.optional(),
|
|
169
|
+
/** The ticket of a session prepared for this agent and caller; one that no longer fits is ignored and a session is opened as usual. */
|
|
170
|
+
preparedSession: z.string().min(1).max(4096).optional(),
|
|
169
171
|
}).strict().refine(settingsTogether, { message: SETTINGS_TOGETHER, path: ['reasoningEffort'] });
|
|
172
|
+
/**
|
|
173
|
+
* Opens an agent-api session ahead of the first message, so its sandbox starts while the user
|
|
174
|
+
* writes. The answer is a signed ticket a later creation with the same agent, branch and profile
|
|
175
|
+
* passes as `preparedSession`; chat-api keeps no record of it.
|
|
176
|
+
*/
|
|
177
|
+
export const chatV3PrepareThreadSchema = z.object({
|
|
178
|
+
agentId: agentIdSchema.optional(),
|
|
179
|
+
agentBranch: v5BranchNameSchema.optional(),
|
|
180
|
+
uiProfile: uiProfileSchema.optional(),
|
|
181
|
+
}).strict();
|
|
182
|
+
export const chatV3PreparedThreadSchema = z.object({
|
|
183
|
+
preparedSession: z.string(),
|
|
184
|
+
expiresAt: z.string().datetime(),
|
|
185
|
+
});
|
|
170
186
|
/**
|
|
171
187
|
* Renames the thread, moves it into a folder (`folderId`) or out of one (`folderId: null`), changes
|
|
172
188
|
* its model and effort (both, or both null to go back to the agent's), or any of them; the last
|