dsh-context 0.54.3 → 0.54.4
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 +65 -9
- package/lib/index.js +6 -4
- package/package.json +3 -2
package/lib/client.js
CHANGED
|
@@ -3,10 +3,33 @@ window.__ModuleLoader__.load({
|
|
|
3
3
|
factory: (require) => {
|
|
4
4
|
var module = { exports: {} };
|
|
5
5
|
module.exports;
|
|
6
|
+
//#region \0rolldown/runtime.js
|
|
7
|
+
var __create = Object.create;
|
|
8
|
+
var __defProp = Object.defineProperty;
|
|
9
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
10
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
11
|
+
var __getProtoOf = Object.getPrototypeOf;
|
|
12
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
13
|
+
var __copyProps = (to, from, except, desc) => {
|
|
14
|
+
if (from && typeof from === "object" || typeof from === "function") for (var keys = __getOwnPropNames(from), i = 0, n = keys.length, key; i < n; i++) {
|
|
15
|
+
key = keys[i];
|
|
16
|
+
if (!__hasOwnProp.call(to, key) && key !== except) __defProp(to, key, {
|
|
17
|
+
get: ((k) => from[k]).bind(null, key),
|
|
18
|
+
enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable
|
|
19
|
+
});
|
|
20
|
+
}
|
|
21
|
+
return to;
|
|
22
|
+
};
|
|
23
|
+
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(isNodeMode || !mod || !mod.__esModule || !__hasOwnProp.call(mod, "default") ? __defProp(target, "default", {
|
|
24
|
+
value: mod,
|
|
25
|
+
enumerable: true
|
|
26
|
+
}) : target, mod));
|
|
27
|
+
//#endregion
|
|
6
28
|
let react = require("react");
|
|
7
29
|
let react_jsx_runtime = require("react/jsx-runtime");
|
|
8
30
|
let react_dom = require("react-dom");
|
|
9
31
|
let _deepseek_ai_dsh_client_ui_primitives = require("@deepseek-ai/dsh-client-ui-primitives");
|
|
32
|
+
_deepseek_ai_dsh_client_ui_primitives = __toESM(_deepseek_ai_dsh_client_ui_primitives, 1);
|
|
10
33
|
//#region src/client/i18n.ts
|
|
11
34
|
const DICT_ZH = {
|
|
12
35
|
"tab": "上下文",
|
|
@@ -3411,6 +3434,39 @@ window.__ModuleLoader__.load({
|
|
|
3411
3434
|
return t("browser.loading");
|
|
3412
3435
|
}
|
|
3413
3436
|
//#endregion
|
|
3437
|
+
//#region src/client/primitives.ts
|
|
3438
|
+
/** The platform module's export surface, read by name (the two vocabularies meet here). */
|
|
3439
|
+
const ns = _deepseek_ai_dsh_client_ui_primitives;
|
|
3440
|
+
/**
|
|
3441
|
+
* Read one export through a bounded catch: partial module mocks (and any
|
|
3442
|
+
* hostile namespace) may throw on the property access itself, which must
|
|
3443
|
+
* degrade to "not this spelling", never crash the importer.
|
|
3444
|
+
*/
|
|
3445
|
+
function read(source, key) {
|
|
3446
|
+
try {
|
|
3447
|
+
return source[key];
|
|
3448
|
+
} catch {
|
|
3449
|
+
return;
|
|
3450
|
+
}
|
|
3451
|
+
}
|
|
3452
|
+
/**
|
|
3453
|
+
* Resolve one icon across the range's two spellings: the modern
|
|
3454
|
+
* `…OutlineRegular`/`…OutlineMedium` name first, then the legacy
|
|
3455
|
+
* `…Outline16`/`…Outline14` one; neither present (or not a component)
|
|
3456
|
+
* renders nothing. `source` overrides the platform namespace for tests.
|
|
3457
|
+
*/
|
|
3458
|
+
function resolveIcon(modern, legacy, source = ns) {
|
|
3459
|
+
const found = read(source, modern) ?? read(source, legacy);
|
|
3460
|
+
return typeof found === "function" ? found : () => null;
|
|
3461
|
+
}
|
|
3462
|
+
const IconBranch = resolveIcon("IconBranchOutlineRegular", "IconBranchOutline16");
|
|
3463
|
+
const IconPlus = resolveIcon("IconPlusOutlineRegular", "IconPlusOutline16");
|
|
3464
|
+
const IconCheck = resolveIcon("IconCheckOutlineRegular", "IconCheckOutline16");
|
|
3465
|
+
const IconCopy = resolveIcon("IconCopyOutlineRegular", "IconCopyOutline16");
|
|
3466
|
+
const IconClose = resolveIcon("IconCloseOutlineRegular", "IconCloseOutline16");
|
|
3467
|
+
const IconSettings = resolveIcon("IconSettingsOutlineMedium", "IconSettingsOutline14");
|
|
3468
|
+
const IconChevronDown = resolveIcon("IconChevronDownOutlineMedium", "IconChevronDownOutline14");
|
|
3469
|
+
//#endregion
|
|
3414
3470
|
//#region src/client/format.ts
|
|
3415
3471
|
/** `fmt`: the k/M/B suffix style shared by bars/details/stats; `fmtTime`: local HH:MM:SS. */
|
|
3416
3472
|
function fmt(n) {
|
|
@@ -3686,7 +3742,7 @@ window.__ModuleLoader__.load({
|
|
|
3686
3742
|
className: "lc-att-lightbox-close",
|
|
3687
3743
|
"aria-label": labels.close,
|
|
3688
3744
|
onClick: onClose,
|
|
3689
|
-
children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(
|
|
3745
|
+
children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(IconClose, { size: 16 })
|
|
3690
3746
|
})
|
|
3691
3747
|
]
|
|
3692
3748
|
}), document.body);
|
|
@@ -3852,7 +3908,7 @@ window.__ModuleLoader__.load({
|
|
|
3852
3908
|
title: label,
|
|
3853
3909
|
"aria-label": label,
|
|
3854
3910
|
onClick: onCopy,
|
|
3855
|
-
children: copied ? /* @__PURE__ */ (0, react_jsx_runtime.jsx)(
|
|
3911
|
+
children: copied ? /* @__PURE__ */ (0, react_jsx_runtime.jsx)(IconCheck, { size: 13 }) : /* @__PURE__ */ (0, react_jsx_runtime.jsx)(IconCopy, { size: 13 })
|
|
3856
3912
|
});
|
|
3857
3913
|
}
|
|
3858
3914
|
function RichText(props) {
|
|
@@ -7335,7 +7391,7 @@ window.__ModuleLoader__.load({
|
|
|
7335
7391
|
onClick: () => {
|
|
7336
7392
|
setOpen((v) => !v);
|
|
7337
7393
|
},
|
|
7338
|
-
children: [active, /* @__PURE__ */ (0, react_jsx_runtime.jsx)(
|
|
7394
|
+
children: [active, /* @__PURE__ */ (0, react_jsx_runtime.jsx)(IconChevronDown, {})]
|
|
7339
7395
|
})
|
|
7340
7396
|
})]
|
|
7341
7397
|
});
|
|
@@ -7375,7 +7431,7 @@ window.__ModuleLoader__.load({
|
|
|
7375
7431
|
className: "lc-settings-desc",
|
|
7376
7432
|
children: t("settings.desc")
|
|
7377
7433
|
})]
|
|
7378
|
-
}), /* @__PURE__ */ (0, react_jsx_runtime.jsx)(
|
|
7434
|
+
}), /* @__PURE__ */ (0, react_jsx_runtime.jsx)(IconChevronDown, { className: "lc-settings-chevron" })]
|
|
7379
7435
|
}), open ? /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", {
|
|
7380
7436
|
className: "lc-settings-body",
|
|
7381
7437
|
children: [
|
|
@@ -9292,7 +9348,7 @@ window.__ModuleLoader__.load({
|
|
|
9292
9348
|
children: sorted.map((ev) => {
|
|
9293
9349
|
const label = eventLabel(ev);
|
|
9294
9350
|
const at = eventAt(ev);
|
|
9295
|
-
const glyph = ev.kind === "inject" ? /* @__PURE__ */ (0, react_jsx_runtime.jsx)(
|
|
9351
|
+
const glyph = ev.kind === "inject" ? /* @__PURE__ */ (0, react_jsx_runtime.jsx)(IconPlus, {}) : ev.kind === "model" ? /* @__PURE__ */ (0, react_jsx_runtime.jsx)(IconBranch, {}) : EVENT_ICONS[ev.kind] || "•";
|
|
9296
9352
|
return /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", {
|
|
9297
9353
|
className: "lc-event @max-[380px]/lc-card:flex-wrap",
|
|
9298
9354
|
children: [
|
|
@@ -9737,7 +9793,7 @@ window.__ModuleLoader__.load({
|
|
|
9737
9793
|
return function PluginInfo() {
|
|
9738
9794
|
const [latest, setLatest] = (0, react.useState)(null);
|
|
9739
9795
|
(0, react.useEffect)(() => {
|
|
9740
|
-
if ("0.54.
|
|
9796
|
+
if ("0.54.4".includes("-dev")) return;
|
|
9741
9797
|
let on = true;
|
|
9742
9798
|
fetchLatestVersion().then((v) => {
|
|
9743
9799
|
if (on && v) setLatest(v);
|
|
@@ -9746,8 +9802,8 @@ window.__ModuleLoader__.load({
|
|
|
9746
9802
|
on = false;
|
|
9747
9803
|
};
|
|
9748
9804
|
}, []);
|
|
9749
|
-
const update = latest !== null && isNewerVersion(latest, "0.54.
|
|
9750
|
-
const nameText = "dsh-context (v0.54.
|
|
9805
|
+
const update = latest !== null && isNewerVersion(latest, "0.54.4") ? latest : null;
|
|
9806
|
+
const nameText = "dsh-context (v0.54.4)";
|
|
9751
9807
|
const nameValue = [nameText];
|
|
9752
9808
|
if (update) nameValue.push(/* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", {
|
|
9753
9809
|
className: "lc-pi-update",
|
|
@@ -9780,7 +9836,7 @@ window.__ModuleLoader__.load({
|
|
|
9780
9836
|
},
|
|
9781
9837
|
children: [/* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", {
|
|
9782
9838
|
className: "lc-pi-label",
|
|
9783
|
-
children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)(
|
|
9839
|
+
children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)(IconSettings, {
|
|
9784
9840
|
size: 12,
|
|
9785
9841
|
className: "lc-pi-labelicon"
|
|
9786
9842
|
}), t("plugin.settings")]
|
package/lib/index.js
CHANGED
|
@@ -941,7 +941,7 @@ function applySurface(st, ev, type, data, message) {
|
|
|
941
941
|
for (const k in st.callNames) if (k !== srcId && k !== blockId) kept[k] = st.callNames[k];
|
|
942
942
|
st.callNames = kept;
|
|
943
943
|
}
|
|
944
|
-
if (data?.error) node.err = true;
|
|
944
|
+
if (data?.error || message?.isError === true) node.err = true;
|
|
945
945
|
} else if (source?.kind === "skill-invocation") node.skill = typeof source.name === "string" ? source.name : "?";
|
|
946
946
|
else if (source?.kind === "plugin") {
|
|
947
947
|
if (source.form === "notice" && typeof source.summary === "string") node.text = source.summary;
|
|
@@ -1376,7 +1376,7 @@ function applyTimeline(state, event, bounds) {
|
|
|
1376
1376
|
tool: pendingEntry.name,
|
|
1377
1377
|
argsRaw: pendingEntry.argsRaw,
|
|
1378
1378
|
meta: data?.meta,
|
|
1379
|
-
err: Boolean(data?.error) || firstBlock?.isError === true
|
|
1379
|
+
err: Boolean(data?.error) || toolMsg?.isError === true || firstBlock?.isError === true
|
|
1380
1380
|
}));
|
|
1381
1381
|
if (buffered !== void 0 && buffered.length > 0) {
|
|
1382
1382
|
const program = parseCallArgs(pendingEntry?.argsRaw)?.description;
|
|
@@ -3179,10 +3179,12 @@ const SettingsSchema = z$1.object({
|
|
|
3179
3179
|
]).default("count").loose(),
|
|
3180
3180
|
insightsEntry: z$1.union(["show", "hide"]).default("show").loose()
|
|
3181
3181
|
});
|
|
3182
|
-
/** Serve the namespace while a settings provider is composed; inert otherwise. */
|
|
3182
|
+
/** Serve the namespace while a settings provider with the register face is composed; inert otherwise. */
|
|
3183
3183
|
function installSettings(ctx) {
|
|
3184
3184
|
ctx.inject(["settings"], (sctx) => {
|
|
3185
|
-
sctx.settings
|
|
3185
|
+
const service = sctx.settings;
|
|
3186
|
+
if (typeof service.register !== "function") return;
|
|
3187
|
+
service.register(SETTINGS_NAMESPACE, SettingsSchema);
|
|
3186
3188
|
});
|
|
3187
3189
|
}
|
|
3188
3190
|
//#endregion
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "dsh-context",
|
|
3
|
-
"version": "0.54.
|
|
3
|
+
"version": "0.54.4",
|
|
4
4
|
"description": "A DeepSeek Harness plugin for context insight and management, with context dashboard and context command, for understanding how the context is made of, and how it evolves.",
|
|
5
5
|
"author": "bowenliang123",
|
|
6
6
|
"repository": {
|
|
@@ -66,7 +66,8 @@
|
|
|
66
66
|
"dshReleases": {
|
|
67
67
|
"0.1.2-rc.1": "compatible",
|
|
68
68
|
"0.1.3-alpha.2": "compatible",
|
|
69
|
-
"0.1.5-rc.1": "compatible"
|
|
69
|
+
"0.1.5-rc.1": "compatible",
|
|
70
|
+
"0.1.7-alpha.1": "compatible"
|
|
70
71
|
}
|
|
71
72
|
}
|
|
72
73
|
},
|