@copilotkit/vue 1.70.2 → 1.71.0
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/PARITY.md +1 -1
- package/dist/index.cjs +1 -1
- package/dist/index.mjs +2 -2
- package/dist/{use-render-activity-message-WeN5iF5H.js → use-render-activity-message-Ciee03Rx.js} +810 -791
- package/dist/{use-render-activity-message-WeN5iF5H.js.map → use-render-activity-message-Ciee03Rx.js.map} +1 -1
- package/dist/use-render-activity-message-DXJDZGkW.cjs +85 -0
- package/dist/{use-render-activity-message-CyThomMH.cjs.map → use-render-activity-message-DXJDZGkW.cjs.map} +1 -1
- package/dist/v2/hooks/use-human-in-the-loop.d.ts.map +1 -1
- package/dist/v2/index.cjs +1 -1
- package/dist/v2/index.mjs +1 -1
- package/dist/v2/types/human-in-the-loop.d.ts +6 -0
- package/dist/v2/types/human-in-the-loop.d.ts.map +1 -1
- package/package.json +5 -5
- package/src/v2/hooks/__tests__/use-human-in-the-loop.e2e.test.ts +252 -0
- package/src/v2/hooks/__tests__/use-human-in-the-loop.test.ts +247 -0
- package/src/v2/hooks/use-human-in-the-loop.ts +39 -6
- package/src/v2/types/human-in-the-loop.ts +6 -0
- package/CHANGELOG.md +0 -13
- package/dist/use-render-activity-message-CyThomMH.cjs +0 -85
package/PARITY.md
CHANGED
|
@@ -404,7 +404,7 @@ Current snapshot: mapped React->Vue counterpart rows are either `matched` or `in
|
|
|
404
404
|
| `standard-schema.test.tsx` | `standard-schema.test.ts` | matched | Dedicated Vue counterpart exists with React-matching vendor coverage (`zod`, `valibot`, `arktype`) and matching suite/case wording. |
|
|
405
405
|
| `standard-schema-types.test.tsx` | `standard-schema-types.test.ts` | matched | Dedicated Vue counterpart exists with React-matching vendor type-inference coverage and matching suite/case wording. |
|
|
406
406
|
| `zod-regression.test.tsx` | `zod-regression.test.ts` | matched | Dedicated Vue counterpart exists with React-matching suite/case wording and coverage boundaries. |
|
|
407
|
-
| `use-human-in-the-loop.e2e.test.tsx` | `use-human-in-the-loop.e2e.test.ts` (+ `use-human-in-the-loop.test.ts`) | matched | Dedicated strict
|
|
407
|
+
| `use-human-in-the-loop.e2e.test.tsx` | `use-human-in-the-loop.e2e.test.ts` (+ `use-human-in-the-loop.test.ts`) | matched | Dedicated strict counterpart passes React-mirrored HITL status, interaction, registration, attribution, abort, and reconnection coverage. Vue adds focused lifecycle assertions for already-aborted signals, one-shot abort cleanup, cleanup-before-respond, exhaustive status props, scoped renderer disposal, and preserving a pending promise across renderer unmount. The abort E2E uses the Vue harness's `CopilotKitCore.stopAgent({ agent })` path because its configured agent may be cloned; this is harness-only lifecycle glue. Vue preserves React's no-settle-on-unmount reconnect/remount behavior. |
|
|
408
408
|
| `use-suggestions.e2e.test.tsx` | `use-suggestions.e2e.test.ts` (+ `use-suggestions.test.ts`) | matched | Dedicated strict e2e counterpart exists and passes the full mirrored React case set, including clear/reload/loading transitions. |
|
|
409
409
|
| `use-threads.test.tsx` | `use-threads.test.ts` | matched | Dedicated strict counterpart preserves the full React case set and wording; Vue now also matches pagination naming (`hasMoreThreads`, `isFetchingMoreThreads`, `fetchMoreThreads`) and filtered public thread shape, with Vue-only reactivity coverage isolated in a trailing `Vue-specific reactive semantics` block. |
|
|
410
410
|
| `use-keyboard-height.test.tsx` | `use-keyboard-height.test.ts` | matched | Dedicated strict counterpart mirrors the React `useKeyboardHeight` suite (Visual Viewport unavailable, open/close threshold at 150 px, resize + scroll updates, listener cleanup on unmount); Vue returns readonly refs with matching field names instead of a plain state object, and a chat-view-level integration assertion in `CopilotChatView.slots.e2e.test.ts` proves the `translateY(-keyboardHeight)` transform is forwarded through `CopilotChatView`. |
|
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-
|
|
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-DXJDZGkW.cjs"),i=require("vue"),C=require("@copilotkit/shared");function g(n){return typeof n!="function"?n:(o=>{const a=typeof o.result=="string"?{...o,result:C.parseJson(o.result,o.result)}:o;return n(a)})}function b(n,o){const a="parameters"in n?C.getZodParameters(n.parameters):void 0;if(n.name==="*"){e.useRenderTool({name:"*",render:g(n.render),..."agentId"in n?{agentId:n.agentId}:{}},o);return}const t=n;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:g(l),agentId:t.agentId},o);return}if(t.available==="frontend"||t.available==="disabled"){t.render&&a?e.useRenderTool({name:t.name,parameters:a,render:g(t.render),agentId:t.agentId},o):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:g(t.render),available:s,agentId:t.agentId,get webmcp(){return t.webmcp}},o)}function _(n,o){const{name:a,description:t,parameters:c,handler:s,followUp:l,available:m,render:u,agentId:d}=n,p=C.getZodParameters(c),f=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:f,followUp:l,render:v,available:m===void 0?void 0:m!=="disabled",agentId:d,get webmcp(){return n.webmcp}},o)}function I(n,o){const{copilotkit:a}=e.useCopilotKit(),t=i.ref(void 0),c=o??[];return i.watch([()=>n.description,()=>n.value,()=>n.convert,()=>n.available,...c],(s,l,m)=>{const u=a.value;if(!u)return;const{description:d,value:p,convert:f,available:v}=n;let r;try{r=f?f(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}),m(()=>{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]},enableInspector:{type:Boolean},onError:{type:Function},a2ui:{},debug:{type:[Boolean,Object]}},setup(n){const o=n;return(a,t)=>(i.openBlock(),i.createBlock(e._sfc_main$15,i.normalizeProps(i.guardReactiveProps(o)),{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=b;exports.useCopilotReadable=I;exports.useFrontendTool=_;Object.keys(y).forEach(n=>{n!=="default"&&!Object.prototype.hasOwnProperty.call(exports,n)&&Object.defineProperty(exports,n,{enumerable:!0,get:()=>y[n]})});Object.keys(A).forEach(n=>{n!=="default"&&!Object.prototype.hasOwnProperty.call(exports,n)&&Object.defineProperty(exports,n,{enumerable:!0,get:()=>A[n]})});
|
|
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 f, a3 as b, a2 as v, a0 as y, u as I } from "./use-render-activity-message-
|
|
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 ge, z as fe, B as ve, G as he, L as Ae, M as be, D as ye, E as Ie, O as Re, F as Se, H as we, I as Te, J as xe, U as Ue, K as Pe, N as Me, P as Ke, Q as _e, R as ze, S as Be, T as Oe, V as Ve, W as Le, X as He, Y as De, 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-
|
|
3
|
+
import { aa as f, a3 as b, a2 as v, a0 as y, u as I } from "./use-render-activity-message-Ciee03Rx.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 ge, z as fe, B as ve, G as he, L as Ae, M as be, D as ye, E as Ie, O as Re, F as Se, H as we, I as Te, J as xe, U as Ue, K as Pe, N as Me, P as Ke, Q as _e, R as ze, S as Be, T as Oe, V as Ve, W as Le, X as He, Y as De, 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-Ciee03Rx.js";
|
|
5
5
|
import { ref as R, watch as S, defineComponent as w, openBlock as T, createBlock as x, 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";
|