@pi-outpost/embed 0.52.0 → 0.54.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/{conversationExport-Pvf2smen.js → conversationExport-BlW4R5hL.js} +45 -45
- package/dist/{conversationExport-CrGi7RIO.cjs → conversationExport-CPhTW6Ko.cjs} +2 -2
- package/dist/conversationHistory-DVdpMO_m.cjs +424 -0
- package/dist/{conversationHistory-oQ2v_pFv.js → conversationHistory-wmxP-e7h.js} +278 -195
- package/dist/pi-outpost-embed.cjs +40 -40
- package/dist/pi-outpost-embed.js +4535 -4318
- package/package.json +1 -1
- package/dist/conversationHistory-COJKiz5A.cjs +0 -423
|
@@ -21698,7 +21698,8 @@ div.mxRubberband { position: absolute; overflow: hidden; border: 1px solid #29b6
|
|
|
21698
21698
|
return root.getElementsByTagName("diagram").length;
|
|
21699
21699
|
}
|
|
21700
21700
|
|
|
21701
|
-
|
|
21701
|
+
// \`start\`: the page to show first, when nothing is drawn yet; later texts keep the page shown
|
|
21702
|
+
function render(xml, dark, start) {
|
|
21702
21703
|
last = { xml: xml, dark: dark };
|
|
21703
21704
|
stopTouchUp();
|
|
21704
21705
|
document.body.className = dark ? "dark" : "";
|
|
@@ -21719,7 +21720,7 @@ div.mxRubberband { position: absolute; overflow: hidden; border: 1px solid #29b6
|
|
|
21719
21720
|
tell({ type: M.FAILED, message: "This is not a draw.io diagram: its root is <" + doc.documentElement.nodeName + ">, not <mxfile> or <mxGraphModel>." });
|
|
21720
21721
|
return;
|
|
21721
21722
|
}
|
|
21722
|
-
var page = viewer !== null ?
|
|
21723
|
+
var page = Math.min(viewer !== null ? viewer.currentPage || 0 : typeof start === "number" && start > 0 ? start : 0, pages - 1);
|
|
21723
21724
|
var container = document.createElement("div");
|
|
21724
21725
|
container.id = "diagram";
|
|
21725
21726
|
document.body.appendChild(container);
|
|
@@ -22014,7 +22015,7 @@ div.mxRubberband { position: absolute; overflow: hidden; border: 1px solid #29b6
|
|
|
22014
22015
|
if (event.source !== parent) return;
|
|
22015
22016
|
var data = event.data;
|
|
22016
22017
|
if (!data) return;
|
|
22017
|
-
if (data.type === M.RENDER && typeof data.xml === "string") render(data.xml, data.dark === true);
|
|
22018
|
+
if (data.type === M.RENDER && typeof data.xml === "string") render(data.xml, data.dark === true, data.page);
|
|
22018
22019
|
else if (data.type === M.EDIT) {
|
|
22019
22020
|
editing = data.on === true;
|
|
22020
22021
|
if (editing) startTouchUp();
|
|
@@ -22042,60 +22043,60 @@ div.mxRubberband { position: absolute; overflow: hidden; border: 1px solid #29b6
|
|
|
22042
22043
|
}
|
|
22043
22044
|
//#endregion
|
|
22044
22045
|
//#region ../ui/src/components/DrawioFrame.tsx
|
|
22045
|
-
var WT = "allow-scripts", GT = 1e4, KT = te(function({ xml: e, serverUrl: t, title: n, fallback: r, editing: i = !1, onTouchUpChange: a, onPageLocked: o, onEscape: s, onRendered: c, className: l = "flex h-full min-h-[24rem] flex-col" },
|
|
22046
|
-
let
|
|
22046
|
+
var WT = "allow-scripts", GT = 1e4, KT = te(function({ xml: e, serverUrl: t, title: n, fallback: r, editing: i = !1, onTouchUpChange: a, onPageLocked: o, onEscape: s, onRendered: c, className: l = "flex h-full min-h-[24rem] flex-col", page: u }, d) {
|
|
22047
|
+
let f = T(null), p = ue() === "dark", m = se(() => UT(BT(t)), [t]), [h, g] = E(0), [_, v] = E(null), y = T(/* @__PURE__ */ new Map()), b = T({
|
|
22047
22048
|
onTouchUpChange: a,
|
|
22048
22049
|
onPageLocked: o,
|
|
22049
22050
|
onEscape: s,
|
|
22050
22051
|
onRendered: c
|
|
22051
22052
|
});
|
|
22052
|
-
|
|
22053
|
+
b.current = {
|
|
22053
22054
|
onTouchUpChange: a,
|
|
22054
22055
|
onPageLocked: o,
|
|
22055
22056
|
onEscape: s,
|
|
22056
22057
|
onRendered: c
|
|
22057
22058
|
};
|
|
22058
|
-
let
|
|
22059
|
-
function
|
|
22060
|
-
|
|
22059
|
+
let ee = T(null), x = T(i);
|
|
22060
|
+
function S(e) {
|
|
22061
|
+
f.current?.contentWindow?.postMessage(e, "*");
|
|
22061
22062
|
}
|
|
22062
|
-
function
|
|
22063
|
+
function C(e, t) {
|
|
22063
22064
|
return new Promise((n, r) => {
|
|
22064
|
-
|
|
22065
|
+
y.current.get(t)?.reject(/* @__PURE__ */ Error("superseded"));
|
|
22065
22066
|
let i = setTimeout(() => {
|
|
22066
|
-
|
|
22067
|
+
y.current.delete(t), r(/* @__PURE__ */ Error("the diagram did not answer"));
|
|
22067
22068
|
}, GT);
|
|
22068
|
-
|
|
22069
|
+
y.current.set(t, {
|
|
22069
22070
|
resolve: ((e) => {
|
|
22070
22071
|
clearTimeout(i), n(e);
|
|
22071
22072
|
}),
|
|
22072
22073
|
reject: (e) => {
|
|
22073
22074
|
clearTimeout(i), r(e);
|
|
22074
22075
|
}
|
|
22075
|
-
}),
|
|
22076
|
+
}), S({ type: e });
|
|
22076
22077
|
});
|
|
22077
22078
|
}
|
|
22078
|
-
return ae(
|
|
22079
|
-
save: () =>
|
|
22080
|
-
markClean: () =>
|
|
22081
|
-
undo: () =>
|
|
22082
|
-
redo: () =>
|
|
22083
|
-
setWireStyle: (e) =>
|
|
22079
|
+
return ae(d, () => ({
|
|
22080
|
+
save: () => C(zT.SAVE, zT.SAVED),
|
|
22081
|
+
markClean: () => S({ type: zT.CLEAN }),
|
|
22082
|
+
undo: () => S({ type: zT.UNDO }),
|
|
22083
|
+
redo: () => S({ type: zT.REDO }),
|
|
22084
|
+
setWireStyle: (e) => S({
|
|
22084
22085
|
type: zT.WIRE_STYLE,
|
|
22085
22086
|
style: e
|
|
22086
22087
|
}),
|
|
22087
|
-
exportSvg: () =>
|
|
22088
|
+
exportSvg: () => C(zT.EXPORT_SVG, zT.SVG)
|
|
22088
22089
|
})), w(() => {
|
|
22089
|
-
let e =
|
|
22090
|
+
let e = y.current;
|
|
22090
22091
|
function t(t) {
|
|
22091
|
-
if (
|
|
22092
|
+
if (f.current === null || t.source !== f.current.contentWindow) return;
|
|
22092
22093
|
let n = t.data;
|
|
22093
22094
|
if (typeof n == "object" && n) {
|
|
22094
|
-
if (n.type === zT.READY)
|
|
22095
|
-
else if (n.type === zT.RENDERED)
|
|
22095
|
+
if (n.type === zT.READY) ee.current = null, x.current = !1, g((e) => e + 1);
|
|
22096
|
+
else if (n.type === zT.RENDERED) v(null), b.current.onRendered?.(null);
|
|
22096
22097
|
else if (n.type === zT.FAILED) {
|
|
22097
22098
|
let e = typeof n.message == "string" ? n.message : "The diagram could not be drawn.";
|
|
22098
|
-
|
|
22099
|
+
v(e), b.current.onRendered?.(e);
|
|
22099
22100
|
} else if (n.type === zT.CHANGED) {
|
|
22100
22101
|
let e = [
|
|
22101
22102
|
"straight",
|
|
@@ -22103,13 +22104,13 @@ var WT = "allow-scripts", GT = 1e4, KT = te(function({ xml: e, serverUrl: t, tit
|
|
|
22103
22104
|
"curved",
|
|
22104
22105
|
"mixed"
|
|
22105
22106
|
].includes(n.wireStyle) ? n.wireStyle : void 0;
|
|
22106
|
-
|
|
22107
|
+
b.current.onTouchUpChange?.({
|
|
22107
22108
|
dirty: n.dirty === !0,
|
|
22108
22109
|
canUndo: n.canUndo === !0,
|
|
22109
22110
|
canRedo: n.canRedo === !0,
|
|
22110
22111
|
...e ? { wireStyle: e } : {}
|
|
22111
22112
|
});
|
|
22112
|
-
} else n.type === zT.FOCUS ?
|
|
22113
|
+
} else n.type === zT.FOCUS ? f.current !== null && document.activeElement !== f.current && f.current.focus({ preventScroll: !0 }) : n.type === zT.ESCAPE ? b.current.onEscape?.() : n.type === zT.PAGE_LOCKED ? b.current.onPageLocked?.() : n.type === zT.SAVED && typeof n.xml == "string" && typeof n.page == "number" ? (e.get(zT.SAVED)?.resolve({
|
|
22113
22114
|
page: n.page,
|
|
22114
22115
|
xml: n.xml
|
|
22115
22116
|
}), e.delete(zT.SAVED)) : n.type === zT.SVG && typeof n.svg == "string" && typeof n.page == "number" && (e.get(zT.SVG)?.resolve({
|
|
@@ -22125,56 +22126,58 @@ var WT = "allow-scripts", GT = 1e4, KT = te(function({ xml: e, serverUrl: t, tit
|
|
|
22125
22126
|
e.clear();
|
|
22126
22127
|
};
|
|
22127
22128
|
}, []), w(() => {
|
|
22128
|
-
|
|
22129
|
+
h !== 0 && (i ? (!x.current && (ee.current === null || ee.current.xml !== e || ee.current.dark !== p) && (ee.current = {
|
|
22129
22130
|
xml: e,
|
|
22130
|
-
dark:
|
|
22131
|
-
},
|
|
22131
|
+
dark: p
|
|
22132
|
+
}, S({
|
|
22132
22133
|
type: zT.RENDER,
|
|
22133
22134
|
xml: e,
|
|
22134
|
-
dark:
|
|
22135
|
-
|
|
22135
|
+
dark: p,
|
|
22136
|
+
...u === void 0 ? {} : { page: u }
|
|
22137
|
+
})), x.current || S({
|
|
22136
22138
|
type: zT.EDIT,
|
|
22137
22139
|
on: !0
|
|
22138
|
-
}),
|
|
22140
|
+
}), x.current = !0) : x.current ? (x.current = !1, ee.current = {
|
|
22139
22141
|
xml: e,
|
|
22140
|
-
dark:
|
|
22141
|
-
},
|
|
22142
|
+
dark: p
|
|
22143
|
+
}, S({
|
|
22142
22144
|
type: zT.EDIT,
|
|
22143
22145
|
on: !1,
|
|
22144
22146
|
xml: e,
|
|
22145
|
-
dark:
|
|
22146
|
-
})) : (
|
|
22147
|
+
dark: p
|
|
22148
|
+
})) : (ee.current === null || ee.current.xml !== e || ee.current.dark !== p) && (ee.current = {
|
|
22147
22149
|
xml: e,
|
|
22148
|
-
dark:
|
|
22149
|
-
},
|
|
22150
|
+
dark: p
|
|
22151
|
+
}, S({
|
|
22150
22152
|
type: zT.RENDER,
|
|
22151
22153
|
xml: e,
|
|
22152
|
-
dark:
|
|
22154
|
+
dark: p,
|
|
22155
|
+
...u === void 0 ? {} : { page: u }
|
|
22153
22156
|
})));
|
|
22154
22157
|
}, [
|
|
22155
|
-
|
|
22158
|
+
h,
|
|
22156
22159
|
e,
|
|
22157
|
-
|
|
22160
|
+
p,
|
|
22158
22161
|
i
|
|
22159
22162
|
]), /* @__PURE__ */ k("div", {
|
|
22160
22163
|
className: l,
|
|
22161
22164
|
"data-testid": "drawio-view",
|
|
22162
22165
|
children: [
|
|
22163
|
-
|
|
22166
|
+
_ !== null && /* @__PURE__ */ O("div", {
|
|
22164
22167
|
role: "alert",
|
|
22165
22168
|
"data-testid": "drawio-failure",
|
|
22166
22169
|
className: "border-b border-amber-300 bg-amber-50 px-3 py-1.5 text-xs text-amber-900 dark:border-amber-700 dark:bg-amber-950/40 dark:text-amber-200",
|
|
22167
|
-
children:
|
|
22170
|
+
children: _
|
|
22168
22171
|
}),
|
|
22169
22172
|
/* @__PURE__ */ O("iframe", {
|
|
22170
|
-
ref:
|
|
22173
|
+
ref: f,
|
|
22171
22174
|
title: n,
|
|
22172
22175
|
"data-testid": "drawio-frame",
|
|
22173
22176
|
sandbox: WT,
|
|
22174
|
-
srcDoc:
|
|
22175
|
-
className:
|
|
22177
|
+
srcDoc: m,
|
|
22178
|
+
className: _ === null ? "min-h-0 w-full flex-1 border-0" : "h-0 w-full border-0"
|
|
22176
22179
|
}),
|
|
22177
|
-
|
|
22180
|
+
_ !== null && /* @__PURE__ */ O("div", {
|
|
22178
22181
|
className: "min-h-0 flex-1 overflow-auto",
|
|
22179
22182
|
children: r
|
|
22180
22183
|
})
|
|
@@ -22238,16 +22241,51 @@ function eE(e, t, n) {
|
|
|
22238
22241
|
return e.slice(0, a.start) + c + r + s + r + o + "</diagram>" + e.slice(a.end);
|
|
22239
22242
|
}
|
|
22240
22243
|
//#endregion
|
|
22244
|
+
//#region ../ui/src/util/drawioPages.ts
|
|
22245
|
+
function tE(e) {
|
|
22246
|
+
let t = new DOMParser().parseFromString(e, "application/xml").documentElement;
|
|
22247
|
+
if (t.nodeName === "parsererror" || t.getElementsByTagName("parsererror").length > 0) throw Error("it is not a draw.io diagram (not XML)");
|
|
22248
|
+
if (t.nodeName !== "mxfile" && t.nodeName !== "mxGraphModel") throw Error(`it is not a draw.io diagram (its root is <${t.nodeName}>)`);
|
|
22249
|
+
return t;
|
|
22250
|
+
}
|
|
22251
|
+
function nE(e) {
|
|
22252
|
+
return [...e.children].filter((e) => e.nodeName === "diagram");
|
|
22253
|
+
}
|
|
22254
|
+
function rE(e) {
|
|
22255
|
+
let t = tE(e);
|
|
22256
|
+
if (t.nodeName === "mxGraphModel") return ["Page 1"];
|
|
22257
|
+
let n = nE(t);
|
|
22258
|
+
if (n.length === 0) throw Error("it holds no page");
|
|
22259
|
+
return n.map((e, t) => e.getAttribute("name")?.trim() || `Page ${t + 1}`);
|
|
22260
|
+
}
|
|
22261
|
+
function iE(e, t) {
|
|
22262
|
+
if (t === void 0 || t.trim() === "") return 0;
|
|
22263
|
+
let n = rE(e), r = t.trim(), i = n.indexOf(r), a = i >= 0 ? i : /^\d+$/.test(r) ? Number(r) - 1 : -1;
|
|
22264
|
+
if (a < 0 || a >= n.length) throw Error(`it has no page "${r}"; its pages are ${n.map((e) => `"${e}"`).join(", ")}`);
|
|
22265
|
+
return a;
|
|
22266
|
+
}
|
|
22267
|
+
function aE(e, t) {
|
|
22268
|
+
let n = tE(e), r = iE(e, t);
|
|
22269
|
+
if (n.nodeName === "mxGraphModel") return e;
|
|
22270
|
+
let i = n.cloneNode(!1);
|
|
22271
|
+
return i.appendChild(nE(n)[r].cloneNode(!0)), new XMLSerializer().serializeToString(i);
|
|
22272
|
+
}
|
|
22273
|
+
function oE(e, t) {
|
|
22274
|
+
let n = e.split("/").slice(0, -1), r = t.split("/"), i = 0;
|
|
22275
|
+
for (; i < n.length && i < r.length - 1 && n[i] === r[i];) i += 1;
|
|
22276
|
+
return [...n.slice(i).map(() => ".."), ...r.slice(i)].join("/");
|
|
22277
|
+
}
|
|
22278
|
+
//#endregion
|
|
22241
22279
|
//#region ../ui/src/components/DrawioBlock.tsx
|
|
22242
|
-
var
|
|
22280
|
+
var sE = {
|
|
22243
22281
|
dirty: !1,
|
|
22244
22282
|
canUndo: !1,
|
|
22245
22283
|
canRedo: !1
|
|
22246
|
-
},
|
|
22247
|
-
function
|
|
22284
|
+
}, cE = "Discard the unsaved touch-ups to this diagram?";
|
|
22285
|
+
function lE(e) {
|
|
22248
22286
|
return e.slice(e.lastIndexOf("/") + 1).replace(/\.(drawio|dio)$/i, "") || "diagram";
|
|
22249
22287
|
}
|
|
22250
|
-
function
|
|
22288
|
+
function uE(e, t, n) {
|
|
22251
22289
|
let r = URL.createObjectURL(new Blob([t], { type: n }));
|
|
22252
22290
|
try {
|
|
22253
22291
|
let t = document.createElement("a");
|
|
@@ -22256,11 +22294,11 @@ function iE(e, t, n) {
|
|
|
22256
22294
|
URL.revokeObjectURL(r);
|
|
22257
22295
|
}
|
|
22258
22296
|
}
|
|
22259
|
-
function
|
|
22297
|
+
function dE(e, t) {
|
|
22260
22298
|
let n = t?.trim().replace(/[^\p{L}\p{N}._-]+/gu, "-").replace(/^-+|-+$/g, "");
|
|
22261
|
-
return `${
|
|
22299
|
+
return `${lE(e)}${n ? `-${n}` : ""}.svg`;
|
|
22262
22300
|
}
|
|
22263
|
-
function
|
|
22301
|
+
function fE(e, t, n) {
|
|
22264
22302
|
let { fileIo: r } = JT(), [i, a] = E({ status: "loading" }), o = T(0), s = ne(() => {
|
|
22265
22303
|
if (!t) return;
|
|
22266
22304
|
if (r === void 0) {
|
|
@@ -22299,7 +22337,7 @@ function oE(e, t, n) {
|
|
|
22299
22337
|
s
|
|
22300
22338
|
]), i;
|
|
22301
22339
|
}
|
|
22302
|
-
function
|
|
22340
|
+
function pE(e, t) {
|
|
22303
22341
|
let [n, r] = E(!t || typeof IntersectionObserver > "u");
|
|
22304
22342
|
return w(() => {
|
|
22305
22343
|
if (n || e.current === null) return;
|
|
@@ -22309,117 +22347,149 @@ function sE(e, t) {
|
|
|
22309
22347
|
return t.observe(e.current), () => t.disconnect();
|
|
22310
22348
|
}, [n, e]), n;
|
|
22311
22349
|
}
|
|
22312
|
-
function
|
|
22313
|
-
let { serverUrl:
|
|
22350
|
+
function mE({ path: e, xml: t, variant: n, fallback: r, onTouchUpDirtyChange: i, page: a, startTouchUp: o = !1, onEscape: s }) {
|
|
22351
|
+
let { serverUrl: c, fileIo: l, onOpenFile: u } = JT(), d = T(null), f = pE(d, n === "reply"), p = fE(e, t === void 0, f), m = t ?? (p.status === "loaded" ? p.content : null), h = T(null), g = T(null), [_, v] = E(!1), [y, b] = E(null), [ee, x] = E(null), [S, C] = E(null), te = T(null), [re, ie] = E(sE), [ae, oe] = E(!1), ce = T(!1), [le, ue] = E(null), [de, fe] = E(null), me = (e) => e === "inline" ? h : g, he = (e) => S === e && te.current !== null ? te.current.content : m, ge = l !== void 0, A = S !== null && re.dirty, _e = se(() => {
|
|
22352
|
+
if (a === void 0 || m === null) return {
|
|
22353
|
+
index: 0,
|
|
22354
|
+
problem: null
|
|
22355
|
+
};
|
|
22356
|
+
try {
|
|
22357
|
+
return {
|
|
22358
|
+
index: iE(m, a),
|
|
22359
|
+
problem: null
|
|
22360
|
+
};
|
|
22361
|
+
} catch (e) {
|
|
22362
|
+
return {
|
|
22363
|
+
index: 0,
|
|
22364
|
+
problem: e instanceof Error ? e.message : String(e)
|
|
22365
|
+
};
|
|
22366
|
+
}
|
|
22367
|
+
}, [a, m]), ve = T(!1);
|
|
22314
22368
|
w(() => {
|
|
22315
|
-
|
|
22316
|
-
}
|
|
22317
|
-
|
|
22318
|
-
|
|
22319
|
-
|
|
22369
|
+
o && !ve.current && m !== null && _e.problem === null && (ve.current = !0, be("inline"));
|
|
22370
|
+
});
|
|
22371
|
+
let ye = T(null);
|
|
22372
|
+
w(() => {
|
|
22373
|
+
S === null || re.dirty || te.current === null || m === null || m === te.current.content || (ye.current = S, te.current = null, ie(sE), C(null));
|
|
22374
|
+
}, [
|
|
22375
|
+
m,
|
|
22376
|
+
S,
|
|
22377
|
+
re.dirty
|
|
22378
|
+
]), w(() => {
|
|
22379
|
+
if (S !== null || ye.current === null) return;
|
|
22380
|
+
let e = ye.current;
|
|
22381
|
+
ye.current = null, be(e);
|
|
22382
|
+
}), w(() => {
|
|
22383
|
+
i?.(A);
|
|
22384
|
+
}, [A, i]), w(() => () => i?.(!1), [i]);
|
|
22385
|
+
async function be(t) {
|
|
22386
|
+
if (l !== void 0 && S === null) {
|
|
22387
|
+
ue(null), fe(null);
|
|
22320
22388
|
try {
|
|
22321
|
-
|
|
22389
|
+
te.current = await l.read(e), ie(sE), C(t);
|
|
22322
22390
|
} catch (e) {
|
|
22323
|
-
|
|
22391
|
+
ue({
|
|
22324
22392
|
message: e instanceof Error ? e.message : String(e),
|
|
22325
22393
|
conflict: !1
|
|
22326
22394
|
});
|
|
22327
22395
|
}
|
|
22328
22396
|
}
|
|
22329
22397
|
}
|
|
22330
|
-
function
|
|
22331
|
-
return
|
|
22398
|
+
function xe() {
|
|
22399
|
+
return A && !window.confirm(cE) ? !1 : (C(null), ie(sE), ue(null), fe(null), te.current = null, !0);
|
|
22332
22400
|
}
|
|
22333
|
-
async function
|
|
22334
|
-
let t =
|
|
22335
|
-
if (!(t === null || n === null ||
|
|
22336
|
-
|
|
22401
|
+
async function Se() {
|
|
22402
|
+
let t = S, n = te.current;
|
|
22403
|
+
if (!(t === null || n === null || l === void 0 || ce.current)) {
|
|
22404
|
+
ce.current = !0, oe(!0), ue(null);
|
|
22337
22405
|
try {
|
|
22338
|
-
let r = await
|
|
22339
|
-
|
|
22406
|
+
let r = await me(t).current.save(), i = eE(n.content, r.page, r.xml), { mtimeMs: a } = await l.write(e, i, n.mtimeMs);
|
|
22407
|
+
te.current = {
|
|
22340
22408
|
content: i,
|
|
22341
22409
|
mtimeMs: a
|
|
22342
|
-
},
|
|
22410
|
+
}, me(t).current?.markClean();
|
|
22343
22411
|
} catch (e) {
|
|
22344
22412
|
let t = e instanceof YT && e.reason === "conflict";
|
|
22345
|
-
|
|
22413
|
+
ue({
|
|
22346
22414
|
message: t ? "The file changed on disk, or was removed, since this touch-up began, so it was not saved. Leave without saving to see what is there now." : `Could not save: ${e instanceof Error ? e.message : String(e)}`,
|
|
22347
22415
|
conflict: t
|
|
22348
22416
|
});
|
|
22349
22417
|
} finally {
|
|
22350
|
-
|
|
22418
|
+
ce.current = !1, oe(!1);
|
|
22351
22419
|
}
|
|
22352
22420
|
}
|
|
22353
22421
|
}
|
|
22354
|
-
async function
|
|
22355
|
-
|
|
22422
|
+
async function Te(t) {
|
|
22423
|
+
x(null);
|
|
22356
22424
|
try {
|
|
22357
|
-
let n = await
|
|
22358
|
-
|
|
22425
|
+
let n = await me(t).current.exportSvg();
|
|
22426
|
+
uE(dE(e, n.name), n.svg, "image/svg+xml;charset=utf-8");
|
|
22359
22427
|
} catch (e) {
|
|
22360
|
-
|
|
22361
|
-
}
|
|
22362
|
-
}
|
|
22363
|
-
function
|
|
22364
|
-
(
|
|
22365
|
-
}
|
|
22366
|
-
let
|
|
22367
|
-
|
|
22368
|
-
let
|
|
22369
|
-
|
|
22370
|
-
let
|
|
22371
|
-
|
|
22372
|
-
let
|
|
22373
|
-
|
|
22374
|
-
let
|
|
22375
|
-
|
|
22428
|
+
x(e instanceof Error ? e.message : String(e));
|
|
22429
|
+
}
|
|
22430
|
+
}
|
|
22431
|
+
function Ee() {
|
|
22432
|
+
(S !== "enlarged" || xe()) && v(!1);
|
|
22433
|
+
}
|
|
22434
|
+
let De = ne(() => fe("Save or undo the touch-ups on this page before turning to another."), []), Oe = T(xe);
|
|
22435
|
+
Oe.current = xe;
|
|
22436
|
+
let ke = T(Ee);
|
|
22437
|
+
ke.current = Ee;
|
|
22438
|
+
let Ae = T(S);
|
|
22439
|
+
Ae.current = S;
|
|
22440
|
+
let je = T(_);
|
|
22441
|
+
je.current = _;
|
|
22442
|
+
let Me = T(s);
|
|
22443
|
+
Me.current = s;
|
|
22444
|
+
let Ne = ne(() => {
|
|
22445
|
+
Me.current ? Me.current() : Ae.current === null ? je.current && ke.current() : Oe.current();
|
|
22376
22446
|
}, []);
|
|
22377
22447
|
w(() => {
|
|
22378
|
-
if (
|
|
22448
|
+
if (S === null) return;
|
|
22379
22449
|
function e(e) {
|
|
22380
|
-
e.key === "Escape" && (e.preventDefault(), e.stopImmediatePropagation(),
|
|
22450
|
+
e.key === "Escape" && (e.preventDefault(), e.stopImmediatePropagation(), Me.current ? Me.current() : Oe.current());
|
|
22381
22451
|
}
|
|
22382
22452
|
return window.addEventListener("keydown", e, !0), () => window.removeEventListener("keydown", e, !0);
|
|
22383
|
-
}, [
|
|
22384
|
-
function
|
|
22453
|
+
}, [S]);
|
|
22454
|
+
function Pe(t) {
|
|
22385
22455
|
return /* @__PURE__ */ k(D, { children: [/* @__PURE__ */ O("button", {
|
|
22386
22456
|
type: "button",
|
|
22387
22457
|
className: Ce,
|
|
22388
|
-
disabled:
|
|
22389
|
-
onClick: () => void
|
|
22458
|
+
disabled: m === null || y !== null,
|
|
22459
|
+
onClick: () => void Te(t),
|
|
22390
22460
|
title: "Save the page shown as .svg — insert it as a picture in a document",
|
|
22391
22461
|
children: "⤓ download SVG"
|
|
22392
22462
|
}), /* @__PURE__ */ O("button", {
|
|
22393
22463
|
type: "button",
|
|
22394
22464
|
className: Ce,
|
|
22395
|
-
disabled:
|
|
22396
|
-
onClick: () =>
|
|
22465
|
+
disabled: m === null,
|
|
22466
|
+
onClick: () => m !== null && uE(e.slice(e.lastIndexOf("/") + 1), m, "application/xml;charset=utf-8"),
|
|
22397
22467
|
title: "Save the .drawio file, to open or share it",
|
|
22398
22468
|
children: "⤓ download .drawio"
|
|
22399
22469
|
})] });
|
|
22400
22470
|
}
|
|
22401
|
-
function
|
|
22402
|
-
return
|
|
22471
|
+
function Fe(e) {
|
|
22472
|
+
return S === e ? /* @__PURE__ */ k(D, { children: [
|
|
22403
22473
|
/* @__PURE__ */ O("button", {
|
|
22404
22474
|
type: "button",
|
|
22405
22475
|
className: Ce,
|
|
22406
|
-
disabled: !
|
|
22407
|
-
onClick: () => void
|
|
22408
|
-
children:
|
|
22476
|
+
disabled: !re.dirty || ae,
|
|
22477
|
+
onClick: () => void Se(),
|
|
22478
|
+
children: ae ? "saving…" : "✓ save"
|
|
22409
22479
|
}),
|
|
22410
22480
|
/* @__PURE__ */ O("button", {
|
|
22411
22481
|
type: "button",
|
|
22412
22482
|
className: Ce,
|
|
22413
|
-
disabled: !
|
|
22414
|
-
onClick: () =>
|
|
22483
|
+
disabled: !re.canUndo,
|
|
22484
|
+
onClick: () => me(e).current?.undo(),
|
|
22415
22485
|
title: "Undo (⌘Z / Ctrl+Z)",
|
|
22416
22486
|
children: "↶ undo"
|
|
22417
22487
|
}),
|
|
22418
22488
|
/* @__PURE__ */ O("button", {
|
|
22419
22489
|
type: "button",
|
|
22420
22490
|
className: Ce,
|
|
22421
|
-
disabled: !
|
|
22422
|
-
onClick: () =>
|
|
22491
|
+
disabled: !re.canRedo,
|
|
22492
|
+
onClick: () => me(e).current?.redo(),
|
|
22423
22493
|
title: "Redo (⇧⌘Z / Ctrl+Y)",
|
|
22424
22494
|
children: "↷ redo"
|
|
22425
22495
|
}),
|
|
@@ -22429,10 +22499,10 @@ function cE({ path: e, xml: t, variant: n, fallback: r, onTouchUpDirtyChange: i
|
|
|
22429
22499
|
children: ["wires", /* @__PURE__ */ k("select", {
|
|
22430
22500
|
className: Ce,
|
|
22431
22501
|
"aria-label": "Wire style",
|
|
22432
|
-
value:
|
|
22502
|
+
value: re.wireStyle ?? "orthogonal",
|
|
22433
22503
|
onChange: (t) => {
|
|
22434
22504
|
let n = t.target.value;
|
|
22435
|
-
n !== "mixed" &&
|
|
22505
|
+
n !== "mixed" && me(e).current?.setWireStyle(n);
|
|
22436
22506
|
},
|
|
22437
22507
|
children: [
|
|
22438
22508
|
/* @__PURE__ */ O("option", {
|
|
@@ -22447,7 +22517,7 @@ function cE({ path: e, xml: t, variant: n, fallback: r, onTouchUpDirtyChange: i
|
|
|
22447
22517
|
value: "curved",
|
|
22448
22518
|
children: "curved"
|
|
22449
22519
|
}),
|
|
22450
|
-
|
|
22520
|
+
re.wireStyle === "mixed" && /* @__PURE__ */ O("option", {
|
|
22451
22521
|
value: "mixed",
|
|
22452
22522
|
disabled: !0,
|
|
22453
22523
|
children: "mixed"
|
|
@@ -22458,51 +22528,51 @@ function cE({ path: e, xml: t, variant: n, fallback: r, onTouchUpDirtyChange: i
|
|
|
22458
22528
|
/* @__PURE__ */ O("button", {
|
|
22459
22529
|
type: "button",
|
|
22460
22530
|
className: Ce,
|
|
22461
|
-
onClick: () =>
|
|
22531
|
+
onClick: () => xe(),
|
|
22462
22532
|
title: "Leave touch-up (Escape); unsaved touch-ups are asked about first",
|
|
22463
22533
|
children: "done"
|
|
22464
22534
|
}),
|
|
22465
22535
|
/* @__PURE__ */ O("span", {
|
|
22466
22536
|
className: "text-xs text-zinc-400",
|
|
22467
22537
|
"data-testid": "drawio-touchup-status",
|
|
22468
|
-
children:
|
|
22538
|
+
children: re.dirty ? "● unsaved" : "touching up — drag boxes and wire ends, double-click a label"
|
|
22469
22539
|
})
|
|
22470
|
-
] }) :
|
|
22540
|
+
] }) : ge && S === null && y === null ? /* @__PURE__ */ O("button", {
|
|
22471
22541
|
type: "button",
|
|
22472
22542
|
className: Ce,
|
|
22473
|
-
disabled:
|
|
22474
|
-
onClick: () => void
|
|
22543
|
+
disabled: m === null,
|
|
22544
|
+
onClick: () => void be(e),
|
|
22475
22545
|
title: "Move boxes, re-attach wires and fix labels here; anything more in draw.io",
|
|
22476
22546
|
children: "✎ touch up"
|
|
22477
22547
|
}) : null;
|
|
22478
22548
|
}
|
|
22479
|
-
function
|
|
22549
|
+
function Ie(e) {
|
|
22480
22550
|
return /* @__PURE__ */ k(D, { children: [
|
|
22481
|
-
|
|
22551
|
+
S === e && le && /* @__PURE__ */ O("span", {
|
|
22482
22552
|
role: "alert",
|
|
22483
22553
|
"data-testid": "drawio-touchup-problem",
|
|
22484
22554
|
className: "text-red-600 dark:text-red-400",
|
|
22485
|
-
children:
|
|
22555
|
+
children: le.message
|
|
22486
22556
|
}),
|
|
22487
|
-
|
|
22557
|
+
S === e && de && /* @__PURE__ */ O("span", {
|
|
22488
22558
|
role: "status",
|
|
22489
22559
|
className: "text-amber-700 dark:text-amber-300",
|
|
22490
|
-
children:
|
|
22560
|
+
children: de
|
|
22491
22561
|
}),
|
|
22492
|
-
|
|
22562
|
+
S === null && le && /* @__PURE__ */ k("span", {
|
|
22493
22563
|
role: "alert",
|
|
22494
22564
|
className: "text-red-600 dark:text-red-400",
|
|
22495
|
-
children: ["Could not start touch-up: ",
|
|
22565
|
+
children: ["Could not start touch-up: ", le.message]
|
|
22496
22566
|
}),
|
|
22497
|
-
|
|
22567
|
+
ee && /* @__PURE__ */ k("span", {
|
|
22498
22568
|
role: "alert",
|
|
22499
22569
|
className: "text-red-600 dark:text-red-400",
|
|
22500
|
-
children: ["Could not download SVG: ",
|
|
22570
|
+
children: ["Could not download SVG: ", ee]
|
|
22501
22571
|
})
|
|
22502
22572
|
] });
|
|
22503
22573
|
}
|
|
22504
|
-
if (n === "reply" &&
|
|
22505
|
-
ref:
|
|
22574
|
+
if (n === "reply" && p.status === "failed") return /* @__PURE__ */ k("div", {
|
|
22575
|
+
ref: d,
|
|
22506
22576
|
role: "alert",
|
|
22507
22577
|
"data-testid": "drawio-block-missing",
|
|
22508
22578
|
className: "my-2 rounded-lg border border-amber-300 bg-amber-50 px-3 py-2 text-xs text-amber-900 dark:border-amber-700 dark:bg-amber-950/40 dark:text-amber-200",
|
|
@@ -22510,89 +22580,102 @@ function cE({ path: e, xml: t, variant: n, fallback: r, onTouchUpDirtyChange: i
|
|
|
22510
22580
|
"The diagram ",
|
|
22511
22581
|
/* @__PURE__ */ O("code", { children: e }),
|
|
22512
22582
|
" could not be shown: ",
|
|
22513
|
-
|
|
22583
|
+
p.message
|
|
22514
22584
|
]
|
|
22515
22585
|
});
|
|
22516
|
-
let
|
|
22586
|
+
let Le = r ?? /* @__PURE__ */ k("p", {
|
|
22517
22587
|
className: "px-3 py-2 text-xs text-zinc-500",
|
|
22518
22588
|
children: [
|
|
22519
22589
|
"The diagram ",
|
|
22520
22590
|
/* @__PURE__ */ O("code", { children: e }),
|
|
22521
22591
|
" could not be drawn."
|
|
22522
22592
|
]
|
|
22523
|
-
}),
|
|
22593
|
+
}), Re = /* @__PURE__ */ k("div", {
|
|
22524
22594
|
className: `${we} ${n === "reply" ? "order-3" : "shrink-0 px-3 py-1.5"}`,
|
|
22525
22595
|
children: [
|
|
22526
|
-
|
|
22596
|
+
S !== "inline" && /* @__PURE__ */ O("button", {
|
|
22527
22597
|
type: "button",
|
|
22528
22598
|
className: "text-xs text-zinc-500 underline hover:text-zinc-800 dark:hover:text-zinc-200 disabled:opacity-50",
|
|
22529
|
-
disabled:
|
|
22530
|
-
onClick: () =>
|
|
22599
|
+
disabled: m === null || S !== null,
|
|
22600
|
+
onClick: () => v(!0),
|
|
22531
22601
|
"aria-label": "Show diagram at full size",
|
|
22532
22602
|
children: "⤢ enlarge"
|
|
22533
22603
|
}),
|
|
22534
|
-
|
|
22535
|
-
n === "reply" &&
|
|
22604
|
+
S !== "inline" && Pe("inline"),
|
|
22605
|
+
n === "reply" && u && /* @__PURE__ */ O("button", {
|
|
22536
22606
|
type: "button",
|
|
22537
22607
|
className: "text-xs text-zinc-500 underline hover:text-zinc-800 dark:hover:text-zinc-200 disabled:opacity-50",
|
|
22538
|
-
onClick: () =>
|
|
22608
|
+
onClick: () => u(e),
|
|
22539
22609
|
title: "Open the file in the file viewer",
|
|
22540
22610
|
children: "↗ open"
|
|
22541
22611
|
}),
|
|
22542
|
-
n === "viewer" &&
|
|
22543
|
-
|
|
22612
|
+
n === "viewer" && Fe("inline"),
|
|
22613
|
+
Ie("inline")
|
|
22544
22614
|
]
|
|
22545
22615
|
});
|
|
22546
22616
|
return /* @__PURE__ */ k("div", {
|
|
22547
|
-
ref:
|
|
22617
|
+
ref: d,
|
|
22548
22618
|
"data-testid": n === "reply" ? "drawio-block-reply" : "drawio-block-viewer",
|
|
22549
22619
|
className: n === "reply" ? "my-2 flex flex-col gap-2 rounded-lg border border-zinc-200 bg-zinc-50 p-3 dark:border-zinc-800 dark:bg-zinc-900" : "flex h-full flex-col",
|
|
22550
22620
|
children: [
|
|
22551
|
-
n === "viewer" &&
|
|
22552
|
-
|
|
22621
|
+
n === "viewer" && Re,
|
|
22622
|
+
_e.problem !== null && /* @__PURE__ */ k("p", {
|
|
22623
|
+
role: "alert",
|
|
22624
|
+
"data-testid": "drawio-block-page-problem",
|
|
22625
|
+
className: "px-3 py-1.5 text-xs text-amber-800 dark:text-amber-200",
|
|
22626
|
+
children: [
|
|
22627
|
+
"The diagram ",
|
|
22628
|
+
/* @__PURE__ */ O("code", { children: e }),
|
|
22629
|
+
" ",
|
|
22630
|
+
_e.problem,
|
|
22631
|
+
"; its first page is shown."
|
|
22632
|
+
]
|
|
22633
|
+
}),
|
|
22634
|
+
m === null || !f ? /* @__PURE__ */ O("div", {
|
|
22553
22635
|
className: "h-80 animate-pulse rounded bg-zinc-100 dark:bg-zinc-800/60",
|
|
22554
22636
|
"data-testid": "drawio-block-loading",
|
|
22555
22637
|
"aria-label": `Loading ${e}`
|
|
22556
22638
|
}) : /* @__PURE__ */ O(KT, {
|
|
22557
|
-
ref:
|
|
22558
|
-
xml:
|
|
22559
|
-
serverUrl:
|
|
22639
|
+
ref: h,
|
|
22640
|
+
xml: he("inline"),
|
|
22641
|
+
serverUrl: c,
|
|
22560
22642
|
title: e,
|
|
22561
|
-
fallback:
|
|
22562
|
-
editing:
|
|
22563
|
-
onTouchUpChange:
|
|
22564
|
-
onPageLocked:
|
|
22565
|
-
onEscape:
|
|
22566
|
-
onRendered:
|
|
22567
|
-
className: n === "reply" ? "flex h-80 flex-col" : "flex min-h-[24rem] flex-1 flex-col"
|
|
22643
|
+
fallback: Le,
|
|
22644
|
+
editing: S === "inline",
|
|
22645
|
+
onTouchUpChange: ie,
|
|
22646
|
+
onPageLocked: De,
|
|
22647
|
+
onEscape: Ne,
|
|
22648
|
+
onRendered: b,
|
|
22649
|
+
className: n === "reply" ? "flex h-80 flex-col" : "flex min-h-[24rem] flex-1 flex-col",
|
|
22650
|
+
page: a === void 0 ? void 0 : _e.index
|
|
22568
22651
|
}),
|
|
22569
|
-
n === "reply" &&
|
|
22652
|
+
n === "reply" && Re,
|
|
22570
22653
|
/* @__PURE__ */ O(pe, {
|
|
22571
22654
|
label: e,
|
|
22572
22655
|
testId: "drawio-enlarged",
|
|
22573
|
-
open:
|
|
22574
|
-
onClose:
|
|
22575
|
-
anchorRef:
|
|
22656
|
+
open: _,
|
|
22657
|
+
onClose: Ee,
|
|
22658
|
+
anchorRef: d,
|
|
22576
22659
|
actions: /* @__PURE__ */ k(D, { children: [
|
|
22577
|
-
|
|
22578
|
-
|
|
22579
|
-
|
|
22660
|
+
Pe("enlarged"),
|
|
22661
|
+
Fe("enlarged"),
|
|
22662
|
+
Ie("enlarged")
|
|
22580
22663
|
] }),
|
|
22581
|
-
children:
|
|
22664
|
+
children: m !== null && /* @__PURE__ */ O("div", {
|
|
22582
22665
|
style: {
|
|
22583
22666
|
width: "90vw",
|
|
22584
22667
|
height: "75vh"
|
|
22585
22668
|
},
|
|
22586
22669
|
children: /* @__PURE__ */ O(KT, {
|
|
22587
|
-
ref:
|
|
22588
|
-
xml:
|
|
22589
|
-
serverUrl:
|
|
22670
|
+
ref: g,
|
|
22671
|
+
xml: he("enlarged"),
|
|
22672
|
+
serverUrl: c,
|
|
22590
22673
|
title: `${e}, full size`,
|
|
22591
|
-
fallback:
|
|
22592
|
-
editing:
|
|
22593
|
-
onTouchUpChange:
|
|
22594
|
-
onPageLocked:
|
|
22595
|
-
onEscape:
|
|
22674
|
+
fallback: Le,
|
|
22675
|
+
editing: S === "enlarged",
|
|
22676
|
+
onTouchUpChange: ie,
|
|
22677
|
+
onPageLocked: De,
|
|
22678
|
+
onEscape: Ne,
|
|
22596
22679
|
className: "flex h-full flex-col"
|
|
22597
22680
|
})
|
|
22598
22681
|
})
|
|
@@ -22602,28 +22685,28 @@ function cE({ path: e, xml: t, variant: n, fallback: r, onTouchUpDirtyChange: i
|
|
|
22602
22685
|
}
|
|
22603
22686
|
//#endregion
|
|
22604
22687
|
//#region ../ui/src/components/AssistantMessage.tsx
|
|
22605
|
-
function
|
|
22688
|
+
function hE(e) {
|
|
22606
22689
|
return e === "className" || Array.isArray(e) && e[0] === "className";
|
|
22607
22690
|
}
|
|
22608
|
-
function
|
|
22691
|
+
function gE(e) {
|
|
22609
22692
|
let t = {};
|
|
22610
|
-
for (let [n, r] of Object.entries(e)) t[n] = r.filter((e) => !
|
|
22693
|
+
for (let [n, r] of Object.entries(e)) t[n] = r.filter((e) => !hE(e));
|
|
22611
22694
|
return t["*"] = [...t["*"] ?? [], "className"], t;
|
|
22612
22695
|
}
|
|
22613
|
-
var
|
|
22696
|
+
var _E = {
|
|
22614
22697
|
...xT,
|
|
22615
22698
|
tagNames: [.../* @__PURE__ */ new Set([
|
|
22616
22699
|
...xT.tagNames ?? [],
|
|
22617
22700
|
"details",
|
|
22618
22701
|
"summary"
|
|
22619
22702
|
])],
|
|
22620
|
-
attributes:
|
|
22621
|
-
},
|
|
22703
|
+
attributes: gE(xT.attributes ?? {})
|
|
22704
|
+
}, vE = [
|
|
22622
22705
|
yT,
|
|
22623
|
-
[RT,
|
|
22706
|
+
[RT, _E],
|
|
22624
22707
|
Mb
|
|
22625
|
-
],
|
|
22626
|
-
function
|
|
22708
|
+
], yE = [d, m];
|
|
22709
|
+
function bE(e) {
|
|
22627
22710
|
let t = g("", e);
|
|
22628
22711
|
try {
|
|
22629
22712
|
return decodeURIComponent(t);
|
|
@@ -22631,10 +22714,10 @@ function mE(e) {
|
|
|
22631
22714
|
return t;
|
|
22632
22715
|
}
|
|
22633
22716
|
}
|
|
22634
|
-
function
|
|
22717
|
+
function xE(e) {
|
|
22635
22718
|
return typeof e == "string" && e !== "" && !y(e) && _(e.split(/[?#]/)[0]);
|
|
22636
22719
|
}
|
|
22637
|
-
function
|
|
22720
|
+
function SE({ text: e }) {
|
|
22638
22721
|
let [t, n] = E(!1);
|
|
22639
22722
|
return /* @__PURE__ */ k("div", {
|
|
22640
22723
|
className: "my-1 rounded-lg border border-zinc-200 bg-zinc-50 text-sm dark:border-zinc-800/80 dark:bg-zinc-900/40",
|
|
@@ -22655,13 +22738,13 @@ function gE({ text: e }) {
|
|
|
22655
22738
|
})]
|
|
22656
22739
|
});
|
|
22657
22740
|
}
|
|
22658
|
-
function
|
|
22741
|
+
function CE({ item: e, serverUrl: t = "", token: n = null, workspace: r, onOpenFile: i, hideReasoning: a = !1 }) {
|
|
22659
22742
|
let o = a ? e.blocks.filter((e) => e.type !== "thinking") : e.blocks, c = e.blocks.filter((e) => e.type === "text").map((e) => e.text).join("\n\n").trim(), l = T(i);
|
|
22660
22743
|
l.current = i;
|
|
22661
22744
|
let u = se(() => {
|
|
22662
22745
|
function e({ src: e, alt: i, ...a }) {
|
|
22663
|
-
if (
|
|
22664
|
-
path:
|
|
22746
|
+
if (xE(e)) return /* @__PURE__ */ O(mE, {
|
|
22747
|
+
path: bE(e),
|
|
22665
22748
|
variant: "reply"
|
|
22666
22749
|
});
|
|
22667
22750
|
let o = typeof e == "string" && e !== "" && !y(e) ? v(t, g("", e), n, void 0, r) : e;
|
|
@@ -22695,7 +22778,7 @@ function _E({ item: e, serverUrl: t = "", token: n = null, workspace: r, onOpenF
|
|
|
22695
22778
|
}
|
|
22696
22779
|
function a({ node: e, children: t, ...n }) {
|
|
22697
22780
|
let r = (e?.children ?? []).filter((e) => e.type !== "text" || (e.value ?? "").trim() !== "");
|
|
22698
|
-
return r.length > 0 && r.every((e) => e.type === "element" && e.tagName === "img" &&
|
|
22781
|
+
return r.length > 0 && r.every((e) => e.type === "element" && e.tagName === "img" && xE(e.properties?.src)) ? /* @__PURE__ */ O("div", {
|
|
22699
22782
|
className: "my-2",
|
|
22700
22783
|
children: t
|
|
22701
22784
|
}) : /* @__PURE__ */ O("p", {
|
|
@@ -22721,11 +22804,11 @@ function _E({ item: e, serverUrl: t = "", token: n = null, workspace: r, onOpenF
|
|
|
22721
22804
|
className: "flex justify-end opacity-0 transition-opacity group-hover:opacity-100",
|
|
22722
22805
|
children: /* @__PURE__ */ O(de, { text: c })
|
|
22723
22806
|
}),
|
|
22724
|
-
o.map((e, t) => e.type === "thinking" ? /* @__PURE__ */ O(
|
|
22807
|
+
o.map((e, t) => e.type === "thinking" ? /* @__PURE__ */ O(SE, { text: e.text }, e.contentIndex ?? t) : /* @__PURE__ */ O("div", {
|
|
22725
22808
|
className: "prose-chat",
|
|
22726
22809
|
children: /* @__PURE__ */ O(lh, {
|
|
22727
|
-
remarkPlugins:
|
|
22728
|
-
rehypePlugins:
|
|
22810
|
+
remarkPlugins: yE,
|
|
22811
|
+
rehypePlugins: vE,
|
|
22729
22812
|
components: u,
|
|
22730
22813
|
children: s(e.text)
|
|
22731
22814
|
})
|
|
@@ -22739,20 +22822,20 @@ function _E({ item: e, serverUrl: t = "", token: n = null, workspace: r, onOpenF
|
|
|
22739
22822
|
}
|
|
22740
22823
|
//#endregion
|
|
22741
22824
|
//#region ../shared/src/protocol.ts
|
|
22742
|
-
var
|
|
22825
|
+
var wE = [
|
|
22743
22826
|
"off",
|
|
22744
22827
|
"minimal",
|
|
22745
22828
|
"low",
|
|
22746
22829
|
"medium",
|
|
22747
22830
|
"high",
|
|
22748
22831
|
"xhigh"
|
|
22749
|
-
],
|
|
22832
|
+
], TE = "worktree", EE = class extends Error {
|
|
22750
22833
|
kind;
|
|
22751
22834
|
constructor(e, t) {
|
|
22752
22835
|
super(e), this.name = "HistoryError", this.kind = t;
|
|
22753
22836
|
}
|
|
22754
22837
|
};
|
|
22755
|
-
async function
|
|
22838
|
+
async function DE(e, t) {
|
|
22756
22839
|
let n = [];
|
|
22757
22840
|
for (;;) {
|
|
22758
22841
|
let r = await e(n.length, 50);
|
|
@@ -22760,4 +22843,4 @@ async function xE(e, t) {
|
|
|
22760
22843
|
}
|
|
22761
22844
|
}
|
|
22762
22845
|
//#endregion
|
|
22763
|
-
export {
|
|
22846
|
+
export { _f as A, dp as C, Ef as D, Mf as E, Ce as F, fe as I, de as L, Jd as M, Zl as N, xf as O, Ae as P, le as R, mp as S, cp as T, Jb as _, CE as a, lh as b, aE as c, YT as d, qT as f, yT as g, RT as h, TE as i, yf as j, bf as k, rE as l, KT as m, DE as n, _E as o, JT as p, wE as r, mE as s, EE as t, oE as u, Pb as v, fp as w, ih as x, Mb as y, ue as z };
|