dsh-yolo-mode 0.5.3 → 0.6.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +30 -0
- package/lib/client/index.js +160 -116
- package/package.json +5 -7
package/CHANGELOG.md
CHANGED
|
@@ -2,6 +2,36 @@
|
|
|
2
2
|
|
|
3
3
|
本项目遵循 [Semantic Versioning](https://semver.org/)。
|
|
4
4
|
|
|
5
|
+
## [0.6.0] - 2026-09-27
|
|
6
|
+
|
|
7
|
+
### 变更:全部配置移入插件自身 UI 面板(设置页退役)
|
|
8
|
+
|
|
9
|
+
- **移除 `settings.section` 注册**(原 id `yolo-mode`,order 25):不再向 DSH 设置面板
|
|
10
|
+
注册任何页面,全部配置项改由插件自身的 UI 面板承载 —— 点击输入框左侧的
|
|
11
|
+
`YOLO <预设>` 胶囊打开(slot `shell.overlay`)。
|
|
12
|
+
- 面板新增 **配置 / 状态与日志** 两个标签,默认打开「配置」:
|
|
13
|
+
- 「配置」渲染原设置页的完整表单(预设 / 模式 / 裁判供应商与模型 / 超时 / 最大令牌 /
|
|
14
|
+
并发 / 系统提示词 / 层级表),保存仍走 `settingsMutate` 路径操作 + 乐观锁;
|
|
15
|
+
- 「状态与日志」保留统计卡、裁决表分页、「打开日志」与「刷新」。
|
|
16
|
+
- `src/client/ui/SettingsSection.js` → `src/client/ui/ConfigForm.js`(导出名
|
|
17
|
+
`ConfigForm`);组件内部逻辑不变,仅宿主从设置页改为面板。
|
|
18
|
+
- 文案 `nav` 退役,新增 `tabConfig` / `tabStatus`(中英双语)。
|
|
19
|
+
|
|
20
|
+
### 修复:依赖解析与构建可复现
|
|
21
|
+
|
|
22
|
+
- `peerDependencies` 移除两个**已停更**的官方包:`@deepseek-ai/dsh-host-apiproxy`
|
|
23
|
+
与 `@deepseek-ai/dsh-client-runtime`(npm 上分别止于 `0.1.1-rc.2`)。二者此前仅为
|
|
24
|
+
`import type` 引用(`verbatimModuleSyntax` 下会被擦除),却会让全新克隆的 `npm ci`
|
|
25
|
+
因无法解析已停更 peer 而直接失败。
|
|
26
|
+
- `devDependencies` 的 `@deepseek-ai/dsh-llm` / `dsh-timeout` / `dsh-settings` 由
|
|
27
|
+
`^0.1.7-rc.1` 收紧为精确 `0.1.7-rc.2`:DSH 预发布包内部使用**精确 peer**,
|
|
28
|
+
rc.1 与 rc.2 混装会触发 `ERESOLVE` 冲突。现在可 `npm ci && npm test`(无需
|
|
29
|
+
`--legacy-peer-deps`)。
|
|
30
|
+
- `scripts/build-client.mjs` 移除硬编码开发机回退路径
|
|
31
|
+
(`E:/MyProjectCollection/Plugins/dsh-subagents-options/package.json`),改为在
|
|
32
|
+
缺少 `rolldown` 时抛出可操作的错误提示。
|
|
33
|
+
- `package-lock.json` 重新生成(`resolved` 全部指向 `registry.npmjs.org`)。
|
|
34
|
+
|
|
5
35
|
## [0.5.3] - 2026-09-25
|
|
6
36
|
|
|
7
37
|
### 兼容:适配 DSH 0.1.7-rc.2
|
package/lib/client/index.js
CHANGED
|
@@ -15,7 +15,8 @@ window.__ModuleLoader__.load({
|
|
|
15
15
|
const NS = "settings.yoloMode";
|
|
16
16
|
/** English dictionary. */
|
|
17
17
|
const en = {
|
|
18
|
-
|
|
18
|
+
tabConfig: "Configuration",
|
|
19
|
+
tabStatus: "Status & log",
|
|
19
20
|
chip: "YOLO status",
|
|
20
21
|
sectionIntro: "Configure how YOLO mode auto-judges sandbox escalation approval requests.",
|
|
21
22
|
loadError: "Could not load YOLO mode settings.",
|
|
@@ -73,7 +74,8 @@ window.__ModuleLoader__.load({
|
|
|
73
74
|
};
|
|
74
75
|
/** Chinese dictionary. */
|
|
75
76
|
const zh = {
|
|
76
|
-
|
|
77
|
+
tabConfig: "配置",
|
|
78
|
+
tabStatus: "状态与日志",
|
|
77
79
|
chip: "YOLO 状态",
|
|
78
80
|
sectionIntro: "配置 YOLO 模式如何自动裁决沙箱升权审批申请。",
|
|
79
81
|
loadError: "无法加载 YOLO 模式设置。",
|
|
@@ -556,6 +558,60 @@ window.__ModuleLoader__.load({
|
|
|
556
558
|
}
|
|
557
559
|
};
|
|
558
560
|
//#endregion
|
|
561
|
+
//#region src/client/ui/Chip.js
|
|
562
|
+
/**
|
|
563
|
+
* YOLO mode status chip (slot `conversation.input.left`). Shows "YOLO <preset>"
|
|
564
|
+
* and toggles the shared popup via store.togglePopup().
|
|
565
|
+
*/
|
|
566
|
+
const chipStyle = {
|
|
567
|
+
display: "inline-flex",
|
|
568
|
+
alignItems: "center",
|
|
569
|
+
gap: 6,
|
|
570
|
+
padding: "4px 10px",
|
|
571
|
+
borderRadius: 999,
|
|
572
|
+
backgroundColor: "#ffffff",
|
|
573
|
+
color: "#1d4ed8",
|
|
574
|
+
border: "1px solid #93c5fd",
|
|
575
|
+
fontSize: 12,
|
|
576
|
+
cursor: "pointer",
|
|
577
|
+
whiteSpace: "nowrap",
|
|
578
|
+
userSelect: "none"
|
|
579
|
+
};
|
|
580
|
+
/** Status colour for the leading dot based on judge readiness. */
|
|
581
|
+
function dotColor(statusInfo) {
|
|
582
|
+
return statusInfo && statusInfo.judgeConfigured ? "#16a34a" : "#d97706";
|
|
583
|
+
}
|
|
584
|
+
/**
|
|
585
|
+
* @param {object} props - slot-delivered { store, useSnapshot, t } (inject face).
|
|
586
|
+
*/
|
|
587
|
+
function Chip(props) {
|
|
588
|
+
const store = props.store;
|
|
589
|
+
const useSnapshot = props.useSnapshot;
|
|
590
|
+
if (store === void 0 || useSnapshot === void 0) return null;
|
|
591
|
+
return ChipLoaded({
|
|
592
|
+
store,
|
|
593
|
+
useSnapshot
|
|
594
|
+
});
|
|
595
|
+
}
|
|
596
|
+
function ChipLoaded({ store, useSnapshot }) {
|
|
597
|
+
(0, react.useEffect)(() => {
|
|
598
|
+
store.load();
|
|
599
|
+
}, [store]);
|
|
600
|
+
const statusInfo = useSnapshot((s) => s).statusInfo;
|
|
601
|
+
const preset = statusInfo && typeof statusInfo.preset === "string" ? statusInfo.preset : "…";
|
|
602
|
+
return (0, react.createElement)("button", {
|
|
603
|
+
style: chipStyle,
|
|
604
|
+
title: "YOLO",
|
|
605
|
+
onClick: () => store.togglePopup()
|
|
606
|
+
}, (0, react.createElement)("span", { style: {
|
|
607
|
+
width: 8,
|
|
608
|
+
height: 8,
|
|
609
|
+
borderRadius: 4,
|
|
610
|
+
backgroundColor: dotColor(statusInfo),
|
|
611
|
+
display: "inline-block"
|
|
612
|
+
} }), "YOLO " + preset);
|
|
613
|
+
}
|
|
614
|
+
//#endregion
|
|
559
615
|
//#region src/client/presets.js
|
|
560
616
|
/**
|
|
561
617
|
* Static per-preset display data for the YOLO settings page: the level table
|
|
@@ -643,10 +699,12 @@ window.__ModuleLoader__.load({
|
|
|
643
699
|
return PRESETS_INFO.find((preset) => preset.id === id) || null;
|
|
644
700
|
}
|
|
645
701
|
//#endregion
|
|
646
|
-
//#region src/client/ui/
|
|
702
|
+
//#region src/client/ui/ConfigForm.js
|
|
647
703
|
/**
|
|
648
|
-
* YOLO mode
|
|
649
|
-
*
|
|
704
|
+
* YOLO mode configuration form. Rendered inside the plugin's own UI panel
|
|
705
|
+
* (`shell.overlay`, see ./Popup.js): the DSH `settings.section` page was retired
|
|
706
|
+
* so this form is the single configuration surface for the plugin. It renders
|
|
707
|
+
* the resolved configuration (view.value) and saves via path ops through
|
|
650
708
|
* store.mutate with an optimistic-revision lock. Everything is React.createElement
|
|
651
709
|
* + inline styles (no JSX, no CSS modules).
|
|
652
710
|
*
|
|
@@ -831,12 +889,12 @@ window.__ModuleLoader__.load({
|
|
|
831
889
|
}
|
|
832
890
|
};
|
|
833
891
|
/**
|
|
834
|
-
* The YOLO
|
|
892
|
+
* The YOLO configuration form (hosted by the plugin's own UI panel).
|
|
835
893
|
*
|
|
836
|
-
* @param {object} props -
|
|
837
|
-
* plus optional
|
|
894
|
+
* @param {object} props - panel-delivered inject face: { store, useSnapshot, t }
|
|
895
|
+
* plus optional close() to dismiss the hosting panel.
|
|
838
896
|
*/
|
|
839
|
-
function
|
|
897
|
+
function ConfigForm(props) {
|
|
840
898
|
const { store, useSnapshot, t, close } = props;
|
|
841
899
|
if (store === void 0 || useSnapshot === void 0 || t === void 0) return null;
|
|
842
900
|
return ReactSection({
|
|
@@ -1096,69 +1154,20 @@ window.__ModuleLoader__.load({
|
|
|
1096
1154
|
return ops;
|
|
1097
1155
|
}
|
|
1098
1156
|
//#endregion
|
|
1099
|
-
//#region src/client/ui/Chip.js
|
|
1100
|
-
/**
|
|
1101
|
-
* YOLO mode status chip (slot `conversation.input.left`). Shows "YOLO <preset>"
|
|
1102
|
-
* and toggles the shared popup via store.togglePopup().
|
|
1103
|
-
*/
|
|
1104
|
-
const chipStyle = {
|
|
1105
|
-
display: "inline-flex",
|
|
1106
|
-
alignItems: "center",
|
|
1107
|
-
gap: 6,
|
|
1108
|
-
padding: "4px 10px",
|
|
1109
|
-
borderRadius: 999,
|
|
1110
|
-
backgroundColor: "#ffffff",
|
|
1111
|
-
color: "#1d4ed8",
|
|
1112
|
-
border: "1px solid #93c5fd",
|
|
1113
|
-
fontSize: 12,
|
|
1114
|
-
cursor: "pointer",
|
|
1115
|
-
whiteSpace: "nowrap",
|
|
1116
|
-
userSelect: "none"
|
|
1117
|
-
};
|
|
1118
|
-
/** Status colour for the leading dot based on judge readiness. */
|
|
1119
|
-
function dotColor(statusInfo) {
|
|
1120
|
-
return statusInfo && statusInfo.judgeConfigured ? "#16a34a" : "#d97706";
|
|
1121
|
-
}
|
|
1122
|
-
/**
|
|
1123
|
-
* @param {object} props - slot-delivered { store, useSnapshot, t } (inject face).
|
|
1124
|
-
*/
|
|
1125
|
-
function Chip(props) {
|
|
1126
|
-
const store = props.store;
|
|
1127
|
-
const useSnapshot = props.useSnapshot;
|
|
1128
|
-
if (store === void 0 || useSnapshot === void 0) return null;
|
|
1129
|
-
return ChipLoaded({
|
|
1130
|
-
store,
|
|
1131
|
-
useSnapshot
|
|
1132
|
-
});
|
|
1133
|
-
}
|
|
1134
|
-
function ChipLoaded({ store, useSnapshot }) {
|
|
1135
|
-
(0, react.useEffect)(() => {
|
|
1136
|
-
store.load();
|
|
1137
|
-
}, [store]);
|
|
1138
|
-
const statusInfo = useSnapshot((s) => s).statusInfo;
|
|
1139
|
-
const preset = statusInfo && typeof statusInfo.preset === "string" ? statusInfo.preset : "…";
|
|
1140
|
-
return (0, react.createElement)("button", {
|
|
1141
|
-
style: chipStyle,
|
|
1142
|
-
title: "YOLO",
|
|
1143
|
-
onClick: () => store.togglePopup()
|
|
1144
|
-
}, (0, react.createElement)("span", { style: {
|
|
1145
|
-
width: 8,
|
|
1146
|
-
height: 8,
|
|
1147
|
-
borderRadius: 4,
|
|
1148
|
-
backgroundColor: dotColor(statusInfo),
|
|
1149
|
-
display: "inline-block"
|
|
1150
|
-
} }), "YOLO " + preset);
|
|
1151
|
-
}
|
|
1152
|
-
//#endregion
|
|
1153
1157
|
//#region src/client/ui/Popup.js
|
|
1154
1158
|
/**
|
|
1155
|
-
* YOLO mode
|
|
1156
|
-
*
|
|
1157
|
-
* (
|
|
1158
|
-
*
|
|
1159
|
+
* YOLO mode panel (slot `shell.overlay`). Renders null while the store's open
|
|
1160
|
+
* flag is false. When open it hosts TWO tabs and is the plugin's single
|
|
1161
|
+
* configuration surface (the DSH `settings.section` page was retired):
|
|
1162
|
+
*
|
|
1163
|
+
* - `config` (default): the full configuration form (preset / modes / judge
|
|
1164
|
+
* provider+model / timeout / maxTokens / concurrency / system prompt /
|
|
1165
|
+
* levels), reusing ./ConfigForm.js.
|
|
1166
|
+
* - `status`: the stats card, the recent decisions table (paged, PAGE_SIZE per
|
|
1167
|
+
* page, newest first), the "open audit log" button and a refresh button.
|
|
1159
1168
|
*
|
|
1160
|
-
* Guard/hook split mirrors
|
|
1161
|
-
*
|
|
1169
|
+
* Guard/hook split mirrors ConfigForm: the outer component validates the slot
|
|
1170
|
+
* inject face, the inner component owns all hooks unconditionally.
|
|
1162
1171
|
*/
|
|
1163
1172
|
/** Rows per page of the recent-decisions table. */
|
|
1164
1173
|
const PAGE_SIZE = 5;
|
|
@@ -1275,6 +1284,35 @@ window.__ModuleLoader__.load({
|
|
|
1275
1284
|
};
|
|
1276
1285
|
const logResultOk = { color: "#16a34a" };
|
|
1277
1286
|
const logResultErr = { color: "#dc2626" };
|
|
1287
|
+
/** Body wrapper for the status tab (the config tab renders ConfigForm directly). */
|
|
1288
|
+
const statusBodyStyle = {
|
|
1289
|
+
display: "flex",
|
|
1290
|
+
flexDirection: "column",
|
|
1291
|
+
gap: 12
|
|
1292
|
+
};
|
|
1293
|
+
const tabStyle = {
|
|
1294
|
+
backgroundColor: "#ffffff",
|
|
1295
|
+
color: "#374151",
|
|
1296
|
+
border: "1px solid #cbd5e1",
|
|
1297
|
+
borderRadius: 6,
|
|
1298
|
+
padding: "5px 12px",
|
|
1299
|
+
fontSize: 12,
|
|
1300
|
+
cursor: "pointer"
|
|
1301
|
+
};
|
|
1302
|
+
const tabActiveStyle = {
|
|
1303
|
+
backgroundColor: "#2563eb",
|
|
1304
|
+
color: "#ffffff",
|
|
1305
|
+
borderColor: "#2563eb"
|
|
1306
|
+
};
|
|
1307
|
+
/** One panel tab switch; the active tab is highlighted and non-submit. */
|
|
1308
|
+
function tabButton(t, id, current, setTab) {
|
|
1309
|
+
return (0, react.createElement)("button", {
|
|
1310
|
+
key: id,
|
|
1311
|
+
type: "button",
|
|
1312
|
+
style: Object.assign({}, tabStyle, id === current ? tabActiveStyle : {}),
|
|
1313
|
+
onClick: () => setTab(id)
|
|
1314
|
+
}, t(id === "config" ? "tabConfig" : "tabStatus"));
|
|
1315
|
+
}
|
|
1278
1316
|
/** Truncate long reason text for display. */
|
|
1279
1317
|
function truncate(text, max) {
|
|
1280
1318
|
if (typeof text !== "string") return "";
|
|
@@ -1296,6 +1334,7 @@ window.__ModuleLoader__.load({
|
|
|
1296
1334
|
}
|
|
1297
1335
|
function ReactPopup({ store, useSnapshot, t }) {
|
|
1298
1336
|
const state = useSnapshot((s) => s);
|
|
1337
|
+
const [tab, setTab] = (0, react.useState)("config");
|
|
1299
1338
|
const [page, setPage] = (0, react.useState)(0);
|
|
1300
1339
|
const [logResult, setLogResult] = (0, react.useState)(void 0);
|
|
1301
1340
|
const [logBusy, setLogBusy] = (0, react.useState)(false);
|
|
@@ -1333,43 +1372,55 @@ window.__ModuleLoader__.load({
|
|
|
1333
1372
|
setLogBusy(false);
|
|
1334
1373
|
}
|
|
1335
1374
|
};
|
|
1336
|
-
|
|
1375
|
+
const statusBody = [
|
|
1376
|
+
logResult !== void 0 ? (0, react.createElement)("p", { style: Object.assign({}, captionStyle, logResult.ok ? logResultOk : logResultErr) }, logResult.ok ? t("openLogOk") + (logResult.value && logResult.value.path ? ": " + logResult.value.path : "") : logMessage(t, logResult.error)) : auditFile !== void 0 ? (0, react.createElement)("p", { style: captionStyle }, t("logPath") + ": " + auditFile) : null,
|
|
1377
|
+
(0, react.createElement)("div", { style: statGrid }, statCellOf(t, "statsTotal", stats.total), statCellOf(t, "statsAllowed", stats.allowed), statCellOf(t, "statsRejected", stats.rejected), statCellOf(t, "statsDelegated", stats.delegated)),
|
|
1378
|
+
recent.length === 0 ? (0, react.createElement)("p", { style: {
|
|
1379
|
+
color: "#6b7280",
|
|
1380
|
+
fontSize: 12,
|
|
1381
|
+
margin: 0
|
|
1382
|
+
} }, t("recentEmpty")) : (0, react.createElement)("table", { style: tableStyle }, (0, react.createElement)("thead", {}, (0, react.createElement)("tr", {}, (0, react.createElement)("th", { style: thStyle }, t("tableTime")), (0, react.createElement)("th", { style: thStyle }, t("tableTool")), (0, react.createElement)("th", { style: thStyle }, t("tableTarget")), (0, react.createElement)("th", { style: thStyle }, t("tableDecision")), (0, react.createElement)("th", { style: thStyle }, t("tableOutcome")), (0, react.createElement)("th", { style: thStyle }, t("tableReason")))), (0, react.createElement)("tbody", {}, pageRows.map((row, idx) => tableRow(t, row, safePage * PAGE_SIZE + idx)))),
|
|
1383
|
+
totalPages > 1 ? (0, react.createElement)("div", { style: {
|
|
1384
|
+
display: "flex",
|
|
1385
|
+
alignItems: "center",
|
|
1386
|
+
justifyContent: "flex-end",
|
|
1387
|
+
gap: 8
|
|
1388
|
+
} }, (0, react.createElement)("button", {
|
|
1389
|
+
style: Object.assign({}, pagerButton, safePage === 0 ? pagerButtonDisabled : {}),
|
|
1390
|
+
disabled: safePage === 0,
|
|
1391
|
+
onClick: () => setPage(safePage - 1)
|
|
1392
|
+
}, t("pagePrev")), (0, react.createElement)("span", { style: {
|
|
1393
|
+
fontSize: 12,
|
|
1394
|
+
color: "#374151"
|
|
1395
|
+
} }, t("pageOf", {
|
|
1396
|
+
current: String(safePage + 1),
|
|
1397
|
+
total: String(totalPages)
|
|
1398
|
+
})), (0, react.createElement)("button", {
|
|
1399
|
+
style: Object.assign({}, pagerButton, safePage >= totalPages - 1 ? pagerButtonDisabled : {}),
|
|
1400
|
+
disabled: safePage >= totalPages - 1,
|
|
1401
|
+
onClick: () => setPage(safePage + 1)
|
|
1402
|
+
}, t("pageNext"))) : null,
|
|
1403
|
+
(0, react.createElement)("div", { style: {
|
|
1404
|
+
display: "flex",
|
|
1405
|
+
justifyContent: "flex-end"
|
|
1406
|
+
} }, (0, react.createElement)("button", {
|
|
1407
|
+
style: primaryButton,
|
|
1408
|
+
onClick: () => store.togglePopup()
|
|
1409
|
+
}, t("close")))
|
|
1410
|
+
];
|
|
1411
|
+
return (0, react.createElement)("div", { style: popupStyle }, (0, react.createElement)("div", { style: headerStyle }, (0, react.createElement)("strong", {}, t("chip")), (0, react.createElement)("div", { style: headerButtons }, tabButton(t, "config", tab, setTab), tabButton(t, "status", tab, setTab), tab === "status" ? (0, react.createElement)("button", {
|
|
1337
1412
|
style: logBusy ? Object.assign({}, secondaryButton, { opacity: .6 }) : secondaryButton,
|
|
1338
1413
|
onClick: () => void openLog(),
|
|
1339
1414
|
title: auditFile !== void 0 ? auditFile : void 0
|
|
1340
|
-
}, logBusy ? t("openLogBusy") : t("openLog")), (0, react.createElement)("button", {
|
|
1415
|
+
}, logBusy ? t("openLogBusy") : t("openLog")) : null, (0, react.createElement)("button", {
|
|
1341
1416
|
style: primaryButton,
|
|
1342
1417
|
onClick: () => void store.load()
|
|
1343
|
-
}, t("refresh")))),
|
|
1344
|
-
|
|
1345
|
-
|
|
1346
|
-
|
|
1347
|
-
|
|
1348
|
-
|
|
1349
|
-
alignItems: "center",
|
|
1350
|
-
justifyContent: "flex-end",
|
|
1351
|
-
gap: 8
|
|
1352
|
-
} }, (0, react.createElement)("button", {
|
|
1353
|
-
style: Object.assign({}, pagerButton, safePage === 0 ? pagerButtonDisabled : {}),
|
|
1354
|
-
disabled: safePage === 0,
|
|
1355
|
-
onClick: () => setPage(safePage - 1)
|
|
1356
|
-
}, t("pagePrev")), (0, react.createElement)("span", { style: {
|
|
1357
|
-
fontSize: 12,
|
|
1358
|
-
color: "#374151"
|
|
1359
|
-
} }, t("pageOf", {
|
|
1360
|
-
current: String(safePage + 1),
|
|
1361
|
-
total: String(totalPages)
|
|
1362
|
-
})), (0, react.createElement)("button", {
|
|
1363
|
-
style: Object.assign({}, pagerButton, safePage >= totalPages - 1 ? pagerButtonDisabled : {}),
|
|
1364
|
-
disabled: safePage >= totalPages - 1,
|
|
1365
|
-
onClick: () => setPage(safePage + 1)
|
|
1366
|
-
}, t("pageNext"))) : null, (0, react.createElement)("div", { style: {
|
|
1367
|
-
display: "flex",
|
|
1368
|
-
justifyContent: "flex-end"
|
|
1369
|
-
} }, (0, react.createElement)("button", {
|
|
1370
|
-
style: primaryButton,
|
|
1371
|
-
onClick: () => store.togglePopup()
|
|
1372
|
-
}, t("close"))));
|
|
1418
|
+
}, t("refresh")))), tab === "config" ? (0, react.createElement)(ConfigForm, {
|
|
1419
|
+
store,
|
|
1420
|
+
useSnapshot,
|
|
1421
|
+
t,
|
|
1422
|
+
close: () => store.togglePopup()
|
|
1423
|
+
}) : (0, react.createElement)("div", { style: statusBodyStyle }, ...statusBody));
|
|
1373
1424
|
}
|
|
1374
1425
|
/** User-facing message for a failed open-log attempt (by error code). */
|
|
1375
1426
|
function logMessage(t, error) {
|
|
@@ -1425,11 +1476,12 @@ window.__ModuleLoader__.load({
|
|
|
1425
1476
|
/**
|
|
1426
1477
|
* YOLO mode — browser half (DSH client plugin).
|
|
1427
1478
|
*
|
|
1428
|
-
* Registers the `
|
|
1429
|
-
* preset/modes/judge/levels
|
|
1430
|
-
* `
|
|
1431
|
-
*
|
|
1432
|
-
*
|
|
1479
|
+
* Registers the `conversation.input.left` status chip and the `shell.overlay`
|
|
1480
|
+
* panel. ALL configuration (preset/modes/judge/levels) lives in that panel: the
|
|
1481
|
+
* `settings.section` page was retired, so nothing is configured from the DSH
|
|
1482
|
+
* Settings surface any more. Data flows through the connection's generic RPC
|
|
1483
|
+
* channel (/yolo-mode) into a snapshot store; writes travel as path ops through
|
|
1484
|
+
* settingsMutate with an optimistic-revision lock.
|
|
1433
1485
|
*/
|
|
1434
1486
|
/**
|
|
1435
1487
|
* Services required by these slot registrations (dsh.client.inject is the same
|
|
@@ -1444,8 +1496,8 @@ window.__ModuleLoader__.load({
|
|
|
1444
1496
|
"remote.llm"
|
|
1445
1497
|
];
|
|
1446
1498
|
/**
|
|
1447
|
-
* Register the YOLO
|
|
1448
|
-
*
|
|
1499
|
+
* Register the YOLO chip/panel once the slot declarations are on the ledger,
|
|
1500
|
+
* wire the store to the connection, and keep it fresh on every pushed
|
|
1449
1501
|
* invalidation.
|
|
1450
1502
|
*
|
|
1451
1503
|
* @param {object} ctx - client cordis context.
|
|
@@ -1483,14 +1535,6 @@ window.__ModuleLoader__.load({
|
|
|
1483
1535
|
useSnapshot,
|
|
1484
1536
|
t
|
|
1485
1537
|
});
|
|
1486
|
-
ctx.slots.inject("settings.section", () => ctx.slots.register({
|
|
1487
|
-
name: "settings.section",
|
|
1488
|
-
id: "yolo-mode",
|
|
1489
|
-
order: 25,
|
|
1490
|
-
label: () => t("nav"),
|
|
1491
|
-
locale: NS,
|
|
1492
|
-
inject: injected
|
|
1493
|
-
}, SettingsSection));
|
|
1494
1538
|
ctx.slots.inject("conversation.input.left", () => ctx.slots.register({
|
|
1495
1539
|
name: "conversation.input.left",
|
|
1496
1540
|
id: "yolo-mode-chip",
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "dsh-yolo-mode",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.6.0",
|
|
4
4
|
"description": "dsh-yolo-mode —— DeepSeek Harness 双面包插件:当会话处于可写沙箱模式且审批策略为 ask 时,用大模型自动裁决沙箱升权申请,支持内置预设与自定义权限层级,并提供宿主 settings + 自发布设置桥(/yolo-mode)与 Web 客户端 UI。",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "lib/index.js",
|
|
@@ -44,8 +44,6 @@
|
|
|
44
44
|
"@deepseek-ai/dsh-llm": "^0.1.7-rc.1",
|
|
45
45
|
"@deepseek-ai/dsh-timeout": "^0.1.7-rc.1",
|
|
46
46
|
"@deepseek-ai/dsh-settings": "^0.1.7-rc.1",
|
|
47
|
-
"@deepseek-ai/dsh-host-apiproxy": "^0.1.1-rc.2",
|
|
48
|
-
"@deepseek-ai/dsh-client-runtime": "^0.1.1-rc.2",
|
|
49
47
|
"@deepseek-ai/dsh-client-connection": "^0.1.7-rc.1",
|
|
50
48
|
"@deepseek-ai/dsh-client-ui-slots": "^0.1.7-rc.1",
|
|
51
49
|
"@deepseek-ai/dsh-client-locale": "^0.1.7-rc.1",
|
|
@@ -54,9 +52,9 @@
|
|
|
54
52
|
"devDependencies": {
|
|
55
53
|
"rolldown": "^1.2.4",
|
|
56
54
|
"@deepseek-ai/cordis": "^4.0.2",
|
|
57
|
-
"@deepseek-ai/dsh-llm": "
|
|
58
|
-
"@deepseek-ai/dsh-timeout": "
|
|
59
|
-
"@deepseek-ai/dsh-settings": "
|
|
55
|
+
"@deepseek-ai/dsh-llm": "0.1.7-rc.2",
|
|
56
|
+
"@deepseek-ai/dsh-timeout": "0.1.7-rc.2",
|
|
57
|
+
"@deepseek-ai/dsh-settings": "0.1.7-rc.2",
|
|
60
58
|
"@deepseek-ai/schemastery": "^3.18.1"
|
|
61
59
|
},
|
|
62
60
|
"scripts": {
|
|
@@ -89,4 +87,4 @@
|
|
|
89
87
|
"node": ">=20"
|
|
90
88
|
}
|
|
91
89
|
}
|
|
92
|
-
}
|
|
90
|
+
}
|