@meistrari/chat-nuxt 3.13.0-rc.1 → 3.13.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.
- package/README.md +1 -1
- package/dist/module.json +1 -1
- package/dist/runtime/embed/components/chat-embed-inner.vue +11 -2
- package/dist/runtime/embed/conversation-share-url.d.ts +1 -0
- package/dist/runtime/embed/conversation-share-url.js +5 -0
- package/dist/runtime/embed/feature-config.d.ts +5 -4
- package/dist/runtime/embed/feature-config.js +4 -4
- package/dist/runtime/messages/composables/chat.js +1 -1
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -59,7 +59,7 @@ Declared in `src/runtime/embed/types.ts`; prop, feature-flag, and event payload
|
|
|
59
59
|
| `telaAgentInputs` | `TelaAgentExecutionInput[] \| null` | `undefined` | Inputs sent with each Tela agent run; hides the variables panel when non-null |
|
|
60
60
|
| `workspaceSettings` | `WorkspaceSettings \| null` | `null` | Override settings from host app; not accepted in Tela agent mode |
|
|
61
61
|
| `user` | `ChatActor \| null` | `null` | Override current user display info; not accepted in Tela agent mode |
|
|
62
|
-
| `features` | `Partial<ChatFeatureConfig>` | `{}` | Toggle
|
|
62
|
+
| `features` | `Partial<ChatFeatureConfig>` | `{}` | Toggle `showUsageTab`, `showDebugOption`, `showCancelButton`, `showTtft`, and `chatOutboundQueue`; all released features default to `true` |
|
|
63
63
|
| `loadingMessages` | `readonly string[] \| null` | Default chat messages | Override pending-response messages |
|
|
64
64
|
| `loadingMessagesMode` | `'ordered' \| 'random' \| null` | `'ordered'` | Rotate custom messages in order or at random; only applies when `loadingMessages` has a non-empty message |
|
|
65
65
|
| `customComponents` | `Record<string, Component>` | `undefined` | Custom markdown renderers keyed by markdown node or tag name |
|
package/dist/module.json
CHANGED
|
@@ -9,6 +9,7 @@ import ChatMobileShell from "./mobile/chat-mobile-shell.vue";
|
|
|
9
9
|
import { normalizeConversationId } from "../../conversations/scope";
|
|
10
10
|
import { resolveChatFeatures } from "../feature-config";
|
|
11
11
|
import { resolveConversationCreator } from "../../conversations/creator";
|
|
12
|
+
import { buildConversationShareUrl } from "../conversation-share-url";
|
|
12
13
|
import {
|
|
13
14
|
resolveTelaAgentInputs,
|
|
14
15
|
useChat
|
|
@@ -59,6 +60,7 @@ function toggleSidebarCollapsed() {
|
|
|
59
60
|
isSidebarCollapsed.value = !isSidebarCollapsed.value;
|
|
60
61
|
}
|
|
61
62
|
const chatApi = useChatApi();
|
|
63
|
+
const route = useRoute();
|
|
62
64
|
const embedConfig = useEmbedConfig();
|
|
63
65
|
const chatAction = useChatAction();
|
|
64
66
|
const { user: authUser, activeOrganization, logout } = useChatAuth();
|
|
@@ -117,8 +119,9 @@ const {
|
|
|
117
119
|
closePreview
|
|
118
120
|
} = useFilePreviewPanel();
|
|
119
121
|
const { isOpen: isCitationPanelOpen } = useCitationPanel();
|
|
122
|
+
const sharedConversationId = typeof route.query.conversation === "string" ? route.query.conversation : null;
|
|
120
123
|
const activeConversationId = ref(
|
|
121
|
-
normalizeConversationId(props.conversationId) ?? normalizeConversationId(props.initialConversationId)
|
|
124
|
+
normalizeConversationId(props.conversationId) ?? normalizeConversationId(props.initialConversationId) ?? normalizeConversationId(sharedConversationId)
|
|
122
125
|
);
|
|
123
126
|
const loadingConversationId = ref(null);
|
|
124
127
|
const isReady = ref(false);
|
|
@@ -643,8 +646,14 @@ function cancelEditing() {
|
|
|
643
646
|
}
|
|
644
647
|
const copiedToClipboard = ref(false);
|
|
645
648
|
async function handleShare() {
|
|
649
|
+
if (!currentConversation.value)
|
|
650
|
+
return;
|
|
646
651
|
try {
|
|
647
|
-
|
|
652
|
+
const shareUrl = buildConversationShareUrl(
|
|
653
|
+
window.location.href,
|
|
654
|
+
currentConversation.value.id
|
|
655
|
+
);
|
|
656
|
+
await navigator.clipboard.writeText(shareUrl);
|
|
648
657
|
copiedToClipboard.value = true;
|
|
649
658
|
statusToast.update({ text: "Link copiado", icon: "i-ph-check" });
|
|
650
659
|
setTimeout(() => {
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare function buildConversationShareUrl(currentHref: string, conversationId: string): string;
|
|
@@ -1,13 +1,14 @@
|
|
|
1
|
-
/** Optional
|
|
1
|
+
/** Optional feature toggles the host passes per embed instance. */
|
|
2
2
|
export type ChatFeatureConfig = {
|
|
3
|
-
/** Usage tab in the chat topbar, with per-conversation token and cost stats. */
|
|
3
|
+
/** Usage tab in the chat topbar, with per-conversation token and cost stats. Defaults to true. */
|
|
4
4
|
showUsageTab?: boolean;
|
|
5
|
-
/** Debug entry in the topbar overflow menu. */
|
|
5
|
+
/** Debug entry in the topbar overflow menu. Defaults to true. */
|
|
6
6
|
showDebugOption?: boolean;
|
|
7
|
-
/** "Stop generation" button while a response streams. */
|
|
7
|
+
/** "Stop generation" button while a response streams. Defaults to true. */
|
|
8
8
|
showCancelButton?: boolean;
|
|
9
9
|
/** Time to first token shown in assistant message metadata. Defaults to true. */
|
|
10
10
|
showTtft?: boolean;
|
|
11
|
+
/** Reliable outbound delivery and sandbox readiness handling. Defaults to true. */
|
|
11
12
|
chatOutboundQueue?: boolean;
|
|
12
13
|
};
|
|
13
14
|
export type ResolvedChatFeatureConfig = {
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
export function resolveChatFeatures(features) {
|
|
2
2
|
return {
|
|
3
|
-
showUsageTab: features?.showUsageTab ??
|
|
4
|
-
showDebugOption: features?.showDebugOption ??
|
|
5
|
-
showCancelButton: features?.showCancelButton ??
|
|
3
|
+
showUsageTab: features?.showUsageTab ?? true,
|
|
4
|
+
showDebugOption: features?.showDebugOption ?? true,
|
|
5
|
+
showCancelButton: features?.showCancelButton ?? true,
|
|
6
6
|
showTtft: features?.showTtft ?? true,
|
|
7
|
-
chatOutboundQueue: features?.chatOutboundQueue ??
|
|
7
|
+
chatOutboundQueue: features?.chatOutboundQueue ?? true
|
|
8
8
|
};
|
|
9
9
|
}
|
|
@@ -86,7 +86,7 @@ export function useChat(options = {}) {
|
|
|
86
86
|
set: (value) => agentSessionRewakeableBuckets.value = { ...agentSessionRewakeableBuckets.value, [chatScope.value]: value }
|
|
87
87
|
});
|
|
88
88
|
const outbound = useOutboundQueue(chatScope);
|
|
89
|
-
const outboundQueueEnabled = computed(() => toValue(options.outboundQueueEnabled) ??
|
|
89
|
+
const outboundQueueEnabled = computed(() => toValue(options.outboundQueueEnabled) ?? true);
|
|
90
90
|
const loading = ref(false);
|
|
91
91
|
const sending = ref(false);
|
|
92
92
|
const gateHolding = ref(false);
|