@lemoncat7/dsh-partner 1.4.0 → 1.4.1
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/lib/client.js +64 -29
- package/lib/client.js.map +2 -2
- package/lib/glass-surface.d.ts.map +1 -1
- package/lib/glass-surface.js +30 -14
- package/lib/glass-surface.js.map +1 -1
- package/package.json +1 -1
package/lib/client.js
CHANGED
|
@@ -2386,21 +2386,27 @@ function GlassSurface({
|
|
|
2386
2386
|
const greenRef = (0, import_react3.useRef)(null);
|
|
2387
2387
|
const blueRef = (0, import_react3.useRef)(null);
|
|
2388
2388
|
const glareFrameRef = (0, import_react3.useRef)(0);
|
|
2389
|
-
const
|
|
2389
|
+
const glarePointerRef = (0, import_react3.useRef)();
|
|
2390
2390
|
const [svgSupported, setSvgSupported] = (0, import_react3.useState)(false);
|
|
2391
2391
|
(0, import_react3.useEffect)(() => {
|
|
2392
2392
|
setSvgSupported(supportsSvgBackdropFilter(filterId));
|
|
2393
2393
|
}, [filterId]);
|
|
2394
2394
|
(0, import_react3.useEffect)(() => {
|
|
2395
|
+
if (!svgSupported) return;
|
|
2395
2396
|
const element = containerRef.current;
|
|
2396
2397
|
const image = imageRef.current;
|
|
2397
2398
|
if (element === null || image === null) return;
|
|
2398
2399
|
let frame = 0;
|
|
2400
|
+
let previousWidth = 0;
|
|
2401
|
+
let previousHeight = 0;
|
|
2399
2402
|
const update = () => {
|
|
2400
2403
|
frame = 0;
|
|
2401
2404
|
const rect = element.getBoundingClientRect();
|
|
2402
2405
|
const width = Math.max(1, Math.round(rect.width));
|
|
2403
2406
|
const height = Math.max(1, Math.round(rect.height));
|
|
2407
|
+
if (width === previousWidth && height === previousHeight) return;
|
|
2408
|
+
previousWidth = width;
|
|
2409
|
+
previousHeight = height;
|
|
2404
2410
|
image.setAttribute("href", displacementMap(
|
|
2405
2411
|
width,
|
|
2406
2412
|
height,
|
|
@@ -2423,12 +2429,13 @@ function GlassSurface({
|
|
|
2423
2429
|
if (frame !== 0) cancelAnimationFrame(frame);
|
|
2424
2430
|
observer?.disconnect();
|
|
2425
2431
|
};
|
|
2426
|
-
}, [blueGradientId, blur, borderRadius, borderWidth, brightness, opacity, redGradientId]);
|
|
2432
|
+
}, [blueGradientId, blur, borderRadius, borderWidth, brightness, opacity, redGradientId, svgSupported]);
|
|
2427
2433
|
(0, import_react3.useEffect)(() => {
|
|
2434
|
+
if (!svgSupported) return;
|
|
2428
2435
|
const channels = [redRef.current, greenRef.current, blueRef.current];
|
|
2429
2436
|
const offsets = [0, 5, 10];
|
|
2430
2437
|
channels.forEach((channel, index) => channel?.setAttribute("scale", String(distortionScale + (offsets[index] ?? 0))));
|
|
2431
|
-
}, [distortionScale]);
|
|
2438
|
+
}, [distortionScale, svgSupported]);
|
|
2432
2439
|
(0, import_react3.useEffect)(() => () => {
|
|
2433
2440
|
if (glareFrameRef.current !== 0) cancelAnimationFrame(glareFrameRef.current);
|
|
2434
2441
|
}, []);
|
|
@@ -2436,25 +2443,30 @@ function GlassSurface({
|
|
|
2436
2443
|
glareFrameRef.current = 0;
|
|
2437
2444
|
const element = containerRef.current;
|
|
2438
2445
|
if (element === null) return;
|
|
2439
|
-
|
|
2440
|
-
|
|
2446
|
+
const pointer = glarePointerRef.current;
|
|
2447
|
+
if (pointer === void 0) {
|
|
2448
|
+
element.style.setProperty("--partner-glare-x", "50%");
|
|
2449
|
+
element.style.setProperty("--partner-glare-y", "50%");
|
|
2450
|
+
return;
|
|
2451
|
+
}
|
|
2452
|
+
const rect = element.getBoundingClientRect();
|
|
2453
|
+
if (rect.width === 0 || rect.height === 0) return;
|
|
2454
|
+
const x = Math.max(0, Math.min(100, (pointer.clientX - rect.left) / rect.width * 100));
|
|
2455
|
+
const y = Math.max(0, Math.min(100, (pointer.clientY - rect.top) / rect.height * 100));
|
|
2456
|
+
element.style.setProperty("--partner-glare-x", `${x}%`);
|
|
2457
|
+
element.style.setProperty("--partner-glare-y", `${y}%`);
|
|
2441
2458
|
};
|
|
2442
2459
|
const scheduleGlare = () => {
|
|
2443
2460
|
if (glareFrameRef.current === 0) glareFrameRef.current = requestAnimationFrame(renderGlare);
|
|
2444
2461
|
};
|
|
2445
2462
|
const moveGlare = (clientX, clientY) => {
|
|
2446
|
-
|
|
2447
|
-
|
|
2448
|
-
const rect = element.getBoundingClientRect();
|
|
2449
|
-
glarePositionRef.current = {
|
|
2450
|
-
x: Math.max(0, Math.min(100, (clientX - rect.left) / rect.width * 100)),
|
|
2451
|
-
y: Math.max(0, Math.min(100, (clientY - rect.top) / rect.height * 100))
|
|
2452
|
-
};
|
|
2463
|
+
if (!interactive) return;
|
|
2464
|
+
glarePointerRef.current = { clientX, clientY };
|
|
2453
2465
|
scheduleGlare();
|
|
2454
2466
|
};
|
|
2455
2467
|
const resetGlare = () => {
|
|
2456
2468
|
if (!interactive) return;
|
|
2457
|
-
|
|
2469
|
+
glarePointerRef.current = void 0;
|
|
2458
2470
|
scheduleGlare();
|
|
2459
2471
|
};
|
|
2460
2472
|
const style = {
|
|
@@ -2473,7 +2485,7 @@ function GlassSurface({
|
|
|
2473
2485
|
onPointerMove: interactive ? (event) => moveGlare(event.clientX, event.clientY) : void 0,
|
|
2474
2486
|
onPointerLeave: interactive ? resetGlare : void 0,
|
|
2475
2487
|
children: [
|
|
2476
|
-
/* @__PURE__ */ (0, import_jsx_runtime.jsx)("svg", { className: "dsh-partner-glass-filter", xmlns: "http://www.w3.org/2000/svg", "aria-hidden": "true", focusable: "false", children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)("defs", { children: /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("filter", { id: filterId, colorInterpolationFilters: "sRGB", x: "0%", y: "0%", width: "100%", height: "100%", children: [
|
|
2488
|
+
svgSupported && /* @__PURE__ */ (0, import_jsx_runtime.jsx)("svg", { className: "dsh-partner-glass-filter", xmlns: "http://www.w3.org/2000/svg", "aria-hidden": "true", focusable: "false", children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)("defs", { children: /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("filter", { id: filterId, colorInterpolationFilters: "sRGB", x: "0%", y: "0%", width: "100%", height: "100%", children: [
|
|
2477
2489
|
/* @__PURE__ */ (0, import_jsx_runtime.jsx)("feImage", { ref: imageRef, x: "0", y: "0", width: "100%", height: "100%", preserveAspectRatio: "none", result: "map" }),
|
|
2478
2490
|
/* @__PURE__ */ (0, import_jsx_runtime.jsx)("feDisplacementMap", { ref: redRef, in: "SourceGraphic", in2: "map", result: "displaced-red" }),
|
|
2479
2491
|
/* @__PURE__ */ (0, import_jsx_runtime.jsx)("feColorMatrix", { in: "displaced-red", type: "matrix", values: "1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0", result: "red" }),
|
|
@@ -3078,19 +3090,19 @@ function MemoryPanel({ companion, snapshot, openSession, renewSession, onChanged
|
|
|
3078
3090
|
const [profiles, setProfiles] = (0, import_react4.useState)([]);
|
|
3079
3091
|
const [concernActivity, setConcernActivity] = (0, import_react4.useState)({ concerns: [], observations: [] });
|
|
3080
3092
|
const [newConcern, setNewConcern] = (0, import_react4.useState)("");
|
|
3081
|
-
const [
|
|
3093
|
+
const [memoryRevision, setMemoryRevision] = (0, import_react4.useState)(0);
|
|
3082
3094
|
const [editing, setEditing] = (0, import_react4.useState)();
|
|
3083
3095
|
const [busy, setBusy] = (0, import_react4.useState)(false);
|
|
3084
3096
|
const [notice, setNotice] = (0, import_react4.useState)();
|
|
3085
3097
|
const [error, setError] = (0, import_react4.useState)();
|
|
3086
3098
|
const [modelCatalog, setModelCatalog] = (0, import_react4.useState)();
|
|
3087
3099
|
const loadMemory = (0, import_react4.useCallback)(async () => {
|
|
3088
|
-
const [result,
|
|
3100
|
+
const [result, activity] = await Promise.all([api(`/companions/${companion.id}/memory`), api(`/companions/${companion.id}/concerns`)]);
|
|
3089
3101
|
setMemories(result.memories);
|
|
3090
3102
|
setReflections(result.reflections);
|
|
3091
3103
|
setProfiles(result.profiles);
|
|
3092
|
-
setGraph(relations);
|
|
3093
3104
|
setConcernActivity(activity);
|
|
3105
|
+
setMemoryRevision((value) => value + 1);
|
|
3094
3106
|
}, [companion.id]);
|
|
3095
3107
|
(0, import_react4.useEffect)(() => {
|
|
3096
3108
|
setAutomation(structuredClone(companion.automation));
|
|
@@ -3210,12 +3222,12 @@ function MemoryPanel({ companion, snapshot, openSession, renewSession, onChanged
|
|
|
3210
3222
|
return /* @__PURE__ */ (0, import_jsx_runtime2.jsxs)("div", { className: "dsh-partner-form is-memory", children: [
|
|
3211
3223
|
/* @__PURE__ */ (0, import_jsx_runtime2.jsx)(Section, { eyebrow: "CONTINUITY", title: "\u4F1A\u8BDD\u8BB0\u5FC6", detail: "\u8FD9\u91CC\u5C55\u793A\u6E20\u9053\u4F1A\u8BDD\u8FB9\u754C\u3002\u77E5\u8BC6\u5E93\u4ECD\u7531\u77E5\u8BC6\u5E93\u63D2\u4EF6\u7BA1\u7406\uFF0C\u4F19\u4F34\u4E0D\u4F1A\u628A\u4E0D\u540C\u5FAE\u4FE1\u8054\u7CFB\u4EBA\u7684\u539F\u59CB\u4E0A\u4E0B\u6587\u6DF7\u5728\u4E00\u8D77\u3002" }),
|
|
3212
3224
|
/* @__PURE__ */ (0, import_jsx_runtime2.jsxs)("div", { className: "dsh-partner-metrics", children: [
|
|
3213
|
-
/* @__PURE__ */ (0, import_jsx_runtime2.jsxs)(
|
|
3225
|
+
/* @__PURE__ */ (0, import_jsx_runtime2.jsxs)("article", { children: [
|
|
3214
3226
|
/* @__PURE__ */ (0, import_jsx_runtime2.jsx)("small", { children: "\u6E20\u9053\u4F1A\u8BDD" }),
|
|
3215
3227
|
/* @__PURE__ */ (0, import_jsx_runtime2.jsx)("strong", { children: sessions.length }),
|
|
3216
3228
|
/* @__PURE__ */ (0, import_jsx_runtime2.jsx)("p", { children: "\u6BCF\u4F4D\u8054\u7CFB\u4EBA\u72EC\u7ACB" })
|
|
3217
3229
|
] }),
|
|
3218
|
-
/* @__PURE__ */ (0, import_jsx_runtime2.jsxs)(
|
|
3230
|
+
/* @__PURE__ */ (0, import_jsx_runtime2.jsxs)("article", { children: [
|
|
3219
3231
|
/* @__PURE__ */ (0, import_jsx_runtime2.jsx)("small", { children: "\u957F\u671F\u8BB0\u5FC6" }),
|
|
3220
3232
|
/* @__PURE__ */ (0, import_jsx_runtime2.jsx)("strong", { children: memories.filter((item) => item.status === "active").length }),
|
|
3221
3233
|
/* @__PURE__ */ (0, import_jsx_runtime2.jsxs)("p", { children: [
|
|
@@ -3223,14 +3235,14 @@ function MemoryPanel({ companion, snapshot, openSession, renewSession, onChanged
|
|
|
3223
3235
|
" \u7BC7\u6BCF\u65E5\u56DE\u987E"
|
|
3224
3236
|
] })
|
|
3225
3237
|
] }),
|
|
3226
|
-
/* @__PURE__ */ (0, import_jsx_runtime2.jsxs)(
|
|
3238
|
+
/* @__PURE__ */ (0, import_jsx_runtime2.jsxs)("article", { children: [
|
|
3227
3239
|
/* @__PURE__ */ (0, import_jsx_runtime2.jsx)("small", { children: "\u6700\u8FD1\u5FC3\u8DF3" }),
|
|
3228
3240
|
/* @__PURE__ */ (0, import_jsx_runtime2.jsx)("strong", { children: heartbeat?.lastCheckedAt ? relativeTime(heartbeat.lastCheckedAt) : "\u5C1A\u672A" }),
|
|
3229
3241
|
/* @__PURE__ */ (0, import_jsx_runtime2.jsx)("p", { children: heartbeat?.lastError ? "\u4E0A\u6B21\u6267\u884C\u5F02\u5E38" : `\u4ECA\u65E5\u53D1\u9001 ${heartbeat?.sentCount ?? 0} \u6B21` })
|
|
3230
3242
|
] })
|
|
3231
3243
|
] }),
|
|
3232
3244
|
/* @__PURE__ */ (0, import_jsx_runtime2.jsxs)("div", { className: "dsh-partner-automation-grid", children: [
|
|
3233
|
-
/* @__PURE__ */ (0, import_jsx_runtime2.jsxs)(
|
|
3245
|
+
/* @__PURE__ */ (0, import_jsx_runtime2.jsxs)("section", { className: "dsh-partner-automation", children: [
|
|
3234
3246
|
/* @__PURE__ */ (0, import_jsx_runtime2.jsxs)("header", { children: [
|
|
3235
3247
|
/* @__PURE__ */ (0, import_jsx_runtime2.jsxs)("span", { children: [
|
|
3236
3248
|
/* @__PURE__ */ (0, import_jsx_runtime2.jsx)("strong", { children: "\u5B66\u4E60\u4E0E\u957F\u671F\u8BB0\u5FC6" }),
|
|
@@ -3277,7 +3289,7 @@ function MemoryPanel({ companion, snapshot, openSession, renewSession, onChanged
|
|
|
3277
3289
|
}, children: "\u7ACB\u5373\u7EC8\u5BA1" })
|
|
3278
3290
|
] })
|
|
3279
3291
|
] }),
|
|
3280
|
-
/* @__PURE__ */ (0, import_jsx_runtime2.jsxs)(
|
|
3292
|
+
/* @__PURE__ */ (0, import_jsx_runtime2.jsxs)("section", { className: "dsh-partner-automation", children: [
|
|
3281
3293
|
/* @__PURE__ */ (0, import_jsx_runtime2.jsxs)("header", { children: [
|
|
3282
3294
|
/* @__PURE__ */ (0, import_jsx_runtime2.jsxs)("span", { children: [
|
|
3283
3295
|
/* @__PURE__ */ (0, import_jsx_runtime2.jsx)("strong", { children: "\u6301\u7EED\u611F\u77E5" }),
|
|
@@ -3328,7 +3340,7 @@ function MemoryPanel({ companion, snapshot, openSession, renewSession, onChanged
|
|
|
3328
3340
|
notice
|
|
3329
3341
|
] }),
|
|
3330
3342
|
error && /* @__PURE__ */ (0, import_jsx_runtime2.jsx)("p", { className: "dsh-partner-inline-error", children: error }),
|
|
3331
|
-
/* @__PURE__ */ (0, import_jsx_runtime2.jsx)(MemoryLibrary, { profiles, memories, reflections,
|
|
3343
|
+
/* @__PURE__ */ (0, import_jsx_runtime2.jsx)(MemoryLibrary, { companionId: companion.id, revision: memoryRevision, profiles, memories, reflections, editing, busy, setEditing, save: () => {
|
|
3332
3344
|
void saveMemory();
|
|
3333
3345
|
}, remove: (item) => {
|
|
3334
3346
|
void deleteMemory(item);
|
|
@@ -3422,7 +3434,7 @@ function ConcernBoard({ companionId, activity, value, busy, onValue, onAdd, onCh
|
|
|
3422
3434
|
inputRef.current?.setSelectionRange(cursor, cursor);
|
|
3423
3435
|
});
|
|
3424
3436
|
};
|
|
3425
|
-
return /* @__PURE__ */ (0, import_jsx_runtime2.jsxs)(
|
|
3437
|
+
return /* @__PURE__ */ (0, import_jsx_runtime2.jsxs)("section", { className: "dsh-partner-concern-board", "aria-labelledby": "partner-concerns-title", children: [
|
|
3426
3438
|
/* @__PURE__ */ (0, import_jsx_runtime2.jsxs)("header", { children: [
|
|
3427
3439
|
/* @__PURE__ */ (0, import_jsx_runtime2.jsxs)("span", { children: [
|
|
3428
3440
|
/* @__PURE__ */ (0, import_jsx_runtime2.jsxs)("strong", { id: "partner-concerns-title", children: [
|
|
@@ -3606,7 +3618,7 @@ function watchKindLabel(value) {
|
|
|
3606
3618
|
return value === "knowledge" ? "\u77E5\u8BC6\u5E93\u53D8\u5316" : value === "workspace" ? "\u9879\u76EE\u53D8\u5316" : value === "web" ? "\u5916\u90E8\u53D8\u5316" : "\u6309\u4E8B\u60C5\u5224\u65AD\u6765\u6E90";
|
|
3607
3619
|
}
|
|
3608
3620
|
var MEMORY_KINDS = ["all", "preference", "task", "event", "relationship", "emotion"];
|
|
3609
|
-
function MemoryLibrary({ profiles, memories, reflections,
|
|
3621
|
+
function MemoryLibrary({ companionId, revision, profiles, memories, reflections, editing, busy, setEditing, save, remove }) {
|
|
3610
3622
|
const activeMemories = (0, import_react4.useMemo)(() => memories.filter((item) => item.status === "active" && item.kind !== "profile"), [memories]);
|
|
3611
3623
|
const profileMemories = (0, import_react4.useMemo)(() => memories.filter((item) => item.status === "active" && item.kind === "profile"), [memories]);
|
|
3612
3624
|
const [mode, setMode] = (0, import_react4.useState)("profile");
|
|
@@ -3614,6 +3626,29 @@ function MemoryLibrary({ profiles, memories, reflections, graph, editing, busy,
|
|
|
3614
3626
|
const [query, setQuery] = (0, import_react4.useState)("");
|
|
3615
3627
|
const [selectedMemoryId, setSelectedMemoryId] = (0, import_react4.useState)();
|
|
3616
3628
|
const [selectedDate, setSelectedDate] = (0, import_react4.useState)();
|
|
3629
|
+
const [graph, setGraph] = (0, import_react4.useState)();
|
|
3630
|
+
const [graphLoading, setGraphLoading] = (0, import_react4.useState)(false);
|
|
3631
|
+
const [graphError, setGraphError] = (0, import_react4.useState)();
|
|
3632
|
+
const [graphRequest, setGraphRequest] = (0, import_react4.useState)(0);
|
|
3633
|
+
(0, import_react4.useEffect)(() => {
|
|
3634
|
+
setGraph(void 0);
|
|
3635
|
+
setGraphError(void 0);
|
|
3636
|
+
setGraphLoading(false);
|
|
3637
|
+
}, [companionId, revision]);
|
|
3638
|
+
(0, import_react4.useEffect)(() => {
|
|
3639
|
+
if (mode !== "graph" || graph !== void 0) return;
|
|
3640
|
+
const controller = new AbortController();
|
|
3641
|
+
setGraphLoading(true);
|
|
3642
|
+
setGraphError(void 0);
|
|
3643
|
+
void api(`/companions/${companionId}/memory/graph`, { signal: controller.signal }).then((result) => {
|
|
3644
|
+
if (!controller.signal.aborted) setGraph(result);
|
|
3645
|
+
}).catch((reason) => {
|
|
3646
|
+
if (!controller.signal.aborted) setGraphError(message(reason));
|
|
3647
|
+
}).finally(() => {
|
|
3648
|
+
if (!controller.signal.aborted) setGraphLoading(false);
|
|
3649
|
+
});
|
|
3650
|
+
return () => controller.abort();
|
|
3651
|
+
}, [companionId, graph, graphRequest, mode, revision]);
|
|
3617
3652
|
const normalized = query.trim().toLocaleLowerCase();
|
|
3618
3653
|
const filteredMemories = (0, import_react4.useMemo)(() => activeMemories.filter(
|
|
3619
3654
|
(item) => (kind === "all" || item.kind === kind) && (!normalized || `${item.subject} ${item.content}`.toLocaleLowerCase().includes(normalized))
|
|
@@ -3623,7 +3658,7 @@ function MemoryLibrary({ profiles, memories, reflections, graph, editing, busy,
|
|
|
3623
3658
|
), [reflections, normalized]);
|
|
3624
3659
|
const selectedMemory = filteredMemories.find((item) => item.id === selectedMemoryId) ?? filteredMemories[0];
|
|
3625
3660
|
const selectedReflection = filteredReflections.find((item) => item.date === selectedDate) ?? filteredReflections[0];
|
|
3626
|
-
return /* @__PURE__ */ (0, import_jsx_runtime2.jsxs)(
|
|
3661
|
+
return /* @__PURE__ */ (0, import_jsx_runtime2.jsxs)("section", { className: "dsh-partner-memory-library", children: [
|
|
3627
3662
|
/* @__PURE__ */ (0, import_jsx_runtime2.jsxs)("header", { className: "dsh-partner-library-header", children: [
|
|
3628
3663
|
/* @__PURE__ */ (0, import_jsx_runtime2.jsxs)("span", { children: [
|
|
3629
3664
|
/* @__PURE__ */ (0, import_jsx_runtime2.jsx)("small", { children: "MEMORY LIBRARY" }),
|
|
@@ -3645,7 +3680,7 @@ function MemoryLibrary({ profiles, memories, reflections, graph, editing, busy,
|
|
|
3645
3680
|
] }),
|
|
3646
3681
|
/* @__PURE__ */ (0, import_jsx_runtime2.jsxs)("button", { type: "button", className: mode === "graph" ? "is-active" : "", onClick: () => setMode("graph"), children: [
|
|
3647
3682
|
"\u5173\u7CFB\u56FE\u8C31 ",
|
|
3648
|
-
/* @__PURE__ */ (0, import_jsx_runtime2.jsx)("b", { children: graph
|
|
3683
|
+
/* @__PURE__ */ (0, import_jsx_runtime2.jsx)("b", { children: graph?.relations.length ?? "\u2014" })
|
|
3649
3684
|
] })
|
|
3650
3685
|
] })
|
|
3651
3686
|
] }),
|
|
@@ -3683,7 +3718,7 @@ function MemoryLibrary({ profiles, memories, reflections, graph, editing, busy,
|
|
|
3683
3718
|
] })
|
|
3684
3719
|
] }, entry.date)) }),
|
|
3685
3720
|
/* @__PURE__ */ (0, import_jsx_runtime2.jsx)("div", { className: "dsh-partner-library-detail", children: selectedReflection ? /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(DailyReflectionDetail, { entry: selectedReflection }) : /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(State, { title: "\u9009\u62E9\u4E00\u5929", detail: "\u5F53\u5929\u7684\u603B\u7ED3\u4E0E\u5F85\u529E\u4F1A\u663E\u793A\u5728\u8FD9\u91CC\u3002", compact: true }) })
|
|
3686
|
-
] }) : /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(MemoryGraph, { graph, profiles, query: normalized, inspect: (item) => {
|
|
3721
|
+
] }) : graphError ? /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(State, { title: "\u5173\u7CFB\u56FE\u8C31\u52A0\u8F7D\u5931\u8D25", detail: graphError, action: /* @__PURE__ */ (0, import_jsx_runtime2.jsx)("button", { type: "button", onClick: () => setGraphRequest((value) => value + 1), children: "\u91CD\u65B0\u52A0\u8F7D" }) }) : graphLoading || graph === void 0 ? /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(State, { title: "\u6B63\u5728\u52A0\u8F7D\u5173\u7CFB\u56FE\u8C31", detail: "\u53EA\u5728\u9700\u8981\u67E5\u770B\u5173\u7CFB\u65F6\u8BFB\u53D6\u5BA1\u8BA1\u6570\u636E\u3002" }) : /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(MemoryGraph, { graph, profiles, query: normalized, inspect: (item) => {
|
|
3687
3722
|
setEditing(void 0);
|
|
3688
3723
|
if (item.kind === "profile") setMode("profile");
|
|
3689
3724
|
else {
|
|
@@ -3875,7 +3910,7 @@ function MemoryGraph({ graph, profiles, query, inspect }) {
|
|
|
3875
3910
|
] });
|
|
3876
3911
|
}
|
|
3877
3912
|
function GraphMemory({ item, side, inspect }) {
|
|
3878
|
-
return /* @__PURE__ */ (0, import_jsx_runtime2.jsxs)(
|
|
3913
|
+
return /* @__PURE__ */ (0, import_jsx_runtime2.jsxs)("section", { children: [
|
|
3879
3914
|
/* @__PURE__ */ (0, import_jsx_runtime2.jsxs)("header", { children: [
|
|
3880
3915
|
/* @__PURE__ */ (0, import_jsx_runtime2.jsxs)("small", { children: [
|
|
3881
3916
|
side,
|