@copilotkit/vue 1.63.0 → 1.63.2-canary.1784918757

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/AGENTS.md CHANGED
@@ -31,6 +31,12 @@ When porting a React feature:
31
31
  12. Keep slots as the primary Vue customization model. `renderCustomMessages` is the approved secondary provider-level parity surface for ordered and agent-scoped custom message registration; do not invent alternative provider-slot registration APIs.
32
32
  13. Do not port React `StrictMode` identity assertions literally into Vue by adding runtime remount caches/workarounds; validate Vue lifecycle invariants under rerender/remount instead.
33
33
 
34
+ ## Vue reactivity boundary
35
+
36
+ - Externally supplied payloads that may cross serialization or `structuredClone` boundaries must remain raw; Vue reactive proxies are not clone-safe.
37
+ - Treat messages, attachment sources, agent state, forwarded props, runtime properties, interrupt payloads, user callback results, and AG-UI event payloads as agent-bound when they may later be passed to core or emitted through AG-UI.
38
+ - When a reactive container must not proxy nested values, prefer `shallowRef()`. Plain `ref()` is fine for UI-only primitives and local UI state. If unsure, add a Vue-specific test that checks `isProxy(value) === false` and `structuredClone(value)` does not throw before the value crosses into core.
39
+
34
40
  ## Validation gates
35
41
 
36
42
  Run after meaningful changes:
package/PARITY.md CHANGED
@@ -393,7 +393,7 @@ Current snapshot: mapped React->Vue counterpart rows are either `matched` or `in
393
393
  | `use-agent-error-state.test.tsx` | `use-agent-error-state.test.ts` | matched | Dedicated strict counterpart now matches React error-state behavior by returning a provisional runtime agent instead of throwing when runtime sync fails. |
394
394
  | `use-agent-stability.test.tsx` | `use-agent-stability.test.ts` | matched | Dedicated strict counterpart now matches React provisional-agent caching semantics across Disconnected->Connecting->Connected transitions. |
395
395
  | `use-agent-thread-isolation.test.tsx` | `use-agent-thread-isolation.test.ts` | matched | Dedicated strict counterpart now mirrors React thread-clone isolation semantics, cache invalidation on registry replacement, and provisional->real clone transitions. |
396
- | `use-attachments.test.tsx` | `use-attachments.test.ts` | matched | Dedicated strict counterpart validates stable attachment action identities across rerenders/config identity changes, latest-config reads without stale closures, and empty-queue `consumeAttachments()` no-op semantics. |
396
+ | `use-attachments.test.tsx` | `use-attachments.test.ts` | matched | Dedicated strict counterpart validates stable attachment action identities across rerenders/config identity changes, latest-config reads without stale closures, and empty-queue `consumeAttachments()` no-op semantics. Vue-specific trailing coverage verifies uploaded attachment sources remain non-reactive and `structuredClone`-safe before and after `consumeAttachments()`. |
397
397
  | `use-configure-suggestions.e2e.test.tsx` | `use-configure-suggestions.e2e.test.ts` (+ `use-configure-suggestions.test.ts`) | matched | Dedicated strict e2e counterpart exists and now passes the full React-mirrored suite, including deferred reload behavior during in-progress runs. |
398
398
  | `use-frontend-tool-available.test.tsx` | `use-frontend-tool-available.test.ts` | matched | Dedicated strict counterpart exists with React-matching suite and case wording. |
399
399
  | `use-frontend-tool.e2e.test.tsx` | `use-frontend-tool.e2e.test.ts` (+ `use-frontend-tool.test.ts`) | matched | Dedicated strict e2e counterpart exists and now passes the full React-mirrored suite, including unmount, override, and error-propagation coverage. |
package/dist/index.cjs CHANGED
@@ -1,2 +1,2 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const y=require("@copilotkit/core"),A=require("@ag-ui/client"),e=require("./use-render-activity-message-CIvEoQzA.cjs"),i=require("vue"),C=require("@copilotkit/shared");function m(o){return typeof o!="function"?o:(n=>{const a=typeof n.result=="string"?{...n,result:C.parseJson(n.result,n.result)}:n;return o(a)})}function _(o,n){const a="parameters"in o?C.getZodParameters(o.parameters):void 0;if(o.name==="*"){e.useRenderTool({name:"*",render:m(o.render),..."agentId"in o?{agentId:o.agentId}:{}},n);return}const t=o;if("renderAndWaitForResponse"in t||"renderAndWait"in t){const l=t.render??t.renderAndWaitForResponse??t.renderAndWait;if(!l){console.warn(`[CopilotKit] useCopilotAction: HITL action '${t.name}' has no render function. Skipping.`);return}e.useHumanInTheLoop({name:t.name,description:t.description,parameters:a,render:m(l),agentId:t.agentId},n);return}if(t.available==="frontend"||t.available==="disabled"){t.render&&a?e.useRenderTool({name:t.name,parameters:a,render:m(t.render),agentId:t.agentId},n):console.warn(`[CopilotKit] useCopilotAction: action '${t.name}' with available="${t.available}" requires both 'render' and 'parameters'. Skipping registration.`);return}const c=t.handler?l=>Promise.resolve(t.handler(l)):void 0;let s;t.available==="remote"?s=!1:t.available!==void 0&&(s=!0),e.useFrontendTool({name:t.name,description:t.description,parameters:a,handler:c,followUp:t.followUp,render:m(t.render),available:s,agentId:t.agentId},n)}function b(o,n){const{name:a,description:t,parameters:c,handler:s,followUp:l,available:f,render:u,agentId:d}=o,p=C.getZodParameters(c),g=s?r=>Promise.resolve(s(r)):void 0,v=typeof u=="function"?r=>{const h=typeof r.result=="string"?{...r,result:C.parseJson(r.result,r.result)}:r;return u(h)}:u;e.useFrontendTool({name:a,description:t,parameters:p,handler:g,followUp:l,render:v,available:f===void 0?void 0:f!=="disabled",agentId:d},n)}function I(o,n){const{copilotkit:a}=e.useCopilotKit(),t=i.ref(void 0),c=n??[];return i.watch([()=>o.description,()=>o.value,()=>o.convert,()=>o.available,...c],(s,l,f)=>{const u=a.value;if(!u)return;const{description:d,value:p,convert:g,available:v}=o;let r;try{r=g?g(d,p):JSON.stringify(p)}catch(h){console.warn(`[CopilotKit] useCopilotReadable: failed to serialize value for "${d}":`,h),r=String(p)}v!=="disabled"&&(t.value=u.addContext({description:d,value:r}),f(()=>{t.value&&u.removeContext(t.value)}))},{immediate:!0}),t}const T=i.defineComponent({__name:"CopilotKit",props:{publicApiKey:{},publicLicenseKey:{},runtimeUrl:{},headers:{type:[Object,Function]},credentials:{},defaultThrottleMs:{},licenseToken:{},properties:{},useSingleEndpoint:{type:Boolean},agents__unsafe_dev_only:{},selfManagedAgents:{},renderToolCalls:{},renderActivityMessages:{},renderCustomMessages:{},frontendTools:{},humanInTheLoop:{},openGenerativeUI:{},showDevConsole:{type:[Boolean,String]},onError:{type:Function},a2ui:{},inspectorDefaultAnchor:{},debug:{type:[Boolean,Object]}},setup(o){const n=o;return(a,t)=>(i.openBlock(),i.createBlock(e._sfc_main$15,i.normalizeProps(i.guardReactiveProps(n)),{default:i.withCtx(()=>[i.renderSlot(a.$slots,"default")]),_:3},16))}});exports.A2UIActivityContentSchema=e.A2UIActivityContentSchema;exports.A2UISurfaceActivityRenderer=e._sfc_main;exports.A2UISurfaceActivityType=e.A2UISurfaceActivityType;exports.CopilotChat=e.CopilotChat;exports.CopilotChatAssistantMessage=e._sfc_main$1;exports.CopilotChatAttachmentQueue=e._sfc_main$2;exports.CopilotChatAttachmentRenderer=e._sfc_main$3;exports.CopilotChatAudioRecorder=e._sfc_main$4;exports.CopilotChatConfigurationProvider=e._sfc_main$5;exports.CopilotChatDefaultLabels=e.CopilotChatDefaultLabels;exports.CopilotChatInput=e._sfc_main$6;exports.CopilotChatMessageView=e._sfc_main$7;exports.CopilotChatReasoningMessage=e._sfc_main$8;exports.CopilotChatSuggestionPill=e._sfc_main$9;exports.CopilotChatSuggestionView=e._sfc_main$10;exports.CopilotChatToggleButton=e.CopilotChatToggleButton;exports.CopilotChatToggleButtonCloseIcon=e.CopilotChatToggleButtonCloseIcon;exports.CopilotChatToggleButtonOpenIcon=e.CopilotChatToggleButtonOpenIcon;exports.CopilotChatToolCallsView=e._sfc_main$11;exports.CopilotChatUserMessage=e._sfc_main$12;exports.CopilotChatView=e._sfc_main$13;exports.CopilotKitCoreVue=e.CopilotKitCoreVue;exports.CopilotKitInspector=e._sfc_main$14;exports.CopilotKitProvider=e._sfc_main$15;exports.CopilotModalHeader=e.CopilotModalHeader;exports.CopilotPopup=e._sfc_main$16;exports.CopilotPopupView=e.CopilotPopupView;exports.CopilotSidebar=e._sfc_main$17;exports.CopilotSidebarView=e.CopilotSidebarView;exports.CopilotThreadsDrawer=e._sfc_main$18;exports.GenerateSandboxedUiArgsSchema=e.GenerateSandboxedUiArgsSchema;exports.LicenseContextKey=e.LicenseContextKey;exports.MCPAppsActivityContentSchema=e.MCPAppsActivityContentSchema;exports.MCPAppsActivityRenderer=e.MCPAppsActivityRenderer;exports.MCPAppsActivityType=e.MCPAppsActivityType;exports.OpenGenerativeUIActivityRenderer=e.OpenGenerativeUIActivityRenderer;exports.OpenGenerativeUIActivityType=e.OpenGenerativeUIActivityType;exports.OpenGenerativeUIContentSchema=e.OpenGenerativeUIContentSchema;exports.OpenGenerativeUIRenderer=e.OpenGenerativeUIRenderer;exports.OpenGenerativeUIToolRenderer=e.OpenGenerativeUIToolRenderer;exports.UseAgentUpdate=e.UseAgentUpdate;exports.createA2UIMessageRenderer=e.createA2UIMessageRenderer;exports.createDefaultLicenseRef=e.createDefaultLicenseRef;exports.defineToolCallRenderer=e.defineToolCallRenderer;exports.extractCompleteStyles=e.extractCompleteStyles;exports.getOperationSurfaceId=e.getOperationSurfaceId;exports.processPartialHtml=e.processPartialHtml;exports.useAgent=e.useAgent;exports.useAgentContext=e.useAgentContext;exports.useAttachments=e.useAttachments;exports.useCapabilities=e.useCapabilities;exports.useComponent=e.useComponent;exports.useConfigureSuggestions=e.useConfigureSuggestions;exports.useCopilotChatConfiguration=e.useCopilotChatConfiguration;exports.useCopilotKit=e.useCopilotKit;exports.useDefaultRenderTool=e.useDefaultRenderTool;exports.useHumanInTheLoop=e.useHumanInTheLoop;exports.useInterrupt=e.useInterrupt;exports.useKatexStyles=e.useKatexStyles;exports.useKeyboardHeight=e.useKeyboardHeight;exports.useLicenseContext=e.useLicenseContext;exports.useRenderActivityMessage=e.useRenderActivityMessage;exports.useRenderCustomMessages=e.useRenderCustomMessages;exports.useRenderTool=e.useRenderTool;exports.useSandboxFunctions=e.useSandboxFunctions;exports.useSuggestions=e.useSuggestions;exports.useThreads=e.useThreads;exports.vueBasicCatalog=e.vueBasicCatalog;Object.defineProperty(exports,"createLicenseContextValue",{enumerable:!0,get:()=>C.createLicenseContextValue});exports.CopilotKit=T;exports.useCopilotAction=_;exports.useCopilotReadable=I;exports.useFrontendTool=b;Object.keys(y).forEach(o=>{o!=="default"&&!Object.prototype.hasOwnProperty.call(exports,o)&&Object.defineProperty(exports,o,{enumerable:!0,get:()=>y[o]})});Object.keys(A).forEach(o=>{o!=="default"&&!Object.prototype.hasOwnProperty.call(exports,o)&&Object.defineProperty(exports,o,{enumerable:!0,get:()=>A[o]})});
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const y=require("@copilotkit/core"),A=require("@ag-ui/client"),e=require("./use-render-activity-message-DzgJkxe2.cjs"),i=require("vue"),C=require("@copilotkit/shared");function m(o){return typeof o!="function"?o:(n=>{const a=typeof n.result=="string"?{...n,result:C.parseJson(n.result,n.result)}:n;return o(a)})}function _(o,n){const a="parameters"in o?C.getZodParameters(o.parameters):void 0;if(o.name==="*"){e.useRenderTool({name:"*",render:m(o.render),..."agentId"in o?{agentId:o.agentId}:{}},n);return}const t=o;if("renderAndWaitForResponse"in t||"renderAndWait"in t){const l=t.render??t.renderAndWaitForResponse??t.renderAndWait;if(!l){console.warn(`[CopilotKit] useCopilotAction: HITL action '${t.name}' has no render function. Skipping.`);return}e.useHumanInTheLoop({name:t.name,description:t.description,parameters:a,render:m(l),agentId:t.agentId},n);return}if(t.available==="frontend"||t.available==="disabled"){t.render&&a?e.useRenderTool({name:t.name,parameters:a,render:m(t.render),agentId:t.agentId},n):console.warn(`[CopilotKit] useCopilotAction: action '${t.name}' with available="${t.available}" requires both 'render' and 'parameters'. Skipping registration.`);return}const c=t.handler?l=>Promise.resolve(t.handler(l)):void 0;let s;t.available==="remote"?s=!1:t.available!==void 0&&(s=!0),e.useFrontendTool({name:t.name,description:t.description,parameters:a,handler:c,followUp:t.followUp,render:m(t.render),available:s,agentId:t.agentId},n)}function b(o,n){const{name:a,description:t,parameters:c,handler:s,followUp:l,available:f,render:u,agentId:d}=o,p=C.getZodParameters(c),g=s?r=>Promise.resolve(s(r)):void 0,v=typeof u=="function"?r=>{const h=typeof r.result=="string"?{...r,result:C.parseJson(r.result,r.result)}:r;return u(h)}:u;e.useFrontendTool({name:a,description:t,parameters:p,handler:g,followUp:l,render:v,available:f===void 0?void 0:f!=="disabled",agentId:d},n)}function I(o,n){const{copilotkit:a}=e.useCopilotKit(),t=i.ref(void 0),c=n??[];return i.watch([()=>o.description,()=>o.value,()=>o.convert,()=>o.available,...c],(s,l,f)=>{const u=a.value;if(!u)return;const{description:d,value:p,convert:g,available:v}=o;let r;try{r=g?g(d,p):JSON.stringify(p)}catch(h){console.warn(`[CopilotKit] useCopilotReadable: failed to serialize value for "${d}":`,h),r=String(p)}v!=="disabled"&&(t.value=u.addContext({description:d,value:r}),f(()=>{t.value&&u.removeContext(t.value)}))},{immediate:!0}),t}const T=i.defineComponent({__name:"CopilotKit",props:{publicApiKey:{},publicLicenseKey:{},runtimeUrl:{},headers:{type:[Object,Function]},credentials:{},defaultThrottleMs:{},licenseToken:{},properties:{},useSingleEndpoint:{type:Boolean},agents__unsafe_dev_only:{},selfManagedAgents:{},renderToolCalls:{},renderActivityMessages:{},renderCustomMessages:{},frontendTools:{},humanInTheLoop:{},openGenerativeUI:{},showDevConsole:{type:[Boolean,String]},onError:{type:Function},a2ui:{},inspectorDefaultAnchor:{},debug:{type:[Boolean,Object]}},setup(o){const n=o;return(a,t)=>(i.openBlock(),i.createBlock(e._sfc_main$15,i.normalizeProps(i.guardReactiveProps(n)),{default:i.withCtx(()=>[i.renderSlot(a.$slots,"default")]),_:3},16))}});exports.A2UIActivityContentSchema=e.A2UIActivityContentSchema;exports.A2UISurfaceActivityRenderer=e._sfc_main;exports.A2UISurfaceActivityType=e.A2UISurfaceActivityType;exports.CopilotChat=e.CopilotChat;exports.CopilotChatAssistantMessage=e._sfc_main$1;exports.CopilotChatAttachmentQueue=e._sfc_main$2;exports.CopilotChatAttachmentRenderer=e._sfc_main$3;exports.CopilotChatAudioRecorder=e._sfc_main$4;exports.CopilotChatConfigurationProvider=e._sfc_main$5;exports.CopilotChatDefaultLabels=e.CopilotChatDefaultLabels;exports.CopilotChatInput=e._sfc_main$6;exports.CopilotChatMessageView=e._sfc_main$7;exports.CopilotChatReasoningMessage=e._sfc_main$8;exports.CopilotChatSuggestionPill=e._sfc_main$9;exports.CopilotChatSuggestionView=e._sfc_main$10;exports.CopilotChatToggleButton=e.CopilotChatToggleButton;exports.CopilotChatToggleButtonCloseIcon=e.CopilotChatToggleButtonCloseIcon;exports.CopilotChatToggleButtonOpenIcon=e.CopilotChatToggleButtonOpenIcon;exports.CopilotChatToolCallsView=e._sfc_main$11;exports.CopilotChatUserMessage=e._sfc_main$12;exports.CopilotChatView=e._sfc_main$13;exports.CopilotKitCoreVue=e.CopilotKitCoreVue;exports.CopilotKitInspector=e._sfc_main$14;exports.CopilotKitProvider=e._sfc_main$15;exports.CopilotModalHeader=e.CopilotModalHeader;exports.CopilotPopup=e._sfc_main$16;exports.CopilotPopupView=e.CopilotPopupView;exports.CopilotSidebar=e._sfc_main$17;exports.CopilotSidebarView=e.CopilotSidebarView;exports.CopilotThreadsDrawer=e._sfc_main$18;exports.GenerateSandboxedUiArgsSchema=e.GenerateSandboxedUiArgsSchema;exports.LicenseContextKey=e.LicenseContextKey;exports.MCPAppsActivityContentSchema=e.MCPAppsActivityContentSchema;exports.MCPAppsActivityRenderer=e.MCPAppsActivityRenderer;exports.MCPAppsActivityType=e.MCPAppsActivityType;exports.OpenGenerativeUIActivityRenderer=e.OpenGenerativeUIActivityRenderer;exports.OpenGenerativeUIActivityType=e.OpenGenerativeUIActivityType;exports.OpenGenerativeUIContentSchema=e.OpenGenerativeUIContentSchema;exports.OpenGenerativeUIRenderer=e.OpenGenerativeUIRenderer;exports.OpenGenerativeUIToolRenderer=e.OpenGenerativeUIToolRenderer;exports.UseAgentUpdate=e.UseAgentUpdate;exports.createA2UIMessageRenderer=e.createA2UIMessageRenderer;exports.createDefaultLicenseRef=e.createDefaultLicenseRef;exports.defineToolCallRenderer=e.defineToolCallRenderer;exports.extractCompleteStyles=e.extractCompleteStyles;exports.getOperationSurfaceId=e.getOperationSurfaceId;exports.processPartialHtml=e.processPartialHtml;exports.useAgent=e.useAgent;exports.useAgentContext=e.useAgentContext;exports.useAttachments=e.useAttachments;exports.useCapabilities=e.useCapabilities;exports.useComponent=e.useComponent;exports.useConfigureSuggestions=e.useConfigureSuggestions;exports.useCopilotChatConfiguration=e.useCopilotChatConfiguration;exports.useCopilotKit=e.useCopilotKit;exports.useDefaultRenderTool=e.useDefaultRenderTool;exports.useHumanInTheLoop=e.useHumanInTheLoop;exports.useInterrupt=e.useInterrupt;exports.useKatexStyles=e.useKatexStyles;exports.useKeyboardHeight=e.useKeyboardHeight;exports.useLicenseContext=e.useLicenseContext;exports.useRenderActivityMessage=e.useRenderActivityMessage;exports.useRenderCustomMessages=e.useRenderCustomMessages;exports.useRenderTool=e.useRenderTool;exports.useSandboxFunctions=e.useSandboxFunctions;exports.useSuggestions=e.useSuggestions;exports.useThreads=e.useThreads;exports.vueBasicCatalog=e.vueBasicCatalog;Object.defineProperty(exports,"createLicenseContextValue",{enumerable:!0,get:()=>C.createLicenseContextValue});exports.CopilotKit=T;exports.useCopilotAction=_;exports.useCopilotReadable=I;exports.useFrontendTool=b;Object.keys(y).forEach(o=>{o!=="default"&&!Object.prototype.hasOwnProperty.call(exports,o)&&Object.defineProperty(exports,o,{enumerable:!0,get:()=>y[o]})});Object.keys(A).forEach(o=>{o!=="default"&&!Object.prototype.hasOwnProperty.call(exports,o)&&Object.defineProperty(exports,o,{enumerable:!0,get:()=>A[o]})});
2
2
  //# sourceMappingURL=index.cjs.map
package/dist/index.mjs CHANGED
@@ -1,7 +1,7 @@
1
1
  export * from "@copilotkit/core";
2
2
  export * from "@ag-ui/client";
3
- import { aa as g, a3 as y, a2 as v, a0 as b, u as I } from "./use-render-activity-message-CbKeqosY.js";
4
- import { A as k, _ as W, a as J, C as j, b as E, c as q, d as N, e as Q, f as Z, g as X, h as Y, i as ee, j as ae, k as te, l as oe, m as ne, n as re, o as se, p as ie, q as le, r as de, s as ue, t as pe, v as ce, w as Ce, x as me, y as fe, z as ge, B as ve, G as he, L as Ae, M as ye, D as be, E as Ie, O as Re, F as Se, H as Te, I as xe, J as we, U as Ue, K as Pe, N as Me, P as Ke, Q as _e, R as ze, S as Oe, T as Ve, V as Be, W as Le, X as De, Y as He, Z as Fe, $ as Ge, a1 as $e, a4 as ke, a5 as We, a6 as Je, a7 as je, a8 as Ee, a9 as qe, ab as Ne, ac as Qe, ad as Ze, ae as Xe } from "./use-render-activity-message-CbKeqosY.js";
3
+ import { aa as g, a3 as y, a2 as v, a0 as b, u as I } from "./use-render-activity-message-CszKQeFs.js";
4
+ import { A as k, _ as W, a as J, C as j, b as E, c as q, d as N, e as Q, f as Z, g as X, h as Y, i as ee, j as ae, k as te, l as oe, m as ne, n as re, o as se, p as ie, q as le, r as de, s as ue, t as pe, v as ce, w as Ce, x as me, y as fe, z as ge, B as ve, G as he, L as Ae, M as ye, D as be, E as Ie, O as Re, F as Se, H as Te, I as xe, J as we, U as Ue, K as Pe, N as Me, P as Ke, Q as _e, R as ze, S as Oe, T as Ve, V as Be, W as Le, X as De, Y as He, Z as Fe, $ as Ge, a1 as $e, a4 as ke, a5 as We, a6 as Je, a7 as je, a8 as Ee, a9 as qe, ab as Ne, ac as Qe, ad as Ze, ae as Xe } from "./use-render-activity-message-CszKQeFs.js";
5
5
  import { ref as R, watch as S, defineComponent as T, openBlock as x, createBlock as w, normalizeProps as U, guardReactiveProps as P, withCtx as M, renderSlot as K } from "vue";
6
6
  import { getZodParameters as h, parseJson as A } from "@copilotkit/shared";
7
7
  import { createLicenseContextValue as ea } from "@copilotkit/shared";
@@ -1,6 +1,6 @@
1
- import { defineComponent as re, useAttrs as Xe, shallowRef as rt, onMounted as ze, onUnmounted as fn, openBlock as M, createBlock as he, resolveDynamicComponent as ft, mergeProps as fe, unref as Q, createCommentVNode as X, inject as xt, ref as S, watch as U, computed as r, onBeforeUnmount as Fe, h as C, nextTick as gt, getCurrentInstance as ct, createElementBlock as B, normalizeStyle as lt, createElementVNode as F, toDisplayString as ke, triggerRef as at, provide as At, Fragment as Me, renderSlot as I, toValue as Ve, renderList as Ge, createVNode as ie, withMemo as ha, createSlots as Je, withCtx as G, normalizeProps as J, guardReactiveProps as Y, normalizeClass as ye, createTextVNode as qt, readonly as jt, withModifiers as Ht, Teleport as ba, useSlots as gn, onScopeDispose as Ft, watchEffect as ka } from "vue";
1
+ import { defineComponent as re, useAttrs as Xe, shallowRef as nt, onMounted as ze, onUnmounted as fn, openBlock as M, createBlock as he, resolveDynamicComponent as ft, mergeProps as fe, unref as Q, createCommentVNode as X, inject as xt, ref as S, watch as U, computed as r, onBeforeUnmount as Fe, h as C, nextTick as gt, getCurrentInstance as ct, createElementBlock as B, normalizeStyle as lt, createElementVNode as F, toDisplayString as ke, triggerRef as ot, provide as At, Fragment as Me, renderSlot as I, toValue as Ve, renderList as Ge, createVNode as ie, withMemo as ha, createSlots as Je, withCtx as G, normalizeProps as J, guardReactiveProps as Y, normalizeClass as ye, createTextVNode as qt, readonly as jt, withModifiers as Ht, Teleport as ba, useSlots as gn, onScopeDispose as Ft, watchEffect as ka } from "vue";
2
2
  import { z as ue } from "zod";
3
- import { randomUUID as it, A2UI_DEFAULT_GENERATION_GUIDELINES as ya, A2UI_DEFAULT_DESIGN_GUIDELINES as wa, createLicenseContextValue as Jn, schemaToJsonSchema as xa, DEFAULT_AGENT_ID as ot, partialJSONParse as An, matchesAcceptFilter as tn, exceedsMaxSize as Ca, formatFileSize as rn, getModalityFromMimeType as Ta, readFileAsBase64 as Sa, generateVideoThumbnail as Ia, TranscriptionErrorCode as et, getSourceUrl as yt, getDocumentIcon as ln } from "@copilotkit/shared";
3
+ import { randomUUID as rt, A2UI_DEFAULT_GENERATION_GUIDELINES as ya, A2UI_DEFAULT_DESIGN_GUIDELINES as wa, createLicenseContextValue as Jn, schemaToJsonSchema as xa, DEFAULT_AGENT_ID as st, partialJSONParse as An, matchesAcceptFilter as tn, exceedsMaxSize as Ca, formatFileSize as rn, getModalityFromMimeType as Ta, readFileAsBase64 as Sa, generateVideoThumbnail as Ia, TranscriptionErrorCode as et, getSourceUrl as yt, getDocumentIcon as ln } from "@copilotkit/shared";
4
4
  import { zodToJsonSchema as vn } from "zod-to-json-schema";
5
5
  import { CopilotKitCore as Aa, ToolCallStatus as tt, CopilotKitCoreRuntimeConnectionStatus as Rt, ProxiedCopilotRuntimeAgent as Ra, ɵcreateThreadStore as Ma, ɵselectThreads as $a, ɵselectThreadsIsLoading as Ea, ɵselectThreadsError as Fa, ɵselectFetchMoreError as Oa, ɵselectHasNextPage as La, ɵselectIsFetchingNextPage as Da, ɵselectIsMutating as Ua } from "@copilotkit/core";
6
6
  import { GenericBinder as Ba, Catalog as ja, ComponentContext as Na, MessageProcessor as Va } from "@a2ui/web_core/v0_9";
@@ -15,7 +15,7 @@ const To = /* @__PURE__ */ re({
15
15
  core: {}
16
16
  },
17
17
  setup(e) {
18
- const n = e, t = Xe(), a = rt(null);
18
+ const n = e, t = Xe(), a = nt(null);
19
19
  let s = !0;
20
20
  return ze(() => {
21
21
  import("@copilotkit/web-inspector").then((o) => {
@@ -308,7 +308,7 @@ const Fo = re({
308
308
  const ae = V.params, O = ae?.role || "user", x = ae?.content?.filter((_) => _.type === "text" && _.text).map((_) => _.text).join(`
309
309
  `) || "";
310
310
  x && H.addMessage({
311
- id: it(),
311
+ id: rt(),
312
312
  role: O,
313
313
  content: x
314
314
  }), d(V.id, { isError: !1 }), (ae?.followUp ?? O === "user") && x && Nt.enqueue(
@@ -927,7 +927,7 @@ function Le(e, n, t) {
927
927
  render: a
928
928
  };
929
929
  }
930
- const st = "8px", jo = "16px", Et = "1px solid #ccc", Jt = "8px", ea = (e) => {
930
+ const it = "8px", jo = "16px", Et = "1px solid #ccc", Jt = "8px", ea = (e) => {
931
931
  switch (e) {
932
932
  case "center":
933
933
  return "center";
@@ -960,10 +960,10 @@ const st = "8px", jo = "16px", Et = "1px solid #ccc", Jt = "8px", ea = (e) => {
960
960
  return "stretch";
961
961
  }
962
962
  }, Ot = () => ({
963
- margin: st,
963
+ margin: it,
964
964
  boxSizing: "border-box"
965
965
  }), No = () => ({
966
- margin: st,
966
+ margin: it,
967
967
  padding: jo,
968
968
  border: Et,
969
969
  borderRadius: Jt,
@@ -1111,7 +1111,7 @@ const Po = Le(_a, ({ props: e }) => {
1111
1111
  display: "flex",
1112
1112
  flexDirection: "column",
1113
1113
  width: "100%",
1114
- margin: st
1114
+ margin: it
1115
1115
  }
1116
1116
  },
1117
1117
  [
@@ -1156,7 +1156,7 @@ const Po = Le(_a, ({ props: e }) => {
1156
1156
  () => ({ selectedIndex: S(0) })
1157
1157
  ), Xo = Le(Ya, ({ props: e }) => {
1158
1158
  const n = e.axis === "vertical", t = {
1159
- margin: st,
1159
+ margin: it,
1160
1160
  border: "none",
1161
1161
  backgroundColor: "#ccc"
1162
1162
  };
@@ -1243,7 +1243,7 @@ const Po = Le(_a, ({ props: e }) => {
1243
1243
  () => ({ isOpen: S(!1) })
1244
1244
  ), Zo = Le(eo, ({ props: e, buildChild: n }) => {
1245
1245
  const t = {
1246
- margin: st,
1246
+ margin: it,
1247
1247
  padding: "8px 16px",
1248
1248
  cursor: "pointer",
1249
1249
  border: e.variant === "borderless" ? "none" : "1px solid #ccc",
@@ -1282,7 +1282,7 @@ const Po = Le(_a, ({ props: e }) => {
1282
1282
  flexDirection: "column",
1283
1283
  gap: "4px",
1284
1284
  width: "100%",
1285
- margin: st
1285
+ margin: it
1286
1286
  }
1287
1287
  },
1288
1288
  [
@@ -1325,7 +1325,7 @@ const Po = Le(_a, ({ props: e }) => {
1325
1325
  style: {
1326
1326
  display: "flex",
1327
1327
  flexDirection: "column",
1328
- margin: st
1328
+ margin: it
1329
1329
  }
1330
1330
  },
1331
1331
  [
@@ -1387,7 +1387,7 @@ const Po = Le(_a, ({ props: e }) => {
1387
1387
  display: "flex",
1388
1388
  flexDirection: "column",
1389
1389
  gap: "8px",
1390
- margin: st,
1390
+ margin: it,
1391
1391
  width: "100%"
1392
1392
  }
1393
1393
  },
@@ -1472,7 +1472,7 @@ const Po = Le(_a, ({ props: e }) => {
1472
1472
  display: "flex",
1473
1473
  flexDirection: "column",
1474
1474
  gap: "4px",
1475
- margin: st,
1475
+ margin: it,
1476
1476
  width: "100%"
1477
1477
  }
1478
1478
  },
@@ -1530,7 +1530,7 @@ const Po = Le(_a, ({ props: e }) => {
1530
1530
  flexDirection: "column",
1531
1531
  gap: "4px",
1532
1532
  width: "100%",
1533
- margin: st
1533
+ margin: it
1534
1534
  }
1535
1535
  },
1536
1536
  [
@@ -2377,7 +2377,7 @@ PARAMETER ORDER IS CRITICAL — generate parameters in exactly this order:
2377
2377
  t.defaultThrottleMs !== void 0 && (!Number.isFinite(t.defaultThrottleMs) || t.defaultThrottleMs < 0) && console.error(
2378
2378
  `CopilotKitProvider: defaultThrottleMs must be a non-negative finite number, got ${t.defaultThrottleMs}. useAgent hooks without an explicit throttleMs will fall back to unthrottled.`
2379
2379
  ), z.setDefaultThrottleMs(t.defaultThrottleMs);
2380
- }, x = rt((() => {
2380
+ }, x = nt((() => {
2381
2381
  const z = new Oo({
2382
2382
  runtimeUrl: k.value,
2383
2383
  runtimeTransport: t.useSingleEndpoint === !0 ? "single" : t.useSingleEndpoint === !1 ? "rest" : "auto",
@@ -2409,20 +2409,20 @@ PARAMETER ORDER IS CRITICAL — generate parameters in exactly this order:
2409
2409
  }) => {
2410
2410
  setTimeout(() => {
2411
2411
  const We = new Set(_.value);
2412
- We.delete(Re), _.value = We, at(x);
2412
+ We.delete(Re), _.value = We, ot(x);
2413
2413
  }, 0);
2414
2414
  }
2415
2415
  }), He = z.subscribe({
2416
2416
  onRenderToolCallsChanged: () => {
2417
- at(x);
2417
+ ot(x);
2418
2418
  }
2419
2419
  }), $e = z.subscribe({
2420
2420
  onRenderCustomMessagesChanged: () => {
2421
- at(x);
2421
+ ot(x);
2422
2422
  }
2423
2423
  }), we = z.subscribe({
2424
2424
  onRuntimeConnectionStatusChanged: () => {
2425
- h.value = z.a2uiEnabled, y.value = z.openGenerativeUIEnabled, A.value = z.licenseStatus, at(x);
2425
+ h.value = z.a2uiEnabled, y.value = z.openGenerativeUIEnabled, A.value = z.licenseStatus, ot(x);
2426
2426
  }
2427
2427
  }), Ce = z.subscribe({
2428
2428
  onError: (Re) => {
@@ -2443,9 +2443,9 @@ PARAMETER ORDER IS CRITICAL — generate parameters in exactly this order:
2443
2443
  }), U([p], ([z]) => {
2444
2444
  E.value && x.value.setRenderToolCalls(z);
2445
2445
  }), U([b], ([z]) => {
2446
- E.value && (x.value.setRenderCustomMessages(z), at(x));
2446
+ E.value && (x.value.setRenderCustomMessages(z), ot(x));
2447
2447
  }), U([H], ([z]) => {
2448
- E.value && (x.value.setRenderActivityMessages(z), at(x));
2448
+ E.value && (x.value.setRenderActivityMessages(z), ot(x));
2449
2449
  });
2450
2450
  function se() {
2451
2451
  x.value.setRuntimeUrl(k.value), x.value.setRuntimeTransport(
@@ -2468,7 +2468,7 @@ PARAMETER ORDER IS CRITICAL — generate parameters in exactly this order:
2468
2468
  ), U(
2469
2469
  () => t.defaultThrottleMs,
2470
2470
  () => {
2471
- E.value && (ae(x.value), at(x));
2471
+ E.value && (ae(x.value), ot(x));
2472
2472
  }
2473
2473
  ), ze(() => {
2474
2474
  se(), h.value = x.value.a2uiEnabled, y.value = x.value.openGenerativeUIEnabled, A.value = x.value.licenseStatus, E.value = !0;
@@ -2563,7 +2563,7 @@ PARAMETER ORDER IS CRITICAL — generate parameters in exactly this order:
2563
2563
  })) : X("", !0)
2564
2564
  ], 64));
2565
2565
  }
2566
- }), nt = {
2566
+ }), at = {
2567
2567
  chatInputPlaceholder: "Type a message...",
2568
2568
  chatInputToolbarStartTranscribeButtonLabel: "Transcribe",
2569
2569
  chatInputToolbarCancelTranscribeButtonLabel: "Cancel",
@@ -2596,7 +2596,7 @@ function On(e) {
2596
2596
  return e !== null && typeof e == "object" && Object.prototype.toString.call(e) === "[object Object]";
2597
2597
  }
2598
2598
  function na(e) {
2599
- const n = rt(Ve(e));
2599
+ const n = nt(Ve(e));
2600
2600
  return U(
2601
2601
  () => Ve(e),
2602
2602
  (t) => {
@@ -2626,12 +2626,12 @@ const yn = /* @__PURE__ */ re({
2626
2626
  ), a = r(() => t?.value ?? null), s = r(
2627
2627
  () => n.threadId !== void 0 && n.hasExplicitThreadId !== !1
2628
2628
  ), o = S(null), i = na(r(() => n.labels)), l = r(() => ({
2629
- ...nt,
2629
+ ...at,
2630
2630
  ...a.value?.labels,
2631
2631
  ...i.value
2632
2632
  })), c = r(
2633
- () => n.agentId ?? a.value?.agentId ?? ot
2634
- ), g = it(), T = r(() => s.value ? n.threadId : o.value ? o.value.threadId : n.threadId ? n.threadId : a.value?.threadId ? a.value.threadId : g), d = r(() => s.value ? !0 : (o.value ? o.value.explicit : n.hasExplicitThreadId !== void 0 ? n.hasExplicitThreadId : !!n.threadId) || !!a.value?.hasExplicitThreadId), f = r(
2633
+ () => n.agentId ?? a.value?.agentId ?? st
2634
+ ), g = rt(), T = r(() => s.value ? n.threadId : o.value ? o.value.threadId : n.threadId ? n.threadId : a.value?.threadId ? a.value.threadId : g), d = r(() => s.value ? !0 : (o.value ? o.value.explicit : n.hasExplicitThreadId !== void 0 ? n.hasExplicitThreadId : !!n.threadId) || !!a.value?.hasExplicitThreadId), f = r(
2635
2635
  () => n.isModalDefaultOpen !== void 0
2636
2636
  ), u = r(() => n.isModalDefaultOpen ?? !0), m = S(
2637
2637
  a.value?.isModalOpen ?? u.value
@@ -2663,7 +2663,7 @@ const yn = /* @__PURE__ */ re({
2663
2663
  );
2664
2664
  return;
2665
2665
  }
2666
- o.value = { threadId: it(), explicit: !1 };
2666
+ o.value = { threadId: rt(), explicit: !1 };
2667
2667
  }
2668
2668
  const h = S(!1), y = S(0);
2669
2669
  function A(V) {
@@ -2813,7 +2813,7 @@ const oa = re({
2813
2813
  catalog: {}
2814
2814
  },
2815
2815
  setup(e) {
2816
- const n = e, { copilotkit: t } = je(), a = rt(null), s = S(0), o = S(null);
2816
+ const n = e, { copilotkit: t } = je(), a = nt(null), s = S(0), o = S(null);
2817
2817
  let i = "";
2818
2818
  function l() {
2819
2819
  if (!a.value) {
@@ -2972,7 +2972,7 @@ const oa = re({
2972
2972
  };
2973
2973
  }
2974
2974
  function d(f) {
2975
- const u = t.value.renderToolCalls, m = s.value?.agentId ?? ot, k = u.filter(
2975
+ const u = t.value.renderToolCalls, m = s.value?.agentId ?? st, k = u.filter(
2976
2976
  (v) => v.name === f.function.name
2977
2977
  );
2978
2978
  return k.find((v) => v.agentId === m) ?? k.find((v) => !v.agentId) ?? k[0] ?? u.find((v) => v.name === "*");
@@ -3018,7 +3018,7 @@ const Hs = ["data-message-id"], Ws = { class: "cpk:w-full cpk:bg-transparent cpk
3018
3018
  emits: ["thumbs-up", "thumbs-down", "read-aloud", "regenerate"],
3019
3019
  setup(e, { emit: n }) {
3020
3020
  zs();
3021
- const t = e, a = n, s = Oe(), o = r(() => s.value?.labels ?? nt), i = ct(), l = S(!1);
3021
+ const t = e, a = n, s = Oe(), o = r(() => s.value?.labels ?? at), i = ct(), l = S(!1);
3022
3022
  let c = null;
3023
3023
  const g = r(
3024
3024
  () => i?.vnode.props ?? {}
@@ -3773,10 +3773,10 @@ function ai(e, n, t) {
3773
3773
  }
3774
3774
  function xn(e = {}) {
3775
3775
  const n = Oe(), t = r(
3776
- () => Ve(e.agentId) ?? n.value?.agentId ?? ot
3776
+ () => Ve(e.agentId) ?? n.value?.agentId ?? st
3777
3777
  ), a = r(
3778
3778
  () => Ve(e.threadId) ?? n.value?.threadId
3779
- ), { copilotkit: s } = je(), o = r(() => e.updates ?? ti), i = r(() => s.value.defaultThrottleMs), l = r(() => Ve(e.throttleMs)), c = rt(null), g = rt(null), T = /* @__PURE__ */ new Map(), d = (u, m, k, v) => {
3779
+ ), { copilotkit: s } = je(), o = r(() => e.updates ?? ti), i = r(() => s.value.defaultThrottleMs), l = r(() => Ve(e.throttleMs)), c = nt(null), g = nt(null), T = /* @__PURE__ */ new Map(), d = (u, m, k, v) => {
3780
3780
  const w = new Ra({
3781
3781
  runtimeUrl: m,
3782
3782
  agentId: u,
@@ -3804,7 +3804,7 @@ function xn(e = {}) {
3804
3804
  if (w) {
3805
3805
  T.delete(k), T.delete(u);
3806
3806
  const A = m ? ai(w, m, v.headers) : w, L = c.value === A;
3807
- c.value = A, g.value = A, L && at(c);
3807
+ c.value = A, g.value = A, L && ot(c);
3808
3808
  return;
3809
3809
  }
3810
3810
  const p = v.runtimeUrl !== void 0, b = v.runtimeConnectionStatus;
@@ -3850,14 +3850,14 @@ function xn(e = {}) {
3850
3850
  let p = !0, b = !1;
3851
3851
  const h = () => {
3852
3852
  p && (b || (b = !0, queueMicrotask(() => {
3853
- b = !1, p && at(c);
3853
+ b = !1, p && ot(c);
3854
3854
  })));
3855
3855
  }, y = {};
3856
3856
  w.includes(
3857
3857
  "OnMessagesChanged"
3858
3858
  /* OnMessagesChanged */
3859
3859
  ) && (y.onMessagesChanged = () => {
3860
- p && at(c);
3860
+ p && ot(c);
3861
3861
  }), w.includes(
3862
3862
  "OnStateChanged"
3863
3863
  /* OnStateChanged */
@@ -3879,7 +3879,7 @@ function xn(e = {}) {
3879
3879
  }
3880
3880
  function oi(e = {}) {
3881
3881
  const { copilotkit: n } = je(), t = Oe(), a = r(
3882
- () => Ve(e.agentId) ?? t.value?.agentId ?? ot
3882
+ () => Ve(e.agentId) ?? t.value?.agentId ?? st
3883
3883
  ), s = S([]), o = S(!1), i = () => {
3884
3884
  const g = n.value.getSuggestions(a.value);
3885
3885
  s.value = g.suggestions, o.value = g.isLoading;
@@ -3922,7 +3922,7 @@ function oi(e = {}) {
3922
3922
  };
3923
3923
  }
3924
3924
  function si(e) {
3925
- const n = S([]), t = S(!1), a = S(null), s = S(null), o = S(Ve(e.config)), i = S(n.value), l = r(() => o.value?.enabled ?? !1);
3925
+ const n = nt([]), t = S(!1), a = S(null), s = S(null), o = S(Ve(e.config)), i = nt(n.value), l = r(() => o.value?.enabled ?? !1);
3926
3926
  U(
3927
3927
  () => Ve(e.config),
3928
3928
  (p) => {
@@ -3957,7 +3957,7 @@ function si(e) {
3957
3957
  });
3958
3958
  continue;
3959
3959
  }
3960
- const $ = Ta(D.type), j = it();
3960
+ const $ = Ta(D.type), j = rt();
3961
3961
  g((W) => [
3962
3962
  ...W,
3963
3963
  {
@@ -4274,7 +4274,7 @@ const gi = { class: "cpk:pointer-events-auto cpk:mx-auto cpk:max-w-3xl cpk:px-4
4274
4274
  () => i?.vnode.props ?? {}
4275
4275
  ), ae = r(() => t.modelValue !== void 0), O = r(
4276
4276
  () => ae.value ? t.modelValue ?? "" : k.value
4277
- ), x = r(() => o.value?.labels ?? nt), E = r(
4277
+ ), x = r(() => o.value?.labels ?? at), E = r(
4278
4278
  () => t.placeholder ?? x.value.chatInputPlaceholder
4279
4279
  ), _ = r(
4280
4280
  () => t.mode === "input" && w.value === "expanded"
@@ -5389,7 +5389,7 @@ const gi = { class: "cpk:pointer-events-auto cpk:mx-auto cpk:max-w-3xl cpk:px-4
5389
5389
  },
5390
5390
  emits: ["edit-message", "switch-to-branch"],
5391
5391
  setup(e, { emit: n }) {
5392
- const t = e, a = n, s = Oe(), o = r(() => s.value?.labels ?? nt), i = ct(), l = S(!1);
5392
+ const t = e, a = n, s = Oe(), o = r(() => s.value?.labels ?? at), i = ct(), l = S(!1);
5393
5393
  let c = null;
5394
5394
  const g = r(
5395
5395
  () => i?.vnode.props ?? {}
@@ -5577,7 +5577,7 @@ const gi = { class: "cpk:pointer-events-auto cpk:mx-auto cpk:max-w-3xl cpk:px-4
5577
5577
  },
5578
5578
  setup(e) {
5579
5579
  const n = e, { copilotkit: t } = je(), a = Oe(), s = S(0), o = S(null), i = gn(), l = r(() => Object.keys(i)), c = r(
5580
- () => a.value?.agentId ?? ot
5580
+ () => a.value?.agentId ?? st
5581
5581
  ), g = r(() => {
5582
5582
  const p = c.value, b = t.value.getAgent(p);
5583
5583
  return Vn(b, a.value?.threadId) ?? b;
@@ -5971,7 +5971,7 @@ const Or = {
5971
5971
  },
5972
5972
  emits: ["submit-message", "stop", "input-change", "select-suggestion", "add-file", "start-transcribe", "cancel-transcribe", "finish-transcribe"],
5973
5973
  setup(e, { emit: n }) {
5974
- const t = e, a = n, s = Oe(), o = r(() => s.value?.labels ?? nt), i = ct(), l = gn(), c = S(null), g = S(null), T = S(null), d = S(null), f = S(0), u = S(!0), m = r(() => t.inputValue !== void 0), k = S(t.inputValue ?? ""), v = r(() => Fr(t.autoScroll)), w = r(
5974
+ const t = e, a = n, s = Oe(), o = r(() => s.value?.labels ?? at), i = ct(), l = gn(), c = S(null), g = S(null), T = S(null), d = S(null), f = S(0), u = S(!0), m = r(() => t.inputValue !== void 0), k = S(t.inputValue ?? ""), v = r(() => Fr(t.autoScroll)), w = r(
5975
5975
  () => v.value === "pin-to-bottom"
5976
5976
  ), p = r(() => v.value === "pin-to-send");
5977
5977
  fi({
@@ -6367,8 +6367,8 @@ const Or = {
6367
6367
  setup(e, { emit: n }) {
6368
6368
  const t = e, a = n, s = Xe(), o = gn(), i = Oe(), { copilotkit: l } = je(), c = r(
6369
6369
  () => Object.keys(o).filter((q) => q !== "chat-view")
6370
- ), g = S(it()), T = S("input"), d = S(t.inputValue ?? ""), f = S(null), u = S(!1), m = S(!1), k = S(!1), v = rt(null), w = r(
6371
- () => t.agentId ?? i.value?.agentId ?? ot
6370
+ ), g = S(rt()), T = S("input"), d = S(t.inputValue ?? ""), f = S(null), u = S(!1), m = S(!1), k = S(!1), v = nt(null), w = r(
6371
+ () => t.agentId ?? i.value?.agentId ?? st
6372
6372
  ), p = r(
6373
6373
  () => t.threadId ?? i.value?.threadId
6374
6374
  ), b = r(
@@ -6458,7 +6458,7 @@ const Or = {
6458
6458
  ), U(
6459
6459
  [() => t.threadId, () => i.value?.threadId],
6460
6460
  ([q, de], pe) => {
6461
- q || de || pe && (pe[0] || pe[1]) && (g.value = it());
6461
+ q || de || pe && (pe[0] || pe[1]) && (g.value = rt());
6462
6462
  }
6463
6463
  ), U(
6464
6464
  [() => l.value, w, () => t.onError],
@@ -6577,13 +6577,13 @@ const Or = {
6577
6577
  }
6578
6578
  });
6579
6579
  $.value.addMessage({
6580
- id: it(),
6580
+ id: rt(),
6581
6581
  role: "user",
6582
6582
  content: Te
6583
6583
  });
6584
6584
  } else
6585
6585
  $.value.addMessage({
6586
- id: it(),
6586
+ id: rt(),
6587
6587
  role: "user",
6588
6588
  content: q
6589
6589
  });
@@ -6591,7 +6591,7 @@ const Or = {
6591
6591
  }
6592
6592
  async function Ce(q, de) {
6593
6593
  a("select-suggestion", q, de), $.value?.addMessage({
6594
- id: it(),
6594
+ id: rt(),
6595
6595
  role: "user",
6596
6596
  content: q.message
6597
6597
  }), await $e();
@@ -6995,7 +6995,7 @@ const zn = "copilot-chat-input-textarea", tl = "copilot-chat-view", ec = /* @__P
6995
6995
  const O = o.value.status;
6996
6996
  return (O === "valid" || O === "expiring") && o.value.checkFeature("threads");
6997
6997
  }), l = r(() => o.value.status === null), c = r(
6998
- () => t.agentId ?? s.value?.agentId ?? ot
6998
+ () => t.agentId ?? s.value?.agentId ?? st
6999
6999
  ), g = r(() => s.value?.threadId ?? null), T = S(!1), d = r(
7000
7000
  () => s.value ? s.value.drawerOpen : T.value
7001
7001
  );
@@ -7163,7 +7163,7 @@ const zn = "copilot-chat-input-textarea", tl = "copilot-chat-view", ec = /* @__P
7163
7163
  type: { default: "button" }
7164
7164
  },
7165
7165
  setup(e) {
7166
- const n = e, t = Xe(), a = Oe(), s = S(!1), o = r(() => a.value?.labels ?? nt), i = r(() => a.value?.isModalOpen ?? s.value), l = r(
7166
+ const n = e, t = Xe(), a = Oe(), s = S(!1), o = r(() => a.value?.labels ?? at), i = r(() => a.value?.isModalOpen ?? s.value), l = r(
7167
7167
  () => i.value ? o.value.chatToggleCloseLabel : o.value.chatToggleOpenLabel
7168
7168
  ), c = r(() => [
7169
7169
  "cpk:fixed cpk:bottom-6 cpk:right-6 cpk:z-[1100] cpk:flex cpk:h-14 cpk:w-14 cpk:items-center cpk:justify-center",
@@ -7312,7 +7312,7 @@ const zn = "copilot-chat-input-textarea", tl = "copilot-chat-view", ec = /* @__P
7312
7312
  },
7313
7313
  setup(e) {
7314
7314
  const n = e, t = Xe(), a = Oe(), s = r(
7315
- () => n.title ?? a.value?.labels.modalHeaderTitle ?? nt.modalHeaderTitle
7315
+ () => n.title ?? a.value?.labels.modalHeaderTitle ?? at.modalHeaderTitle
7316
7316
  ), o = r(() => [
7317
7317
  "cpk:flex cpk:items-center cpk:justify-between cpk:border-b cpk:border-border cpk:px-4 cpk:py-4",
7318
7318
  "cpk:bg-background/95 cpk:backdrop-blur cpk:supports-[backdrop-filter]:bg-background/80",
@@ -7425,7 +7425,7 @@ const zn = "copilot-chat-input-textarea", tl = "copilot-chat-view", ec = /* @__P
7425
7425
  () => i?.vnode.props ?? {}
7426
7426
  ), c = S(null), g = S(o.value?.isModalOpen ?? !1), T = S(!1);
7427
7427
  let d, f;
7428
- const u = r(() => o.value?.isModalOpen ?? !1), m = r(() => o.value?.labels ?? nt), k = r(() => m.value.modalHeaderTitle), v = r(() => h("onStop")), w = r(
7428
+ const u = r(() => o.value?.isModalOpen ?? !1), m = r(() => o.value?.labels ?? at), k = r(() => m.value.modalHeaderTitle), v = r(() => h("onStop")), w = r(
7429
7429
  () => u.value && !T.value ? "cpk:pointer-events-auto cpk:translate-y-0 cpk:opacity-100 cpk:md:scale-100" : "cpk:pointer-events-none cpk:translate-y-4 cpk:opacity-0 cpk:md:translate-y-5 cpk:md:scale-[0.95]"
7430
7430
  ), p = r(
7431
7431
  () => ({
@@ -7821,7 +7821,7 @@ const zn = "copilot-chat-input-textarea", tl = "copilot-chat-view", ec = /* @__P
7821
7821
  onSelectSuggestion: {}
7822
7822
  },
7823
7823
  setup(e) {
7824
- const n = e, t = Oe(), a = r(() => t.value?.labels ?? nt), s = r(
7824
+ const n = e, t = Oe(), a = r(() => t.value?.labels ?? at), s = r(
7825
7825
  () => ({
7826
7826
  modelValue: n.modelValue,
7827
7827
  isRunning: n.isRunning,
@@ -7923,7 +7923,7 @@ const zn = "copilot-chat-input-textarea", tl = "copilot-chat-view", ec = /* @__P
7923
7923
  const d = r(() => o.value?.isModalOpen ?? !1), f = r(
7924
7924
  () => t.width ?? g.value
7925
7925
  ), u = r(
7926
- () => o.value?.labels.modalHeaderTitle ?? nt.modalHeaderTitle
7926
+ () => o.value?.labels.modalHeaderTitle ?? at.modalHeaderTitle
7927
7927
  ), m = r(() => [
7928
7928
  "cpk:fixed cpk:right-0 cpk:top-0 cpk:z-[1200] cpk:flex cpk:h-[100vh] cpk:h-[100dvh] cpk:max-h-screen cpk:w-full",
7929
7929
  "cpk:border-l cpk:border-border cpk:bg-background cpk:text-foreground cpk:shadow-xl",
@@ -8283,7 +8283,7 @@ const zn = "copilot-chat-input-textarea", tl = "copilot-chat-view", ec = /* @__P
8283
8283
  onSelectSuggestion: {}
8284
8284
  },
8285
8285
  setup(e) {
8286
- const n = e, t = Oe(), a = r(() => t.value?.labels ?? nt), s = r(
8286
+ const n = e, t = Oe(), a = r(() => t.value?.labels ?? at), s = r(
8287
8287
  () => ({
8288
8288
  modelValue: n.modelValue,
8289
8289
  isRunning: n.isRunning,
@@ -9009,7 +9009,7 @@ function Bl(e) {
9009
9009
  }
9010
9010
  function pc(e, n) {
9011
9011
  const { copilotkit: t } = je(), a = Oe(), s = n ?? [], o = r(
9012
- () => a.value?.agentId ?? ot
9012
+ () => a.value?.agentId ?? st
9013
9013
  ), i = r(
9014
9014
  () => e ? e.consumerAgentId : void 0
9015
9015
  ), l = r(() => {
@@ -9130,7 +9130,7 @@ function sn(e) {
9130
9130
  return e.kind === "legacy" ? e.event : { name: va, value: e.interrupts[0] };
9131
9131
  }
9132
9132
  function fc(e = {}) {
9133
- const { copilotkit: n } = je(), { agent: t } = xn({ agentId: e.agentId }), a = rt(null), s = rt(null), o = {};
9133
+ const { copilotkit: n } = je(), { agent: t } = xn({ agentId: e.agentId }), a = nt(null), s = nt(null), o = {};
9134
9134
  U(
9135
9135
  t,
9136
9136
  (u, m, k) => {
@@ -9332,7 +9332,7 @@ function vc() {
9332
9332
  return function(a) {
9333
9333
  const s = n.value;
9334
9334
  if (!s) return null;
9335
- const o = s.agentId || ot, { threadId: i } = s, l = e.value, c = [...l.renderCustomMessages].filter(
9335
+ const o = s.agentId || st, { threadId: i } = s, l = e.value, c = [...l.renderCustomMessages].filter(
9336
9336
  (y) => y.agentId === void 0 || y.agentId === o
9337
9337
  ).sort((y, A) => {
9338
9338
  const L = y.agentId !== void 0, D = A.agentId !== void 0;
@@ -9371,7 +9371,7 @@ function vc() {
9371
9371
  };
9372
9372
  }
9373
9373
  function mc() {
9374
- const { copilotkit: e } = je(), n = Oe(), t = r(() => n.value?.agentId ?? ot), a = r(() => [
9374
+ const { copilotkit: e } = je(), n = Oe(), t = r(() => n.value?.agentId ?? st), a = r(() => [
9375
9375
  ...e.value.renderActivityMessages
9376
9376
  ]);
9377
9377
  function s(i) {
@@ -9458,7 +9458,7 @@ export {
9458
9458
  Zl as d,
9459
9459
  Zs as e,
9460
9460
  yn as f,
9461
- nt as g,
9461
+ at as g,
9462
9462
  Wt as h,
9463
9463
  Sr as i,
9464
9464
  fr as j,
@@ -9479,4 +9479,4 @@ export {
9479
9479
  nc as y,
9480
9480
  rc as z
9481
9481
  };
9482
- //# sourceMappingURL=use-render-activity-message-CbKeqosY.js.map
9482
+ //# sourceMappingURL=use-render-activity-message-CszKQeFs.js.map