dsh-mcviseron-plugin 0.7.3 → 0.8.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +85 -0
- package/README.en.md +17 -13
- package/README.md +22 -18
- package/docs/archive-integration.md +29 -0
- package/docs/auto-review-context.md +25 -24
- package/docs/automation-task.md +1 -1
- package/docs/automation-tasks.md +49 -0
- package/docs/linux-restart.md +96 -0
- package/lib/auto-review-fix.js +135 -6
- package/lib/client.js +172 -27
- package/lib/index.js +421 -84
- package/lib/restart.js +94 -16
- package/package.json +24 -23
- package/src/api.ts +5 -0
- package/src/archive-integration/index.ts +83 -0
- package/src/auto-review-fix/index.ts +2 -2
- package/src/automation-tasks/index.ts +55 -14
- package/src/client/RestartCard.tsx +38 -5
- package/src/client/SettingsSection.tsx +92 -3
- package/src/client/locales.ts +50 -12
- package/src/components/auto-review-fix/index.ts +2 -2
- package/src/components/auto-review-fix/review-context.ts +144 -2
- package/src/index.ts +2 -0
- package/src/restart/index.ts +139 -30
- package/src/session-end/index.ts +2 -2
package/lib/auto-review-fix.js
CHANGED
|
@@ -31,7 +31,7 @@ function textOf(message) {
|
|
|
31
31
|
}
|
|
32
32
|
return texts.join("");
|
|
33
33
|
}
|
|
34
|
-
function
|
|
34
|
+
function isLegacyAutoReviewRequest(options) {
|
|
35
35
|
if (!record(options)) return false;
|
|
36
36
|
const system = options.system;
|
|
37
37
|
if (typeof system !== "string" || !system.includes(REVIEW_MARKER) || !system.includes(REVIEW_MARKER_2)) return false;
|
|
@@ -130,7 +130,9 @@ function logTrim(originalChars, nextChars, originalEntries, nextEntries) {
|
|
|
130
130
|
}
|
|
131
131
|
}
|
|
132
132
|
function trimReviewRequest(options, settings) {
|
|
133
|
-
if (!settings.enabled
|
|
133
|
+
if (!settings.enabled) return options;
|
|
134
|
+
if (isModernAutoReviewRequest(options)) return trimModernReviewRequest(options, settings);
|
|
135
|
+
if (!isLegacyAutoReviewRequest(options)) return options;
|
|
134
136
|
const messages = options.messages;
|
|
135
137
|
const message = messages[0];
|
|
136
138
|
const text = textOf(message);
|
|
@@ -158,6 +160,133 @@ function trimReviewRequest(options, settings) {
|
|
|
158
160
|
]
|
|
159
161
|
};
|
|
160
162
|
}
|
|
163
|
+
var MODERN_PURPOSE = "auto-review";
|
|
164
|
+
var ENVIRONMENT_HEADER = "ENVIRONMENT\n";
|
|
165
|
+
var MODERN_USER_ROLES = /* @__PURE__ */ new Set(["user-instruction", "direct-parent-instruction", "constraint", "checkpoint", "human-instruction"]);
|
|
166
|
+
var MODERN_USER_TEXT_CHARS = 8e3;
|
|
167
|
+
var MODERN_TOOL_ARGUMENT_CHARS = 4e3;
|
|
168
|
+
var MODERN_SCHEMA_DESCRIPTION_CHARS = 4e3;
|
|
169
|
+
var MODERN_SCHEMA_PARAMETER_CHARS = 12e3;
|
|
170
|
+
function isModernAutoReviewRequest(options) {
|
|
171
|
+
if (!record(options) || options.purpose !== MODERN_PURPOSE) return false;
|
|
172
|
+
if (typeof options.system !== "string" || !options.system.includes(REVIEW_MARKER) || !options.system.includes(REVIEW_MARKER_2)) return false;
|
|
173
|
+
if (!Array.isArray(options.messages) || options.messages.length < 2) return false;
|
|
174
|
+
const first = textOf(options.messages[0]);
|
|
175
|
+
return first !== void 0 && first.startsWith(ENVIRONMENT_HEADER);
|
|
176
|
+
}
|
|
177
|
+
function modernRole(entry) {
|
|
178
|
+
return record(entry) && typeof entry.role === "string" ? entry.role : void 0;
|
|
179
|
+
}
|
|
180
|
+
function modernProtected(entry, index, lastIndex, schemaIndexes) {
|
|
181
|
+
if (index === lastIndex) return true;
|
|
182
|
+
const role = modernRole(entry);
|
|
183
|
+
if (role !== void 0 && MODERN_USER_ROLES.has(role)) return true;
|
|
184
|
+
return schemaIndexes.has(index);
|
|
185
|
+
}
|
|
186
|
+
function compactModernContent(content, textLimit) {
|
|
187
|
+
if (!Array.isArray(content)) return [];
|
|
188
|
+
return content.map((block) => {
|
|
189
|
+
if (!record(block)) return { type: "text", text: "[non-text history block omitted from reviewer context]" };
|
|
190
|
+
if (block.type === "text" && typeof block.text === "string") {
|
|
191
|
+
return { ...block, text: truncateText(block.text, textLimit) };
|
|
192
|
+
}
|
|
193
|
+
return { type: "text", text: "[" + String(block.type ?? "attachment") + " omitted from reviewer context]" };
|
|
194
|
+
});
|
|
195
|
+
}
|
|
196
|
+
function compactModernEntry(entry, pending) {
|
|
197
|
+
if (!record(entry)) return { kind: "summary", role: "fact", content: [{ type: "text", text: "[invalid history entry omitted]" }] };
|
|
198
|
+
if (pending) return entry;
|
|
199
|
+
if (entry.kind === "user-message") {
|
|
200
|
+
return { ...entry, content: compactModernContent(entry.content, MODERN_USER_TEXT_CHARS) };
|
|
201
|
+
}
|
|
202
|
+
if (entry.kind === "tool-call") {
|
|
203
|
+
if (typeof entry.arguments === "string") {
|
|
204
|
+
return { ...entry, arguments: truncateText(entry.arguments, MODERN_TOOL_ARGUMENT_CHARS) };
|
|
205
|
+
}
|
|
206
|
+
if (entry.arguments !== void 0) {
|
|
207
|
+
let rendered = "";
|
|
208
|
+
try {
|
|
209
|
+
rendered = JSON.stringify(entry.arguments) ?? "";
|
|
210
|
+
} catch {
|
|
211
|
+
rendered = "";
|
|
212
|
+
}
|
|
213
|
+
return { ...entry, arguments: truncateText(rendered, MODERN_TOOL_ARGUMENT_CHARS) };
|
|
214
|
+
}
|
|
215
|
+
}
|
|
216
|
+
if (entry.kind === "tool-schema") {
|
|
217
|
+
const description = typeof entry.description === "string" ? truncateText(entry.description, MODERN_SCHEMA_DESCRIPTION_CHARS) : entry.description;
|
|
218
|
+
let parameters = entry.parameters;
|
|
219
|
+
if (parameters !== void 0) {
|
|
220
|
+
try {
|
|
221
|
+
const rendered = JSON.stringify(parameters) ?? "";
|
|
222
|
+
if (rendered.length > MODERN_SCHEMA_PARAMETER_CHARS) parameters = truncateText(rendered, MODERN_SCHEMA_PARAMETER_CHARS);
|
|
223
|
+
} catch {
|
|
224
|
+
parameters = "[unserializable schema parameters omitted]";
|
|
225
|
+
}
|
|
226
|
+
}
|
|
227
|
+
return { ...entry, description, parameters };
|
|
228
|
+
}
|
|
229
|
+
return entry;
|
|
230
|
+
}
|
|
231
|
+
function modernSchemaIndexes(entries) {
|
|
232
|
+
const indexes = /* @__PURE__ */ new Map();
|
|
233
|
+
entries.forEach((entry, index) => {
|
|
234
|
+
if (!record(entry) || entry.kind !== "tool-schema") return;
|
|
235
|
+
indexes.set(String(entry.mode) + "\0" + String(entry.name), index);
|
|
236
|
+
});
|
|
237
|
+
return new Set(indexes.values());
|
|
238
|
+
}
|
|
239
|
+
function trimModernReviewRequest(options, settings) {
|
|
240
|
+
const messages = options.messages;
|
|
241
|
+
const first = textOf(messages[0]);
|
|
242
|
+
if (first === void 0 || !first.startsWith(ENVIRONMENT_HEADER)) return options;
|
|
243
|
+
const entries = [];
|
|
244
|
+
for (const message of messages.slice(1)) {
|
|
245
|
+
const text = textOf(message);
|
|
246
|
+
if (text === void 0) return options;
|
|
247
|
+
try {
|
|
248
|
+
entries.push(JSON.parse(text));
|
|
249
|
+
} catch {
|
|
250
|
+
return options;
|
|
251
|
+
}
|
|
252
|
+
}
|
|
253
|
+
if (entries.length === 0) return options;
|
|
254
|
+
const lastIndex = entries.length - 1;
|
|
255
|
+
const schemaIndexes = modernSchemaIndexes(entries);
|
|
256
|
+
const recentStart = Math.max(0, entries.length - Math.max(1, settings.keepRecentEntries));
|
|
257
|
+
const selected = [];
|
|
258
|
+
for (let index = 0; index < entries.length; index += 1) {
|
|
259
|
+
if (index >= recentStart || modernProtected(entries[index], index, lastIndex, schemaIndexes)) selected.push(index);
|
|
260
|
+
}
|
|
261
|
+
let omitted = entries.length - selected.length;
|
|
262
|
+
const compacted = selected.map((index) => compactModernEntry(entries[index], index === lastIndex));
|
|
263
|
+
while (selected.length > 2 && jsonLength(compacted) > settings.maxHistoryChars) {
|
|
264
|
+
let at = selected.findIndex((index, position) => index !== lastIndex && position < selected.length - 1 && !modernProtected(entries[index], index, lastIndex, schemaIndexes));
|
|
265
|
+
if (at < 0) at = selected.findIndex((index, position) => index !== lastIndex && position < selected.length - 1);
|
|
266
|
+
if (at < 0) break;
|
|
267
|
+
selected.splice(at, 1);
|
|
268
|
+
compacted.splice(at, 1);
|
|
269
|
+
omitted += 1;
|
|
270
|
+
}
|
|
271
|
+
const summary = {
|
|
272
|
+
kind: "summary",
|
|
273
|
+
role: "fact",
|
|
274
|
+
content: [{
|
|
275
|
+
type: "text",
|
|
276
|
+
text: "[auto-review-fix] " + String(omitted) + " earlier history entries omitted from the reviewer context (original history " + String(jsonLength(entries)) + " chars). Current action, instructions and recent context are retained."
|
|
277
|
+
}]
|
|
278
|
+
};
|
|
279
|
+
const nextMessages = [messages[0]];
|
|
280
|
+
if (omitted > 0) nextMessages.push({ role: "user", content: [{ type: "text", text: JSON.stringify(summary) }] });
|
|
281
|
+
selected.forEach((originalIndex, position) => {
|
|
282
|
+
const original = messages[originalIndex + 1];
|
|
283
|
+
if (originalIndex === lastIndex) nextMessages.push(original);
|
|
284
|
+
else nextMessages.push({ ...original, content: [{ type: "text", text: JSON.stringify(compacted[position]) }] });
|
|
285
|
+
});
|
|
286
|
+
if (jsonLength(nextMessages) >= jsonLength(messages)) return options;
|
|
287
|
+
logTrim(jsonLength(messages), jsonLength(nextMessages), entries.length, selected.length);
|
|
288
|
+
return { ...options, messages: nextMessages };
|
|
289
|
+
}
|
|
161
290
|
var guardedLlms = /* @__PURE__ */ new WeakMap();
|
|
162
291
|
function whenService(ctx, name, run) {
|
|
163
292
|
try {
|
|
@@ -394,8 +523,8 @@ function normalizeConfig(config) {
|
|
|
394
523
|
model: stringSetting(source, "translateModel", ""),
|
|
395
524
|
reviewContext: {
|
|
396
525
|
enabled: boolSetting(source, "reviewContextGuard", true),
|
|
397
|
-
maxHistoryChars: numberSetting(source, "reviewMaxHistoryChars",
|
|
398
|
-
keepRecentEntries: numberSetting(source, "reviewKeepRecentEntries",
|
|
526
|
+
maxHistoryChars: numberSetting(source, "reviewMaxHistoryChars", 2e5, 2e4, 6e5),
|
|
527
|
+
keepRecentEntries: numberSetting(source, "reviewKeepRecentEntries", 32, 4, 64)
|
|
399
528
|
}
|
|
400
529
|
};
|
|
401
530
|
}
|
|
@@ -662,8 +791,8 @@ var DEFAULT_AUTO_REVIEW_CONFIG = {
|
|
|
662
791
|
translateProvider: "",
|
|
663
792
|
translateModel: "",
|
|
664
793
|
reviewContextGuard: true,
|
|
665
|
-
reviewMaxHistoryChars:
|
|
666
|
-
reviewKeepRecentEntries:
|
|
794
|
+
reviewMaxHistoryChars: 2e5,
|
|
795
|
+
reviewKeepRecentEntries: 32
|
|
667
796
|
};
|
|
668
797
|
var Config = z.object({
|
|
669
798
|
keepPresetGuard: z.boolean().default(DEFAULT_AUTO_REVIEW_CONFIG.keepPresetGuard).volatile(),
|
package/lib/client.js
CHANGED
|
@@ -45,6 +45,9 @@ var SESSION_END_API = {
|
|
|
45
45
|
var AUTH_COOKIE_API = {
|
|
46
46
|
prune: "/api/dsh-mcviseron/auth-cookies/prune"
|
|
47
47
|
};
|
|
48
|
+
var ARCHIVE_API = {
|
|
49
|
+
status: "/api/dsh-mcviseron/archive-integration/status"
|
|
50
|
+
};
|
|
48
51
|
|
|
49
52
|
// src/client/AppearanceScheduleRow.tsx
|
|
50
53
|
var import_react = require("react");
|
|
@@ -371,7 +374,7 @@ function RestartCard({ t }) {
|
|
|
371
374
|
const body = await response.json();
|
|
372
375
|
if (body.ok !== true) throw new Error("restart-status-rejected");
|
|
373
376
|
if (body.available === true) {
|
|
374
|
-
setState({ kind: "ready", appPath: typeof body.appPath === "string" ? body.appPath : "" });
|
|
377
|
+
setState({ kind: "ready", appPath: typeof body.appPath === "string" ? body.appPath : "", mode: typeof body.mode === "string" ? body.mode : "desktop" });
|
|
375
378
|
} else {
|
|
376
379
|
setState({ kind: "unavailable" });
|
|
377
380
|
}
|
|
@@ -399,8 +402,25 @@ function RestartCard({ t }) {
|
|
|
399
402
|
setState({ kind: "failed", message: error instanceof Error ? error.message : String(error) });
|
|
400
403
|
}
|
|
401
404
|
};
|
|
402
|
-
const
|
|
405
|
+
const startClose = async () => {
|
|
406
|
+
if (!window.confirm(t("page.restart.closeConfirm"))) return;
|
|
407
|
+
setState({ kind: "closing" });
|
|
408
|
+
try {
|
|
409
|
+
const response = await fetch(EXECUTE, {
|
|
410
|
+
method: "POST",
|
|
411
|
+
headers: { "content-type": "application/json" },
|
|
412
|
+
body: JSON.stringify({ confirm: true, action: "close" })
|
|
413
|
+
});
|
|
414
|
+
if (!response.ok) throw new Error(await readError(response));
|
|
415
|
+
const body = await response.json();
|
|
416
|
+
if (body.ok !== true) throw new Error("close-rejected");
|
|
417
|
+
} catch (error) {
|
|
418
|
+
setState({ kind: "failed", message: error instanceof Error ? error.message : String(error) });
|
|
419
|
+
}
|
|
420
|
+
};
|
|
421
|
+
const status = state.kind === "ready" ? state.mode === "reexec" ? t("page.restart.modeProcess") : state.mode === "supervisor-exit" ? t("page.restart.modeSupervisor") : t("page.restart.ready") : state.kind === "closing" ? t("page.restart.closing") : state.kind === "route-missing" ? t("page.restart.routeMissing") : state.kind === "restarting" ? t("page.restart.restarting") : state.kind === "failed" ? t("page.restart.failed") + (state.message !== "" ? " (" + state.message + ")" : "") : state.kind === "loading" ? t("restart.checking") : t("page.restart.unavailable");
|
|
403
422
|
const canRestart = state.kind === "ready" || state.kind === "failed";
|
|
423
|
+
const canClose = state.kind === "ready";
|
|
404
424
|
return /* @__PURE__ */ (0, import_jsx_runtime2.jsxs)("div", { style: pageStyles.card, children: [
|
|
405
425
|
/* @__PURE__ */ (0, import_jsx_runtime2.jsx)("div", { style: pageStyles.cardTitle, children: t("page.restart.title") }),
|
|
406
426
|
/* @__PURE__ */ (0, import_jsx_runtime2.jsx)("div", { style: pageStyles.cardBody, children: t("page.restart.description") }),
|
|
@@ -410,18 +430,32 @@ function RestartCard({ t }) {
|
|
|
410
430
|
": ",
|
|
411
431
|
state.appPath
|
|
412
432
|
] }) : null,
|
|
413
|
-
/* @__PURE__ */ (0, import_jsx_runtime2.
|
|
414
|
-
|
|
415
|
-
|
|
416
|
-
|
|
417
|
-
|
|
418
|
-
|
|
419
|
-
|
|
420
|
-
|
|
421
|
-
|
|
422
|
-
|
|
423
|
-
|
|
424
|
-
|
|
433
|
+
/* @__PURE__ */ (0, import_jsx_runtime2.jsxs)("div", { style: pageStyles.cardActions, children: [
|
|
434
|
+
/* @__PURE__ */ (0, import_jsx_runtime2.jsx)(
|
|
435
|
+
"button",
|
|
436
|
+
{
|
|
437
|
+
type: "button",
|
|
438
|
+
disabled: !canRestart,
|
|
439
|
+
onClick: () => {
|
|
440
|
+
void startRestart();
|
|
441
|
+
},
|
|
442
|
+
style: canRestart ? styles.button : styles.buttonDisabled,
|
|
443
|
+
children: state.kind === "restarting" ? t("page.restart.restarting") : t("page.restart.button")
|
|
444
|
+
}
|
|
445
|
+
),
|
|
446
|
+
/* @__PURE__ */ (0, import_jsx_runtime2.jsx)(
|
|
447
|
+
"button",
|
|
448
|
+
{
|
|
449
|
+
type: "button",
|
|
450
|
+
disabled: !canClose,
|
|
451
|
+
onClick: () => {
|
|
452
|
+
void startClose();
|
|
453
|
+
},
|
|
454
|
+
style: canClose ? styles.button : styles.buttonDisabled,
|
|
455
|
+
children: state.kind === "closing" ? t("page.restart.closing") : t("page.restart.close")
|
|
456
|
+
}
|
|
457
|
+
)
|
|
458
|
+
] })
|
|
425
459
|
] });
|
|
426
460
|
}
|
|
427
461
|
|
|
@@ -1209,6 +1243,35 @@ var SESSION_END_FIELDS = [
|
|
|
1209
1243
|
var import_jsx_runtime6 = require("react/jsx-runtime");
|
|
1210
1244
|
function SettingsSection({ t }) {
|
|
1211
1245
|
const [tab, setTab] = (0, import_react6.useState)("restart");
|
|
1246
|
+
const [archive, setArchive] = (0, import_react6.useState)(null);
|
|
1247
|
+
const loadArchive = async () => {
|
|
1248
|
+
try {
|
|
1249
|
+
const response = await fetch(ARCHIVE_API.status, { credentials: "same-origin", cache: "no-store" });
|
|
1250
|
+
if (!response.ok) {
|
|
1251
|
+
setArchive(null);
|
|
1252
|
+
return;
|
|
1253
|
+
}
|
|
1254
|
+
const value = await response.json();
|
|
1255
|
+
if (value.available) {
|
|
1256
|
+
try {
|
|
1257
|
+
const inventoryResponse = await fetch("/api/dsh-session-archive/inventory", { credentials: "same-origin", cache: "no-store" });
|
|
1258
|
+
if (inventoryResponse.ok) {
|
|
1259
|
+
const inventory = await inventoryResponse.json();
|
|
1260
|
+
const rows = Array.isArray(inventory.rows) ? inventory.rows : [];
|
|
1261
|
+
value.archivedCount = rows.filter((row) => row.archived === true).length;
|
|
1262
|
+
value.unknownCount = rows.filter((row) => row.archived === true && row.archivedAt === void 0).length;
|
|
1263
|
+
}
|
|
1264
|
+
} catch {
|
|
1265
|
+
}
|
|
1266
|
+
}
|
|
1267
|
+
setArchive(value.available ? value : null);
|
|
1268
|
+
} catch {
|
|
1269
|
+
setArchive(null);
|
|
1270
|
+
}
|
|
1271
|
+
};
|
|
1272
|
+
(0, import_react6.useEffect)(() => {
|
|
1273
|
+
void loadArchive();
|
|
1274
|
+
}, []);
|
|
1212
1275
|
return /* @__PURE__ */ (0, import_jsx_runtime6.jsxs)("div", { style: pageStyles.page, children: [
|
|
1213
1276
|
/* @__PURE__ */ (0, import_jsx_runtime6.jsx)("h2", { style: pageStyles.heading, children: t("page.title") }),
|
|
1214
1277
|
/* @__PURE__ */ (0, import_jsx_runtime6.jsx)("p", { style: pageStyles.lede, children: t("page.description") }),
|
|
@@ -1265,6 +1328,19 @@ function SettingsSection({ t }) {
|
|
|
1265
1328
|
children: t("page.tab.sessionEnd")
|
|
1266
1329
|
}
|
|
1267
1330
|
),
|
|
1331
|
+
archive?.available ? /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(
|
|
1332
|
+
"button",
|
|
1333
|
+
{
|
|
1334
|
+
type: "button",
|
|
1335
|
+
role: "tab",
|
|
1336
|
+
"aria-selected": tab === "archive",
|
|
1337
|
+
onClick: () => {
|
|
1338
|
+
setTab("archive");
|
|
1339
|
+
},
|
|
1340
|
+
style: tab === "archive" ? { ...pageStyles.tab, ...pageStyles.tabActive } : pageStyles.tab,
|
|
1341
|
+
children: t("page.tab.archive")
|
|
1342
|
+
}
|
|
1343
|
+
) : null,
|
|
1268
1344
|
/* @__PURE__ */ (0, import_jsx_runtime6.jsx)(
|
|
1269
1345
|
"button",
|
|
1270
1346
|
{
|
|
@@ -1303,7 +1379,36 @@ function SettingsSection({ t }) {
|
|
|
1303
1379
|
description: "page.sessionEnd.description",
|
|
1304
1380
|
fields: SESSION_END_FIELDS
|
|
1305
1381
|
}
|
|
1306
|
-
) : /* @__PURE__ */ (0, import_jsx_runtime6.jsxs)("div", { style: pageStyles.card, children: [
|
|
1382
|
+
) : tab === "archive" && archive?.available ? /* @__PURE__ */ (0, import_jsx_runtime6.jsxs)("div", { style: pageStyles.card, children: [
|
|
1383
|
+
/* @__PURE__ */ (0, import_jsx_runtime6.jsx)("div", { style: pageStyles.cardTitle, children: t("page.archive.title") }),
|
|
1384
|
+
/* @__PURE__ */ (0, import_jsx_runtime6.jsxs)("div", { style: pageStyles.componentRow, children: [
|
|
1385
|
+
/* @__PURE__ */ (0, import_jsx_runtime6.jsx)("span", { style: pageStyles.componentName, children: t("page.archive.available") }),
|
|
1386
|
+
/* @__PURE__ */ (0, import_jsx_runtime6.jsx)("span", { style: pageStyles.componentHint, children: archive.ledgerExists ? t("page.archive.ledger") : archive.ledgerPath })
|
|
1387
|
+
] }),
|
|
1388
|
+
/* @__PURE__ */ (0, import_jsx_runtime6.jsxs)("div", { style: pageStyles.componentRow, children: [
|
|
1389
|
+
/* @__PURE__ */ (0, import_jsx_runtime6.jsx)("span", { style: pageStyles.componentName, children: t("page.archive.archived") }),
|
|
1390
|
+
/* @__PURE__ */ (0, import_jsx_runtime6.jsx)("span", { style: pageStyles.componentHint, children: archive.archivedCount })
|
|
1391
|
+
] }),
|
|
1392
|
+
/* @__PURE__ */ (0, import_jsx_runtime6.jsxs)("div", { style: pageStyles.componentRow, children: [
|
|
1393
|
+
/* @__PURE__ */ (0, import_jsx_runtime6.jsx)("span", { style: pageStyles.componentName, children: t("page.archive.observed") }),
|
|
1394
|
+
/* @__PURE__ */ (0, import_jsx_runtime6.jsx)("span", { style: pageStyles.componentHint, children: archive.observed })
|
|
1395
|
+
] }),
|
|
1396
|
+
/* @__PURE__ */ (0, import_jsx_runtime6.jsxs)("div", { style: pageStyles.componentRow, children: [
|
|
1397
|
+
/* @__PURE__ */ (0, import_jsx_runtime6.jsx)("span", { style: pageStyles.componentName, children: t("page.archive.manual") }),
|
|
1398
|
+
/* @__PURE__ */ (0, import_jsx_runtime6.jsx)("span", { style: pageStyles.componentHint, children: archive.manual })
|
|
1399
|
+
] }),
|
|
1400
|
+
/* @__PURE__ */ (0, import_jsx_runtime6.jsxs)("div", { style: pageStyles.componentRow, children: [
|
|
1401
|
+
/* @__PURE__ */ (0, import_jsx_runtime6.jsx)("span", { style: pageStyles.componentName, children: t("page.archive.unknown") }),
|
|
1402
|
+
/* @__PURE__ */ (0, import_jsx_runtime6.jsx)("span", { style: pageStyles.componentHint, children: archive.unknownCount })
|
|
1403
|
+
] }),
|
|
1404
|
+
/* @__PURE__ */ (0, import_jsx_runtime6.jsxs)("div", { style: pageStyles.componentRow, children: [
|
|
1405
|
+
/* @__PURE__ */ (0, import_jsx_runtime6.jsx)("span", { style: pageStyles.componentName, children: t("page.archive.ledger") }),
|
|
1406
|
+
/* @__PURE__ */ (0, import_jsx_runtime6.jsx)("span", { style: pageStyles.componentHint, children: archive.ledgerPath })
|
|
1407
|
+
] }),
|
|
1408
|
+
/* @__PURE__ */ (0, import_jsx_runtime6.jsx)("button", { type: "button", onClick: () => {
|
|
1409
|
+
void loadArchive();
|
|
1410
|
+
}, style: pageStyles.tab, children: t("page.archive.refresh") })
|
|
1411
|
+
] }) : /* @__PURE__ */ (0, import_jsx_runtime6.jsxs)("div", { style: pageStyles.card, children: [
|
|
1307
1412
|
/* @__PURE__ */ (0, import_jsx_runtime6.jsx)("div", { style: pageStyles.cardTitle, children: t("page.components.title") }),
|
|
1308
1413
|
/* @__PURE__ */ (0, import_jsx_runtime6.jsxs)("div", { style: pageStyles.componentRow, children: [
|
|
1309
1414
|
/* @__PURE__ */ (0, import_jsx_runtime6.jsx)("span", { style: pageStyles.componentName, children: t("page.components.appearance") }),
|
|
@@ -1329,6 +1434,10 @@ function SettingsSection({ t }) {
|
|
|
1329
1434
|
/* @__PURE__ */ (0, import_jsx_runtime6.jsx)("span", { style: pageStyles.componentName, children: t("page.components.sessionEnd") }),
|
|
1330
1435
|
/* @__PURE__ */ (0, import_jsx_runtime6.jsx)("span", { style: pageStyles.componentHint, children: t("page.components.sessionEndHint") })
|
|
1331
1436
|
] }),
|
|
1437
|
+
archive?.available ? /* @__PURE__ */ (0, import_jsx_runtime6.jsxs)("div", { style: pageStyles.componentRow, children: [
|
|
1438
|
+
/* @__PURE__ */ (0, import_jsx_runtime6.jsx)("span", { style: pageStyles.componentName, children: t("page.components.archive") }),
|
|
1439
|
+
/* @__PURE__ */ (0, import_jsx_runtime6.jsx)("span", { style: pageStyles.componentHint, children: t("page.components.archiveHint") })
|
|
1440
|
+
] }) : null,
|
|
1332
1441
|
/* @__PURE__ */ (0, import_jsx_runtime6.jsx)("div", { style: pageStyles.cardStatus, children: t("page.components.note") })
|
|
1333
1442
|
] })
|
|
1334
1443
|
] });
|
|
@@ -1494,12 +1603,17 @@ var zh = {
|
|
|
1494
1603
|
"sessionEnd.failed": "\u8BBE\u7F6E\u5931\u8D25\uFF0C\u8BF7\u91CD\u8BD5",
|
|
1495
1604
|
"page.title": "MCviseron \u63D2\u4EF6",
|
|
1496
1605
|
"page.description": "\u603B\u63D2\u4EF6\u7684\u7EC4\u4EF6\u8BBE\u7F6E\u3002\u5916\u89C2\u8BBE\u7F6E\u4ECD\u5728\u300C\u901A\u7528 \u2192 \u5916\u89C2\u300D\u4E2D\u3002",
|
|
1497
|
-
"page.tab.restart": "\u91CD\u542F",
|
|
1606
|
+
"page.tab.restart": "\u91CD\u542F / \u5173\u95ED",
|
|
1498
1607
|
"page.tab.components": "\u7EC4\u4EF6",
|
|
1499
|
-
"page.restart.title": "\u91CD\u542F DeepSeek Harness",
|
|
1500
|
-
"page.restart.description": "\u5173\u95ED\
|
|
1608
|
+
"page.restart.title": "\u91CD\u542F / \u5173\u95ED DeepSeek Harness",
|
|
1609
|
+
"page.restart.description": "\u91CD\u542F\u6216\u5173\u95ED\u5F53\u524D DSH\uFF08\u684C\u9762\u5E94\u7528\u3001Linux/Web \u8FDB\u7A0B\u6216\u4E91\u6258\u7BA1\u5BB9\u5668\uFF09\uFF1B\u6B63\u5728\u8FD0\u884C\u7684\u4EFB\u52A1\u4F1A\u88AB\u4E2D\u65AD",
|
|
1501
1610
|
"page.restart.ready": "\u53EF\u7528",
|
|
1502
|
-
"page.restart.
|
|
1611
|
+
"page.restart.modeProcess": "Linux/Web \u8FDB\u7A0B\uFF1A\u5C06\u91CD\u65B0\u62C9\u8D77\u5F53\u524D dsh \u547D\u4EE4",
|
|
1612
|
+
"page.restart.modeSupervisor": "\u7531 systemd / Docker / Kubernetes \u6258\u7BA1\uFF1A\u9000\u51FA\u540E\u7531\u6258\u7BA1\u5668\u91CD\u542F",
|
|
1613
|
+
"page.restart.close": "\u5173\u95ED DSH",
|
|
1614
|
+
"page.restart.closing": "\u6B63\u5728\u5173\u95ED\u2026",
|
|
1615
|
+
"page.restart.closeConfirm": "\u786E\u5B9A\u8981\u5173\u95ED DSH \u5417\uFF1F\u91CD\u542F/\u5173\u95ED\u52A8\u4F5C\u4F1A\u4E2D\u65AD\u6B63\u5728\u8FD0\u884C\u7684\u4EFB\u52A1\u3002",
|
|
1616
|
+
"page.restart.unavailable": "\u5F53\u524D\u73AF\u5883\u6CA1\u6709\u53EF\u7528\u7684\u91CD\u542F\u76EE\u6807",
|
|
1503
1617
|
"page.restart.routeMissing": "\u91CD\u542F\u63A5\u53E3\u672A\u52A0\u8F7D\uFF1A\u8BF7\u786E\u8BA4 mcviseron-restart \u6761\u76EE\u5DF2\u542F\u7528",
|
|
1504
1618
|
"page.restart.appPath": "\u5E94\u7528\u8DEF\u5F84",
|
|
1505
1619
|
"page.restart.button": "\u91CD\u542F",
|
|
@@ -1513,8 +1627,8 @@ var zh = {
|
|
|
1513
1627
|
"page.components.autoReviewFixHint": "\u672C\u9875\u300CAuto review \u4FEE\u590D\u300D\u5B50\u9875",
|
|
1514
1628
|
"page.components.taskGuard": "Todo \u8BA1\u5212\u5B88\u536B",
|
|
1515
1629
|
"page.components.taskGuardHint": "\u672C\u9875\u300CTodo \u5B88\u536B\u300D\u5B50\u9875",
|
|
1516
|
-
"page.components.restart": "\u91CD\u542F
|
|
1517
|
-
"page.components.restartHint": "\u672C\u9875\u300C\u91CD\u542F\u300D\u5B50\u9875",
|
|
1630
|
+
"page.components.restart": "\u91CD\u542F / \u5173\u95ED DSH",
|
|
1631
|
+
"page.components.restartHint": "\u672C\u9875\u300C\u91CD\u542F / \u5173\u95ED\u300D\u5B50\u9875",
|
|
1518
1632
|
"page.components.note": "\u7EC4\u4EF6\u914D\u7F6E\u5199\u5165 master \u6761\u76EE\uFF08mcviseron\uFF09\u7684 Config\uFF1B\u82E5\u7EC4\u4EF6\u4ECD\u4F7F\u7528\u65E7\u503C\uFF0C\u91CD\u542F DSH \u540E\u751F\u6548\u3002",
|
|
1519
1633
|
"page.fallback.note": "\u8BBE\u7F6E\u5206\u533A\u672A\u52A0\u8F7D\uFF0C\u91CD\u542F\u5165\u53E3\u6682\u65F6\u56DE\u9000\u5230\u901A\u7528\u8BBE\u7F6E\u3002",
|
|
1520
1634
|
"page.tab.autoReview": "Auto review \u4FEE\u590D",
|
|
@@ -1567,12 +1681,25 @@ var zh = {
|
|
|
1567
1681
|
"form.taskGuard.exclude": "\u4E0D\u7EDF\u8BA1\u8FD9\u4E9B\u5DE5\u5177",
|
|
1568
1682
|
"form.taskGuard.listHint": "\u9017\u53F7\u5206\u9694\uFF0C\u652F\u6301 *\uFF1B\u7559\u7A7A\u8868\u793A\u5168\u90E8",
|
|
1569
1683
|
"page.tab.sessionEnd": "\u4F1A\u8BDD\u540E\u52A8\u4F5C",
|
|
1684
|
+
"page.tab.archive": "\u5F52\u6863\u65F6\u95F4",
|
|
1685
|
+
"page.archive.title": "\u5F52\u6863\u65F6\u95F4",
|
|
1686
|
+
"page.archive.description": "\u7B2C\u4E09\u65B9\u4F1A\u8BDD\u5F52\u6863\u63D2\u4EF6\u7684\u5F52\u6863\u65F6\u95F4\u72B6\u6001\u3002\u4EC5\u5728\u68C0\u6D4B\u5230 @linxin666/dsh-session-archive \u65F6\u663E\u793A\uFF0C\u672A\u5B89\u88C5\u65F6\u4E0D\u4F1A\u6CE8\u518C\u6B64\u9875\u3002",
|
|
1687
|
+
"page.archive.available": "\u5DF2\u68C0\u6D4B\u5230\u7B2C\u4E09\u65B9\u5F52\u6863\u63D2\u4EF6",
|
|
1688
|
+
"page.archive.ledger": "\u5F52\u6863\u53F0\u8D26",
|
|
1689
|
+
"page.archive.observed": "\u5386\u53F2\u8865\u8BB0",
|
|
1690
|
+
"page.archive.manual": "\u6B63\u5E38\u8BB0\u5F55",
|
|
1691
|
+
"page.archive.unknown": "\u672A\u77E5\u5F52\u6863\u65F6\u95F4",
|
|
1692
|
+
"page.archive.archived": "\u5DF2\u5F52\u6863\u4F1A\u8BDD",
|
|
1693
|
+
"page.archive.refresh": "\u5237\u65B0\u72B6\u6001",
|
|
1694
|
+
"page.archive.note": "\u5386\u53F2\u672A\u77E5\u5F52\u6863\u5728\u9996\u6B21\u521D\u59CB\u5316\u65F6\u8865\u8BB0\uFF08\u8865\u8BB0\uFF09\uFF1B\u521D\u59CB\u5316\u540E\u7684\u65B0\u5F52\u6863\u8BB0\u5F55\u6B63\u5E38\u65F6\u95F4\u3002\u81EA\u52A8\u5220\u9664\u4ECD\u7531\u5F52\u6863\u63D2\u4EF6\u63A7\u5236\u3002",
|
|
1570
1695
|
"page.sessionEnd.title": "\u4F1A\u8BDD\u540E\u52A8\u4F5C",
|
|
1571
1696
|
"page.sessionEnd.description": "\u672C\u8F6E\u6700\u7EC8\u56DE\u590D\u5B8C\u6574\u663E\u793A\u540E\u6267\u884C\u4E00\u6B21\u52A8\u4F5C\uFF1B\u91CD\u542F\u4F1A\u7B49\u5F85\u6240\u6709\u4F1A\u8BDD\u4E0E\u540E\u53F0\u4EFB\u52A1\u7ED3\u675F\uFF0C\u8BBE\u7F6E\u9875\u7684\u91CD\u542F\u4E0D\u53D7\u6B64\u7EA6\u675F\u3002",
|
|
1572
1697
|
"page.components.authCookie": "\u8BA4\u8BC1 cookie \u6E05\u7406",
|
|
1573
1698
|
"page.components.authCookieHint": "\u81EA\u52A8\u8FD0\u884C\uFF0C\u65E0\u8BBE\u7F6E",
|
|
1574
1699
|
"page.components.sessionEnd": "\u4F1A\u8BDD\u540E\u52A8\u4F5C",
|
|
1575
1700
|
"page.components.sessionEndHint": "\u8F93\u5165\u6846\u5DE6\u4FA7\u7684\u300C\u4F1A\u8BDD\u540E\u91CD\u542F\u300D\u4E0B\u62C9",
|
|
1701
|
+
"page.components.archive": "\u5F52\u6863\u65F6\u95F4\uFF08\u53EF\u9009\uFF09",
|
|
1702
|
+
"page.components.archiveHint": "\u68C0\u6D4B\u5230\u7B2C\u4E09\u65B9\u5F52\u6863\u63D2\u4EF6\u65F6\u663E\u793A",
|
|
1576
1703
|
"form.sessionEnd.enabled": "\u542F\u7528\u4F1A\u8BDD\u540E\u52A8\u4F5C",
|
|
1577
1704
|
"form.sessionEnd.enabledHint": "\u5728\u5BF9\u8BDD\u8F93\u5165\u6846\u663E\u793A\u300C\u4F1A\u8BDD\u540E\u91CD\u542F\u300D\u4E0B\u62C9\uFF0C\u5E76\u5141\u8BB8 AI \u8BBE\u7F6E",
|
|
1578
1705
|
"form.sessionEnd.grace": "\u6700\u7EC8\u56DE\u590D\u663E\u793A\u7B49\u5F85\uFF08\u6BEB\u79D2\uFF09",
|
|
@@ -1622,12 +1749,17 @@ var en = {
|
|
|
1622
1749
|
"sessionEnd.failed": "Could not update the session-end action",
|
|
1623
1750
|
"page.title": "MCviseron plugin",
|
|
1624
1751
|
"page.description": "Settings for the master plugin components. Appearance still lives under General \u2192 Appearance.",
|
|
1625
|
-
"page.tab.restart": "Restart",
|
|
1752
|
+
"page.tab.restart": "Restart / close",
|
|
1626
1753
|
"page.tab.components": "Components",
|
|
1627
|
-
"page.restart.title": "Restart DeepSeek Harness",
|
|
1628
|
-
"page.restart.description": "
|
|
1754
|
+
"page.restart.title": "Restart / close DeepSeek Harness",
|
|
1755
|
+
"page.restart.description": "Restart or close DSH (desktop app, Linux/Web process, or cloud container); running tasks are interrupted",
|
|
1629
1756
|
"page.restart.ready": "Available",
|
|
1630
|
-
"page.restart.
|
|
1757
|
+
"page.restart.modeProcess": "Linux/Web process: relaunch the current dsh command",
|
|
1758
|
+
"page.restart.modeSupervisor": "Managed by systemd / Docker / Kubernetes: exit and let the supervisor restart it",
|
|
1759
|
+
"page.restart.close": "Close DSH",
|
|
1760
|
+
"page.restart.closing": "Closing\u2026",
|
|
1761
|
+
"page.restart.closeConfirm": "Close DSH? Restart/close interrupts running tasks.",
|
|
1762
|
+
"page.restart.unavailable": "No restart target is available in this environment",
|
|
1631
1763
|
"page.restart.routeMissing": "The restart route is not loaded: check that the mcviseron-restart entry is enabled",
|
|
1632
1764
|
"page.restart.appPath": "App path",
|
|
1633
1765
|
"page.restart.button": "Restart",
|
|
@@ -1641,8 +1773,8 @@ var en = {
|
|
|
1641
1773
|
"page.components.autoReviewFixHint": "The Auto-review fix tab on this page",
|
|
1642
1774
|
"page.components.taskGuard": "Todo plan guard",
|
|
1643
1775
|
"page.components.taskGuardHint": "The Todo guard tab on this page",
|
|
1644
|
-
"page.components.restart": "Restart
|
|
1645
|
-
"page.components.restartHint": "The Restart tab on this page",
|
|
1776
|
+
"page.components.restart": "Restart / close DSH",
|
|
1777
|
+
"page.components.restartHint": "The Restart / close tab on this page",
|
|
1646
1778
|
"page.components.note": "Component settings are written to the mcviseron entry config; restart DSH if a component still uses the old value.",
|
|
1647
1779
|
"page.fallback.note": "The settings section is unavailable, so the restart entry falls back to General.",
|
|
1648
1780
|
"page.tab.autoReview": "Auto-review fix",
|
|
@@ -1695,12 +1827,25 @@ var en = {
|
|
|
1695
1827
|
"form.taskGuard.exclude": "Exclude these tools",
|
|
1696
1828
|
"form.taskGuard.listHint": "Comma-separated, * supported; empty means all",
|
|
1697
1829
|
"page.tab.sessionEnd": "After-session action",
|
|
1830
|
+
"page.tab.archive": "Archive time",
|
|
1831
|
+
"page.archive.title": "Archive time",
|
|
1832
|
+
"page.archive.description": "Archive-time status of the third-party session archive plugin. Shown only when @linxin666/dsh-session-archive is detected; no page is registered when it is absent.",
|
|
1833
|
+
"page.archive.available": "Third-party archive plugin detected",
|
|
1834
|
+
"page.archive.ledger": "Archive ledger",
|
|
1835
|
+
"page.archive.observed": "Historical backfilled",
|
|
1836
|
+
"page.archive.manual": "Normal records",
|
|
1837
|
+
"page.archive.unknown": "Unknown archive times",
|
|
1838
|
+
"page.archive.archived": "Archived sessions",
|
|
1839
|
+
"page.archive.refresh": "Refresh status",
|
|
1840
|
+
"page.archive.note": "Historical unknown archives are backfilled on first initialization and marked (backfilled); new archives after initialization are recorded as normal times. Auto-delete remains controlled by the archive plugin.",
|
|
1698
1841
|
"page.sessionEnd.title": "After-session action",
|
|
1699
1842
|
"page.sessionEnd.description": "One action after the final reply is fully displayed. A restart waits for every running conversation and background job; the Settings restart button is not delayed.",
|
|
1700
1843
|
"page.components.authCookie": "Auth-cookie cleanup",
|
|
1701
1844
|
"page.components.authCookieHint": "Runs automatically; no settings",
|
|
1702
1845
|
"page.components.sessionEnd": "After-session action",
|
|
1703
1846
|
"page.components.sessionEndHint": "The \u201CRestart after session\u201D dropdown left of the composer",
|
|
1847
|
+
"page.components.archive": "Archive time (optional)",
|
|
1848
|
+
"page.components.archiveHint": "Shown only when the third-party archive plugin is detected",
|
|
1704
1849
|
"form.sessionEnd.enabled": "Enable after-session actions",
|
|
1705
1850
|
"form.sessionEnd.enabledHint": "Show the \u201CRestart after session\u201D dropdown in the composer and let the AI arm it",
|
|
1706
1851
|
"form.sessionEnd.grace": "Final-reply render grace (ms)",
|