dsh-context-compression-improved 0.8.0-beta.3 → 0.8.0-beta.5
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/CHANGELOG.md +20 -0
- package/eslint.config.js +30 -30
- package/package.json +163 -163
- package/packages/selector/dsh.plugin.json +16 -16
- package/packages/selector/lib/client.d.ts +28 -0
- package/packages/selector/lib/client.js +631 -7
- package/packages/selector/lib/{advisor-state.js → config.js} +170 -65
- package/packages/selector/lib/index.d.ts +13 -1
- package/packages/selector/lib/index.js +306 -50
- package/packages/selector/lib/profiles.d.ts +15 -0
- package/packages/selector/lib/pruner.d.ts +65 -0
- package/packages/selector/lib/pruner.js +408 -5
- package/packages/selector/src/client/CompressionProfileControls.tsx +67 -0
- package/packages/selector/src/client/CompressionProfileSelector.tsx +2 -0
- package/packages/selector/src/client/decode.ts +57 -49
- package/packages/selector/src/client/index.ts +41 -0
- package/packages/selector/src/client/locales/de.ts +26 -0
- package/packages/selector/src/client/locales/es.ts +26 -0
- package/packages/selector/src/client/locales/fr.ts +26 -0
- package/packages/selector/src/client/locales/it.ts +26 -0
- package/packages/selector/src/client/locales/ja.ts +26 -0
- package/packages/selector/src/client/locales/ko.ts +26 -0
- package/packages/selector/src/client/locales/ru.ts +26 -0
- package/packages/selector/src/client/locales.ts +52 -0
- package/packages/selector/src/client/monitor-fab.ts +307 -0
- package/packages/selector/src/client/settings-section.tsx +16 -2
- package/packages/selector/src/index.ts +133 -60
- package/packages/selector/src/profiles.ts +431 -394
- package/packages/selector/src/pruner/state.ts +57 -50
- package/packages/selector/src/pruner.ts +241 -1
- package/packages/selector/src/runtime/audit.ts +303 -286
- package/packages/selector/src/runtime/config.ts +756 -706
- package/packages/selector/src/runtime/monitor.ts +149 -0
- package/packages/selector/src/runtime/summary-command.ts +127 -0
- package/packages/selector/src/runtime/tokenpilot/advisor-prompt.ts +233 -188
- package/packages/selector/src/runtime/tokenpilot/advisor-state.ts +204 -149
- package/packages/selector/src/runtime/tokenpilot/intent-fold.ts +53 -0
- package/packages/selector/src/runtime/tokenpilot/intent-gate.ts +65 -0
- package/packages/selector/src/runtime/tokenpilot/intent-input-mask.ts +125 -0
- package/packages/selector/src/runtime/tokenpilot/intent-range.ts +37 -0
- package/packages/selector/src/runtime/types.ts +365 -346
- package/packages/selector/tests/auto-compact.client.spec.tsx +214 -213
- package/packages/selector/tests/code-skeleton.client.spec.ts +94 -93
- package/packages/selector/tests/custom-contract.client.spec.ts +223 -222
- package/packages/selector/tests/estimator-channel.client.spec.tsx +253 -252
- package/packages/selector/tests/estimator-route-registration.host.spec.ts +8 -6
- package/packages/selector/tests/monitor-fab.client.spec.ts +117 -0
- package/packages/selector/tests/preset-options-write.client.spec.ts +188 -187
- package/packages/selector/tests/profiles.client.spec.tsx +436 -434
- package/packages/selector/tests/runtime/audit.spec.ts +275 -274
- package/packages/selector/tests/runtime/intent-gate.spec.ts +62 -0
- package/packages/selector/tests/runtime/intent-summary.spec.ts +156 -0
- package/packages/selector/tests/runtime/monitor.spec.ts +236 -0
- package/packages/selector/tests/runtime/public/public-runtime.spec.ts +2734 -2731
- package/packages/selector/tests/runtime/summary-command.spec.ts +154 -0
- package/packages/selector/tests/settings-seat.client.spec.ts +1 -1
- package/scripts/packed-install-e2e.mjs +1 -1
- package/scripts/verify-release.mjs +2 -1
|
@@ -60,6 +60,24 @@ window.__ModuleLoader__.load({
|
|
|
60
60
|
const enabled = value.enabled;
|
|
61
61
|
return typeof enabled === "boolean" ? { enabled } : void 0;
|
|
62
62
|
}
|
|
63
|
+
/** Browser-safe mirror of the runtime intentSummary section (absent inherits off). */
|
|
64
|
+
function decodeIntentSummarySettings(value) {
|
|
65
|
+
if (value === void 0) return { enabled: false };
|
|
66
|
+
if (!isPlainRecord(value)) return void 0;
|
|
67
|
+
const keys = Object.keys(value);
|
|
68
|
+
if (keys.length !== 1 || keys[0] !== "enabled") return void 0;
|
|
69
|
+
const enabled = value.enabled;
|
|
70
|
+
return typeof enabled === "boolean" ? { enabled } : void 0;
|
|
71
|
+
}
|
|
72
|
+
/** Browser-safe mirror of the runtime monitorPanel section (absent inherits hidden). */
|
|
73
|
+
function decodeMonitorPanelSettings(value) {
|
|
74
|
+
if (value === void 0) return { enabled: false };
|
|
75
|
+
if (!isPlainRecord(value)) return void 0;
|
|
76
|
+
const keys = Object.keys(value);
|
|
77
|
+
if (keys.length !== 1 || keys[0] !== "enabled") return void 0;
|
|
78
|
+
const enabled = value.enabled;
|
|
79
|
+
return typeof enabled === "boolean" ? { enabled } : void 0;
|
|
80
|
+
}
|
|
63
81
|
/**
|
|
64
82
|
* Browser mirror of the runtime presetOptions section: absent inherits the
|
|
65
83
|
* preset defaults (decodes to `undefined`); present values must be a plain
|
|
@@ -715,10 +733,84 @@ window.__ModuleLoader__.load({
|
|
|
715
733
|
});
|
|
716
734
|
}
|
|
717
735
|
/**
|
|
718
|
-
* The
|
|
719
|
-
*
|
|
720
|
-
*
|
|
736
|
+
* The turn-tail intent summary fold gate. Same deliberately minimal shape as
|
|
737
|
+
* the code-skeleton gate: an on/off select with its own save path; the fold
|
|
738
|
+
* itself is gated by the growth constants and the per-session /ctx-summary
|
|
739
|
+
* override, none of which belong in this card.
|
|
740
|
+
*/
|
|
741
|
+
function IntentSummaryControls({ value, disabled, save, settle, t }) {
|
|
742
|
+
return /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("section", {
|
|
743
|
+
className: _dsh_context_compression_css_466eb745356d_CompressionProfileSelector_module_css_default.autoCompact,
|
|
744
|
+
"aria-labelledby": "context-compression-intentsummary-title",
|
|
745
|
+
children: [
|
|
746
|
+
/* @__PURE__ */ (0, react_jsx_runtime.jsx)("h3", {
|
|
747
|
+
id: "context-compression-intentsummary-title",
|
|
748
|
+
className: _dsh_context_compression_css_466eb745356d_CompressionProfileSelector_module_css_default.autoCompactTitle,
|
|
749
|
+
children: t("intentSummary.title")
|
|
750
|
+
}),
|
|
751
|
+
/* @__PURE__ */ (0, react_jsx_runtime.jsx)("p", {
|
|
752
|
+
className: _dsh_context_compression_css_466eb745356d_CompressionProfileSelector_module_css_default.customNote,
|
|
753
|
+
children: t("intentSummary.description")
|
|
754
|
+
}),
|
|
755
|
+
/* @__PURE__ */ (0, react_jsx_runtime.jsxs)("label", {
|
|
756
|
+
className: _dsh_context_compression_css_466eb745356d_CompressionProfileSelector_module_css_default.field,
|
|
757
|
+
children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", { children: t("intentSummary.enabled") }), /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("select", {
|
|
758
|
+
value: value ? "on" : "off",
|
|
759
|
+
disabled,
|
|
760
|
+
onChange: (event) => {
|
|
761
|
+
settle(() => save(event.currentTarget.value === "on"));
|
|
762
|
+
},
|
|
763
|
+
children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)("option", {
|
|
764
|
+
value: "on",
|
|
765
|
+
children: t("intentSummary.enabled.on")
|
|
766
|
+
}), /* @__PURE__ */ (0, react_jsx_runtime.jsx)("option", {
|
|
767
|
+
value: "off",
|
|
768
|
+
children: t("intentSummary.enabled.off")
|
|
769
|
+
})]
|
|
770
|
+
})]
|
|
771
|
+
})
|
|
772
|
+
]
|
|
773
|
+
});
|
|
774
|
+
}
|
|
775
|
+
/**
|
|
776
|
+
* Visibility switch of the floating compression-monitor panel (FAB). The
|
|
777
|
+
* panel itself is a body-level overlay driven by the monitor route; this card
|
|
778
|
+
* only decides whether it mounts.
|
|
721
779
|
*/
|
|
780
|
+
function MonitorPanelControls({ value, disabled, save, settle, t }) {
|
|
781
|
+
return /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("section", {
|
|
782
|
+
className: _dsh_context_compression_css_466eb745356d_CompressionProfileSelector_module_css_default.autoCompact,
|
|
783
|
+
"aria-labelledby": "context-compression-monitorpanel-title",
|
|
784
|
+
children: [
|
|
785
|
+
/* @__PURE__ */ (0, react_jsx_runtime.jsx)("h3", {
|
|
786
|
+
id: "context-compression-monitorpanel-title",
|
|
787
|
+
className: _dsh_context_compression_css_466eb745356d_CompressionProfileSelector_module_css_default.autoCompactTitle,
|
|
788
|
+
children: t("monitorPanel.title")
|
|
789
|
+
}),
|
|
790
|
+
/* @__PURE__ */ (0, react_jsx_runtime.jsx)("p", {
|
|
791
|
+
className: _dsh_context_compression_css_466eb745356d_CompressionProfileSelector_module_css_default.customNote,
|
|
792
|
+
children: t("monitorPanel.description")
|
|
793
|
+
}),
|
|
794
|
+
/* @__PURE__ */ (0, react_jsx_runtime.jsxs)("label", {
|
|
795
|
+
className: _dsh_context_compression_css_466eb745356d_CompressionProfileSelector_module_css_default.field,
|
|
796
|
+
children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", { children: t("monitorPanel.enabled") }), /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("select", {
|
|
797
|
+
value: value ? "on" : "off",
|
|
798
|
+
disabled,
|
|
799
|
+
onChange: (event) => {
|
|
800
|
+
settle(() => save(event.currentTarget.value === "on"));
|
|
801
|
+
},
|
|
802
|
+
children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)("option", {
|
|
803
|
+
value: "on",
|
|
804
|
+
children: t("monitorPanel.enabled.on")
|
|
805
|
+
}), /* @__PURE__ */ (0, react_jsx_runtime.jsx)("option", {
|
|
806
|
+
value: "off",
|
|
807
|
+
children: t("monitorPanel.enabled.off")
|
|
808
|
+
})]
|
|
809
|
+
})]
|
|
810
|
+
})
|
|
811
|
+
]
|
|
812
|
+
});
|
|
813
|
+
}
|
|
722
814
|
function CodeSkeletonControls({ value, disabled, save, settle, t }) {
|
|
723
815
|
return /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("section", {
|
|
724
816
|
className: _dsh_context_compression_css_466eb745356d_CompressionProfileSelector_module_css_default.autoCompact,
|
|
@@ -1226,7 +1318,7 @@ window.__ModuleLoader__.load({
|
|
|
1226
1318
|
function ContextCompressionSettingsSection(props) {
|
|
1227
1319
|
return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(SettingsCompressionProfileControls, { ...props });
|
|
1228
1320
|
}
|
|
1229
|
-
function SettingsCompressionProfileControls({ useCompression, select, saveCustom, resetCustom, saveAutoCompact, saveCodeSkeleton, savePresetOptions, t }) {
|
|
1321
|
+
function SettingsCompressionProfileControls({ useCompression, select, saveCustom, resetCustom, saveAutoCompact, saveCodeSkeleton, saveIntentSummary, saveMonitorPanel, savePresetOptions, t }) {
|
|
1230
1322
|
const state = useCompression((snapshot) => snapshot);
|
|
1231
1323
|
const [saving, setSaving] = (0, react.useState)(false);
|
|
1232
1324
|
const [saveError, setSaveError] = (0, react.useState)(null);
|
|
@@ -1313,6 +1405,20 @@ window.__ModuleLoader__.load({
|
|
|
1313
1405
|
settle,
|
|
1314
1406
|
t
|
|
1315
1407
|
}),
|
|
1408
|
+
/* @__PURE__ */ (0, react_jsx_runtime.jsx)(IntentSummaryControls, {
|
|
1409
|
+
value: state.value?.intentSummary?.enabled ?? false,
|
|
1410
|
+
disabled: busy || !state.writable || false,
|
|
1411
|
+
save: saveIntentSummary,
|
|
1412
|
+
settle,
|
|
1413
|
+
t
|
|
1414
|
+
}),
|
|
1415
|
+
/* @__PURE__ */ (0, react_jsx_runtime.jsx)(MonitorPanelControls, {
|
|
1416
|
+
value: state.value?.monitorPanel?.enabled ?? false,
|
|
1417
|
+
disabled: busy || !state.writable || false,
|
|
1418
|
+
save: saveMonitorPanel,
|
|
1419
|
+
settle,
|
|
1420
|
+
t
|
|
1421
|
+
}),
|
|
1316
1422
|
current !== "tokenpilot-inspired" ? /* @__PURE__ */ (0, react_jsx_runtime.jsx)(EstimatorInactiveNotice, {
|
|
1317
1423
|
profile: t(`profile.${current}`),
|
|
1318
1424
|
t
|
|
@@ -1351,7 +1457,7 @@ window.__ModuleLoader__.load({
|
|
|
1351
1457
|
/**
|
|
1352
1458
|
* Decode one stored context-compression settings document with exactly the
|
|
1353
1459
|
* runtime schema's strictness: a plain object with only `profile`, `custom`,
|
|
1354
|
-
* `autoCompact`, and `
|
|
1460
|
+
* `autoCompact`, `codeSkeleton`, and `intentSummary` keys, a supported profile, a valid Custom
|
|
1355
1461
|
* document canonicalized to v3 exactly as the runtime resolver would, a
|
|
1356
1462
|
* strictly-shaped autoCompact section (absent inherits the 80% default), and
|
|
1357
1463
|
* a strictly-shaped codeSkeleton gate (absent inherits off). Anything else
|
|
@@ -1360,21 +1466,276 @@ window.__ModuleLoader__.load({
|
|
|
1360
1466
|
*/
|
|
1361
1467
|
function decodeSettings(value) {
|
|
1362
1468
|
if (!isPlainRecord(value)) return void 0;
|
|
1363
|
-
if (Object.keys(value).some((key) => key !== "profile" && key !== "custom" && key !== "autoCompact" && key !== "codeSkeleton" && key !== "presetOptions")) return;
|
|
1469
|
+
if (Object.keys(value).some((key) => key !== "profile" && key !== "custom" && key !== "autoCompact" && key !== "codeSkeleton" && key !== "intentSummary" && key !== "monitorPanel" && key !== "presetOptions")) return;
|
|
1364
1470
|
const profile = value.profile;
|
|
1365
1471
|
const custom = value.custom;
|
|
1366
1472
|
const autoCompact = decodeAutoCompactSettings(value.autoCompact);
|
|
1367
1473
|
const codeSkeleton = decodeCodeSkeletonSettings(value.codeSkeleton);
|
|
1474
|
+
const intentSummary = decodeIntentSummarySettings(value.intentSummary);
|
|
1475
|
+
const monitorPanel = decodeMonitorPanelSettings(value.monitorPanel);
|
|
1368
1476
|
const presetOptions = decodePresetOptionsSettings(value.presetOptions);
|
|
1369
|
-
return typeof profile === "string" && COMPRESSION_PROFILES.includes(profile) && isCustomCompressionPolicy(custom) && autoCompact !== void 0 && codeSkeleton !== void 0 ? {
|
|
1477
|
+
return typeof profile === "string" && COMPRESSION_PROFILES.includes(profile) && isCustomCompressionPolicy(custom) && autoCompact !== void 0 && codeSkeleton !== void 0 && intentSummary !== void 0 && monitorPanel !== void 0 ? {
|
|
1370
1478
|
profile,
|
|
1371
1479
|
custom: canonicalizeCustomPolicy(custom),
|
|
1372
1480
|
autoCompact,
|
|
1373
1481
|
codeSkeleton,
|
|
1482
|
+
intentSummary,
|
|
1483
|
+
...monitorPanel === void 0 ? {} : { monitorPanel },
|
|
1374
1484
|
...presetOptions === void 0 ? {} : { presetOptions }
|
|
1375
1485
|
} : void 0;
|
|
1376
1486
|
}
|
|
1377
1487
|
//#endregion
|
|
1488
|
+
//#region src/client/monitor-fab.ts
|
|
1489
|
+
/**
|
|
1490
|
+
* 压缩监控浮动球 + 面板(task: cci-monitor-fab;骨架整编自 pm 撤下的
|
|
1491
|
+
* `longtask-fab.ts` — d29bcb1^, VANILLA DOM overlay 模式: FAB + 面板
|
|
1492
|
+
* appendChild 到 document.body, position:fixed + JS 内联定位, Pointer Events
|
|
1493
|
+
* 拖拽 + localStorage 持久化 + 视口夹紧)。
|
|
1494
|
+
*
|
|
1495
|
+
* cci 客户端纪律:
|
|
1496
|
+
* - body 级直挂 = 幂等单例,应用生命周期存续,不做 dispose(页面刷新自然回收);
|
|
1497
|
+
* - 回声环过滤:自有节点带 `dsh-cci-parasite` 类,不参与宿主面板探测;
|
|
1498
|
+
* - 数据面: `/api/.../monitor` 忙 2s / 闲 5s 自调度轮询(savings 卡同口径),
|
|
1499
|
+
* fetch 失败静默降级 + 陈旧标记——监控面板永不打扰主流程;
|
|
1500
|
+
* - 动作面: 仅会话覆盖(POST,复用 /ctx-summary 状态机),不做压缩执行。
|
|
1501
|
+
*
|
|
1502
|
+
* 显隐: `enabledOf()`(设置文档 monitorPanel.enabled)为总闸;总闸开才显示球;
|
|
1503
|
+
* 净节省为负时「点亮」呼吸态(负节省警示)。v1 监控全会话聚合(savings 卡同
|
|
1504
|
+
* 口径),覆盖作用于默认会话;会话级绑定待 cci 有输入栏座位后另行接线。
|
|
1505
|
+
*/
|
|
1506
|
+
const FAB_ID = "dsh-cci-monitor-fab";
|
|
1507
|
+
const PANEL_ID = "dsh-cci-monitor-panel";
|
|
1508
|
+
const STYLE_ID = "dsh-cci-monitor-style";
|
|
1509
|
+
const PARASITE = "dsh-cci-parasite";
|
|
1510
|
+
const POS_KEY = "dsh.cci.monitor.pos";
|
|
1511
|
+
const num = (v) => typeof v === "number" && Number.isFinite(v) ? v : 0;
|
|
1512
|
+
function initMonitorFab(deps) {
|
|
1513
|
+
if (document.getElementById(FAB_ID) !== null) return;
|
|
1514
|
+
const { t } = deps;
|
|
1515
|
+
const style = document.createElement("style");
|
|
1516
|
+
style.id = STYLE_ID;
|
|
1517
|
+
style.textContent = `
|
|
1518
|
+
#${FAB_ID} { position: fixed; z-index: 9999; width: 42px; height: 42px; border-radius: 50%;
|
|
1519
|
+
background: rgba(30,30,32,.72); backdrop-filter: blur(22px) saturate(180%);
|
|
1520
|
+
border: 1px solid rgba(255,255,255,.14); box-shadow: 0 8px 24px rgba(0,0,0,.4);
|
|
1521
|
+
color: #f5f5f7; font-size: 18px; line-height: 40px; text-align: center; cursor: grab;
|
|
1522
|
+
touch-action: none; user-select: none; display: none; transition: transform .18s; }
|
|
1523
|
+
#${FAB_ID}:hover { transform: scale(1.08); }
|
|
1524
|
+
#${FAB_ID}.lit { display: block; box-shadow: 0 0 0 5px rgba(255,159,10,.28), 0 8px 24px rgba(0,0,0,.4);
|
|
1525
|
+
animation: dsh-cci-mon-breathe 2.4s ease-in-out infinite; }
|
|
1526
|
+
@keyframes dsh-cci-mon-breathe { 0%,100% { box-shadow: 0 0 0 4px rgba(255,159,10,.18), 0 8px 24px rgba(0,0,0,.4); }
|
|
1527
|
+
50% { box-shadow: 0 0 0 8px rgba(255,159,10,.32), 0 8px 24px rgba(0,0,0,.4); } }
|
|
1528
|
+
#${PANEL_ID} { position: fixed; z-index: 9998; width: 336px; border-radius: 14px;
|
|
1529
|
+
background: rgba(28,28,30,.78); backdrop-filter: blur(26px) saturate(180%);
|
|
1530
|
+
border: 1px solid rgba(255,255,255,.12); box-shadow: 0 14px 44px rgba(0,0,0,.55);
|
|
1531
|
+
color: #f5f5f7; font-size: 12.5px; opacity: 0; pointer-events: none;
|
|
1532
|
+
transform: translateY(10px) scale(.92); transform-origin: 88% 100%;
|
|
1533
|
+
transition: opacity .22s cubic-bezier(.16,.8,.3,1.05), transform .22s cubic-bezier(.16,.8,.3,1.1); }
|
|
1534
|
+
#${PANEL_ID}.open { opacity: 1; pointer-events: auto; transform: none; }
|
|
1535
|
+
#${PANEL_ID} h4 { margin: 0; padding: 10px 14px 8px; font-size: 13px; cursor: grab;
|
|
1536
|
+
touch-action: none; user-select: none; border-bottom: 1px solid rgba(255,255,255,.09); }
|
|
1537
|
+
#${PANEL_ID} .row { display: flex; align-items: center; gap: 8px; padding: 6px 14px; }
|
|
1538
|
+
#${PANEL_ID} .row.label { width: 108px; flex: none; color: rgba(245,245,247,.55); }
|
|
1539
|
+
#${PANEL_ID} .muted { color: rgba(245,245,247,.55); }
|
|
1540
|
+
#${PANEL_ID} .neg { color: #ff9f0a; }
|
|
1541
|
+
#${PANEL_ID} button { font: inherit; border-radius: 8px; border: 1px solid rgba(255,255,255,.18);
|
|
1542
|
+
background: rgba(10,132,255,.85); color: #fff; padding: 4px 10px; cursor: pointer; }
|
|
1543
|
+
#${PANEL_ID} button.ghost { background: transparent; }
|
|
1544
|
+
#${PANEL_ID} button:disabled { opacity: .45; cursor: default; }
|
|
1545
|
+
#${PANEL_ID} .stale { padding: 4px 14px 8px; color: #ffd60a; display: none; }
|
|
1546
|
+
#${PANEL_ID} .stale.show { display: block; }
|
|
1547
|
+
#${PANEL_ID} .recent { max-height: 132px; overflow: auto; padding: 2px 14px 8px;
|
|
1548
|
+
color: rgba(245,245,247,.8); white-space: pre-wrap; }
|
|
1549
|
+
`;
|
|
1550
|
+
document.head.appendChild(style);
|
|
1551
|
+
const fab = document.createElement("div");
|
|
1552
|
+
fab.id = FAB_ID;
|
|
1553
|
+
fab.className = PARASITE;
|
|
1554
|
+
fab.textContent = "📉";
|
|
1555
|
+
fab.title = t("monitor.fab.title");
|
|
1556
|
+
const panel = document.createElement("div");
|
|
1557
|
+
panel.id = PANEL_ID;
|
|
1558
|
+
panel.className = PARASITE;
|
|
1559
|
+
panel.hidden = true;
|
|
1560
|
+
panel.innerHTML = `
|
|
1561
|
+
<h4>${t("monitor.panel.title")}</h4>
|
|
1562
|
+
<div class="row"><span class="label">${t("monitor.panel.net")}</span><span data-net>–</span></div>
|
|
1563
|
+
<div class="row"><span class="label">${t("monitor.panel.gross")}</span><span data-gross class="muted">–</span></div>
|
|
1564
|
+
<div class="row"><span class="label">${t("monitor.panel.offsets")}</span><span data-offsets class="muted">–</span></div>
|
|
1565
|
+
<div class="row"><span class="label">${t("monitor.panel.cacheHit")}</span><span data-cache class="muted">–</span></div>
|
|
1566
|
+
<div class="row"><span class="label">${t("monitor.panel.cost")}</span><span data-cost class="muted">–</span></div>
|
|
1567
|
+
<div class="row"><span class="label">${t("monitor.panel.intent")}</span><span data-intent class="muted">–</span></div>
|
|
1568
|
+
<div class="row"><span class="label">${t("monitor.panel.overrideHint")}</span>
|
|
1569
|
+
<button data-overon>${t("monitor.panel.resume")}</button>
|
|
1570
|
+
<button data-overoff class="ghost">${t("monitor.panel.disable")}</button></div>
|
|
1571
|
+
<div class="row muted" data-fold style="display:none"></div>
|
|
1572
|
+
<div class="stale" data-stale>${t("monitor.panel.stale")}</div>
|
|
1573
|
+
<div class="recent" data-recent></div>
|
|
1574
|
+
`;
|
|
1575
|
+
document.body.append(fab, panel);
|
|
1576
|
+
let pos;
|
|
1577
|
+
try {
|
|
1578
|
+
pos = JSON.parse(localStorage.getItem(POS_KEY) ?? "null") ?? {
|
|
1579
|
+
x: Math.max(8, window.innerWidth - 66),
|
|
1580
|
+
y: Math.max(8, Math.round(window.innerHeight * .6))
|
|
1581
|
+
};
|
|
1582
|
+
} catch {
|
|
1583
|
+
pos = {
|
|
1584
|
+
x: Math.max(8, window.innerWidth - 66),
|
|
1585
|
+
y: Math.max(8, Math.round(window.innerHeight * .6))
|
|
1586
|
+
};
|
|
1587
|
+
}
|
|
1588
|
+
const clamp = (p) => ({
|
|
1589
|
+
x: Math.max(8, Math.min(window.innerWidth - 50, p.x)),
|
|
1590
|
+
y: Math.max(8, Math.min(window.innerHeight - 50, p.y))
|
|
1591
|
+
});
|
|
1592
|
+
const place = () => {
|
|
1593
|
+
pos = clamp(pos);
|
|
1594
|
+
fab.style.left = `${pos.x}px`;
|
|
1595
|
+
fab.style.top = `${pos.y}px`;
|
|
1596
|
+
};
|
|
1597
|
+
place();
|
|
1598
|
+
window.addEventListener("resize", place);
|
|
1599
|
+
const makeDrag = (el, key) => {
|
|
1600
|
+
let active = false;
|
|
1601
|
+
let moved = false;
|
|
1602
|
+
let origin = {
|
|
1603
|
+
x: 0,
|
|
1604
|
+
y: 0
|
|
1605
|
+
};
|
|
1606
|
+
el.addEventListener("pointerdown", (e) => {
|
|
1607
|
+
active = true;
|
|
1608
|
+
moved = false;
|
|
1609
|
+
origin = {
|
|
1610
|
+
x: e.clientX,
|
|
1611
|
+
y: e.clientY
|
|
1612
|
+
};
|
|
1613
|
+
el.setPointerCapture(e.pointerId);
|
|
1614
|
+
});
|
|
1615
|
+
el.addEventListener("pointermove", (e) => {
|
|
1616
|
+
if (!active) return;
|
|
1617
|
+
const next = clamp({
|
|
1618
|
+
x: pos.x + e.clientX - origin.x,
|
|
1619
|
+
y: pos.y + e.clientY - origin.y
|
|
1620
|
+
});
|
|
1621
|
+
if (Math.abs(next.x - pos.x) > 2 || Math.abs(next.y - pos.y) > 2) moved = true;
|
|
1622
|
+
pos = key === "fab" ? next : pos;
|
|
1623
|
+
if (key === "fab") place();
|
|
1624
|
+
});
|
|
1625
|
+
el.addEventListener("pointerup", () => {
|
|
1626
|
+
active = false;
|
|
1627
|
+
if (moved && key === "fab") try {
|
|
1628
|
+
localStorage.setItem(POS_KEY, JSON.stringify(pos));
|
|
1629
|
+
} catch {}
|
|
1630
|
+
});
|
|
1631
|
+
el.addEventListener("pointercancel", () => {
|
|
1632
|
+
active = false;
|
|
1633
|
+
});
|
|
1634
|
+
};
|
|
1635
|
+
let suppressClick = false;
|
|
1636
|
+
makeDrag(fab, "fab");
|
|
1637
|
+
let open = false;
|
|
1638
|
+
fab.addEventListener("click", () => {
|
|
1639
|
+
if (suppressClick) {
|
|
1640
|
+
suppressClick = false;
|
|
1641
|
+
return;
|
|
1642
|
+
}
|
|
1643
|
+
open = !open;
|
|
1644
|
+
if (open) {
|
|
1645
|
+
panel.hidden = false;
|
|
1646
|
+
const px = Math.max(8, Math.min(window.innerWidth - 344, pos.x - 300));
|
|
1647
|
+
const py = pos.y - 300 < 8 ? pos.y + 46 : Math.max(8, pos.y - 300);
|
|
1648
|
+
panel.style.left = `${px}px`;
|
|
1649
|
+
panel.style.top = `${py}px`;
|
|
1650
|
+
panel.offsetHeight;
|
|
1651
|
+
panel.classList.add("open");
|
|
1652
|
+
} else {
|
|
1653
|
+
panel.classList.remove("open");
|
|
1654
|
+
setTimeout(() => {
|
|
1655
|
+
panel.hidden = true;
|
|
1656
|
+
}, 240);
|
|
1657
|
+
}
|
|
1658
|
+
});
|
|
1659
|
+
makeDrag(panel.querySelector("h4"), "panel");
|
|
1660
|
+
let stale = false;
|
|
1661
|
+
let busyAction = false;
|
|
1662
|
+
const fmtTokens = (n) => num(n).toLocaleString("en-US");
|
|
1663
|
+
const render = (snap) => {
|
|
1664
|
+
const net = num(snap.net?.exact) + num(snap.net?.estimated);
|
|
1665
|
+
const netEl = panel.querySelector("[data-net]");
|
|
1666
|
+
netEl.textContent = `${net >= 0 ? "" : ""}${fmtTokens(snap.net?.exact)}${num(snap.net?.estimated) > 0 ? ` (+${fmtTokens(snap.net?.estimated)} est)` : ""}`;
|
|
1667
|
+
netEl.classList.toggle("neg", net < 0);
|
|
1668
|
+
fab.classList.toggle("lit", net < 0);
|
|
1669
|
+
panel.querySelector("[data-gross]").textContent = fmtTokens(snap.gross?.exact);
|
|
1670
|
+
panel.querySelector("[data-offsets]").textContent = `-${fmtTokens(snap.offsets?.exact)}`;
|
|
1671
|
+
const hit = snap.usage?.cacheHitRate;
|
|
1672
|
+
panel.querySelector("[data-cache]").textContent = typeof hit === "number" ? `${Math.round(hit * 100)}%` : "–";
|
|
1673
|
+
const pricing = snap.pricing;
|
|
1674
|
+
panel.querySelector("[data-cost]").textContent = pricing?.actualCost === void 0 && pricing?.estimatedSavedCost === void 0 ? "–" : `${pricing?.actualCost ?? "–"} / -${pricing?.estimatedSavedCost ?? "–"} ${String(pricing?.currency ?? "")}`.trim();
|
|
1675
|
+
const intentEl = panel.querySelector("[data-intent]");
|
|
1676
|
+
const override = snap.intent?.override;
|
|
1677
|
+
const observed = snap.intent?.observedEnabled;
|
|
1678
|
+
intentEl.textContent = override === "on" || override === "off" ? `${t("monitor.panel.overridePrefix")} ${override === "on" ? t("monitor.panel.stateOn") : t("monitor.panel.stateOff")}` : observed === void 0 ? t("monitor.panel.gateUnknown") : observed ? t("monitor.panel.stateOn") : t("monitor.panel.stateOff");
|
|
1679
|
+
const fold = snap.intent?.lastFold;
|
|
1680
|
+
const foldEl = panel.querySelector("[data-fold]");
|
|
1681
|
+
if (fold !== void 0 && fold !== null && typeof fold === "object") {
|
|
1682
|
+
foldEl.style.display = "";
|
|
1683
|
+
foldEl.textContent = `${t("monitor.panel.lastFold")} turn ${String(fold.turn ?? "–")}, seq ${String(fold.startSeq ?? "–")}..${String(fold.endSeq ?? "–")}`;
|
|
1684
|
+
} else foldEl.style.display = "none";
|
|
1685
|
+
const recent = Array.isArray(snap.recentOffsets) ? snap.recentOffsets.slice(0, 3) : [];
|
|
1686
|
+
panel.querySelector("[data-recent]").textContent = recent.length === 0 ? t("savings.empty") : recent.map((entry) => {
|
|
1687
|
+
const e = entry;
|
|
1688
|
+
return `${String(e.component ?? "–")}: ${fmtTokens(e.tokens)}`;
|
|
1689
|
+
}).join("\n");
|
|
1690
|
+
for (const [selector, action] of [["[data-overon]", "on"], ["[data-overoff]", "off"]]) panel.querySelector(selector).disabled = busyAction || override === action;
|
|
1691
|
+
};
|
|
1692
|
+
const markStale = (isStale) => {
|
|
1693
|
+
stale = isStale;
|
|
1694
|
+
panel.querySelector("[data-stale]").classList.toggle("show", stale);
|
|
1695
|
+
};
|
|
1696
|
+
const tick = async () => {
|
|
1697
|
+
const enabled = deps.enabledOf();
|
|
1698
|
+
fab.style.display = enabled ? "block" : "none";
|
|
1699
|
+
if (!enabled) {
|
|
1700
|
+
if (open) {
|
|
1701
|
+
open = false;
|
|
1702
|
+
panel.classList.remove("open");
|
|
1703
|
+
panel.hidden = true;
|
|
1704
|
+
}
|
|
1705
|
+
setTimeout(tick, 5e3);
|
|
1706
|
+
return;
|
|
1707
|
+
}
|
|
1708
|
+
try {
|
|
1709
|
+
const snap = await deps.fetchSnapshot(deps.sessionIdOf());
|
|
1710
|
+
markStale(false);
|
|
1711
|
+
render(snap);
|
|
1712
|
+
} catch {
|
|
1713
|
+
markStale(true);
|
|
1714
|
+
}
|
|
1715
|
+
setTimeout(tick, open ? 2e3 : 5e3);
|
|
1716
|
+
};
|
|
1717
|
+
setTimeout(tick, deps.initialDelayMs ?? 1500);
|
|
1718
|
+
const wireOverride = (selector, action) => {
|
|
1719
|
+
panel.querySelector(selector)?.addEventListener("click", async () => {
|
|
1720
|
+
if (busyAction) return;
|
|
1721
|
+
busyAction = true;
|
|
1722
|
+
try {
|
|
1723
|
+
await deps.applyOverride(deps.sessionIdOf(), action);
|
|
1724
|
+
const sid = deps.sessionIdOf();
|
|
1725
|
+
const snap = await deps.fetchSnapshot(sid);
|
|
1726
|
+
markStale(false);
|
|
1727
|
+
render(snap);
|
|
1728
|
+
} catch {
|
|
1729
|
+
markStale(true);
|
|
1730
|
+
} finally {
|
|
1731
|
+
busyAction = false;
|
|
1732
|
+
}
|
|
1733
|
+
});
|
|
1734
|
+
};
|
|
1735
|
+
wireOverride("[data-overon]", "on");
|
|
1736
|
+
wireOverride("[data-overoff]", "off");
|
|
1737
|
+
}
|
|
1738
|
+
//#endregion
|
|
1378
1739
|
//#region src/client/locales.ts
|
|
1379
1740
|
/** Simplified Chinese copy for the context-compression selector. */
|
|
1380
1741
|
const zh = {
|
|
@@ -1440,6 +1801,32 @@ window.__ModuleLoader__.load({
|
|
|
1440
1801
|
"codeSkeleton.enabled": "代码骨架压缩",
|
|
1441
1802
|
"codeSkeleton.enabled.on": "开",
|
|
1442
1803
|
"codeSkeleton.enabled.off": "关(默认)",
|
|
1804
|
+
"intentSummary.title": "回合末意图摘要(转向尾部压缩)",
|
|
1805
|
+
"intentSummary.description": "开启后,回合收尾阶段把本次消费的增量按语义角色折叠为意图摘要块:读类工具结果压成单行目标/规模记录,写类保留骨架头与逐字错误行,于下一次压力回合经既有折叠管线落地;仅当增长门控通过(活跃表面 >45% 且距上次折叠增长 >50K token)才触发。修改只影响新会话;当前会话可用 /ctx-summary off|on|status 临时覆盖。",
|
|
1806
|
+
"intentSummary.enabled": "回合末意图摘要",
|
|
1807
|
+
"intentSummary.enabled.on": "开",
|
|
1808
|
+
"intentSummary.enabled.off": "关(默认)",
|
|
1809
|
+
"monitor.fab.title": "压缩监控",
|
|
1810
|
+
"monitor.panel.title": "压缩监控",
|
|
1811
|
+
"monitor.panel.net": "净节省",
|
|
1812
|
+
"monitor.panel.gross": "毛节省",
|
|
1813
|
+
"monitor.panel.offsets": "抵消",
|
|
1814
|
+
"monitor.panel.cacheHit": "缓存命中率",
|
|
1815
|
+
"monitor.panel.cost": "成本(实际 / 省估)",
|
|
1816
|
+
"monitor.panel.intent": "意图摘要",
|
|
1817
|
+
"monitor.panel.overrideHint": "会话覆盖",
|
|
1818
|
+
"monitor.panel.resume": "恢复",
|
|
1819
|
+
"monitor.panel.disable": "停用",
|
|
1820
|
+
"monitor.panel.stateOn": "开",
|
|
1821
|
+
"monitor.panel.stateOff": "关",
|
|
1822
|
+
"monitor.panel.gateUnknown": "未评估",
|
|
1823
|
+
"monitor.panel.lastFold": "最近折叠",
|
|
1824
|
+
"monitor.panel.stale": "快照不可达——显示上次数据",
|
|
1825
|
+
"monitorPanel.title": "压缩监控悬浮面板",
|
|
1826
|
+
"monitorPanel.description": "开启后,输入区旁出现可拖拽的悬浮球,点开即监控当前压缩状态:净节省(精确口径)、缓存命中率、成本估算、回合末意图摘要门控与最近抵消;面板内可临时覆盖当前会话的意图摘要开关。账本为进程内口径(宿主重启归零)。",
|
|
1827
|
+
"monitorPanel.enabled": "悬浮面板",
|
|
1828
|
+
"monitorPanel.enabled.on": "开",
|
|
1829
|
+
"monitorPanel.enabled.off": "关(默认)",
|
|
1443
1830
|
"custom.title": "Custom 策略",
|
|
1444
1831
|
"custom.settingsHint": "具体参数请前往“设置 > 上下文压缩选择器”中编辑。",
|
|
1445
1832
|
"custom.sessionScope": "保存后的修改会在当前压缩运行时随后首次观察某个 Session 时生效;已被该运行时观察的 Session 继续使用其冻结策略。",
|
|
@@ -1550,6 +1937,32 @@ window.__ModuleLoader__.load({
|
|
|
1550
1937
|
"codeSkeleton.enabled": "Code skeleton compression",
|
|
1551
1938
|
"codeSkeleton.enabled.on": "On",
|
|
1552
1939
|
"codeSkeleton.enabled.off": "Off (default)",
|
|
1940
|
+
"intentSummary.title": "Turn-tail intent summary",
|
|
1941
|
+
"intentSummary.description": "When on, the turn-boundary postflight folds the consumed increment into intent-summary blocks by semantic role: read-class tool results become one-line target/scale records and write-class keep skeleton heads plus verbatim error lines, landing on the next pressure round through the ordinary fold pipeline. Only fires when the growth gate passes (live surface >45% and >50K tokens grown since the last fold). Applies to new sessions; override the current one with /ctx-summary off|on|status.",
|
|
1942
|
+
"intentSummary.enabled": "Turn-tail intent summary",
|
|
1943
|
+
"intentSummary.enabled.on": "On",
|
|
1944
|
+
"intentSummary.enabled.off": "Off (default)",
|
|
1945
|
+
"monitor.fab.title": "Compression monitor",
|
|
1946
|
+
"monitor.panel.title": "Compression monitor",
|
|
1947
|
+
"monitor.panel.net": "Net savings",
|
|
1948
|
+
"monitor.panel.gross": "Gross savings",
|
|
1949
|
+
"monitor.panel.offsets": "Offsets",
|
|
1950
|
+
"monitor.panel.cacheHit": "Cache hit rate",
|
|
1951
|
+
"monitor.panel.cost": "Cost (actual / saved est.)",
|
|
1952
|
+
"monitor.panel.intent": "Intent summary",
|
|
1953
|
+
"monitor.panel.overrideHint": "Session override",
|
|
1954
|
+
"monitor.panel.resume": "Resume",
|
|
1955
|
+
"monitor.panel.disable": "Disable",
|
|
1956
|
+
"monitor.panel.stateOn": "on",
|
|
1957
|
+
"monitor.panel.stateOff": "off",
|
|
1958
|
+
"monitor.panel.gateUnknown": "not evaluated yet",
|
|
1959
|
+
"monitor.panel.lastFold": "Last fold",
|
|
1960
|
+
"monitor.panel.stale": "Snapshot unreachable — showing last data",
|
|
1961
|
+
"monitorPanel.title": "Compression monitor panel",
|
|
1962
|
+
"monitorPanel.description": "When on, a draggable floating bubble appears next to the input area — open it to watch live compression state: net savings (exact basis), cache hit rate, cost estimate, the turn-tail intent-summary gate and recent offsets. The panel can temporarily override the current session's intent-summary switch. The ledger is per-process (reset when the host restarts).",
|
|
1963
|
+
"monitorPanel.enabled": "Monitor panel",
|
|
1964
|
+
"monitorPanel.enabled.on": "On",
|
|
1965
|
+
"monitorPanel.enabled.off": "Off (default)",
|
|
1553
1966
|
"custom.title": "Custom policy",
|
|
1554
1967
|
"custom.settingsHint": "Edit detailed parameters in Settings > Context compression selector.",
|
|
1555
1968
|
"custom.sessionScope": "Saved changes apply when the current compression runtime next observes a Session for the first time. A Session already observed by that runtime keeps its frozen policy.",
|
|
@@ -1662,6 +2075,32 @@ window.__ModuleLoader__.load({
|
|
|
1662
2075
|
"codeSkeleton.enabled": "Code-Skelettkomprimierung",
|
|
1663
2076
|
"codeSkeleton.enabled.on": "Ein",
|
|
1664
2077
|
"codeSkeleton.enabled.off": "Aus (Standard)",
|
|
2078
|
+
"intentSummary.title": "Abschluss-Zusammenfassung (Turn-Tail)",
|
|
2079
|
+
"intentSummary.description": "Aktiviert faltet der Turn-Abschluss den verbrauchten Zuwachs nach semantischen Rollen zu Intent-Zusammenfassungsblöcken: Lese-Tool-Ergebnisse werden zu Einzeilern mit Ziel/Umfang, die Schreibklasse behält Skelettköpfe plus wörtliche Fehlerzeilen; die Landung erfolgt in der nächsten Druckrunde über die gewöhnliche Falt-Pipeline. Zündet nur, wenn die Wachstumsschwelle passiert ist (live Oberfläche >45 % und >50K Token seit der letzten Faltung). Gilt für neue Sitzungen; die aktuelle lässt sich mit /ctx-summary off|on|status übersteuern.",
|
|
2080
|
+
"intentSummary.enabled": "Abschluss-Zusammenfassung",
|
|
2081
|
+
"intentSummary.enabled.on": "Ein",
|
|
2082
|
+
"intentSummary.enabled.off": "Aus (Standard)",
|
|
2083
|
+
"monitor.fab.title": "Komprimierungs-Monitor",
|
|
2084
|
+
"monitor.panel.title": "Komprimierungs-Monitor",
|
|
2085
|
+
"monitor.panel.net": "Nettoeinsparung",
|
|
2086
|
+
"monitor.panel.gross": "Bruttoeinsparung",
|
|
2087
|
+
"monitor.panel.offsets": "Ausgleiche",
|
|
2088
|
+
"monitor.panel.cacheHit": "Cache-Trefferquote",
|
|
2089
|
+
"monitor.panel.cost": "Kosten (ist / gespart gesch.)",
|
|
2090
|
+
"monitor.panel.intent": "Intent-Zusammenfassung",
|
|
2091
|
+
"monitor.panel.overrideHint": "Sitzungs-Übersteuerung",
|
|
2092
|
+
"monitor.panel.resume": "Fortsetzen",
|
|
2093
|
+
"monitor.panel.disable": "Deaktivieren",
|
|
2094
|
+
"monitor.panel.stateOn": "ein",
|
|
2095
|
+
"monitor.panel.stateOff": "aus",
|
|
2096
|
+
"monitor.panel.gateUnknown": "noch nicht bewertet",
|
|
2097
|
+
"monitor.panel.lastFold": "Letzte Faltung",
|
|
2098
|
+
"monitor.panel.stale": "Snapshot nicht erreichbar — letzte Daten",
|
|
2099
|
+
"monitorPanel.title": "Komprimierungs-Monitorpanel",
|
|
2100
|
+
"monitorPanel.description": "Aktiviert erscheint neben dem Eingabebereich eine ziehbare Schwebekugel — öffne sie, um den Live-Komprimierungszustand zu beobachten: Nettoeinsparung (exakte Basis), Cache-Trefferquote, Kostenschätzung, das Turn-Tail-Gate und letzte Ausgleiche. Das Panel kann den Intent-Zusammenfassungsschalter der aktuellen Sitzung temporär übersteuern. Das Konto ist prozesslokal (Reset bei Host-Neustart).",
|
|
2101
|
+
"monitorPanel.enabled": "Monitorpanel",
|
|
2102
|
+
"monitorPanel.enabled.on": "Ein",
|
|
2103
|
+
"monitorPanel.enabled.off": "Aus (Standard)",
|
|
1665
2104
|
"custom.title": "Eigene Strategie",
|
|
1666
2105
|
"custom.settingsHint": "Detaillierte Parameter unter Einstellungen > Kontextkomprimierung wählen bearbeiten.",
|
|
1667
2106
|
"custom.sessionScope": "Gespeicherte Änderungen greifen, wenn die aktuelle Compression-Runtime eine Sitzung zum ersten Mal beobachtet. Eine von dieser Runtime bereits beobachtete Sitzung behält ihre eingefrorene Strategie.",
|
|
@@ -1774,6 +2213,32 @@ window.__ModuleLoader__.load({
|
|
|
1774
2213
|
"codeSkeleton.enabled": "Compresión de esqueleto del código",
|
|
1775
2214
|
"codeSkeleton.enabled.on": "Activado",
|
|
1776
2215
|
"codeSkeleton.enabled.off": "Desactivado (predeterminado)",
|
|
2216
|
+
"intentSummary.title": "Resumen de intención al cierre del turno",
|
|
2217
|
+
"intentSummary.description": "Al activarlo, el postflight de cierre de turno pliega el incremento consumido en bloques de resumen de intención por rol semántico: los resultados de herramientas de lectura se convierten en registros de una línea con objetivo/escala y los de escritura conservan la cabecera de esqueleto más las líneas de error textuales; aterriza en la siguiente ronda de presión por el conducto de plegado normal. Solo se dispara si se supera la puerta de crecimiento (superficie activa >45 % y >50K tokens desde el último plegado). Aplica a sesiones nuevas; la actual se gobierna con /ctx-summary off|on|status.",
|
|
2218
|
+
"intentSummary.enabled": "Resumen de intención al cierre",
|
|
2219
|
+
"intentSummary.enabled.on": "Sí",
|
|
2220
|
+
"intentSummary.enabled.off": "No (predeterminado)",
|
|
2221
|
+
"monitor.fab.title": "Monitor de compresión",
|
|
2222
|
+
"monitor.panel.title": "Monitor de compresión",
|
|
2223
|
+
"monitor.panel.net": "Ahorro neto",
|
|
2224
|
+
"monitor.panel.gross": "Ahorro bruto",
|
|
2225
|
+
"monitor.panel.offsets": "Compensaciones",
|
|
2226
|
+
"monitor.panel.cacheHit": "Tasa de acierto de caché",
|
|
2227
|
+
"monitor.panel.cost": "Coste (real / ahorro est.)",
|
|
2228
|
+
"monitor.panel.intent": "Resumen de intención",
|
|
2229
|
+
"monitor.panel.overrideHint": "Invalidación de sesión",
|
|
2230
|
+
"monitor.panel.resume": "Reanudar",
|
|
2231
|
+
"monitor.panel.disable": "Desactivar",
|
|
2232
|
+
"monitor.panel.stateOn": "sí",
|
|
2233
|
+
"monitor.panel.stateOff": "no",
|
|
2234
|
+
"monitor.panel.gateUnknown": "aún sin evaluar",
|
|
2235
|
+
"monitor.panel.lastFold": "Último plegado",
|
|
2236
|
+
"monitor.panel.stale": "Instantánea inalcanzable — se muestran los últimos datos",
|
|
2237
|
+
"monitorPanel.title": "Panel de monitor de compresión",
|
|
2238
|
+
"monitorPanel.description": "Al activarlo, junto al área de entrada aparece una burbuja flotante arrastrable — ábrela para observar el estado de compresión en vivo: ahorro neto (base exacta), tasa de acierto de caché, estimación de coste, la puerta de resumen de intención del turno y compensaciones recientes. El panel puede invalidar temporalmente el interruptor de resumen de intención de la sesión actual. El libro es por proceso (se reinicia al rearrancar el host).",
|
|
2239
|
+
"monitorPanel.enabled": "Panel de monitor",
|
|
2240
|
+
"monitorPanel.enabled.on": "Sí",
|
|
2241
|
+
"monitorPanel.enabled.off": "No (predeterminado)",
|
|
1777
2242
|
"custom.title": "Política personalizada",
|
|
1778
2243
|
"custom.settingsHint": "Edita los parámetros detallados en Ajustes > Selector de compresión de contexto.",
|
|
1779
2244
|
"custom.sessionScope": "Los cambios guardados se aplican cuando el runtime de compresión actual observa una Session por primera vez. Una Session ya observada por ese runtime conserva su política congelada.",
|
|
@@ -1886,6 +2351,32 @@ window.__ModuleLoader__.load({
|
|
|
1886
2351
|
"codeSkeleton.enabled": "Compression du code en squelette",
|
|
1887
2352
|
"codeSkeleton.enabled.on": "Activé",
|
|
1888
2353
|
"codeSkeleton.enabled.off": "Désactivé (par défaut)",
|
|
2354
|
+
"intentSummary.title": "Résumé d'intention en fin de tour",
|
|
2355
|
+
"intentSummary.description": "Activé, le postflight de fin de tour plie l'incrément consommé en blocs de résumé d'intention par rôle sémantique : les résultats d'outils de lecture deviennent des enregistrements une-ligne objectif/échelle, les écrits gardent la tête de squelette plus les lignes d'erreur verbatim ; l'atterrissage se fait au prochain tour de pression via le pipeline de pliage habituel. Ne se déclenche que si la porte de croissance passe (surface active >45 % et >50K tokens depuis le dernier pliage). S'applique aux nouvelles sessions ; la session courante se pilote avec /ctx-summary off|on|status.",
|
|
2356
|
+
"intentSummary.enabled": "Résumé d'intention en fin de tour",
|
|
2357
|
+
"intentSummary.enabled.on": "Activé",
|
|
2358
|
+
"intentSummary.enabled.off": "Désactivé (par défaut)",
|
|
2359
|
+
"monitor.fab.title": "Monitor de compression",
|
|
2360
|
+
"monitor.panel.title": "Monitor de compression",
|
|
2361
|
+
"monitor.panel.net": "Économie nette",
|
|
2362
|
+
"monitor.panel.gross": "Économie brute",
|
|
2363
|
+
"monitor.panel.offsets": "Compensations",
|
|
2364
|
+
"monitor.panel.cacheHit": "Taux de réussite du cache",
|
|
2365
|
+
"monitor.panel.cost": "Coût (réel / écon. est.)",
|
|
2366
|
+
"monitor.panel.intent": "Résumé d'intention",
|
|
2367
|
+
"monitor.panel.overrideHint": "Priorité de session",
|
|
2368
|
+
"monitor.panel.resume": "Reprendre",
|
|
2369
|
+
"monitor.panel.disable": "Désactiver",
|
|
2370
|
+
"monitor.panel.stateOn": "activé",
|
|
2371
|
+
"monitor.panel.stateOff": "désactivé",
|
|
2372
|
+
"monitor.panel.gateUnknown": "pas encore évalué",
|
|
2373
|
+
"monitor.panel.lastFold": "Dernier pliage",
|
|
2374
|
+
"monitor.panel.stale": "Instantané injoignable — dernières données",
|
|
2375
|
+
"monitorPanel.title": "Panneau de monitorage de compression",
|
|
2376
|
+
"monitorPanel.description": "Activé, une bulle flottante déplaçable apparaît près de la zone de saisie — ouvrez-la pour observer l'état de compression en direct : économie nette (base exacte), taux de réussite du cache, estimation de coût, la porte de résumé d'intention du tour et les compensations récentes. Le panneau peut contourner temporairement l'interrupteur de résumé d'intention de la session courante. Le registre est propre au processus (remis à zéro au redémarrage de l'hôte).",
|
|
2377
|
+
"monitorPanel.enabled": "Panneau de monitorage",
|
|
2378
|
+
"monitorPanel.enabled.on": "Activé",
|
|
2379
|
+
"monitorPanel.enabled.off": "Désactivé (par défaut)",
|
|
1889
2380
|
"custom.title": "Stratégie personnalisée",
|
|
1890
2381
|
"custom.settingsHint": "Modifiez les paramètres détaillés dans Réglages > Sélecteur de compression du contexte.",
|
|
1891
2382
|
"custom.sessionScope": "Les changements enregistrés s’appliquent quand le runtime de compression actuel observe une Session pour la première fois. Une Session déjà observée par ce runtime garde sa stratégie figée.",
|
|
@@ -1998,6 +2489,32 @@ window.__ModuleLoader__.load({
|
|
|
1998
2489
|
"codeSkeleton.enabled": "Compressione a scheletro del codice",
|
|
1999
2490
|
"codeSkeleton.enabled.on": "Attivato",
|
|
2000
2491
|
"codeSkeleton.enabled.off": "Disattivato (predefinito)",
|
|
2492
|
+
"intentSummary.title": "Riepilogo di intento a fine turno",
|
|
2493
|
+
"intentSummary.description": "Quando attivo, il postflight di fine turno piega l'incremento consumato in blocchi di riepilogo di intento per ruolo semantico: i risultati degli strumenti di lettura diventano record a riga singola obiettivo/scala, quelli di scrittura mantengono la testa dello scheletro più le righe di errore testuali; atterra al prossimo round di pressione tramite la pipeline di piegatura ordinaria. Si attiva solo se la soglia di crescita passa (superficie attiva >45% e >50K token dall'ultima piegatura). Vale per le nuove sessioni; quella corrente si governa con /ctx-summary off|on|status.",
|
|
2494
|
+
"intentSummary.enabled": "Riepilogo di intento a fine turno",
|
|
2495
|
+
"intentSummary.enabled.on": "On",
|
|
2496
|
+
"intentSummary.enabled.off": "Off (predefinito)",
|
|
2497
|
+
"monitor.fab.title": "Monitor compressione",
|
|
2498
|
+
"monitor.panel.title": "Monitor compressione",
|
|
2499
|
+
"monitor.panel.net": "Risparmio netto",
|
|
2500
|
+
"monitor.panel.gross": "Risparmio lordo",
|
|
2501
|
+
"monitor.panel.offsets": "Compensazioni",
|
|
2502
|
+
"monitor.panel.cacheHit": "Tasso di hit della cache",
|
|
2503
|
+
"monitor.panel.cost": "Costo (effettivo / stimo)",
|
|
2504
|
+
"monitor.panel.intent": "Riepilogo di intento",
|
|
2505
|
+
"monitor.panel.overrideHint": "Override di sessione",
|
|
2506
|
+
"monitor.panel.resume": "Riprendi",
|
|
2507
|
+
"monitor.panel.disable": "Disattiva",
|
|
2508
|
+
"monitor.panel.stateOn": "on",
|
|
2509
|
+
"monitor.panel.stateOff": "off",
|
|
2510
|
+
"monitor.panel.gateUnknown": "non ancora valutato",
|
|
2511
|
+
"monitor.panel.lastFold": "Ultima piegatura",
|
|
2512
|
+
"monitor.panel.stale": "Snapshot non raggiungibile — ultimi dati",
|
|
2513
|
+
"monitorPanel.title": "Pannello di monitoraggio compressione",
|
|
2514
|
+
"monitorPanel.description": "Quando attivo, accanto all'area di input appare una bolla flottante trascinabile — aprila per osservare lo stato di compressione in tempo reale: risparmio netto (base esatta), tasso di hit della cache, stima dei costi, la soglia del riepilogo di intento del turno e le compensazioni recenti. Il pannello può ignorare temporaneamente l'interruttore del riepilogo di intento della sessione corrente. Il registro è per processo (azzerato al riavvio dell'host).",
|
|
2515
|
+
"monitorPanel.enabled": "Pannello di monitoraggio",
|
|
2516
|
+
"monitorPanel.enabled.on": "On",
|
|
2517
|
+
"monitorPanel.enabled.off": "Off (predefinito)",
|
|
2001
2518
|
"custom.title": "Politica personalizzata",
|
|
2002
2519
|
"custom.settingsHint": "Modifica i parametri dettagliati in Impostazioni > Selettore di compressione del contesto.",
|
|
2003
2520
|
"custom.sessionScope": "Le modifiche salvate si applicano quando l’attuale runtime di compressione osserva una Sessione per la prima volta. Una Sessione già osservata da quel runtime mantiene la sua politica congelata.",
|
|
@@ -2110,6 +2627,32 @@ window.__ModuleLoader__.load({
|
|
|
2110
2627
|
"codeSkeleton.enabled": "コードスケルトン圧縮",
|
|
2111
2628
|
"codeSkeleton.enabled.on": "オン",
|
|
2112
2629
|
"codeSkeleton.enabled.off": "オフ(既定)",
|
|
2630
|
+
"intentSummary.title": "ターン末尾インテント要約",
|
|
2631
|
+
"intentSummary.description": "有効にすると、ターン境界のポストフライトが消費済み増分を意味役割ごとにインテント要約ブロックへ折り畳みます。読み系ツール結果は目標/規模の 1 行レコードに、書き系は骨格ヘッダーと逐語エラー行を保持し、次の圧力ラウンドで通常の折り畳みパイプラインを通じて着地します。成長ゲート(ライブ表面 >45%、前回の折り畳みから >50K トークン増)を通過したときだけ発火します。変更は新セッションに適用され、現セッションは /ctx-summary off|on|status で上書きできます。",
|
|
2632
|
+
"intentSummary.enabled": "ターン末尾インテント要約",
|
|
2633
|
+
"intentSummary.enabled.on": "オン",
|
|
2634
|
+
"intentSummary.enabled.off": "オフ(既定)",
|
|
2635
|
+
"monitor.fab.title": "圧縮モニター",
|
|
2636
|
+
"monitor.panel.title": "圧縮モニター",
|
|
2637
|
+
"monitor.panel.net": "正味節約",
|
|
2638
|
+
"monitor.panel.gross": "総節約",
|
|
2639
|
+
"monitor.panel.offsets": "相殺",
|
|
2640
|
+
"monitor.panel.cacheHit": "キャッシュ ヒット率",
|
|
2641
|
+
"monitor.panel.cost": "コスト(実績 / 節約概算)",
|
|
2642
|
+
"monitor.panel.intent": "インテント要約",
|
|
2643
|
+
"monitor.panel.overrideHint": "セッション上書き",
|
|
2644
|
+
"monitor.panel.resume": "再開",
|
|
2645
|
+
"monitor.panel.disable": "停止",
|
|
2646
|
+
"monitor.panel.stateOn": "オン",
|
|
2647
|
+
"monitor.panel.stateOff": "オフ",
|
|
2648
|
+
"monitor.panel.gateUnknown": "未評価",
|
|
2649
|
+
"monitor.panel.lastFold": "最後の折り畳み",
|
|
2650
|
+
"monitor.panel.stale": "スナップショット到達不能——前回データを表示",
|
|
2651
|
+
"monitorPanel.title": "圧縮モニター パネル",
|
|
2652
|
+
"monitorPanel.description": "有効にすると、入力欄のそばにドラッグできるフローティング バブルが現れます。開くとライブの圧縮状態を監視できます。正味節約(正確 basis)、キャッシュ ヒット率、コスト概算、ターン末尾インテント要約ゲート、最近の相殺。パネルから現セッションのインテント要約スイッチを一時的に上書きできます。台帳はプロセス単位(ホスト再起動でリセット)。",
|
|
2653
|
+
"monitorPanel.enabled": "モニター パネル",
|
|
2654
|
+
"monitorPanel.enabled.on": "オン",
|
|
2655
|
+
"monitorPanel.enabled.off": "オフ(既定)",
|
|
2113
2656
|
"custom.title": "カスタムポリシー",
|
|
2114
2657
|
"custom.settingsHint": "詳細パラメーターは「設定 > コンテキスト圧縮セレクター」で編集してください。",
|
|
2115
2658
|
"custom.sessionScope": "保存した変更は、現在の圧縮ランタイムが次に Session を初めて観測したときに適用されます。そのランタイムに既に観測された Session は凍結済みポリシーを使い続けます。",
|
|
@@ -2222,6 +2765,32 @@ window.__ModuleLoader__.load({
|
|
|
2222
2765
|
"codeSkeleton.enabled": "코드 스켈레톤 압축",
|
|
2223
2766
|
"codeSkeleton.enabled.on": "켬",
|
|
2224
2767
|
"codeSkeleton.enabled.off": "끔(기본값)",
|
|
2768
|
+
"intentSummary.title": "턴 말머리 인텐트 요약",
|
|
2769
|
+
"intentSummary.description": "켜면 턴 경계 포스트플라이트가 소비된 증분을 의미 역할별 인텐트 요약 블록으로 접습니다. 읽기 도구 결과는 목표/규모 한 줄 레코드가 되고 쓰기는 골격 헤더와 원문 오류 줄을 유지하며, 다음 압력 라운드에서 기존 접기 파이프라인을 통해 착지합니다. 성장 게이트(라이브 표면 >45%, 마지막 접기 이후 >50K 토큰 증가)를 통과할 때만 발동합니다. 새 세션에 적용되며, 현재 세션은 /ctx-summary off|on|status 로 임시 전환할 수 있습니다.",
|
|
2770
|
+
"intentSummary.enabled": "턴 말머리 인텐트 요약",
|
|
2771
|
+
"intentSummary.enabled.on": "켜기",
|
|
2772
|
+
"intentSummary.enabled.off": "끄기(기본)",
|
|
2773
|
+
"monitor.fab.title": "압축 모니터",
|
|
2774
|
+
"monitor.panel.title": "압축 모니터",
|
|
2775
|
+
"monitor.panel.net": "순 절감",
|
|
2776
|
+
"monitor.panel.gross": "총 절감",
|
|
2777
|
+
"monitor.panel.offsets": "상쇄",
|
|
2778
|
+
"monitor.panel.cacheHit": "캐시 적중률",
|
|
2779
|
+
"monitor.panel.cost": "비용 (실제 / 절감 추정)",
|
|
2780
|
+
"monitor.panel.intent": "인텐트 요약",
|
|
2781
|
+
"monitor.panel.overrideHint": "세션 재정의",
|
|
2782
|
+
"monitor.panel.resume": "재개",
|
|
2783
|
+
"monitor.panel.disable": "중지",
|
|
2784
|
+
"monitor.panel.stateOn": "켬",
|
|
2785
|
+
"monitor.panel.stateOff": "끔",
|
|
2786
|
+
"monitor.panel.gateUnknown": "아직 평가 안 됨",
|
|
2787
|
+
"monitor.panel.lastFold": "마지막 접기",
|
|
2788
|
+
"monitor.panel.stale": "스냅샷 도달 불가——이전 데이터 표시",
|
|
2789
|
+
"monitorPanel.title": "압축 모니터 패널",
|
|
2790
|
+
"monitorPanel.description": "켜면 입력 영역 옆에 드래그 가능한 플로팅 버블이 나타납니다. 열면 라이브 압축 상태를 볼 수 있습니다. 순 절감(정확 기준), 캐시 적중률, 비용 추정, 턴 말머리 인텐트 요약 게이트, 최근 상쇄. 패널에서 현재 세션의 인텐트 요약 스위치를 임시로 전환할 수 있습니다. 장부는 프로세스 단위(호스트 재시작 시 초기화).",
|
|
2791
|
+
"monitorPanel.enabled": "모니터 패널",
|
|
2792
|
+
"monitorPanel.enabled.on": "켜기",
|
|
2793
|
+
"monitorPanel.enabled.off": "끄기(기본)",
|
|
2225
2794
|
"custom.title": "커스텀 정책",
|
|
2226
2795
|
"custom.settingsHint": "세부 파라미터는 「설정 > 컨텍스트 압축 셀렉터」에서 편집하세요.",
|
|
2227
2796
|
"custom.sessionScope": "저장된 변경 사항은 현재 압축 런타임이 Session을 처음 관측하는 시점에 적용됩니다. 해당 런타임이 이미 관측한 Session은 동결된 정책을 계속 사용합니다.",
|
|
@@ -2334,6 +2903,32 @@ window.__ModuleLoader__.load({
|
|
|
2334
2903
|
"codeSkeleton.enabled": "Скелетное сжатие кода",
|
|
2335
2904
|
"codeSkeleton.enabled.on": "Вкл",
|
|
2336
2905
|
"codeSkeleton.enabled.off": "Выкл (по умолчанию)",
|
|
2906
|
+
"intentSummary.title": "Итог намерения в конце хода",
|
|
2907
|
+
"intentSummary.description": "При включении постфлайт на границе хода сворачивает потреблённый прирост в блоки итогов намерения по семантическим ролям: результаты читающих инструментов становятся однострочными записями цель/масштаб, пишущие сохраняют заголовок скелета и дословные строки ошибок; приземляется в следующем раунде давления через обычный конвейер свёртки. Срабатывает только при прохождении шлюза роста (активная поверхность >45% и >50K токенов с последней свёртки). Действует на новые сессии; текущую можно переключить командой /ctx-summary off|on|status.",
|
|
2908
|
+
"intentSummary.enabled": "Итог намерения в конце хода",
|
|
2909
|
+
"intentSummary.enabled.on": "Вкл",
|
|
2910
|
+
"intentSummary.enabled.off": "Выкл (по умолчанию)",
|
|
2911
|
+
"monitor.fab.title": "Монитор сжатия",
|
|
2912
|
+
"monitor.panel.title": "Монитор сжатия",
|
|
2913
|
+
"monitor.panel.net": "Чистая экономия",
|
|
2914
|
+
"monitor.panel.gross": "Валовая экономия",
|
|
2915
|
+
"monitor.panel.offsets": "Компенсации",
|
|
2916
|
+
"monitor.panel.cacheHit": "Процент попаданий кэша",
|
|
2917
|
+
"monitor.panel.cost": "Стоимость (факт / эконом. оценка)",
|
|
2918
|
+
"monitor.panel.intent": "Итог намерения",
|
|
2919
|
+
"monitor.panel.overrideHint": "Приоритет сессии",
|
|
2920
|
+
"monitor.panel.resume": "Возобновить",
|
|
2921
|
+
"monitor.panel.disable": "Отключить",
|
|
2922
|
+
"monitor.panel.stateOn": "вкл",
|
|
2923
|
+
"monitor.panel.stateOff": "выкл",
|
|
2924
|
+
"monitor.panel.gateUnknown": "ещё не оценено",
|
|
2925
|
+
"monitor.panel.lastFold": "Последняя свёртка",
|
|
2926
|
+
"monitor.panel.stale": "Снимок недоступен — показаны последние данные",
|
|
2927
|
+
"monitorPanel.title": "Панель мониторинга сжатия",
|
|
2928
|
+
"monitorPanel.description": "При включении рядом с областью ввода появляется перетаскиваемый плавающий шарик — откройте его, чтобы следить за состоянием сжатия в реальном времени: чистая экономия (точная база), процент попаданий кэша, оценка стоимости, шлюз итогов намерения хода и последние компенсации. Панель может временно переключить тумблер итогов намерения текущей сессии. Реестр живёт в процессе (обнуляется при перезапуске хоста).",
|
|
2929
|
+
"monitorPanel.enabled": "Панель мониторинга",
|
|
2930
|
+
"monitorPanel.enabled.on": "Вкл",
|
|
2931
|
+
"monitorPanel.enabled.off": "Выкл (по умолчанию)",
|
|
2337
2932
|
"custom.title": "Пользовательская стратегия",
|
|
2338
2933
|
"custom.settingsHint": "Подробные параметры — в «Настройки > Выбор сжатия контекста».",
|
|
2339
2934
|
"custom.sessionScope": "Сохранённые изменения применяются, когда текущий runtime сжатия впервые наблюдает Session. Session, уже наблюдаемая этим runtime, сохраняет свою замороженную стратегию.",
|
|
@@ -2523,9 +3118,36 @@ window.__ModuleLoader__.load({
|
|
|
2523
3118
|
console.warn(`[dsh-context-compression-improved] locale "${language.id}" registration failed:`, error);
|
|
2524
3119
|
}
|
|
2525
3120
|
const tNav = ctx.locale?.bind?.(NS) ?? ((key) => key);
|
|
3121
|
+
let readMonitorPanelEnabled = () => {
|
|
3122
|
+
try {
|
|
3123
|
+
return decodeSettings(ctx.configForms.get(ENTRY_ID).getSnapshot().value?.settings)?.monitorPanel?.enabled ?? false;
|
|
3124
|
+
} catch {
|
|
3125
|
+
return false;
|
|
3126
|
+
}
|
|
3127
|
+
};
|
|
3128
|
+
initMonitorFab({
|
|
3129
|
+
t: tNav,
|
|
3130
|
+
sessionIdOf: () => void 0,
|
|
3131
|
+
enabledOf: () => readMonitorPanelEnabled(),
|
|
3132
|
+
fetchSnapshot: async (sessionId) => {
|
|
3133
|
+
const query = sessionId === void 0 ? "" : `?sessionId=${encodeURIComponent(sessionId)}`;
|
|
3134
|
+
const response = await fetch(`/api/dsh-context-compression-improved/monitor${query}`, { headers: { "cache-control": "no-cache" } });
|
|
3135
|
+
if (!response.ok) throw new Error(`monitor snapshot ${response.status}`);
|
|
3136
|
+
return await response.json();
|
|
3137
|
+
},
|
|
3138
|
+
applyOverride: async (sessionId, action) => {
|
|
3139
|
+
const query = sessionId === void 0 ? "" : `?sessionId=${encodeURIComponent(sessionId)}`;
|
|
3140
|
+
await fetch(`/api/dsh-context-compression-improved/monitor${query}`, {
|
|
3141
|
+
method: "POST",
|
|
3142
|
+
headers: { "content-type": "application/json" },
|
|
3143
|
+
body: JSON.stringify({ action })
|
|
3144
|
+
});
|
|
3145
|
+
}
|
|
3146
|
+
});
|
|
2526
3147
|
const injected = () => {
|
|
2527
3148
|
const form = ctx.configForms.get(ENTRY_ID);
|
|
2528
3149
|
const readDoc = () => decodeSettings(form.getSnapshot().value?.settings);
|
|
3150
|
+
readMonitorPanelEnabled = () => decodeSettings(form.getSnapshot().value?.settings)?.monitorPanel?.enabled ?? false;
|
|
2529
3151
|
let projectedSource;
|
|
2530
3152
|
let projected = {
|
|
2531
3153
|
status: "loading",
|
|
@@ -2590,6 +3212,8 @@ window.__ModuleLoader__.load({
|
|
|
2590
3212
|
resetCustom: () => writeAndConfirm(() => scope.set("custom", structuredClone(DEFAULT_CUSTOM_COMPRESSION_POLICY)), (settings) => isCustomCompressionPolicy(settings.custom) && sameCustomPolicy(settings.custom, DEFAULT_CUSTOM_COMPRESSION_POLICY)),
|
|
2591
3213
|
saveAutoCompact: (thresholdPercent) => writeAndConfirm(() => scope.set("autoCompact", { thresholdPercent }), (settings) => settings.autoCompact.thresholdPercent === thresholdPercent),
|
|
2592
3214
|
saveCodeSkeleton: (enabled) => writeAndConfirm(() => scope.set("codeSkeleton", { enabled }), (settings) => settings.codeSkeleton.enabled === enabled),
|
|
3215
|
+
saveIntentSummary: (enabled) => writeAndConfirm(() => scope.set("intentSummary", { enabled }), (settings) => settings.intentSummary.enabled === enabled),
|
|
3216
|
+
saveMonitorPanel: (enabled) => writeAndConfirm(() => scope.set("monitorPanel", { enabled }), (settings) => settings.monitorPanel?.enabled === enabled),
|
|
2593
3217
|
savePresetOptions: (options) => {
|
|
2594
3218
|
const ops = planPresetOptionsOps(scope.getSnapshot().value?.presetOptions, options);
|
|
2595
3219
|
if (ops.length === 0) return Promise.resolve();
|