@camunda/copilot-chat 0.5.10 → 0.5.11
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.js +115 -110
- package/dist/package.json +1 -1
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -660,7 +660,7 @@ function Ps(e) {
|
|
|
660
660
|
setTimeout(e, 0);
|
|
661
661
|
}
|
|
662
662
|
var et = typeof window > "u" || "Deno" in globalThis;
|
|
663
|
-
function
|
|
663
|
+
function ae() {
|
|
664
664
|
}
|
|
665
665
|
function Ns(e, t) {
|
|
666
666
|
return typeof e == "function" ? e(t) : e;
|
|
@@ -1096,7 +1096,7 @@ var Ja = class {
|
|
|
1096
1096
|
}
|
|
1097
1097
|
cancel(e) {
|
|
1098
1098
|
const t = this.#n?.promise;
|
|
1099
|
-
return this.#n?.cancel(e), t ? t.then(
|
|
1099
|
+
return this.#n?.cancel(e), t ? t.then(ae).catch(ae) : Promise.resolve();
|
|
1100
1100
|
}
|
|
1101
1101
|
destroy() {
|
|
1102
1102
|
super.destroy(), this.cancel({ silent: !0 });
|
|
@@ -1748,7 +1748,7 @@ var oo = class extends Ae {
|
|
|
1748
1748
|
const e = this.getAll().filter((t) => t.state.isPaused);
|
|
1749
1749
|
return K.batch(
|
|
1750
1750
|
() => Promise.all(
|
|
1751
|
-
e.map((t) => t.continue().catch(
|
|
1751
|
+
e.map((t) => t.continue().catch(ae))
|
|
1752
1752
|
)
|
|
1753
1753
|
);
|
|
1754
1754
|
}
|
|
@@ -2026,7 +2026,7 @@ var io = class extends Ae {
|
|
|
2026
2026
|
const n = { revert: !0, ...t }, s = K.batch(
|
|
2027
2027
|
() => this.#e.findAll(e).map((a) => a.cancel(n))
|
|
2028
2028
|
);
|
|
2029
|
-
return Promise.all(s).then(
|
|
2029
|
+
return Promise.all(s).then(ae).catch(ae);
|
|
2030
2030
|
}
|
|
2031
2031
|
invalidateQueries(e, t = {}) {
|
|
2032
2032
|
return K.batch(() => (this.#e.findAll(e).forEach((n) => {
|
|
@@ -2046,10 +2046,10 @@ var io = class extends Ae {
|
|
|
2046
2046
|
}, s = K.batch(
|
|
2047
2047
|
() => this.#e.findAll(e).filter((a) => !a.isDisabled() && !a.isStatic()).map((a) => {
|
|
2048
2048
|
let o = a.fetch(void 0, n);
|
|
2049
|
-
return n.throwOnError || (o = o.catch(
|
|
2049
|
+
return n.throwOnError || (o = o.catch(ae)), a.state.fetchStatus === "paused" ? Promise.resolve() : o;
|
|
2050
2050
|
})
|
|
2051
2051
|
);
|
|
2052
|
-
return Promise.all(s).then(
|
|
2052
|
+
return Promise.all(s).then(ae);
|
|
2053
2053
|
}
|
|
2054
2054
|
fetchQuery(e) {
|
|
2055
2055
|
const t = this.defaultQueryOptions(e);
|
|
@@ -2060,13 +2060,13 @@ var io = class extends Ae {
|
|
|
2060
2060
|
) ? n.fetch(t) : Promise.resolve(n.state.data);
|
|
2061
2061
|
}
|
|
2062
2062
|
prefetchQuery(e) {
|
|
2063
|
-
return this.fetchQuery(e).then(
|
|
2063
|
+
return this.fetchQuery(e).then(ae).catch(ae);
|
|
2064
2064
|
}
|
|
2065
2065
|
fetchInfiniteQuery(e) {
|
|
2066
2066
|
return e.behavior = Yt(e.pages), this.fetchQuery(e);
|
|
2067
2067
|
}
|
|
2068
2068
|
prefetchInfiniteQuery(e) {
|
|
2069
|
-
return this.fetchInfiniteQuery(e).then(
|
|
2069
|
+
return this.fetchInfiniteQuery(e).then(ae).catch(ae);
|
|
2070
2070
|
}
|
|
2071
2071
|
ensureInfiniteQueryData(e) {
|
|
2072
2072
|
return e.behavior = Yt(e.pages), this.ensureQueryData(e);
|
|
@@ -2167,7 +2167,7 @@ function ho(e, t) {
|
|
|
2167
2167
|
() => s.getCurrentResult()
|
|
2168
2168
|
), o = L.useCallback(
|
|
2169
2169
|
(i, r) => {
|
|
2170
|
-
s.mutate(i, r).catch(
|
|
2170
|
+
s.mutate(i, r).catch(ae);
|
|
2171
2171
|
},
|
|
2172
2172
|
[s]
|
|
2173
2173
|
);
|
|
@@ -3039,7 +3039,7 @@ var ca = "kapa_web_id", $o = (e) => {
|
|
|
3039
3039
|
return { identifiers: g, metadata: y };
|
|
3040
3040
|
}, [o, a])
|
|
3041
3041
|
};
|
|
3042
|
-
},
|
|
3042
|
+
}, re = class cn extends Array {
|
|
3043
3043
|
constructor(...t) {
|
|
3044
3044
|
super(...t), Object.setPrototypeOf(this, cn.prototype);
|
|
3045
3045
|
}
|
|
@@ -3142,7 +3142,7 @@ function Xo(e, t) {
|
|
|
3142
3142
|
reaction: null,
|
|
3143
3143
|
isFeedbackSubmissionEnabled: !1,
|
|
3144
3144
|
status: "streaming"
|
|
3145
|
-
}, o = new
|
|
3145
|
+
}, o = new re(...e.conversation, a);
|
|
3146
3146
|
return {
|
|
3147
3147
|
...e,
|
|
3148
3148
|
conversation: o,
|
|
@@ -3151,7 +3151,7 @@ function Xo(e, t) {
|
|
|
3151
3151
|
};
|
|
3152
3152
|
}
|
|
3153
3153
|
case "SET_IDENTIFIERS": {
|
|
3154
|
-
const a = new
|
|
3154
|
+
const a = new re(...e.conversation);
|
|
3155
3155
|
return a.setLatest({
|
|
3156
3156
|
id: t.questionAnswerId,
|
|
3157
3157
|
isFeedbackSubmissionEnabled: !0,
|
|
@@ -3165,7 +3165,7 @@ function Xo(e, t) {
|
|
|
3165
3165
|
case "SET_RELEVANT_SOURCES": {
|
|
3166
3166
|
const a = e.conversation.getLatest();
|
|
3167
3167
|
if (a) {
|
|
3168
|
-
const o = Wo(a.answer, t.sources), i = Qo(o), r = new
|
|
3168
|
+
const o = Wo(a.answer, t.sources), i = Qo(o), r = new re(...e.conversation);
|
|
3169
3169
|
return r.setLatest({ sources: i }), {
|
|
3170
3170
|
...e,
|
|
3171
3171
|
conversation: r
|
|
@@ -3174,14 +3174,14 @@ function Xo(e, t) {
|
|
|
3174
3174
|
return console.error("Conversation is empty in order to set relevant sources"), e;
|
|
3175
3175
|
}
|
|
3176
3176
|
case "SET_PARTIAL_ANSWER": {
|
|
3177
|
-
const a = new
|
|
3177
|
+
const a = new re(...e.conversation), o = (s = (n = a.getLatest()) == null ? void 0 : n.answer) != null ? s : "";
|
|
3178
3178
|
return a.setLatest({ answer: o + t.answer }), {
|
|
3179
3179
|
...e,
|
|
3180
3180
|
conversation: a
|
|
3181
3181
|
};
|
|
3182
3182
|
}
|
|
3183
3183
|
case "SET_METADATA": {
|
|
3184
|
-
const a = new
|
|
3184
|
+
const a = new re(...e.conversation);
|
|
3185
3185
|
return a.setLatest({ metadata: t.metadata }), {
|
|
3186
3186
|
...e,
|
|
3187
3187
|
conversation: a
|
|
@@ -3201,7 +3201,7 @@ function Xo(e, t) {
|
|
|
3201
3201
|
isGenerating: t.isGenerating
|
|
3202
3202
|
};
|
|
3203
3203
|
case "STOP_GENERATION": {
|
|
3204
|
-
const a = new
|
|
3204
|
+
const a = new re(...e.conversation);
|
|
3205
3205
|
return a.setLatest({ isGenerationAborted: !0 }), {
|
|
3206
3206
|
...e,
|
|
3207
3207
|
conversation: a,
|
|
@@ -3212,19 +3212,19 @@ function Xo(e, t) {
|
|
|
3212
3212
|
case "RESET_CONVERSATION":
|
|
3213
3213
|
return {
|
|
3214
3214
|
...e,
|
|
3215
|
-
conversation: new
|
|
3215
|
+
conversation: new re(),
|
|
3216
3216
|
threadId: null,
|
|
3217
3217
|
error: null
|
|
3218
3218
|
};
|
|
3219
3219
|
case "SET_FEEDBACK": {
|
|
3220
|
-
const a = new
|
|
3220
|
+
const a = new re(...e.conversation), o = a.getById(t.questionAnswerId);
|
|
3221
3221
|
return o && (o.reaction = t.reaction), {
|
|
3222
3222
|
...e,
|
|
3223
3223
|
conversation: a
|
|
3224
3224
|
};
|
|
3225
3225
|
}
|
|
3226
3226
|
case "MARK_COMPLETED": {
|
|
3227
|
-
const a = new
|
|
3227
|
+
const a = new re(...e.conversation);
|
|
3228
3228
|
return a.setById(t.questionAnswerId, { status: "completed" }), {
|
|
3229
3229
|
...e,
|
|
3230
3230
|
conversation: a
|
|
@@ -3247,7 +3247,7 @@ var Jo = "MHIUVE6Y4VV6H5lpgMyI", un = L.createContext(void 0), la = ({
|
|
|
3247
3247
|
isGenerating: !1,
|
|
3248
3248
|
isPreparing: !1,
|
|
3249
3249
|
threadId: null,
|
|
3250
|
-
conversation: new
|
|
3250
|
+
conversation: new re(),
|
|
3251
3251
|
error: null
|
|
3252
3252
|
}, u = Cn(sn), [d, p] = L.useReducer(Xo, l), { executeCaptcha: m } = Po(), { buildIdentifiers: g } = $o({
|
|
3253
3253
|
mode: a
|
|
@@ -3781,7 +3781,7 @@ const ti = "_inputContainer_1e19u_9", ai = "_textArea_1e19u_18", ni = "_actionBu
|
|
|
3781
3781
|
}
|
|
3782
3782
|
o.current = e.length, i.current = e[0]?.id, r.current = e[e.length - 1]?.id, c.current = m?.scrollHeight ?? 0;
|
|
3783
3783
|
}, [e, t, n]);
|
|
3784
|
-
}, Li = "_container_1ou6v_9", Pi = "_status_1ou6v_17", Ni = "_dot_1ou6v_23", qi = "_dotPast_1ou6v_30", Di = "_dotCurrent_1ou6v_34", Bi = "_label_1ou6v_38", Fi = "_action_1ou6v_44", Ui = "_actionHidden_1ou6v_49",
|
|
3784
|
+
}, Li = "_container_1ou6v_9", Pi = "_status_1ou6v_17", Ni = "_dot_1ou6v_23", qi = "_dotPast_1ou6v_30", Di = "_dotCurrent_1ou6v_34", Bi = "_label_1ou6v_38", Fi = "_action_1ou6v_44", Ui = "_actionHidden_1ou6v_49", ie = {
|
|
3785
3785
|
container: Li,
|
|
3786
3786
|
status: Pi,
|
|
3787
3787
|
dot: Ni,
|
|
@@ -3795,17 +3795,17 @@ const ti = "_inputContainer_1e19u_9", ai = "_textArea_1e19u_18", ni = "_actionBu
|
|
|
3795
3795
|
variant: t = "past",
|
|
3796
3796
|
onRollback: n,
|
|
3797
3797
|
onSeeVersion: s
|
|
3798
|
-
}) => /* @__PURE__ */ T("div", { className:
|
|
3799
|
-
/* @__PURE__ */ T("span", { className:
|
|
3800
|
-
/* @__PURE__ */ h("span", { className: `${
|
|
3801
|
-
/* @__PURE__ */ h("span", { className:
|
|
3798
|
+
}) => /* @__PURE__ */ T("div", { className: ie.container, children: [
|
|
3799
|
+
/* @__PURE__ */ T("span", { className: ie.status, children: [
|
|
3800
|
+
/* @__PURE__ */ h("span", { className: `${ie.dot} ${t === "current" ? ie.dotCurrent : ie.dotPast}` }),
|
|
3801
|
+
/* @__PURE__ */ h("span", { className: ie.label, children: "Version created" })
|
|
3802
3802
|
] }),
|
|
3803
3803
|
/* @__PURE__ */ h(
|
|
3804
3804
|
fe,
|
|
3805
3805
|
{
|
|
3806
3806
|
kind: "ghost",
|
|
3807
3807
|
size: "xs",
|
|
3808
|
-
className: `${
|
|
3808
|
+
className: `${ie.action} ${s ? "" : ie.actionHidden}`,
|
|
3809
3809
|
onClick: s ? () => s(e) : void 0,
|
|
3810
3810
|
"aria-hidden": !s,
|
|
3811
3811
|
tabIndex: s ? void 0 : -1,
|
|
@@ -3818,7 +3818,7 @@ const ti = "_inputContainer_1e19u_9", ai = "_textArea_1e19u_18", ni = "_actionBu
|
|
|
3818
3818
|
{
|
|
3819
3819
|
kind: "ghost",
|
|
3820
3820
|
size: "xs",
|
|
3821
|
-
className: `${
|
|
3821
|
+
className: `${ie.action} ${n ? "" : ie.actionHidden}`,
|
|
3822
3822
|
onClick: n ? () => n(e) : void 0,
|
|
3823
3823
|
"aria-hidden": !n,
|
|
3824
3824
|
tabIndex: n ? void 0 : -1,
|
|
@@ -3918,7 +3918,7 @@ const ti = "_inputContainer_1e19u_9", ai = "_textArea_1e19u_18", ni = "_actionBu
|
|
|
3918
3918
|
],
|
|
3919
3919
|
name: "history",
|
|
3920
3920
|
size: 16
|
|
3921
|
-
}, pn = ({ icon: e }) => /* @__PURE__ */ h("svg", { ...e.attrs, "aria-hidden": !0, focusable: !1, children: e.content.map((t, n) => /* @__PURE__ */ h("path", { ...t.attrs }, n)) }), er = "data:image/svg+xml,%3csvg%20width='17'%20height='15'%20viewBox='0%200%2017%2015'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3cpath%20fill-rule='evenodd'%20clip-rule='evenodd'%20d='M9.7219%205.2691C8.6668%204.2126%207.7435%202.4757%207.0638%201.00772C7.0445%201.00316%207.0206%201%206.9941%201C6.9675%201%206.9436%201.00316%206.9243%201.00773C6.2447%202.4757%205.322%204.2122%204.2662%205.2687C3.2106%206.325%201.47501%207.2485%200.00802994%207.9287C0.00328994%207.9483%200%207.9728%200%208C0%208.0271%200.00324982%208.0515%200.00793982%208.071C1.47467%208.751%203.2101%209.6743%204.2659%2010.7311C5.322%2011.7875%206.2448%2013.5244%206.9245%2014.9923C6.9437%2014.9969%206.9675%2015%206.994%2015C7.0205%2015%207.0444%2014.9968%207.0636%2014.9923C7.7433%2013.5244%208.666%2011.7877%209.7215%2010.7315M9.7215%2010.7315C10.773%209.6791%2012.4531%208.7468%2013.8721%208.0577C13.8756%208.0415%2013.878%208.0217%2013.878%207.9998C13.878%207.9779%2013.8756%207.9582%2013.8721%207.942C12.4537%207.2529%2010.7734%206.3207%209.7219%205.2691'%20fill='%238a3ffc'/%3e%3cpath%20fill-rule='evenodd'%20clip-rule='evenodd'%20d='M15.4808%201.52468C15.104%201.14737%2014.7742%200.52704%2014.5315%200.00275993C14.5246%200.00112993%2014.5161%200%2014.5066%200C14.4971%200%2014.4885%200.00112993%2014.4817%200.00275993C14.2389%200.52705%2013.9094%201.14721%2013.5323%201.52455C13.1553%201.9018%2012.5355%202.2316%2012.0116%202.4745C12.0099%202.4815%2012.0087%202.4903%2012.0087%202.5C12.0087%202.5097%2012.0099%202.5184%2012.0115%202.5254C12.5354%202.7682%2013.1552%203.098%2013.5322%203.4754C13.9094%203.8527%2014.239%204.473%2014.4817%204.9972C14.4886%204.9989%2014.4971%205%2014.5066%205C14.516%205%2014.5246%204.9989%2014.5314%204.9972C14.7742%204.473%2015.1037%203.8528%2015.4806%203.4755M15.4806%203.4755C15.8562%203.0997%2016.4562%202.7667%2016.963%202.5206C16.9643%202.5148%2016.9651%202.5078%2016.9651%202.4999C16.9651%202.4921%2016.9643%202.4851%2016.963%202.4793C16.4565%202.2332%2015.8563%201.90026%2015.4808%201.52468'%20fill='%238a3ffc'/%3e%3c/svg%3e", tr = "_header_5aqdg_9", ar = "_iconWrapper_5aqdg_16", nr = "_icon_5aqdg_16", sr = "_titleWrapper_5aqdg_31", or = "_titleRow_5aqdg_37", ir = "_title_5aqdg_31", rr = "_earlyAccessLink_5aqdg_49", cr = "_subtitle_5aqdg_61", lr = "_actions_5aqdg_67", ur = "_actionButton_5aqdg_73",
|
|
3921
|
+
}, pn = ({ icon: e }) => /* @__PURE__ */ h("svg", { ...e.attrs, "aria-hidden": !0, focusable: !1, children: e.content.map((t, n) => /* @__PURE__ */ h("path", { ...t.attrs }, n)) }), er = "data:image/svg+xml,%3csvg%20width='17'%20height='15'%20viewBox='0%200%2017%2015'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3cpath%20fill-rule='evenodd'%20clip-rule='evenodd'%20d='M9.7219%205.2691C8.6668%204.2126%207.7435%202.4757%207.0638%201.00772C7.0445%201.00316%207.0206%201%206.9941%201C6.9675%201%206.9436%201.00316%206.9243%201.00773C6.2447%202.4757%205.322%204.2122%204.2662%205.2687C3.2106%206.325%201.47501%207.2485%200.00802994%207.9287C0.00328994%207.9483%200%207.9728%200%208C0%208.0271%200.00324982%208.0515%200.00793982%208.071C1.47467%208.751%203.2101%209.6743%204.2659%2010.7311C5.322%2011.7875%206.2448%2013.5244%206.9245%2014.9923C6.9437%2014.9969%206.9675%2015%206.994%2015C7.0205%2015%207.0444%2014.9968%207.0636%2014.9923C7.7433%2013.5244%208.666%2011.7877%209.7215%2010.7315M9.7215%2010.7315C10.773%209.6791%2012.4531%208.7468%2013.8721%208.0577C13.8756%208.0415%2013.878%208.0217%2013.878%207.9998C13.878%207.9779%2013.8756%207.9582%2013.8721%207.942C12.4537%207.2529%2010.7734%206.3207%209.7219%205.2691'%20fill='%238a3ffc'/%3e%3cpath%20fill-rule='evenodd'%20clip-rule='evenodd'%20d='M15.4808%201.52468C15.104%201.14737%2014.7742%200.52704%2014.5315%200.00275993C14.5246%200.00112993%2014.5161%200%2014.5066%200C14.4971%200%2014.4885%200.00112993%2014.4817%200.00275993C14.2389%200.52705%2013.9094%201.14721%2013.5323%201.52455C13.1553%201.9018%2012.5355%202.2316%2012.0116%202.4745C12.0099%202.4815%2012.0087%202.4903%2012.0087%202.5C12.0087%202.5097%2012.0099%202.5184%2012.0115%202.5254C12.5354%202.7682%2013.1552%203.098%2013.5322%203.4754C13.9094%203.8527%2014.239%204.473%2014.4817%204.9972C14.4886%204.9989%2014.4971%205%2014.5066%205C14.516%205%2014.5246%204.9989%2014.5314%204.9972C14.7742%204.473%2015.1037%203.8528%2015.4806%203.4755M15.4806%203.4755C15.8562%203.0997%2016.4562%202.7667%2016.963%202.5206C16.9643%202.5148%2016.9651%202.5078%2016.9651%202.4999C16.9651%202.4921%2016.9643%202.4851%2016.963%202.4793C16.4565%202.2332%2015.8563%201.90026%2015.4808%201.52468'%20fill='%238a3ffc'/%3e%3c/svg%3e", tr = "_header_5aqdg_9", ar = "_iconWrapper_5aqdg_16", nr = "_icon_5aqdg_16", sr = "_titleWrapper_5aqdg_31", or = "_titleRow_5aqdg_37", ir = "_title_5aqdg_31", rr = "_earlyAccessLink_5aqdg_49", cr = "_subtitle_5aqdg_61", lr = "_actions_5aqdg_67", ur = "_actionButton_5aqdg_73", ne = {
|
|
3922
3922
|
header: tr,
|
|
3923
3923
|
iconWrapper: ar,
|
|
3924
3924
|
icon: nr,
|
|
@@ -3937,25 +3937,25 @@ const ti = "_inputContainer_1e19u_9", ai = "_textArea_1e19u_18", ni = "_actionBu
|
|
|
3937
3937
|
isBusy: a = !1
|
|
3938
3938
|
}) => {
|
|
3939
3939
|
const o = s === "history";
|
|
3940
|
-
return /* @__PURE__ */ T(Kn, { actions: [], className:
|
|
3941
|
-
/* @__PURE__ */ h("div", { className:
|
|
3942
|
-
/* @__PURE__ */ T("div", { slot: "title", className:
|
|
3943
|
-
/* @__PURE__ */ T("div", { className:
|
|
3944
|
-
/* @__PURE__ */ h("span", { className:
|
|
3940
|
+
return /* @__PURE__ */ T(Kn, { actions: [], className: ne.header, children: [
|
|
3941
|
+
/* @__PURE__ */ h("div", { className: ne.iconWrapper, slot: "navigation", children: /* @__PURE__ */ h("img", { src: er, alt: "", className: ne.icon }) }),
|
|
3942
|
+
/* @__PURE__ */ T("div", { slot: "title", className: ne.titleWrapper, children: [
|
|
3943
|
+
/* @__PURE__ */ T("div", { className: ne.titleRow, children: [
|
|
3944
|
+
/* @__PURE__ */ h("span", { className: ne.title, children: "Camunda Copilot" }),
|
|
3945
3945
|
/* @__PURE__ */ h(
|
|
3946
3946
|
"a",
|
|
3947
3947
|
{
|
|
3948
3948
|
href: "https://docs.camunda.io/docs/next/components/early-access/alpha/alpha-features/",
|
|
3949
3949
|
target: "_blank",
|
|
3950
3950
|
rel: "noopener noreferrer",
|
|
3951
|
-
className:
|
|
3951
|
+
className: ne.earlyAccessLink,
|
|
3952
3952
|
children: /* @__PURE__ */ h(Na, { type: "gray", size: "sm", text: "Early access" })
|
|
3953
3953
|
}
|
|
3954
3954
|
)
|
|
3955
3955
|
] }),
|
|
3956
|
-
n && /* @__PURE__ */ h("span", { className:
|
|
3956
|
+
n && /* @__PURE__ */ h("span", { className: ne.subtitle, children: n })
|
|
3957
3957
|
] }),
|
|
3958
|
-
/* @__PURE__ */ T("div", { slot: "fixed-actions", className:
|
|
3958
|
+
/* @__PURE__ */ T("div", { slot: "fixed-actions", className: ne.actions, children: [
|
|
3959
3959
|
e && /* @__PURE__ */ h(
|
|
3960
3960
|
ge,
|
|
3961
3961
|
{
|
|
@@ -3965,7 +3965,7 @@ const ti = "_inputContainer_1e19u_9", ai = "_textArea_1e19u_18", ni = "_actionBu
|
|
|
3965
3965
|
align: "bottom-right",
|
|
3966
3966
|
onClick: e,
|
|
3967
3967
|
disabled: a,
|
|
3968
|
-
className:
|
|
3968
|
+
className: ne.actionButton,
|
|
3969
3969
|
children: /* @__PURE__ */ h(Mn, {})
|
|
3970
3970
|
}
|
|
3971
3971
|
),
|
|
@@ -3978,7 +3978,7 @@ const ti = "_inputContainer_1e19u_9", ai = "_textArea_1e19u_18", ni = "_actionBu
|
|
|
3978
3978
|
align: "bottom-right",
|
|
3979
3979
|
onClick: t,
|
|
3980
3980
|
disabled: a,
|
|
3981
|
-
className:
|
|
3981
|
+
className: ne.actionButton,
|
|
3982
3982
|
children: /* @__PURE__ */ h(pn, { icon: o ? mn : Zi })
|
|
3983
3983
|
}
|
|
3984
3984
|
)
|
|
@@ -4293,43 +4293,44 @@ const fa = (e) => {
|
|
|
4293
4293
|
TOOL_INVOKE: "TOOL_INVOKE",
|
|
4294
4294
|
MIXED_TOOL_RESULT: "MIXED_TOOL_RESULT",
|
|
4295
4295
|
CONVERSATION_TITLE: "CONVERSATION_TITLE"
|
|
4296
|
-
},
|
|
4296
|
+
}, jl = {
|
|
4297
4297
|
IDLE: "IDLE",
|
|
4298
4298
|
BUSY: "BUSY",
|
|
4299
4299
|
AWAITING_TOOL: "AWAITING_TOOL",
|
|
4300
4300
|
ERROR: "ERROR"
|
|
4301
|
-
},
|
|
4301
|
+
}, te = /* @__PURE__ */ new Map(), oe = {
|
|
4302
4302
|
registerTool: (e) => {
|
|
4303
4303
|
const { handler: t, ...n } = e;
|
|
4304
4304
|
if (n.type === "mixed") {
|
|
4305
|
-
|
|
4305
|
+
te.set(n.name, { definition: n, mixedHandler: t });
|
|
4306
4306
|
return;
|
|
4307
4307
|
}
|
|
4308
|
-
|
|
4308
|
+
te.set(n.name, { definition: n, handler: t });
|
|
4309
4309
|
},
|
|
4310
|
-
has: (e) =>
|
|
4310
|
+
has: (e) => te.has(e),
|
|
4311
4311
|
hasHandler: (e) => {
|
|
4312
|
-
const t =
|
|
4312
|
+
const t = te.get(e);
|
|
4313
4313
|
return t?.handler !== void 0 || t?.mixedHandler !== void 0;
|
|
4314
4314
|
},
|
|
4315
|
-
isMixed: (e) =>
|
|
4316
|
-
|
|
4317
|
-
|
|
4318
|
-
|
|
4315
|
+
isMixed: (e) => te.get(e)?.definition.type === "mixed",
|
|
4316
|
+
getDisplayName: (e) => te.get(e)?.definition.displayName,
|
|
4317
|
+
getContentType: (e) => te.get(e)?.definition.contentType ?? "TEXT",
|
|
4318
|
+
getMixedHandler: (e) => te.get(e)?.mixedHandler,
|
|
4319
|
+
getHandler: (e) => te.get(e)?.handler,
|
|
4319
4320
|
executeHandler: async (e, t, n) => {
|
|
4320
|
-
const s =
|
|
4321
|
+
const s = te.get(e)?.handler;
|
|
4321
4322
|
if (!s)
|
|
4322
4323
|
throw new Error(`No handler registered for tool: ${e}`);
|
|
4323
4324
|
return s(t, n);
|
|
4324
4325
|
},
|
|
4325
|
-
getToolsForBackend: () => Array.from(
|
|
4326
|
+
getToolsForBackend: () => Array.from(te.values()).filter((e) => e.definition.type === "frontend" && e.handler !== void 0).map(({ definition: e }) => ({
|
|
4326
4327
|
name: e.name,
|
|
4327
4328
|
description: e.description,
|
|
4328
4329
|
parameters: e.parameters,
|
|
4329
4330
|
category: e.category
|
|
4330
4331
|
})),
|
|
4331
4332
|
clear: () => {
|
|
4332
|
-
|
|
4333
|
+
te.clear();
|
|
4333
4334
|
}
|
|
4334
4335
|
}, gn = (e) => {
|
|
4335
4336
|
if (!e) return {};
|
|
@@ -4364,9 +4365,9 @@ const fa = (e) => {
|
|
|
4364
4365
|
}, s = e.toolName;
|
|
4365
4366
|
if (!s)
|
|
4366
4367
|
return { stateUpdate: n, result: null };
|
|
4367
|
-
if (
|
|
4368
|
+
if (oe.isMixed(s))
|
|
4368
4369
|
return { stateUpdate: n, result: null };
|
|
4369
|
-
if (!(e.type === M.EXTERNAL_TOOL_CALL &&
|
|
4370
|
+
if (!(e.type === M.EXTERNAL_TOOL_CALL && oe.has(s) && !t.pendingToolInvoke))
|
|
4370
4371
|
return { stateUpdate: n, result: null };
|
|
4371
4372
|
const o = gn(e.toolArguments);
|
|
4372
4373
|
return {
|
|
@@ -4383,7 +4384,7 @@ const fa = (e) => {
|
|
|
4383
4384
|
};
|
|
4384
4385
|
}, Cr = ({ event: e, state: t }) => e.status === G.COMPLETED && e.type === M.TOOL_RESULT && e.toolName && t.pendingToolInvoke?.toolName === e.toolName ? { stateUpdate: { pendingToolInvoke: null }, result: null } : null, Sr = ({ event: e }) => {
|
|
4385
4386
|
const t = e.toolName;
|
|
4386
|
-
return !(e.status === G.COMPLETED && e.type === M.TOOL_RESULT && t &&
|
|
4387
|
+
return !(e.status === G.COMPLETED && e.type === M.TOOL_RESULT && t && oe.isMixed(t) && e.toolResult) || !t || !e.toolResult ? null : {
|
|
4387
4388
|
stateUpdate: null,
|
|
4388
4389
|
result: {
|
|
4389
4390
|
type: at.MIXED_TOOL_RESULT,
|
|
@@ -4411,7 +4412,7 @@ const fa = (e) => {
|
|
|
4411
4412
|
currentToolName: null,
|
|
4412
4413
|
pendingToolInvoke: null,
|
|
4413
4414
|
error: null
|
|
4414
|
-
}, jr = (e) => e.isBusy || e.pendingToolInvoke !== null,
|
|
4415
|
+
}, jr = (e) => e.isBusy || e.pendingToolInvoke !== null, Il = (e) => e.error ? "ERROR" : e.pendingToolInvoke ? "AWAITING_TOOL" : e.isBusy ? "BUSY" : "IDLE", A = tt((e, t) => ({
|
|
4415
4416
|
...ya,
|
|
4416
4417
|
callbacks: {},
|
|
4417
4418
|
setCallbacks: (n) => {
|
|
@@ -5080,7 +5081,7 @@ function _c({ children: e }) {
|
|
|
5080
5081
|
};
|
|
5081
5082
|
}, [t]), e;
|
|
5082
5083
|
}
|
|
5083
|
-
const
|
|
5084
|
+
const zl = ({
|
|
5084
5085
|
onSendMessage: e,
|
|
5085
5086
|
kapaAiIntegrationId: t,
|
|
5086
5087
|
onStopGeneration: n,
|
|
@@ -5274,7 +5275,7 @@ const jl = ({
|
|
|
5274
5275
|
return;
|
|
5275
5276
|
const t = document.createElement("style");
|
|
5276
5277
|
t.id = Oa, t.textContent = Vc, document.head.appendChild(t);
|
|
5277
|
-
},
|
|
5278
|
+
}, Ol = ({ children: e, workareaSelector: t, headerSelector: n, zIndex: s = 12 }) => {
|
|
5278
5279
|
const a = Ee((i) => i.isOpen);
|
|
5279
5280
|
H(() => {
|
|
5280
5281
|
Wc();
|
|
@@ -5290,25 +5291,26 @@ const jl = ({
|
|
|
5290
5291
|
Ee.getState().close();
|
|
5291
5292
|
}, []);
|
|
5292
5293
|
return /* @__PURE__ */ h("div", { className: `${ut.wrapper} ${a ? ut.wrapperOpen : ""}`, children: /* @__PURE__ */ h("div", { className: ut.panel, children: e({ onMinimize: o, isOpen: a }) }) });
|
|
5293
|
-
},
|
|
5294
|
+
}, Rl = () => {
|
|
5294
5295
|
Ee.getState().open();
|
|
5295
|
-
},
|
|
5296
|
+
}, Al = () => {
|
|
5296
5297
|
Ee.getState().close();
|
|
5297
|
-
},
|
|
5298
|
+
}, Ml = () => {
|
|
5298
5299
|
Ee.getState().toggle();
|
|
5299
|
-
},
|
|
5300
|
+
}, Ll = () => Ee((e) => e.isOpen), Xc = (e) => e.replace(/_/g, " "), Jc = (e) => oe.getDisplayName(e) || void 0, bn = (e, t, n) => {
|
|
5301
|
+
const s = t ? Jc(t) : void 0, a = t ? Xc(t) : void 0;
|
|
5300
5302
|
switch (e) {
|
|
5301
5303
|
case M.THINKING:
|
|
5302
5304
|
return "Thinking...";
|
|
5303
5305
|
case M.EXECUTION_PLAN:
|
|
5304
5306
|
return "Planning...";
|
|
5305
5307
|
case M.TOOL_PLANNING:
|
|
5306
|
-
return
|
|
5308
|
+
return s ? `${s}...` : a ? `Planning ${a}...` : "Planning...";
|
|
5307
5309
|
case M.TOOL_INVOKE:
|
|
5308
5310
|
case M.EXTERNAL_TOOL_CALL:
|
|
5309
|
-
return
|
|
5311
|
+
return s ? `${s}...` : a ? `Running ${a}...` : "Running tool...";
|
|
5310
5312
|
case M.TOOL_RESULT:
|
|
5311
|
-
return n === G.ERROR
|
|
5313
|
+
return n === G.ERROR ? s ? `${s} failed — retrying...` : a ? `${a} failed — retrying...` : "Processing results..." : s ? `${s}...` : a ? `Processing ${a} results...` : "Processing results...";
|
|
5312
5314
|
case M.EXECUTION_COMPLETE:
|
|
5313
5315
|
return "Completing...";
|
|
5314
5316
|
case M.ERROR:
|
|
@@ -5316,8 +5318,8 @@ const jl = ({
|
|
|
5316
5318
|
default:
|
|
5317
5319
|
return "Thinking...";
|
|
5318
5320
|
}
|
|
5319
|
-
}, Ct = (e) => e.type === M.THINKING && (e.status === G.IN_PROGRESS || e.status === G.COMPLETED) && !!e.content,
|
|
5320
|
-
` : "") + e,
|
|
5321
|
+
}, Ct = (e) => e.type === M.THINKING && (e.status === G.IN_PROGRESS || e.status === G.COMPLETED) && !!e.content, Yc = (e) => e.type === M.TOOL_PLANNING && (e.status === G.IN_PROGRESS || e.status === G.COMPLETED), Zc = (e) => e.type === M.TOOL_RESULT && (e.status === G.IN_PROGRESS || e.status === G.COMPLETED), vn = (e) => e.type === M.TOOL_INVOKE || e.type === M.EXTERNAL_TOOL_CALL, el = (e) => e.type === M.EXECUTION_COMPLETE, tl = (e) => e.status === G.ERROR, al = (e) => e.status === G.IN_PROGRESS && !!e.type, nl = (e) => Ct(e) || Yc(e) || vn(e) || Zc(e), sl = () => `thinking-${Date.now()}-${Math.random().toString(36).slice(2, 7)}`, ol = (e, t) => e.startsWith(t) ? e.slice(t.length) : (t.length > 0 ? `
|
|
5322
|
+
` : "") + e, il = (e) => {
|
|
5321
5323
|
const n = {
|
|
5322
5324
|
[M.TOOL_PLANNING]: "Planning",
|
|
5323
5325
|
[M.TOOL_INVOKE]: "Executing",
|
|
@@ -5340,22 +5342,22 @@ const jl = ({
|
|
|
5340
5342
|
o(e.messageId);
|
|
5341
5343
|
break;
|
|
5342
5344
|
}
|
|
5343
|
-
},
|
|
5344
|
-
contentType:
|
|
5345
|
+
}, rl = (e, t) => ({
|
|
5346
|
+
contentType: oe.getContentType(e),
|
|
5345
5347
|
resultString: typeof t == "string" ? t : JSON.stringify(t)
|
|
5346
|
-
}),
|
|
5347
|
-
if (!
|
|
5348
|
+
}), cl = (e, t) => al(e) ? t(e.type, e.toolName) : void 0, ll = (e, t, n, s, a, o, i) => {
|
|
5349
|
+
if (!nl(e))
|
|
5348
5350
|
return { newBlockId: n, newContent: s };
|
|
5349
|
-
const r = Ct(e) ? e.content || "" :
|
|
5351
|
+
const r = Ct(e) ? e.content || "" : il(e);
|
|
5350
5352
|
if (!r)
|
|
5351
5353
|
return { newBlockId: n, newContent: s };
|
|
5352
|
-
const c = !n, l = c ?
|
|
5354
|
+
const c = !n, l = c ? sl() : n, u = a || o || `Thinking (${i + 1})...`, d = ol(r, c ? "" : s);
|
|
5353
5355
|
return {
|
|
5354
5356
|
action: c ? { type: "ADD_BLOCK", messageId: t, blockId: l, label: u, content: d } : { type: "APPEND_BLOCK", messageId: t, blockId: l, label: "", content: d },
|
|
5355
5357
|
newBlockId: l,
|
|
5356
5358
|
newContent: r
|
|
5357
5359
|
};
|
|
5358
|
-
},
|
|
5360
|
+
}, ul = ({
|
|
5359
5361
|
event: e,
|
|
5360
5362
|
messageId: t,
|
|
5361
5363
|
currentBlockId: n,
|
|
@@ -5372,7 +5374,7 @@ const jl = ({
|
|
|
5372
5374
|
newAccumulatedContent: i,
|
|
5373
5375
|
newBlockCount: o
|
|
5374
5376
|
};
|
|
5375
|
-
if (
|
|
5377
|
+
if (tl(e) && e.type !== M.TOOL_RESULT)
|
|
5376
5378
|
return {
|
|
5377
5379
|
intermediateError: e.content || "Copilot agent error",
|
|
5378
5380
|
thinkingAction: n ? { type: "COMPLETE_BLOCK", messageId: t, blockId: n, label: "", content: "" } : void 0,
|
|
@@ -5381,11 +5383,11 @@ const jl = ({
|
|
|
5381
5383
|
newAccumulatedContent: i,
|
|
5382
5384
|
newBlockCount: o
|
|
5383
5385
|
};
|
|
5384
|
-
const c =
|
|
5386
|
+
const c = cl(e, r), {
|
|
5385
5387
|
action: l,
|
|
5386
5388
|
newBlockId: u,
|
|
5387
5389
|
newContent: d
|
|
5388
|
-
} =
|
|
5390
|
+
} = ll(
|
|
5389
5391
|
e,
|
|
5390
5392
|
t,
|
|
5391
5393
|
n,
|
|
@@ -5394,9 +5396,10 @@ const jl = ({
|
|
|
5394
5396
|
a,
|
|
5395
5397
|
o
|
|
5396
5398
|
), p = l?.type === "ADD_BLOCK" ? o + 1 : o, m = Ct(e) && e.content && e.status === G.COMPLETED ? e.content : i;
|
|
5397
|
-
if (vn(e))
|
|
5399
|
+
if (vn(e)) {
|
|
5400
|
+
const g = c || r(e.type, e.toolName);
|
|
5398
5401
|
return n && l ? {
|
|
5399
|
-
statusLabel:
|
|
5402
|
+
statusLabel: g,
|
|
5400
5403
|
thinkingAction: {
|
|
5401
5404
|
type: "COMPLETE_BLOCK",
|
|
5402
5405
|
messageId: t,
|
|
@@ -5409,14 +5412,15 @@ const jl = ({
|
|
|
5409
5412
|
newAccumulatedContent: m,
|
|
5410
5413
|
newBlockCount: p
|
|
5411
5414
|
} : {
|
|
5412
|
-
statusLabel:
|
|
5415
|
+
statusLabel: g,
|
|
5413
5416
|
thinkingAction: l,
|
|
5414
5417
|
newBlockId: null,
|
|
5415
5418
|
newThinkingContent: "",
|
|
5416
5419
|
newAccumulatedContent: m,
|
|
5417
5420
|
newBlockCount: p
|
|
5418
5421
|
};
|
|
5419
|
-
|
|
5422
|
+
}
|
|
5423
|
+
if (el(e)) {
|
|
5420
5424
|
const g = m || (e.content ?? "");
|
|
5421
5425
|
return {
|
|
5422
5426
|
statusLabel: c,
|
|
@@ -5457,7 +5461,7 @@ const jl = ({
|
|
|
5457
5461
|
toolResult: JSON.stringify({ error: n }),
|
|
5458
5462
|
contentType: "TEXT"
|
|
5459
5463
|
});
|
|
5460
|
-
},
|
|
5464
|
+
}, dl = ({ onToolInvoke: e, transport: t }) => {
|
|
5461
5465
|
const n = N(e), s = N(t);
|
|
5462
5466
|
n.current = e, s.current = t;
|
|
5463
5467
|
const a = E((i, r) => {
|
|
@@ -5466,7 +5470,7 @@ const jl = ({
|
|
|
5466
5470
|
return {
|
|
5467
5471
|
executeToolAndSendResult: E(
|
|
5468
5472
|
async (i, r, c) => {
|
|
5469
|
-
const l =
|
|
5473
|
+
const l = oe.has(i) ? oe.getHandler(i) : void 0, u = n.current;
|
|
5470
5474
|
if (l === void 0 && u === void 0) {
|
|
5471
5475
|
const p = `Tool "${i}" invoked but no handler provided.`;
|
|
5472
5476
|
_e(i), await Ra(s.current, i, p, c);
|
|
@@ -5475,7 +5479,7 @@ const jl = ({
|
|
|
5475
5479
|
try {
|
|
5476
5480
|
const m = l ? await l(r, (v, k) => {
|
|
5477
5481
|
throw _e(v), k;
|
|
5478
|
-
}) : await u?.(i, r), { contentType: g, resultString: y } =
|
|
5482
|
+
}) : await u?.(i, r), { contentType: g, resultString: y } = oe.has(i) ? rl(i, m) : { contentType: "TEXT", resultString: String(m) }, f = A.getState().conversationId;
|
|
5479
5483
|
f && await s.current.sendToolResult({
|
|
5480
5484
|
conversationId: f,
|
|
5481
5485
|
type: "TOOL_RESULT",
|
|
@@ -5493,16 +5497,16 @@ const jl = ({
|
|
|
5493
5497
|
),
|
|
5494
5498
|
handleToolExecutionError: a
|
|
5495
5499
|
};
|
|
5496
|
-
},
|
|
5500
|
+
}, hl = () => `tool-${Date.now()}-${Math.random().toString(36).slice(2, 9)}`, ml = ({
|
|
5497
5501
|
getStatusLabel: e,
|
|
5498
5502
|
getMessageContext: t,
|
|
5499
5503
|
onUpdateMessageContext: n
|
|
5500
5504
|
}) => {
|
|
5501
5505
|
const s = R((k) => k.updateMessageStatusLabel), a = R((k) => k.addThinkingBlock), o = R((k) => k.appendToThinkingBlock), i = R((k) => k.completeThinkingBlock), r = R((k) => k.completeAllThinkingBlocks), c = R((k) => k.setMessageContent), l = R((k) => k.setMessageSources), u = R((k) => k.addToolBlock), d = R((k) => k.updateToolBlockStatus), p = R((k) => k.updateToolBlockResult), m = R((k) => k.setConversationTitle), g = R((k) => k.addErrorBlock), y = N(null), f = E(
|
|
5502
5506
|
(k, b) => {
|
|
5503
|
-
if (!
|
|
5507
|
+
if (!oe.isMixed(k))
|
|
5504
5508
|
return;
|
|
5505
|
-
const j =
|
|
5509
|
+
const j = oe.getMixedHandler(k);
|
|
5506
5510
|
if (!j)
|
|
5507
5511
|
return;
|
|
5508
5512
|
const C = (w, S) => {
|
|
@@ -5532,7 +5536,7 @@ const jl = ({
|
|
|
5532
5536
|
(k) => {
|
|
5533
5537
|
if (k.type === M.CONVERSATION_TITLE && k.content)
|
|
5534
5538
|
return m(k.content), { agentResultType: at.CONVERSATION_TITLE, conversationTitle: k.content };
|
|
5535
|
-
const b = t(), j = e ?? bn, C =
|
|
5539
|
+
const b = t(), j = e ?? bn, C = ul({
|
|
5536
5540
|
event: k,
|
|
5537
5541
|
messageId: b.messageId,
|
|
5538
5542
|
currentBlockId: b.currentThinkingBlockId,
|
|
@@ -5578,7 +5582,7 @@ const jl = ({
|
|
|
5578
5582
|
}), C.finalContent?.trim() && b.messageId && c(b.messageId, C.finalContent);
|
|
5579
5583
|
const w = A.getState().processEvent(k);
|
|
5580
5584
|
if ((k.type === M.TOOL_INVOKE || k.type === M.EXTERNAL_TOOL_CALL) && b.messageId && k.toolName) {
|
|
5581
|
-
const S =
|
|
5585
|
+
const S = hl(), I = (b.toolStepCount ?? 0) + 1;
|
|
5582
5586
|
y.current = S;
|
|
5583
5587
|
const P = k.toolArguments ? gn(k.toolArguments) : void 0;
|
|
5584
5588
|
u(b.messageId, S, k.toolName, I, P), n({ toolStepCount: I });
|
|
@@ -5617,7 +5621,7 @@ const jl = ({
|
|
|
5617
5621
|
g
|
|
5618
5622
|
]
|
|
5619
5623
|
) };
|
|
5620
|
-
},
|
|
5624
|
+
}, pl = ({
|
|
5621
5625
|
transport: e,
|
|
5622
5626
|
onEvent: t,
|
|
5623
5627
|
onInitializeMessage: n
|
|
@@ -5634,7 +5638,7 @@ const jl = ({
|
|
|
5634
5638
|
conversationId: k,
|
|
5635
5639
|
messageId: b,
|
|
5636
5640
|
content: f,
|
|
5637
|
-
externalTools:
|
|
5641
|
+
externalTools: oe.getToolsForBackend(),
|
|
5638
5642
|
context: v
|
|
5639
5643
|
});
|
|
5640
5644
|
} catch (j) {
|
|
@@ -5681,7 +5685,7 @@ const jl = ({
|
|
|
5681
5685
|
resetConversation: m,
|
|
5682
5686
|
loadConversation: y
|
|
5683
5687
|
};
|
|
5684
|
-
},
|
|
5688
|
+
}, gl = ({ transport: e }) => {
|
|
5685
5689
|
const t = N(e);
|
|
5686
5690
|
H(() => {
|
|
5687
5691
|
t.current = e;
|
|
@@ -5697,7 +5701,7 @@ const jl = ({
|
|
|
5697
5701
|
accumulatedContent: "",
|
|
5698
5702
|
blockCount: 0,
|
|
5699
5703
|
toolStepCount: 0
|
|
5700
|
-
}),
|
|
5704
|
+
}), Pl = ({
|
|
5701
5705
|
transport: e,
|
|
5702
5706
|
onToolInvoke: t,
|
|
5703
5707
|
getStatusLabel: n = bn
|
|
@@ -5714,10 +5718,10 @@ const jl = ({
|
|
|
5714
5718
|
c.current = { ...c.current, ...z };
|
|
5715
5719
|
}, []), u = E((z) => {
|
|
5716
5720
|
c.current = xe(z);
|
|
5717
|
-
}, []), { executeToolAndSendResult: d } =
|
|
5721
|
+
}, []), { executeToolAndSendResult: d } = dl({
|
|
5718
5722
|
onToolInvoke: t,
|
|
5719
5723
|
transport: e
|
|
5720
|
-
}), p = N(null), m = E(() => c.current, []), g =
|
|
5724
|
+
}), p = N(null), m = E(() => c.current, []), g = ml({
|
|
5721
5725
|
getStatusLabel: n,
|
|
5722
5726
|
getMessageContext: m,
|
|
5723
5727
|
onUpdateMessageContext: l
|
|
@@ -5743,7 +5747,7 @@ const jl = ({
|
|
|
5743
5747
|
haltAndUnsubscribe: C,
|
|
5744
5748
|
resetConversation: w,
|
|
5745
5749
|
loadConversation: S
|
|
5746
|
-
} =
|
|
5750
|
+
} = pl({
|
|
5747
5751
|
transport: e,
|
|
5748
5752
|
onEvent: k,
|
|
5749
5753
|
onInitializeMessage: u
|
|
@@ -5753,7 +5757,7 @@ const jl = ({
|
|
|
5753
5757
|
(...z) => (v(), b(...z)),
|
|
5754
5758
|
[b, v]
|
|
5755
5759
|
);
|
|
5756
|
-
|
|
5760
|
+
gl({ transport: e }), H(() => {
|
|
5757
5761
|
B.getState().setTransport(e);
|
|
5758
5762
|
}, [e]), H(() => () => {
|
|
5759
5763
|
f();
|
|
@@ -5775,7 +5779,7 @@ const jl = ({
|
|
|
5775
5779
|
resetConversation: J,
|
|
5776
5780
|
loadConversation: V
|
|
5777
5781
|
};
|
|
5778
|
-
},
|
|
5782
|
+
}, fl = async (e, t) => {
|
|
5779
5783
|
const n = e.query;
|
|
5780
5784
|
if (typeof n != "string" || n.trim() === "")
|
|
5781
5785
|
return t("camunda_docs_search", new Error("Query parameter is required and must be a non-empty string")), JSON.stringify({
|
|
@@ -5802,8 +5806,9 @@ const jl = ({
|
|
|
5802
5806
|
sources: []
|
|
5803
5807
|
});
|
|
5804
5808
|
}
|
|
5805
|
-
},
|
|
5809
|
+
}, Nl = {
|
|
5806
5810
|
name: "camunda_docs_search",
|
|
5811
|
+
displayName: "Searching docs",
|
|
5807
5812
|
description: "Search the Camunda documentation and knowledge base for information. Use this tool when you need to find specific information, documentation, best practices, or answers about Camunda, BPMN, DMN, Forms, Connectors, or related topics.",
|
|
5808
5813
|
parameters: {
|
|
5809
5814
|
type: "object",
|
|
@@ -5818,32 +5823,32 @@ const jl = ({
|
|
|
5818
5823
|
type: "frontend",
|
|
5819
5824
|
contentType: "TEXT",
|
|
5820
5825
|
category: "GENERAL",
|
|
5821
|
-
handler:
|
|
5826
|
+
handler: fl
|
|
5822
5827
|
};
|
|
5823
5828
|
export {
|
|
5824
|
-
|
|
5829
|
+
jl as AgentState,
|
|
5825
5830
|
si as ChatInput,
|
|
5826
5831
|
zi as ChatMessage,
|
|
5827
5832
|
Yi as ChatMessageList,
|
|
5828
|
-
|
|
5833
|
+
zl as CopilotChat,
|
|
5829
5834
|
dr as CopilotHeader,
|
|
5830
|
-
|
|
5835
|
+
Ol as CopilotSidecar,
|
|
5831
5836
|
G as EventStatus,
|
|
5832
5837
|
M as EventType,
|
|
5833
5838
|
oi as MarkdownRenderer,
|
|
5834
5839
|
gc as QueryCancelledError,
|
|
5835
5840
|
at as ResultType,
|
|
5836
5841
|
_i as ThinkingIndicator,
|
|
5837
|
-
|
|
5838
|
-
|
|
5842
|
+
Nl as camundaDocsSearchTool,
|
|
5843
|
+
Al as closeSidecar,
|
|
5839
5844
|
bn as getDefaultStatusLabel,
|
|
5840
|
-
|
|
5841
|
-
|
|
5845
|
+
Rl as openSidecar,
|
|
5846
|
+
Il as selectAgentState,
|
|
5842
5847
|
jr as selectIsBusy,
|
|
5843
|
-
|
|
5844
|
-
|
|
5845
|
-
|
|
5848
|
+
Ml as toggleSidecar,
|
|
5849
|
+
oe as toolRegistry,
|
|
5850
|
+
Pl as useAgentAdapter,
|
|
5846
5851
|
A as useAgentStore,
|
|
5847
5852
|
R as useChatStore,
|
|
5848
|
-
|
|
5853
|
+
Ll as useSidecarOpen
|
|
5849
5854
|
};
|
package/dist/package.json
CHANGED
package/package.json
CHANGED