@yadsh/dsh-sleev 0.0.3 → 0.0.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/README.md +1 -1
- package/README.zh-CN.md +1 -1
- package/compatibility.json +16 -0
- package/docs/development.md +1 -1
- package/lib/client.js +207 -153
- package/package.json +8 -5
package/README.md
CHANGED
|
@@ -10,7 +10,7 @@ Sleev routing observability for [DeepSeek Harness](https://github.com/deepseek-a
|
|
|
10
10
|
|
|
11
11
|
`dsh-sleev` observes provider routes that pass through the external Sleev context-optimization gateway. The current observer does not rewrite prompts, implement compaction, or route traffic itself: routing remains a normal `@deepseek-ai/dsh-llm-pi-ai` provider configuration.
|
|
12
12
|
|
|
13
|
-
[简体中文](README.zh-CN.md) · [Specification](
|
|
13
|
+
[简体中文](README.zh-CN.md) · [Specification](SPEC.md) · [Development guide](docs/development.md) · [Compatibility notes](docs/compatibility.md)
|
|
14
14
|
|
|
15
15
|
## Installation
|
|
16
16
|
|
package/README.zh-CN.md
CHANGED
|
@@ -10,7 +10,7 @@
|
|
|
10
10
|
|
|
11
11
|
`dsh-sleev` 用于观测经由外部 Sleev 上下文优化网关的提供商路由。当前观测器不会改写提示词、实现压缩或自行路由流量;路由仍由普通的 `@deepseek-ai/dsh-llm-pi-ai` 提供商配置负责。
|
|
12
12
|
|
|
13
|
-
[English](README.md) · [规范](
|
|
13
|
+
[English](README.md) · [规范](SPEC.md) · [开发指南](docs/development.md) · [兼容性说明](docs/compatibility.md)
|
|
14
14
|
|
|
15
15
|
## 安装
|
|
16
16
|
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
{
|
|
2
|
+
"deepseekHarness": {
|
|
3
|
+
"channel": "next",
|
|
4
|
+
"range": ">=0.1.1-rc.2 <0.2.0",
|
|
5
|
+
"testedReleases": [
|
|
6
|
+
"0.1.1-rc.2"
|
|
7
|
+
],
|
|
8
|
+
"requiredHostFeatures": [
|
|
9
|
+
"llm/stream"
|
|
10
|
+
],
|
|
11
|
+
"requiredClientFeatures": [
|
|
12
|
+
"settings.plugin.item"
|
|
13
|
+
]
|
|
14
|
+
},
|
|
15
|
+
"node": "^22.19.0 || >=24.0.0"
|
|
16
|
+
}
|
package/docs/development.md
CHANGED
package/lib/client.js
CHANGED
|
@@ -4,9 +4,110 @@ window.__ModuleLoader__.load({
|
|
|
4
4
|
var module = { exports: {} };
|
|
5
5
|
var exports = module.exports;
|
|
6
6
|
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
7
|
+
let react_jsx_runtime = require("react/jsx-runtime");
|
|
7
8
|
let react = require("react");
|
|
8
9
|
let _deepseek_ai_dsh_client_runtime_client = require("@deepseek-ai/dsh-client-runtime/client");
|
|
9
|
-
|
|
10
|
+
//#region ../../packages/plugin-kit/lib/client/plugin-card-css.js
|
|
11
|
+
/**
|
|
12
|
+
* Canonical DSH settings-plugin card shell CSS — the single source of truth
|
|
13
|
+
* for the shared `dsh-plugin-card` outer shell (see AGENTS.md). Plugins must
|
|
14
|
+
* inject this CSS unchanged and may only append rules for their own controls
|
|
15
|
+
* inside the card body; plugin-specific shell styling is forbidden.
|
|
16
|
+
*/
|
|
17
|
+
const PLUGIN_CARD_SHELL_CSS = `
|
|
18
|
+
.dsh-plugin-card{border:1px solid var(--dsw-alias-border-l2);background:var(--dsw-alias-bg-layer-3);border-radius:12px;list-style:none;transition:border-color .16s,background .16s}
|
|
19
|
+
.dsh-plugin-card:hover{border-color:var(--dsw-alias-label-dimmed)}
|
|
20
|
+
.dsh-plugin-card--open{background:var(--dsw-alias-bg-layer-2);border-color:var(--dsw-alias-label-dimmed)}
|
|
21
|
+
.dsh-plugin-card__header{appearance:none;width:100%;font:inherit;color:inherit;text-align:left;cursor:pointer;background:0 0;border:0;border-radius:12px;align-items:center;gap:12px;padding:14px 16px;display:flex}
|
|
22
|
+
.dsh-plugin-card__header:focus-visible{outline:2px solid var(--dsw-alias-brand-primary);outline-offset:-2px}
|
|
23
|
+
.dsh-plugin-card__head-text{flex-direction:column;flex:1;gap:4px;min-width:0;display:flex}
|
|
24
|
+
.dsh-plugin-card__name{color:var(--dsw-alias-label-primary);font-size:15px;font-weight:600;line-height:1.4}
|
|
25
|
+
.dsh-plugin-card__description{color:var(--dsw-alias-label-tertiary);font-size:13px;line-height:1.5}
|
|
26
|
+
.dsh-plugin-card__badge{white-space:nowrap;background:var(--dsw-alias-bg-module-platform);color:var(--dsw-alias-label-secondary);border-radius:999px;flex:none;padding:1px 8px;font-size:11px;font-weight:500;line-height:17px}
|
|
27
|
+
.dsh-plugin-card__chevron{width:14px;height:14px;color:var(--dsw-alias-label-tertiary);flex:none;transition:transform .16s}
|
|
28
|
+
.dsh-plugin-card--open .dsh-plugin-card__chevron{transform:rotate(180deg)}
|
|
29
|
+
.dsh-plugin-card__body{border-top:1px solid var(--dsw-alias-border-l2);margin:0 16px;padding-bottom:8px}
|
|
30
|
+
`;
|
|
31
|
+
//#endregion
|
|
32
|
+
//#region ../../packages/plugin-kit/lib/client/chevron.js
|
|
33
|
+
/**
|
|
34
|
+
* The standard disclosure chevron of the shared settings-card shell: a
|
|
35
|
+
* 14x14 inline SVG stroked with `currentColor` (round caps and joins).
|
|
36
|
+
* Font glyphs must not be used for this shape — their appearance and
|
|
37
|
+
* baseline vary by font and encoding.
|
|
38
|
+
*/
|
|
39
|
+
function ChevronDown() {
|
|
40
|
+
return (0, react_jsx_runtime.jsx)("svg", {
|
|
41
|
+
className: "dsh-plugin-card__chevron",
|
|
42
|
+
viewBox: "0 0 14 14",
|
|
43
|
+
fill: "none",
|
|
44
|
+
"aria-hidden": "true",
|
|
45
|
+
children: (0, react_jsx_runtime.jsx)("path", {
|
|
46
|
+
d: "m3.5 5.25 3.5 3.5 3.5-3.5",
|
|
47
|
+
stroke: "currentColor",
|
|
48
|
+
strokeLinecap: "round",
|
|
49
|
+
strokeLinejoin: "round"
|
|
50
|
+
})
|
|
51
|
+
});
|
|
52
|
+
}
|
|
53
|
+
//#endregion
|
|
54
|
+
//#region ../../packages/plugin-kit/lib/client/card-shell.js
|
|
55
|
+
/**
|
|
56
|
+
* Shared outer shell of a plugin configuration card (AGENTS.md contract): a
|
|
57
|
+
* direct `<li>` child of the host list with a full-width header button
|
|
58
|
+
* (`type="button"`, `aria-expanded`, accessible show/hide label, the
|
|
59
|
+
* title/description stack, an optional status badge, then the chevron) and a
|
|
60
|
+
* body rendered only while open. Plugin-specific controls belong inside the
|
|
61
|
+
* body and must not restyle the shell.
|
|
62
|
+
*/
|
|
63
|
+
function CardShell(props) {
|
|
64
|
+
const [open, setOpen] = (0, react.useState)(false);
|
|
65
|
+
const body = props.bodyClassName === void 0 ? "dsh-plugin-card__body" : `dsh-plugin-card__body ${props.bodyClassName}`;
|
|
66
|
+
return (0, react_jsx_runtime.jsxs)("li", {
|
|
67
|
+
className: open ? "dsh-plugin-card dsh-plugin-card--open" : "dsh-plugin-card",
|
|
68
|
+
children: [(0, react_jsx_runtime.jsxs)("button", {
|
|
69
|
+
type: "button",
|
|
70
|
+
className: "dsh-plugin-card__header",
|
|
71
|
+
"aria-expanded": open,
|
|
72
|
+
"aria-label": props.label(open),
|
|
73
|
+
onClick: () => {
|
|
74
|
+
setOpen(!open);
|
|
75
|
+
},
|
|
76
|
+
children: [
|
|
77
|
+
(0, react_jsx_runtime.jsxs)("span", {
|
|
78
|
+
className: "dsh-plugin-card__head-text",
|
|
79
|
+
children: [(0, react_jsx_runtime.jsx)("span", {
|
|
80
|
+
className: "dsh-plugin-card__name",
|
|
81
|
+
children: props.title
|
|
82
|
+
}), (0, react_jsx_runtime.jsx)("span", {
|
|
83
|
+
className: "dsh-plugin-card__description",
|
|
84
|
+
children: props.description
|
|
85
|
+
})]
|
|
86
|
+
}),
|
|
87
|
+
props.badge ?? null,
|
|
88
|
+
(0, react_jsx_runtime.jsx)(ChevronDown, {})
|
|
89
|
+
]
|
|
90
|
+
}), open ? (0, react_jsx_runtime.jsx)("div", {
|
|
91
|
+
className: body,
|
|
92
|
+
children: props.children
|
|
93
|
+
}) : null]
|
|
94
|
+
});
|
|
95
|
+
}
|
|
96
|
+
/**
|
|
97
|
+
* Register the card component into the shared settings-plugins slot. Returns
|
|
98
|
+
* the registration disposer. Use this variant when the plugin drives the
|
|
99
|
+
* slot's inject-factory itself (e.g. to dispose a form controller alongside).
|
|
100
|
+
*/
|
|
101
|
+
function registerSettingsSlot(host, options) {
|
|
102
|
+
const slotOptions = {
|
|
103
|
+
name: options.slotName ?? "settings.plugin.item",
|
|
104
|
+
key: options.key,
|
|
105
|
+
...options.locale === void 0 ? {} : { locale: options.locale },
|
|
106
|
+
...options.inject === void 0 ? {} : { inject: options.inject }
|
|
107
|
+
};
|
|
108
|
+
return host.slots.register(slotOptions, options.component);
|
|
109
|
+
}
|
|
110
|
+
//#endregion
|
|
10
111
|
//#region src/client/settings-controller.ts
|
|
11
112
|
const DEFAULTS = {
|
|
12
113
|
routes: [],
|
|
@@ -239,19 +340,7 @@ window.__ModuleLoader__.load({
|
|
|
239
340
|
save: "保存",
|
|
240
341
|
saving: "保存中…"
|
|
241
342
|
};
|
|
242
|
-
const CARD_STYLES =
|
|
243
|
-
.dsh-plugin-card{border:1px solid var(--dsw-alias-border-l2);background:var(--dsw-alias-bg-layer-3);border-radius:12px;list-style:none;transition:border-color .16s,background .16s}
|
|
244
|
-
.dsh-plugin-card:hover{border-color:var(--dsw-alias-label-dimmed)}
|
|
245
|
-
.dsh-plugin-card--open{background:var(--dsw-alias-bg-layer-2);border-color:var(--dsw-alias-label-dimmed)}
|
|
246
|
-
.dsh-plugin-card__header{appearance:none;width:100%;font:inherit;color:inherit;text-align:left;cursor:pointer;background:0 0;border:0;border-radius:12px;align-items:center;gap:12px;padding:14px 16px;display:flex}
|
|
247
|
-
.dsh-plugin-card__header:focus-visible{outline:2px solid var(--dsw-alias-brand-primary);outline-offset:-2px}
|
|
248
|
-
.dsh-plugin-card__head-text{flex-direction:column;flex:1;gap:4px;min-width:0;display:flex}
|
|
249
|
-
.dsh-plugin-card__name{color:var(--dsw-alias-label-primary);font-size:15px;font-weight:600;line-height:1.4}
|
|
250
|
-
.dsh-plugin-card__description{color:var(--dsw-alias-label-tertiary);font-size:13px;line-height:1.5}
|
|
251
|
-
.dsh-plugin-card__badge{white-space:nowrap;background:var(--dsw-alias-bg-module-platform);color:var(--dsw-alias-label-secondary);border-radius:999px;flex:none;padding:1px 8px;font-size:11px;font-weight:500;line-height:17px}
|
|
252
|
-
.dsh-plugin-card__chevron{width:14px;height:14px;color:var(--dsw-alias-label-tertiary);flex:none;transition:transform .16s}
|
|
253
|
-
.dsh-plugin-card--open .dsh-plugin-card__chevron{transform:rotate(180deg)}
|
|
254
|
-
.dsh-plugin-card__body{border-top:1px solid var(--dsw-alias-border-l2);margin:0 16px;padding-bottom:8px}
|
|
343
|
+
const CARD_STYLES = `${PLUGIN_CARD_SHELL_CSS}
|
|
255
344
|
.dsh-sleev-button:focus-visible,.dsh-sleev-reset:focus-visible,.dsh-sleev-input:focus-visible{outline:2px solid var(--dsw-alias-brand-primary);outline-offset:2px}
|
|
256
345
|
.dsh-sleev-read-only{margin:12px 0 0;font-size:12px;line-height:1.5;color:var(--dsw-alias-label-tertiary)}
|
|
257
346
|
.dsh-sleev-pill{border-radius:999px;padding:1px 8px;font-size:11px;line-height:17px;font-weight:500;background:var(--dsw-alias-bg-module-platform);color:var(--dsw-alias-label-secondary);white-space:nowrap}
|
|
@@ -276,20 +365,6 @@ textarea.dsh-sleev-input{height:64px;min-height:48px;padding:8px 12px;resize:ver
|
|
|
276
365
|
.dsh-sleev-save{background:var(--dsw-alias-label-primary);color:var(--dsw-alias-bg-layer-3)}
|
|
277
366
|
.dsh-sleev-button:disabled{opacity:.4;cursor:default}
|
|
278
367
|
`;
|
|
279
|
-
function ChevronDown() {
|
|
280
|
-
return /* @__PURE__ */ (0, react_jsx_runtime.jsx)("svg", {
|
|
281
|
-
className: "dsh-plugin-card__chevron",
|
|
282
|
-
viewBox: "0 0 14 14",
|
|
283
|
-
fill: "none",
|
|
284
|
-
"aria-hidden": "true",
|
|
285
|
-
children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)("path", {
|
|
286
|
-
d: "m3.5 5.25 3.5 3.5 3.5-3.5",
|
|
287
|
-
stroke: "currentColor",
|
|
288
|
-
strokeLinecap: "round",
|
|
289
|
-
strokeLinejoin: "round"
|
|
290
|
-
})
|
|
291
|
-
});
|
|
292
|
-
}
|
|
293
368
|
function SettingsField(props) {
|
|
294
369
|
return /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", {
|
|
295
370
|
className: "dsh-sleev-field",
|
|
@@ -328,7 +403,6 @@ textarea.dsh-sleev-input{height:64px;min-height:48px;padding:8px 12px;resize:ver
|
|
|
328
403
|
}
|
|
329
404
|
/** Settings card contributed to the official Plugins → Plugin configuration tab. */
|
|
330
405
|
function SleevSettingsCard(props) {
|
|
331
|
-
const [open, setOpen] = (0, react.useState)(false);
|
|
332
406
|
const state = props.useSleevSettings((snapshot) => snapshot);
|
|
333
407
|
if (!state.available) return null;
|
|
334
408
|
const blocked = !state.dirty || state.invalid || state.saving || !state.writable;
|
|
@@ -340,136 +414,116 @@ textarea.dsh-sleev-input{height:64px;min-height:48px;padding:8px 12px;resize:ver
|
|
|
340
414
|
resetLabel: props.t("reset"),
|
|
341
415
|
onReset: () => props.resetField(field)
|
|
342
416
|
});
|
|
343
|
-
return /* @__PURE__ */ (0, react_jsx_runtime.jsxs)(
|
|
344
|
-
|
|
345
|
-
|
|
346
|
-
|
|
347
|
-
|
|
348
|
-
"
|
|
349
|
-
|
|
350
|
-
|
|
351
|
-
|
|
352
|
-
|
|
353
|
-
|
|
354
|
-
|
|
355
|
-
|
|
356
|
-
|
|
357
|
-
|
|
358
|
-
|
|
359
|
-
|
|
360
|
-
|
|
361
|
-
|
|
362
|
-
|
|
363
|
-
className: "dsh-plugin-card__badge",
|
|
364
|
-
children: props.t("unsaved")
|
|
365
|
-
}) : null,
|
|
366
|
-
/* @__PURE__ */ (0, react_jsx_runtime.jsx)(ChevronDown, {})
|
|
367
|
-
]
|
|
368
|
-
}), open ? /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", {
|
|
369
|
-
className: "dsh-plugin-card__body",
|
|
370
|
-
children: [
|
|
371
|
-
!state.writable ? /* @__PURE__ */ (0, react_jsx_runtime.jsx)("p", {
|
|
372
|
-
className: "dsh-sleev-read-only",
|
|
373
|
-
role: "status",
|
|
374
|
-
children: props.t("readOnly")
|
|
375
|
-
}) : null,
|
|
376
|
-
/* @__PURE__ */ (0, react_jsx_runtime.jsx)(SettingsField, {
|
|
417
|
+
return /* @__PURE__ */ (0, react_jsx_runtime.jsxs)(CardShell, {
|
|
418
|
+
title: props.t("title"),
|
|
419
|
+
description: props.t("description"),
|
|
420
|
+
label: (open) => `${props.t(open ? "collapse" : "expand")}: Sleev`,
|
|
421
|
+
badge: state.dirty ? /* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", {
|
|
422
|
+
className: "dsh-plugin-card__badge",
|
|
423
|
+
children: props.t("unsaved")
|
|
424
|
+
}) : void 0,
|
|
425
|
+
children: [
|
|
426
|
+
!state.writable ? /* @__PURE__ */ (0, react_jsx_runtime.jsx)("p", {
|
|
427
|
+
className: "dsh-sleev-read-only",
|
|
428
|
+
role: "status",
|
|
429
|
+
children: props.t("readOnly")
|
|
430
|
+
}) : null,
|
|
431
|
+
/* @__PURE__ */ (0, react_jsx_runtime.jsx)(SettingsField, {
|
|
432
|
+
id: "sleev-routes",
|
|
433
|
+
label: props.t("routes"),
|
|
434
|
+
hint: props.t("routesHint"),
|
|
435
|
+
...common("routes"),
|
|
436
|
+
children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)("textarea", {
|
|
377
437
|
id: "sleev-routes",
|
|
378
|
-
|
|
379
|
-
|
|
380
|
-
|
|
381
|
-
|
|
382
|
-
|
|
383
|
-
|
|
384
|
-
|
|
385
|
-
|
|
386
|
-
|
|
387
|
-
|
|
388
|
-
|
|
389
|
-
/* @__PURE__ */ (0, react_jsx_runtime.jsx)(
|
|
438
|
+
className: "dsh-sleev-input",
|
|
439
|
+
value: state.routes.text,
|
|
440
|
+
disabled: !state.writable,
|
|
441
|
+
onChange: edit("routes")
|
|
442
|
+
})
|
|
443
|
+
}),
|
|
444
|
+
/* @__PURE__ */ (0, react_jsx_runtime.jsx)(SettingsField, {
|
|
445
|
+
id: "sleev-route-prefixes",
|
|
446
|
+
label: props.t("routePrefixes"),
|
|
447
|
+
hint: props.t("routePrefixesHint"),
|
|
448
|
+
...common("routePrefixes"),
|
|
449
|
+
children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)("textarea", {
|
|
390
450
|
id: "sleev-route-prefixes",
|
|
391
|
-
|
|
392
|
-
|
|
393
|
-
|
|
394
|
-
|
|
395
|
-
|
|
396
|
-
|
|
397
|
-
|
|
398
|
-
|
|
399
|
-
|
|
400
|
-
|
|
401
|
-
|
|
402
|
-
|
|
451
|
+
className: "dsh-sleev-input",
|
|
452
|
+
value: state.routePrefixes.text,
|
|
453
|
+
disabled: !state.writable,
|
|
454
|
+
onChange: edit("routePrefixes")
|
|
455
|
+
})
|
|
456
|
+
}),
|
|
457
|
+
/* @__PURE__ */ (0, react_jsx_runtime.jsx)(SettingsField, {
|
|
458
|
+
id: "sleev-max-recent-calls",
|
|
459
|
+
label: props.t("maxRecentCalls"),
|
|
460
|
+
hint: props.t("maxRecentCallsHint"),
|
|
461
|
+
invalidLabel: props.t("invalidNumber"),
|
|
462
|
+
...common("maxRecentCalls"),
|
|
463
|
+
children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)("input", {
|
|
403
464
|
id: "sleev-max-recent-calls",
|
|
404
|
-
|
|
405
|
-
|
|
406
|
-
|
|
407
|
-
|
|
408
|
-
|
|
409
|
-
|
|
410
|
-
|
|
411
|
-
|
|
412
|
-
|
|
413
|
-
|
|
414
|
-
|
|
415
|
-
|
|
416
|
-
|
|
417
|
-
|
|
418
|
-
|
|
419
|
-
|
|
420
|
-
/* @__PURE__ */ (0, react_jsx_runtime.jsx)(SettingsField, {
|
|
465
|
+
className: "dsh-sleev-input",
|
|
466
|
+
type: "number",
|
|
467
|
+
min: 1,
|
|
468
|
+
step: 1,
|
|
469
|
+
value: state.maxRecentCalls.text,
|
|
470
|
+
disabled: !state.writable,
|
|
471
|
+
"aria-invalid": state.maxRecentCalls.invalid,
|
|
472
|
+
onChange: edit("maxRecentCalls")
|
|
473
|
+
})
|
|
474
|
+
}),
|
|
475
|
+
/* @__PURE__ */ (0, react_jsx_runtime.jsx)(SettingsField, {
|
|
476
|
+
id: "sleev-log-level",
|
|
477
|
+
label: props.t("logLevel"),
|
|
478
|
+
hint: props.t("logLevelHint"),
|
|
479
|
+
...common("logLevel"),
|
|
480
|
+
children: /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("select", {
|
|
421
481
|
id: "sleev-log-level",
|
|
422
|
-
|
|
423
|
-
|
|
424
|
-
|
|
425
|
-
|
|
426
|
-
id: "sleev-log-level",
|
|
427
|
-
className: "dsh-sleev-input",
|
|
428
|
-
value: state.logLevel.text,
|
|
429
|
-
disabled: !state.writable,
|
|
430
|
-
onChange: edit("logLevel"),
|
|
431
|
-
children: [
|
|
432
|
-
/* @__PURE__ */ (0, react_jsx_runtime.jsx)("option", {
|
|
433
|
-
value: "off",
|
|
434
|
-
children: props.t("logOff")
|
|
435
|
-
}),
|
|
436
|
-
/* @__PURE__ */ (0, react_jsx_runtime.jsx)("option", {
|
|
437
|
-
value: "info",
|
|
438
|
-
children: props.t("logInfo")
|
|
439
|
-
}),
|
|
440
|
-
/* @__PURE__ */ (0, react_jsx_runtime.jsx)("option", {
|
|
441
|
-
value: "debug",
|
|
442
|
-
children: props.t("logDebug")
|
|
443
|
-
})
|
|
444
|
-
]
|
|
445
|
-
})
|
|
446
|
-
}),
|
|
447
|
-
/* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", {
|
|
448
|
-
className: "dsh-sleev-footer",
|
|
482
|
+
className: "dsh-sleev-input",
|
|
483
|
+
value: state.logLevel.text,
|
|
484
|
+
disabled: !state.writable,
|
|
485
|
+
onChange: edit("logLevel"),
|
|
449
486
|
children: [
|
|
450
|
-
|
|
451
|
-
|
|
452
|
-
|
|
453
|
-
|
|
454
|
-
|
|
455
|
-
|
|
456
|
-
|
|
457
|
-
className: "dsh-sleev-button dsh-sleev-discard",
|
|
458
|
-
disabled: !state.dirty || state.saving,
|
|
459
|
-
onClick: props.discard,
|
|
460
|
-
children: props.t("discard")
|
|
487
|
+
/* @__PURE__ */ (0, react_jsx_runtime.jsx)("option", {
|
|
488
|
+
value: "off",
|
|
489
|
+
children: props.t("logOff")
|
|
490
|
+
}),
|
|
491
|
+
/* @__PURE__ */ (0, react_jsx_runtime.jsx)("option", {
|
|
492
|
+
value: "info",
|
|
493
|
+
children: props.t("logInfo")
|
|
461
494
|
}),
|
|
462
|
-
/* @__PURE__ */ (0, react_jsx_runtime.jsx)("
|
|
463
|
-
|
|
464
|
-
|
|
465
|
-
disabled: blocked,
|
|
466
|
-
onClick: props.save,
|
|
467
|
-
children: props.t(state.saving ? "saving" : "save")
|
|
495
|
+
/* @__PURE__ */ (0, react_jsx_runtime.jsx)("option", {
|
|
496
|
+
value: "debug",
|
|
497
|
+
children: props.t("logDebug")
|
|
468
498
|
})
|
|
469
499
|
]
|
|
470
500
|
})
|
|
471
|
-
|
|
472
|
-
|
|
501
|
+
}),
|
|
502
|
+
/* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", {
|
|
503
|
+
className: "dsh-sleev-footer",
|
|
504
|
+
children: [
|
|
505
|
+
state.failed ? /* @__PURE__ */ (0, react_jsx_runtime.jsx)("p", {
|
|
506
|
+
className: "dsh-sleev-save-error",
|
|
507
|
+
role: "status",
|
|
508
|
+
children: props.t("saveFailed")
|
|
509
|
+
}) : null,
|
|
510
|
+
/* @__PURE__ */ (0, react_jsx_runtime.jsx)("button", {
|
|
511
|
+
type: "button",
|
|
512
|
+
className: "dsh-sleev-button dsh-sleev-discard",
|
|
513
|
+
disabled: !state.dirty || state.saving,
|
|
514
|
+
onClick: props.discard,
|
|
515
|
+
children: props.t("discard")
|
|
516
|
+
}),
|
|
517
|
+
/* @__PURE__ */ (0, react_jsx_runtime.jsx)("button", {
|
|
518
|
+
type: "button",
|
|
519
|
+
className: "dsh-sleev-button dsh-sleev-save",
|
|
520
|
+
disabled: blocked,
|
|
521
|
+
onClick: props.save,
|
|
522
|
+
children: props.t(state.saving ? "saving" : "save")
|
|
523
|
+
})
|
|
524
|
+
]
|
|
525
|
+
})
|
|
526
|
+
]
|
|
473
527
|
});
|
|
474
528
|
}
|
|
475
529
|
const inject = [
|
|
@@ -492,12 +546,12 @@ textarea.dsh-sleev-input{height:64px;min-height:48px;padding:8px 12px;resize:ver
|
|
|
492
546
|
}), "dsh-sleev: settings dictionaries");
|
|
493
547
|
const controller = new SleevSettingsController(ctx.settingsScope.bind({ namespace: SETTINGS_NAMESPACE }));
|
|
494
548
|
ctx.slots.inject("settings.plugin.item", () => {
|
|
495
|
-
const unregister = ctx
|
|
496
|
-
name: "settings.plugin.item",
|
|
549
|
+
const unregister = registerSettingsSlot(ctx, {
|
|
497
550
|
key: SETTINGS_NAMESPACE,
|
|
498
551
|
locale: LOCALE_NAMESPACE,
|
|
552
|
+
component: SleevSettingsCard,
|
|
499
553
|
inject: () => controller.inject()
|
|
500
|
-
}
|
|
554
|
+
});
|
|
501
555
|
return () => {
|
|
502
556
|
controller.dispose();
|
|
503
557
|
unregister();
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@yadsh/dsh-sleev",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.4",
|
|
4
4
|
"description": "Sleev routing observability for DeepSeek Harness",
|
|
5
5
|
"repository": {
|
|
6
6
|
"type": "git",
|
|
@@ -50,6 +50,7 @@
|
|
|
50
50
|
"lib/**/*.js",
|
|
51
51
|
"lib/types/**/*.d.ts",
|
|
52
52
|
"cordis.patch.yml",
|
|
53
|
+
"compatibility.json",
|
|
53
54
|
"docs/*",
|
|
54
55
|
"README.md",
|
|
55
56
|
"README.zh-CN.md",
|
|
@@ -80,11 +81,10 @@
|
|
|
80
81
|
"react": "^18.2.0"
|
|
81
82
|
},
|
|
82
83
|
"dependencies": {
|
|
83
|
-
"@yadsh/dsh-plugin-log": "^0.2.
|
|
84
|
+
"@yadsh/dsh-plugin-log": "^0.2.1"
|
|
84
85
|
},
|
|
85
86
|
"devDependencies": {
|
|
86
87
|
"@deepseek-ai/cordis": "4.0.1",
|
|
87
|
-
"@deepseek-ai/schemastery": "3.18.1",
|
|
88
88
|
"@deepseek-ai/dsh-client-locale": "0.1.1-rc.2",
|
|
89
89
|
"@deepseek-ai/dsh-client-runtime": "0.1.1-rc.2",
|
|
90
90
|
"@deepseek-ai/dsh-client-ui-settings": "0.1.1-rc.2",
|
|
@@ -93,15 +93,18 @@
|
|
|
93
93
|
"@deepseek-ai/dsh-llm": "0.1.1-rc.2",
|
|
94
94
|
"@deepseek-ai/dsh-llm-pi-ai": "0.1.1-rc.2",
|
|
95
95
|
"@deepseek-ai/dsh-settings": "0.1.1-rc.2",
|
|
96
|
+
"@deepseek-ai/schemastery": "3.18.1",
|
|
96
97
|
"@types/node": "^26.4.0",
|
|
97
98
|
"@types/react": "18.3.28",
|
|
98
99
|
"eslint": "10.9.1",
|
|
99
100
|
"prettier": "^3.6.2",
|
|
100
101
|
"react": "18.3.1",
|
|
101
102
|
"tsdown": "^0.22.14",
|
|
102
|
-
"tsx": "4.22.4",
|
|
103
|
+
"tsx": "^4.22.4",
|
|
103
104
|
"typescript": "^7.0.2",
|
|
104
|
-
"vitest": "^4.1.11"
|
|
105
|
+
"vitest": "^4.1.11",
|
|
106
|
+
"@yadsh/dsh-plugin-kit": "^0.1.0",
|
|
107
|
+
"@yadsh/dsh-config": "^0.0.0"
|
|
105
108
|
},
|
|
106
109
|
"publishConfig": {
|
|
107
110
|
"access": "public",
|