@copilotkit/vue 1.77.1 → 1.78.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/dist/index.cjs +1 -1
- package/dist/index.mjs +2 -2
- package/dist/{use-render-activity-message-C5XGgWI-.js → use-render-activity-message-B9MOLfR_.js} +84 -84
- package/dist/use-render-activity-message-B9MOLfR_.js.map +1 -0
- package/dist/{use-render-activity-message-N-zuj24U.cjs → use-render-activity-message-eN0gdzOa.cjs} +6 -6
- package/dist/use-render-activity-message-eN0gdzOa.cjs.map +1 -0
- package/dist/v2/index.cjs +1 -1
- package/dist/v2/index.mjs +1 -1
- package/dist/v2/providers/CopilotKitProvider.vue.d.ts.map +1 -1
- package/package.json +6 -6
- package/src/v2/providers/CopilotKitProvider.vue +5 -3
- package/src/v2/providers/__tests__/CopilotKitProvider.managedEntitlement.test.ts +2 -2
- package/dist/use-render-activity-message-C5XGgWI-.js.map +0 -1
- package/dist/use-render-activity-message-N-zuj24U.cjs.map +0 -1
package/dist/{use-render-activity-message-C5XGgWI-.js → use-render-activity-message-B9MOLfR_.js}
RENAMED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { defineComponent as de, useAttrs as It, shallowRef as
|
|
1
|
+
import { defineComponent as de, useAttrs as It, shallowRef as ot, onMounted as at, onUnmounted as ao, watch as P, withDirectives as vs, openBlock as _, createBlock as Te, resolveDynamicComponent as Lt, normalizeProps as Y, mergeProps as Se, unref as te, createCommentVNode as ie, inject as Yt, ref as x, computed as c, h as T, nextTick as Nt, onBeforeUnmount as Ve, createElementBlock as Z, normalizeStyle as Ot, createElementVNode as D, toDisplayString as _e, provide as Xt, triggerRef as At, Fragment as Be, renderSlot as I, toValue as nt, renderList as gt, createVNode as ue, guardReactiveProps as ae, withMemo as hs, useSlots as En, createSlots as vt, withCtx as X, normalizeClass as Ee, createTextVNode as Mn, readonly as hn, withModifiers as In, Teleport as bs, onScopeDispose as un, watchEffect as ks } from "vue";
|
|
2
2
|
import { A2UI_DEFAULT_GENERATION_GUIDELINES as ys, A2UI_DEFAULT_DESIGN_GUIDELINES as ws, createLicenseContextValue as ga, GENERATE_SANDBOXED_UI_DESCRIPTION as Ss, schemaToJsonSchema as Ts, shouldEnableInspector as Cs, DEFAULT_AGENT_ID as yt, randomUUID as Dt, partialJSONParse as va, matchesAcceptFilter as jn, exceedsMaxSize as xs, formatFileSize as qn, getModalityFromMimeType as Is, readFileAsBase64 as As, generateVideoThumbnail as Rs, TranscriptionErrorCode as Rt, getSourceUrl as qt, getDocumentIcon as Jn, createRowKeyStore as $s, resolveRowRenderKeysById as _s, commitRowKeyStore as Io, createAttachmentContent as Es } from "@copilotkit/shared";
|
|
3
3
|
import { z as Re } from "zod";
|
|
4
4
|
import { CopilotKitCore as Ms, ToolCallStatus as ct, ɵisHttpAgent as ha, ProxiedCopilotRuntimeAgent as Ao, CopilotKitCoreRuntimeConnectionStatus as nn, isInspectorThreadBridgeEnabled as Os, onInspectorViewThread as Fs, emitInspectorViewThreadResult as Ro, emitInspectorActiveThread as $o, onInspectorStopViewing as zs, CopilotKitCoreErrorCode as Ds, ɵcreateThreadStore as Ls, ɵselectThreads as Ns, ɵselectThreadsIsLoading as Us, ɵselectThreadsError as Bs, ɵselectFetchMoreError as Ps, ɵselectHasNextPage as js, ɵselectIsFetchingNextPage as Zs, ɵselectIsMutating as Vs } from "@copilotkit/core";
|
|
@@ -2870,7 +2870,7 @@ const $u = Qt($e), me = fn((e) => typeof e == "object" && e !== null && !Array.i
|
|
|
2870
2870
|
name: $().optional(),
|
|
2871
2871
|
encryptedValue: $().optional(),
|
|
2872
2872
|
metadata: me.optional()
|
|
2873
|
-
}), zv = me.optional(), np = "1.
|
|
2873
|
+
}), zv = me.optional(), np = "1.78.0", op = /* @__PURE__ */ de({
|
|
2874
2874
|
inheritAttrs: !1,
|
|
2875
2875
|
__name: "CopilotKitInspector",
|
|
2876
2876
|
props: {
|
|
@@ -2878,14 +2878,14 @@ const $u = Qt($e), me = fn((e) => typeof e == "object" && e !== null && !Array.i
|
|
|
2878
2878
|
openRequest: {}
|
|
2879
2879
|
},
|
|
2880
2880
|
setup(e) {
|
|
2881
|
-
const t = e, n = It(), o =
|
|
2881
|
+
const t = e, n = It(), o = ot(null), a = ot(null);
|
|
2882
2882
|
let s = !0, i = null;
|
|
2883
2883
|
const r = {
|
|
2884
2884
|
created(l) {
|
|
2885
2885
|
i?.(l, t.core ?? null), a.value = l, t.openRequest && l.openInspector?.("message_toolbar", t.openRequest);
|
|
2886
2886
|
}
|
|
2887
2887
|
};
|
|
2888
|
-
return
|
|
2888
|
+
return at(() => {
|
|
2889
2889
|
import("@copilotkit/web-inspector").then((l) => {
|
|
2890
2890
|
s && (l.defineWebInspector?.(), i = (u, p) => l.configureWebInspectorElement(u, p, {
|
|
2891
2891
|
development: process.env.NODE_ENV === "development",
|
|
@@ -2914,7 +2914,7 @@ const $u = Qt($e), me = fn((e) => typeof e == "object" && e !== null && !Array.i
|
|
|
2914
2914
|
}), Ja = /* @__PURE__ */ Symbol("CopilotKit"), to = /* @__PURE__ */ Symbol("CopilotChatConfiguration"), Xa = /* @__PURE__ */ Symbol("SandboxFunctions"), ap = /* @__PURE__ */ Symbol(
|
|
2915
2915
|
"CopilotKitInspector"
|
|
2916
2916
|
);
|
|
2917
|
-
function
|
|
2917
|
+
function st() {
|
|
2918
2918
|
const e = Yt(Ja);
|
|
2919
2919
|
if (!e)
|
|
2920
2920
|
throw new Error("useCopilotKit must be used within CopilotKitProvider");
|
|
@@ -2942,7 +2942,7 @@ const sp = de({
|
|
|
2942
2942
|
}
|
|
2943
2943
|
},
|
|
2944
2944
|
setup(e) {
|
|
2945
|
-
const { copilotkit: t } =
|
|
2945
|
+
const { copilotkit: t } = st(), n = x(null), o = x(null), a = x(null), s = x(!0), i = x({}), r = ot(null), l = ot(null), u = ot(null), p = c(() => e.message?.id);
|
|
2946
2946
|
P(
|
|
2947
2947
|
[
|
|
2948
2948
|
// The container element is a watch source, not just a read: `immediate`
|
|
@@ -4712,7 +4712,7 @@ const Jp = { style: {
|
|
|
4712
4712
|
...o,
|
|
4713
4713
|
...a.value
|
|
4714
4714
|
}));
|
|
4715
|
-
return
|
|
4715
|
+
return at(() => {
|
|
4716
4716
|
typeof document > "u" || document.documentElement.style.setProperty(
|
|
4717
4717
|
Xo,
|
|
4718
4718
|
`${Yp}px`
|
|
@@ -4796,7 +4796,7 @@ const Jp = { style: {
|
|
|
4796
4796
|
isDevelopment: process.env.NODE_ENV === "development"
|
|
4797
4797
|
});
|
|
4798
4798
|
}
|
|
4799
|
-
|
|
4799
|
+
at(a), P(() => n.enableInspector, a);
|
|
4800
4800
|
const s = x(null), i = c(() => o.value);
|
|
4801
4801
|
function r(K) {
|
|
4802
4802
|
s.value = { ...K };
|
|
@@ -4990,7 +4990,7 @@ const Jp = { style: {
|
|
|
4990
4990
|
n.defaultThrottleMs !== void 0 && (!Number.isFinite(n.defaultThrottleMs) || n.defaultThrottleMs < 0) && console.error(
|
|
4991
4991
|
`CopilotKitProvider: defaultThrottleMs must be a non-negative finite number, got ${n.defaultThrottleMs}. useAgent hooks without an explicit throttleMs will fall back to unthrottled.`
|
|
4992
4992
|
), K.setDefaultThrottleMs(n.defaultThrottleMs);
|
|
4993
|
-
}, le =
|
|
4993
|
+
}, le = ot((() => {
|
|
4994
4994
|
const K = new ip({
|
|
4995
4995
|
runtimeUrl: f.value,
|
|
4996
4996
|
runtimeTransport: n.useSingleEndpoint === !0 ? "single" : n.useSingleEndpoint === !1 ? "rest" : "auto",
|
|
@@ -5085,10 +5085,10 @@ const Jp = { style: {
|
|
|
5085
5085
|
() => {
|
|
5086
5086
|
Me.value && (pe(le.value), At(le));
|
|
5087
5087
|
}
|
|
5088
|
-
),
|
|
5088
|
+
), at(() => {
|
|
5089
5089
|
qe(), U.value = le.value.a2uiEnabled, N.value = le.value.openGenerativeUIEnabled, B.value = le.value.licenseStatus, V.value = le.value.runtimeEntitlements, Q.value = le.value.runtimeEntitlementRetryPending, Me.value = !0;
|
|
5090
5090
|
});
|
|
5091
|
-
const wt = c(() => n.a2ui?.theme), St = c(() => n.a2ui?.catalog),
|
|
5091
|
+
const wt = c(() => n.a2ui?.theme), St = c(() => n.a2ui?.catalog), it = c(() => n.a2ui?.loadingComponent), Tt = c(() => n.a2ui?.includeSchema ?? !0);
|
|
5092
5092
|
cp(le, () => q.value), Dp(le, {
|
|
5093
5093
|
enabled: () => q.value,
|
|
5094
5094
|
catalog: () => n.a2ui?.catalog,
|
|
@@ -5137,19 +5137,19 @@ const Jp = { style: {
|
|
|
5137
5137
|
executingToolCallIds: He,
|
|
5138
5138
|
a2uiTheme: wt,
|
|
5139
5139
|
a2uiCatalog: St,
|
|
5140
|
-
a2uiLoadingComponent:
|
|
5140
|
+
a2uiLoadingComponent: it,
|
|
5141
5141
|
a2uiIncludeSchema: Tt
|
|
5142
5142
|
}), Xt(Xa, H);
|
|
5143
|
-
const
|
|
5143
|
+
const tt = c(
|
|
5144
5144
|
() => V.value?.status !== "ready" && V.value?.error.retryable === !0
|
|
5145
5145
|
), Fe = c(
|
|
5146
5146
|
() => V.value !== void 0 && V.value.status !== "ready"
|
|
5147
5147
|
), G = c(
|
|
5148
5148
|
() => B.value === "valid" || B.value === "expiring"
|
|
5149
5149
|
), be = c(
|
|
5150
|
-
() =>
|
|
5150
|
+
() => tt.value && Q.value && !G.value
|
|
5151
5151
|
), je = c(
|
|
5152
|
-
() => Fe.value && !
|
|
5152
|
+
() => Fe.value && !tt.value && !G.value
|
|
5153
5153
|
), kt = c(() => {
|
|
5154
5154
|
const K = ga(
|
|
5155
5155
|
be.value ? void 0 : B.value,
|
|
@@ -5231,9 +5231,9 @@ function ea(e) {
|
|
|
5231
5231
|
return e !== null && typeof e == "object" && Object.prototype.toString.call(e) === "[object Object]";
|
|
5232
5232
|
}
|
|
5233
5233
|
function es(e) {
|
|
5234
|
-
const t = nt(
|
|
5234
|
+
const t = ot(nt(e));
|
|
5235
5235
|
return P(
|
|
5236
|
-
() =>
|
|
5236
|
+
() => nt(e),
|
|
5237
5237
|
(n) => {
|
|
5238
5238
|
const o = t.value;
|
|
5239
5239
|
o !== n && (ea(o) && ea(n) && rf(o, n) || (t.value = n));
|
|
@@ -5448,7 +5448,7 @@ const ns = de({
|
|
|
5448
5448
|
catalog: {}
|
|
5449
5449
|
},
|
|
5450
5450
|
setup(e) {
|
|
5451
|
-
const t = e, { copilotkit: n } =
|
|
5451
|
+
const t = e, { copilotkit: n } = st(), o = ot(null), a = x(0), s = x(null);
|
|
5452
5452
|
let i = "";
|
|
5453
5453
|
function r() {
|
|
5454
5454
|
if (!o.value) {
|
|
@@ -5616,7 +5616,7 @@ const kf = /* @__PURE__ */ de({
|
|
|
5616
5616
|
messages: { default: () => [] }
|
|
5617
5617
|
},
|
|
5618
5618
|
setup(e) {
|
|
5619
|
-
const t = e, { copilotkit: n, executingToolCallIds: o } =
|
|
5619
|
+
const t = e, { copilotkit: n, executingToolCallIds: o } = st(), a = Ke();
|
|
5620
5620
|
function s() {
|
|
5621
5621
|
return vf(
|
|
5622
5622
|
t.toolCall,
|
|
@@ -5682,7 +5682,7 @@ const kf = /* @__PURE__ */ de({
|
|
|
5682
5682
|
});
|
|
5683
5683
|
let oa = !1;
|
|
5684
5684
|
function wf() {
|
|
5685
|
-
|
|
5685
|
+
at(() => {
|
|
5686
5686
|
if (oa || typeof document > "u") return;
|
|
5687
5687
|
oa = !0, import("katex/dist/katex.min.css").catch(() => {
|
|
5688
5688
|
console.warn(
|
|
@@ -5839,11 +5839,11 @@ const Sf = ["data-message-id"], Tf = { class: "cpk:w-full cpk:bg-transparent cpk
|
|
|
5839
5839
|
He && clearTimeout(He), Me.value = !0, He = setTimeout(() => {
|
|
5840
5840
|
Me.value = !1, He = null;
|
|
5841
5841
|
}, 2e3);
|
|
5842
|
-
}, St = () => pe.value ? pe.value.querySelector("table") : null,
|
|
5842
|
+
}, St = () => pe.value ? pe.value.querySelector("table") : null, it = () => {
|
|
5843
5843
|
const Fe = St();
|
|
5844
5844
|
return Fe ? v(Fe) : null;
|
|
5845
5845
|
}, Tt = async (Fe) => {
|
|
5846
|
-
const G =
|
|
5846
|
+
const G = it();
|
|
5847
5847
|
if (!G) return;
|
|
5848
5848
|
const je = g(G, Fe === "csv" ? "," : " ");
|
|
5849
5849
|
if (typeof navigator < "u" && navigator.clipboard?.writeText)
|
|
@@ -5854,21 +5854,21 @@ const Sf = ["data-message-id"], Tf = { class: "cpk:w-full cpk:bg-transparent cpk
|
|
|
5854
5854
|
}
|
|
5855
5855
|
qe(), wt();
|
|
5856
5856
|
}, bt = (Fe) => {
|
|
5857
|
-
const G =
|
|
5857
|
+
const G = it();
|
|
5858
5858
|
G && (Fe === "csv" ? m(
|
|
5859
5859
|
g(G, ","),
|
|
5860
5860
|
"table.csv",
|
|
5861
5861
|
"text/csv"
|
|
5862
5862
|
) : m(d(G), "table.md", "text/markdown"), qe());
|
|
5863
|
-
},
|
|
5863
|
+
}, tt = (Fe) => {
|
|
5864
5864
|
if (!pe.value) return;
|
|
5865
5865
|
const G = Fe.target;
|
|
5866
5866
|
G && !pe.value.contains(G) && qe();
|
|
5867
5867
|
};
|
|
5868
|
-
return
|
|
5869
|
-
typeof document < "u" && document.addEventListener("mousedown",
|
|
5868
|
+
return at(() => {
|
|
5869
|
+
typeof document < "u" && document.addEventListener("mousedown", tt);
|
|
5870
5870
|
}), Ve(() => {
|
|
5871
|
-
He && clearTimeout(He), typeof document < "u" && document.removeEventListener("mousedown",
|
|
5871
|
+
He && clearTimeout(He), typeof document < "u" && document.removeEventListener("mousedown", tt);
|
|
5872
5872
|
}), () => {
|
|
5873
5873
|
const Fe = {
|
|
5874
5874
|
...ce,
|
|
@@ -6445,12 +6445,12 @@ function So(e = {}) {
|
|
|
6445
6445
|
`useAgent: \`runtimeAgentId\` requires an explicit \`agentId\`. The proxied agent is registered under \`agentId\`, and the usual fallbacks (chat configuration, then "${yt}") name agents that already exist — registering over one throws or shadows it. Pick a local id for this hook, e.g. useAgent({ agentId: "chat-1", runtimeAgentId: "assistant", threadId }).`
|
|
6446
6446
|
);
|
|
6447
6447
|
const a = n, s = Ke(), i = c(
|
|
6448
|
-
() =>
|
|
6448
|
+
() => nt(e.agentId) ?? s.value?.agentId ?? yt
|
|
6449
6449
|
), r = c(
|
|
6450
|
-
() => a ?
|
|
6450
|
+
() => a ? nt(e.runtimeAgentId) : void 0
|
|
6451
6451
|
), l = c(
|
|
6452
|
-
() =>
|
|
6453
|
-
), { copilotkit: u } =
|
|
6452
|
+
() => nt(e.threadId) ?? (s.value?.hasExplicitThreadId ? s.value.threadId : void 0)
|
|
6453
|
+
), { copilotkit: u } = st(), p = c(() => e.updates ?? Of), v = c(() => u.value.defaultThrottleMs), g = c(() => nt(e.throttleMs)), d = ot(null), m = ot(null), C = /* @__PURE__ */ new Map(), b = (h, y, R, w) => {
|
|
6454
6454
|
const O = new Ao({
|
|
6455
6455
|
runtimeUrl: y,
|
|
6456
6456
|
agentId: h,
|
|
@@ -6458,7 +6458,7 @@ function So(e = {}) {
|
|
|
6458
6458
|
runtimeMode: "pending"
|
|
6459
6459
|
});
|
|
6460
6460
|
return O.headers = { ...w }, O;
|
|
6461
|
-
}, k =
|
|
6461
|
+
}, k = ot(null);
|
|
6462
6462
|
return a && P(
|
|
6463
6463
|
[i, r, () => u.value],
|
|
6464
6464
|
([h, y], R, w) => {
|
|
@@ -6584,7 +6584,7 @@ function So(e = {}) {
|
|
|
6584
6584
|
const V = u.value.subscribeToAgentWithOptions(
|
|
6585
6585
|
h,
|
|
6586
6586
|
B,
|
|
6587
|
-
{ throttleMs:
|
|
6587
|
+
{ throttleMs: nt(e.throttleMs) }
|
|
6588
6588
|
);
|
|
6589
6589
|
w(() => {
|
|
6590
6590
|
A = !1, V.unsubscribe();
|
|
@@ -6594,8 +6594,8 @@ function So(e = {}) {
|
|
|
6594
6594
|
), { agent: d };
|
|
6595
6595
|
}
|
|
6596
6596
|
function Ff(e = {}) {
|
|
6597
|
-
const { copilotkit: t } =
|
|
6598
|
-
() =>
|
|
6597
|
+
const { copilotkit: t } = st(), n = Ke(), o = c(
|
|
6598
|
+
() => nt(e.agentId) ?? n.value?.agentId ?? yt
|
|
6599
6599
|
), a = x([]), s = x(!1), i = () => {
|
|
6600
6600
|
const u = t.value.getSuggestions(o.value);
|
|
6601
6601
|
a.value = u.suggestions, s.value = u.isLoading;
|
|
@@ -6638,9 +6638,9 @@ function Ff(e = {}) {
|
|
|
6638
6638
|
};
|
|
6639
6639
|
}
|
|
6640
6640
|
function zf(e) {
|
|
6641
|
-
const t =
|
|
6641
|
+
const t = ot([]), n = x(!1), o = x(null), a = x(null), s = x(nt(e.config)), i = ot(t.value), r = c(() => s.value?.enabled ?? !1);
|
|
6642
6642
|
P(
|
|
6643
|
-
() =>
|
|
6643
|
+
() => nt(e.config),
|
|
6644
6644
|
(f) => {
|
|
6645
6645
|
s.value = f;
|
|
6646
6646
|
},
|
|
@@ -6757,7 +6757,7 @@ function zf(e) {
|
|
|
6757
6757
|
const O = w.map((A) => A.getAsFile()).filter((A) => A !== null);
|
|
6758
6758
|
await p(O);
|
|
6759
6759
|
}
|
|
6760
|
-
return
|
|
6760
|
+
return at(() => {
|
|
6761
6761
|
typeof document < "u" && document.addEventListener("paste", k);
|
|
6762
6762
|
}), Ve(() => {
|
|
6763
6763
|
typeof document < "u" && document.removeEventListener("paste", k);
|
|
@@ -6873,7 +6873,7 @@ function Bf() {
|
|
|
6873
6873
|
n.value = p, t.value = v, o.value = u, a.value = l;
|
|
6874
6874
|
};
|
|
6875
6875
|
let i = null;
|
|
6876
|
-
return
|
|
6876
|
+
return at(() => {
|
|
6877
6877
|
typeof window > "u" || (i = window.visualViewport ?? null, i && (s(), i.addEventListener("resize", s), i.addEventListener("scroll", s)));
|
|
6878
6878
|
}), Ve(() => {
|
|
6879
6879
|
i && (i.removeEventListener("resize", s), i.removeEventListener("scroll", s), i = null);
|
|
@@ -7022,7 +7022,7 @@ const Vf = { class: "cpk:pointer-events-auto cpk:mx-auto cpk:max-w-3xl cpk:px-4
|
|
|
7022
7022
|
const S = { ...a };
|
|
7023
7023
|
return delete S.class, S;
|
|
7024
7024
|
});
|
|
7025
|
-
function
|
|
7025
|
+
function it(S) {
|
|
7026
7026
|
return Array.isArray(S.items);
|
|
7027
7027
|
}
|
|
7028
7028
|
function Tt() {
|
|
@@ -7049,12 +7049,12 @@ const Vf = { class: "cpk:pointer-events-auto cpk:mx-auto cpk:max-w-3xl cpk:px-4
|
|
|
7049
7049
|
S.pop();
|
|
7050
7050
|
return S;
|
|
7051
7051
|
}
|
|
7052
|
-
const
|
|
7052
|
+
const tt = c(() => bt()), Fe = c(() => tt.value.length > 0);
|
|
7053
7053
|
function G(S) {
|
|
7054
7054
|
const j = /* @__PURE__ */ new Set(), oe = [], ve = (Ne) => {
|
|
7055
7055
|
for (const xe of Ne)
|
|
7056
7056
|
if (xe !== "-") {
|
|
7057
|
-
if (
|
|
7057
|
+
if (it(xe) && xe.items.length > 0) {
|
|
7058
7058
|
ve(xe.items);
|
|
7059
7059
|
continue;
|
|
7060
7060
|
}
|
|
@@ -7063,7 +7063,7 @@ const Vf = { class: "cpk:pointer-events-auto cpk:mx-auto cpk:max-w-3xl cpk:px-4
|
|
|
7063
7063
|
};
|
|
7064
7064
|
return ve(S), oe;
|
|
7065
7065
|
}
|
|
7066
|
-
const be = c(() => G(
|
|
7066
|
+
const be = c(() => G(tt.value));
|
|
7067
7067
|
function je(S, j = 0, oe = "root") {
|
|
7068
7068
|
const ve = [];
|
|
7069
7069
|
for (const [Ne, xe] of S.entries()) {
|
|
@@ -7072,7 +7072,7 @@ const Vf = { class: "cpk:pointer-events-auto cpk:mx-auto cpk:max-w-3xl cpk:px-4
|
|
|
7072
7072
|
ve.push({ type: "separator", key: `sep-${Ge}` });
|
|
7073
7073
|
continue;
|
|
7074
7074
|
}
|
|
7075
|
-
if (
|
|
7075
|
+
if (it(xe) && xe.items.length > 0) {
|
|
7076
7076
|
ve.push({
|
|
7077
7077
|
type: "label",
|
|
7078
7078
|
key: `label-${Ge}`,
|
|
@@ -7091,7 +7091,7 @@ const Vf = { class: "cpk:pointer-events-auto cpk:mx-auto cpk:max-w-3xl cpk:px-4
|
|
|
7091
7091
|
}
|
|
7092
7092
|
return ve;
|
|
7093
7093
|
}
|
|
7094
|
-
const kt = c(() => je(
|
|
7094
|
+
const kt = c(() => je(tt.value)), Ze = c(() => {
|
|
7095
7095
|
if (k.value === null || be.value.length === 0)
|
|
7096
7096
|
return [];
|
|
7097
7097
|
const S = k.value.trim().toLowerCase();
|
|
@@ -7398,7 +7398,7 @@ const Vf = { class: "cpk:pointer-events-auto cpk:mx-auto cpk:max-w-3xl cpk:px-4
|
|
|
7398
7398
|
(S) => {
|
|
7399
7399
|
S && Je();
|
|
7400
7400
|
}
|
|
7401
|
-
),
|
|
7401
|
+
), at(() => {
|
|
7402
7402
|
if (n.autoFocus && n.mode === "input" && r.value?.focus(), ge(), typeof ResizeObserver < "u") {
|
|
7403
7403
|
const S = /* @__PURE__ */ new Set();
|
|
7404
7404
|
l.value && S.add(l.value), u.value && S.add(u.value), p.value && S.add(p.value), V = new ResizeObserver((j) => {
|
|
@@ -8292,7 +8292,7 @@ const Vf = { class: "cpk:pointer-events-auto cpk:mx-auto cpk:max-w-3xl cpk:px-4
|
|
|
8292
8292
|
isRunning: { type: Boolean, default: !1 }
|
|
8293
8293
|
},
|
|
8294
8294
|
setup(e) {
|
|
8295
|
-
const t = e, { copilotkit: n } =
|
|
8295
|
+
const t = e, { copilotkit: n } = st(), o = Ke(), a = x(0), s = x(null), i = En(), r = c(() => Object.keys(i)), l = c(
|
|
8296
8296
|
() => o.value?.agentId ?? yt
|
|
8297
8297
|
), u = c(() => (n.value.agents, n.value.getAgent(l.value)));
|
|
8298
8298
|
P(
|
|
@@ -8360,7 +8360,7 @@ const Vf = { class: "cpk:pointer-events-auto cpk:mx-auto cpk:max-w-3xl cpk:px-4
|
|
|
8360
8360
|
), g = $s(), d = c(
|
|
8361
8361
|
() => _s(g, v.value)
|
|
8362
8362
|
);
|
|
8363
|
-
|
|
8363
|
+
at(() => Io(g, v.value)), P(
|
|
8364
8364
|
v,
|
|
8365
8365
|
(w) => Io(g, w),
|
|
8366
8366
|
{ flush: "post" }
|
|
@@ -8811,7 +8811,7 @@ const cg = {
|
|
|
8811
8811
|
function St() {
|
|
8812
8812
|
o("finish-transcribe");
|
|
8813
8813
|
}
|
|
8814
|
-
async function
|
|
8814
|
+
async function it(G) {
|
|
8815
8815
|
await n.onFinishTranscribeWithAudio?.(G);
|
|
8816
8816
|
}
|
|
8817
8817
|
const Tt = c(() => {
|
|
@@ -8819,9 +8819,9 @@ const cg = {
|
|
|
8819
8819
|
"onUpdate:modelValue": z,
|
|
8820
8820
|
onSubmitMessage: n.onSubmitMessage ? ce : void 0
|
|
8821
8821
|
};
|
|
8822
|
-
return n.onStop && (G.onStop = ee), n.onAddFile && (G.onAddFile = we), n.onStartTranscribe && (G.onStartTranscribe = qe), n.onCancelTranscribe && (G.onCancelTranscribe = wt), n.onFinishTranscribe && (G.onFinishTranscribe = St), n.onFinishTranscribeWithAudio && (G.onFinishTranscribeWithAudio =
|
|
8823
|
-
}), bt = c(() => !!n.onStop),
|
|
8824
|
-
return
|
|
8822
|
+
return n.onStop && (G.onStop = ee), n.onAddFile && (G.onAddFile = we), n.onStartTranscribe && (G.onStartTranscribe = qe), n.onCancelTranscribe && (G.onCancelTranscribe = wt), n.onFinishTranscribe && (G.onFinishTranscribe = St), n.onFinishTranscribeWithAudio && (G.onFinishTranscribeWithAudio = it), G;
|
|
8823
|
+
}), bt = c(() => !!n.onStop), tt = c(() => !!n.onAddFile), Fe = c(() => !!n.onStartTranscribe);
|
|
8824
|
+
return at(async () => {
|
|
8825
8825
|
await Nt(), L(), q(), b.value && (H("auto"), typeof requestAnimationFrame == "function" && requestAnimationFrame(() => {
|
|
8826
8826
|
H("auto");
|
|
8827
8827
|
})), F(), M();
|
|
@@ -8849,7 +8849,7 @@ const cg = {
|
|
|
8849
8849
|
inputMode: e.inputMode,
|
|
8850
8850
|
inputToolsMenu: e.inputToolsMenu,
|
|
8851
8851
|
canStop: bt.value,
|
|
8852
|
-
canAddFile:
|
|
8852
|
+
canAddFile: tt.value,
|
|
8853
8853
|
canTranscribe: Fe.value,
|
|
8854
8854
|
onUpdateModelValue: z,
|
|
8855
8855
|
onSubmitMessage: ce,
|
|
@@ -8858,7 +8858,7 @@ const cg = {
|
|
|
8858
8858
|
onStartTranscribe: qe,
|
|
8859
8859
|
onCancelTranscribe: wt,
|
|
8860
8860
|
onFinishTranscribe: St,
|
|
8861
|
-
onFinishTranscribeWithAudio:
|
|
8861
|
+
onFinishTranscribeWithAudio: it,
|
|
8862
8862
|
onSelectSuggestion: pe
|
|
8863
8863
|
}, () => [
|
|
8864
8864
|
D("div", ug, [
|
|
@@ -8882,7 +8882,7 @@ const cg = {
|
|
|
8882
8882
|
inputToolsMenu: e.inputToolsMenu,
|
|
8883
8883
|
attachments: e.attachments ?? [],
|
|
8884
8884
|
canStop: bt.value,
|
|
8885
|
-
canAddFile:
|
|
8885
|
+
canAddFile: tt.value,
|
|
8886
8886
|
canTranscribe: Fe.value,
|
|
8887
8887
|
onUpdateModelValue: z,
|
|
8888
8888
|
onSubmitMessage: ce,
|
|
@@ -8891,7 +8891,7 @@ const cg = {
|
|
|
8891
8891
|
onStartTranscribe: qe,
|
|
8892
8892
|
onCancelTranscribe: wt,
|
|
8893
8893
|
onFinishTranscribe: St,
|
|
8894
|
-
onFinishTranscribeWithAudio:
|
|
8894
|
+
onFinishTranscribeWithAudio: it
|
|
8895
8895
|
}, () => [
|
|
8896
8896
|
ue($n, Se({
|
|
8897
8897
|
"model-value": R.value,
|
|
@@ -9030,7 +9030,7 @@ const cg = {
|
|
|
9030
9030
|
inputToolsMenu: e.inputToolsMenu,
|
|
9031
9031
|
attachments: e.attachments ?? [],
|
|
9032
9032
|
canStop: bt.value,
|
|
9033
|
-
canAddFile:
|
|
9033
|
+
canAddFile: tt.value,
|
|
9034
9034
|
canTranscribe: Fe.value,
|
|
9035
9035
|
onUpdateModelValue: z,
|
|
9036
9036
|
onSubmitMessage: ce,
|
|
@@ -9039,7 +9039,7 @@ const cg = {
|
|
|
9039
9039
|
onStartTranscribe: qe,
|
|
9040
9040
|
onCancelTranscribe: wt,
|
|
9041
9041
|
onFinishTranscribe: St,
|
|
9042
|
-
onFinishTranscribeWithAudio:
|
|
9042
|
+
onFinishTranscribeWithAudio: it
|
|
9043
9043
|
}, () => [
|
|
9044
9044
|
ue($n, Se({
|
|
9045
9045
|
"model-value": R.value,
|
|
@@ -9126,9 +9126,9 @@ const Tg = ["accept"], Cg = {
|
|
|
9126
9126
|
},
|
|
9127
9127
|
emits: ["submit-message", "stop", "input-change", "select-suggestion", "add-file", "start-transcribe", "cancel-transcribe", "finish-transcribe"],
|
|
9128
9128
|
setup(e, { emit: t }) {
|
|
9129
|
-
const n = e, o = t, a = It(), s = En(), i = Ke(), { copilotkit: r } =
|
|
9129
|
+
const n = e, o = t, a = It(), s = En(), i = Ke(), { copilotkit: r } = st(), l = c(
|
|
9130
9130
|
() => Object.keys(s).filter((J) => J !== "chat-view")
|
|
9131
|
-
), u = x(Dt()), p = x("input"), v = x(n.inputValue ?? ""), g = x(null), d = x(!1), m = x(!1), C = x(!1), b =
|
|
9131
|
+
), u = x(Dt()), p = x("input"), v = x(n.inputValue ?? ""), g = x(null), d = x(!1), m = x(!1), C = x(!1), b = ot(null);
|
|
9132
9132
|
let k = null;
|
|
9133
9133
|
const f = /* @__PURE__ */ new WeakMap();
|
|
9134
9134
|
let h = Promise.resolve();
|
|
@@ -9177,10 +9177,10 @@ const Tg = ["accept"], Cg = {
|
|
|
9177
9177
|
fileInputRef: qe,
|
|
9178
9178
|
containerRef: wt,
|
|
9179
9179
|
handleFileUpload: St,
|
|
9180
|
-
handleDragOver:
|
|
9180
|
+
handleDragOver: it,
|
|
9181
9181
|
handleDragLeave: Tt,
|
|
9182
9182
|
handleDrop: bt,
|
|
9183
|
-
removeAttachment:
|
|
9183
|
+
removeAttachment: tt,
|
|
9184
9184
|
consumeAttachments: Fe
|
|
9185
9185
|
} = zf({
|
|
9186
9186
|
config: c(() => n.attachments)
|
|
@@ -9368,7 +9368,7 @@ const Tg = ["accept"], Cg = {
|
|
|
9368
9368
|
{ immediate: !0 }
|
|
9369
9369
|
), Ve(() => {
|
|
9370
9370
|
C.value = !0;
|
|
9371
|
-
}),
|
|
9371
|
+
}), at(() => {
|
|
9372
9372
|
m.value = !0;
|
|
9373
9373
|
}), P(g, (J, ge, ne) => {
|
|
9374
9374
|
if (!J)
|
|
@@ -9526,9 +9526,9 @@ const Tg = ["accept"], Cg = {
|
|
|
9526
9526
|
onStop: Le,
|
|
9527
9527
|
onInputChange: Je,
|
|
9528
9528
|
onSelectSuggestion: rt,
|
|
9529
|
-
onRemoveAttachment:
|
|
9529
|
+
onRemoveAttachment: tt,
|
|
9530
9530
|
onAddFile: lt,
|
|
9531
|
-
onDragOver: Me.value ?
|
|
9531
|
+
onDragOver: Me.value ? it : void 0,
|
|
9532
9532
|
onDragLeave: Me.value ? Tt : void 0,
|
|
9533
9533
|
onDrop: Me.value ? bt : void 0,
|
|
9534
9534
|
onStartTranscribe: Ye,
|
|
@@ -9542,7 +9542,7 @@ const Tg = ["accept"], Cg = {
|
|
|
9542
9542
|
onInputChange: Je,
|
|
9543
9543
|
onSelectSuggestion: rt
|
|
9544
9544
|
};
|
|
9545
|
-
return Ze.value && (J.onStop = Le), Me.value && (J.onAddFile = lt, J.attachments = le.value, J.onRemoveAttachment =
|
|
9545
|
+
return Ze.value && (J.onStop = Le), Me.value && (J.onAddFile = lt, J.attachments = le.value, J.onRemoveAttachment = tt, J.dragOver = He.value, J.onDragOver = it, J.onDragLeave = Tt, J.onDrop = bt), we.value && (J.onStartTranscribe = Ye, J.onCancelTranscribe = _t, J.onFinishTranscribe = Mt), J;
|
|
9546
9546
|
});
|
|
9547
9547
|
return (J, ge) => (_(), Te(ko, {
|
|
9548
9548
|
"agent-id": R.value,
|
|
@@ -9673,11 +9673,11 @@ function Pt(e, t, n) {
|
|
|
9673
9673
|
un(() => o.unsubscribe());
|
|
9674
9674
|
}
|
|
9675
9675
|
function Eg(e) {
|
|
9676
|
-
const { copilotkit: t } =
|
|
9676
|
+
const { copilotkit: t } = st(), n = Ls({
|
|
9677
9677
|
fetch: t.value.ɵruntimeFetch
|
|
9678
|
-
}), o = c(() =>
|
|
9679
|
-
() =>
|
|
9680
|
-
), s = c(() =>
|
|
9678
|
+
}), o = c(() => nt(e.agentId)), a = c(
|
|
9679
|
+
() => nt(e.includeArchived)
|
|
9680
|
+
), s = c(() => nt(e.limit)), i = c(() => nt(e.enabled) ?? !0), r = c(
|
|
9681
9681
|
() => t.value.threadEndpoints?.list !== !1
|
|
9682
9682
|
), l = c(
|
|
9683
9683
|
() => t.value.threadEndpoints?.mutations !== !1
|
|
@@ -9855,7 +9855,7 @@ const ca = "copilot-chat-input-textarea", Mg = "copilot-chat-view", Bv = /* @__P
|
|
|
9855
9855
|
const C = c(
|
|
9856
9856
|
() => d.threads.value.map(m)
|
|
9857
9857
|
), b = x(!1), k = x(null), f = x(null);
|
|
9858
|
-
|
|
9858
|
+
at(async () => {
|
|
9859
9859
|
const L = await import("@copilotkit/web-components/threads-drawer");
|
|
9860
9860
|
L.defineCopilotKitThreadsDrawer(), k.value = L.COPILOTKIT_THREADS_DRAWER_TAG, b.value = !0;
|
|
9861
9861
|
}), ks(
|
|
@@ -10163,7 +10163,7 @@ const ca = "copilot-chat-input-textarea", Mg = "copilot-chat-view", Bv = /* @__P
|
|
|
10163
10163
|
function p() {
|
|
10164
10164
|
u && (l.value = u.matches);
|
|
10165
10165
|
}
|
|
10166
|
-
|
|
10166
|
+
at(() => {
|
|
10167
10167
|
typeof window > "u" || typeof window.matchMedia != "function" || (u = window.matchMedia(ts), u.addEventListener("change", p), p());
|
|
10168
10168
|
}), Ve(() => {
|
|
10169
10169
|
u?.removeEventListener("change", p), u = null;
|
|
@@ -10386,7 +10386,7 @@ const ca = "copilot-chat-input-textarea", Mg = "copilot-chat-view", Bv = /* @__P
|
|
|
10386
10386
|
});
|
|
10387
10387
|
},
|
|
10388
10388
|
{ immediate: !0 }
|
|
10389
|
-
),
|
|
10389
|
+
), at(async () => {
|
|
10390
10390
|
await Nt();
|
|
10391
10391
|
}), Ve(() => {
|
|
10392
10392
|
u && clearTimeout(u), p && clearTimeout(p);
|
|
@@ -10875,7 +10875,7 @@ const ca = "copilot-chat-input-textarea", Mg = "copilot-chat-view", Bv = /* @__P
|
|
|
10875
10875
|
}
|
|
10876
10876
|
f();
|
|
10877
10877
|
}
|
|
10878
|
-
),
|
|
10878
|
+
), at(async () => {
|
|
10879
10879
|
await Nt(), f(), !(n.width !== void 0 || !i.value || typeof ResizeObserver > "u") && (l = new ResizeObserver(() => {
|
|
10880
10880
|
f();
|
|
10881
10881
|
}), l.observe(i.value));
|
|
@@ -11538,7 +11538,7 @@ const ca = "copilot-chat-input-textarea", Mg = "copilot-chat-view", Bv = /* @__P
|
|
|
11538
11538
|
WelcomeScreen: ps
|
|
11539
11539
|
});
|
|
11540
11540
|
function Kv(e) {
|
|
11541
|
-
const { copilotkit: t } =
|
|
11541
|
+
const { copilotkit: t } = st(), n = c(() => nt(e.description)), o = c(() => nt(e.value)), a = c(
|
|
11542
11542
|
() => typeof o.value == "string" ? o.value : JSON.stringify(o.value)
|
|
11543
11543
|
);
|
|
11544
11544
|
P(
|
|
@@ -11555,7 +11555,7 @@ function Kv(e) {
|
|
|
11555
11555
|
}
|
|
11556
11556
|
const lv = [];
|
|
11557
11557
|
function fs(e, t) {
|
|
11558
|
-
const { copilotkit: n } =
|
|
11558
|
+
const { copilotkit: n } = st(), o = t ?? lv;
|
|
11559
11559
|
P(
|
|
11560
11560
|
[
|
|
11561
11561
|
() => e.name,
|
|
@@ -11605,7 +11605,7 @@ ${e.description}` : n;
|
|
|
11605
11605
|
}
|
|
11606
11606
|
const cv = [];
|
|
11607
11607
|
function uv(e, t) {
|
|
11608
|
-
const { copilotkit: n } =
|
|
11608
|
+
const { copilotkit: n } = st(), o = t ?? cv;
|
|
11609
11609
|
P(
|
|
11610
11610
|
[
|
|
11611
11611
|
() => n.value,
|
|
@@ -11858,7 +11858,7 @@ function Jv(e, t) {
|
|
|
11858
11858
|
);
|
|
11859
11859
|
}
|
|
11860
11860
|
function Xv(e, t) {
|
|
11861
|
-
const { copilotkit: n } =
|
|
11861
|
+
const { copilotkit: n } = st(), o = x(null), a = x(null), s = x(null), i = async (p) => {
|
|
11862
11862
|
o.value && (s.value?.(), s.value = null, o.value(p), o.value = null, a.value = null);
|
|
11863
11863
|
}, u = {
|
|
11864
11864
|
...e,
|
|
@@ -11919,7 +11919,7 @@ function mv(e) {
|
|
|
11919
11919
|
}));
|
|
11920
11920
|
}
|
|
11921
11921
|
function Yv(e, t) {
|
|
11922
|
-
const { copilotkit: n } =
|
|
11922
|
+
const { copilotkit: n } = st(), o = Ke(), a = t ?? [], s = c(
|
|
11923
11923
|
() => o.value?.agentId ?? yt
|
|
11924
11924
|
), i = c(
|
|
11925
11925
|
() => e ? e.consumerAgentId : void 0
|
|
@@ -12041,7 +12041,7 @@ function Kn(e) {
|
|
|
12041
12041
|
return e.kind === "legacy" ? e.event : { name: ms, value: e.interrupts[0] };
|
|
12042
12042
|
}
|
|
12043
12043
|
function Qv(e = {}) {
|
|
12044
|
-
const { copilotkit: t } =
|
|
12044
|
+
const { copilotkit: t } = st(), { agent: n } = So({ agentId: e.agentId }), o = ot(null), a = ot(null), s = {};
|
|
12045
12045
|
P(
|
|
12046
12046
|
n,
|
|
12047
12047
|
(d, m, C) => {
|
|
@@ -12239,7 +12239,7 @@ function eh(e) {
|
|
|
12239
12239
|
});
|
|
12240
12240
|
}
|
|
12241
12241
|
function th() {
|
|
12242
|
-
const { copilotkit: e } =
|
|
12242
|
+
const { copilotkit: e } = st(), t = Ke();
|
|
12243
12243
|
return function(o) {
|
|
12244
12244
|
const a = t.value;
|
|
12245
12245
|
if (!a) return null;
|
|
@@ -12282,7 +12282,7 @@ function th() {
|
|
|
12282
12282
|
};
|
|
12283
12283
|
}
|
|
12284
12284
|
function nh() {
|
|
12285
|
-
const { copilotkit: e } =
|
|
12285
|
+
const { copilotkit: e } = st(), t = Ke(), n = c(() => t.value?.agentId ?? yt), o = c(() => [
|
|
12286
12286
|
...e.value.renderActivityMessages
|
|
12287
12287
|
]);
|
|
12288
12288
|
function a(i) {
|
|
@@ -12459,7 +12459,7 @@ export {
|
|
|
12459
12459
|
qv as bu,
|
|
12460
12460
|
Yv as bv,
|
|
12461
12461
|
Ke as bw,
|
|
12462
|
-
|
|
12462
|
+
st as bx,
|
|
12463
12463
|
Jv as by,
|
|
12464
12464
|
fs as bz,
|
|
12465
12465
|
cd as c,
|
|
@@ -12487,4 +12487,4 @@ export {
|
|
|
12487
12487
|
ss as y,
|
|
12488
12488
|
is as z
|
|
12489
12489
|
};
|
|
12490
|
-
//# sourceMappingURL=use-render-activity-message-
|
|
12490
|
+
//# sourceMappingURL=use-render-activity-message-B9MOLfR_.js.map
|