dsh-codearts 1.2.13 → 1.3.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 +88 -0
- package/lib/auth-CF9XHMX-.mjs +1008 -0
- package/lib/bin.mjs +3 -1
- package/lib/client/index.d.cts +19 -1
- package/lib/client/index.js +308 -117
- package/lib/index.d.mts +63 -1
- package/lib/index.mjs +474 -77
- package/lib/keeper-P4FkDUEd.mjs +215 -0
- package/lib/keeper-main.d.mts +1 -0
- package/lib/keeper-main.mjs +199 -0
- package/lib/{version-E5iTxpWh.mjs → upstream-CVtspzAv.mjs} +19 -1473
- package/lib/version-CJTTrulR.mjs +539 -0
- package/package.json +1 -1
package/lib/client/index.js
CHANGED
|
@@ -4,6 +4,7 @@ window.__ModuleLoader__.load({
|
|
|
4
4
|
var module = { exports: {} };
|
|
5
5
|
var exports = module.exports;
|
|
6
6
|
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
7
|
+
//#endregion
|
|
7
8
|
let react = require("react");
|
|
8
9
|
let _deepseek_ai_dsh_client_ui_primitives = require("@deepseek-ai/dsh-client-ui-primitives");
|
|
9
10
|
let react_jsx_runtime = require("react/jsx-runtime");
|
|
@@ -61,8 +62,23 @@ function subscribeSidebarPanelWanted(listener) {
|
|
|
61
62
|
};
|
|
62
63
|
}
|
|
63
64
|
//#endregion
|
|
65
|
+
//#region src/client/latency-label.ts
|
|
66
|
+
/**
|
|
67
|
+
* 首字延迟 P95 的显示值。
|
|
68
|
+
*
|
|
69
|
+
* 单独成模块是因为这里踩过一个静默失效的顺序:`percentileOf` 落进「>30 秒」溢出档时
|
|
70
|
+
* 只回 `{ overflow: true }`、不带 value(见 usage.ts 的注释:宁可不给精确值),
|
|
71
|
+
* 而渲染先判 `p95 === undefined` 就会把溢出吞成「—」—— 用户看到的是「这个数一直没值」,
|
|
72
|
+
* 实际是 P95 真的超过了 30 秒。溢出必须先判。
|
|
73
|
+
*/
|
|
74
|
+
function latencyP95Label(latency) {
|
|
75
|
+
if (latency.overflow === true) return ">30 s";
|
|
76
|
+
if (latency.p95 === void 0) return "—";
|
|
77
|
+
return `${Math.round(latency.p95)} ms`;
|
|
78
|
+
}
|
|
79
|
+
//#endregion
|
|
64
80
|
//#region \0dsh-css:/home/runner/work/dsh-codearts/dsh-codearts/src/client/CodeArtsPluginCard.module.css.mjs
|
|
65
|
-
const css$1 = ".xoziZG_card{border:.5px solid var(--dsw-alias-settings-card-stroke);border-radius:var(--dsw-radius-lg);background:var(--dsw-alias-settings-card-fill);max-width:720px}.xoziZG_header{align-items:flex-start;gap:12px;padding:14px 16px;display:flex}.xoziZG_headText{flex-direction:column;flex:1;gap:6px;min-width:0;display:flex}.xoziZG_name{color:var(--dsw-alias-label-primary);font-size:15px;font-weight:600;line-height:22px}.xoziZG_desc{color:var(--dsw-alias-label-tertiary);font-size:13px;line-height:20px}.xoziZG_statusLine{color:var(--dsw-alias-label-primary);align-items:center;gap:6px;font-size:14px;font-weight:500;line-height:22px;display:inline-flex}.xoziZG_meta{color:var(--dsw-alias-label-tertiary);font-variant-numeric:tabular-nums;font-size:12px;line-height:18px}.xoziZG_body{border-top:.5px solid var(--dsw-alias-border-l2);margin:0 16px;padding:4px 0 16px}.xoziZG_tabs{margin-top:12px}.xoziZG_tabPanel{padding-top:2px}.xoziZG_accountToolbar{gap:8px;margin-top:12px;display:flex}.xoziZG_accountToolbar>*{flex:1}.xoziZG_manualForm{border:.5px solid var(--dsw-alias-border-l3);border-radius:var(--dsw-radius-md);margin-top:12px;padding:12px}.xoziZG_accountCard{flex-direction:column;gap:10px;margin-top:12px;display:flex}.xoziZG_accountEntry{border:.5px solid var(--dsw-alias-border-l2);border-radius:var(--dsw-radius-md);background:var(--dsw-alias-bg-layer-2)}.xoziZG_accountRow{align-items:center;gap:10px;padding:12px;display:flex}.xoziZG_claimAllRow{border-top:.5px solid var(--dsw-alias-border-l2);justify-content:flex-end;padding:10px 12px 0;display:flex}.xoziZG_avatar{background:var(--dsw-alias-bg-layer-3);width:32px;height:32px;color:var(--dsw-alias-label-primary);border-radius:50%;flex:none;justify-content:center;align-items:center;font-size:14px;font-weight:600;display:inline-flex}.xoziZG_accountInfo{flex-direction:column;flex:1;gap:2px;min-width:0;display:flex}.xoziZG_accountNameRow{align-items:center;gap:6px;min-width:0;display:flex}.xoziZG_accountName{color:var(--dsw-alias-label-primary);text-overflow:ellipsis;white-space:nowrap;font-size:14px;font-weight:600;line-height:20px;overflow:hidden}.xoziZG_accountRowActions{flex-wrap:wrap;flex:none;justify-content:flex-end;align-items:center;gap:6px;display:flex}.xoziZG_accountToggle{align-items:center;gap:6px;display:inline-flex}.xoziZG_accountToggleLabel{color:var(--dsw-alias-label-secondary);white-space:nowrap;font-size:12px;line-height:20px}.xoziZG_accountHint{color:var(--dsw-alias-label-tertiary);margin:0;padding:0 12px 12px;font-size:12px;line-height:18px}.xoziZG_creditBlock{border-top:.5px solid var(--dsw-alias-border-l2);padding:12px}.xoziZG_balanceRow{flex-wrap:wrap;align-items:baseline;gap:6px;display:flex}.xoziZG_balance{color:var(--dsw-alias-label-primary);letter-spacing:-.02em;font-variant-numeric:tabular-nums;font-size:28px;font-weight:600;line-height:34px}.xoziZG_balanceUnit{color:var(--dsw-alias-label-secondary);font-size:12px}.xoziZG_balanceMeta{color:var(--dsw-alias-label-tertiary);margin-left:2px;font-size:12px}.xoziZG_updated{color:var(--dsw-alias-label-tertiary);font-variant-numeric:tabular-nums;margin-left:auto;font-size:12px}.xoziZG_creditRows{flex-direction:column;gap:4px;margin-top:8px;display:flex}.xoziZG_creditRow{color:var(--dsw-alias-label-secondary);font-variant-numeric:tabular-nums;justify-content:space-between;align-items:baseline;gap:12px;font-size:12px;line-height:18px;display:flex}.xoziZG_usageBar{background:var(--dsw-alias-border-l2);border-radius:2px;height:4px;margin-top:4px;display:block;overflow:hidden}.xoziZG_usageFill{background:var(--dsw-alias-brand-primary);border-radius:2px;height:100%;transition:width .2s;display:block}.xoziZG_expiryRow{margin-top:2px}.xoziZG_expiryLabel{color:var(--dsw-alias-state-warn-label)}.xoziZG_bar{background:var(--dsw-alias-bg-layer-3);border-radius:2px;height:4px;margin-top:6px;display:block;overflow:hidden}.xoziZG_barFill{background:var(--dsw-alias-state-warn-primary);border-radius:2px;height:100%;display:block}.xoziZG_creditLink{margin-top:8px;display:inline-block}.xoziZG_creditFooter{border-top:.5px solid var(--dsw-alias-border-l2);justify-content:space-between;align-items:center;gap:8px;margin-top:12px;padding-top:10px;display:flex}.xoziZG_creditHint{color:var(--dsw-alias-label-tertiary);margin:8px 0 0;font-size:12px;line-height:18px}.xoziZG_section{margin-top:16px}.xoziZG_sectionHead{justify-content:space-between;align-items:baseline;gap:12px;display:flex}.xoziZG_sectionLabel{color:var(--dsw-alias-label-tertiary);font-size:11px;font-weight:500}.xoziZG_count{color:var(--dsw-alias-label-secondary);font-variant-numeric:tabular-nums;flex:none;font-size:12px}.xoziZG_hint{color:var(--dsw-alias-label-secondary);margin:8px 0 0;font-size:13px;line-height:20px}.xoziZG_error{color:var(--dsw-alias-state-error-primary);margin:10px 0 0;font-size:13px;line-height:20px}.xoziZG_actions{flex-wrap:wrap;align-items:center;gap:8px;margin-top:12px;display:flex}.xoziZG_danger{color:var(--dsw-alias-state-error-primary)}.xoziZG_link{appearance:none;color:var(--dsw-alias-brand-text);font:inherit;text-align:left;word-break:break-all;cursor:pointer;background:0 0;border:none;padding:0;font-size:12px}.xoziZG_link:hover{text-decoration:underline}.xoziZG_choices{flex-direction:column;gap:2px;margin-top:8px;display:flex}.xoziZG_choiceRow{border-radius:var(--dsw-radius-sm);align-items:center;gap:8px;margin:0 -6px;padding:5px 6px;display:flex}.xoziZG_choiceRow:hover{background:var(--dsw-alias-interactive-bg-hover)}.xoziZG_statGrid{grid-template-columns:repeat(3,minmax(0,1fr));gap:8px;margin:10px 0 14px;display:grid}.xoziZG_statCard{border:.5px solid var(--dsw-alias-border-l3);border-radius:var(--dsw-radius-md);flex-direction:column;gap:1px;padding:8px 10px;display:flex}.xoziZG_statLabel{color:var(--dsw-alias-label-tertiary);font-size:11px;line-height:16px}.xoziZG_statValue{color:var(--dsw-alias-label-primary);font-variant-numeric:tabular-nums;font-size:15px;line-height:20px}.xoziZG_statSub{color:var(--dsw-alias-label-tertiary);font-variant-numeric:tabular-nums;font-size:11px;line-height:16px}.xoziZG_modelChart{flex-direction:column;gap:2px;margin-top:8px;display:flex}.xoziZG_modelRow{font-variant-numeric:tabular-nums;border-radius:6px;grid-template-columns:minmax(0,1.2fr) minmax(48px,1fr) 56px 52px 64px;align-items:center;gap:8px;padding:4px 0;display:grid;position:relative}.xoziZG_modelRow:hover{background:var(--dsw-alias-interactive-bg-hover)}.xoziZG_usageTip{z-index:5;border:.5px solid var(--dsw-alias-border-l3);border-radius:var(--dsw-radius-md);background:var(--dsw-alias-bg-layer-3);min-width:180px;max-width:260px;color:var(--dsw-alias-label-secondary);text-align:left;font-variant-numeric:tabular-nums;pointer-events:none;padding:8px 10px;font-size:12px;line-height:1.9;position:absolute;bottom:calc(100% + 6px);right:0;box-shadow:0 10px 28px #00000073}.xoziZG_usageTip[data-float=true]{z-index:40;position:fixed;bottom:auto;right:auto}.xoziZG_usageTipName{max-width:240px;color:var(--dsw-alias-label-primary);text-overflow:ellipsis;white-space:nowrap;overflow:hidden}.xoziZG_usageTipSep{background:var(--dsw-alias-border-l2);height:1px;margin:4px 0}.xoziZG_usageTipRow{justify-content:space-between;gap:24px;display:flex}.xoziZG_usageTipRow span:last-child{color:var(--dsw-alias-label-primary);font-weight:600}.xoziZG_modelName{color:var(--dsw-alias-label-primary);text-overflow:ellipsis;white-space:nowrap;font-size:12px;line-height:18px;overflow:hidden}.xoziZG_modelTrack{background:var(--dsw-alias-border-l2);border-radius:4px;height:8px;display:block;overflow:hidden}.xoziZG_modelFill{background:var(--dsw-alias-brand-primary);border-radius:4px;height:100%;transition:width .16s;display:block}.xoziZG_modelTokens,.xoziZG_modelShare,.xoziZG_modelRequests{color:var(--dsw-alias-label-secondary);text-align:right;white-space:nowrap;font-size:11px;line-height:16px}.xoziZG_modelRequests{color:var(--dsw-alias-label-tertiary)}.xoziZG_heatGrid{grid-template-columns:repeat(7,minmax(0,1fr));gap:4px;margin:8px 0 2px;display:grid}.xoziZG_heatWeekday{color:var(--dsw-alias-label-tertiary);text-align:center;font-size:10px;line-height:14px}.xoziZG_heatCell{background:color-mix(in srgb, var(--dsw-alias-label-primary) 6%, transparent);height:36px;color:var(--dsw-alias-label-tertiary);font-variant-numeric:tabular-nums;border:0;border-radius:8px;outline:0;justify-content:center;align-items:center;font-size:12px;transition:background .12s ease-out;display:flex}.xoziZG_heatCell[data-tone=empty]{color:var(--dsw-alias-label-tertiary)}.xoziZG_heatCell[data-tone=pad]{background:0 0}.xoziZG_heatCell[data-tone=out]{color:var(--dsw-alias-label-tertiary);opacity:.45;background:0 0}.xoziZG_heatCell[data-tone=lv1]{color:#0f1115;background:#ddf4e7}.xoziZG_heatCell[data-tone=lv2]{color:#0f1115;background:#b3e8cc}.xoziZG_heatCell[data-tone=lv3]{color:#0f1115;background:#7dd8ac}.xoziZG_heatCell[data-tone=lv4]{color:#fff;background:#40c584}.xoziZG_heatCell[data-tone=lv5]{color:#fff;background:#16a34a}.xoziZG_heatCell[data-today=true]{font-weight:700;box-shadow:inset 0 -2px}.xoziZG_heatHours{grid-template-columns:repeat(24,minmax(0,1fr));gap:3px;margin:8px 0 0;display:grid}.xoziZG_heatHourCell{background:color-mix(in srgb, var(--dsw-alias-label-primary) 6%, transparent);border-radius:4px;height:26px;transition:background .12s ease-out}.xoziZG_heatHourCell[data-tone=lv1]{background:#ddf4e7}.xoziZG_heatHourCell[data-tone=lv2]{background:#b3e8cc}.xoziZG_heatHourCell[data-tone=lv3]{background:#7dd8ac}.xoziZG_heatHourCell[data-tone=lv4]{background:#40c584}.xoziZG_heatHourCell[data-tone=lv5]{background:#16a34a}.xoziZG_heatAxis{color:var(--dsw-alias-label-tertiary);font-variant-numeric:tabular-nums;grid-template-columns:repeat(24,minmax(0,1fr));gap:3px;font-size:10px;line-height:14px;display:grid}.xoziZG_heatAxisSlot{text-align:center;white-space:nowrap;overflow:hidden}.xoziZG_heatLegend{color:var(--dsw-alias-label-tertiary);justify-content:flex-start;align-items:center;gap:3px;margin:0 0 6px;font-size:10px;display:flex}.xoziZG_heatLegendChip{border-radius:3px;width:10px;height:10px}.xoziZG_heatLegendChip[data-tone=lv1]{background:#ddf4e7}.xoziZG_heatLegendChip[data-tone=lv2]{background:#b3e8cc}.xoziZG_heatLegendChip[data-tone=lv3]{background:#7dd8ac}.xoziZG_heatLegendChip[data-tone=lv4]{background:#40c584}.xoziZG_heatLegendChip[data-tone=lv5]{background:#16a34a}.xoziZG_trendTip{color:var(--dsw-alias-label-secondary);font-variant-numeric:tabular-nums;margin:2px 0 0;font-size:11px;line-height:16px}.xoziZG_check{flex:1;min-width:0}.xoziZG_check>span{text-overflow:ellipsis;white-space:nowrap;overflow:hidden}.xoziZG_manual{border:.5px solid var(--dsw-alias-border-l3);border-radius:var(--dsw-radius-md);margin-top:12px;padding:0 12px}.xoziZG_manual[open]{padding-bottom:12px}.xoziZG_manualSummary{color:var(--dsw-alias-label-secondary);cursor:pointer;align-items:center;gap:6px;padding:9px 0;font-size:13px;list-style:none;display:flex}.xoziZG_manualSummary::-webkit-details-marker{display:none}.xoziZG_field{flex-direction:column;gap:5px;margin-top:10px;display:flex}.xoziZG_fieldLabel{color:var(--dsw-alias-label-tertiary);font-size:12px}.xoziZG_area{box-sizing:border-box;resize:vertical;border:.5px solid var(--dsw-alias-border-l4);border-radius:var(--dsw-radius-md);background:var(--dsw-alias-bg-layer-1);width:100%;color:var(--dsw-alias-label-primary);padding:6px 8px;font-family:ui-monospace,SFMono-Regular,Menlo,Consolas,monospace;font-size:13px;line-height:20px}.xoziZG_area::placeholder{color:var(--dsw-alias-label-dimmed)}.xoziZG_area:focus{border-color:var(--dsw-alias-state-business-primary);outline:none}.xoziZG_skeleton{flex-direction:column;gap:10px;padding:4px 0;display:flex}.xoziZG_skeletonRow{border-radius:var(--dsw-radius-sm,4px);background:var(--dsw-alias-border-l2);height:12px;animation:1.4s ease-in-out infinite xoziZG_skeletonBreath}.xoziZG_skeletonRow:nth-child(2){width:72%}.xoziZG_skeletonRow:nth-child(3){width:46%}@keyframes xoziZG_skeletonBreath{0%,to{opacity:.45}50%{opacity:.9}}@media (prefers-reduced-motion:reduce){.xoziZG_skeletonRow{animation:none}}.xoziZG_modelSpec{color:var(--dsw-alias-label-tertiary);white-space:nowrap;font-variant-numeric:tabular-nums;font-size:11px;line-height:16px}.xoziZG_doctorList{flex-direction:column;gap:2px;margin-top:8px;display:flex}.xoziZG_doctorRow{align-items:center;gap:8px;padding:4px 0;display:flex}.xoziZG_doctorName{color:var(--dsw-alias-label-secondary);flex:none;font-size:12px;line-height:18px}.xoziZG_doctorRow .xoziZG_meta{text-overflow:ellipsis;white-space:nowrap;overflow:hidden}";
|
|
81
|
+
const css$1 = ".xoziZG_card{border:.5px solid var(--dsw-alias-settings-card-stroke);border-radius:var(--dsw-radius-lg);background:var(--dsw-alias-settings-card-fill);box-sizing:border-box;width:100%;max-width:none}.xoziZG_header{align-items:flex-start;gap:12px;padding:14px 16px;display:flex}.xoziZG_headText{flex-direction:column;flex:1;gap:6px;min-width:0;display:flex}.xoziZG_name{color:var(--dsw-alias-label-primary);font-size:15px;font-weight:600;line-height:22px}.xoziZG_desc{color:var(--dsw-alias-label-tertiary);font-size:13px;line-height:20px}.xoziZG_statusLine{color:var(--dsw-alias-label-primary);align-items:center;gap:6px;font-size:14px;font-weight:500;line-height:22px;display:inline-flex}.xoziZG_meta{color:var(--dsw-alias-label-tertiary);font-variant-numeric:tabular-nums;font-size:12px;line-height:18px}.xoziZG_body{border-top:.5px solid var(--dsw-alias-border-l2);margin:0 16px;padding:4px 0 16px}.xoziZG_tabs{margin-top:12px}.xoziZG_tabPanel{padding-top:2px}.xoziZG_accountToolbar{gap:8px;margin-top:12px;display:flex}.xoziZG_accountToolbar>*{flex:1}.xoziZG_manualForm{border:.5px solid var(--dsw-alias-border-l3);border-radius:var(--dsw-radius-md);margin-top:12px;padding:12px}.xoziZG_accountCard{flex-direction:column;gap:10px;margin-top:12px;display:flex}.xoziZG_accountEntry{border:.5px solid var(--dsw-alias-border-l2);border-radius:var(--dsw-radius-md);background:var(--dsw-alias-bg-layer-2)}.xoziZG_accountRow{align-items:center;gap:10px;padding:12px;display:flex}.xoziZG_claimAllRow{border-top:.5px solid var(--dsw-alias-border-l2);justify-content:flex-end;padding:10px 12px 0;display:flex}.xoziZG_avatar{background:var(--dsw-alias-bg-layer-3);width:32px;height:32px;color:var(--dsw-alias-label-primary);border-radius:50%;flex:none;justify-content:center;align-items:center;font-size:14px;font-weight:600;display:inline-flex}.xoziZG_accountInfo{flex-direction:column;flex:1;gap:2px;min-width:0;display:flex}.xoziZG_accountNameRow{align-items:center;gap:6px;min-width:0;display:flex}.xoziZG_accountName{color:var(--dsw-alias-label-primary);text-overflow:ellipsis;white-space:nowrap;font-size:14px;font-weight:600;line-height:20px;overflow:hidden}.xoziZG_accountRowActions{flex-wrap:wrap;flex:none;justify-content:flex-end;align-items:center;gap:6px;display:flex}.xoziZG_accountToggle{align-items:center;gap:6px;display:inline-flex}.xoziZG_accountToggleLabel{color:var(--dsw-alias-label-secondary);white-space:nowrap;font-size:12px;line-height:20px}.xoziZG_accountHint{color:var(--dsw-alias-label-tertiary);margin:0;padding:0 12px 12px;font-size:12px;line-height:18px}.xoziZG_creditBlock{border-top:.5px solid var(--dsw-alias-border-l2);padding:12px}.xoziZG_balanceRow{flex-wrap:wrap;align-items:baseline;gap:6px;display:flex}.xoziZG_balance{color:var(--dsw-alias-label-primary);letter-spacing:-.02em;font-variant-numeric:tabular-nums;font-size:28px;font-weight:600;line-height:34px}.xoziZG_balanceUnit{color:var(--dsw-alias-label-secondary);font-size:12px}.xoziZG_balanceMeta{color:var(--dsw-alias-label-tertiary);margin-left:2px;font-size:12px}.xoziZG_updated{color:var(--dsw-alias-label-tertiary);font-variant-numeric:tabular-nums;margin-left:auto;font-size:12px}.xoziZG_creditRows{flex-direction:column;gap:4px;margin-top:8px;display:flex}.xoziZG_creditRow{color:var(--dsw-alias-label-secondary);font-variant-numeric:tabular-nums;justify-content:space-between;align-items:baseline;gap:12px;font-size:12px;line-height:18px;display:flex}.xoziZG_usageBar{background:var(--dsw-alias-border-l2);border-radius:2px;height:4px;margin-top:4px;display:block;overflow:hidden}.xoziZG_usageFill{background:var(--dsw-alias-brand-primary);border-radius:2px;height:100%;transition:width .2s;display:block}.xoziZG_expiryRow{margin-top:2px}.xoziZG_expiryLabel{color:var(--dsw-alias-state-warn-label)}.xoziZG_bar{background:var(--dsw-alias-bg-layer-3);border-radius:2px;height:4px;margin-top:6px;display:block;overflow:hidden}.xoziZG_barFill{background:var(--dsw-alias-state-warn-primary);border-radius:2px;height:100%;display:block}.xoziZG_creditLink{margin-top:8px;display:inline-block}.xoziZG_creditFooter{border-top:.5px solid var(--dsw-alias-border-l2);justify-content:space-between;align-items:center;gap:8px;margin-top:12px;padding-top:10px;display:flex}.xoziZG_creditHint{color:var(--dsw-alias-label-tertiary);margin:8px 0 0;font-size:12px;line-height:18px}.xoziZG_section{margin-top:16px}.xoziZG_sectionHead{justify-content:space-between;align-items:baseline;gap:12px;display:flex}.xoziZG_sectionLabel{color:var(--dsw-alias-label-tertiary);font-size:11px;font-weight:500}.xoziZG_count{color:var(--dsw-alias-label-secondary);font-variant-numeric:tabular-nums;flex:none;font-size:12px}.xoziZG_hint{color:var(--dsw-alias-label-secondary);margin:8px 0 0;font-size:13px;line-height:20px}.xoziZG_error{color:var(--dsw-alias-state-error-primary);margin:10px 0 0;font-size:13px;line-height:20px}.xoziZG_actions{flex-wrap:wrap;align-items:center;gap:8px;margin-top:12px;display:flex}.xoziZG_danger{color:var(--dsw-alias-state-error-primary)}.xoziZG_link{appearance:none;color:var(--dsw-alias-brand-text);font:inherit;text-align:left;word-break:break-all;cursor:pointer;background:0 0;border:none;padding:0;font-size:12px}.xoziZG_link:hover{text-decoration:underline}.xoziZG_choices{flex-direction:column;gap:2px;margin-top:8px;display:flex}.xoziZG_choiceRow{border-radius:var(--dsw-radius-sm);align-items:center;gap:8px;margin:0 -6px;padding:5px 6px;display:flex}.xoziZG_choiceRow:hover{background:var(--dsw-alias-interactive-bg-hover)}.xoziZG_statGrid{grid-template-columns:repeat(3,minmax(0,1fr));gap:8px;margin:10px 0 14px;display:grid}.xoziZG_statCard{border:.5px solid var(--dsw-alias-border-l3);border-radius:var(--dsw-radius-md);flex-direction:column;gap:1px;padding:8px 10px;display:flex}.xoziZG_statLabel{color:var(--dsw-alias-label-tertiary);font-size:11px;line-height:16px}.xoziZG_statValue{color:var(--dsw-alias-label-primary);font-variant-numeric:tabular-nums;font-size:15px;line-height:20px}.xoziZG_statSub{color:var(--dsw-alias-label-tertiary);font-variant-numeric:tabular-nums;font-size:11px;line-height:16px}.xoziZG_modelChart{flex-direction:column;gap:2px;margin-top:8px;display:flex}.xoziZG_modelRow{font-variant-numeric:tabular-nums;border-radius:6px;grid-template-columns:minmax(0,1.2fr) minmax(48px,1fr) 56px 52px 64px;align-items:center;gap:8px;padding:4px 0;display:grid;position:relative}.xoziZG_modelRow:hover{background:var(--dsw-alias-interactive-bg-hover)}.xoziZG_usageTip{z-index:5;border:.5px solid var(--dsw-alias-border-l3);border-radius:var(--dsw-radius-md);background:var(--dsw-alias-bg-layer-3);min-width:180px;max-width:260px;color:var(--dsw-alias-label-secondary);text-align:left;font-variant-numeric:tabular-nums;pointer-events:none;padding:8px 10px;font-size:12px;line-height:1.9;position:absolute;bottom:calc(100% + 6px);right:0;box-shadow:0 10px 28px #00000073}.xoziZG_usageTip[data-float=true]{z-index:40;position:fixed;bottom:auto;right:auto}.xoziZG_usageTipName{max-width:240px;color:var(--dsw-alias-label-primary);text-overflow:ellipsis;white-space:nowrap;overflow:hidden}.xoziZG_usageTipSep{background:var(--dsw-alias-border-l2);height:1px;margin:4px 0}.xoziZG_usageTipRow{justify-content:space-between;gap:24px;display:flex}.xoziZG_usageTipRow span:last-child{color:var(--dsw-alias-label-primary);font-weight:600}.xoziZG_modelName{color:var(--dsw-alias-label-primary);text-overflow:ellipsis;white-space:nowrap;font-size:12px;line-height:18px;overflow:hidden}.xoziZG_modelTrack{background:var(--dsw-alias-border-l2);border-radius:4px;height:8px;display:block;overflow:hidden}.xoziZG_modelFill{background:var(--dsw-alias-brand-primary);border-radius:4px;height:100%;transition:width .16s;display:block}.xoziZG_modelTokens,.xoziZG_modelShare,.xoziZG_modelRequests{color:var(--dsw-alias-label-secondary);text-align:right;white-space:nowrap;font-size:11px;line-height:16px}.xoziZG_modelRequests{color:var(--dsw-alias-label-tertiary)}.xoziZG_heatGrid{grid-template-columns:repeat(7,minmax(0,1fr));gap:4px;margin:8px 0 2px;display:grid}.xoziZG_heatWeekday{color:var(--dsw-alias-label-tertiary);text-align:center;font-size:10px;line-height:14px}.xoziZG_heatCell{background:color-mix(in srgb, var(--dsw-alias-label-primary) 6%, transparent);height:36px;color:var(--dsw-alias-label-tertiary);font-variant-numeric:tabular-nums;border:0;border-radius:8px;outline:0;justify-content:center;align-items:center;font-size:12px;transition:background .12s ease-out;display:flex}.xoziZG_heatCell[data-tone=empty]{color:var(--dsw-alias-label-tertiary)}.xoziZG_heatCell[data-tone=pad]{background:0 0}.xoziZG_heatCell[data-tone=out]{color:var(--dsw-alias-label-tertiary);opacity:.45;background:0 0}.xoziZG_heatCell[data-tone=lv1]{color:#0f1115;background:#ddf4e7}.xoziZG_heatCell[data-tone=lv2]{color:#0f1115;background:#b3e8cc}.xoziZG_heatCell[data-tone=lv3]{color:#0f1115;background:#7dd8ac}.xoziZG_heatCell[data-tone=lv4]{color:#fff;background:#40c584}.xoziZG_heatCell[data-tone=lv5]{color:#fff;background:#16a34a}.xoziZG_heatCell[data-today=true]{box-shadow:inset 0 -2px 0 0 var(--heat-today-mark,#16a34a);font-weight:700}.xoziZG_heatCell[data-today=true][data-tone=lv4],.xoziZG_heatCell[data-today=true][data-tone=lv5]{--heat-today-mark:#fff}.xoziZG_heatHours{grid-template-columns:repeat(24,minmax(0,1fr));gap:3px;margin:8px 0 0;display:grid}.xoziZG_heatHourCell{background:color-mix(in srgb, var(--dsw-alias-label-primary) 6%, transparent);border-radius:4px;height:26px;transition:background .12s ease-out}.xoziZG_heatHourCell[data-tone=lv1]{background:#ddf4e7}.xoziZG_heatHourCell[data-tone=lv2]{background:#b3e8cc}.xoziZG_heatHourCell[data-tone=lv3]{background:#7dd8ac}.xoziZG_heatHourCell[data-tone=lv4]{background:#40c584}.xoziZG_heatHourCell[data-tone=lv5]{background:#16a34a}.xoziZG_heatAxis{color:var(--dsw-alias-label-tertiary);font-variant-numeric:tabular-nums;grid-template-columns:repeat(24,minmax(0,1fr));gap:3px;font-size:10px;line-height:14px;display:grid}.xoziZG_heatAxisSlot{text-align:center;white-space:nowrap;overflow:hidden}.xoziZG_heatLegend{color:var(--dsw-alias-label-tertiary);justify-content:flex-start;align-items:center;gap:3px;margin:0 0 6px;font-size:10px;display:flex}.xoziZG_heatLegendChip{border-radius:3px;width:10px;height:10px}.xoziZG_heatLegendChip[data-tone=lv1]{background:#ddf4e7}.xoziZG_heatLegendChip[data-tone=lv2]{background:#b3e8cc}.xoziZG_heatLegendChip[data-tone=lv3]{background:#7dd8ac}.xoziZG_heatLegendChip[data-tone=lv4]{background:#40c584}.xoziZG_heatLegendChip[data-tone=lv5]{background:#16a34a}.xoziZG_trendTip{color:var(--dsw-alias-label-secondary);font-variant-numeric:tabular-nums;margin:2px 0 0;font-size:11px;line-height:16px}.xoziZG_check{flex:1;min-width:0}.xoziZG_check>span{text-overflow:ellipsis;white-space:nowrap;overflow:hidden}.xoziZG_manual{border:.5px solid var(--dsw-alias-border-l3);border-radius:var(--dsw-radius-md);margin-top:12px;padding:0 12px}.xoziZG_manual[open]{padding-bottom:12px}.xoziZG_manualSummary{color:var(--dsw-alias-label-secondary);cursor:pointer;align-items:center;gap:6px;padding:9px 0;font-size:13px;list-style:none;display:flex}.xoziZG_manualSummary::-webkit-details-marker{display:none}.xoziZG_field{flex-direction:column;gap:5px;margin-top:10px;display:flex}.xoziZG_fieldLabel{color:var(--dsw-alias-label-tertiary);font-size:12px}.xoziZG_area{box-sizing:border-box;resize:vertical;border:.5px solid var(--dsw-alias-border-l4);border-radius:var(--dsw-radius-md);background:var(--dsw-alias-bg-layer-1);width:100%;color:var(--dsw-alias-label-primary);padding:6px 8px;font-family:ui-monospace,SFMono-Regular,Menlo,Consolas,monospace;font-size:13px;line-height:20px}.xoziZG_area::placeholder{color:var(--dsw-alias-label-dimmed)}.xoziZG_area:focus{border-color:var(--dsw-alias-state-business-primary);outline:none}.xoziZG_skeleton{flex-direction:column;gap:10px;padding:4px 0;display:flex}.xoziZG_skeletonRow{border-radius:var(--dsw-radius-sm,4px);background:var(--dsw-alias-border-l2);height:12px;animation:1.4s ease-in-out infinite xoziZG_skeletonBreath}.xoziZG_skeletonRow:nth-child(2){width:72%}.xoziZG_skeletonRow:nth-child(3){width:46%}@keyframes xoziZG_skeletonBreath{0%,to{opacity:.45}50%{opacity:.9}}@media (prefers-reduced-motion:reduce){.xoziZG_skeletonRow{animation:none}}.xoziZG_modelSpec{color:var(--dsw-alias-label-tertiary);white-space:nowrap;font-variant-numeric:tabular-nums;font-size:11px;line-height:16px}.xoziZG_doctorList{flex-direction:column;gap:2px;margin-top:8px;display:flex}.xoziZG_doctorRow{align-items:center;gap:8px;padding:4px 0;display:flex}.xoziZG_doctorName{color:var(--dsw-alias-label-secondary);flex:none;font-size:12px;line-height:18px}.xoziZG_doctorRow .xoziZG_meta{text-overflow:ellipsis;white-space:nowrap;overflow:hidden}";
|
|
66
82
|
const tagId$1 = "dsh-codearts/CodeArtsPluginCard.module.css";
|
|
67
83
|
if (typeof document !== "undefined" && document.querySelector("style[data-plugin-css=" + JSON.stringify(tagId$1) + "]") === null) {
|
|
68
84
|
const tag = document.createElement("style");
|
|
@@ -72,98 +88,98 @@ if (typeof document !== "undefined" && document.querySelector("style[data-plugin
|
|
|
72
88
|
document.head.appendChild(tag);
|
|
73
89
|
}
|
|
74
90
|
var CodeArtsPluginCard_module_css_default = {
|
|
75
|
-
"
|
|
76
|
-
"
|
|
77
|
-
"
|
|
91
|
+
"header": "xoziZG_header",
|
|
92
|
+
"accountToggle": "xoziZG_accountToggle",
|
|
93
|
+
"modelChart": "xoziZG_modelChart",
|
|
94
|
+
"modelShare": "xoziZG_modelShare",
|
|
95
|
+
"choiceRow": "xoziZG_choiceRow",
|
|
96
|
+
"heatHourCell": "xoziZG_heatHourCell",
|
|
97
|
+
"accountInfo": "xoziZG_accountInfo",
|
|
98
|
+
"heatHours": "xoziZG_heatHours",
|
|
99
|
+
"headText": "xoziZG_headText",
|
|
100
|
+
"usageBar": "xoziZG_usageBar",
|
|
101
|
+
"bar": "xoziZG_bar",
|
|
102
|
+
"count": "xoziZG_count",
|
|
103
|
+
"avatar": "xoziZG_avatar",
|
|
104
|
+
"statSub": "xoziZG_statSub",
|
|
78
105
|
"heatLegendChip": "xoziZG_heatLegendChip",
|
|
106
|
+
"statusLine": "xoziZG_statusLine",
|
|
107
|
+
"accountRowActions": "xoziZG_accountRowActions",
|
|
108
|
+
"expiryLabel": "xoziZG_expiryLabel",
|
|
109
|
+
"desc": "xoziZG_desc",
|
|
110
|
+
"body": "xoziZG_body",
|
|
111
|
+
"updated": "xoziZG_updated",
|
|
79
112
|
"usageTipRow": "xoziZG_usageTipRow",
|
|
113
|
+
"heatWeekday": "xoziZG_heatWeekday",
|
|
114
|
+
"doctorRow": "xoziZG_doctorRow",
|
|
115
|
+
"manualForm": "xoziZG_manualForm",
|
|
116
|
+
"heatLegend": "xoziZG_heatLegend",
|
|
117
|
+
"creditLink": "xoziZG_creditLink",
|
|
80
118
|
"heatAxisSlot": "xoziZG_heatAxisSlot",
|
|
81
|
-
"
|
|
82
|
-
"heatGrid": "xoziZG_heatGrid",
|
|
83
|
-
"sectionLabel": "xoziZG_sectionLabel",
|
|
84
|
-
"actions": "xoziZG_actions",
|
|
85
|
-
"modelTrack": "xoziZG_modelTrack",
|
|
86
|
-
"body": "xoziZG_body",
|
|
87
|
-
"claimAllRow": "xoziZG_claimAllRow",
|
|
88
|
-
"creditBlock": "xoziZG_creditBlock",
|
|
89
|
-
"avatar": "xoziZG_avatar",
|
|
90
|
-
"expiryLabel": "xoziZG_expiryLabel",
|
|
91
|
-
"creditRows": "xoziZG_creditRows",
|
|
92
|
-
"statSub": "xoziZG_statSub",
|
|
93
|
-
"usageBar": "xoziZG_usageBar",
|
|
119
|
+
"skeletonRow": "xoziZG_skeletonRow",
|
|
94
120
|
"link": "xoziZG_link",
|
|
95
|
-
"
|
|
96
|
-
"
|
|
121
|
+
"creditRows": "xoziZG_creditRows",
|
|
122
|
+
"accountName": "xoziZG_accountName",
|
|
123
|
+
"section": "xoziZG_section",
|
|
124
|
+
"tabPanel": "xoziZG_tabPanel",
|
|
125
|
+
"accountToggleLabel": "xoziZG_accountToggleLabel",
|
|
126
|
+
"creditRow": "xoziZG_creditRow",
|
|
127
|
+
"creditFooter": "xoziZG_creditFooter",
|
|
128
|
+
"creditHint": "xoziZG_creditHint",
|
|
129
|
+
"usageTip": "xoziZG_usageTip",
|
|
97
130
|
"modelFill": "xoziZG_modelFill",
|
|
98
|
-
"
|
|
131
|
+
"doctorName": "xoziZG_doctorName",
|
|
132
|
+
"accountCard": "xoziZG_accountCard",
|
|
133
|
+
"accountRow": "xoziZG_accountRow",
|
|
134
|
+
"tabs": "xoziZG_tabs",
|
|
135
|
+
"modelSpec": "xoziZG_modelSpec",
|
|
136
|
+
"sectionHead": "xoziZG_sectionHead",
|
|
137
|
+
"statValue": "xoziZG_statValue",
|
|
138
|
+
"statLabel": "xoziZG_statLabel",
|
|
99
139
|
"trendTip": "xoziZG_trendTip",
|
|
100
|
-
"skeleton": "xoziZG_skeleton",
|
|
101
|
-
"skeletonRow": "xoziZG_skeletonRow",
|
|
102
|
-
"section": "xoziZG_section",
|
|
103
140
|
"doctorList": "xoziZG_doctorList",
|
|
104
|
-
"
|
|
141
|
+
"usageFill": "xoziZG_usageFill",
|
|
142
|
+
"heatCell": "xoziZG_heatCell",
|
|
105
143
|
"balanceUnit": "xoziZG_balanceUnit",
|
|
144
|
+
"meta": "xoziZG_meta",
|
|
106
145
|
"name": "xoziZG_name",
|
|
107
|
-
"
|
|
108
|
-
"check": "xoziZG_check",
|
|
109
|
-
"accountRow": "xoziZG_accountRow",
|
|
110
|
-
"manualSummary": "xoziZG_manualSummary",
|
|
111
|
-
"skeletonBreath": "xoziZG_skeletonBreath",
|
|
112
|
-
"manual": "xoziZG_manual",
|
|
113
|
-
"accountToggle": "xoziZG_accountToggle",
|
|
114
|
-
"usageTipName": "xoziZG_usageTipName",
|
|
115
|
-
"modelShare": "xoziZG_modelShare",
|
|
146
|
+
"claimAllRow": "xoziZG_claimAllRow",
|
|
116
147
|
"choices": "xoziZG_choices",
|
|
117
|
-
"
|
|
118
|
-
"
|
|
119
|
-
"
|
|
120
|
-
"
|
|
121
|
-
"
|
|
122
|
-
"accountHint": "xoziZG_accountHint",
|
|
123
|
-
"creditHint": "xoziZG_creditHint",
|
|
148
|
+
"modelRow": "xoziZG_modelRow",
|
|
149
|
+
"statCard": "xoziZG_statCard",
|
|
150
|
+
"balanceRow": "xoziZG_balanceRow",
|
|
151
|
+
"heatAxis": "xoziZG_heatAxis",
|
|
152
|
+
"usageTipName": "xoziZG_usageTipName",
|
|
124
153
|
"card": "xoziZG_card",
|
|
125
|
-
"
|
|
126
|
-
"
|
|
127
|
-
"
|
|
154
|
+
"accountEntry": "xoziZG_accountEntry",
|
|
155
|
+
"balanceMeta": "xoziZG_balanceMeta",
|
|
156
|
+
"error": "xoziZG_error",
|
|
128
157
|
"usageTipSep": "xoziZG_usageTipSep",
|
|
158
|
+
"hint": "xoziZG_hint",
|
|
129
159
|
"modelName": "xoziZG_modelName",
|
|
130
|
-
"
|
|
131
|
-
"
|
|
132
|
-
"
|
|
133
|
-
"accountCard": "xoziZG_accountCard",
|
|
134
|
-
"field": "xoziZG_field",
|
|
135
|
-
"accountInfo": "xoziZG_accountInfo",
|
|
136
|
-
"creditLink": "xoziZG_creditLink",
|
|
137
|
-
"count": "xoziZG_count",
|
|
160
|
+
"creditBlock": "xoziZG_creditBlock",
|
|
161
|
+
"modelTrack": "xoziZG_modelTrack",
|
|
162
|
+
"modelTokens": "xoziZG_modelTokens",
|
|
138
163
|
"modelRequests": "xoziZG_modelRequests",
|
|
139
|
-
"
|
|
140
|
-
"
|
|
141
|
-
"
|
|
142
|
-
"balanceMeta": "xoziZG_balanceMeta",
|
|
143
|
-
"usageTip": "xoziZG_usageTip",
|
|
144
|
-
"heatAxis": "xoziZG_heatAxis",
|
|
145
|
-
"choiceRow": "xoziZG_choiceRow",
|
|
146
|
-
"accountToggleLabel": "xoziZG_accountToggleLabel",
|
|
164
|
+
"manualSummary": "xoziZG_manualSummary",
|
|
165
|
+
"field": "xoziZG_field",
|
|
166
|
+
"skeletonBreath": "xoziZG_skeletonBreath",
|
|
147
167
|
"area": "xoziZG_area",
|
|
148
|
-
"
|
|
149
|
-
"
|
|
150
|
-
"
|
|
151
|
-
"
|
|
152
|
-
"statusLine": "xoziZG_statusLine",
|
|
153
|
-
"bar": "xoziZG_bar",
|
|
154
|
-
"headText": "xoziZG_headText",
|
|
155
|
-
"hint": "xoziZG_hint",
|
|
156
|
-
"desc": "xoziZG_desc",
|
|
157
|
-
"usageFill": "xoziZG_usageFill",
|
|
168
|
+
"heatGrid": "xoziZG_heatGrid",
|
|
169
|
+
"sectionLabel": "xoziZG_sectionLabel",
|
|
170
|
+
"accountToolbar": "xoziZG_accountToolbar",
|
|
171
|
+
"barFill": "xoziZG_barFill",
|
|
158
172
|
"fieldLabel": "xoziZG_fieldLabel",
|
|
159
|
-
"
|
|
160
|
-
"
|
|
161
|
-
"
|
|
162
|
-
"
|
|
163
|
-
"
|
|
164
|
-
"
|
|
165
|
-
"
|
|
166
|
-
"
|
|
173
|
+
"accountHint": "xoziZG_accountHint",
|
|
174
|
+
"actions": "xoziZG_actions",
|
|
175
|
+
"danger": "xoziZG_danger",
|
|
176
|
+
"check": "xoziZG_check",
|
|
177
|
+
"manual": "xoziZG_manual",
|
|
178
|
+
"balance": "xoziZG_balance",
|
|
179
|
+
"skeleton": "xoziZG_skeleton",
|
|
180
|
+
"accountNameRow": "xoziZG_accountNameRow",
|
|
181
|
+
"statGrid": "xoziZG_statGrid",
|
|
182
|
+
"expiryRow": "xoziZG_expiryRow"
|
|
167
183
|
};
|
|
168
184
|
//#endregion
|
|
169
185
|
//#region src/client/CodeArtsPluginCard.tsx
|
|
@@ -215,12 +231,16 @@ function claimMessagesOf(data, accountIds, t) {
|
|
|
215
231
|
}
|
|
216
232
|
/**
|
|
217
233
|
* 开关的兜底值:后端没这条路由(老版本)时按「都显示」渲染,与原有行为一致。
|
|
218
|
-
* 侧边栏那一格相反 ——
|
|
234
|
+
* 侧边栏那一格相反 —— 缺省关闭;自动领取与常驻保活也缺省关(不替用户动余额、
|
|
235
|
+
* 不替用户在系统里留后台进程)。
|
|
219
236
|
*/
|
|
220
237
|
const DOCK_DEFAULT = {
|
|
221
238
|
credits: true,
|
|
222
239
|
queue: true,
|
|
223
|
-
sidebar: false
|
|
240
|
+
sidebar: false,
|
|
241
|
+
modelDetail: true,
|
|
242
|
+
autoClaim: false,
|
|
243
|
+
keepAliveDaemon: false
|
|
224
244
|
};
|
|
225
245
|
/**
|
|
226
246
|
* 上一次读到的状态。`/api/codearts/status` 会顺带去上游拉积分(有 TTL 缓存),
|
|
@@ -900,7 +920,7 @@ function UsageSection({ usage, accounts, t }) {
|
|
|
900
920
|
}),
|
|
901
921
|
/* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", {
|
|
902
922
|
className: CodeArtsPluginCard_module_css_default.statValue,
|
|
903
|
-
children:
|
|
923
|
+
children: latencyP95Label(latency)
|
|
904
924
|
}),
|
|
905
925
|
/* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", {
|
|
906
926
|
className: CodeArtsPluginCard_module_css_default.statSub,
|
|
@@ -1015,6 +1035,10 @@ function CodeArtsPluginCard({ t }) {
|
|
|
1015
1035
|
const [dockWritable, setDockWritable] = (0, react.useState)(false);
|
|
1016
1036
|
const [dockSaving, setDockSaving] = (0, react.useState)(false);
|
|
1017
1037
|
const [dockError, setDockError] = (0, react.useState)(null);
|
|
1038
|
+
/** 「结束守护进程」按钮在飞,防止连点。 */
|
|
1039
|
+
const [keeperStopping, setKeeperStopping] = (0, react.useState)(false);
|
|
1040
|
+
/** 结束按钮的结果/失败原因(成功也留一句,让用户知道进程真没了)。 */
|
|
1041
|
+
const [keeperNotice, setKeeperNotice] = (0, react.useState)(null);
|
|
1018
1042
|
/**
|
|
1019
1043
|
* 首次读取状态的三态。为什么要单独记:`status === null` 只说明「还没读到」,
|
|
1020
1044
|
* 直接按它画就会先闪一下「未登录」,等数据回来再翻成「已登录」—— 看起来像
|
|
@@ -1084,6 +1108,40 @@ function CodeArtsPluginCard({ t }) {
|
|
|
1084
1108
|
}
|
|
1085
1109
|
}
|
|
1086
1110
|
/**
|
|
1111
|
+
* 结束守护进程。
|
|
1112
|
+
*
|
|
1113
|
+
* 服务端在kill之后**顺手把开关写成 false**(见 web-status.ts 的 keeperStopHandler):
|
|
1114
|
+
* 只杀进程不改开关会留下「开关开着却没进程」的矛盾状态,插件下次启动还会把它拉起来。
|
|
1115
|
+
* 这里拿响应里的 `dock` 直接覆盖本地状态,不等下一轮 refreshDock —— 否则按钮点完
|
|
1116
|
+
* 界面上开关还亮着,用户会以为没生效。
|
|
1117
|
+
*/
|
|
1118
|
+
async function stopKeeper() {
|
|
1119
|
+
setKeeperStopping(true);
|
|
1120
|
+
setKeeperNotice(null);
|
|
1121
|
+
try {
|
|
1122
|
+
const res = await fetch("/api/codearts/keeper/stop", {
|
|
1123
|
+
method: "POST",
|
|
1124
|
+
headers: {
|
|
1125
|
+
"Content-Type": "application/json",
|
|
1126
|
+
Accept: "application/json"
|
|
1127
|
+
},
|
|
1128
|
+
body: "{}"
|
|
1129
|
+
});
|
|
1130
|
+
const data = await res.json().catch(() => ({}));
|
|
1131
|
+
if (data.dock !== void 0) setDock({
|
|
1132
|
+
...DOCK_DEFAULT,
|
|
1133
|
+
...data.dock
|
|
1134
|
+
});
|
|
1135
|
+
if (!res.ok || data.ok === false) setKeeperNotice(t("displayKeeperStopFailed", { message: data.reason ?? data.error ?? `HTTP ${res.status}` }));
|
|
1136
|
+
else setKeeperNotice(t("displayKeeperStopped"));
|
|
1137
|
+
} catch (error) {
|
|
1138
|
+
setKeeperNotice(t("displayKeeperStopFailed", { message: error instanceof Error ? error.message : String(error) }));
|
|
1139
|
+
} finally {
|
|
1140
|
+
setKeeperStopping(false);
|
|
1141
|
+
await Promise.all([refreshDock(), refresh()]);
|
|
1142
|
+
}
|
|
1143
|
+
}
|
|
1144
|
+
/**
|
|
1087
1145
|
* 领每日签到积分。给 id 就只领那个号,不给就逐个号都领一遍。
|
|
1088
1146
|
*
|
|
1089
1147
|
* 除了这一次刚领成,「今天已领」都来自上游的福利活动状态(积分快照里的 welfare),
|
|
@@ -1920,33 +1978,125 @@ function CodeArtsPluginCard({ t }) {
|
|
|
1920
1978
|
}),
|
|
1921
1979
|
/* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", {
|
|
1922
1980
|
className: CodeArtsPluginCard_module_css_default.choices,
|
|
1923
|
-
children: [
|
|
1981
|
+
children: [
|
|
1982
|
+
/* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", {
|
|
1983
|
+
className: CodeArtsPluginCard_module_css_default.choiceRow,
|
|
1984
|
+
children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(_deepseek_ai_dsh_client_ui_primitives.Checkbox, {
|
|
1985
|
+
className: CodeArtsPluginCard_module_css_default.check,
|
|
1986
|
+
checked: dock.credits,
|
|
1987
|
+
disabled: !dockWritable || dockSaving,
|
|
1988
|
+
onChange: (on) => void toggleDock("credits", on),
|
|
1989
|
+
label: t("displayCreditsToggle")
|
|
1990
|
+
})
|
|
1991
|
+
}),
|
|
1992
|
+
/* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", {
|
|
1993
|
+
className: CodeArtsPluginCard_module_css_default.choiceRow,
|
|
1994
|
+
children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(_deepseek_ai_dsh_client_ui_primitives.Checkbox, {
|
|
1995
|
+
className: CodeArtsPluginCard_module_css_default.check,
|
|
1996
|
+
checked: dock.queue,
|
|
1997
|
+
disabled: !dockWritable || dockSaving,
|
|
1998
|
+
onChange: (on) => void toggleDock("queue", on),
|
|
1999
|
+
label: t("displayQueueToggle")
|
|
2000
|
+
})
|
|
2001
|
+
}),
|
|
2002
|
+
/* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", {
|
|
2003
|
+
className: CodeArtsPluginCard_module_css_default.choiceRow,
|
|
2004
|
+
children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(_deepseek_ai_dsh_client_ui_primitives.Checkbox, {
|
|
2005
|
+
className: CodeArtsPluginCard_module_css_default.check,
|
|
2006
|
+
checked: dock.modelDetail,
|
|
2007
|
+
disabled: !dockWritable || dockSaving,
|
|
2008
|
+
onChange: (on) => void toggleDock("modelDetail", on),
|
|
2009
|
+
label: t("displayModelDetailToggle")
|
|
2010
|
+
})
|
|
2011
|
+
})
|
|
2012
|
+
]
|
|
2013
|
+
}),
|
|
2014
|
+
!dockWritable && /* @__PURE__ */ (0, react_jsx_runtime.jsx)("p", {
|
|
2015
|
+
className: CodeArtsPluginCard_module_css_default.hint,
|
|
2016
|
+
children: t("displayNotWritable")
|
|
2017
|
+
}),
|
|
2018
|
+
dockError !== null && /* @__PURE__ */ (0, react_jsx_runtime.jsx)("p", {
|
|
2019
|
+
className: CodeArtsPluginCard_module_css_default.error,
|
|
2020
|
+
children: t("displayFailed", { message: dockError })
|
|
2021
|
+
})
|
|
2022
|
+
]
|
|
2023
|
+
}),
|
|
2024
|
+
/* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", {
|
|
2025
|
+
className: CodeArtsPluginCard_module_css_default.section,
|
|
2026
|
+
children: [
|
|
2027
|
+
/* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", {
|
|
2028
|
+
className: CodeArtsPluginCard_module_css_default.sectionHead,
|
|
2029
|
+
children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", {
|
|
2030
|
+
className: CodeArtsPluginCard_module_css_default.sectionLabel,
|
|
2031
|
+
children: t("displayAutoClaimTitle")
|
|
2032
|
+
})
|
|
2033
|
+
}),
|
|
2034
|
+
/* @__PURE__ */ (0, react_jsx_runtime.jsx)("p", {
|
|
2035
|
+
className: CodeArtsPluginCard_module_css_default.hint,
|
|
2036
|
+
children: t("displayAutoClaimHint")
|
|
2037
|
+
}),
|
|
2038
|
+
/* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", {
|
|
2039
|
+
className: CodeArtsPluginCard_module_css_default.choices,
|
|
2040
|
+
children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", {
|
|
1924
2041
|
className: CodeArtsPluginCard_module_css_default.choiceRow,
|
|
1925
2042
|
children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(_deepseek_ai_dsh_client_ui_primitives.Checkbox, {
|
|
1926
2043
|
className: CodeArtsPluginCard_module_css_default.check,
|
|
1927
|
-
checked: dock.
|
|
2044
|
+
checked: dock.autoClaim,
|
|
1928
2045
|
disabled: !dockWritable || dockSaving,
|
|
1929
|
-
onChange: (on) => void toggleDock("
|
|
1930
|
-
label: t("
|
|
2046
|
+
onChange: (on) => void toggleDock("autoClaim", on),
|
|
2047
|
+
label: t("displayAutoClaimToggle")
|
|
1931
2048
|
})
|
|
1932
|
-
})
|
|
2049
|
+
})
|
|
2050
|
+
})
|
|
2051
|
+
]
|
|
2052
|
+
}),
|
|
2053
|
+
/* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", {
|
|
2054
|
+
className: CodeArtsPluginCard_module_css_default.section,
|
|
2055
|
+
children: [
|
|
2056
|
+
/* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", {
|
|
2057
|
+
className: CodeArtsPluginCard_module_css_default.sectionHead,
|
|
2058
|
+
children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", {
|
|
2059
|
+
className: CodeArtsPluginCard_module_css_default.sectionLabel,
|
|
2060
|
+
children: t("displayKeeperTitle")
|
|
2061
|
+
}), dock.keepAliveDaemon && /* @__PURE__ */ (0, react_jsx_runtime.jsx)(_deepseek_ai_dsh_client_ui_primitives.Button, {
|
|
2062
|
+
variant: "outline",
|
|
2063
|
+
size: "sm",
|
|
2064
|
+
disabled: keeperStopping,
|
|
2065
|
+
onClick: () => void stopKeeper(),
|
|
2066
|
+
children: keeperStopping ? t("displayKeeperStopping") : t("displayKeeperStop")
|
|
2067
|
+
})]
|
|
2068
|
+
}),
|
|
2069
|
+
/* @__PURE__ */ (0, react_jsx_runtime.jsx)("p", {
|
|
2070
|
+
className: CodeArtsPluginCard_module_css_default.hint,
|
|
2071
|
+
children: t("displayKeeperHint")
|
|
2072
|
+
}),
|
|
2073
|
+
/* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", {
|
|
2074
|
+
className: CodeArtsPluginCard_module_css_default.choices,
|
|
2075
|
+
children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", {
|
|
1933
2076
|
className: CodeArtsPluginCard_module_css_default.choiceRow,
|
|
1934
2077
|
children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(_deepseek_ai_dsh_client_ui_primitives.Checkbox, {
|
|
1935
2078
|
className: CodeArtsPluginCard_module_css_default.check,
|
|
1936
|
-
checked: dock.
|
|
2079
|
+
checked: dock.keepAliveDaemon,
|
|
1937
2080
|
disabled: !dockWritable || dockSaving,
|
|
1938
|
-
onChange: (on) => void toggleDock("
|
|
1939
|
-
label: t("
|
|
2081
|
+
onChange: (on) => void toggleDock("keepAliveDaemon", on),
|
|
2082
|
+
label: t("displayKeeperToggle")
|
|
1940
2083
|
})
|
|
1941
|
-
})
|
|
2084
|
+
})
|
|
1942
2085
|
}),
|
|
1943
|
-
|
|
2086
|
+
dock.keepAliveDaemon && /* @__PURE__ */ (0, react_jsx_runtime.jsx)("p", {
|
|
1944
2087
|
className: CodeArtsPluginCard_module_css_default.hint,
|
|
1945
|
-
children: t("
|
|
2088
|
+
children: status?.keeper?.alive === true ? t("displayKeeperRunning", {
|
|
2089
|
+
pid: status.keeper.pid ?? "?",
|
|
2090
|
+
time: formatStored(status.keeper.heartbeatAt)
|
|
2091
|
+
}) : status?.keeper?.starting === true ? t("displayKeeperStarting") : t("displayKeeperDown", { message: status?.keeper?.error ?? "" })
|
|
1946
2092
|
}),
|
|
1947
|
-
|
|
1948
|
-
className: CodeArtsPluginCard_module_css_default.
|
|
1949
|
-
children:
|
|
2093
|
+
keeperNotice !== null && /* @__PURE__ */ (0, react_jsx_runtime.jsx)("p", {
|
|
2094
|
+
className: CodeArtsPluginCard_module_css_default.hint,
|
|
2095
|
+
children: keeperNotice
|
|
2096
|
+
}),
|
|
2097
|
+
status?.keeper?.logPath !== void 0 && dock.keepAliveDaemon && /* @__PURE__ */ (0, react_jsx_runtime.jsx)("p", {
|
|
2098
|
+
className: CodeArtsPluginCard_module_css_default.hint,
|
|
2099
|
+
children: t("displayKeeperLog", { path: status.keeper.logPath })
|
|
1950
2100
|
})
|
|
1951
2101
|
]
|
|
1952
2102
|
}),
|
|
@@ -2082,16 +2232,35 @@ function CodeArtsPluginCard({ t }) {
|
|
|
2082
2232
|
})]
|
|
2083
2233
|
});
|
|
2084
2234
|
}
|
|
2235
|
+
BigInt("0xFFFFFFFF00000000FFFFFFFFFFFFFFFFBCE6FAADA7179E84F3B9CAC2FC632551") >> 1n;
|
|
2236
|
+
new TextEncoder();
|
|
2237
|
+
//#endregion
|
|
2238
|
+
//#region src/web-status.ts
|
|
2239
|
+
/**
|
|
2240
|
+
* 开关的默认值:没有 settings provider(或老配置没这两个键)时保持原有行为 ——
|
|
2241
|
+
* 底部两行都显示;侧边栏相反,缺省不开(那一格是所有插件共用的全局座位)。
|
|
2242
|
+
* `modelDetail` 缺省开(保持老版本的样子),`autoClaim` 缺省关。
|
|
2243
|
+
*/
|
|
2244
|
+
const DEFAULT_DOCK_FLAGS = {
|
|
2245
|
+
credits: true,
|
|
2246
|
+
queue: true,
|
|
2247
|
+
sidebar: false,
|
|
2248
|
+
modelDetail: true,
|
|
2249
|
+
autoClaim: false,
|
|
2250
|
+
keepAliveDaemon: false
|
|
2251
|
+
};
|
|
2085
2252
|
//#endregion
|
|
2086
2253
|
//#region src/client/dock-line.ts
|
|
2087
2254
|
/** 段分隔符 —— 与邻居插件一致,改这里等于改整行的样子。 */
|
|
2088
2255
|
const DOCK_SEGMENT_SEPARATOR = " · ";
|
|
2089
|
-
function buildDockLine(parts, t) {
|
|
2256
|
+
function buildDockLine(parts, t, showModelDetail = true) {
|
|
2090
2257
|
const rest = [];
|
|
2091
2258
|
rest.push(t("dockProvider", { provider: parts.provider }));
|
|
2092
|
-
|
|
2093
|
-
|
|
2094
|
-
|
|
2259
|
+
if (showModelDetail) {
|
|
2260
|
+
rest.push(parts.model === void 0 ? t("dockNoModel") : t("dockModel", { model: parts.model }));
|
|
2261
|
+
if (parts.ratio !== void 0) rest.push(parts.ratio);
|
|
2262
|
+
if (parts.queue !== void 0) rest.push(parts.queue);
|
|
2263
|
+
}
|
|
2095
2264
|
return {
|
|
2096
2265
|
...parts.credits === void 0 ? {} : { credits: parts.credits },
|
|
2097
2266
|
rest: rest.join(DOCK_SEGMENT_SEPARATOR)
|
|
@@ -2317,11 +2486,7 @@ function CodeArtsCreditDock({ useProjection, t, zone = "dock" }) {
|
|
|
2317
2486
|
* 名字用 `stripModelSuffixes` 剥掉尾巴,倍率直接用服务端算好的 `ratio`。
|
|
2318
2487
|
*/
|
|
2319
2488
|
const [modelInfo, setModelInfo] = (0, react.useState)({});
|
|
2320
|
-
const [flags, setFlags] = (0, react.useState)(
|
|
2321
|
-
credits: true,
|
|
2322
|
-
queue: true,
|
|
2323
|
-
sidebar: false
|
|
2324
|
-
});
|
|
2489
|
+
const [flags, setFlags] = (0, react.useState)(DEFAULT_DOCK_FLAGS);
|
|
2325
2490
|
const [queued, setQueued] = (0, react.useState)(null);
|
|
2326
2491
|
const [anchor, setAnchor] = (0, react.useState)(null);
|
|
2327
2492
|
/**
|
|
@@ -2354,11 +2519,7 @@ function CodeArtsCreditDock({ useProjection, t, zone = "dock" }) {
|
|
|
2354
2519
|
if (!res.ok) return;
|
|
2355
2520
|
const data = await res.json().catch(() => void 0);
|
|
2356
2521
|
if (data === void 0 || !mounted.current) return;
|
|
2357
|
-
setFlags(data.dock ??
|
|
2358
|
-
credits: true,
|
|
2359
|
-
queue: true,
|
|
2360
|
-
sidebar: false
|
|
2361
|
-
});
|
|
2522
|
+
setFlags(data.dock ?? DEFAULT_DOCK_FLAGS);
|
|
2362
2523
|
setRows(rowsOf(data));
|
|
2363
2524
|
setModelInfo(Object.fromEntries((data.models ?? []).map((model) => [model.id, {
|
|
2364
2525
|
name: model.name,
|
|
@@ -2481,7 +2642,7 @@ function CodeArtsCreditDock({ useProjection, t, zone = "dock" }) {
|
|
|
2481
2642
|
...modelLabel === "" ? {} : { model: modelLabel },
|
|
2482
2643
|
...ratio === void 0 ? {} : { ratio },
|
|
2483
2644
|
...zone === "dock" && showQueue && queued !== null ? { queue: t("queueDock", { position: queued.position }) } : {}
|
|
2484
|
-
}, t);
|
|
2645
|
+
}, t, flags.modelDetail !== false);
|
|
2485
2646
|
const fetchedAt = rows.reduce((latest, row) => Math.max(latest, row.fetchedAt ?? 0), 0);
|
|
2486
2647
|
const lastUpdated = fetchedAt > 0 ? formatClock(fetchedAt) : "";
|
|
2487
2648
|
const toggle = (event) => {
|
|
@@ -2666,7 +2827,7 @@ function CodeArtsCreditDock({ useProjection, t, zone = "dock" }) {
|
|
|
2666
2827
|
}
|
|
2667
2828
|
//#endregion
|
|
2668
2829
|
//#region \0dsh-css:/home/runner/work/dsh-codearts/dsh-codearts/src/client/CodeArtsPanel.module.css.mjs
|
|
2669
|
-
const css = ".Z66cgG_page{box-sizing:border-box;height:100%;min-height:0;padding:calc(28px + var(--dsh-frame-top-clearance,0px)) clamp(
|
|
2830
|
+
const css = ".Z66cgG_page{box-sizing:border-box;height:100%;min-height:0;padding:calc(28px + var(--dsh-frame-top-clearance,0px)) clamp(16px, 2vw, 24px) 48px;color:var(--dsw-alias-label-primary);flex-direction:column;display:flex;overflow:auto}.Z66cgG_head{flex-direction:column;gap:6px;width:100%;margin:0;display:flex}.Z66cgG_back{appearance:none;font:inherit;cursor:pointer;border:1px solid var(--dsw-alias-border-l2);border-radius:var(--dsw-radius-md);background:var(--dsw-alias-bg-layer-1);color:var(--dsw-alias-label-secondary);align-self:flex-start;align-items:center;gap:6px;margin-bottom:10px;padding:5px 12px;font-size:13px;line-height:20px;display:inline-flex}.Z66cgG_back:hover{background:var(--dsw-alias-interactive-bg-hover);color:var(--dsw-alias-label-primary)}.Z66cgG_backCaret{border-bottom:1.6px solid;border-left:1.6px solid;width:7px;height:7px;display:inline-block;transform:rotate(45deg)}.Z66cgG_title{margin:0;font-size:20px;font-weight:600;line-height:1.4}.Z66cgG_desc{color:var(--dsw-alias-label-tertiary);margin:0;font-size:13px;line-height:1.5}.Z66cgG_body{width:100%;margin:20px 0 0}.Z66cgG_body>div{width:100%;max-width:none}.Z66cgG_icon{flex:none;display:block}";
|
|
2670
2831
|
const tagId = "dsh-codearts/CodeArtsPanel.module.css";
|
|
2671
2832
|
if (typeof document !== "undefined" && document.querySelector("style[data-plugin-css=" + JSON.stringify(tagId) + "]") === null) {
|
|
2672
2833
|
const tag = document.createElement("style");
|
|
@@ -2676,14 +2837,14 @@ if (typeof document !== "undefined" && document.querySelector("style[data-plugin
|
|
|
2676
2837
|
document.head.appendChild(tag);
|
|
2677
2838
|
}
|
|
2678
2839
|
var CodeArtsPanel_module_css_default = {
|
|
2679
|
-
"
|
|
2680
|
-
"
|
|
2840
|
+
"body": "Z66cgG_body",
|
|
2841
|
+
"title": "Z66cgG_title",
|
|
2681
2842
|
"back": "Z66cgG_back",
|
|
2682
2843
|
"icon": "Z66cgG_icon",
|
|
2683
|
-
"
|
|
2684
|
-
"
|
|
2844
|
+
"head": "Z66cgG_head",
|
|
2845
|
+
"desc": "Z66cgG_desc",
|
|
2685
2846
|
"page": "Z66cgG_page",
|
|
2686
|
-
"
|
|
2847
|
+
"backCaret": "Z66cgG_backCaret"
|
|
2687
2848
|
};
|
|
2688
2849
|
//#endregion
|
|
2689
2850
|
//#region src/client/CodeArtsPanel.tsx
|
|
@@ -2919,9 +3080,24 @@ const zh = {
|
|
|
2919
3080
|
dockNoModel: "未选择模型",
|
|
2920
3081
|
tabDisplay: "显示",
|
|
2921
3082
|
displayTitle: "输入框两侧显示",
|
|
2922
|
-
displayHint: "
|
|
3083
|
+
displayHint: "这几项只管输入框上下那两行显示什么,不影响任何请求。`Provider CodeArts` 是插件的身份标识,一直显示,不受开关控制;「显示模型与倍率」只收掉它右边那段(模型名、倍率、排队)。底部那条每 60 秒读一次设置,所以关掉最多要等一分钟才见效。",
|
|
2923
3084
|
displayCreditsToggle: "在输入框工具行显示剩余积分(点开可看各账号明细)",
|
|
2924
3085
|
displayQueueToggle: "显示上游排队位置",
|
|
3086
|
+
displayModelDetailToggle: "显示模型与倍率(Provider CodeArts 不受影响,始终显示)",
|
|
3087
|
+
displayAutoClaimTitle: "每日签到积分",
|
|
3088
|
+
displayAutoClaimHint: "打开后,DSH 启动约 30 秒会自动把每个已登录账号的每日签到积分领一遍;没领到会隔 30 分钟再试,最多 3 次。上游按天去重,重复领取不会出错。领取结果可以点开积分条查看。注意:这个功能只在 DSH 运行时生效,关掉 DSH 后不会替你领。",
|
|
3089
|
+
displayAutoClaimToggle: "自动领取每日签到积分(默认关闭)",
|
|
3090
|
+
displayKeeperTitle: "常驻保活(DSH 关掉后仍续登录)",
|
|
3091
|
+
displayKeeperHint: "上游给的登录凭证只活 2 小时,但要靠它换新的登录凭证(refresh token),那个能活 30 天。打开这一项后,DSH 会在系统里另起一个独立的后台进程,每 20 分钟替你续一次——所以哪怕 DSH 关着、好几天不开,回来也不用重新登录。这个进程不随 DSH 退出,要用下面的「结束」按钮手动停。默认关闭:不经你同意就在系统里留一个常驻进程不合适。",
|
|
3092
|
+
displayKeeperToggle: "开启常驻保活进程(默认关闭)",
|
|
3093
|
+
displayKeeperRunning: "后台进程运行中 · PID {pid} · 最近心跳 {time}",
|
|
3094
|
+
displayKeeperStarting: "后台进程正在启动……稍等几秒刷新这一页。",
|
|
3095
|
+
displayKeeperDown: "后台进程没有在跑(可能被你结束或启动失败),保活开关已关闭。{message}",
|
|
3096
|
+
displayKeeperStop: "结束进程",
|
|
3097
|
+
displayKeeperStopping: "正在结束……",
|
|
3098
|
+
displayKeeperStopped: "后台进程已结束,保活开关已同时关闭。",
|
|
3099
|
+
displayKeeperStopFailed: "结束失败:{message}",
|
|
3100
|
+
displayKeeperLog: "进程日志:{path}",
|
|
2925
3101
|
displayNotWritable: "这个宿主没给插件开配置存储,开关只能看不能改。",
|
|
2926
3102
|
displayFailed: "保存失败:{message}",
|
|
2927
3103
|
displaySidebarTitle: "侧边栏图标",
|
|
@@ -3105,9 +3281,24 @@ const en = {
|
|
|
3105
3281
|
dockNoModel: "No model selected",
|
|
3106
3282
|
tabDisplay: "Display",
|
|
3107
3283
|
displayTitle: "Around the chat input box",
|
|
3108
|
-
displayHint: "These two
|
|
3284
|
+
displayHint: "These only change what the two lines around the input box show; nothing here touches a request. \"Provider CodeArts\" identifies the plugin and always shows. \"Model and rate\" hides only the part to its right (model name, rate, queue). The bar re-reads settings every 60 seconds, so a change can take up to a minute.",
|
|
3109
3285
|
displayCreditsToggle: "Show remaining credits in the composer tool row (click for per-account details)",
|
|
3110
3286
|
displayQueueToggle: "Show the upstream queue position",
|
|
3287
|
+
displayModelDetailToggle: "Show the model and rate (Provider CodeArts is not affected and always shows)",
|
|
3288
|
+
displayAutoClaimTitle: "Daily sign-in credits",
|
|
3289
|
+
displayAutoClaimHint: "When on, about 30 seconds after DSH starts the plugin claims the daily sign-in credits for every signed-in account; if nothing was claimed it retries after 30 minutes, up to 3 times. Upstream deduplicates by day, so claiming twice is harmless. Open the credits bar to see the result. Note: this only runs while DSH is running — it cannot claim for you once DSH is closed.",
|
|
3290
|
+
displayAutoClaimToggle: "Claim daily sign-in credits automatically (off by default)",
|
|
3291
|
+
displayKeeperTitle: "Keep-alive process (stays signed in while DSH is closed)",
|
|
3292
|
+
displayKeeperHint: "The login token upstream hands out only lives 2 hours, but the refresh token behind it lives 30 days. With this on, DSH starts a separate background process that refreshes the credential every 20 minutes — so even after DSH has been closed for days, you come back without signing in again. That process outlives DSH; stop it with the button below. Off by default: leaving a resident process on your machine without asking is not something a plugin should do.",
|
|
3293
|
+
displayKeeperToggle: "Run the keep-alive background process (off by default)",
|
|
3294
|
+
displayKeeperRunning: "Background process running · PID {pid} · last heartbeat {time}",
|
|
3295
|
+
displayKeeperStarting: "The background process is starting… refresh this page in a few seconds.",
|
|
3296
|
+
displayKeeperDown: "The background process is not running (stopped by you, or it failed to start); the keep-alive switch has been turned off. {message}",
|
|
3297
|
+
displayKeeperStop: "Stop process",
|
|
3298
|
+
displayKeeperStopping: "Stopping…",
|
|
3299
|
+
displayKeeperStopped: "Background process stopped and the keep-alive switch turned off.",
|
|
3300
|
+
displayKeeperStopFailed: "Failed to stop: {message}",
|
|
3301
|
+
displayKeeperLog: "Process log: {path}",
|
|
3111
3302
|
displayNotWritable: "This host gives the plugin nowhere to persist settings, so the switches are read-only.",
|
|
3112
3303
|
displayFailed: "Failed to save: {message}",
|
|
3113
3304
|
displaySidebarTitle: "Sidebar icon",
|