dsh-lowtide 0.3.0 → 0.3.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/cordis.patch.yml +47 -47
- package/lib/client.js +1570 -1428
- package/lib/client.js.map +1 -1
- package/lib/index.js +154 -20
- package/lib/types/client/better-sidebar.d.ts +67 -0
- package/lib/types/client/components/QueueDock.d.ts +9 -1
- package/lib/types/client/i18n.d.ts +1 -0
- package/lib/types/client/store.d.ts +6 -0
- package/lib/types/src/turns.d.ts +54 -0
- package/package.json +1 -1
package/lib/client.js
CHANGED
|
@@ -75,6 +75,7 @@ window.__ModuleLoader__.load({
|
|
|
75
75
|
"dock.disconnected": "闲时服务连接中…",
|
|
76
76
|
"dock.retry": "重试",
|
|
77
77
|
"dock.title": "闲时队列 {count} 项",
|
|
78
|
+
"dock.tabTitle": "闲时队列",
|
|
78
79
|
"dock.pending": "{count} 待裁定",
|
|
79
80
|
"pill.queued": "项待办",
|
|
80
81
|
"dock.report": "执行报告",
|
|
@@ -408,6 +409,7 @@ window.__ModuleLoader__.load({
|
|
|
408
409
|
"dock.disconnected": "Reconnecting…",
|
|
409
410
|
"dock.retry": "Retry",
|
|
410
411
|
"dock.title": "Off-peak queue {count}",
|
|
412
|
+
"dock.tabTitle": "Off-peak queue",
|
|
411
413
|
"dock.pending": "{count} to review",
|
|
412
414
|
"pill.queued": "pending",
|
|
413
415
|
"dock.report": "Report",
|
|
@@ -712,6 +714,13 @@ window.__ModuleLoader__.load({
|
|
|
712
714
|
"settings.exportHint": "Copy the window & price config (JSON) as a backup for later restore."
|
|
713
715
|
}
|
|
714
716
|
};
|
|
717
|
+
/** Simple template fill for standalone use (settings label thunks etc.). */
|
|
718
|
+
function fill(template, params) {
|
|
719
|
+
if (params === void 0) return template;
|
|
720
|
+
let out = template;
|
|
721
|
+
for (const [key, value] of Object.entries(params)) out = out.replaceAll(`{${key}}`, String(value));
|
|
722
|
+
return out;
|
|
723
|
+
}
|
|
715
724
|
//#endregion
|
|
716
725
|
//#region client/lib/icons.tsx
|
|
717
726
|
/**
|
|
@@ -774,8 +783,8 @@ window.__ModuleLoader__.load({
|
|
|
774
783
|
return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(Resolved, { ...rest });
|
|
775
784
|
}
|
|
776
785
|
//#endregion
|
|
777
|
-
//#region \0dsh-css:
|
|
778
|
-
const css$13 = ".
|
|
786
|
+
//#region \0dsh-css:C:\Users\胡克劳\lowtide\work\pr8-review\packages\dsh-lowtide\client\components\atoms.module.css.mjs
|
|
787
|
+
const css$13 = ".BLNmbq_money,.BLNmbq_countdown{font-family:var(--ds-font-family-code);font-variant-numeric:tabular-nums;font-size:inherit;line-height:inherit}.BLNmbq_modelBadge{border:1px solid var(--dsw-alias-border-l3);color:var(--dsw-alias-label-secondary);font-family:var(--ds-font-family-code);white-space:nowrap;border-radius:4px;flex:none;align-items:center;gap:2px;padding:1px 6px;font-size:11px;line-height:16px;display:inline-flex}.BLNmbq_modelBadgeUnknown{border-color:var(--dsw-alias-state-warn-primary);color:var(--dsw-alias-state-warn-primary)}.BLNmbq_modelBadgeQ{font-weight:600}";
|
|
779
788
|
const tagId$13 = "dsh-lowtide/atoms.module.css";
|
|
780
789
|
if (typeof document !== "undefined" && document.querySelector("style[data-plugin-css=" + JSON.stringify(tagId$13) + "]") === null) {
|
|
781
790
|
const tag = document.createElement("style");
|
|
@@ -785,11 +794,11 @@ window.__ModuleLoader__.load({
|
|
|
785
794
|
document.head.appendChild(tag);
|
|
786
795
|
}
|
|
787
796
|
var atoms_module_css_default = {
|
|
788
|
-
"
|
|
789
|
-
"
|
|
790
|
-
"countdown": "
|
|
791
|
-
"modelBadgeUnknown": "
|
|
792
|
-
"modelBadgeQ": "
|
|
797
|
+
"modelBadge": "BLNmbq_modelBadge",
|
|
798
|
+
"money": "BLNmbq_money",
|
|
799
|
+
"countdown": "BLNmbq_countdown",
|
|
800
|
+
"modelBadgeUnknown": "BLNmbq_modelBadgeUnknown",
|
|
801
|
+
"modelBadgeQ": "BLNmbq_modelBadgeQ"
|
|
793
802
|
};
|
|
794
803
|
//#endregion
|
|
795
804
|
//#region client/components/atoms.tsx
|
|
@@ -1879,6 +1888,7 @@ window.__ModuleLoader__.load({
|
|
|
1879
1888
|
connected: false,
|
|
1880
1889
|
error: null,
|
|
1881
1890
|
queueOpen: false,
|
|
1891
|
+
sidebarHosted: false,
|
|
1882
1892
|
reportOpen: false,
|
|
1883
1893
|
reportHistoryOpen: false,
|
|
1884
1894
|
reportUnread: false,
|
|
@@ -1911,6 +1921,7 @@ window.__ModuleLoader__.load({
|
|
|
1911
1921
|
connected: false,
|
|
1912
1922
|
error: null,
|
|
1913
1923
|
queueOpen: false,
|
|
1924
|
+
sidebarHosted: false,
|
|
1914
1925
|
reportOpen: false,
|
|
1915
1926
|
reportHistoryOpen: false,
|
|
1916
1927
|
reportUnread: false,
|
|
@@ -2251,8 +2262,8 @@ window.__ModuleLoader__.load({
|
|
|
2251
2262
|
} catch {}
|
|
2252
2263
|
}
|
|
2253
2264
|
//#endregion
|
|
2254
|
-
//#region \0dsh-css:
|
|
2255
|
-
const css$12 = ".
|
|
2265
|
+
//#region \0dsh-css:C:\Users\胡克劳\lowtide\work\pr8-review\packages\dsh-lowtide\client\components\PriceBand.module.css.mjs
|
|
2266
|
+
const css$12 = ".CihgyW_bandWrap{flex-direction:column;gap:2px;display:flex}.CihgyW_bandAxis{justify-content:space-between;padding:0 2px;display:flex}.CihgyW_bandAxisLabel{color:var(--dsw-alias-label-tertiary);font:var(--dsw-font-xxs-12);font-variant-numeric:tabular-nums}.CihgyW_band{background:var(--dsw-alias-bg-layer-1);border:1px solid var(--dsw-alias-border-l1);border-radius:8px;gap:1px;height:32px;padding:4px;display:flex}.CihgyW_bandCell{border-radius:2px;flex:1}.CihgyW_bandPeak{background:var(--dsw-alias-state-error-primary);opacity:.85}.CihgyW_bandOff{background:var(--dsw-alias-state-success-primary);opacity:.85}.CihgyW_bandCustom{background:var(--dsw-alias-state-warn-primary);opacity:.85}.CihgyW_bandNow{outline:2px solid var(--dsw-alias-brand-primary);outline-offset:-1px}";
|
|
2256
2267
|
const tagId$12 = "dsh-lowtide/PriceBand.module.css";
|
|
2257
2268
|
if (typeof document !== "undefined" && document.querySelector("style[data-plugin-css=" + JSON.stringify(tagId$12) + "]") === null) {
|
|
2258
2269
|
const tag = document.createElement("style");
|
|
@@ -2262,15 +2273,15 @@ window.__ModuleLoader__.load({
|
|
|
2262
2273
|
document.head.appendChild(tag);
|
|
2263
2274
|
}
|
|
2264
2275
|
var PriceBand_module_css_default = {
|
|
2265
|
-
"
|
|
2266
|
-
"
|
|
2267
|
-
"
|
|
2268
|
-
"
|
|
2269
|
-
"bandAxisLabel": "
|
|
2270
|
-
"
|
|
2271
|
-
"
|
|
2272
|
-
"
|
|
2273
|
-
"
|
|
2276
|
+
"bandAxis": "CihgyW_bandAxis",
|
|
2277
|
+
"bandNow": "CihgyW_bandNow",
|
|
2278
|
+
"band": "CihgyW_band",
|
|
2279
|
+
"bandWrap": "CihgyW_bandWrap",
|
|
2280
|
+
"bandAxisLabel": "CihgyW_bandAxisLabel",
|
|
2281
|
+
"bandCell": "CihgyW_bandCell",
|
|
2282
|
+
"bandPeak": "CihgyW_bandPeak",
|
|
2283
|
+
"bandOff": "CihgyW_bandOff",
|
|
2284
|
+
"bandCustom": "CihgyW_bandCustom"
|
|
2274
2285
|
};
|
|
2275
2286
|
//#endregion
|
|
2276
2287
|
//#region client/components/PriceBand.tsx
|
|
@@ -2324,8 +2335,8 @@ window.__ModuleLoader__.load({
|
|
|
2324
2335
|
});
|
|
2325
2336
|
}
|
|
2326
2337
|
//#endregion
|
|
2327
|
-
//#region \0dsh-css:
|
|
2328
|
-
const css$11 = ".
|
|
2338
|
+
//#region \0dsh-css:C:\Users\胡克劳\lowtide\work\pr8-review\packages\dsh-lowtide\client\components\WindowEditorModal.module.css.mjs
|
|
2339
|
+
const css$11 = ".smqo0W_wide{width:min(560px,100%)}.smqo0W_body{flex-direction:column;gap:8px;display:flex}.smqo0W_tzLine{color:var(--dsw-alias-label-secondary);font:var(--dsw-font-xs-13)}.smqo0W_hint{color:var(--dsw-alias-label-tertiary);font:var(--dsw-font-xxs-12);line-height:1.5}.smqo0W_error{color:var(--dsw-alias-state-error-primary);font:var(--dsw-font-xxs-12);background:var(--dsw-alias-interactive-bg-hover);border-radius:6px;padding:6px 8px}.smqo0W_empty{color:var(--dsw-alias-label-tertiary);font:var(--dsw-font-xs-13);padding:10px 0}.smqo0W_row{align-items:center;gap:6px;display:flex}.smqo0W_input{box-sizing:border-box;background:var(--dsw-alias-bg-layer-1);border:1px solid var(--dsw-alias-border-l2);height:32px;color:var(--dsw-alias-label-primary);font-family:var(--ds-font-family-code);border-radius:8px;outline:none;padding:0 8px;font-size:13px}.smqo0W_input:focus{border-color:var(--dsw-alias-brand-primary)}.smqo0W_row select.smqo0W_input{font-family:var(--dsw-font-family);flex:0 0 96px}.smqo0W_row input.smqo0W_input{flex:1;min-width:0}.smqo0W_dash{color:var(--dsw-alias-label-tertiary)}.smqo0W_daysBadge{color:var(--dsw-alias-label-secondary);font:var(--dsw-font-xxs-12);white-space:nowrap;background:var(--dsw-alias-interactive-bg-hover);border-radius:999px;flex:none;padding:2px 8px}.smqo0W_footer{align-items:center;gap:8px;display:flex}.smqo0W_footerSpacer{flex:1}";
|
|
2329
2340
|
const tagId$11 = "dsh-lowtide/WindowEditorModal.module.css";
|
|
2330
2341
|
if (typeof document !== "undefined" && document.querySelector("style[data-plugin-css=" + JSON.stringify(tagId$11) + "]") === null) {
|
|
2331
2342
|
const tag = document.createElement("style");
|
|
@@ -2335,18 +2346,18 @@ window.__ModuleLoader__.load({
|
|
|
2335
2346
|
document.head.appendChild(tag);
|
|
2336
2347
|
}
|
|
2337
2348
|
var WindowEditorModal_module_css_default = {
|
|
2338
|
-
"
|
|
2339
|
-
"
|
|
2340
|
-
"
|
|
2341
|
-
"
|
|
2342
|
-
"
|
|
2343
|
-
"
|
|
2344
|
-
"
|
|
2345
|
-
"empty": "
|
|
2346
|
-
"
|
|
2347
|
-
"
|
|
2348
|
-
"
|
|
2349
|
-
"
|
|
2349
|
+
"hint": "smqo0W_hint",
|
|
2350
|
+
"footer": "smqo0W_footer",
|
|
2351
|
+
"footerSpacer": "smqo0W_footerSpacer",
|
|
2352
|
+
"wide": "smqo0W_wide",
|
|
2353
|
+
"row": "smqo0W_row",
|
|
2354
|
+
"dash": "smqo0W_dash",
|
|
2355
|
+
"body": "smqo0W_body",
|
|
2356
|
+
"empty": "smqo0W_empty",
|
|
2357
|
+
"daysBadge": "smqo0W_daysBadge",
|
|
2358
|
+
"tzLine": "smqo0W_tzLine",
|
|
2359
|
+
"error": "smqo0W_error",
|
|
2360
|
+
"input": "smqo0W_input"
|
|
2350
2361
|
};
|
|
2351
2362
|
//#endregion
|
|
2352
2363
|
//#region client/components/WindowEditorModal.tsx
|
|
@@ -2621,8 +2632,8 @@ window.__ModuleLoader__.load({
|
|
|
2621
2632
|
});
|
|
2622
2633
|
}
|
|
2623
2634
|
//#endregion
|
|
2624
|
-
//#region \0dsh-css:
|
|
2625
|
-
const css$10 = ".
|
|
2635
|
+
//#region \0dsh-css:C:\Users\胡克劳\lowtide\work\pr8-review\packages\dsh-lowtide\client\components\PricePill.module.css.mjs
|
|
2636
|
+
const css$10 = ".XIa1la_pill{cursor:pointer;align-items:center;gap:6px;display:inline-flex}.XIa1la_dot{display:inline-flex}.XIa1la_pillStale .XIa1la_label{color:var(--dsw-alias-label-tertiary)}.XIa1la_label{color:var(--dsw-alias-label-secondary);font:var(--dsw-font-xxs-12);font-variant-numeric:tabular-nums}.XIa1la_count{color:var(--dsw-alias-label-tertiary);font:var(--dsw-font-xxs-12);font-variant-numeric:tabular-nums}.XIa1la_queueIcon{color:var(--dsw-alias-label-tertiary)}.XIa1la_badge{background:var(--dsw-alias-state-warn-primary);border-radius:999px;width:6px;height:6px}.XIa1la_saved{color:var(--dsw-alias-state-success-primary)}";
|
|
2626
2637
|
const tagId$10 = "dsh-lowtide/PricePill.module.css";
|
|
2627
2638
|
if (typeof document !== "undefined" && document.querySelector("style[data-plugin-css=" + JSON.stringify(tagId$10) + "]") === null) {
|
|
2628
2639
|
const tag = document.createElement("style");
|
|
@@ -2632,14 +2643,14 @@ window.__ModuleLoader__.load({
|
|
|
2632
2643
|
document.head.appendChild(tag);
|
|
2633
2644
|
}
|
|
2634
2645
|
var PricePill_module_css_default = {
|
|
2635
|
-
"
|
|
2636
|
-
"
|
|
2637
|
-
"
|
|
2638
|
-
"
|
|
2639
|
-
"
|
|
2640
|
-
"
|
|
2641
|
-
"dot": "
|
|
2642
|
-
"
|
|
2646
|
+
"pillStale": "XIa1la_pillStale",
|
|
2647
|
+
"pill": "XIa1la_pill",
|
|
2648
|
+
"queueIcon": "XIa1la_queueIcon",
|
|
2649
|
+
"badge": "XIa1la_badge",
|
|
2650
|
+
"count": "XIa1la_count",
|
|
2651
|
+
"saved": "XIa1la_saved",
|
|
2652
|
+
"dot": "XIa1la_dot",
|
|
2653
|
+
"label": "XIa1la_label"
|
|
2643
2654
|
};
|
|
2644
2655
|
//#endregion
|
|
2645
2656
|
//#region client/components/PricePill.tsx
|
|
@@ -2753,9 +2764,35 @@ window.__ModuleLoader__.load({
|
|
|
2753
2764
|
})] });
|
|
2754
2765
|
}
|
|
2755
2766
|
//#endregion
|
|
2756
|
-
//#region
|
|
2757
|
-
const
|
|
2758
|
-
|
|
2767
|
+
//#region client/lib/taskMeta.ts
|
|
2768
|
+
const STATUS_KEYS = {
|
|
2769
|
+
"pending-review": "status.pending-review",
|
|
2770
|
+
queued: "status.queued",
|
|
2771
|
+
deferred: "status.deferred",
|
|
2772
|
+
dropped: "status.dropped",
|
|
2773
|
+
running: "status.running",
|
|
2774
|
+
preflight: "status.preflight",
|
|
2775
|
+
done: "status.done",
|
|
2776
|
+
failed: "status.failed",
|
|
2777
|
+
stale: "status.stale",
|
|
2778
|
+
timeout: "status.timeout",
|
|
2779
|
+
cancelled: "status.cancelled"
|
|
2780
|
+
};
|
|
2781
|
+
/** Localized status label ("待裁定" / "Queued" …). */
|
|
2782
|
+
function statusLabel(t, status) {
|
|
2783
|
+
return t(STATUS_KEYS[status] ?? status);
|
|
2784
|
+
}
|
|
2785
|
+
/** 策略标签:迭代 N 轮 / 采样 N 份 / 复核 / 单次(空)。 */
|
|
2786
|
+
function strategyLabel(t, strategy, roundsRun) {
|
|
2787
|
+
if (strategy === "iterative") return t("report.strategyIterative", { rounds: roundsRun ?? 1 });
|
|
2788
|
+
if (strategy === "sampling") return t("report.strategySampling", { count: roundsRun ?? 1 });
|
|
2789
|
+
if (strategy === "review") return t("report.strategyReview");
|
|
2790
|
+
return "";
|
|
2791
|
+
}
|
|
2792
|
+
//#endregion
|
|
2793
|
+
//#region \0dsh-css:C:\Users\胡克劳\lowtide\work\pr8-review\packages\dsh-lowtide\client\components\TaskRow.module.css.mjs
|
|
2794
|
+
const css$9 = ".IwrP0q_taskRow{border-left:2px solid #0000;border-radius:8px;align-items:center;gap:8px;min-height:36px;padding:4px 5px 4px 12px;display:flex}.IwrP0q_taskRow:hover{background:var(--dsw-alias-interactive-bg-hover)}.IwrP0q_amber{border-left-color:var(--dsw-alias-state-warn-primary)}.IwrP0q_green{border-left-color:var(--dsw-alias-state-success-primary)}.IwrP0q_blue{border-left-color:var(--dsw-alias-state-business-primary)}.IwrP0q_red{border-left-color:var(--dsw-alias-state-error-primary)}.IwrP0q_taskMain{cursor:pointer;flex-direction:column;flex:1;gap:1px;min-width:0;display:flex}.IwrP0q_taskMain:hover .IwrP0q_taskPrompt{color:var(--dsw-alias-brand-primary)}.IwrP0q_taskPrompt{color:var(--dsw-alias-label-primary);font:var(--dsw-font-s-14);white-space:nowrap;text-overflow:ellipsis;overflow:hidden}.IwrP0q_taskMeta{color:var(--dsw-alias-label-tertiary);font:var(--dsw-font-xxs-12);white-space:nowrap;text-overflow:ellipsis;overflow:hidden}.IwrP0q_rowActions{gap:2px;display:flex}.IwrP0q_iconBtn{width:28px;height:28px;color:var(--dsw-alias-label-secondary);cursor:pointer;background:0 0;border:none;border-radius:999px;font-size:13px}.IwrP0q_iconBtn:hover{background:var(--dsw-alias-interactive-bg-hover);color:var(--dsw-alias-label-primary)}.IwrP0q_iconBtn:disabled{opacity:.4;cursor:not-allowed}.IwrP0q_iconBtn:disabled:hover{color:var(--dsw-alias-label-secondary);background:0 0}.IwrP0q_confirming{color:var(--dsw-alias-state-error-primary);background:var(--dsw-alias-interactive-bg-hover);font-weight:600}.IwrP0q_confirming:hover{color:var(--dsw-alias-state-error-primary)}.IwrP0q_droppedRow{opacity:.75}.IwrP0q_droppedRow:hover{opacity:1}";
|
|
2795
|
+
const tagId$9 = "dsh-lowtide/TaskRow.module.css";
|
|
2759
2796
|
if (typeof document !== "undefined" && document.querySelector("style[data-plugin-css=" + JSON.stringify(tagId$9) + "]") === null) {
|
|
2760
2797
|
const tag = document.createElement("style");
|
|
2761
2798
|
tag.dataset.plugin = "dsh-lowtide";
|
|
@@ -2763,1006 +2800,524 @@ window.__ModuleLoader__.load({
|
|
|
2763
2800
|
tag.textContent = css$9;
|
|
2764
2801
|
document.head.appendChild(tag);
|
|
2765
2802
|
}
|
|
2766
|
-
var
|
|
2767
|
-
"
|
|
2768
|
-
"
|
|
2769
|
-
"
|
|
2770
|
-
"
|
|
2771
|
-
"
|
|
2772
|
-
"
|
|
2773
|
-
"
|
|
2774
|
-
"
|
|
2775
|
-
"
|
|
2776
|
-
"
|
|
2777
|
-
"
|
|
2778
|
-
"
|
|
2779
|
-
"pillRow": "DdBjoG_pillRow",
|
|
2780
|
-
"guidanceInput": "DdBjoG_guidanceInput",
|
|
2781
|
-
"strategyPill": "DdBjoG_strategyPill",
|
|
2782
|
-
"advancedBtn": "DdBjoG_advancedBtn",
|
|
2783
|
-
"field": "DdBjoG_field",
|
|
2784
|
-
"prompt": "DdBjoG_prompt",
|
|
2785
|
-
"warning": "DdBjoG_warning",
|
|
2786
|
-
"advancedIcon": "DdBjoG_advancedIcon",
|
|
2787
|
-
"fieldLabel": "DdBjoG_fieldLabel",
|
|
2788
|
-
"compactLabel": "DdBjoG_compactLabel",
|
|
2789
|
-
"sessionPickRow": "DdBjoG_sessionPickRow"
|
|
2803
|
+
var TaskRow_module_css_default = {
|
|
2804
|
+
"taskPrompt": "IwrP0q_taskPrompt",
|
|
2805
|
+
"green": "IwrP0q_green",
|
|
2806
|
+
"taskMain": "IwrP0q_taskMain",
|
|
2807
|
+
"taskMeta": "IwrP0q_taskMeta",
|
|
2808
|
+
"droppedRow": "IwrP0q_droppedRow",
|
|
2809
|
+
"taskRow": "IwrP0q_taskRow",
|
|
2810
|
+
"blue": "IwrP0q_blue",
|
|
2811
|
+
"amber": "IwrP0q_amber",
|
|
2812
|
+
"red": "IwrP0q_red",
|
|
2813
|
+
"rowActions": "IwrP0q_rowActions",
|
|
2814
|
+
"iconBtn": "IwrP0q_iconBtn",
|
|
2815
|
+
"confirming": "IwrP0q_confirming"
|
|
2790
2816
|
};
|
|
2791
2817
|
//#endregion
|
|
2792
|
-
//#region client/components/
|
|
2793
|
-
|
|
2794
|
-
|
|
2795
|
-
|
|
2796
|
-
|
|
2797
|
-
|
|
2798
|
-
|
|
2799
|
-
|
|
2800
|
-
|
|
2801
|
-
|
|
2802
|
-
|
|
2803
|
-
|
|
2804
|
-
};
|
|
2805
|
-
const STRATEGY_HINT_KEYS = {
|
|
2806
|
-
single: "strategy.singleHint",
|
|
2807
|
-
iterative: "strategy.iterativeHint",
|
|
2808
|
-
sampling: "strategy.samplingHint",
|
|
2809
|
-
review: "strategy.reviewHint"
|
|
2810
|
-
};
|
|
2811
|
-
const STRATEGY_HINT_LABEL_KEYS = {
|
|
2812
|
-
single: null,
|
|
2813
|
-
iterative: "modal.strategyHintIterative",
|
|
2814
|
-
sampling: "modal.strategyHintSampling",
|
|
2815
|
-
review: "modal.strategyHintReview"
|
|
2816
|
-
};
|
|
2817
|
-
const STRATEGY_HINT_PLACEHOLDER_KEYS = {
|
|
2818
|
-
single: null,
|
|
2819
|
-
iterative: "strategyHintPlaceholderIterative",
|
|
2820
|
-
sampling: "strategyHintPlaceholderSampling",
|
|
2821
|
-
review: "strategyHintPlaceholderReview"
|
|
2822
|
-
};
|
|
2823
|
-
/** Cost factor label for each strategy (displayed on the pill). */
|
|
2824
|
-
function strategyCostFactor(s, rounds) {
|
|
2825
|
-
if (s === "single") return "1×";
|
|
2826
|
-
if (s === "review") return "2×";
|
|
2827
|
-
if (s === "iterative") return `~${rounds}×`;
|
|
2828
|
-
return `${rounds}×`;
|
|
2829
|
-
}
|
|
2830
|
-
/** Pick one random option from a '|||'-delimited i18n string. */
|
|
2831
|
-
function randomPick(localized) {
|
|
2832
|
-
const options = localized.split("|||");
|
|
2833
|
-
return options[Math.floor(Math.random() * options.length)];
|
|
2834
|
-
}
|
|
2835
|
-
/** Label for a reasoning effort: the adapter's native name, or the raw id. */
|
|
2836
|
-
function reasoningLabel(effort) {
|
|
2837
|
-
return effort.name !== "" ? effort.name : effort.id;
|
|
2838
|
-
}
|
|
2839
|
-
/** Reasoning efforts to offer for a given model (fallback = standard set). */
|
|
2840
|
-
function reasoningOptions(model) {
|
|
2841
|
-
const efforts = model?.reasoningEfforts;
|
|
2842
|
-
if (efforts !== void 0 && efforts.length > 0) return [...efforts];
|
|
2843
|
-
return [
|
|
2844
|
-
"off",
|
|
2845
|
-
"low",
|
|
2846
|
-
"high",
|
|
2847
|
-
"max"
|
|
2848
|
-
].map((id) => ({
|
|
2849
|
-
id,
|
|
2850
|
-
name: id
|
|
2851
|
-
}));
|
|
2818
|
+
//#region client/components/TaskRow.tsx
|
|
2819
|
+
/**
|
|
2820
|
+
* TaskRow (Phase D split): one queue row with per-status inline actions
|
|
2821
|
+
* (✓ 批准 / ⏸ 顺延 / ✕ 放弃 / ↻ 重新执行 / 🗑 两段式删除) and a left color
|
|
2822
|
+
* bar by status. Shared by the 待执行 and 已结束 sections.
|
|
2823
|
+
*/
|
|
2824
|
+
function statusClass(status) {
|
|
2825
|
+
if (status === "pending-review" || status === "deferred" || status === "stale") return TaskRow_module_css_default.amber;
|
|
2826
|
+
if (status === "queued" || status === "done") return TaskRow_module_css_default.green;
|
|
2827
|
+
if (status === "running" || status === "preflight") return TaskRow_module_css_default.blue;
|
|
2828
|
+
if (status === "failed" || status === "timeout") return TaskRow_module_css_default.red;
|
|
2829
|
+
return "";
|
|
2852
2830
|
}
|
|
2853
|
-
/**
|
|
2854
|
-
|
|
2855
|
-
|
|
2856
|
-
|
|
2857
|
-
|
|
2858
|
-
|
|
2859
|
-
|
|
2860
|
-
|
|
2861
|
-
l2: "autonomy.l2Hint",
|
|
2862
|
-
l3: "autonomy.l3Hint"
|
|
2863
|
-
};
|
|
2864
|
-
const AUTONOMY_DESC_KEYS = {
|
|
2865
|
-
l1: "autonomy.l1Desc",
|
|
2866
|
-
l2: "autonomy.l2Desc",
|
|
2867
|
-
l3: "autonomy.l3Desc"
|
|
2868
|
-
};
|
|
2869
|
-
/** Relative "x min/h ago" label for a session's last activity; falls back
|
|
2870
|
-
* to an absolute "MM-DD HH:mm" label once the session is a day old. */
|
|
2871
|
-
function sessionTimeLabel(lastModified, t) {
|
|
2872
|
-
const diff = Date.now() - lastModified;
|
|
2873
|
-
if (diff < 6e4) return t("modal.time.justNow");
|
|
2874
|
-
if (diff < 36e5) return t("modal.time.minutesAgo", { n: Math.floor(diff / 6e4) });
|
|
2875
|
-
if (diff < 864e5) return t("modal.time.hoursAgo", { n: Math.floor(diff / 36e5) });
|
|
2876
|
-
const d = new Date(lastModified);
|
|
2877
|
-
const pad = (n) => String(n).padStart(2, "0");
|
|
2878
|
-
return `${pad(d.getMonth() + 1)}-${pad(d.getDate())} ${pad(d.getHours())}:${pad(d.getMinutes())}`;
|
|
2831
|
+
/** Icons for the per-row actions (16px outline set, currentColor). */
|
|
2832
|
+
function RowActionIcon({ kind }) {
|
|
2833
|
+
if (kind === "approve") return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(Icon, { name: "IconCheckOutline16" });
|
|
2834
|
+
if (kind === "defer") return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(Icon, { name: "IconPauseOutline16" });
|
|
2835
|
+
if (kind === "drop") return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(Icon, { name: "IconCloseOutline16" });
|
|
2836
|
+
if (kind === "retry") return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(Icon, { name: "IconRefreshOutline16" });
|
|
2837
|
+
if (kind === "edit") return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(Icon, { name: "IconEditOutline16" });
|
|
2838
|
+
return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(Icon, { name: "IconTrashOutline16" });
|
|
2879
2839
|
}
|
|
2880
|
-
function
|
|
2881
|
-
const
|
|
2882
|
-
|
|
2883
|
-
|
|
2840
|
+
function TaskRow({ task, t, onOpenDetail, onEdit }) {
|
|
2841
|
+
const pending = task.status === "pending-review";
|
|
2842
|
+
const deferred = task.status === "deferred";
|
|
2843
|
+
const locked = task.status === "running" || task.status === "preflight";
|
|
2844
|
+
const failed = task.status === "failed" || task.status === "timeout" || task.status === "stale";
|
|
2845
|
+
const editable = (pending || deferred || task.status === "queued") && !locked;
|
|
2846
|
+
const [confirming, setConfirming] = (0, react.useState)(false);
|
|
2847
|
+
async function handleDelete() {
|
|
2848
|
+
if (!confirming) {
|
|
2849
|
+
setConfirming(true);
|
|
2850
|
+
setTimeout(() => setConfirming(false), 3e3);
|
|
2851
|
+
return;
|
|
2852
|
+
}
|
|
2853
|
+
const result = await deleteTask(task.id);
|
|
2854
|
+
if (result.ok) {
|
|
2855
|
+
showToast(t("toast.deleted"));
|
|
2856
|
+
refreshNow();
|
|
2857
|
+
} else showToast(t("toast.deleteFailed", { error: result.error ?? "unknown" }));
|
|
2858
|
+
}
|
|
2859
|
+
const actions = [];
|
|
2860
|
+
if (editable && onEdit !== void 0) actions.push(/* @__PURE__ */ (0, react_jsx_runtime.jsx)("button", {
|
|
2861
|
+
type: "button",
|
|
2862
|
+
className: TaskRow_module_css_default.iconBtn,
|
|
2863
|
+
title: t("action.edit"),
|
|
2864
|
+
onClick: () => onEdit(task),
|
|
2865
|
+
children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(RowActionIcon, { kind: "edit" })
|
|
2866
|
+
}, "edit"));
|
|
2867
|
+
if (pending || deferred) actions.push(/* @__PURE__ */ (0, react_jsx_runtime.jsx)("button", {
|
|
2868
|
+
type: "button",
|
|
2869
|
+
className: TaskRow_module_css_default.iconBtn,
|
|
2870
|
+
title: t("action.approve"),
|
|
2871
|
+
onClick: () => {
|
|
2872
|
+
triage(task.id, "approve").then(refreshNow);
|
|
2873
|
+
},
|
|
2874
|
+
children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(RowActionIcon, { kind: "approve" })
|
|
2875
|
+
}, "approve"), /* @__PURE__ */ (0, react_jsx_runtime.jsx)("button", {
|
|
2876
|
+
type: "button",
|
|
2877
|
+
className: TaskRow_module_css_default.iconBtn,
|
|
2878
|
+
title: t("action.defer"),
|
|
2879
|
+
onClick: () => {
|
|
2880
|
+
triage(task.id, "defer").then(refreshNow);
|
|
2881
|
+
},
|
|
2882
|
+
children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(RowActionIcon, { kind: "defer" })
|
|
2883
|
+
}, "defer"), /* @__PURE__ */ (0, react_jsx_runtime.jsx)("button", {
|
|
2884
|
+
type: "button",
|
|
2885
|
+
className: TaskRow_module_css_default.iconBtn,
|
|
2886
|
+
title: t("action.drop"),
|
|
2887
|
+
onClick: () => {
|
|
2888
|
+
triage(task.id, "drop").then(refreshNow);
|
|
2889
|
+
},
|
|
2890
|
+
children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(RowActionIcon, { kind: "drop" })
|
|
2891
|
+
}, "drop"));
|
|
2892
|
+
if (failed) actions.push(/* @__PURE__ */ (0, react_jsx_runtime.jsx)("button", {
|
|
2893
|
+
type: "button",
|
|
2894
|
+
className: TaskRow_module_css_default.iconBtn,
|
|
2895
|
+
title: t("action.retry"),
|
|
2896
|
+
onClick: () => {
|
|
2897
|
+
retryTask(task.id).then(() => {
|
|
2898
|
+
showToast(t("toast.requeued"));
|
|
2899
|
+
refreshNow();
|
|
2900
|
+
});
|
|
2901
|
+
},
|
|
2902
|
+
children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(RowActionIcon, { kind: "retry" })
|
|
2903
|
+
}, "retry"));
|
|
2904
|
+
actions.push(/* @__PURE__ */ (0, react_jsx_runtime.jsx)("button", {
|
|
2905
|
+
type: "button",
|
|
2906
|
+
className: confirming ? `${TaskRow_module_css_default.iconBtn} ${TaskRow_module_css_default.confirming}` : TaskRow_module_css_default.iconBtn,
|
|
2907
|
+
title: confirming ? t("action.deleteConfirm") : t("action.delete"),
|
|
2908
|
+
disabled: locked,
|
|
2909
|
+
onClick: () => {
|
|
2910
|
+
handleDelete();
|
|
2911
|
+
},
|
|
2912
|
+
children: confirming ? t("action.deleteConfirmShort") : /* @__PURE__ */ (0, react_jsx_runtime.jsx)(RowActionIcon, { kind: "delete" })
|
|
2913
|
+
}, "delete"));
|
|
2914
|
+
return /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", {
|
|
2915
|
+
className: `${TaskRow_module_css_default.taskRow} ${statusClass(task.status)}`,
|
|
2884
2916
|
children: [/* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", {
|
|
2885
|
-
className:
|
|
2886
|
-
|
|
2887
|
-
|
|
2888
|
-
|
|
2889
|
-
|
|
2890
|
-
|
|
2891
|
-
|
|
2892
|
-
|
|
2893
|
-
|
|
2917
|
+
className: TaskRow_module_css_default.taskMain,
|
|
2918
|
+
onClick: () => onOpenDetail(task),
|
|
2919
|
+
children: [/* @__PURE__ */ (0, react_jsx_runtime.jsxs)("span", {
|
|
2920
|
+
className: TaskRow_module_css_default.taskPrompt,
|
|
2921
|
+
children: [task.prompt.slice(0, 60), task.prompt.length > 60 ? "…" : ""]
|
|
2922
|
+
}), /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("span", {
|
|
2923
|
+
className: TaskRow_module_css_default.taskMeta,
|
|
2924
|
+
children: [
|
|
2925
|
+
/* @__PURE__ */ (0, react_jsx_runtime.jsx)(ModelBadge, { model: task.model }),
|
|
2926
|
+
statusLabel(t, task.status),
|
|
2927
|
+
task.files.length > 0 && /* @__PURE__ */ (0, react_jsx_runtime.jsxs)(react_jsx_runtime.Fragment, { children: [" · ", t("detail.fileCount", { count: task.files.length })] }),
|
|
2928
|
+
task.lastError !== void 0 && /* @__PURE__ */ (0, react_jsx_runtime.jsxs)(react_jsx_runtime.Fragment, { children: [" · ", task.lastError] })
|
|
2929
|
+
]
|
|
2894
2930
|
})]
|
|
2895
|
-
}),
|
|
2896
|
-
className:
|
|
2897
|
-
children:
|
|
2898
|
-
name: "IconWarningOutline16",
|
|
2899
|
-
className: TaskForm_module_css_default.warningIcon
|
|
2900
|
-
}), t("intercept.workspaceWarning")]
|
|
2931
|
+
}), /* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", {
|
|
2932
|
+
className: TaskRow_module_css_default.rowActions,
|
|
2933
|
+
children: actions
|
|
2901
2934
|
})]
|
|
2902
2935
|
});
|
|
2903
|
-
const strategy = values.strategy;
|
|
2904
|
-
const showRounds = strategy === "iterative" || strategy === "sampling";
|
|
2905
|
-
const hintLabelKey = STRATEGY_HINT_LABEL_KEYS[strategy];
|
|
2906
|
-
const hintPlaceholderKey = STRATEGY_HINT_PLACEHOLDER_KEYS[strategy];
|
|
2907
|
-
const promptPlaceholder = (0, react.useMemo)(() => randomPick(t(PROMPT_PLACEHOLDER_KEYS[strategy])), [strategy, t]);
|
|
2908
|
-
const hintPlaceholder = (0, react.useMemo)(() => {
|
|
2909
|
-
const key = hintPlaceholderKey;
|
|
2910
|
-
return key !== null ? randomPick(t(key)) : "";
|
|
2911
|
-
}, [strategy, t]);
|
|
2912
|
-
return /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", {
|
|
2913
|
-
className: TaskForm_module_css_default.modal,
|
|
2914
|
-
children: [
|
|
2915
|
-
/* @__PURE__ */ (0, react_jsx_runtime.jsx)("textarea", {
|
|
2916
|
-
className: TaskForm_module_css_default.prompt,
|
|
2917
|
-
placeholder: promptPlaceholder,
|
|
2918
|
-
value: values.prompt,
|
|
2919
|
-
onChange: (e) => onChange({ prompt: e.target.value }),
|
|
2920
|
-
rows: 4,
|
|
2921
|
-
autoFocus: props.autoFocusPrompt
|
|
2922
|
-
}),
|
|
2923
|
-
/* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", {
|
|
2924
|
-
className: TaskForm_module_css_default.field,
|
|
2925
|
-
children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", {
|
|
2926
|
-
className: TaskForm_module_css_default.fieldLabel,
|
|
2927
|
-
children: t("modal.workspace")
|
|
2928
|
-
}), (() => {
|
|
2929
|
-
const ws = props.workspaces ?? [];
|
|
2930
|
-
if (ws.length > 0) {
|
|
2931
|
-
const CUSTOM = "__custom__";
|
|
2932
|
-
const isCustom = values.workspace !== "" && !ws.some((w) => w.path === values.workspace);
|
|
2933
|
-
const currentValue = isCustom ? CUSTOM : values.workspace;
|
|
2934
|
-
return /* @__PURE__ */ (0, react_jsx_runtime.jsxs)(react_jsx_runtime.Fragment, { children: [/* @__PURE__ */ (0, react_jsx_runtime.jsxs)("select", {
|
|
2935
|
-
className: TaskForm_module_css_default.fieldInput,
|
|
2936
|
-
value: currentValue,
|
|
2937
|
-
onChange: (e) => {
|
|
2938
|
-
const v = e.target.value;
|
|
2939
|
-
if (v === CUSTOM) return;
|
|
2940
|
-
onChange({ workspace: v });
|
|
2941
|
-
},
|
|
2942
|
-
children: [
|
|
2943
|
-
/* @__PURE__ */ (0, react_jsx_runtime.jsx)("option", {
|
|
2944
|
-
value: "",
|
|
2945
|
-
children: t("modal.workspaceDefault")
|
|
2946
|
-
}),
|
|
2947
|
-
ws.map((w) => /* @__PURE__ */ (0, react_jsx_runtime.jsx)("option", {
|
|
2948
|
-
value: w.path,
|
|
2949
|
-
children: w.title !== null ? `${w.title} · ${w.path}` : w.path
|
|
2950
|
-
}, w.path)),
|
|
2951
|
-
/* @__PURE__ */ (0, react_jsx_runtime.jsx)("option", {
|
|
2952
|
-
value: CUSTOM,
|
|
2953
|
-
children: t("modal.workspaceCustom")
|
|
2954
|
-
})
|
|
2955
|
-
]
|
|
2956
|
-
}), isCustom && /* @__PURE__ */ (0, react_jsx_runtime.jsx)("input", {
|
|
2957
|
-
className: TaskForm_module_css_default.fieldInput,
|
|
2958
|
-
value: values.workspace,
|
|
2959
|
-
onChange: (e) => onChange({ workspace: e.target.value }),
|
|
2960
|
-
placeholder: t("modal.workspacePlaceholder")
|
|
2961
|
-
})] });
|
|
2962
|
-
}
|
|
2963
|
-
return /* @__PURE__ */ (0, react_jsx_runtime.jsx)("input", {
|
|
2964
|
-
className: TaskForm_module_css_default.fieldInput,
|
|
2965
|
-
value: values.workspace,
|
|
2966
|
-
onChange: (e) => onChange({ workspace: e.target.value }),
|
|
2967
|
-
placeholder: t("modal.workspacePlaceholder")
|
|
2968
|
-
});
|
|
2969
|
-
})()]
|
|
2970
|
-
}),
|
|
2971
|
-
/* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", {
|
|
2972
|
-
className: TaskForm_module_css_default.field,
|
|
2973
|
-
children: [
|
|
2974
|
-
/* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", {
|
|
2975
|
-
className: TaskForm_module_css_default.fieldLabel,
|
|
2976
|
-
children: t("modal.strategy")
|
|
2977
|
-
}),
|
|
2978
|
-
/* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", {
|
|
2979
|
-
className: TaskForm_module_css_default.pillRow,
|
|
2980
|
-
children: [
|
|
2981
|
-
"single",
|
|
2982
|
-
"iterative",
|
|
2983
|
-
"sampling",
|
|
2984
|
-
"review"
|
|
2985
|
-
].map((s) => /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("span", {
|
|
2986
|
-
className: `${TaskForm_module_css_default.strategyPill} ${strategy === s ? TaskForm_module_css_default.strategyActive : ""}`,
|
|
2987
|
-
onClick: () => onChange({ strategy: s }),
|
|
2988
|
-
children: [t(STRATEGY_LABEL_KEYS[s]), /* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", {
|
|
2989
|
-
className: TaskForm_module_css_default.costTag,
|
|
2990
|
-
children: strategyCostFactor(s, values.rounds)
|
|
2991
|
-
})]
|
|
2992
|
-
}, s))
|
|
2993
|
-
}),
|
|
2994
|
-
/* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", {
|
|
2995
|
-
className: TaskForm_module_css_default.strategyHint,
|
|
2996
|
-
children: t(STRATEGY_HINT_KEYS[strategy])
|
|
2997
|
-
})
|
|
2998
|
-
]
|
|
2999
|
-
}),
|
|
3000
|
-
showRounds && /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", {
|
|
3001
|
-
className: TaskForm_module_css_default.field,
|
|
3002
|
-
children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", {
|
|
3003
|
-
className: TaskForm_module_css_default.fieldLabel,
|
|
3004
|
-
children: t("modal.rounds")
|
|
3005
|
-
}), /* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", {
|
|
3006
|
-
className: TaskForm_module_css_default.pillRow,
|
|
3007
|
-
children: [
|
|
3008
|
-
2,
|
|
3009
|
-
3,
|
|
3010
|
-
4,
|
|
3011
|
-
5
|
|
3012
|
-
].map((r) => /* @__PURE__ */ (0, react_jsx_runtime.jsx)(_deepseek_ai_dsh_client_ui_primitives.Pill, {
|
|
3013
|
-
active: values.rounds === r,
|
|
3014
|
-
onClick: () => onChange({ rounds: r }),
|
|
3015
|
-
children: r
|
|
3016
|
-
}, r))
|
|
3017
|
-
})]
|
|
3018
|
-
}),
|
|
3019
|
-
hintLabelKey !== null && hintPlaceholderKey !== null && /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", {
|
|
3020
|
-
className: TaskForm_module_css_default.field,
|
|
3021
|
-
children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", {
|
|
3022
|
-
className: TaskForm_module_css_default.fieldLabel,
|
|
3023
|
-
children: t(hintLabelKey)
|
|
3024
|
-
}), /* @__PURE__ */ (0, react_jsx_runtime.jsx)("textarea", {
|
|
3025
|
-
className: TaskForm_module_css_default.guidanceInput,
|
|
3026
|
-
placeholder: hintPlaceholder,
|
|
3027
|
-
value: values.strategyHint,
|
|
3028
|
-
onChange: (e) => onChange({ strategyHint: e.target.value }),
|
|
3029
|
-
rows: 2
|
|
3030
|
-
})]
|
|
3031
|
-
}),
|
|
3032
|
-
/* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", {
|
|
3033
|
-
className: TaskForm_module_css_default.field,
|
|
3034
|
-
children: [
|
|
3035
|
-
/* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", {
|
|
3036
|
-
className: TaskForm_module_css_default.fieldLabel,
|
|
3037
|
-
children: t("modal.autonomy")
|
|
3038
|
-
}),
|
|
3039
|
-
/* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", {
|
|
3040
|
-
className: TaskForm_module_css_default.pillRow,
|
|
3041
|
-
children: [
|
|
3042
|
-
"l1",
|
|
3043
|
-
"l2",
|
|
3044
|
-
"l3"
|
|
3045
|
-
].map((level) => /* @__PURE__ */ (0, react_jsx_runtime.jsx)(_deepseek_ai_dsh_client_ui_primitives.Tooltip, {
|
|
3046
|
-
label: t(AUTONOMY_HINT_KEYS[level]),
|
|
3047
|
-
side: "top",
|
|
3048
|
-
children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", {
|
|
3049
|
-
className: TaskForm_module_css_default.autonomyBtn,
|
|
3050
|
-
children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(_deepseek_ai_dsh_client_ui_primitives.Button, {
|
|
3051
|
-
size: "sm",
|
|
3052
|
-
variant: values.autonomy === level ? "primary" : "outline",
|
|
3053
|
-
onClick: () => onChange({ autonomy: level }),
|
|
3054
|
-
children: t(AUTONOMY_LABEL_KEYS[level])
|
|
3055
|
-
})
|
|
3056
|
-
})
|
|
3057
|
-
}, level))
|
|
3058
|
-
}),
|
|
3059
|
-
/* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", {
|
|
3060
|
-
className: TaskForm_module_css_default.strategyHint,
|
|
3061
|
-
children: t(AUTONOMY_DESC_KEYS[values.autonomy])
|
|
3062
|
-
})
|
|
3063
|
-
]
|
|
3064
|
-
}),
|
|
3065
|
-
props.onAdvancedOpenChange !== void 0 && /* @__PURE__ */ (0, react_jsx_runtime.jsxs)(react_jsx_runtime.Fragment, { children: [/* @__PURE__ */ (0, react_jsx_runtime.jsxs)("button", {
|
|
3066
|
-
type: "button",
|
|
3067
|
-
className: TaskForm_module_css_default.advancedBtn,
|
|
3068
|
-
onClick: () => props.onAdvancedOpenChange?.(true),
|
|
3069
|
-
children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)(Icon, { name: "IconSettingsOutline14" }), t("modal.advanced")]
|
|
3070
|
-
}), /* @__PURE__ */ (0, react_jsx_runtime.jsx)(_deepseek_ai_dsh_client_ui_primitives.Modal, {
|
|
3071
|
-
open: props.advancedOpen ?? false,
|
|
3072
|
-
onClose: () => props.onAdvancedOpenChange?.(false),
|
|
3073
|
-
title: t("modal.advancedTitle"),
|
|
3074
|
-
closeLabel: t("modal.close"),
|
|
3075
|
-
footer: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(_deepseek_ai_dsh_client_ui_primitives.Button, {
|
|
3076
|
-
variant: "primary",
|
|
3077
|
-
size: "md",
|
|
3078
|
-
onClick: () => props.onAdvancedOpenChange?.(false),
|
|
3079
|
-
children: t("modal.advancedDone")
|
|
3080
|
-
}),
|
|
3081
|
-
children: /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", {
|
|
3082
|
-
className: TaskForm_module_css_default.advancedBody,
|
|
3083
|
-
children: [
|
|
3084
|
-
/* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", {
|
|
3085
|
-
className: TaskForm_module_css_default.field,
|
|
3086
|
-
children: [
|
|
3087
|
-
/* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", {
|
|
3088
|
-
className: TaskForm_module_css_default.fieldLabel,
|
|
3089
|
-
children: t("modal.model")
|
|
3090
|
-
}),
|
|
3091
|
-
(() => {
|
|
3092
|
-
const models = props.models ?? [];
|
|
3093
|
-
if (models.length > 0) {
|
|
3094
|
-
const encode = (m) => `${m.provider}\u0000${m.id}`;
|
|
3095
|
-
const decode = (v) => {
|
|
3096
|
-
if (v === "") return {
|
|
3097
|
-
model: "",
|
|
3098
|
-
modelProvider: ""
|
|
3099
|
-
};
|
|
3100
|
-
const at = v.indexOf("\0");
|
|
3101
|
-
return at >= 0 ? {
|
|
3102
|
-
model: v.slice(at + 1),
|
|
3103
|
-
modelProvider: v.slice(0, at)
|
|
3104
|
-
} : {
|
|
3105
|
-
model: v,
|
|
3106
|
-
modelProvider: ""
|
|
3107
|
-
};
|
|
3108
|
-
};
|
|
3109
|
-
const current = values.model === "" ? "" : (() => {
|
|
3110
|
-
const hit = models.find((m) => m.id === values.model && (values.modelProvider === "" || m.provider === values.modelProvider)) ?? models.find((m) => m.id === values.model);
|
|
3111
|
-
return hit !== void 0 ? encode(hit) : values.model;
|
|
3112
|
-
})();
|
|
3113
|
-
const byProvider = /* @__PURE__ */ new Map();
|
|
3114
|
-
for (const m of models) {
|
|
3115
|
-
const list = byProvider.get(m.provider) ?? [];
|
|
3116
|
-
list.push(m);
|
|
3117
|
-
byProvider.set(m.provider, list);
|
|
3118
|
-
}
|
|
3119
|
-
return /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("select", {
|
|
3120
|
-
className: TaskForm_module_css_default.fieldInput,
|
|
3121
|
-
value: current,
|
|
3122
|
-
onChange: (e) => {
|
|
3123
|
-
const decoded = decode(e.target.value);
|
|
3124
|
-
const efforts = models.find((m) => m.id === decoded.model)?.reasoningEfforts;
|
|
3125
|
-
const resetReasoning = values.reasoning !== "follow" && efforts !== void 0 && efforts.length > 0 && !efforts.some((e) => e.id === values.reasoning);
|
|
3126
|
-
onChange(resetReasoning ? {
|
|
3127
|
-
...decoded,
|
|
3128
|
-
reasoning: "follow"
|
|
3129
|
-
} : decoded);
|
|
3130
|
-
},
|
|
3131
|
-
children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)("option", {
|
|
3132
|
-
value: "",
|
|
3133
|
-
children: t("modal.modelFollowGlobal")
|
|
3134
|
-
}), [...byProvider.keys()].map((provider) => {
|
|
3135
|
-
const group = byProvider.get(provider) ?? [];
|
|
3136
|
-
const label = group[0]?.providerLabel ?? provider;
|
|
3137
|
-
return /* @__PURE__ */ (0, react_jsx_runtime.jsx)("optgroup", {
|
|
3138
|
-
label,
|
|
3139
|
-
children: group.map((m) => /* @__PURE__ */ (0, react_jsx_runtime.jsx)("option", {
|
|
3140
|
-
value: encode(m),
|
|
3141
|
-
children: m.name
|
|
3142
|
-
}, encode(m)))
|
|
3143
|
-
}, provider);
|
|
3144
|
-
})]
|
|
3145
|
-
});
|
|
3146
|
-
}
|
|
3147
|
-
return /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", {
|
|
3148
|
-
className: TaskForm_module_css_default.modelFallbackRow,
|
|
3149
|
-
children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)("input", {
|
|
3150
|
-
className: TaskForm_module_css_default.fieldInput,
|
|
3151
|
-
value: values.model,
|
|
3152
|
-
onChange: (e) => onChange({ model: e.target.value }),
|
|
3153
|
-
placeholder: "model-id"
|
|
3154
|
-
}), /* @__PURE__ */ (0, react_jsx_runtime.jsx)("input", {
|
|
3155
|
-
className: TaskForm_module_css_default.fieldInput,
|
|
3156
|
-
value: values.modelProvider,
|
|
3157
|
-
onChange: (e) => onChange({ modelProvider: e.target.value }),
|
|
3158
|
-
placeholder: "provider-id"
|
|
3159
|
-
})]
|
|
3160
|
-
});
|
|
3161
|
-
})(),
|
|
3162
|
-
/* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", {
|
|
3163
|
-
className: TaskForm_module_css_default.strategyHint,
|
|
3164
|
-
children: t("modal.modelHint")
|
|
3165
|
-
})
|
|
3166
|
-
]
|
|
3167
|
-
}),
|
|
3168
|
-
/* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", {
|
|
3169
|
-
className: TaskForm_module_css_default.field,
|
|
3170
|
-
children: [
|
|
3171
|
-
/* @__PURE__ */ (0, react_jsx_runtime.jsxs)("span", {
|
|
3172
|
-
className: TaskForm_module_css_default.fieldLabel,
|
|
3173
|
-
children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)(Icon, {
|
|
3174
|
-
name: "IconThinkOutline14",
|
|
3175
|
-
className: TaskForm_module_css_default.advancedIcon
|
|
3176
|
-
}), t("modal.reasoning")]
|
|
3177
|
-
}),
|
|
3178
|
-
/* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", {
|
|
3179
|
-
className: TaskForm_module_css_default.pillRow,
|
|
3180
|
-
children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)(_deepseek_ai_dsh_client_ui_primitives.Pill, {
|
|
3181
|
-
active: values.reasoning === "follow",
|
|
3182
|
-
onClick: () => onChange({ reasoning: "follow" }),
|
|
3183
|
-
children: t("reasoning.follow")
|
|
3184
|
-
}), (() => {
|
|
3185
|
-
const selectedModel = props.models?.find((m) => m.id === values.model);
|
|
3186
|
-
return reasoningOptions(selectedModel).map((effort) => /* @__PURE__ */ (0, react_jsx_runtime.jsx)(_deepseek_ai_dsh_client_ui_primitives.Pill, {
|
|
3187
|
-
active: values.reasoning === effort.id,
|
|
3188
|
-
onClick: () => onChange({ reasoning: effort.id }),
|
|
3189
|
-
children: reasoningLabel(effort)
|
|
3190
|
-
}, effort.id));
|
|
3191
|
-
})()]
|
|
3192
|
-
}),
|
|
3193
|
-
/* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", {
|
|
3194
|
-
className: TaskForm_module_css_default.strategyHint,
|
|
3195
|
-
children: t("modal.reasoningHint")
|
|
3196
|
-
})
|
|
3197
|
-
]
|
|
3198
|
-
}),
|
|
3199
|
-
/* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", {
|
|
3200
|
-
className: TaskForm_module_css_default.field,
|
|
3201
|
-
children: [
|
|
3202
|
-
/* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", {
|
|
3203
|
-
className: TaskForm_module_css_default.fieldLabel,
|
|
3204
|
-
children: t("modal.priority")
|
|
3205
|
-
}),
|
|
3206
|
-
/* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", {
|
|
3207
|
-
className: TaskForm_module_css_default.pillRow,
|
|
3208
|
-
children: [
|
|
3209
|
-
0,
|
|
3210
|
-
1,
|
|
3211
|
-
2,
|
|
3212
|
-
3,
|
|
3213
|
-
4,
|
|
3214
|
-
5,
|
|
3215
|
-
6,
|
|
3216
|
-
7,
|
|
3217
|
-
8,
|
|
3218
|
-
9
|
|
3219
|
-
].map((n) => /* @__PURE__ */ (0, react_jsx_runtime.jsx)(_deepseek_ai_dsh_client_ui_primitives.Pill, {
|
|
3220
|
-
active: values.priority === n,
|
|
3221
|
-
onClick: () => onChange({ priority: n }),
|
|
3222
|
-
children: n
|
|
3223
|
-
}, n))
|
|
3224
|
-
}),
|
|
3225
|
-
/* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", {
|
|
3226
|
-
className: TaskForm_module_css_default.strategyHint,
|
|
3227
|
-
children: t("modal.priorityHint")
|
|
3228
|
-
})
|
|
3229
|
-
]
|
|
3230
|
-
}),
|
|
3231
|
-
/* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", {
|
|
3232
|
-
className: TaskForm_module_css_default.field,
|
|
3233
|
-
children: [
|
|
3234
|
-
/* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", {
|
|
3235
|
-
className: TaskForm_module_css_default.fieldLabel,
|
|
3236
|
-
children: t("modal.sessionMode")
|
|
3237
|
-
}),
|
|
3238
|
-
/* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", {
|
|
3239
|
-
className: TaskForm_module_css_default.pillRow,
|
|
3240
|
-
children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", {
|
|
3241
|
-
className: `${TaskForm_module_css_default.strategyPill} ${values.sessionMode === "new" ? TaskForm_module_css_default.strategyActive : ""}`,
|
|
3242
|
-
onClick: () => onChange({
|
|
3243
|
-
sessionMode: "new",
|
|
3244
|
-
continuesFromSession: void 0
|
|
3245
|
-
}),
|
|
3246
|
-
children: t("modal.sessionNew")
|
|
3247
|
-
}), /* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", {
|
|
3248
|
-
className: `${TaskForm_module_css_default.strategyPill} ${values.sessionMode === "continue" ? TaskForm_module_css_default.strategyActive : ""}`,
|
|
3249
|
-
onClick: () => onChange({ sessionMode: "continue" }),
|
|
3250
|
-
children: t("modal.sessionContinue")
|
|
3251
|
-
})]
|
|
3252
|
-
}),
|
|
3253
|
-
/* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", {
|
|
3254
|
-
className: TaskForm_module_css_default.strategyHint,
|
|
3255
|
-
children: values.sessionMode === "new" ? t("modal.sessionNewHint") : t("modal.sessionContinueHint")
|
|
3256
|
-
})
|
|
3257
|
-
]
|
|
3258
|
-
}),
|
|
3259
|
-
values.sessionMode === "continue" && /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", {
|
|
3260
|
-
className: TaskForm_module_css_default.field,
|
|
3261
|
-
children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", {
|
|
3262
|
-
className: TaskForm_module_css_default.fieldLabel,
|
|
3263
|
-
children: t("modal.selectConversation")
|
|
3264
|
-
}), (() => {
|
|
3265
|
-
const workspaces = props.sessionWorkspaces ?? [];
|
|
3266
|
-
if (workspaces.length === 0) return /* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", {
|
|
3267
|
-
className: TaskForm_module_css_default.strategyHint,
|
|
3268
|
-
children: t("modal.noConversations")
|
|
3269
|
-
});
|
|
3270
|
-
const currentWs = workspaces.find((w) => w.cwd === values.workspace) ?? workspaces[0];
|
|
3271
|
-
const sessions = currentWs?.sessions ?? [];
|
|
3272
|
-
return /* @__PURE__ */ (0, react_jsx_runtime.jsxs)(react_jsx_runtime.Fragment, { children: [/* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", {
|
|
3273
|
-
className: TaskForm_module_css_default.sessionPickRow,
|
|
3274
|
-
children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)("select", {
|
|
3275
|
-
className: TaskForm_module_css_default.fieldInput,
|
|
3276
|
-
value: currentWs?.cwd ?? "",
|
|
3277
|
-
onChange: (e) => {
|
|
3278
|
-
const ws = workspaces.find((w) => w.cwd === e.target.value);
|
|
3279
|
-
onChange({
|
|
3280
|
-
workspace: e.target.value,
|
|
3281
|
-
continuesFromSession: void 0
|
|
3282
|
-
});
|
|
3283
|
-
if (ws !== void 0 && ws.sessions.length > 0) onChange({ continuesFromSession: ws.sessions[0].id });
|
|
3284
|
-
},
|
|
3285
|
-
children: workspaces.map((w) => /* @__PURE__ */ (0, react_jsx_runtime.jsx)("option", {
|
|
3286
|
-
value: w.cwd,
|
|
3287
|
-
children: w.label !== null ? `${w.label} · ${w.cwd}` : w.cwd
|
|
3288
|
-
}, w.cwd))
|
|
3289
|
-
}), /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("select", {
|
|
3290
|
-
className: TaskForm_module_css_default.fieldInput,
|
|
3291
|
-
value: values.continuesFromSession ?? "",
|
|
3292
|
-
onChange: (e) => onChange({ continuesFromSession: e.target.value || void 0 }),
|
|
3293
|
-
children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)("option", {
|
|
3294
|
-
value: "",
|
|
3295
|
-
children: t("modal.selectConversationPlaceholder")
|
|
3296
|
-
}), sessions.map((s) => /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("option", {
|
|
3297
|
-
value: s.id,
|
|
3298
|
-
children: [s.title !== null && s.title !== "" ? s.title : s.id.slice(0, 16), s.lastModified > 0 ? ` · ${sessionTimeLabel(s.lastModified, t)}` : ""]
|
|
3299
|
-
}, s.id))]
|
|
3300
|
-
})]
|
|
3301
|
-
}), /* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", {
|
|
3302
|
-
className: TaskForm_module_css_default.strategyHint,
|
|
3303
|
-
children: t("modal.continueHint", { cwd: currentWs?.cwd ?? "" })
|
|
3304
|
-
})] });
|
|
3305
|
-
})()]
|
|
3306
|
-
}),
|
|
3307
|
-
/* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", {
|
|
3308
|
-
className: TaskForm_module_css_default.field,
|
|
3309
|
-
children: [
|
|
3310
|
-
/* @__PURE__ */ (0, react_jsx_runtime.jsxs)("span", {
|
|
3311
|
-
className: TaskForm_module_css_default.fieldLabel,
|
|
3312
|
-
children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)(Icon, {
|
|
3313
|
-
name: "IconPaperclipOutline16",
|
|
3314
|
-
className: TaskForm_module_css_default.advancedIcon
|
|
3315
|
-
}), t("modal.files")]
|
|
3316
|
-
}),
|
|
3317
|
-
/* @__PURE__ */ (0, react_jsx_runtime.jsx)("input", {
|
|
3318
|
-
className: TaskForm_module_css_default.fieldInput,
|
|
3319
|
-
value: values.files,
|
|
3320
|
-
onChange: (e) => onChange({ files: e.target.value }),
|
|
3321
|
-
placeholder: t("modal.filesPlaceholder")
|
|
3322
|
-
}),
|
|
3323
|
-
/* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", {
|
|
3324
|
-
className: TaskForm_module_css_default.strategyHint,
|
|
3325
|
-
children: t("modal.filesAdvancedHint")
|
|
3326
|
-
})
|
|
3327
|
-
]
|
|
3328
|
-
})
|
|
3329
|
-
]
|
|
3330
|
-
})
|
|
3331
|
-
})] })
|
|
3332
|
-
]
|
|
3333
|
-
});
|
|
3334
|
-
}
|
|
3335
|
-
//#endregion
|
|
3336
|
-
//#region \0dsh-css:E:\Documents\kimicode\dsh-lowtide\packages\dsh-lowtide\client\components\InterceptCard.module.css.mjs
|
|
3337
|
-
const css$8 = "._0rGGXG_card{background:var(--dsw-specific-input-major);border:1px solid var(--dsw-alias-border-l2-darkmode-thin);border-radius:12px;flex-direction:column;gap:8px;padding:10px 12px;display:flex}._0rGGXG_header{justify-content:space-between;align-items:center;gap:8px;display:flex}._0rGGXG_title{color:var(--dsw-alias-label-primary);font:var(--dsw-font-s-strong-14);align-items:center;gap:6px;display:inline-flex}._0rGGXG_dot{display:inline-flex}._0rGGXG_close{width:28px;height:28px;color:var(--dsw-alias-label-tertiary);cursor:pointer;background:0 0;border:none;border-radius:999px;flex-shrink:0;justify-content:center;align-items:center;display:inline-flex}._0rGGXG_close:hover{background:var(--dsw-alias-interactive-bg-hover);color:var(--dsw-alias-label-primary)}._0rGGXG_compare{flex-wrap:wrap;gap:16px;display:flex}._0rGGXG_priceLabel{color:var(--dsw-alias-label-tertiary);font:var(--dsw-font-xxs-12)}._0rGGXG_row{flex-wrap:wrap;align-items:center;gap:8px;display:flex}._0rGGXG_dismiss{color:var(--dsw-alias-label-tertiary);font:var(--dsw-font-xxs-12);cursor:pointer;white-space:nowrap;background:0 0;border:none;margin-left:auto;padding:0 4px}._0rGGXG_dismiss:hover{color:var(--dsw-alias-label-secondary)}._0rGGXG_queueStatus{color:var(--dsw-alias-label-tertiary);font:var(--dsw-font-xxs-12);align-items:center;gap:4px;display:inline-flex}._0rGGXG_queueIcon{color:var(--dsw-alias-label-tertiary)}";
|
|
3338
|
-
const tagId$8 = "dsh-lowtide/InterceptCard.module.css";
|
|
3339
|
-
if (typeof document !== "undefined" && document.querySelector("style[data-plugin-css=" + JSON.stringify(tagId$8) + "]") === null) {
|
|
3340
|
-
const tag = document.createElement("style");
|
|
3341
|
-
tag.dataset.plugin = "dsh-lowtide";
|
|
3342
|
-
tag.dataset.pluginCss = tagId$8;
|
|
3343
|
-
tag.textContent = css$8;
|
|
3344
|
-
document.head.appendChild(tag);
|
|
3345
|
-
}
|
|
3346
|
-
var InterceptCard_module_css_default = {
|
|
3347
|
-
"close": "_0rGGXG_close",
|
|
3348
|
-
"queueStatus": "_0rGGXG_queueStatus",
|
|
3349
|
-
"header": "_0rGGXG_header",
|
|
3350
|
-
"dot": "_0rGGXG_dot",
|
|
3351
|
-
"queueIcon": "_0rGGXG_queueIcon",
|
|
3352
|
-
"title": "_0rGGXG_title",
|
|
3353
|
-
"priceLabel": "_0rGGXG_priceLabel",
|
|
3354
|
-
"dismiss": "_0rGGXG_dismiss",
|
|
3355
|
-
"card": "_0rGGXG_card",
|
|
3356
|
-
"compare": "_0rGGXG_compare",
|
|
3357
|
-
"row": "_0rGGXG_row"
|
|
3358
|
-
};
|
|
3359
|
-
//#endregion
|
|
3360
|
-
//#region client/components/InterceptCard.tsx
|
|
3361
|
-
/**
|
|
3362
|
-
* Busy-hour prompt in the input dock. The native composer remains resident
|
|
3363
|
-
* and is the only text editor; this card offers explicit run/queue actions.
|
|
3364
|
-
* It appears for peak or custom >1x windows while the live draft is non-empty.
|
|
3365
|
-
*/
|
|
3366
|
-
function InterceptCard(props) {
|
|
3367
|
-
const { t } = props;
|
|
3368
|
-
const draft = props.useInput((input) => input.draft);
|
|
3369
|
-
const host = useLowtide((s) => s.host);
|
|
3370
|
-
const tier = useLowtide((s) => s.tier);
|
|
3371
|
-
const tierAt = useLowtide((s) => s.tierAt);
|
|
3372
|
-
const [workspace, setWorkspace] = (0, react.useState)(() => lastWorkspace());
|
|
3373
|
-
const [submitting, setSubmitting] = (0, react.useState)(false);
|
|
3374
|
-
const [dismissed, setDismissed] = (0, react.useState)(false);
|
|
3375
|
-
const [estimateResult, setEstimateResult] = (0, react.useState)(null);
|
|
3376
|
-
(0, react.useEffect)(() => {
|
|
3377
|
-
if (draft.trim() === "") setDismissed(false);
|
|
3378
|
-
}, [draft]);
|
|
3379
|
-
const shownLevel = tierAt > 0 ? tier.level : host?.price.tier ?? "off";
|
|
3380
|
-
const shownMultiplier = tierAt > 0 ? tier.multiplier : host?.price.multiplier ?? 1;
|
|
3381
|
-
const shownWindow = tierAt > 0 ? tier.window : host?.level?.window ?? null;
|
|
3382
|
-
const peakWindow = shownWindow !== null ? `${shownWindow.start}–${shownWindow.end}` : "";
|
|
3383
|
-
const customMultiplier = shownLevel === "custom" ? shownMultiplier : null;
|
|
3384
|
-
const priced = shownLevel === "peak" || shownLevel === "custom" && shownMultiplier > 1;
|
|
3385
|
-
const tierText = customMultiplier !== null && customMultiplier > 1 ? t("intercept.tierCustom", { multiplier: customMultiplier }) : t("intercept.tierPeak");
|
|
3386
|
-
const formValues = {
|
|
3387
|
-
prompt: draft,
|
|
3388
|
-
workspace,
|
|
3389
|
-
strategy: "single",
|
|
3390
|
-
rounds: 1,
|
|
3391
|
-
priority: 1,
|
|
3392
|
-
files: "",
|
|
3393
|
-
reasoning: "follow",
|
|
3394
|
-
model: host?.price.model ?? "",
|
|
3395
|
-
modelProvider: "",
|
|
3396
|
-
strategyHint: "",
|
|
3397
|
-
autonomy: host?.autonomy === "l1" || host?.autonomy === "l3" ? host.autonomy : "l2",
|
|
3398
|
-
sessionMode: "new"
|
|
3399
|
-
};
|
|
3400
|
-
(0, react.useEffect)(() => {
|
|
3401
|
-
if (draft.trim() === "") {
|
|
3402
|
-
setEstimateResult(null);
|
|
3403
|
-
return;
|
|
3404
|
-
}
|
|
3405
|
-
const timer = setTimeout(() => {
|
|
3406
|
-
const nowModel = host?.price.model;
|
|
3407
|
-
if (nowModel === void 0) return;
|
|
3408
|
-
estimate(draft, [], nowModel, formValues.model).then((res) => {
|
|
3409
|
-
if (res.ok) setEstimateResult({
|
|
3410
|
-
peak: res.peak,
|
|
3411
|
-
off: res.off
|
|
3412
|
-
});
|
|
3413
|
-
}).catch(() => {});
|
|
3414
|
-
}, 400);
|
|
3415
|
-
return () => clearTimeout(timer);
|
|
3416
|
-
}, [
|
|
3417
|
-
draft,
|
|
3418
|
-
host?.price.model,
|
|
3419
|
-
formValues.model
|
|
3420
|
-
]);
|
|
3421
|
-
function onFormChange(patch) {
|
|
3422
|
-
if (patch.workspace !== void 0) setWorkspace(patch.workspace);
|
|
3423
|
-
}
|
|
3424
|
-
async function queueTonight() {
|
|
3425
|
-
if (draft.trim() === "") return;
|
|
3426
|
-
setSubmitting(true);
|
|
3427
|
-
const result = await submitTask({
|
|
3428
|
-
prompt: draft,
|
|
3429
|
-
files: [],
|
|
3430
|
-
workspace: workspace.trim() !== "" ? workspace.trim() : lastWorkspace(),
|
|
3431
|
-
priority: 1,
|
|
3432
|
-
permissionPreset: "lt-standard",
|
|
3433
|
-
model: formValues.model
|
|
3434
|
-
});
|
|
3435
|
-
setSubmitting(false);
|
|
3436
|
-
if (result.ok) {
|
|
3437
|
-
if (workspace.trim() !== "") rememberWorkspace(workspace.trim());
|
|
3438
|
-
props.inputActions.setDraft("");
|
|
3439
|
-
showToast(t("toast.enqueued"));
|
|
3440
|
-
lowtideStore.update((s) => {
|
|
3441
|
-
s.queueOpen = true;
|
|
3442
|
-
});
|
|
3443
|
-
} else showToast(t("toast.submitFailed", { error: result.error ?? "unknown" }));
|
|
3444
|
-
}
|
|
3445
|
-
function dismiss() {
|
|
3446
|
-
dismissPeakToday().then(() => refreshNow());
|
|
3447
|
-
}
|
|
3448
|
-
if (host === null || !priced || host.dismissedPeakToday || draft.trim() === "" || dismissed) return null;
|
|
3449
|
-
const priceKnown = host.price.priceKnown;
|
|
3450
|
-
const peakLabel = estimateResult !== null && priceKnown ? `¥${estimateResult.peak.toFixed(2)}` : priceKnown ? t("intercept.priceNowPeak") : t("intercept.priceUnknown");
|
|
3451
|
-
const offLabel = estimateResult !== null && priceKnown ? `¥${estimateResult.off.toFixed(2)}` : priceKnown ? t("intercept.priceTonight") : t("intercept.priceUnknown");
|
|
3452
|
-
return /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", {
|
|
3453
|
-
className: InterceptCard_module_css_default.card,
|
|
3454
|
-
"data-lowtide-peak-prompt": true,
|
|
3455
|
-
children: [
|
|
3456
|
-
/* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", {
|
|
3457
|
-
className: InterceptCard_module_css_default.header,
|
|
3458
|
-
children: [/* @__PURE__ */ (0, react_jsx_runtime.jsxs)("span", {
|
|
3459
|
-
className: InterceptCard_module_css_default.title,
|
|
3460
|
-
children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", {
|
|
3461
|
-
className: InterceptCard_module_css_default.dot,
|
|
3462
|
-
children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(_deepseek_ai_dsh_client_ui_primitives.StateDot, { state: "error" })
|
|
3463
|
-
}), t("intercept.title", {
|
|
3464
|
-
tier: tierText,
|
|
3465
|
-
window: peakWindow
|
|
3466
|
-
})]
|
|
3467
|
-
}), /* @__PURE__ */ (0, react_jsx_runtime.jsx)("button", {
|
|
3468
|
-
type: "button",
|
|
3469
|
-
className: InterceptCard_module_css_default.close,
|
|
3470
|
-
title: t("intercept.closeTitle"),
|
|
3471
|
-
onClick: () => setDismissed(true),
|
|
3472
|
-
children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(Icon, { name: "IconCloseOutline16" })
|
|
3473
|
-
})]
|
|
3474
|
-
}),
|
|
3475
|
-
/* @__PURE__ */ (0, react_jsx_runtime.jsx)(TaskForm, {
|
|
3476
|
-
variant: "intercept",
|
|
3477
|
-
t,
|
|
3478
|
-
values: formValues,
|
|
3479
|
-
onChange: onFormChange
|
|
3480
|
-
}),
|
|
3481
|
-
/* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", {
|
|
3482
|
-
className: InterceptCard_module_css_default.compare,
|
|
3483
|
-
children: [
|
|
3484
|
-
/* @__PURE__ */ (0, react_jsx_runtime.jsxs)("span", {
|
|
3485
|
-
className: InterceptCard_module_css_default.priceLabel,
|
|
3486
|
-
children: [customMultiplier !== null && customMultiplier > 1 ? t("intercept.priceNowCustom", { multiplier: customMultiplier }) : t("intercept.priceNowPeak"), /* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", {
|
|
3487
|
-
className: InterceptCard_module_css_default.priceValue,
|
|
3488
|
-
children: peakLabel
|
|
3489
|
-
})]
|
|
3490
|
-
}),
|
|
3491
|
-
/* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", {
|
|
3492
|
-
className: InterceptCard_module_css_default.arrow,
|
|
3493
|
-
children: "→"
|
|
3494
|
-
}),
|
|
3495
|
-
/* @__PURE__ */ (0, react_jsx_runtime.jsxs)("span", {
|
|
3496
|
-
className: InterceptCard_module_css_default.priceLabel,
|
|
3497
|
-
children: [t("intercept.priceTonight"), /* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", {
|
|
3498
|
-
className: InterceptCard_module_css_default.priceValue,
|
|
3499
|
-
children: offLabel
|
|
3500
|
-
})]
|
|
3501
|
-
})
|
|
3502
|
-
]
|
|
3503
|
-
}),
|
|
3504
|
-
/* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", {
|
|
3505
|
-
className: InterceptCard_module_css_default.queueStatus,
|
|
3506
|
-
children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)(Icon, {
|
|
3507
|
-
name: "IconQueueOutline14",
|
|
3508
|
-
className: InterceptCard_module_css_default.queueIcon
|
|
3509
|
-
}), t("intercept.queueStatus", {
|
|
3510
|
-
total: host.queue.total,
|
|
3511
|
-
pending: host.queue.pendingReview
|
|
3512
|
-
})]
|
|
3513
|
-
}),
|
|
3514
|
-
/* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", {
|
|
3515
|
-
className: InterceptCard_module_css_default.row,
|
|
3516
|
-
children: [
|
|
3517
|
-
/* @__PURE__ */ (0, react_jsx_runtime.jsx)(_deepseek_ai_dsh_client_ui_primitives.Button, {
|
|
3518
|
-
variant: "outline",
|
|
3519
|
-
size: "md",
|
|
3520
|
-
onClick: () => props.inputActions.submit(),
|
|
3521
|
-
children: t("intercept.runNow")
|
|
3522
|
-
}),
|
|
3523
|
-
/* @__PURE__ */ (0, react_jsx_runtime.jsx)(_deepseek_ai_dsh_client_ui_primitives.Button, {
|
|
3524
|
-
variant: "primary",
|
|
3525
|
-
size: "md",
|
|
3526
|
-
disabled: submitting,
|
|
3527
|
-
onClick: () => void queueTonight(),
|
|
3528
|
-
children: t("intercept.enqueue")
|
|
3529
|
-
}),
|
|
3530
|
-
/* @__PURE__ */ (0, react_jsx_runtime.jsx)("button", {
|
|
3531
|
-
type: "button",
|
|
3532
|
-
className: InterceptCard_module_css_default.dismiss,
|
|
3533
|
-
onClick: dismiss,
|
|
3534
|
-
children: t("intercept.dismiss")
|
|
3535
|
-
})
|
|
3536
|
-
]
|
|
3537
|
-
})
|
|
3538
|
-
]
|
|
3539
|
-
});
|
|
3540
|
-
}
|
|
3541
|
-
//#endregion
|
|
3542
|
-
//#region client/lib/taskMeta.ts
|
|
3543
|
-
const STATUS_KEYS = {
|
|
3544
|
-
"pending-review": "status.pending-review",
|
|
3545
|
-
queued: "status.queued",
|
|
3546
|
-
deferred: "status.deferred",
|
|
3547
|
-
dropped: "status.dropped",
|
|
3548
|
-
running: "status.running",
|
|
3549
|
-
preflight: "status.preflight",
|
|
3550
|
-
done: "status.done",
|
|
3551
|
-
failed: "status.failed",
|
|
3552
|
-
stale: "status.stale",
|
|
3553
|
-
timeout: "status.timeout",
|
|
3554
|
-
cancelled: "status.cancelled"
|
|
3555
|
-
};
|
|
3556
|
-
/** Localized status label ("待裁定" / "Queued" …). */
|
|
3557
|
-
function statusLabel(t, status) {
|
|
3558
|
-
return t(STATUS_KEYS[status] ?? status);
|
|
3559
|
-
}
|
|
3560
|
-
/** 策略标签:迭代 N 轮 / 采样 N 份 / 复核 / 单次(空)。 */
|
|
3561
|
-
function strategyLabel(t, strategy, roundsRun) {
|
|
3562
|
-
if (strategy === "iterative") return t("report.strategyIterative", { rounds: roundsRun ?? 1 });
|
|
3563
|
-
if (strategy === "sampling") return t("report.strategySampling", { count: roundsRun ?? 1 });
|
|
3564
|
-
if (strategy === "review") return t("report.strategyReview");
|
|
3565
|
-
return "";
|
|
3566
|
-
}
|
|
3567
|
-
//#endregion
|
|
3568
|
-
//#region \0dsh-css:E:\Documents\kimicode\dsh-lowtide\packages\dsh-lowtide\client\components\TaskRow.module.css.mjs
|
|
3569
|
-
const css$7 = ".-YJcPW_taskRow{border-left:2px solid #0000;border-radius:8px;align-items:center;gap:8px;min-height:36px;padding:4px 5px 4px 12px;display:flex}.-YJcPW_taskRow:hover{background:var(--dsw-alias-interactive-bg-hover)}.-YJcPW_amber{border-left-color:var(--dsw-alias-state-warn-primary)}.-YJcPW_green{border-left-color:var(--dsw-alias-state-success-primary)}.-YJcPW_blue{border-left-color:var(--dsw-alias-state-business-primary)}.-YJcPW_red{border-left-color:var(--dsw-alias-state-error-primary)}.-YJcPW_taskMain{cursor:pointer;flex-direction:column;flex:1;gap:1px;min-width:0;display:flex}.-YJcPW_taskMain:hover .-YJcPW_taskPrompt{color:var(--dsw-alias-brand-primary)}.-YJcPW_taskPrompt{color:var(--dsw-alias-label-primary);font:var(--dsw-font-s-14);white-space:nowrap;text-overflow:ellipsis;overflow:hidden}.-YJcPW_taskMeta{color:var(--dsw-alias-label-tertiary);font:var(--dsw-font-xxs-12);white-space:nowrap;text-overflow:ellipsis;overflow:hidden}.-YJcPW_rowActions{gap:2px;display:flex}.-YJcPW_iconBtn{width:28px;height:28px;color:var(--dsw-alias-label-secondary);cursor:pointer;background:0 0;border:none;border-radius:999px;font-size:13px}.-YJcPW_iconBtn:hover{background:var(--dsw-alias-interactive-bg-hover);color:var(--dsw-alias-label-primary)}.-YJcPW_iconBtn:disabled{opacity:.4;cursor:not-allowed}.-YJcPW_iconBtn:disabled:hover{color:var(--dsw-alias-label-secondary);background:0 0}.-YJcPW_confirming{color:var(--dsw-alias-state-error-primary);background:var(--dsw-alias-interactive-bg-hover);font-weight:600}.-YJcPW_confirming:hover{color:var(--dsw-alias-state-error-primary)}.-YJcPW_droppedRow{opacity:.75}.-YJcPW_droppedRow:hover{opacity:1}";
|
|
3570
|
-
const tagId$7 = "dsh-lowtide/TaskRow.module.css";
|
|
3571
|
-
if (typeof document !== "undefined" && document.querySelector("style[data-plugin-css=" + JSON.stringify(tagId$7) + "]") === null) {
|
|
3572
|
-
const tag = document.createElement("style");
|
|
3573
|
-
tag.dataset.plugin = "dsh-lowtide";
|
|
3574
|
-
tag.dataset.pluginCss = tagId$7;
|
|
3575
|
-
tag.textContent = css$7;
|
|
3576
|
-
document.head.appendChild(tag);
|
|
3577
2936
|
}
|
|
3578
|
-
var TaskRow_module_css_default = {
|
|
3579
|
-
"blue": "-YJcPW_blue",
|
|
3580
|
-
"confirming": "-YJcPW_confirming",
|
|
3581
|
-
"taskPrompt": "-YJcPW_taskPrompt",
|
|
3582
|
-
"iconBtn": "-YJcPW_iconBtn",
|
|
3583
|
-
"taskMain": "-YJcPW_taskMain",
|
|
3584
|
-
"taskRow": "-YJcPW_taskRow",
|
|
3585
|
-
"rowActions": "-YJcPW_rowActions",
|
|
3586
|
-
"amber": "-YJcPW_amber",
|
|
3587
|
-
"red": "-YJcPW_red",
|
|
3588
|
-
"green": "-YJcPW_green",
|
|
3589
|
-
"droppedRow": "-YJcPW_droppedRow",
|
|
3590
|
-
"taskMeta": "-YJcPW_taskMeta"
|
|
3591
|
-
};
|
|
3592
2937
|
//#endregion
|
|
3593
|
-
//#region client/components/
|
|
2938
|
+
//#region client/components/DroppedRow.tsx
|
|
3594
2939
|
/**
|
|
3595
|
-
*
|
|
3596
|
-
*
|
|
3597
|
-
* bar by status. Shared by the 待执行 and 已结束 sections.
|
|
2940
|
+
* DroppedRow (Phase D split): a soft-deleted task inside the 已放弃 section,
|
|
2941
|
+
* with 恢复 (back to review) and 彻底删除 actions.
|
|
3598
2942
|
*/
|
|
3599
|
-
function
|
|
3600
|
-
if (status === "pending-review" || status === "deferred" || status === "stale") return TaskRow_module_css_default.amber;
|
|
3601
|
-
if (status === "queued" || status === "done") return TaskRow_module_css_default.green;
|
|
3602
|
-
if (status === "running" || status === "preflight") return TaskRow_module_css_default.blue;
|
|
3603
|
-
if (status === "failed" || status === "timeout") return TaskRow_module_css_default.red;
|
|
3604
|
-
return "";
|
|
3605
|
-
}
|
|
3606
|
-
/** Icons for the per-row actions (16px outline set, currentColor). */
|
|
3607
|
-
function RowActionIcon({ kind }) {
|
|
3608
|
-
if (kind === "approve") return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(Icon, { name: "IconCheckOutline16" });
|
|
3609
|
-
if (kind === "defer") return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(Icon, { name: "IconPauseOutline16" });
|
|
3610
|
-
if (kind === "drop") return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(Icon, { name: "IconCloseOutline16" });
|
|
3611
|
-
if (kind === "retry") return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(Icon, { name: "IconRefreshOutline16" });
|
|
3612
|
-
if (kind === "edit") return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(Icon, { name: "IconEditOutline16" });
|
|
3613
|
-
return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(Icon, { name: "IconTrashOutline16" });
|
|
3614
|
-
}
|
|
3615
|
-
function TaskRow({ task, t, onOpenDetail, onEdit }) {
|
|
3616
|
-
const pending = task.status === "pending-review";
|
|
3617
|
-
const deferred = task.status === "deferred";
|
|
3618
|
-
const locked = task.status === "running" || task.status === "preflight";
|
|
3619
|
-
const failed = task.status === "failed" || task.status === "timeout" || task.status === "stale";
|
|
3620
|
-
const editable = (pending || deferred || task.status === "queued") && !locked;
|
|
3621
|
-
const [confirming, setConfirming] = (0, react.useState)(false);
|
|
3622
|
-
async function handleDelete() {
|
|
3623
|
-
if (!confirming) {
|
|
3624
|
-
setConfirming(true);
|
|
3625
|
-
setTimeout(() => setConfirming(false), 3e3);
|
|
3626
|
-
return;
|
|
3627
|
-
}
|
|
3628
|
-
const result = await deleteTask(task.id);
|
|
3629
|
-
if (result.ok) {
|
|
3630
|
-
showToast(t("toast.deleted"));
|
|
3631
|
-
refreshNow();
|
|
3632
|
-
} else showToast(t("toast.deleteFailed", { error: result.error ?? "unknown" }));
|
|
3633
|
-
}
|
|
3634
|
-
const actions = [];
|
|
3635
|
-
if (editable && onEdit !== void 0) actions.push(/* @__PURE__ */ (0, react_jsx_runtime.jsx)("button", {
|
|
3636
|
-
type: "button",
|
|
3637
|
-
className: TaskRow_module_css_default.iconBtn,
|
|
3638
|
-
title: t("action.edit"),
|
|
3639
|
-
onClick: () => onEdit(task),
|
|
3640
|
-
children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(RowActionIcon, { kind: "edit" })
|
|
3641
|
-
}, "edit"));
|
|
3642
|
-
if (pending || deferred) actions.push(/* @__PURE__ */ (0, react_jsx_runtime.jsx)("button", {
|
|
3643
|
-
type: "button",
|
|
3644
|
-
className: TaskRow_module_css_default.iconBtn,
|
|
3645
|
-
title: t("action.approve"),
|
|
3646
|
-
onClick: () => {
|
|
3647
|
-
triage(task.id, "approve").then(refreshNow);
|
|
3648
|
-
},
|
|
3649
|
-
children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(RowActionIcon, { kind: "approve" })
|
|
3650
|
-
}, "approve"), /* @__PURE__ */ (0, react_jsx_runtime.jsx)("button", {
|
|
3651
|
-
type: "button",
|
|
3652
|
-
className: TaskRow_module_css_default.iconBtn,
|
|
3653
|
-
title: t("action.defer"),
|
|
3654
|
-
onClick: () => {
|
|
3655
|
-
triage(task.id, "defer").then(refreshNow);
|
|
3656
|
-
},
|
|
3657
|
-
children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(RowActionIcon, { kind: "defer" })
|
|
3658
|
-
}, "defer"), /* @__PURE__ */ (0, react_jsx_runtime.jsx)("button", {
|
|
3659
|
-
type: "button",
|
|
3660
|
-
className: TaskRow_module_css_default.iconBtn,
|
|
3661
|
-
title: t("action.drop"),
|
|
3662
|
-
onClick: () => {
|
|
3663
|
-
triage(task.id, "drop").then(refreshNow);
|
|
3664
|
-
},
|
|
3665
|
-
children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(RowActionIcon, { kind: "drop" })
|
|
3666
|
-
}, "drop"));
|
|
3667
|
-
if (failed) actions.push(/* @__PURE__ */ (0, react_jsx_runtime.jsx)("button", {
|
|
3668
|
-
type: "button",
|
|
3669
|
-
className: TaskRow_module_css_default.iconBtn,
|
|
3670
|
-
title: t("action.retry"),
|
|
3671
|
-
onClick: () => {
|
|
3672
|
-
retryTask(task.id).then(() => {
|
|
3673
|
-
showToast(t("toast.requeued"));
|
|
3674
|
-
refreshNow();
|
|
3675
|
-
});
|
|
3676
|
-
},
|
|
3677
|
-
children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(RowActionIcon, { kind: "retry" })
|
|
3678
|
-
}, "retry"));
|
|
3679
|
-
actions.push(/* @__PURE__ */ (0, react_jsx_runtime.jsx)("button", {
|
|
3680
|
-
type: "button",
|
|
3681
|
-
className: confirming ? `${TaskRow_module_css_default.iconBtn} ${TaskRow_module_css_default.confirming}` : TaskRow_module_css_default.iconBtn,
|
|
3682
|
-
title: confirming ? t("action.deleteConfirm") : t("action.delete"),
|
|
3683
|
-
disabled: locked,
|
|
3684
|
-
onClick: () => {
|
|
3685
|
-
handleDelete();
|
|
3686
|
-
},
|
|
3687
|
-
children: confirming ? t("action.deleteConfirmShort") : /* @__PURE__ */ (0, react_jsx_runtime.jsx)(RowActionIcon, { kind: "delete" })
|
|
3688
|
-
}, "delete"));
|
|
2943
|
+
function DroppedRow({ task, t }) {
|
|
3689
2944
|
return /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", {
|
|
3690
|
-
className: `${TaskRow_module_css_default.taskRow} ${
|
|
2945
|
+
className: `${TaskRow_module_css_default.taskRow} ${TaskRow_module_css_default.droppedRow}`,
|
|
3691
2946
|
children: [/* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", {
|
|
3692
2947
|
className: TaskRow_module_css_default.taskMain,
|
|
3693
|
-
onClick: () => onOpenDetail(task),
|
|
3694
2948
|
children: [/* @__PURE__ */ (0, react_jsx_runtime.jsxs)("span", {
|
|
3695
2949
|
className: TaskRow_module_css_default.taskPrompt,
|
|
3696
2950
|
children: [task.prompt.slice(0, 60), task.prompt.length > 60 ? "…" : ""]
|
|
3697
2951
|
}), /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("span", {
|
|
3698
2952
|
className: TaskRow_module_css_default.taskMeta,
|
|
3699
2953
|
children: [
|
|
3700
|
-
/* @__PURE__ */ (0, react_jsx_runtime.jsx)(ModelBadge, { model: task.model }),
|
|
3701
2954
|
statusLabel(t, task.status),
|
|
3702
|
-
|
|
3703
|
-
|
|
2955
|
+
" · ",
|
|
2956
|
+
new Date(task.createdAt).toLocaleString()
|
|
3704
2957
|
]
|
|
3705
2958
|
})]
|
|
3706
|
-
}), /* @__PURE__ */ (0, react_jsx_runtime.
|
|
2959
|
+
}), /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", {
|
|
3707
2960
|
className: TaskRow_module_css_default.rowActions,
|
|
3708
|
-
children:
|
|
2961
|
+
children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)("button", {
|
|
2962
|
+
type: "button",
|
|
2963
|
+
className: TaskRow_module_css_default.iconBtn,
|
|
2964
|
+
title: t("action.restore"),
|
|
2965
|
+
onClick: () => {
|
|
2966
|
+
restoreTask(task.id).then(() => {
|
|
2967
|
+
showToast(t("toast.restored"));
|
|
2968
|
+
refreshNow();
|
|
2969
|
+
});
|
|
2970
|
+
},
|
|
2971
|
+
children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(Icon, { name: "IconRefreshOutline16" })
|
|
2972
|
+
}), /* @__PURE__ */ (0, react_jsx_runtime.jsx)("button", {
|
|
2973
|
+
type: "button",
|
|
2974
|
+
className: TaskRow_module_css_default.iconBtn,
|
|
2975
|
+
title: t("action.delete"),
|
|
2976
|
+
onClick: () => {
|
|
2977
|
+
deleteTask(task.id).then(() => {
|
|
2978
|
+
showToast(t("toast.deleted"));
|
|
2979
|
+
refreshNow();
|
|
2980
|
+
});
|
|
2981
|
+
},
|
|
2982
|
+
children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(Icon, { name: "IconTrashOutline16" })
|
|
2983
|
+
})]
|
|
2984
|
+
})]
|
|
2985
|
+
});
|
|
2986
|
+
}
|
|
2987
|
+
//#endregion
|
|
2988
|
+
//#region \0dsh-css:C:\Users\胡克劳\lowtide\work\pr8-review\packages\dsh-lowtide\client\components\CandidatesView.module.css.mjs
|
|
2989
|
+
const css$8 = ".rbZ-nG_wrap{flex-direction:column;gap:4px;margin-top:4px;display:flex}.rbZ-nG_toggle{color:var(--dsw-alias-brand-primary);font:var(--dsw-font-xxs-strong-12);cursor:pointer;background:0 0;border:none;border-radius:6px;align-self:flex-start;align-items:center;gap:4px;padding:2px 4px;display:inline-flex}.rbZ-nG_toggle:hover{background:var(--dsw-alias-interactive-bg-hover)}.rbZ-nG_candidate{border:1px solid var(--dsw-alias-border-l1);border-radius:8px;flex-direction:column;gap:3px;padding:6px 8px;display:flex}.rbZ-nG_picked{border-color:var(--dsw-alias-state-success-primary);background:var(--dsw-alias-interactive-bg-hover)}.rbZ-nG_head{align-items:center;gap:8px;display:flex}.rbZ-nG_title{color:var(--dsw-alias-label-primary);font:var(--dsw-font-xs-strong-13)}.rbZ-nG_pickedTag{color:var(--dsw-alias-state-success-primary);font:var(--dsw-font-xxs-12);margin-left:6px}.rbZ-nG_meta{color:var(--dsw-alias-label-tertiary);font:var(--dsw-font-xxs-12);font-variant-numeric:tabular-nums;margin-left:auto}.rbZ-nG_excerpt{color:var(--dsw-alias-label-secondary);font:var(--dsw-font-xxs-12);white-space:pre-wrap;word-break:break-word;max-height:160px;line-height:1.6;overflow-y:auto}";
|
|
2990
|
+
const tagId$8 = "dsh-lowtide/CandidatesView.module.css";
|
|
2991
|
+
if (typeof document !== "undefined" && document.querySelector("style[data-plugin-css=" + JSON.stringify(tagId$8) + "]") === null) {
|
|
2992
|
+
const tag = document.createElement("style");
|
|
2993
|
+
tag.dataset.plugin = "dsh-lowtide";
|
|
2994
|
+
tag.dataset.pluginCss = tagId$8;
|
|
2995
|
+
tag.textContent = css$8;
|
|
2996
|
+
document.head.appendChild(tag);
|
|
2997
|
+
}
|
|
2998
|
+
var CandidatesView_module_css_default = {
|
|
2999
|
+
"meta": "rbZ-nG_meta",
|
|
3000
|
+
"wrap": "rbZ-nG_wrap",
|
|
3001
|
+
"excerpt": "rbZ-nG_excerpt",
|
|
3002
|
+
"candidate": "rbZ-nG_candidate",
|
|
3003
|
+
"head": "rbZ-nG_head",
|
|
3004
|
+
"pickedTag": "rbZ-nG_pickedTag",
|
|
3005
|
+
"toggle": "rbZ-nG_toggle",
|
|
3006
|
+
"title": "rbZ-nG_title",
|
|
3007
|
+
"picked": "rbZ-nG_picked"
|
|
3008
|
+
};
|
|
3009
|
+
//#endregion
|
|
3010
|
+
//#region client/components/CandidatesView.tsx
|
|
3011
|
+
/**
|
|
3012
|
+
* Sampling candidates view (PLAN v2 §1): the N independent results of a
|
|
3013
|
+
* sampling task, each with its own cost. The USER picks the best one the
|
|
3014
|
+
* next morning — the machine never auto-selects or merges. Shared by the
|
|
3015
|
+
* task detail modal and the execution report.
|
|
3016
|
+
*/
|
|
3017
|
+
function CandidatesView({ candidates, chosenIndex, taskId, t }) {
|
|
3018
|
+
const [open, setOpen] = (0, react.useState)(false);
|
|
3019
|
+
if (candidates.length === 0) return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(react_jsx_runtime.Fragment, {});
|
|
3020
|
+
return /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", {
|
|
3021
|
+
className: CandidatesView_module_css_default.wrap,
|
|
3022
|
+
children: [/* @__PURE__ */ (0, react_jsx_runtime.jsxs)("button", {
|
|
3023
|
+
type: "button",
|
|
3024
|
+
className: CandidatesView_module_css_default.toggle,
|
|
3025
|
+
onClick: () => setOpen(!open),
|
|
3026
|
+
children: [open ? /* @__PURE__ */ (0, react_jsx_runtime.jsx)(Icon, { name: "IconChevronDownOutline14" }) : /* @__PURE__ */ (0, react_jsx_runtime.jsx)(Icon, { name: "IconChevronUpOutline14" }), t("report.candidates", { count: candidates.length })]
|
|
3027
|
+
}), open && candidates.map((c, i) => {
|
|
3028
|
+
const picked = chosenIndex === i;
|
|
3029
|
+
return /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", {
|
|
3030
|
+
className: `${CandidatesView_module_css_default.candidate} ${picked ? CandidatesView_module_css_default.picked : ""}`,
|
|
3031
|
+
children: [/* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", {
|
|
3032
|
+
className: CandidatesView_module_css_default.head,
|
|
3033
|
+
children: [
|
|
3034
|
+
/* @__PURE__ */ (0, react_jsx_runtime.jsxs)("span", {
|
|
3035
|
+
className: CandidatesView_module_css_default.title,
|
|
3036
|
+
children: [t("report.candidate", { index: i + 1 }), picked && /* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", {
|
|
3037
|
+
className: CandidatesView_module_css_default.pickedTag,
|
|
3038
|
+
children: t("report.picked")
|
|
3039
|
+
})]
|
|
3040
|
+
}),
|
|
3041
|
+
/* @__PURE__ */ (0, react_jsx_runtime.jsxs)("span", {
|
|
3042
|
+
className: CandidatesView_module_css_default.meta,
|
|
3043
|
+
children: [c.costYuan > 0 ? /* @__PURE__ */ (0, react_jsx_runtime.jsxs)(react_jsx_runtime.Fragment, { children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)(Money, { yuan: c.costYuan }), " · "] }) : /* @__PURE__ */ (0, react_jsx_runtime.jsxs)(react_jsx_runtime.Fragment, { children: [t("report.priceUnknown"), " · "] }), t("report.minutes", { minutes: Math.max(1, Math.round(c.elapsedMs / 6e4)) })]
|
|
3044
|
+
}),
|
|
3045
|
+
/* @__PURE__ */ (0, react_jsx_runtime.jsx)(_deepseek_ai_dsh_client_ui_primitives.Button, {
|
|
3046
|
+
variant: "ghost",
|
|
3047
|
+
size: "sm",
|
|
3048
|
+
disabled: picked,
|
|
3049
|
+
onClick: () => {
|
|
3050
|
+
chooseCandidate(taskId, i).then((r) => {
|
|
3051
|
+
if (r.ok) {
|
|
3052
|
+
showToast(t("report.picked"));
|
|
3053
|
+
refreshNow();
|
|
3054
|
+
} else showToast(r.error ?? "unknown");
|
|
3055
|
+
});
|
|
3056
|
+
},
|
|
3057
|
+
children: picked ? t("report.picked") : t("report.pickThis")
|
|
3058
|
+
})
|
|
3059
|
+
]
|
|
3060
|
+
}), /* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", {
|
|
3061
|
+
className: CandidatesView_module_css_default.excerpt,
|
|
3062
|
+
children: c.excerpt
|
|
3063
|
+
})]
|
|
3064
|
+
}, i);
|
|
3709
3065
|
})]
|
|
3710
3066
|
});
|
|
3711
3067
|
}
|
|
3712
3068
|
//#endregion
|
|
3713
|
-
//#region client
|
|
3069
|
+
//#region \0dsh-css:C:\Users\胡克劳\lowtide\work\pr8-review\packages\dsh-lowtide\client\components\TaskDetail.module.css.mjs
|
|
3070
|
+
const css$7 = ".HWYleW_modalBody{flex-direction:column;gap:10px;display:flex}.HWYleW_modalFooter{justify-content:flex-end;gap:8px;display:flex}.HWYleW_detailPrompt{background:var(--dsw-alias-bg-layer-1);border:1px solid var(--dsw-alias-border-l2);color:var(--dsw-alias-label-primary);font:var(--dsw-font-xs-13);white-space:pre-wrap;word-break:break-word;border-radius:8px;padding:8px 10px;line-height:1.6}.HWYleW_detailGrid{grid-template-columns:1fr 1fr;gap:6px 12px;display:grid}.HWYleW_detailItem{color:var(--dsw-alias-label-tertiary);font:var(--dsw-font-xxs-12)}.HWYleW_detailValue{color:var(--dsw-alias-label-primary);font-family:var(--ds-font-family-code);word-break:break-all}.HWYleW_detailSection{flex-direction:column;gap:3px;display:flex}.HWYleW_detailLabel{color:var(--dsw-alias-label-tertiary);font:var(--dsw-font-xxs-12)}.HWYleW_detailFile{color:var(--dsw-alias-label-secondary);font-family:var(--ds-font-family-code);word-break:break-all;font-size:11px}.HWYleW_detailRun{color:var(--dsw-alias-label-secondary);font:var(--dsw-font-xs-13);font-variant-numeric:tabular-nums}.HWYleW_detailError{color:var(--dsw-alias-state-error-primary);font:var(--dsw-font-xxs-12);background:var(--dsw-alias-interactive-bg-hover);word-break:break-word;border-radius:6px;padding:6px 8px}.HWYleW_detailResumed{color:var(--dsw-alias-state-success-primary);font:var(--dsw-font-xxs-12);background:var(--dsw-alias-interactive-bg-hover);word-break:break-word;border-radius:6px;padding:6px 8px}.HWYleW_detailResumeWarn{color:var(--dsw-alias-state-warn-primary);font:var(--dsw-font-xxs-12);background:var(--dsw-alias-interactive-bg-hover);word-break:break-word;border-radius:6px;padding:6px 8px}.HWYleW_detailReview{color:var(--dsw-alias-label-secondary);font:var(--dsw-font-xs-13)}.HWYleW_detailReview summary{cursor:pointer;color:var(--dsw-alias-label-secondary);font:var(--dsw-font-xxs-12);user-select:none}.HWYleW_detailReviewBody{background:var(--dsw-alias-bg-layer-1);border:1px solid var(--dsw-alias-border-l1);white-space:pre-wrap;word-break:break-word;border-radius:6px;margin-top:4px;padding:6px 8px;line-height:1.6}";
|
|
3071
|
+
const tagId$7 = "dsh-lowtide/TaskDetail.module.css";
|
|
3072
|
+
if (typeof document !== "undefined" && document.querySelector("style[data-plugin-css=" + JSON.stringify(tagId$7) + "]") === null) {
|
|
3073
|
+
const tag = document.createElement("style");
|
|
3074
|
+
tag.dataset.plugin = "dsh-lowtide";
|
|
3075
|
+
tag.dataset.pluginCss = tagId$7;
|
|
3076
|
+
tag.textContent = css$7;
|
|
3077
|
+
document.head.appendChild(tag);
|
|
3078
|
+
}
|
|
3079
|
+
var TaskDetail_module_css_default = {
|
|
3080
|
+
"detailFile": "HWYleW_detailFile",
|
|
3081
|
+
"detailValue": "HWYleW_detailValue",
|
|
3082
|
+
"modalFooter": "HWYleW_modalFooter",
|
|
3083
|
+
"detailResumeWarn": "HWYleW_detailResumeWarn",
|
|
3084
|
+
"detailLabel": "HWYleW_detailLabel",
|
|
3085
|
+
"detailItem": "HWYleW_detailItem",
|
|
3086
|
+
"detailRun": "HWYleW_detailRun",
|
|
3087
|
+
"detailError": "HWYleW_detailError",
|
|
3088
|
+
"detailPrompt": "HWYleW_detailPrompt",
|
|
3089
|
+
"modalBody": "HWYleW_modalBody",
|
|
3090
|
+
"detailResumed": "HWYleW_detailResumed",
|
|
3091
|
+
"detailReview": "HWYleW_detailReview",
|
|
3092
|
+
"detailReviewBody": "HWYleW_detailReviewBody",
|
|
3093
|
+
"detailGrid": "HWYleW_detailGrid",
|
|
3094
|
+
"detailSection": "HWYleW_detailSection"
|
|
3095
|
+
};
|
|
3096
|
+
//#endregion
|
|
3097
|
+
//#region client/components/TaskDetail.tsx
|
|
3714
3098
|
/**
|
|
3715
|
-
*
|
|
3716
|
-
*
|
|
3099
|
+
* TaskDetail (Phase D split): the task drill-down modal — full prompt,
|
|
3100
|
+
* snapshots, strategy, sampling candidates, last run, errors.
|
|
3717
3101
|
*/
|
|
3718
|
-
function
|
|
3719
|
-
|
|
3720
|
-
|
|
3721
|
-
|
|
3722
|
-
|
|
3723
|
-
|
|
3724
|
-
|
|
3725
|
-
|
|
3726
|
-
|
|
3727
|
-
|
|
3728
|
-
|
|
3729
|
-
|
|
3730
|
-
|
|
3731
|
-
|
|
3732
|
-
|
|
3733
|
-
|
|
3734
|
-
|
|
3735
|
-
|
|
3736
|
-
|
|
3737
|
-
|
|
3738
|
-
|
|
3739
|
-
title: t("action.restore"),
|
|
3740
|
-
onClick: () => {
|
|
3741
|
-
restoreTask(task.id).then(() => {
|
|
3742
|
-
showToast(t("toast.restored"));
|
|
3743
|
-
refreshNow();
|
|
3744
|
-
});
|
|
3745
|
-
},
|
|
3746
|
-
children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(Icon, { name: "IconRefreshOutline16" })
|
|
3747
|
-
}), /* @__PURE__ */ (0, react_jsx_runtime.jsx)("button", {
|
|
3748
|
-
type: "button",
|
|
3749
|
-
className: TaskRow_module_css_default.iconBtn,
|
|
3750
|
-
title: t("action.delete"),
|
|
3751
|
-
onClick: () => {
|
|
3752
|
-
deleteTask(task.id).then(() => {
|
|
3753
|
-
showToast(t("toast.deleted"));
|
|
3754
|
-
refreshNow();
|
|
3755
|
-
});
|
|
3756
|
-
},
|
|
3757
|
-
children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(Icon, { name: "IconTrashOutline16" })
|
|
3102
|
+
function TaskDetail({ task, t, onClose, onEdit }) {
|
|
3103
|
+
const strat = strategyLabel(t, task.lastRun?.strategy ?? task.strategy, task.lastRun?.roundsRun);
|
|
3104
|
+
const editable = task.status === "pending-review" || task.status === "queued" || task.status === "deferred";
|
|
3105
|
+
return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(_deepseek_ai_dsh_client_ui_primitives.Modal, {
|
|
3106
|
+
open: true,
|
|
3107
|
+
onClose,
|
|
3108
|
+
title: t("detail.title"),
|
|
3109
|
+
closeLabel: t("detail.close"),
|
|
3110
|
+
description: `${statusLabel(t, task.status)} · ${task.id}`,
|
|
3111
|
+
footer: /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", {
|
|
3112
|
+
className: TaskDetail_module_css_default.modalFooter,
|
|
3113
|
+
children: [editable && onEdit !== void 0 && /* @__PURE__ */ (0, react_jsx_runtime.jsx)(_deepseek_ai_dsh_client_ui_primitives.Button, {
|
|
3114
|
+
variant: "outline",
|
|
3115
|
+
size: "md",
|
|
3116
|
+
onClick: () => onEdit(task),
|
|
3117
|
+
children: t("action.edit")
|
|
3118
|
+
}), /* @__PURE__ */ (0, react_jsx_runtime.jsx)(_deepseek_ai_dsh_client_ui_primitives.Button, {
|
|
3119
|
+
variant: "primary",
|
|
3120
|
+
size: "md",
|
|
3121
|
+
onClick: onClose,
|
|
3122
|
+
children: t("detail.close")
|
|
3758
3123
|
})]
|
|
3759
|
-
})
|
|
3124
|
+
}),
|
|
3125
|
+
children: /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", {
|
|
3126
|
+
className: TaskDetail_module_css_default.modalBody,
|
|
3127
|
+
children: [
|
|
3128
|
+
/* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", {
|
|
3129
|
+
className: TaskDetail_module_css_default.detailPrompt,
|
|
3130
|
+
children: task.prompt
|
|
3131
|
+
}),
|
|
3132
|
+
/* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", {
|
|
3133
|
+
className: TaskDetail_module_css_default.detailGrid,
|
|
3134
|
+
children: [
|
|
3135
|
+
/* @__PURE__ */ (0, react_jsx_runtime.jsxs)("span", {
|
|
3136
|
+
className: TaskDetail_module_css_default.detailItem,
|
|
3137
|
+
children: [
|
|
3138
|
+
t("detail.workspace"),
|
|
3139
|
+
" ",
|
|
3140
|
+
/* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", {
|
|
3141
|
+
className: TaskDetail_module_css_default.detailValue,
|
|
3142
|
+
children: task.workspace
|
|
3143
|
+
})
|
|
3144
|
+
]
|
|
3145
|
+
}),
|
|
3146
|
+
/* @__PURE__ */ (0, react_jsx_runtime.jsxs)("span", {
|
|
3147
|
+
className: TaskDetail_module_css_default.detailItem,
|
|
3148
|
+
children: [
|
|
3149
|
+
t("detail.priority"),
|
|
3150
|
+
" ",
|
|
3151
|
+
/* @__PURE__ */ (0, react_jsx_runtime.jsxs)("span", {
|
|
3152
|
+
className: TaskDetail_module_css_default.detailValue,
|
|
3153
|
+
children: ["P", task.priority]
|
|
3154
|
+
})
|
|
3155
|
+
]
|
|
3156
|
+
}),
|
|
3157
|
+
/* @__PURE__ */ (0, react_jsx_runtime.jsxs)("span", {
|
|
3158
|
+
className: TaskDetail_module_css_default.detailItem,
|
|
3159
|
+
children: [
|
|
3160
|
+
t("detail.permission"),
|
|
3161
|
+
" ",
|
|
3162
|
+
/* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", {
|
|
3163
|
+
className: TaskDetail_module_css_default.detailValue,
|
|
3164
|
+
children: task.permissionPreset
|
|
3165
|
+
})
|
|
3166
|
+
]
|
|
3167
|
+
}),
|
|
3168
|
+
/* @__PURE__ */ (0, react_jsx_runtime.jsxs)("span", {
|
|
3169
|
+
className: TaskDetail_module_css_default.detailItem,
|
|
3170
|
+
children: [
|
|
3171
|
+
t("detail.created"),
|
|
3172
|
+
" ",
|
|
3173
|
+
/* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", {
|
|
3174
|
+
className: TaskDetail_module_css_default.detailValue,
|
|
3175
|
+
children: new Date(task.createdAt).toLocaleString()
|
|
3176
|
+
})
|
|
3177
|
+
]
|
|
3178
|
+
}),
|
|
3179
|
+
(task.editCount ?? 0) > 0 && /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("span", {
|
|
3180
|
+
className: TaskDetail_module_css_default.detailItem,
|
|
3181
|
+
children: [
|
|
3182
|
+
t("detail.edited"),
|
|
3183
|
+
" ",
|
|
3184
|
+
/* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", {
|
|
3185
|
+
className: TaskDetail_module_css_default.detailValue,
|
|
3186
|
+
children: t("detail.editedCount", { count: task.editCount ?? 0 })
|
|
3187
|
+
})
|
|
3188
|
+
]
|
|
3189
|
+
}),
|
|
3190
|
+
task.model !== void 0 && /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("span", {
|
|
3191
|
+
className: TaskDetail_module_css_default.detailItem,
|
|
3192
|
+
children: [
|
|
3193
|
+
t("detail.model"),
|
|
3194
|
+
" ",
|
|
3195
|
+
/* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", {
|
|
3196
|
+
className: TaskDetail_module_css_default.detailValue,
|
|
3197
|
+
children: task.modelProvider !== void 0 ? `${task.modelProvider} / ${task.model}` : task.model
|
|
3198
|
+
})
|
|
3199
|
+
]
|
|
3200
|
+
}),
|
|
3201
|
+
task.model !== void 0 && /* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", {
|
|
3202
|
+
className: TaskDetail_module_css_default.detailItem,
|
|
3203
|
+
children: task.estimateYuan !== void 0 ? t("detail.estimateKnown", {
|
|
3204
|
+
yuan: task.estimateYuan.toFixed(2),
|
|
3205
|
+
tier: strat,
|
|
3206
|
+
minutes: task.estimateMinutes ?? 30
|
|
3207
|
+
}) : t("detail.estimateUnknown")
|
|
3208
|
+
}),
|
|
3209
|
+
task.strategy !== void 0 && task.strategy !== "single" && /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("span", {
|
|
3210
|
+
className: TaskDetail_module_css_default.detailItem,
|
|
3211
|
+
children: [
|
|
3212
|
+
t("modal.strategy"),
|
|
3213
|
+
" ",
|
|
3214
|
+
/* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", {
|
|
3215
|
+
className: TaskDetail_module_css_default.detailValue,
|
|
3216
|
+
children: strat
|
|
3217
|
+
})
|
|
3218
|
+
]
|
|
3219
|
+
}),
|
|
3220
|
+
task.triagedBy !== void 0 && /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("span", {
|
|
3221
|
+
className: TaskDetail_module_css_default.detailItem,
|
|
3222
|
+
children: [
|
|
3223
|
+
t("detail.triaged"),
|
|
3224
|
+
" ",
|
|
3225
|
+
/* @__PURE__ */ (0, react_jsx_runtime.jsxs)("span", {
|
|
3226
|
+
className: TaskDetail_module_css_default.detailValue,
|
|
3227
|
+
children: [task.triagedBy === "auto-l3" ? t("detail.triagedAuto") : t("detail.triagedUser"), task.triagedAt !== void 0 ? ` · ${new Date(task.triagedAt).toLocaleString()}` : ""]
|
|
3228
|
+
})
|
|
3229
|
+
]
|
|
3230
|
+
}),
|
|
3231
|
+
task.continuesFromSession !== void 0 && /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("span", {
|
|
3232
|
+
className: TaskDetail_module_css_default.detailItem,
|
|
3233
|
+
children: [
|
|
3234
|
+
t("detail.continuesFromSession"),
|
|
3235
|
+
" ",
|
|
3236
|
+
/* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", {
|
|
3237
|
+
className: TaskDetail_module_css_default.detailValue,
|
|
3238
|
+
children: task.continuesFromSession
|
|
3239
|
+
})
|
|
3240
|
+
]
|
|
3241
|
+
})
|
|
3242
|
+
]
|
|
3243
|
+
}),
|
|
3244
|
+
task.files.length > 0 && /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", {
|
|
3245
|
+
className: TaskDetail_module_css_default.detailSection,
|
|
3246
|
+
children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", {
|
|
3247
|
+
className: TaskDetail_module_css_default.detailLabel,
|
|
3248
|
+
children: t("detail.files")
|
|
3249
|
+
}), task.files.map((f) => /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", {
|
|
3250
|
+
className: TaskDetail_module_css_default.detailFile,
|
|
3251
|
+
children: [f.path, f.size !== void 0 ? t("detail.bytes", { size: f.size }) : ""]
|
|
3252
|
+
}, f.path))]
|
|
3253
|
+
}),
|
|
3254
|
+
task.lastRun !== void 0 && /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", {
|
|
3255
|
+
className: TaskDetail_module_css_default.detailSection,
|
|
3256
|
+
children: [
|
|
3257
|
+
/* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", {
|
|
3258
|
+
className: TaskDetail_module_css_default.detailLabel,
|
|
3259
|
+
children: t("detail.lastRun")
|
|
3260
|
+
}),
|
|
3261
|
+
/* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", {
|
|
3262
|
+
className: TaskDetail_module_css_default.detailRun,
|
|
3263
|
+
children: [
|
|
3264
|
+
statusLabel(t, task.lastRun.status),
|
|
3265
|
+
strat !== "" && /* @__PURE__ */ (0, react_jsx_runtime.jsxs)(react_jsx_runtime.Fragment, { children: [" · ", strat] }),
|
|
3266
|
+
" · ",
|
|
3267
|
+
t("detail.minutes", { minutes: Math.round((task.lastRun.elapsedMs ?? 0) / 6e4) }),
|
|
3268
|
+
task.estimateYuan !== void 0 ? /* @__PURE__ */ (0, react_jsx_runtime.jsxs)(react_jsx_runtime.Fragment, { children: [" · ", /* @__PURE__ */ (0, react_jsx_runtime.jsx)(Money, { yuan: task.lastRun.costYuan ?? 0 })] }) : /* @__PURE__ */ (0, react_jsx_runtime.jsxs)(react_jsx_runtime.Fragment, { children: [" · ", t("report.priceUnknown")] }),
|
|
3269
|
+
task.lastRun.diffStat !== null && task.lastRun.diffStat !== void 0 && /* @__PURE__ */ (0, react_jsx_runtime.jsxs)(react_jsx_runtime.Fragment, { children: [" · ", task.lastRun.diffStat] })
|
|
3270
|
+
]
|
|
3271
|
+
}),
|
|
3272
|
+
task.lastRun.error !== void 0 && /* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", {
|
|
3273
|
+
className: TaskDetail_module_css_default.detailError,
|
|
3274
|
+
children: task.lastRun.error
|
|
3275
|
+
}),
|
|
3276
|
+
task.lastRun.resumed === true && /* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", {
|
|
3277
|
+
className: TaskDetail_module_css_default.detailResumed,
|
|
3278
|
+
children: t("detail.resumed")
|
|
3279
|
+
}),
|
|
3280
|
+
task.lastRun.forked === true && /* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", {
|
|
3281
|
+
className: TaskDetail_module_css_default.detailResumed,
|
|
3282
|
+
children: t("detail.forked")
|
|
3283
|
+
}),
|
|
3284
|
+
task.lastRun.resumeNote !== void 0 && /* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", {
|
|
3285
|
+
className: TaskDetail_module_css_default.detailResumeWarn,
|
|
3286
|
+
children: task.lastRun.resumeNote
|
|
3287
|
+
}),
|
|
3288
|
+
task.lastRun.candidates !== void 0 && task.lastRun.candidates.length > 0 && /* @__PURE__ */ (0, react_jsx_runtime.jsx)(CandidatesView, {
|
|
3289
|
+
candidates: task.lastRun.candidates,
|
|
3290
|
+
chosenIndex: task.chosenCandidateIndex,
|
|
3291
|
+
taskId: task.id,
|
|
3292
|
+
t
|
|
3293
|
+
}),
|
|
3294
|
+
task.lastRun.reviewExcerpt !== void 0 && /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("details", {
|
|
3295
|
+
className: TaskDetail_module_css_default.detailReview,
|
|
3296
|
+
children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)("summary", { children: t("report.reviewExcerpt") }), /* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", {
|
|
3297
|
+
className: TaskDetail_module_css_default.detailReviewBody,
|
|
3298
|
+
children: task.lastRun.reviewExcerpt
|
|
3299
|
+
})]
|
|
3300
|
+
})
|
|
3301
|
+
]
|
|
3302
|
+
}),
|
|
3303
|
+
task.lastError !== void 0 && /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", {
|
|
3304
|
+
className: TaskDetail_module_css_default.detailSection,
|
|
3305
|
+
children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", {
|
|
3306
|
+
className: TaskDetail_module_css_default.detailLabel,
|
|
3307
|
+
children: t("detail.error")
|
|
3308
|
+
}), /* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", {
|
|
3309
|
+
className: TaskDetail_module_css_default.detailError,
|
|
3310
|
+
children: task.lastError
|
|
3311
|
+
})]
|
|
3312
|
+
})
|
|
3313
|
+
]
|
|
3314
|
+
})
|
|
3760
3315
|
});
|
|
3761
3316
|
}
|
|
3762
3317
|
//#endregion
|
|
3763
|
-
//#region \0dsh-css:
|
|
3764
|
-
const css$6 = ".
|
|
3765
|
-
const tagId$6 = "dsh-lowtide/
|
|
3318
|
+
//#region \0dsh-css:C:\Users\胡克劳\lowtide\work\pr8-review\packages\dsh-lowtide\client\components\TaskForm.module.css.mjs
|
|
3319
|
+
const css$6 = ".d4fQDW_modal{flex-direction:column;gap:10px;display:flex}.d4fQDW_compact{flex-direction:column;gap:8px;display:flex}.d4fQDW_prompt{box-sizing:border-box;background:var(--dsw-alias-bg-layer-1);border:1px solid var(--dsw-alias-border-l2);width:100%;color:var(--dsw-alias-label-primary);font:var(--dsw-font-base-16);resize:vertical;border-radius:8px;outline:none;padding:8px 12px}.d4fQDW_prompt:focus{border-color:var(--dsw-alias-brand-primary)}.d4fQDW_guidanceInput{box-sizing:border-box;background:var(--dsw-alias-bg-layer-1);border:1px solid var(--dsw-alias-border-l2);width:100%;color:var(--dsw-alias-label-primary);font:var(--dsw-font-xs-13);resize:vertical;border-radius:8px;outline:none;padding:6px 10px}.d4fQDW_guidanceInput:focus{border-color:var(--dsw-alias-brand-primary)}.d4fQDW_field{flex-direction:column;gap:4px;display:flex}.d4fQDW_fieldLabel{color:var(--dsw-alias-label-secondary);font:var(--dsw-font-xs-13)}.d4fQDW_fieldInput{box-sizing:border-box;background:var(--dsw-alias-bg-layer-1);border:1px solid var(--dsw-alias-border-l2);width:100%;height:32px;color:var(--dsw-alias-label-primary);font-family:var(--ds-font-family-code);border-radius:8px;outline:none;padding:0 8px;font-size:12px}.d4fQDW_fieldInput:focus{border-color:var(--dsw-alias-brand-primary)}.d4fQDW_compactRow{align-items:center;gap:8px;display:flex}.d4fQDW_compactLabel{color:var(--dsw-alias-label-secondary);font:var(--dsw-font-xs-13);white-space:nowrap}.d4fQDW_compactInput{background:var(--dsw-alias-bg-layer-1);border:1px solid var(--dsw-alias-border-l2);height:28px;color:var(--dsw-alias-label-primary);font-family:var(--ds-font-family-code);border-radius:6px;outline:none;flex:1;padding:0 8px;font-size:12px}.d4fQDW_compactInput:focus{border-color:var(--dsw-alias-brand-primary)}.d4fQDW_warning{color:var(--dsw-alias-state-warn-primary);font:var(--dsw-font-xxs-12);align-items:center;gap:4px;display:inline-flex}.d4fQDW_warningIcon{color:var(--dsw-alias-state-warn-primary)}.d4fQDW_pillRow{flex-wrap:wrap;align-items:center;gap:6px;display:flex}.d4fQDW_autonomyBtn{display:inline-flex}.d4fQDW_sessionPickRow{flex-direction:column;gap:6px;display:flex}.d4fQDW_strategyPill{border:1px solid var(--dsw-alias-border-l2);color:var(--dsw-alias-label-secondary);font:var(--dsw-font-xs-13);cursor:pointer;user-select:none;border-radius:999px;align-items:center;gap:4px;padding:4px 12px;display:inline-flex}.d4fQDW_strategyPill:hover{background:var(--dsw-alias-interactive-bg-hover)}.d4fQDW_strategyActive{border-color:var(--dsw-alias-brand-primary);color:var(--dsw-alias-brand-primary);font-weight:600}.d4fQDW_costTag{color:var(--dsw-alias-label-tertiary);margin-left:2px;font-size:10px;font-weight:400}.d4fQDW_strategyHint{color:var(--dsw-alias-label-tertiary);font:var(--dsw-font-xxs-12);line-height:1.5}.d4fQDW_advancedBtn{border:1px solid var(--dsw-alias-border-l2);color:var(--dsw-alias-label-secondary);font:var(--dsw-font-xs-13);cursor:pointer;background:0 0;border-radius:8px;align-self:flex-start;align-items:center;gap:6px;padding:5px 12px;display:inline-flex}.d4fQDW_advancedBtn:hover{background:var(--dsw-alias-interactive-bg-hover);color:var(--dsw-alias-label-primary)}.d4fQDW_advancedBody{flex-direction:column;gap:12px;display:flex}.d4fQDW_advancedIcon{vertical-align:-2px;color:var(--dsw-alias-label-tertiary);margin-right:5px}.d4fQDW_modelFallbackRow{grid-template-columns:1fr 1fr;gap:8px;display:grid}";
|
|
3320
|
+
const tagId$6 = "dsh-lowtide/TaskForm.module.css";
|
|
3766
3321
|
if (typeof document !== "undefined" && document.querySelector("style[data-plugin-css=" + JSON.stringify(tagId$6) + "]") === null) {
|
|
3767
3322
|
const tag = document.createElement("style");
|
|
3768
3323
|
tag.dataset.plugin = "dsh-lowtide";
|
|
@@ -3770,340 +3325,590 @@ window.__ModuleLoader__.load({
|
|
|
3770
3325
|
tag.textContent = css$6;
|
|
3771
3326
|
document.head.appendChild(tag);
|
|
3772
3327
|
}
|
|
3773
|
-
var
|
|
3774
|
-
"
|
|
3775
|
-
"
|
|
3776
|
-
"
|
|
3777
|
-
"
|
|
3778
|
-
"
|
|
3779
|
-
"
|
|
3780
|
-
"
|
|
3781
|
-
"
|
|
3782
|
-
"
|
|
3328
|
+
var TaskForm_module_css_default = {
|
|
3329
|
+
"prompt": "d4fQDW_prompt",
|
|
3330
|
+
"fieldInput": "d4fQDW_fieldInput",
|
|
3331
|
+
"advancedBtn": "d4fQDW_advancedBtn",
|
|
3332
|
+
"advancedBody": "d4fQDW_advancedBody",
|
|
3333
|
+
"pillRow": "d4fQDW_pillRow",
|
|
3334
|
+
"strategyPill": "d4fQDW_strategyPill",
|
|
3335
|
+
"advancedIcon": "d4fQDW_advancedIcon",
|
|
3336
|
+
"warningIcon": "d4fQDW_warningIcon",
|
|
3337
|
+
"guidanceInput": "d4fQDW_guidanceInput",
|
|
3338
|
+
"costTag": "d4fQDW_costTag",
|
|
3339
|
+
"modelFallbackRow": "d4fQDW_modelFallbackRow",
|
|
3340
|
+
"strategyHint": "d4fQDW_strategyHint",
|
|
3341
|
+
"fieldLabel": "d4fQDW_fieldLabel",
|
|
3342
|
+
"compactRow": "d4fQDW_compactRow",
|
|
3343
|
+
"autonomyBtn": "d4fQDW_autonomyBtn",
|
|
3344
|
+
"modal": "d4fQDW_modal",
|
|
3345
|
+
"field": "d4fQDW_field",
|
|
3346
|
+
"warning": "d4fQDW_warning",
|
|
3347
|
+
"compactLabel": "d4fQDW_compactLabel",
|
|
3348
|
+
"compact": "d4fQDW_compact",
|
|
3349
|
+
"sessionPickRow": "d4fQDW_sessionPickRow",
|
|
3350
|
+
"compactInput": "d4fQDW_compactInput",
|
|
3351
|
+
"strategyActive": "d4fQDW_strategyActive"
|
|
3783
3352
|
};
|
|
3784
3353
|
//#endregion
|
|
3785
|
-
//#region client/components/
|
|
3786
|
-
|
|
3787
|
-
|
|
3788
|
-
|
|
3789
|
-
|
|
3790
|
-
|
|
3791
|
-
|
|
3792
|
-
|
|
3793
|
-
|
|
3794
|
-
|
|
3354
|
+
//#region client/components/TaskForm.tsx
|
|
3355
|
+
const PROMPT_PLACEHOLDER_KEYS = {
|
|
3356
|
+
single: "modal.promptPlaceholderSingle",
|
|
3357
|
+
iterative: "modal.promptPlaceholderIterative",
|
|
3358
|
+
sampling: "modal.promptPlaceholderSampling",
|
|
3359
|
+
review: "modal.promptPlaceholderReview"
|
|
3360
|
+
};
|
|
3361
|
+
const STRATEGY_LABEL_KEYS = {
|
|
3362
|
+
single: "strategy.single",
|
|
3363
|
+
iterative: "strategy.iterative",
|
|
3364
|
+
sampling: "strategy.sampling",
|
|
3365
|
+
review: "strategy.review"
|
|
3366
|
+
};
|
|
3367
|
+
const STRATEGY_HINT_KEYS = {
|
|
3368
|
+
single: "strategy.singleHint",
|
|
3369
|
+
iterative: "strategy.iterativeHint",
|
|
3370
|
+
sampling: "strategy.samplingHint",
|
|
3371
|
+
review: "strategy.reviewHint"
|
|
3372
|
+
};
|
|
3373
|
+
const STRATEGY_HINT_LABEL_KEYS = {
|
|
3374
|
+
single: null,
|
|
3375
|
+
iterative: "modal.strategyHintIterative",
|
|
3376
|
+
sampling: "modal.strategyHintSampling",
|
|
3377
|
+
review: "modal.strategyHintReview"
|
|
3378
|
+
};
|
|
3379
|
+
const STRATEGY_HINT_PLACEHOLDER_KEYS = {
|
|
3380
|
+
single: null,
|
|
3381
|
+
iterative: "strategyHintPlaceholderIterative",
|
|
3382
|
+
sampling: "strategyHintPlaceholderSampling",
|
|
3383
|
+
review: "strategyHintPlaceholderReview"
|
|
3384
|
+
};
|
|
3385
|
+
/** Cost factor label for each strategy (displayed on the pill). */
|
|
3386
|
+
function strategyCostFactor(s, rounds) {
|
|
3387
|
+
if (s === "single") return "1×";
|
|
3388
|
+
if (s === "review") return "2×";
|
|
3389
|
+
if (s === "iterative") return `~${rounds}×`;
|
|
3390
|
+
return `${rounds}×`;
|
|
3391
|
+
}
|
|
3392
|
+
/** Pick one random option from a '|||'-delimited i18n string. */
|
|
3393
|
+
function randomPick(localized) {
|
|
3394
|
+
const options = localized.split("|||");
|
|
3395
|
+
return options[Math.floor(Math.random() * options.length)];
|
|
3396
|
+
}
|
|
3397
|
+
/** Label for a reasoning effort: the adapter's native name, or the raw id. */
|
|
3398
|
+
function reasoningLabel(effort) {
|
|
3399
|
+
return effort.name !== "" ? effort.name : effort.id;
|
|
3400
|
+
}
|
|
3401
|
+
/** Reasoning efforts to offer for a given model (fallback = standard set). */
|
|
3402
|
+
function reasoningOptions(model) {
|
|
3403
|
+
const efforts = model?.reasoningEfforts;
|
|
3404
|
+
if (efforts !== void 0 && efforts.length > 0) return [...efforts];
|
|
3405
|
+
return [
|
|
3406
|
+
"off",
|
|
3407
|
+
"low",
|
|
3408
|
+
"high",
|
|
3409
|
+
"max"
|
|
3410
|
+
].map((id) => ({
|
|
3411
|
+
id,
|
|
3412
|
+
name: id
|
|
3413
|
+
}));
|
|
3414
|
+
}
|
|
3415
|
+
/** 运行模式(自治级别)按钮组:标签 / 悬停一句话 / 选中后说明行。 */
|
|
3416
|
+
const AUTONOMY_LABEL_KEYS = {
|
|
3417
|
+
l1: "autonomy.l1",
|
|
3418
|
+
l2: "autonomy.l2",
|
|
3419
|
+
l3: "autonomy.l3"
|
|
3420
|
+
};
|
|
3421
|
+
const AUTONOMY_HINT_KEYS = {
|
|
3422
|
+
l1: "autonomy.l1Hint",
|
|
3423
|
+
l2: "autonomy.l2Hint",
|
|
3424
|
+
l3: "autonomy.l3Hint"
|
|
3425
|
+
};
|
|
3426
|
+
const AUTONOMY_DESC_KEYS = {
|
|
3427
|
+
l1: "autonomy.l1Desc",
|
|
3428
|
+
l2: "autonomy.l2Desc",
|
|
3429
|
+
l3: "autonomy.l3Desc"
|
|
3430
|
+
};
|
|
3431
|
+
/** Relative "x min/h ago" label for a session's last activity; falls back
|
|
3432
|
+
* to an absolute "MM-DD HH:mm" label once the session is a day old. */
|
|
3433
|
+
function sessionTimeLabel(lastModified, t) {
|
|
3434
|
+
const diff = Date.now() - lastModified;
|
|
3435
|
+
if (diff < 6e4) return t("modal.time.justNow");
|
|
3436
|
+
if (diff < 36e5) return t("modal.time.minutesAgo", { n: Math.floor(diff / 6e4) });
|
|
3437
|
+
if (diff < 864e5) return t("modal.time.hoursAgo", { n: Math.floor(diff / 36e5) });
|
|
3438
|
+
const d = new Date(lastModified);
|
|
3439
|
+
const pad = (n) => String(n).padStart(2, "0");
|
|
3440
|
+
return `${pad(d.getMonth() + 1)}-${pad(d.getDate())} ${pad(d.getHours())}:${pad(d.getMinutes())}`;
|
|
3441
|
+
}
|
|
3442
|
+
function TaskForm(props) {
|
|
3443
|
+
const { t, variant, values, onChange } = props;
|
|
3444
|
+
if (variant === "intercept") return /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", {
|
|
3445
|
+
className: TaskForm_module_css_default.compact,
|
|
3446
|
+
children: [/* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", {
|
|
3447
|
+
className: TaskForm_module_css_default.compactRow,
|
|
3448
|
+
children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", {
|
|
3449
|
+
className: TaskForm_module_css_default.compactLabel,
|
|
3450
|
+
children: t("intercept.workspaceLabel")
|
|
3451
|
+
}), /* @__PURE__ */ (0, react_jsx_runtime.jsx)("input", {
|
|
3452
|
+
className: TaskForm_module_css_default.compactInput,
|
|
3453
|
+
value: values.workspace,
|
|
3454
|
+
onChange: (e) => onChange({ workspace: e.target.value }),
|
|
3455
|
+
placeholder: t("intercept.workspacePlaceholder")
|
|
3456
|
+
})]
|
|
3457
|
+
}), values.workspace.trim() === "" && /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", {
|
|
3458
|
+
className: TaskForm_module_css_default.warning,
|
|
3459
|
+
children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)(Icon, {
|
|
3460
|
+
name: "IconWarningOutline16",
|
|
3461
|
+
className: TaskForm_module_css_default.warningIcon
|
|
3462
|
+
}), t("intercept.workspaceWarning")]
|
|
3463
|
+
})]
|
|
3464
|
+
});
|
|
3465
|
+
const strategy = values.strategy;
|
|
3466
|
+
const showRounds = strategy === "iterative" || strategy === "sampling";
|
|
3467
|
+
const hintLabelKey = STRATEGY_HINT_LABEL_KEYS[strategy];
|
|
3468
|
+
const hintPlaceholderKey = STRATEGY_HINT_PLACEHOLDER_KEYS[strategy];
|
|
3469
|
+
const promptPlaceholder = (0, react.useMemo)(() => randomPick(t(PROMPT_PLACEHOLDER_KEYS[strategy])), [strategy, t]);
|
|
3470
|
+
const hintPlaceholder = (0, react.useMemo)(() => {
|
|
3471
|
+
const key = hintPlaceholderKey;
|
|
3472
|
+
return key !== null ? randomPick(t(key)) : "";
|
|
3473
|
+
}, [strategy, t]);
|
|
3795
3474
|
return /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", {
|
|
3796
|
-
className:
|
|
3797
|
-
children: [
|
|
3798
|
-
|
|
3799
|
-
|
|
3800
|
-
|
|
3801
|
-
|
|
3802
|
-
|
|
3803
|
-
|
|
3804
|
-
|
|
3805
|
-
|
|
3806
|
-
|
|
3807
|
-
|
|
3808
|
-
|
|
3809
|
-
|
|
3810
|
-
|
|
3811
|
-
|
|
3812
|
-
|
|
3813
|
-
|
|
3814
|
-
|
|
3815
|
-
|
|
3816
|
-
|
|
3817
|
-
|
|
3818
|
-
|
|
3819
|
-
|
|
3820
|
-
|
|
3821
|
-
|
|
3822
|
-
|
|
3823
|
-
|
|
3824
|
-
onClick: () => {
|
|
3825
|
-
chooseCandidate(taskId, i).then((r) => {
|
|
3826
|
-
if (r.ok) {
|
|
3827
|
-
showToast(t("report.picked"));
|
|
3828
|
-
refreshNow();
|
|
3829
|
-
} else showToast(r.error ?? "unknown");
|
|
3830
|
-
});
|
|
3475
|
+
className: TaskForm_module_css_default.modal,
|
|
3476
|
+
children: [
|
|
3477
|
+
/* @__PURE__ */ (0, react_jsx_runtime.jsx)("textarea", {
|
|
3478
|
+
className: TaskForm_module_css_default.prompt,
|
|
3479
|
+
placeholder: promptPlaceholder,
|
|
3480
|
+
value: values.prompt,
|
|
3481
|
+
onChange: (e) => onChange({ prompt: e.target.value }),
|
|
3482
|
+
rows: 4,
|
|
3483
|
+
autoFocus: props.autoFocusPrompt
|
|
3484
|
+
}),
|
|
3485
|
+
/* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", {
|
|
3486
|
+
className: TaskForm_module_css_default.field,
|
|
3487
|
+
children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", {
|
|
3488
|
+
className: TaskForm_module_css_default.fieldLabel,
|
|
3489
|
+
children: t("modal.workspace")
|
|
3490
|
+
}), (() => {
|
|
3491
|
+
const ws = props.workspaces ?? [];
|
|
3492
|
+
if (ws.length > 0) {
|
|
3493
|
+
const CUSTOM = "__custom__";
|
|
3494
|
+
const isCustom = values.workspace !== "" && !ws.some((w) => w.path === values.workspace);
|
|
3495
|
+
const currentValue = isCustom ? CUSTOM : values.workspace;
|
|
3496
|
+
return /* @__PURE__ */ (0, react_jsx_runtime.jsxs)(react_jsx_runtime.Fragment, { children: [/* @__PURE__ */ (0, react_jsx_runtime.jsxs)("select", {
|
|
3497
|
+
className: TaskForm_module_css_default.fieldInput,
|
|
3498
|
+
value: currentValue,
|
|
3499
|
+
onChange: (e) => {
|
|
3500
|
+
const v = e.target.value;
|
|
3501
|
+
if (v === CUSTOM) return;
|
|
3502
|
+
onChange({ workspace: v });
|
|
3831
3503
|
},
|
|
3832
|
-
children:
|
|
3833
|
-
|
|
3834
|
-
|
|
3504
|
+
children: [
|
|
3505
|
+
/* @__PURE__ */ (0, react_jsx_runtime.jsx)("option", {
|
|
3506
|
+
value: "",
|
|
3507
|
+
children: t("modal.workspaceDefault")
|
|
3508
|
+
}),
|
|
3509
|
+
ws.map((w) => /* @__PURE__ */ (0, react_jsx_runtime.jsx)("option", {
|
|
3510
|
+
value: w.path,
|
|
3511
|
+
children: w.title !== null ? `${w.title} · ${w.path}` : w.path
|
|
3512
|
+
}, w.path)),
|
|
3513
|
+
/* @__PURE__ */ (0, react_jsx_runtime.jsx)("option", {
|
|
3514
|
+
value: CUSTOM,
|
|
3515
|
+
children: t("modal.workspaceCustom")
|
|
3516
|
+
})
|
|
3517
|
+
]
|
|
3518
|
+
}), isCustom && /* @__PURE__ */ (0, react_jsx_runtime.jsx)("input", {
|
|
3519
|
+
className: TaskForm_module_css_default.fieldInput,
|
|
3520
|
+
value: values.workspace,
|
|
3521
|
+
onChange: (e) => onChange({ workspace: e.target.value }),
|
|
3522
|
+
placeholder: t("modal.workspacePlaceholder")
|
|
3523
|
+
})] });
|
|
3524
|
+
}
|
|
3525
|
+
return /* @__PURE__ */ (0, react_jsx_runtime.jsx)("input", {
|
|
3526
|
+
className: TaskForm_module_css_default.fieldInput,
|
|
3527
|
+
value: values.workspace,
|
|
3528
|
+
onChange: (e) => onChange({ workspace: e.target.value }),
|
|
3529
|
+
placeholder: t("modal.workspacePlaceholder")
|
|
3530
|
+
});
|
|
3531
|
+
})()]
|
|
3532
|
+
}),
|
|
3533
|
+
/* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", {
|
|
3534
|
+
className: TaskForm_module_css_default.field,
|
|
3535
|
+
children: [
|
|
3536
|
+
/* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", {
|
|
3537
|
+
className: TaskForm_module_css_default.fieldLabel,
|
|
3538
|
+
children: t("modal.strategy")
|
|
3539
|
+
}),
|
|
3540
|
+
/* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", {
|
|
3541
|
+
className: TaskForm_module_css_default.pillRow,
|
|
3542
|
+
children: [
|
|
3543
|
+
"single",
|
|
3544
|
+
"iterative",
|
|
3545
|
+
"sampling",
|
|
3546
|
+
"review"
|
|
3547
|
+
].map((s) => /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("span", {
|
|
3548
|
+
className: `${TaskForm_module_css_default.strategyPill} ${strategy === s ? TaskForm_module_css_default.strategyActive : ""}`,
|
|
3549
|
+
onClick: () => onChange({ strategy: s }),
|
|
3550
|
+
children: [t(STRATEGY_LABEL_KEYS[s]), /* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", {
|
|
3551
|
+
className: TaskForm_module_css_default.costTag,
|
|
3552
|
+
children: strategyCostFactor(s, values.rounds)
|
|
3553
|
+
})]
|
|
3554
|
+
}, s))
|
|
3555
|
+
}),
|
|
3556
|
+
/* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", {
|
|
3557
|
+
className: TaskForm_module_css_default.strategyHint,
|
|
3558
|
+
children: t(STRATEGY_HINT_KEYS[strategy])
|
|
3559
|
+
})
|
|
3560
|
+
]
|
|
3561
|
+
}),
|
|
3562
|
+
showRounds && /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", {
|
|
3563
|
+
className: TaskForm_module_css_default.field,
|
|
3564
|
+
children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", {
|
|
3565
|
+
className: TaskForm_module_css_default.fieldLabel,
|
|
3566
|
+
children: t("modal.rounds")
|
|
3835
3567
|
}), /* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", {
|
|
3836
|
-
className:
|
|
3837
|
-
children:
|
|
3568
|
+
className: TaskForm_module_css_default.pillRow,
|
|
3569
|
+
children: [
|
|
3570
|
+
2,
|
|
3571
|
+
3,
|
|
3572
|
+
4,
|
|
3573
|
+
5
|
|
3574
|
+
].map((r) => /* @__PURE__ */ (0, react_jsx_runtime.jsx)(_deepseek_ai_dsh_client_ui_primitives.Pill, {
|
|
3575
|
+
active: values.rounds === r,
|
|
3576
|
+
onClick: () => onChange({ rounds: r }),
|
|
3577
|
+
children: r
|
|
3578
|
+
}, r))
|
|
3838
3579
|
})]
|
|
3839
|
-
},
|
|
3840
|
-
|
|
3841
|
-
|
|
3842
|
-
|
|
3843
|
-
|
|
3844
|
-
|
|
3845
|
-
|
|
3846
|
-
|
|
3847
|
-
|
|
3848
|
-
|
|
3849
|
-
|
|
3850
|
-
|
|
3851
|
-
|
|
3852
|
-
|
|
3853
|
-
|
|
3854
|
-
|
|
3855
|
-
|
|
3856
|
-
|
|
3857
|
-
|
|
3858
|
-
|
|
3859
|
-
|
|
3860
|
-
|
|
3861
|
-
|
|
3862
|
-
|
|
3863
|
-
|
|
3864
|
-
|
|
3865
|
-
|
|
3866
|
-
|
|
3867
|
-
|
|
3868
|
-
|
|
3869
|
-
|
|
3870
|
-
|
|
3871
|
-
|
|
3872
|
-
|
|
3873
|
-
|
|
3874
|
-
|
|
3875
|
-
|
|
3876
|
-
|
|
3877
|
-
|
|
3878
|
-
|
|
3879
|
-
|
|
3880
|
-
|
|
3881
|
-
|
|
3882
|
-
|
|
3883
|
-
|
|
3884
|
-
|
|
3885
|
-
|
|
3886
|
-
|
|
3887
|
-
|
|
3888
|
-
|
|
3889
|
-
|
|
3890
|
-
|
|
3891
|
-
|
|
3892
|
-
|
|
3893
|
-
|
|
3894
|
-
|
|
3895
|
-
|
|
3896
|
-
|
|
3897
|
-
|
|
3898
|
-
|
|
3899
|
-
|
|
3900
|
-
|
|
3901
|
-
className: TaskDetail_module_css_default.modalBody,
|
|
3902
|
-
children: [
|
|
3903
|
-
/* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", {
|
|
3904
|
-
className: TaskDetail_module_css_default.detailPrompt,
|
|
3905
|
-
children: task.prompt
|
|
3580
|
+
}),
|
|
3581
|
+
hintLabelKey !== null && hintPlaceholderKey !== null && /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", {
|
|
3582
|
+
className: TaskForm_module_css_default.field,
|
|
3583
|
+
children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", {
|
|
3584
|
+
className: TaskForm_module_css_default.fieldLabel,
|
|
3585
|
+
children: t(hintLabelKey)
|
|
3586
|
+
}), /* @__PURE__ */ (0, react_jsx_runtime.jsx)("textarea", {
|
|
3587
|
+
className: TaskForm_module_css_default.guidanceInput,
|
|
3588
|
+
placeholder: hintPlaceholder,
|
|
3589
|
+
value: values.strategyHint,
|
|
3590
|
+
onChange: (e) => onChange({ strategyHint: e.target.value }),
|
|
3591
|
+
rows: 2
|
|
3592
|
+
})]
|
|
3593
|
+
}),
|
|
3594
|
+
/* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", {
|
|
3595
|
+
className: TaskForm_module_css_default.field,
|
|
3596
|
+
children: [
|
|
3597
|
+
/* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", {
|
|
3598
|
+
className: TaskForm_module_css_default.fieldLabel,
|
|
3599
|
+
children: t("modal.autonomy")
|
|
3600
|
+
}),
|
|
3601
|
+
/* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", {
|
|
3602
|
+
className: TaskForm_module_css_default.pillRow,
|
|
3603
|
+
children: [
|
|
3604
|
+
"l1",
|
|
3605
|
+
"l2",
|
|
3606
|
+
"l3"
|
|
3607
|
+
].map((level) => /* @__PURE__ */ (0, react_jsx_runtime.jsx)(_deepseek_ai_dsh_client_ui_primitives.Tooltip, {
|
|
3608
|
+
label: t(AUTONOMY_HINT_KEYS[level]),
|
|
3609
|
+
side: "top",
|
|
3610
|
+
children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", {
|
|
3611
|
+
className: TaskForm_module_css_default.autonomyBtn,
|
|
3612
|
+
children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(_deepseek_ai_dsh_client_ui_primitives.Button, {
|
|
3613
|
+
size: "sm",
|
|
3614
|
+
variant: values.autonomy === level ? "primary" : "outline",
|
|
3615
|
+
onClick: () => onChange({ autonomy: level }),
|
|
3616
|
+
children: t(AUTONOMY_LABEL_KEYS[level])
|
|
3617
|
+
})
|
|
3618
|
+
})
|
|
3619
|
+
}, level))
|
|
3620
|
+
}),
|
|
3621
|
+
/* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", {
|
|
3622
|
+
className: TaskForm_module_css_default.strategyHint,
|
|
3623
|
+
children: t(AUTONOMY_DESC_KEYS[values.autonomy])
|
|
3624
|
+
})
|
|
3625
|
+
]
|
|
3626
|
+
}),
|
|
3627
|
+
props.onAdvancedOpenChange !== void 0 && /* @__PURE__ */ (0, react_jsx_runtime.jsxs)(react_jsx_runtime.Fragment, { children: [/* @__PURE__ */ (0, react_jsx_runtime.jsxs)("button", {
|
|
3628
|
+
type: "button",
|
|
3629
|
+
className: TaskForm_module_css_default.advancedBtn,
|
|
3630
|
+
onClick: () => props.onAdvancedOpenChange?.(true),
|
|
3631
|
+
children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)(Icon, { name: "IconSettingsOutline14" }), t("modal.advanced")]
|
|
3632
|
+
}), /* @__PURE__ */ (0, react_jsx_runtime.jsx)(_deepseek_ai_dsh_client_ui_primitives.Modal, {
|
|
3633
|
+
open: props.advancedOpen ?? false,
|
|
3634
|
+
onClose: () => props.onAdvancedOpenChange?.(false),
|
|
3635
|
+
title: t("modal.advancedTitle"),
|
|
3636
|
+
closeLabel: t("modal.close"),
|
|
3637
|
+
footer: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(_deepseek_ai_dsh_client_ui_primitives.Button, {
|
|
3638
|
+
variant: "primary",
|
|
3639
|
+
size: "md",
|
|
3640
|
+
onClick: () => props.onAdvancedOpenChange?.(false),
|
|
3641
|
+
children: t("modal.advancedDone")
|
|
3906
3642
|
}),
|
|
3907
|
-
/* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", {
|
|
3908
|
-
className:
|
|
3643
|
+
children: /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", {
|
|
3644
|
+
className: TaskForm_module_css_default.advancedBody,
|
|
3909
3645
|
children: [
|
|
3910
|
-
/* @__PURE__ */ (0, react_jsx_runtime.jsxs)("
|
|
3911
|
-
className:
|
|
3646
|
+
/* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", {
|
|
3647
|
+
className: TaskForm_module_css_default.field,
|
|
3912
3648
|
children: [
|
|
3913
|
-
t("detail.workspace"),
|
|
3914
|
-
" ",
|
|
3915
3649
|
/* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", {
|
|
3916
|
-
className:
|
|
3917
|
-
children:
|
|
3918
|
-
})
|
|
3919
|
-
|
|
3920
|
-
|
|
3921
|
-
|
|
3922
|
-
|
|
3923
|
-
|
|
3924
|
-
|
|
3925
|
-
|
|
3926
|
-
|
|
3927
|
-
|
|
3928
|
-
|
|
3929
|
-
|
|
3930
|
-
|
|
3931
|
-
|
|
3932
|
-
|
|
3933
|
-
|
|
3934
|
-
|
|
3935
|
-
|
|
3936
|
-
|
|
3650
|
+
className: TaskForm_module_css_default.fieldLabel,
|
|
3651
|
+
children: t("modal.model")
|
|
3652
|
+
}),
|
|
3653
|
+
(() => {
|
|
3654
|
+
const models = props.models ?? [];
|
|
3655
|
+
if (models.length > 0) {
|
|
3656
|
+
const encode = (m) => `${m.provider}\u0000${m.id}`;
|
|
3657
|
+
const decode = (v) => {
|
|
3658
|
+
if (v === "") return {
|
|
3659
|
+
model: "",
|
|
3660
|
+
modelProvider: ""
|
|
3661
|
+
};
|
|
3662
|
+
const at = v.indexOf("\0");
|
|
3663
|
+
return at >= 0 ? {
|
|
3664
|
+
model: v.slice(at + 1),
|
|
3665
|
+
modelProvider: v.slice(0, at)
|
|
3666
|
+
} : {
|
|
3667
|
+
model: v,
|
|
3668
|
+
modelProvider: ""
|
|
3669
|
+
};
|
|
3670
|
+
};
|
|
3671
|
+
const current = values.model === "" ? "" : (() => {
|
|
3672
|
+
const hit = models.find((m) => m.id === values.model && (values.modelProvider === "" || m.provider === values.modelProvider)) ?? models.find((m) => m.id === values.model);
|
|
3673
|
+
return hit !== void 0 ? encode(hit) : values.model;
|
|
3674
|
+
})();
|
|
3675
|
+
const byProvider = /* @__PURE__ */ new Map();
|
|
3676
|
+
for (const m of models) {
|
|
3677
|
+
const list = byProvider.get(m.provider) ?? [];
|
|
3678
|
+
list.push(m);
|
|
3679
|
+
byProvider.set(m.provider, list);
|
|
3680
|
+
}
|
|
3681
|
+
return /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("select", {
|
|
3682
|
+
className: TaskForm_module_css_default.fieldInput,
|
|
3683
|
+
value: current,
|
|
3684
|
+
onChange: (e) => {
|
|
3685
|
+
const decoded = decode(e.target.value);
|
|
3686
|
+
const efforts = models.find((m) => m.id === decoded.model)?.reasoningEfforts;
|
|
3687
|
+
const resetReasoning = values.reasoning !== "follow" && efforts !== void 0 && efforts.length > 0 && !efforts.some((e) => e.id === values.reasoning);
|
|
3688
|
+
onChange(resetReasoning ? {
|
|
3689
|
+
...decoded,
|
|
3690
|
+
reasoning: "follow"
|
|
3691
|
+
} : decoded);
|
|
3692
|
+
},
|
|
3693
|
+
children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)("option", {
|
|
3694
|
+
value: "",
|
|
3695
|
+
children: t("modal.modelFollowGlobal")
|
|
3696
|
+
}), [...byProvider.keys()].map((provider) => {
|
|
3697
|
+
const group = byProvider.get(provider) ?? [];
|
|
3698
|
+
const label = group[0]?.providerLabel ?? provider;
|
|
3699
|
+
return /* @__PURE__ */ (0, react_jsx_runtime.jsx)("optgroup", {
|
|
3700
|
+
label,
|
|
3701
|
+
children: group.map((m) => /* @__PURE__ */ (0, react_jsx_runtime.jsx)("option", {
|
|
3702
|
+
value: encode(m),
|
|
3703
|
+
children: m.name
|
|
3704
|
+
}, encode(m)))
|
|
3705
|
+
}, provider);
|
|
3706
|
+
})]
|
|
3707
|
+
});
|
|
3708
|
+
}
|
|
3709
|
+
return /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", {
|
|
3710
|
+
className: TaskForm_module_css_default.modelFallbackRow,
|
|
3711
|
+
children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)("input", {
|
|
3712
|
+
className: TaskForm_module_css_default.fieldInput,
|
|
3713
|
+
value: values.model,
|
|
3714
|
+
onChange: (e) => onChange({ model: e.target.value }),
|
|
3715
|
+
placeholder: "model-id"
|
|
3716
|
+
}), /* @__PURE__ */ (0, react_jsx_runtime.jsx)("input", {
|
|
3717
|
+
className: TaskForm_module_css_default.fieldInput,
|
|
3718
|
+
value: values.modelProvider,
|
|
3719
|
+
onChange: (e) => onChange({ modelProvider: e.target.value }),
|
|
3720
|
+
placeholder: "provider-id"
|
|
3721
|
+
})]
|
|
3722
|
+
});
|
|
3723
|
+
})(),
|
|
3937
3724
|
/* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", {
|
|
3938
|
-
className:
|
|
3939
|
-
children:
|
|
3725
|
+
className: TaskForm_module_css_default.strategyHint,
|
|
3726
|
+
children: t("modal.modelHint")
|
|
3940
3727
|
})
|
|
3941
3728
|
]
|
|
3942
3729
|
}),
|
|
3943
|
-
/* @__PURE__ */ (0, react_jsx_runtime.jsxs)("
|
|
3944
|
-
className:
|
|
3730
|
+
/* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", {
|
|
3731
|
+
className: TaskForm_module_css_default.field,
|
|
3945
3732
|
children: [
|
|
3946
|
-
|
|
3947
|
-
|
|
3733
|
+
/* @__PURE__ */ (0, react_jsx_runtime.jsxs)("span", {
|
|
3734
|
+
className: TaskForm_module_css_default.fieldLabel,
|
|
3735
|
+
children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)(Icon, {
|
|
3736
|
+
name: "IconThinkOutline14",
|
|
3737
|
+
className: TaskForm_module_css_default.advancedIcon
|
|
3738
|
+
}), t("modal.reasoning")]
|
|
3739
|
+
}),
|
|
3740
|
+
/* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", {
|
|
3741
|
+
className: TaskForm_module_css_default.pillRow,
|
|
3742
|
+
children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)(_deepseek_ai_dsh_client_ui_primitives.Pill, {
|
|
3743
|
+
active: values.reasoning === "follow",
|
|
3744
|
+
onClick: () => onChange({ reasoning: "follow" }),
|
|
3745
|
+
children: t("reasoning.follow")
|
|
3746
|
+
}), (() => {
|
|
3747
|
+
const selectedModel = props.models?.find((m) => m.id === values.model);
|
|
3748
|
+
return reasoningOptions(selectedModel).map((effort) => /* @__PURE__ */ (0, react_jsx_runtime.jsx)(_deepseek_ai_dsh_client_ui_primitives.Pill, {
|
|
3749
|
+
active: values.reasoning === effort.id,
|
|
3750
|
+
onClick: () => onChange({ reasoning: effort.id }),
|
|
3751
|
+
children: reasoningLabel(effort)
|
|
3752
|
+
}, effort.id));
|
|
3753
|
+
})()]
|
|
3754
|
+
}),
|
|
3948
3755
|
/* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", {
|
|
3949
|
-
className:
|
|
3950
|
-
children:
|
|
3756
|
+
className: TaskForm_module_css_default.strategyHint,
|
|
3757
|
+
children: t("modal.reasoningHint")
|
|
3951
3758
|
})
|
|
3952
3759
|
]
|
|
3953
3760
|
}),
|
|
3954
|
-
|
|
3955
|
-
className:
|
|
3761
|
+
/* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", {
|
|
3762
|
+
className: TaskForm_module_css_default.field,
|
|
3956
3763
|
children: [
|
|
3957
|
-
t("detail.edited"),
|
|
3958
|
-
" ",
|
|
3959
3764
|
/* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", {
|
|
3960
|
-
className:
|
|
3961
|
-
children: t("
|
|
3962
|
-
})
|
|
3963
|
-
|
|
3964
|
-
|
|
3965
|
-
|
|
3966
|
-
|
|
3967
|
-
|
|
3968
|
-
|
|
3969
|
-
|
|
3765
|
+
className: TaskForm_module_css_default.fieldLabel,
|
|
3766
|
+
children: t("modal.priority")
|
|
3767
|
+
}),
|
|
3768
|
+
/* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", {
|
|
3769
|
+
className: TaskForm_module_css_default.pillRow,
|
|
3770
|
+
children: [
|
|
3771
|
+
0,
|
|
3772
|
+
1,
|
|
3773
|
+
2,
|
|
3774
|
+
3,
|
|
3775
|
+
4,
|
|
3776
|
+
5,
|
|
3777
|
+
6,
|
|
3778
|
+
7,
|
|
3779
|
+
8,
|
|
3780
|
+
9
|
|
3781
|
+
].map((n) => /* @__PURE__ */ (0, react_jsx_runtime.jsx)(_deepseek_ai_dsh_client_ui_primitives.Pill, {
|
|
3782
|
+
active: values.priority === n,
|
|
3783
|
+
onClick: () => onChange({ priority: n }),
|
|
3784
|
+
children: n
|
|
3785
|
+
}, n))
|
|
3786
|
+
}),
|
|
3970
3787
|
/* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", {
|
|
3971
|
-
className:
|
|
3972
|
-
children:
|
|
3788
|
+
className: TaskForm_module_css_default.strategyHint,
|
|
3789
|
+
children: t("modal.priorityHint")
|
|
3973
3790
|
})
|
|
3974
3791
|
]
|
|
3975
3792
|
}),
|
|
3976
|
-
|
|
3977
|
-
className:
|
|
3978
|
-
children: task.estimateYuan !== void 0 ? t("detail.estimateKnown", {
|
|
3979
|
-
yuan: task.estimateYuan.toFixed(2),
|
|
3980
|
-
tier: strat,
|
|
3981
|
-
minutes: task.estimateMinutes ?? 30
|
|
3982
|
-
}) : t("detail.estimateUnknown")
|
|
3983
|
-
}),
|
|
3984
|
-
task.strategy !== void 0 && task.strategy !== "single" && /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("span", {
|
|
3985
|
-
className: TaskDetail_module_css_default.detailItem,
|
|
3793
|
+
/* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", {
|
|
3794
|
+
className: TaskForm_module_css_default.field,
|
|
3986
3795
|
children: [
|
|
3987
|
-
t("modal.strategy"),
|
|
3988
|
-
" ",
|
|
3989
3796
|
/* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", {
|
|
3990
|
-
className:
|
|
3991
|
-
children:
|
|
3992
|
-
})
|
|
3993
|
-
|
|
3994
|
-
|
|
3995
|
-
|
|
3996
|
-
|
|
3997
|
-
|
|
3998
|
-
|
|
3999
|
-
|
|
4000
|
-
|
|
4001
|
-
|
|
4002
|
-
|
|
4003
|
-
|
|
4004
|
-
|
|
4005
|
-
|
|
4006
|
-
|
|
4007
|
-
|
|
4008
|
-
children: [
|
|
4009
|
-
t("detail.continuesFromSession"),
|
|
4010
|
-
" ",
|
|
3797
|
+
className: TaskForm_module_css_default.fieldLabel,
|
|
3798
|
+
children: t("modal.sessionMode")
|
|
3799
|
+
}),
|
|
3800
|
+
/* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", {
|
|
3801
|
+
className: TaskForm_module_css_default.pillRow,
|
|
3802
|
+
children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", {
|
|
3803
|
+
className: `${TaskForm_module_css_default.strategyPill} ${values.sessionMode === "new" ? TaskForm_module_css_default.strategyActive : ""}`,
|
|
3804
|
+
onClick: () => onChange({
|
|
3805
|
+
sessionMode: "new",
|
|
3806
|
+
continuesFromSession: void 0
|
|
3807
|
+
}),
|
|
3808
|
+
children: t("modal.sessionNew")
|
|
3809
|
+
}), /* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", {
|
|
3810
|
+
className: `${TaskForm_module_css_default.strategyPill} ${values.sessionMode === "continue" ? TaskForm_module_css_default.strategyActive : ""}`,
|
|
3811
|
+
onClick: () => onChange({ sessionMode: "continue" }),
|
|
3812
|
+
children: t("modal.sessionContinue")
|
|
3813
|
+
})]
|
|
3814
|
+
}),
|
|
4011
3815
|
/* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", {
|
|
4012
|
-
className:
|
|
4013
|
-
children:
|
|
3816
|
+
className: TaskForm_module_css_default.strategyHint,
|
|
3817
|
+
children: values.sessionMode === "new" ? t("modal.sessionNewHint") : t("modal.sessionContinueHint")
|
|
4014
3818
|
})
|
|
4015
3819
|
]
|
|
4016
|
-
})
|
|
4017
|
-
|
|
4018
|
-
|
|
4019
|
-
|
|
4020
|
-
|
|
4021
|
-
|
|
4022
|
-
|
|
4023
|
-
|
|
4024
|
-
|
|
4025
|
-
|
|
4026
|
-
|
|
4027
|
-
|
|
4028
|
-
|
|
4029
|
-
|
|
4030
|
-
|
|
4031
|
-
|
|
4032
|
-
|
|
4033
|
-
|
|
4034
|
-
|
|
3820
|
+
}),
|
|
3821
|
+
values.sessionMode === "continue" && /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", {
|
|
3822
|
+
className: TaskForm_module_css_default.field,
|
|
3823
|
+
children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", {
|
|
3824
|
+
className: TaskForm_module_css_default.fieldLabel,
|
|
3825
|
+
children: t("modal.selectConversation")
|
|
3826
|
+
}), (() => {
|
|
3827
|
+
const workspaces = props.sessionWorkspaces ?? [];
|
|
3828
|
+
if (workspaces.length === 0) return /* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", {
|
|
3829
|
+
className: TaskForm_module_css_default.strategyHint,
|
|
3830
|
+
children: t("modal.noConversations")
|
|
3831
|
+
});
|
|
3832
|
+
const currentWs = workspaces.find((w) => w.cwd === values.workspace) ?? workspaces[0];
|
|
3833
|
+
const sessions = currentWs?.sessions ?? [];
|
|
3834
|
+
return /* @__PURE__ */ (0, react_jsx_runtime.jsxs)(react_jsx_runtime.Fragment, { children: [/* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", {
|
|
3835
|
+
className: TaskForm_module_css_default.sessionPickRow,
|
|
3836
|
+
children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)("select", {
|
|
3837
|
+
className: TaskForm_module_css_default.fieldInput,
|
|
3838
|
+
value: currentWs?.cwd ?? "",
|
|
3839
|
+
onChange: (e) => {
|
|
3840
|
+
const ws = workspaces.find((w) => w.cwd === e.target.value);
|
|
3841
|
+
onChange({
|
|
3842
|
+
workspace: e.target.value,
|
|
3843
|
+
continuesFromSession: void 0
|
|
3844
|
+
});
|
|
3845
|
+
if (ws !== void 0 && ws.sessions.length > 0) onChange({ continuesFromSession: ws.sessions[0].id });
|
|
3846
|
+
},
|
|
3847
|
+
children: workspaces.map((w) => /* @__PURE__ */ (0, react_jsx_runtime.jsx)("option", {
|
|
3848
|
+
value: w.cwd,
|
|
3849
|
+
children: w.label !== null ? `${w.label} · ${w.cwd}` : w.cwd
|
|
3850
|
+
}, w.cwd))
|
|
3851
|
+
}), /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("select", {
|
|
3852
|
+
className: TaskForm_module_css_default.fieldInput,
|
|
3853
|
+
value: values.continuesFromSession ?? "",
|
|
3854
|
+
onChange: (e) => onChange({ continuesFromSession: e.target.value || void 0 }),
|
|
3855
|
+
children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)("option", {
|
|
3856
|
+
value: "",
|
|
3857
|
+
children: t("modal.selectConversationPlaceholder")
|
|
3858
|
+
}), sessions.map((s) => /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("option", {
|
|
3859
|
+
value: s.id,
|
|
3860
|
+
children: [s.title !== null && s.title !== "" ? s.title : s.id.slice(0, 16), s.lastModified > 0 ? ` · ${sessionTimeLabel(s.lastModified, t)}` : ""]
|
|
3861
|
+
}, s.id))]
|
|
3862
|
+
})]
|
|
3863
|
+
}), /* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", {
|
|
3864
|
+
className: TaskForm_module_css_default.strategyHint,
|
|
3865
|
+
children: t("modal.continueHint", { cwd: currentWs?.cwd ?? "" })
|
|
3866
|
+
})] });
|
|
3867
|
+
})()]
|
|
4035
3868
|
}),
|
|
4036
3869
|
/* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", {
|
|
4037
|
-
className:
|
|
3870
|
+
className: TaskForm_module_css_default.field,
|
|
4038
3871
|
children: [
|
|
4039
|
-
|
|
4040
|
-
|
|
4041
|
-
|
|
4042
|
-
|
|
4043
|
-
|
|
4044
|
-
|
|
4045
|
-
|
|
4046
|
-
|
|
4047
|
-
|
|
4048
|
-
|
|
4049
|
-
|
|
4050
|
-
|
|
4051
|
-
|
|
4052
|
-
|
|
4053
|
-
|
|
4054
|
-
|
|
4055
|
-
|
|
4056
|
-
|
|
4057
|
-
children: t("detail.forked")
|
|
4058
|
-
}),
|
|
4059
|
-
task.lastRun.resumeNote !== void 0 && /* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", {
|
|
4060
|
-
className: TaskDetail_module_css_default.detailResumeWarn,
|
|
4061
|
-
children: task.lastRun.resumeNote
|
|
4062
|
-
}),
|
|
4063
|
-
task.lastRun.candidates !== void 0 && task.lastRun.candidates.length > 0 && /* @__PURE__ */ (0, react_jsx_runtime.jsx)(CandidatesView, {
|
|
4064
|
-
candidates: task.lastRun.candidates,
|
|
4065
|
-
chosenIndex: task.chosenCandidateIndex,
|
|
4066
|
-
taskId: task.id,
|
|
4067
|
-
t
|
|
4068
|
-
}),
|
|
4069
|
-
task.lastRun.reviewExcerpt !== void 0 && /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("details", {
|
|
4070
|
-
className: TaskDetail_module_css_default.detailReview,
|
|
4071
|
-
children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)("summary", { children: t("report.reviewExcerpt") }), /* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", {
|
|
4072
|
-
className: TaskDetail_module_css_default.detailReviewBody,
|
|
4073
|
-
children: task.lastRun.reviewExcerpt
|
|
4074
|
-
})]
|
|
3872
|
+
/* @__PURE__ */ (0, react_jsx_runtime.jsxs)("span", {
|
|
3873
|
+
className: TaskForm_module_css_default.fieldLabel,
|
|
3874
|
+
children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)(Icon, {
|
|
3875
|
+
name: "IconPaperclipOutline16",
|
|
3876
|
+
className: TaskForm_module_css_default.advancedIcon
|
|
3877
|
+
}), t("modal.files")]
|
|
3878
|
+
}),
|
|
3879
|
+
/* @__PURE__ */ (0, react_jsx_runtime.jsx)("input", {
|
|
3880
|
+
className: TaskForm_module_css_default.fieldInput,
|
|
3881
|
+
value: values.files,
|
|
3882
|
+
onChange: (e) => onChange({ files: e.target.value }),
|
|
3883
|
+
placeholder: t("modal.filesPlaceholder")
|
|
3884
|
+
}),
|
|
3885
|
+
/* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", {
|
|
3886
|
+
className: TaskForm_module_css_default.strategyHint,
|
|
3887
|
+
children: t("modal.filesAdvancedHint")
|
|
3888
|
+
})
|
|
3889
|
+
]
|
|
4075
3890
|
})
|
|
4076
3891
|
]
|
|
4077
|
-
}),
|
|
4078
|
-
task.lastError !== void 0 && /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", {
|
|
4079
|
-
className: TaskDetail_module_css_default.detailSection,
|
|
4080
|
-
children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", {
|
|
4081
|
-
className: TaskDetail_module_css_default.detailLabel,
|
|
4082
|
-
children: t("detail.error")
|
|
4083
|
-
}), /* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", {
|
|
4084
|
-
className: TaskDetail_module_css_default.detailError,
|
|
4085
|
-
children: task.lastError
|
|
4086
|
-
})]
|
|
4087
3892
|
})
|
|
4088
|
-
]
|
|
4089
|
-
|
|
3893
|
+
})] })
|
|
3894
|
+
]
|
|
4090
3895
|
});
|
|
4091
3896
|
}
|
|
4092
3897
|
//#endregion
|
|
4093
|
-
//#region \0dsh-css:
|
|
4094
|
-
const css$
|
|
4095
|
-
const tagId$
|
|
4096
|
-
if (typeof document !== "undefined" && document.querySelector("style[data-plugin-css=" + JSON.stringify(tagId$
|
|
3898
|
+
//#region \0dsh-css:C:\Users\胡克劳\lowtide\work\pr8-review\packages\dsh-lowtide\client\components\NewTaskModal.module.css.mjs
|
|
3899
|
+
const css$5 = ".tWghgq_wide{width:min(560px,100%)}.tWghgq_modalBody{flex-direction:column;gap:10px;display:flex}.tWghgq_modalFooter{justify-content:flex-end;gap:8px;display:flex}";
|
|
3900
|
+
const tagId$5 = "dsh-lowtide/NewTaskModal.module.css";
|
|
3901
|
+
if (typeof document !== "undefined" && document.querySelector("style[data-plugin-css=" + JSON.stringify(tagId$5) + "]") === null) {
|
|
4097
3902
|
const tag = document.createElement("style");
|
|
4098
3903
|
tag.dataset.plugin = "dsh-lowtide";
|
|
4099
|
-
tag.dataset.pluginCss = tagId$
|
|
4100
|
-
tag.textContent = css$
|
|
3904
|
+
tag.dataset.pluginCss = tagId$5;
|
|
3905
|
+
tag.textContent = css$5;
|
|
4101
3906
|
document.head.appendChild(tag);
|
|
4102
3907
|
}
|
|
4103
3908
|
var NewTaskModal_module_css_default = {
|
|
4104
|
-
"wide": "
|
|
4105
|
-
"modalBody": "
|
|
4106
|
-
"modalFooter": "
|
|
3909
|
+
"wide": "tWghgq_wide",
|
|
3910
|
+
"modalBody": "tWghgq_modalBody",
|
|
3911
|
+
"modalFooter": "tWghgq_modalFooter"
|
|
4107
3912
|
};
|
|
4108
3913
|
//#endregion
|
|
4109
3914
|
//#region client/components/NewTaskModal.tsx
|
|
@@ -4394,38 +4199,39 @@ window.__ModuleLoader__.load({
|
|
|
4394
4199
|
});
|
|
4395
4200
|
}
|
|
4396
4201
|
//#endregion
|
|
4397
|
-
//#region \0dsh-css:
|
|
4398
|
-
const css$
|
|
4399
|
-
const tagId$
|
|
4400
|
-
if (typeof document !== "undefined" && document.querySelector("style[data-plugin-css=" + JSON.stringify(tagId$
|
|
4202
|
+
//#region \0dsh-css:C:\Users\胡克劳\lowtide\work\pr8-review\packages\dsh-lowtide\client\components\QueueDock.module.css.mjs
|
|
4203
|
+
const css$4 = ".wT7KoW_dock{flex-direction:column;gap:4px;width:calc(100% - 16px);margin:0 8px -3px;display:flex}.wT7KoW_dockRow{background:var(--dsw-specific-tip);border-radius:12px 12px 0 0;justify-content:space-between;align-items:center;gap:8px;height:36px;padding:4px 12px;display:flex}.wT7KoW_dockTitle{color:var(--dsw-alias-label-secondary);font:var(--dsw-font-s-14);font-variant-numeric:tabular-nums;font-weight:500}.wT7KoW_pending{color:var(--dsw-alias-state-warn-primary);font:var(--dsw-font-xxs-12)}.wT7KoW_dockActions{align-items:center;gap:4px;display:flex}.wT7KoW_reportBtn{align-items:center;gap:4px;display:inline-flex;position:relative}.wT7KoW_reportDot{background:var(--dsw-alias-state-warn-primary);border-radius:999px;width:6px;height:6px;position:absolute;top:-2px;right:-4px}.wT7KoW_sectionHead{justify-content:space-between;align-items:center;gap:8px;display:flex}.wT7KoW_sectionToggle{color:var(--dsw-alias-label-tertiary);font:var(--dsw-font-xxs-strong-12);cursor:pointer;text-align:left;background:0 0;border:none;flex:1;align-items:center;gap:4px;padding:4px;display:flex}.wT7KoW_sectionToggle:hover{color:var(--dsw-alias-label-primary)}.wT7KoW_clearBtn{color:var(--dsw-alias-label-tertiary);font:var(--dsw-font-xxs-12);cursor:pointer;background:0 0;border:none;border-radius:999px;flex-shrink:0;padding:3px 8px}.wT7KoW_clearBtn:hover{background:var(--dsw-alias-interactive-bg-hover);color:var(--dsw-alias-label-primary)}.wT7KoW_clearArmed{color:var(--dsw-alias-state-error-primary);background:var(--dsw-alias-interactive-bg-hover);font-weight:600}.wT7KoW_clearArmed:hover{color:var(--dsw-alias-state-error-primary)}.wT7KoW_approveArmed{font-weight:600;color:var(--dsw-alias-state-error-primary)!important;background:var(--dsw-alias-interactive-bg-hover)!important}.wT7KoW_drawer{background:var(--dsw-specific-tip);border-top:none;flex-direction:column;gap:4px;max-height:320px;padding:4px 8px 8px;display:flex;overflow-y:auto}.wT7KoW_group{flex-direction:column;gap:2px;display:flex}.wT7KoW_groupHeader{justify-content:space-between;align-items:center;padding:4px 4px 2px;display:flex}.wT7KoW_groupPath{color:var(--dsw-alias-label-tertiary);font-family:var(--ds-font-family-code);font-size:11px}.wT7KoW_onboarding{box-sizing:border-box;background:var(--dsw-specific-tip);border:1px solid var(--dsw-alias-border-l1);width:calc(100% - 16px);color:var(--dsw-alias-label-secondary);font:var(--dsw-font-xxs-12);border-radius:10px;justify-content:space-between;align-items:center;gap:8px;margin:0 8px;padding:6px 10px;line-height:1.5;display:flex}.wT7KoW_onboarding b{color:var(--dsw-alias-label-primary)}.wT7KoW_onboardingDismiss{background:var(--dsw-alias-brand-primary);color:var(--dsw-alias-label-primary-foreground);font:var(--dsw-font-xxs-12);cursor:pointer;border:none;border-radius:999px;flex-shrink:0;padding:3px 10px}.wT7KoW_onboardingDismiss:hover{opacity:.9}.wT7KoW_footer{border-top:1px solid var(--dsw-alias-border-l1);justify-content:space-between;align-items:center;gap:8px;padding:6px 4px 2px;display:flex}.wT7KoW_footerActions{gap:4px;display:flex}.wT7KoW_empty{color:var(--dsw-alias-label-tertiary);font:var(--dsw-font-xs-13);flex-direction:column;align-items:center;gap:8px;padding:16px 0;display:flex}.wT7KoW_panel{box-sizing:border-box;flex-direction:column;flex:1;gap:4px;height:100%;min-height:0;display:flex}.wT7KoW_panel>.wT7KoW_dockRow{border-radius:0;flex:none}.wT7KoW_panel>.wT7KoW_onboarding{width:auto;margin:0}.wT7KoW_panel>.wT7KoW_drawer{flex:1;min-height:0;max-height:none}";
|
|
4204
|
+
const tagId$4 = "dsh-lowtide/QueueDock.module.css";
|
|
4205
|
+
if (typeof document !== "undefined" && document.querySelector("style[data-plugin-css=" + JSON.stringify(tagId$4) + "]") === null) {
|
|
4401
4206
|
const tag = document.createElement("style");
|
|
4402
4207
|
tag.dataset.plugin = "dsh-lowtide";
|
|
4403
|
-
tag.dataset.pluginCss = tagId$
|
|
4404
|
-
tag.textContent = css$
|
|
4208
|
+
tag.dataset.pluginCss = tagId$4;
|
|
4209
|
+
tag.textContent = css$4;
|
|
4405
4210
|
document.head.appendChild(tag);
|
|
4406
4211
|
}
|
|
4407
4212
|
var QueueDock_module_css_default = {
|
|
4408
|
-
"
|
|
4409
|
-
"
|
|
4410
|
-
"
|
|
4411
|
-
"
|
|
4412
|
-
"
|
|
4413
|
-
"
|
|
4414
|
-
"
|
|
4415
|
-
"
|
|
4416
|
-
"
|
|
4417
|
-
"
|
|
4418
|
-
"
|
|
4419
|
-
"
|
|
4420
|
-
"
|
|
4421
|
-
"onboarding": "
|
|
4422
|
-
"
|
|
4423
|
-
"
|
|
4424
|
-
"
|
|
4425
|
-
"
|
|
4426
|
-
"sectionHead": "
|
|
4427
|
-
"
|
|
4428
|
-
"
|
|
4213
|
+
"reportBtn": "wT7KoW_reportBtn",
|
|
4214
|
+
"empty": "wT7KoW_empty",
|
|
4215
|
+
"sectionToggle": "wT7KoW_sectionToggle",
|
|
4216
|
+
"footerActions": "wT7KoW_footerActions",
|
|
4217
|
+
"groupHeader": "wT7KoW_groupHeader",
|
|
4218
|
+
"group": "wT7KoW_group",
|
|
4219
|
+
"footer": "wT7KoW_footer",
|
|
4220
|
+
"approveArmed": "wT7KoW_approveArmed",
|
|
4221
|
+
"dock": "wT7KoW_dock",
|
|
4222
|
+
"pending": "wT7KoW_pending",
|
|
4223
|
+
"dockTitle": "wT7KoW_dockTitle",
|
|
4224
|
+
"dockRow": "wT7KoW_dockRow",
|
|
4225
|
+
"clearArmed": "wT7KoW_clearArmed",
|
|
4226
|
+
"onboarding": "wT7KoW_onboarding",
|
|
4227
|
+
"panel": "wT7KoW_panel",
|
|
4228
|
+
"dockActions": "wT7KoW_dockActions",
|
|
4229
|
+
"clearBtn": "wT7KoW_clearBtn",
|
|
4230
|
+
"drawer": "wT7KoW_drawer",
|
|
4231
|
+
"sectionHead": "wT7KoW_sectionHead",
|
|
4232
|
+
"groupPath": "wT7KoW_groupPath",
|
|
4233
|
+
"onboardingDismiss": "wT7KoW_onboardingDismiss",
|
|
4234
|
+
"reportDot": "wT7KoW_reportDot"
|
|
4429
4235
|
};
|
|
4430
4236
|
//#endregion
|
|
4431
4237
|
//#region client/components/QueueDock.tsx
|
|
@@ -4434,12 +4240,23 @@ window.__ModuleLoader__.load({
|
|
|
4434
4240
|
* the expandable drawer above it — grouped queue sections (待执行 / 已结束 /
|
|
4435
4241
|
* 已放弃), footer totals and batch controls. Rows and modals live in their
|
|
4436
4242
|
* own files (TaskRow / DroppedRow / TaskDetail / NewTaskModal / TaskForm).
|
|
4243
|
+
*
|
|
4244
|
+
* The body is `QueueDockView`, so the very same panel also fills an external
|
|
4245
|
+
* sidebar host's tab (`seat="panel"`: always expanded, no toggle, no composer
|
|
4246
|
+
* chrome) — see client/better-sidebar.tsx. The dock seat yields while the host
|
|
4247
|
+
* actually renders the tab; `sidebarHosted` drives that hand-over.
|
|
4437
4248
|
*/
|
|
4249
|
+
/** Slot entry (conversation.input.dock). */
|
|
4438
4250
|
function QueueDock(props) {
|
|
4251
|
+
return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(QueueDockView, { t: props.t });
|
|
4252
|
+
}
|
|
4253
|
+
function QueueDockView(props) {
|
|
4439
4254
|
const { t } = props;
|
|
4255
|
+
const panel = props.seat === "panel";
|
|
4440
4256
|
const host = useLowtide((s) => s.host);
|
|
4441
4257
|
const connected = useLowtide((s) => s.connected);
|
|
4442
4258
|
const queueOpen = useLowtide((s) => s.queueOpen);
|
|
4259
|
+
const sidebarHosted = useLowtide((s) => s.sidebarHosted);
|
|
4443
4260
|
const reportUnread = useLowtide((s) => s.reportUnread);
|
|
4444
4261
|
const [modalOpen, setModalOpen] = (0, react.useState)(false);
|
|
4445
4262
|
const [detailTask, setDetailTask] = (0, react.useState)(null);
|
|
@@ -4455,8 +4272,9 @@ window.__ModuleLoader__.load({
|
|
|
4455
4272
|
return true;
|
|
4456
4273
|
}
|
|
4457
4274
|
});
|
|
4275
|
+
if (sidebarHosted && !panel) return null;
|
|
4458
4276
|
if (host === null) return /* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", {
|
|
4459
|
-
className: QueueDock_module_css_default.dock,
|
|
4277
|
+
className: panel ? QueueDock_module_css_default.panel : QueueDock_module_css_default.dock,
|
|
4460
4278
|
children: /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", {
|
|
4461
4279
|
className: QueueDock_module_css_default.dockRow,
|
|
4462
4280
|
children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", {
|
|
@@ -4561,7 +4379,7 @@ window.__ModuleLoader__.load({
|
|
|
4561
4379
|
children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)(Icon, { name: "IconPlusOutline16" }), t("dock.new")]
|
|
4562
4380
|
})
|
|
4563
4381
|
}),
|
|
4564
|
-
/* @__PURE__ */ (0, react_jsx_runtime.jsxs)(_deepseek_ai_dsh_client_ui_primitives.Button, {
|
|
4382
|
+
!panel && /* @__PURE__ */ (0, react_jsx_runtime.jsxs)(_deepseek_ai_dsh_client_ui_primitives.Button, {
|
|
4565
4383
|
variant: "ghost",
|
|
4566
4384
|
size: "sm",
|
|
4567
4385
|
onClick: () => lowtideStore.update((s) => {
|
|
@@ -4572,7 +4390,7 @@ window.__ModuleLoader__.load({
|
|
|
4572
4390
|
]
|
|
4573
4391
|
})]
|
|
4574
4392
|
});
|
|
4575
|
-
if (!queueOpen) return /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", {
|
|
4393
|
+
if (!panel && !queueOpen) return /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", {
|
|
4576
4394
|
className: QueueDock_module_css_default.dock,
|
|
4577
4395
|
children: [
|
|
4578
4396
|
onboardingBanner,
|
|
@@ -4602,7 +4420,7 @@ window.__ModuleLoader__.load({
|
|
|
4602
4420
|
tasks: host.tasks.filter((t2) => t2.workspace === group.workspace && (t2.status === "pending-review" || t2.status === "queued" || t2.status === "deferred"))
|
|
4603
4421
|
})).filter((group) => group.tasks.length > 0);
|
|
4604
4422
|
return /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", {
|
|
4605
|
-
className: QueueDock_module_css_default.dock,
|
|
4423
|
+
className: panel ? QueueDock_module_css_default.panel : QueueDock_module_css_default.dock,
|
|
4606
4424
|
children: [
|
|
4607
4425
|
onboardingBanner,
|
|
4608
4426
|
dockRow,
|
|
@@ -4744,8 +4562,331 @@ window.__ModuleLoader__.load({
|
|
|
4744
4562
|
});
|
|
4745
4563
|
}
|
|
4746
4564
|
//#endregion
|
|
4747
|
-
//#region
|
|
4748
|
-
|
|
4565
|
+
//#region client/better-sidebar.tsx
|
|
4566
|
+
/** Tab type of the queue panel (also its `SidebarTab.id`). */
|
|
4567
|
+
const QUEUE_TAB_ID = "dsh-lowtide:queue";
|
|
4568
|
+
/** Live host handle; null while better-sidebar is absent (or its registration
|
|
4569
|
+
* failed — `openQueueTab` then keeps using the dock). */
|
|
4570
|
+
let host = null;
|
|
4571
|
+
/** Locale-bound translate for the off-slot seats (tab title / tab body), which
|
|
4572
|
+
* get no framework-injected `t`. Reads the live locale at call time. */
|
|
4573
|
+
function translate(key, params) {
|
|
4574
|
+
return fill((lowtideStore.getSnapshot().activeLocale === "en" ? DICTS.en : DICTS.zh)[key], params);
|
|
4575
|
+
}
|
|
4576
|
+
/**
|
|
4577
|
+
* True when the host would actually put this tab on screen: the type is
|
|
4578
|
+
* registered, the user has not switched it off, and a session is in view.
|
|
4579
|
+
* Anything else means `openTab` is a silent no-op, so the dock has to stay.
|
|
4580
|
+
*/
|
|
4581
|
+
function hostedNow(sidebar) {
|
|
4582
|
+
if (!sidebar.isTabEnabled("dsh-lowtide:queue")) return false;
|
|
4583
|
+
if (sidebar.getTab !== void 0 && sidebar.getTab("dsh-lowtide:queue") === void 0) return false;
|
|
4584
|
+
if (sidebar.getSnapshot !== void 0 && sidebar.getSnapshot().sessionId === void 0) return false;
|
|
4585
|
+
return true;
|
|
4586
|
+
}
|
|
4587
|
+
/** Open (or focus) the queue tab. Falls back to expanding the composer dock
|
|
4588
|
+
* when no sidebar host is present or the host would not show the tab, so
|
|
4589
|
+
* "enqueued" always lands somewhere visible. */
|
|
4590
|
+
function openQueueTab() {
|
|
4591
|
+
const sidebar = host;
|
|
4592
|
+
if (sidebar !== null && hostedNow(sidebar)) try {
|
|
4593
|
+
sidebar.openTab({ type: QUEUE_TAB_ID });
|
|
4594
|
+
return;
|
|
4595
|
+
} catch (error) {
|
|
4596
|
+
console.error("[dsh-lowtide] openQueueTab failed", error);
|
|
4597
|
+
}
|
|
4598
|
+
lowtideStore.update((s) => {
|
|
4599
|
+
s.queueOpen = true;
|
|
4600
|
+
s.sidebarHosted = false;
|
|
4601
|
+
});
|
|
4602
|
+
}
|
|
4603
|
+
/** Tab body: the queue panel, always expanded and filling the tab. */
|
|
4604
|
+
function LowtideQueueTab() {
|
|
4605
|
+
const dict = useLowtide((s) => s.activeLocale) === "en" ? DICTS.en : DICTS.zh;
|
|
4606
|
+
return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(QueueDockView, {
|
|
4607
|
+
t: (key, params) => fill(dict[key], params),
|
|
4608
|
+
seat: "panel"
|
|
4609
|
+
});
|
|
4610
|
+
}
|
|
4611
|
+
/** Icon: lowtide's `Icon` probes the shell's own icon set, and the 14/16/20/24
|
|
4612
|
+
* suffix is the legacy name it resolves (`IconQueueOutline14` → …Regular). */
|
|
4613
|
+
function queueTabIcon(size) {
|
|
4614
|
+
return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(Icon, {
|
|
4615
|
+
name: `IconQueueOutline${size === 16 || size === 20 || size === 24 ? size : 14}`,
|
|
4616
|
+
size
|
|
4617
|
+
});
|
|
4618
|
+
}
|
|
4619
|
+
/** Tab badge: pending-review count (the number that needs a human). Evaluated
|
|
4620
|
+
* when the host reads it, so it tracks the host's render pass — best effort,
|
|
4621
|
+
* not a promised live counter. */
|
|
4622
|
+
function queueTabBadge() {
|
|
4623
|
+
const pending = lowtideStore.getSnapshot().host?.queue.pendingReview ?? 0;
|
|
4624
|
+
return pending > 0 ? pending : null;
|
|
4625
|
+
}
|
|
4626
|
+
function queueTabDescriptor() {
|
|
4627
|
+
return {
|
|
4628
|
+
id: QUEUE_TAB_ID,
|
|
4629
|
+
title: () => translate("dock.tabTitle"),
|
|
4630
|
+
icon: queueTabIcon,
|
|
4631
|
+
order: 45,
|
|
4632
|
+
single: true,
|
|
4633
|
+
badge: queueTabBadge,
|
|
4634
|
+
component: LowtideQueueTab
|
|
4635
|
+
};
|
|
4636
|
+
}
|
|
4637
|
+
/** Read the host service through either scope shape (property or `get`). */
|
|
4638
|
+
function readSidebar(injected) {
|
|
4639
|
+
const direct = injected.betterSidebar;
|
|
4640
|
+
if (direct !== void 0 && direct !== null) return direct;
|
|
4641
|
+
if (typeof injected.get === "function") {
|
|
4642
|
+
const viaGet = injected.get("betterSidebar");
|
|
4643
|
+
if (viaGet !== void 0 && viaGet !== null) return viaGet;
|
|
4644
|
+
}
|
|
4645
|
+
}
|
|
4646
|
+
/** Wire the queue tab into better-sidebar when — and only when — it is there. */
|
|
4647
|
+
function installQueueTab(ctx) {
|
|
4648
|
+
ctx.inject(["betterSidebar"], (injected) => {
|
|
4649
|
+
const scope = injected;
|
|
4650
|
+
const sidebar = readSidebar(scope);
|
|
4651
|
+
if (sidebar === void 0) return;
|
|
4652
|
+
const sync = () => {
|
|
4653
|
+
const hosted = hostedNow(sidebar);
|
|
4654
|
+
lowtideStore.update((s) => {
|
|
4655
|
+
if (s.sidebarHosted !== hosted) s.sidebarHosted = hosted;
|
|
4656
|
+
});
|
|
4657
|
+
};
|
|
4658
|
+
scope.effect(() => {
|
|
4659
|
+
try {
|
|
4660
|
+
const dispose = sidebar.registerTab(queueTabDescriptor());
|
|
4661
|
+
host = sidebar;
|
|
4662
|
+
sync();
|
|
4663
|
+
return dispose;
|
|
4664
|
+
} catch (error) {
|
|
4665
|
+
console.error("[dsh-lowtide] registerTab failed", error);
|
|
4666
|
+
return () => {};
|
|
4667
|
+
}
|
|
4668
|
+
});
|
|
4669
|
+
scope.effect(() => sidebar.subscribe(sync));
|
|
4670
|
+
if (typeof sidebar.subscribeState === "function") {
|
|
4671
|
+
const subscribeState = sidebar.subscribeState;
|
|
4672
|
+
scope.effect(() => subscribeState.call(sidebar, sync));
|
|
4673
|
+
}
|
|
4674
|
+
scope.effect(() => () => {
|
|
4675
|
+
if (host !== sidebar) return;
|
|
4676
|
+
host = null;
|
|
4677
|
+
lowtideStore.update((s) => {
|
|
4678
|
+
s.sidebarHosted = false;
|
|
4679
|
+
});
|
|
4680
|
+
});
|
|
4681
|
+
});
|
|
4682
|
+
}
|
|
4683
|
+
//#endregion
|
|
4684
|
+
//#region \0dsh-css:C:\Users\胡克劳\lowtide\work\pr8-review\packages\dsh-lowtide\client\components\InterceptCard.module.css.mjs
|
|
4685
|
+
const css$3 = ".rK1kwq_card{background:var(--dsw-specific-input-major);border:1px solid var(--dsw-alias-border-l2-darkmode-thin);border-radius:12px;flex-direction:column;gap:8px;padding:10px 12px;display:flex}.rK1kwq_header{justify-content:space-between;align-items:center;gap:8px;display:flex}.rK1kwq_title{color:var(--dsw-alias-label-primary);font:var(--dsw-font-s-strong-14);align-items:center;gap:6px;display:inline-flex}.rK1kwq_dot{display:inline-flex}.rK1kwq_close{width:28px;height:28px;color:var(--dsw-alias-label-tertiary);cursor:pointer;background:0 0;border:none;border-radius:999px;flex-shrink:0;justify-content:center;align-items:center;display:inline-flex}.rK1kwq_close:hover{background:var(--dsw-alias-interactive-bg-hover);color:var(--dsw-alias-label-primary)}.rK1kwq_compare{flex-wrap:wrap;gap:16px;display:flex}.rK1kwq_priceLabel{color:var(--dsw-alias-label-tertiary);font:var(--dsw-font-xxs-12)}.rK1kwq_row{flex-wrap:wrap;align-items:center;gap:8px;display:flex}.rK1kwq_dismiss{color:var(--dsw-alias-label-tertiary);font:var(--dsw-font-xxs-12);cursor:pointer;white-space:nowrap;background:0 0;border:none;margin-left:auto;padding:0 4px}.rK1kwq_dismiss:hover{color:var(--dsw-alias-label-secondary)}.rK1kwq_queueStatus{color:var(--dsw-alias-label-tertiary);font:var(--dsw-font-xxs-12);align-items:center;gap:4px;display:inline-flex}.rK1kwq_queueIcon{color:var(--dsw-alias-label-tertiary)}";
|
|
4686
|
+
const tagId$3 = "dsh-lowtide/InterceptCard.module.css";
|
|
4687
|
+
if (typeof document !== "undefined" && document.querySelector("style[data-plugin-css=" + JSON.stringify(tagId$3) + "]") === null) {
|
|
4688
|
+
const tag = document.createElement("style");
|
|
4689
|
+
tag.dataset.plugin = "dsh-lowtide";
|
|
4690
|
+
tag.dataset.pluginCss = tagId$3;
|
|
4691
|
+
tag.textContent = css$3;
|
|
4692
|
+
document.head.appendChild(tag);
|
|
4693
|
+
}
|
|
4694
|
+
var InterceptCard_module_css_default = {
|
|
4695
|
+
"queueIcon": "rK1kwq_queueIcon",
|
|
4696
|
+
"row": "rK1kwq_row",
|
|
4697
|
+
"dismiss": "rK1kwq_dismiss",
|
|
4698
|
+
"priceLabel": "rK1kwq_priceLabel",
|
|
4699
|
+
"compare": "rK1kwq_compare",
|
|
4700
|
+
"queueStatus": "rK1kwq_queueStatus",
|
|
4701
|
+
"header": "rK1kwq_header",
|
|
4702
|
+
"dot": "rK1kwq_dot",
|
|
4703
|
+
"card": "rK1kwq_card",
|
|
4704
|
+
"title": "rK1kwq_title",
|
|
4705
|
+
"close": "rK1kwq_close"
|
|
4706
|
+
};
|
|
4707
|
+
//#endregion
|
|
4708
|
+
//#region client/components/InterceptCard.tsx
|
|
4709
|
+
/**
|
|
4710
|
+
* Busy-hour prompt in the input dock. The native composer remains resident
|
|
4711
|
+
* and is the only text editor; this card offers explicit run/queue actions.
|
|
4712
|
+
* It appears for peak or custom >1x windows while the live draft is non-empty.
|
|
4713
|
+
*/
|
|
4714
|
+
function InterceptCard(props) {
|
|
4715
|
+
const { t } = props;
|
|
4716
|
+
const draft = props.useInput((input) => input.draft);
|
|
4717
|
+
const host = useLowtide((s) => s.host);
|
|
4718
|
+
const tier = useLowtide((s) => s.tier);
|
|
4719
|
+
const tierAt = useLowtide((s) => s.tierAt);
|
|
4720
|
+
const [workspace, setWorkspace] = (0, react.useState)(() => lastWorkspace());
|
|
4721
|
+
const [submitting, setSubmitting] = (0, react.useState)(false);
|
|
4722
|
+
const [dismissed, setDismissed] = (0, react.useState)(false);
|
|
4723
|
+
const [estimateResult, setEstimateResult] = (0, react.useState)(null);
|
|
4724
|
+
(0, react.useEffect)(() => {
|
|
4725
|
+
if (draft.trim() === "") setDismissed(false);
|
|
4726
|
+
}, [draft]);
|
|
4727
|
+
const shownLevel = tierAt > 0 ? tier.level : host?.price.tier ?? "off";
|
|
4728
|
+
const shownMultiplier = tierAt > 0 ? tier.multiplier : host?.price.multiplier ?? 1;
|
|
4729
|
+
const shownWindow = tierAt > 0 ? tier.window : host?.level?.window ?? null;
|
|
4730
|
+
const peakWindow = shownWindow !== null ? `${shownWindow.start}–${shownWindow.end}` : "";
|
|
4731
|
+
const customMultiplier = shownLevel === "custom" ? shownMultiplier : null;
|
|
4732
|
+
const priced = shownLevel === "peak" || shownLevel === "custom" && shownMultiplier > 1;
|
|
4733
|
+
const tierText = customMultiplier !== null && customMultiplier > 1 ? t("intercept.tierCustom", { multiplier: customMultiplier }) : t("intercept.tierPeak");
|
|
4734
|
+
const formValues = {
|
|
4735
|
+
prompt: draft,
|
|
4736
|
+
workspace,
|
|
4737
|
+
strategy: "single",
|
|
4738
|
+
rounds: 1,
|
|
4739
|
+
priority: 1,
|
|
4740
|
+
files: "",
|
|
4741
|
+
reasoning: "follow",
|
|
4742
|
+
model: host?.price.model ?? "",
|
|
4743
|
+
modelProvider: "",
|
|
4744
|
+
strategyHint: "",
|
|
4745
|
+
autonomy: host?.autonomy === "l1" || host?.autonomy === "l3" ? host.autonomy : "l2",
|
|
4746
|
+
sessionMode: "new"
|
|
4747
|
+
};
|
|
4748
|
+
(0, react.useEffect)(() => {
|
|
4749
|
+
if (draft.trim() === "") {
|
|
4750
|
+
setEstimateResult(null);
|
|
4751
|
+
return;
|
|
4752
|
+
}
|
|
4753
|
+
const timer = setTimeout(() => {
|
|
4754
|
+
const nowModel = host?.price.model;
|
|
4755
|
+
if (nowModel === void 0) return;
|
|
4756
|
+
estimate(draft, [], nowModel, formValues.model).then((res) => {
|
|
4757
|
+
if (res.ok) setEstimateResult({
|
|
4758
|
+
peak: res.peak,
|
|
4759
|
+
off: res.off
|
|
4760
|
+
});
|
|
4761
|
+
}).catch(() => {});
|
|
4762
|
+
}, 400);
|
|
4763
|
+
return () => clearTimeout(timer);
|
|
4764
|
+
}, [
|
|
4765
|
+
draft,
|
|
4766
|
+
host?.price.model,
|
|
4767
|
+
formValues.model
|
|
4768
|
+
]);
|
|
4769
|
+
function onFormChange(patch) {
|
|
4770
|
+
if (patch.workspace !== void 0) setWorkspace(patch.workspace);
|
|
4771
|
+
}
|
|
4772
|
+
async function queueTonight() {
|
|
4773
|
+
if (draft.trim() === "") return;
|
|
4774
|
+
setSubmitting(true);
|
|
4775
|
+
const result = await submitTask({
|
|
4776
|
+
prompt: draft,
|
|
4777
|
+
files: [],
|
|
4778
|
+
workspace: workspace.trim() !== "" ? workspace.trim() : lastWorkspace(),
|
|
4779
|
+
priority: 1,
|
|
4780
|
+
permissionPreset: "lt-standard",
|
|
4781
|
+
model: formValues.model
|
|
4782
|
+
});
|
|
4783
|
+
setSubmitting(false);
|
|
4784
|
+
if (result.ok) {
|
|
4785
|
+
if (workspace.trim() !== "") rememberWorkspace(workspace.trim());
|
|
4786
|
+
props.inputActions.setDraft("");
|
|
4787
|
+
showToast(t("toast.enqueued"));
|
|
4788
|
+
openQueueTab();
|
|
4789
|
+
} else showToast(t("toast.submitFailed", { error: result.error ?? "unknown" }));
|
|
4790
|
+
}
|
|
4791
|
+
function dismiss() {
|
|
4792
|
+
dismissPeakToday().then(() => refreshNow());
|
|
4793
|
+
}
|
|
4794
|
+
if (host === null || !priced || host.dismissedPeakToday || draft.trim() === "" || dismissed) return null;
|
|
4795
|
+
const priceKnown = host.price.priceKnown;
|
|
4796
|
+
const peakLabel = estimateResult !== null && priceKnown ? `¥${estimateResult.peak.toFixed(2)}` : priceKnown ? t("intercept.priceNowPeak") : t("intercept.priceUnknown");
|
|
4797
|
+
const offLabel = estimateResult !== null && priceKnown ? `¥${estimateResult.off.toFixed(2)}` : priceKnown ? t("intercept.priceTonight") : t("intercept.priceUnknown");
|
|
4798
|
+
return /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", {
|
|
4799
|
+
className: InterceptCard_module_css_default.card,
|
|
4800
|
+
"data-lowtide-peak-prompt": true,
|
|
4801
|
+
children: [
|
|
4802
|
+
/* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", {
|
|
4803
|
+
className: InterceptCard_module_css_default.header,
|
|
4804
|
+
children: [/* @__PURE__ */ (0, react_jsx_runtime.jsxs)("span", {
|
|
4805
|
+
className: InterceptCard_module_css_default.title,
|
|
4806
|
+
children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", {
|
|
4807
|
+
className: InterceptCard_module_css_default.dot,
|
|
4808
|
+
children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(_deepseek_ai_dsh_client_ui_primitives.StateDot, { state: "error" })
|
|
4809
|
+
}), t("intercept.title", {
|
|
4810
|
+
tier: tierText,
|
|
4811
|
+
window: peakWindow
|
|
4812
|
+
})]
|
|
4813
|
+
}), /* @__PURE__ */ (0, react_jsx_runtime.jsx)("button", {
|
|
4814
|
+
type: "button",
|
|
4815
|
+
className: InterceptCard_module_css_default.close,
|
|
4816
|
+
title: t("intercept.closeTitle"),
|
|
4817
|
+
onClick: () => setDismissed(true),
|
|
4818
|
+
children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(Icon, { name: "IconCloseOutline16" })
|
|
4819
|
+
})]
|
|
4820
|
+
}),
|
|
4821
|
+
/* @__PURE__ */ (0, react_jsx_runtime.jsx)(TaskForm, {
|
|
4822
|
+
variant: "intercept",
|
|
4823
|
+
t,
|
|
4824
|
+
values: formValues,
|
|
4825
|
+
onChange: onFormChange
|
|
4826
|
+
}),
|
|
4827
|
+
/* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", {
|
|
4828
|
+
className: InterceptCard_module_css_default.compare,
|
|
4829
|
+
children: [
|
|
4830
|
+
/* @__PURE__ */ (0, react_jsx_runtime.jsxs)("span", {
|
|
4831
|
+
className: InterceptCard_module_css_default.priceLabel,
|
|
4832
|
+
children: [customMultiplier !== null && customMultiplier > 1 ? t("intercept.priceNowCustom", { multiplier: customMultiplier }) : t("intercept.priceNowPeak"), /* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", {
|
|
4833
|
+
className: InterceptCard_module_css_default.priceValue,
|
|
4834
|
+
children: peakLabel
|
|
4835
|
+
})]
|
|
4836
|
+
}),
|
|
4837
|
+
/* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", {
|
|
4838
|
+
className: InterceptCard_module_css_default.arrow,
|
|
4839
|
+
children: "→"
|
|
4840
|
+
}),
|
|
4841
|
+
/* @__PURE__ */ (0, react_jsx_runtime.jsxs)("span", {
|
|
4842
|
+
className: InterceptCard_module_css_default.priceLabel,
|
|
4843
|
+
children: [t("intercept.priceTonight"), /* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", {
|
|
4844
|
+
className: InterceptCard_module_css_default.priceValue,
|
|
4845
|
+
children: offLabel
|
|
4846
|
+
})]
|
|
4847
|
+
})
|
|
4848
|
+
]
|
|
4849
|
+
}),
|
|
4850
|
+
/* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", {
|
|
4851
|
+
className: InterceptCard_module_css_default.queueStatus,
|
|
4852
|
+
children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)(Icon, {
|
|
4853
|
+
name: "IconQueueOutline14",
|
|
4854
|
+
className: InterceptCard_module_css_default.queueIcon
|
|
4855
|
+
}), t("intercept.queueStatus", {
|
|
4856
|
+
total: host.queue.total,
|
|
4857
|
+
pending: host.queue.pendingReview
|
|
4858
|
+
})]
|
|
4859
|
+
}),
|
|
4860
|
+
/* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", {
|
|
4861
|
+
className: InterceptCard_module_css_default.row,
|
|
4862
|
+
children: [
|
|
4863
|
+
/* @__PURE__ */ (0, react_jsx_runtime.jsx)(_deepseek_ai_dsh_client_ui_primitives.Button, {
|
|
4864
|
+
variant: "outline",
|
|
4865
|
+
size: "md",
|
|
4866
|
+
onClick: () => props.inputActions.submit(),
|
|
4867
|
+
children: t("intercept.runNow")
|
|
4868
|
+
}),
|
|
4869
|
+
/* @__PURE__ */ (0, react_jsx_runtime.jsx)(_deepseek_ai_dsh_client_ui_primitives.Button, {
|
|
4870
|
+
variant: "primary",
|
|
4871
|
+
size: "md",
|
|
4872
|
+
disabled: submitting,
|
|
4873
|
+
onClick: () => void queueTonight(),
|
|
4874
|
+
children: t("intercept.enqueue")
|
|
4875
|
+
}),
|
|
4876
|
+
/* @__PURE__ */ (0, react_jsx_runtime.jsx)("button", {
|
|
4877
|
+
type: "button",
|
|
4878
|
+
className: InterceptCard_module_css_default.dismiss,
|
|
4879
|
+
onClick: dismiss,
|
|
4880
|
+
children: t("intercept.dismiss")
|
|
4881
|
+
})
|
|
4882
|
+
]
|
|
4883
|
+
})
|
|
4884
|
+
]
|
|
4885
|
+
});
|
|
4886
|
+
}
|
|
4887
|
+
//#endregion
|
|
4888
|
+
//#region \0dsh-css:C:\Users\胡克劳\lowtide\work\pr8-review\packages\dsh-lowtide\client\components\MorningReport.module.css.mjs
|
|
4889
|
+
const css$2 = ".iNqA_q_historyList{flex-direction:column;gap:4px;max-height:360px;display:flex;overflow-y:auto}.iNqA_q_historyRow{color:var(--dsw-alias-label-primary);font:var(--dsw-font-xs-13);cursor:pointer;text-align:left;background:0 0;border:none;border-radius:8px;justify-content:space-between;align-items:center;gap:8px;padding:8px 10px;display:flex}.iNqA_q_historyRow:hover{background:var(--dsw-alias-interactive-bg-hover)}.iNqA_q_historyDate{font-weight:600}.iNqA_q_historyMeta{color:var(--dsw-alias-label-tertiary);font-variant-numeric:tabular-nums}.iNqA_q_historyEmpty{color:var(--dsw-alias-label-tertiary);font:var(--dsw-font-xs-13);padding:12px}.iNqA_q_historyHeader{color:var(--dsw-alias-label-tertiary);font:var(--dsw-font-xxs-12);padding:0 10px 2px}.iNqA_q_historyRowWrap{border-radius:8px;align-items:center;gap:4px;display:flex}.iNqA_q_historyRowWrap:hover{background:var(--dsw-alias-interactive-bg-hover)}.iNqA_q_historyRowWrap .iNqA_q_historyRow{flex:1;min-width:0}.iNqA_q_historyRowWrap .iNqA_q_historyRow:hover{background:0 0}.iNqA_q_historyDelete{width:24px;height:24px;color:var(--dsw-alias-label-tertiary);cursor:pointer;opacity:0;background:0 0;border:none;border-radius:6px;justify-content:center;align-items:center;margin-right:4px;font-size:12px;display:inline-flex}.iNqA_q_historyRowWrap:hover .iNqA_q_historyDelete{opacity:1}.iNqA_q_historyDelete:hover{background:var(--dsw-alias-interactive-bg-hover);color:var(--dsw-alias-state-error-primary)}.iNqA_q_historyFooter{border-top:1px solid var(--dsw-alias-border-l1);justify-content:flex-end;padding-top:6px;display:flex}.iNqA_q_clearBtn{color:var(--dsw-alias-label-tertiary);font:var(--dsw-font-xxs-12);cursor:pointer;background:0 0;border:none;border-radius:6px;padding:4px 8px}.iNqA_q_clearBtn:hover{color:var(--dsw-alias-state-error-primary);background:var(--dsw-alias-interactive-bg-hover)}.iNqA_q_clearArmed{border:1px solid var(--dsw-alias-state-error-primary);color:var(--dsw-alias-state-error-primary);font:var(--dsw-font-xxs-12);cursor:pointer;background:0 0;border-radius:6px;padding:4px 8px;font-weight:600}.iNqA_q_body{flex-direction:column;gap:8px;display:flex}.iNqA_q_headline{flex-direction:column;align-items:center;gap:2px;display:flex}.iNqA_q_headlineLabel{color:var(--dsw-alias-label-secondary);font:var(--dsw-font-s-14)}.iNqA_q_headlineValue{color:var(--dsw-alias-state-success-primary);font-family:var(--ds-font-family-code);font-variant-numeric:tabular-nums;font-size:32px;font-weight:700;line-height:40px}.iNqA_q_headlineMeta{color:var(--dsw-alias-label-secondary);font:var(--dsw-font-xs-13);font-variant-numeric:tabular-nums}.iNqA_q_divider{background:var(--dsw-alias-border-l1);height:1px}.iNqA_q_taskRow{border-left:2px solid #0000;gap:8px;padding:4px 0 4px 8px;display:flex}.iNqA_q_doneRow{border-left-color:var(--dsw-alias-state-success-primary)}.iNqA_q_badRow{border-left-color:var(--dsw-alias-state-error-primary)}.iNqA_q_taskMain{flex-direction:column;flex:1;gap:1px;min-width:0;display:flex}.iNqA_q_taskPrompt{color:var(--dsw-alias-label-primary);font:var(--dsw-font-s-14)}.iNqA_q_taskMeta{color:var(--dsw-alias-label-tertiary);font:var(--dsw-font-xxs-12);font-variant-numeric:tabular-nums;white-space:nowrap;text-overflow:ellipsis;overflow:hidden}.iNqA_q_more{color:var(--dsw-alias-label-tertiary);font:var(--dsw-font-xxs-12);padding-left:8px}.iNqA_q_reviewExcerpt{color:var(--dsw-alias-label-secondary);font:var(--dsw-font-xxs-12)}.iNqA_q_reviewExcerpt summary{cursor:pointer;color:var(--dsw-alias-label-tertiary);user-select:none}.iNqA_q_reviewExcerptBody{background:var(--dsw-alias-bg-layer-1);border:1px solid var(--dsw-alias-border-l1);white-space:pre-wrap;word-break:break-word;border-radius:6px;margin-top:4px;padding:6px 8px;line-height:1.6}.iNqA_q_footer{justify-content:space-between;align-items:center;display:flex}.iNqA_q_modalFooter{justify-content:flex-end;display:flex}";
|
|
4749
4890
|
const tagId$2 = "dsh-lowtide/MorningReport.module.css";
|
|
4750
4891
|
if (typeof document !== "undefined" && document.querySelector("style[data-plugin-css=" + JSON.stringify(tagId$2) + "]") === null) {
|
|
4751
4892
|
const tag = document.createElement("style");
|
|
@@ -4755,34 +4896,34 @@ window.__ModuleLoader__.load({
|
|
|
4755
4896
|
document.head.appendChild(tag);
|
|
4756
4897
|
}
|
|
4757
4898
|
var MorningReport_module_css_default = {
|
|
4758
|
-
"
|
|
4759
|
-
"
|
|
4760
|
-
"
|
|
4761
|
-
"
|
|
4762
|
-
"
|
|
4763
|
-
"
|
|
4764
|
-
"
|
|
4765
|
-
"taskRow": "
|
|
4766
|
-
"badRow": "
|
|
4767
|
-
"
|
|
4768
|
-
"
|
|
4769
|
-
"
|
|
4770
|
-
"
|
|
4771
|
-
"
|
|
4772
|
-
"
|
|
4773
|
-
"
|
|
4774
|
-
"
|
|
4775
|
-
"headlineLabel": "
|
|
4776
|
-
"
|
|
4777
|
-
"
|
|
4778
|
-
"
|
|
4779
|
-
"
|
|
4780
|
-
"
|
|
4781
|
-
"
|
|
4782
|
-
"
|
|
4783
|
-
"
|
|
4784
|
-
"
|
|
4785
|
-
"
|
|
4899
|
+
"historyRow": "iNqA_q_historyRow",
|
|
4900
|
+
"historyList": "iNqA_q_historyList",
|
|
4901
|
+
"historyEmpty": "iNqA_q_historyEmpty",
|
|
4902
|
+
"body": "iNqA_q_body",
|
|
4903
|
+
"taskPrompt": "iNqA_q_taskPrompt",
|
|
4904
|
+
"historyFooter": "iNqA_q_historyFooter",
|
|
4905
|
+
"historyHeader": "iNqA_q_historyHeader",
|
|
4906
|
+
"taskRow": "iNqA_q_taskRow",
|
|
4907
|
+
"badRow": "iNqA_q_badRow",
|
|
4908
|
+
"more": "iNqA_q_more",
|
|
4909
|
+
"reviewExcerpt": "iNqA_q_reviewExcerpt",
|
|
4910
|
+
"reviewExcerptBody": "iNqA_q_reviewExcerptBody",
|
|
4911
|
+
"headlineValue": "iNqA_q_headlineValue",
|
|
4912
|
+
"headlineMeta": "iNqA_q_headlineMeta",
|
|
4913
|
+
"doneRow": "iNqA_q_doneRow",
|
|
4914
|
+
"taskMeta": "iNqA_q_taskMeta",
|
|
4915
|
+
"footer": "iNqA_q_footer",
|
|
4916
|
+
"headlineLabel": "iNqA_q_headlineLabel",
|
|
4917
|
+
"clearBtn": "iNqA_q_clearBtn",
|
|
4918
|
+
"headline": "iNqA_q_headline",
|
|
4919
|
+
"clearArmed": "iNqA_q_clearArmed",
|
|
4920
|
+
"historyRowWrap": "iNqA_q_historyRowWrap",
|
|
4921
|
+
"taskMain": "iNqA_q_taskMain",
|
|
4922
|
+
"historyDate": "iNqA_q_historyDate",
|
|
4923
|
+
"modalFooter": "iNqA_q_modalFooter",
|
|
4924
|
+
"historyMeta": "iNqA_q_historyMeta",
|
|
4925
|
+
"historyDelete": "iNqA_q_historyDelete",
|
|
4926
|
+
"divider": "iNqA_q_divider"
|
|
4786
4927
|
};
|
|
4787
4928
|
//#endregion
|
|
4788
4929
|
//#region client/components/MorningReport.tsx
|
|
@@ -5105,8 +5246,8 @@ window.__ModuleLoader__.load({
|
|
|
5105
5246
|
});
|
|
5106
5247
|
}
|
|
5107
5248
|
//#endregion
|
|
5108
|
-
//#region \0dsh-css:
|
|
5109
|
-
const css$1 = ".
|
|
5249
|
+
//#region \0dsh-css:C:\Users\胡克劳\lowtide\work\pr8-review\packages\dsh-lowtide\client\components\ConfirmGate.module.css.mjs
|
|
5250
|
+
const css$1 = "._7kvOxa_card{background:var(--dsw-alias-bg-layer-2);border:1px solid var(--dsw-alias-border-l1);width:480px;max-width:calc(100vw - 32px);box-shadow:var(--dsw-shadow-lv3);color:var(--dsw-alias-label-primary);z-index:60;border-radius:14px;flex-direction:column;gap:8px;padding:14px 16px;display:flex;position:fixed;top:80px;left:50%;transform:translate(-50%)}._7kvOxa_header{justify-content:space-between;align-items:center;display:flex}._7kvOxa_title{font:var(--dsw-font-s-14);font-weight:600}._7kvOxa_close{width:24px;height:24px;color:var(--dsw-alias-label-tertiary);cursor:pointer;background:0 0;border:none;border-radius:999px;justify-content:center;align-items:center;font-size:13px;display:inline-flex}._7kvOxa_close:hover{background:var(--dsw-alias-interactive-bg-hover);color:var(--dsw-alias-label-primary)}._7kvOxa_meta{color:var(--dsw-alias-label-secondary);font:var(--dsw-font-xxs-12)}._7kvOxa_list{flex-direction:column;gap:2px;max-height:200px;display:flex;overflow-y:auto}._7kvOxa_row{border-radius:8px;justify-content:space-between;align-items:center;gap:8px;padding:5px 6px;display:flex}._7kvOxa_row:hover{background:var(--dsw-alias-interactive-bg-hover)}._7kvOxa_prompt{min-width:0;color:var(--dsw-alias-label-primary);font:var(--dsw-font-xs-13);white-space:nowrap;text-overflow:ellipsis;flex:1;overflow:hidden}._7kvOxa_remove{width:24px;height:24px;color:var(--dsw-alias-label-tertiary);cursor:pointer;background:0 0;border:none;border-radius:999px;flex-shrink:0;justify-content:center;align-items:center;font-size:12px;display:inline-flex}._7kvOxa_remove:hover{background:var(--dsw-alias-interactive-bg-hover);color:var(--dsw-alias-state-error-primary)}._7kvOxa_more{color:var(--dsw-alias-label-tertiary);font:var(--dsw-font-xxs-12);padding:4px 6px}._7kvOxa_footer{border-top:1px solid var(--dsw-alias-border-l1);justify-content:space-between;align-items:center;gap:8px;padding-top:8px;display:flex}._7kvOxa_releaseLabel{align-items:center;gap:4px;display:inline-flex}._7kvOxa_defer{color:var(--dsw-alias-label-tertiary);font:var(--dsw-font-xxs-12);cursor:pointer;background:0 0;border:none;text-decoration:underline}._7kvOxa_defer:hover{color:var(--dsw-alias-label-secondary)}";
|
|
5110
5251
|
const tagId$1 = "dsh-lowtide/ConfirmGate.module.css";
|
|
5111
5252
|
if (typeof document !== "undefined" && document.querySelector("style[data-plugin-css=" + JSON.stringify(tagId$1) + "]") === null) {
|
|
5112
5253
|
const tag = document.createElement("style");
|
|
@@ -5116,19 +5257,19 @@ window.__ModuleLoader__.load({
|
|
|
5116
5257
|
document.head.appendChild(tag);
|
|
5117
5258
|
}
|
|
5118
5259
|
var ConfirmGate_module_css_default = {
|
|
5119
|
-
"
|
|
5120
|
-
"
|
|
5121
|
-
"
|
|
5122
|
-
"
|
|
5123
|
-
"
|
|
5124
|
-
"header": "
|
|
5125
|
-
"
|
|
5126
|
-
"
|
|
5127
|
-
"
|
|
5128
|
-
"
|
|
5129
|
-
"
|
|
5130
|
-
"
|
|
5131
|
-
"
|
|
5260
|
+
"row": "_7kvOxa_row",
|
|
5261
|
+
"more": "_7kvOxa_more",
|
|
5262
|
+
"prompt": "_7kvOxa_prompt",
|
|
5263
|
+
"remove": "_7kvOxa_remove",
|
|
5264
|
+
"footer": "_7kvOxa_footer",
|
|
5265
|
+
"header": "_7kvOxa_header",
|
|
5266
|
+
"close": "_7kvOxa_close",
|
|
5267
|
+
"releaseLabel": "_7kvOxa_releaseLabel",
|
|
5268
|
+
"meta": "_7kvOxa_meta",
|
|
5269
|
+
"title": "_7kvOxa_title",
|
|
5270
|
+
"card": "_7kvOxa_card",
|
|
5271
|
+
"defer": "_7kvOxa_defer",
|
|
5272
|
+
"list": "_7kvOxa_list"
|
|
5132
5273
|
};
|
|
5133
5274
|
//#endregion
|
|
5134
5275
|
//#region client/components/ConfirmGate.tsx
|
|
@@ -5268,8 +5409,8 @@ window.__ModuleLoader__.load({
|
|
|
5268
5409
|
});
|
|
5269
5410
|
}
|
|
5270
5411
|
//#endregion
|
|
5271
|
-
//#region \0dsh-css:
|
|
5272
|
-
const css = ".
|
|
5412
|
+
//#region \0dsh-css:C:\Users\胡克劳\lowtide\work\pr8-review\packages\dsh-lowtide\client\settings.module.css.mjs
|
|
5413
|
+
const css = ".h7Kzfq_page{flex-direction:column;gap:14px;padding:4px 2px 16px;display:flex}.h7Kzfq_loading{color:var(--dsw-alias-label-tertiary);font:var(--dsw-font-xs-13);padding:12px 0}.h7Kzfq_onboarding{background:var(--dsw-specific-tip);border:1px solid var(--dsw-alias-border-l1);border-radius:10px;flex-direction:column;gap:6px;padding:12px 14px;display:flex}.h7Kzfq_onboardingTitle{color:var(--dsw-alias-brand-primary);font:var(--dsw-font-s-14);font-weight:600}.h7Kzfq_onboardingSteps{color:var(--dsw-alias-label-secondary);font:var(--dsw-font-xs-13);margin:0;padding-left:18px;line-height:1.7}.h7Kzfq_onboardingSteps b{color:var(--dsw-alias-label-primary)}.h7Kzfq_langRow{justify-content:space-between;align-items:center;gap:8px;padding:8px 0;display:flex}.h7Kzfq_langLabel{color:var(--dsw-alias-label-secondary);font:var(--dsw-font-xs-13)}.h7Kzfq_error{color:var(--dsw-alias-state-error-primary);font:var(--dsw-font-xs-13);background:var(--dsw-alias-interactive-bg-hover);border-radius:8px;padding:8px 12px}.h7Kzfq_section{flex-direction:column;gap:8px;display:flex}.h7Kzfq_sectionHead{justify-content:space-between;align-items:center;display:flex}.h7Kzfq_sectionTitle{color:var(--dsw-alias-label-primary);font:var(--dsw-font-s-14);margin:0;font-weight:600}.h7Kzfq_grid{grid-template-columns:repeat(auto-fill,minmax(200px,1fr));gap:10px;display:grid}.h7Kzfq_field{color:var(--dsw-alias-label-secondary);font:var(--dsw-font-xs-13);flex-direction:column;gap:4px;display:flex}.h7Kzfq_fieldLabel{color:var(--dsw-alias-label-secondary);font:var(--dsw-font-xs-13)}.h7Kzfq_strategyHint{color:var(--dsw-alias-label-tertiary);font:var(--dsw-font-xxs-12);line-height:1.5}.h7Kzfq_batchWindowField{grid-column:1/-1}.h7Kzfq_batchWindowRow{border-radius:8px;flex-wrap:wrap;align-items:center;gap:8px;margin-top:6px;padding:4px 6px;display:flex}.h7Kzfq_batchWindowRow:hover{background:var(--dsw-alias-interactive-bg-hover)}.h7Kzfq_batchWindowRow .h7Kzfq_input{flex:0 132px;width:auto;height:36px}.h7Kzfq_batchWindowDash{color:var(--dsw-alias-label-tertiary)}.h7Kzfq_batchWindowActions{margin-top:8px}.h7Kzfq_input{box-sizing:border-box;background:var(--dsw-alias-bg-layer-1);border:1px solid var(--dsw-alias-border-l2);width:100%;height:32px;color:var(--dsw-alias-label-primary);font:var(--dsw-font-xs-13);border-radius:8px;outline:none;padding:0 8px}.h7Kzfq_input:focus{border-color:var(--dsw-alias-brand-primary)}.h7Kzfq_checkbox{color:var(--dsw-alias-label-secondary);font:var(--dsw-font-xs-13);align-items:center;gap:6px;display:flex}.h7Kzfq_pillRow{gap:6px;display:flex}.h7Kzfq_autonomyPill{border:1px solid var(--dsw-alias-border-l2);color:var(--dsw-alias-label-secondary);font:var(--dsw-font-xs-13);cursor:pointer;user-select:none;border-radius:999px;padding:4px 12px}.h7Kzfq_autonomyPill:hover{background:var(--dsw-alias-interactive-bg-hover)}.h7Kzfq_autonomyActive{border-color:var(--dsw-alias-brand-primary);color:var(--dsw-alias-brand-primary);font-weight:600}.h7Kzfq_confirmBox{color:var(--dsw-alias-state-warn-primary);font:var(--dsw-font-xxs-12);background:var(--dsw-specific-tip);border-radius:8px;align-items:center;gap:8px;padding:8px 10px;display:flex}.h7Kzfq_confirmBtn{background:var(--dsw-alias-state-warn-primary);color:var(--dsw-alias-label-primary-foreground);font:var(--dsw-font-xxs-12);cursor:pointer;border:none;border-radius:999px;padding:3px 10px}.h7Kzfq_confirmCancel{color:var(--dsw-alias-label-tertiary);font:var(--dsw-font-xxs-12);cursor:pointer;background:0 0;border:none;padding:3px 8px}.h7Kzfq_hint{color:var(--dsw-alias-label-tertiary);font:var(--dsw-font-xxs-12);margin:0;line-height:1.6}.h7Kzfq_windowRow{flex-wrap:wrap;align-items:center;gap:6px;display:flex}.h7Kzfq_windowRow .h7Kzfq_input{flex:0 150px}.h7Kzfq_dayRow{gap:4px;display:flex}.h7Kzfq_dayBtn{border:1px solid var(--dsw-alias-border-l2);width:24px;height:24px;color:var(--dsw-alias-label-tertiary);font:var(--dsw-font-xxs-12);cursor:pointer;background:0 0;border-radius:999px;justify-content:center;align-items:center;display:inline-flex}.h7Kzfq_dayBtn:hover{background:var(--dsw-alias-interactive-bg-hover);color:var(--dsw-alias-label-primary)}.h7Kzfq_dayActive{border-color:var(--dsw-alias-brand-primary);color:var(--dsw-alias-brand-primary);font-weight:600}.h7Kzfq_noWindows{color:var(--dsw-alias-label-tertiary);font:var(--dsw-font-xs-13);background:var(--dsw-specific-tip);border-radius:8px;padding:10px 12px}.h7Kzfq_footer{justify-content:flex-end;display:flex}.h7Kzfq_footerLeft{gap:8px;margin-right:auto;display:flex}.h7Kzfq_officialCard{border:1px solid var(--dsw-alias-border-l1);background:var(--dsw-alias-bg-layer-1);border-radius:10px;flex-direction:column;gap:6px;padding:10px 12px;display:flex}.h7Kzfq_officialTitle{color:var(--dsw-alias-label-primary);font:var(--dsw-font-xs-strong-13)}.h7Kzfq_officialBody{color:var(--dsw-alias-label-secondary);font:var(--dsw-font-xxs-12);line-height:1.6}.h7Kzfq_officialActions{align-items:center;gap:8px;margin-top:2px;display:flex}.h7Kzfq_legend{gap:14px;display:flex}.h7Kzfq_bandPeak{background:var(--dsw-alias-state-error-primary);opacity:.85}.h7Kzfq_bandOff{background:var(--dsw-alias-state-success-primary);opacity:.85}.h7Kzfq_bandCustom{background:var(--dsw-alias-state-warn-primary);opacity:.85}.h7Kzfq_legendItem{color:var(--dsw-alias-label-tertiary);font:var(--dsw-font-xxs-12);align-items:center;gap:5px;display:flex}.h7Kzfq_legendDot{opacity:.9;border-radius:2px;width:10px;height:10px}.h7Kzfq_priceTable{flex-direction:column;gap:3px;display:flex}.h7Kzfq_priceHead,.h7Kzfq_priceRow{grid-template-columns:1.4fr .6fr 1fr 1fr 1fr;align-items:center;gap:6px;display:grid}.h7Kzfq_priceHead{color:var(--dsw-alias-label-tertiary);font:var(--dsw-font-xxs-12)}.h7Kzfq_priceRow .h7Kzfq_input{height:28px}.h7Kzfq_priceModel{color:var(--dsw-alias-label-primary);font-family:var(--ds-font-family-code);font-size:12px}.h7Kzfq_priceTier{color:var(--dsw-alias-label-secondary);font:var(--dsw-font-xs-13)}";
|
|
5273
5414
|
const tagId = "dsh-lowtide/settings.module.css";
|
|
5274
5415
|
if (typeof document !== "undefined" && document.querySelector("style[data-plugin-css=" + JSON.stringify(tagId) + "]") === null) {
|
|
5275
5416
|
const tag = document.createElement("style");
|
|
@@ -5279,56 +5420,56 @@ window.__ModuleLoader__.load({
|
|
|
5279
5420
|
document.head.appendChild(tag);
|
|
5280
5421
|
}
|
|
5281
5422
|
var settings_module_css_default = {
|
|
5282
|
-
"
|
|
5283
|
-
"
|
|
5284
|
-
"
|
|
5285
|
-
"
|
|
5286
|
-
"
|
|
5287
|
-
"
|
|
5288
|
-
"
|
|
5289
|
-
"
|
|
5290
|
-
"
|
|
5291
|
-
"
|
|
5292
|
-
"
|
|
5293
|
-
"
|
|
5294
|
-
"
|
|
5295
|
-
"
|
|
5296
|
-
"
|
|
5297
|
-
"
|
|
5298
|
-
"
|
|
5299
|
-
"
|
|
5300
|
-
"
|
|
5301
|
-
"
|
|
5302
|
-
"
|
|
5303
|
-
"officialBody": "
|
|
5304
|
-
"
|
|
5305
|
-
"
|
|
5306
|
-
"
|
|
5307
|
-
"
|
|
5308
|
-
"
|
|
5309
|
-
"
|
|
5310
|
-
"
|
|
5311
|
-
"
|
|
5312
|
-
"
|
|
5313
|
-
"
|
|
5314
|
-
"
|
|
5315
|
-
"
|
|
5316
|
-
"
|
|
5317
|
-
"
|
|
5318
|
-
"
|
|
5319
|
-
"
|
|
5320
|
-
"
|
|
5321
|
-
"
|
|
5322
|
-
"
|
|
5323
|
-
"
|
|
5324
|
-
"
|
|
5325
|
-
"langRow": "
|
|
5326
|
-
"
|
|
5327
|
-
"
|
|
5328
|
-
"
|
|
5329
|
-
"
|
|
5330
|
-
"
|
|
5331
|
-
"
|
|
5423
|
+
"windowRow": "h7Kzfq_windowRow",
|
|
5424
|
+
"checkbox": "h7Kzfq_checkbox",
|
|
5425
|
+
"footer": "h7Kzfq_footer",
|
|
5426
|
+
"error": "h7Kzfq_error",
|
|
5427
|
+
"sectionHead": "h7Kzfq_sectionHead",
|
|
5428
|
+
"bandPeak": "h7Kzfq_bandPeak",
|
|
5429
|
+
"dayActive": "h7Kzfq_dayActive",
|
|
5430
|
+
"bandOff": "h7Kzfq_bandOff",
|
|
5431
|
+
"footerLeft": "h7Kzfq_footerLeft",
|
|
5432
|
+
"grid": "h7Kzfq_grid",
|
|
5433
|
+
"hint": "h7Kzfq_hint",
|
|
5434
|
+
"bandCustom": "h7Kzfq_bandCustom",
|
|
5435
|
+
"autonomyActive": "h7Kzfq_autonomyActive",
|
|
5436
|
+
"dayBtn": "h7Kzfq_dayBtn",
|
|
5437
|
+
"batchWindowDash": "h7Kzfq_batchWindowDash",
|
|
5438
|
+
"onboardingTitle": "h7Kzfq_onboardingTitle",
|
|
5439
|
+
"input": "h7Kzfq_input",
|
|
5440
|
+
"langLabel": "h7Kzfq_langLabel",
|
|
5441
|
+
"dayRow": "h7Kzfq_dayRow",
|
|
5442
|
+
"legend": "h7Kzfq_legend",
|
|
5443
|
+
"confirmBtn": "h7Kzfq_confirmBtn",
|
|
5444
|
+
"officialBody": "h7Kzfq_officialBody",
|
|
5445
|
+
"batchWindowRow": "h7Kzfq_batchWindowRow",
|
|
5446
|
+
"batchWindowActions": "h7Kzfq_batchWindowActions",
|
|
5447
|
+
"strategyHint": "h7Kzfq_strategyHint",
|
|
5448
|
+
"confirmBox": "h7Kzfq_confirmBox",
|
|
5449
|
+
"onboardingSteps": "h7Kzfq_onboardingSteps",
|
|
5450
|
+
"confirmCancel": "h7Kzfq_confirmCancel",
|
|
5451
|
+
"fieldLabel": "h7Kzfq_fieldLabel",
|
|
5452
|
+
"section": "h7Kzfq_section",
|
|
5453
|
+
"sectionTitle": "h7Kzfq_sectionTitle",
|
|
5454
|
+
"field": "h7Kzfq_field",
|
|
5455
|
+
"batchWindowField": "h7Kzfq_batchWindowField",
|
|
5456
|
+
"officialActions": "h7Kzfq_officialActions",
|
|
5457
|
+
"autonomyPill": "h7Kzfq_autonomyPill",
|
|
5458
|
+
"officialTitle": "h7Kzfq_officialTitle",
|
|
5459
|
+
"legendItem": "h7Kzfq_legendItem",
|
|
5460
|
+
"priceTable": "h7Kzfq_priceTable",
|
|
5461
|
+
"legendDot": "h7Kzfq_legendDot",
|
|
5462
|
+
"priceHead": "h7Kzfq_priceHead",
|
|
5463
|
+
"onboarding": "h7Kzfq_onboarding",
|
|
5464
|
+
"priceRow": "h7Kzfq_priceRow",
|
|
5465
|
+
"priceTier": "h7Kzfq_priceTier",
|
|
5466
|
+
"langRow": "h7Kzfq_langRow",
|
|
5467
|
+
"priceModel": "h7Kzfq_priceModel",
|
|
5468
|
+
"loading": "h7Kzfq_loading",
|
|
5469
|
+
"officialCard": "h7Kzfq_officialCard",
|
|
5470
|
+
"noWindows": "h7Kzfq_noWindows",
|
|
5471
|
+
"pillRow": "h7Kzfq_pillRow",
|
|
5472
|
+
"page": "h7Kzfq_page"
|
|
5332
5473
|
};
|
|
5333
5474
|
//#endregion
|
|
5334
5475
|
//#region client/settings.tsx
|
|
@@ -6284,6 +6425,7 @@ window.__ModuleLoader__.load({
|
|
|
6284
6425
|
});
|
|
6285
6426
|
});
|
|
6286
6427
|
const stop = startPolling();
|
|
6428
|
+
installQueueTab(ctx);
|
|
6287
6429
|
ctx.slots.inject("conversation.session.header.utilities", () => ctx.slots.register({
|
|
6288
6430
|
name: "conversation.session.header.utilities",
|
|
6289
6431
|
id: "lt-price-pill",
|