dsh-lowtide 0.2.8 → 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/README.md +3 -3
- package/cordis.patch.yml +47 -47
- package/lib/client.js +1533 -1499
- package/lib/client.js.map +1 -1
- package/lib/index.js +191 -39
- package/lib/types/client/better-sidebar.d.ts +67 -0
- package/lib/types/client/components/InterceptCard.d.ts +2 -16
- package/lib/types/client/components/QueueDock.d.ts +9 -1
- package/lib/types/client/components/TaskForm.d.ts +3 -4
- package/lib/types/client/i18n.d.ts +1 -1
- package/lib/types/client/index.d.ts +1 -1
- package/lib/types/client/store.d.ts +7 -1
- package/lib/types/src/session-picker.d.ts +1 -1
- package/lib/types/src/turns.d.ts +54 -0
- package/package.json +104 -104
- package/LICENSE +0 -21
- package/lib/types/client/hooks/useInterceptDraft.d.ts +0 -13
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": "执行报告",
|
|
@@ -208,7 +209,6 @@ window.__ModuleLoader__.load({
|
|
|
208
209
|
"intercept.title": "当前为{tier}({window})",
|
|
209
210
|
"intercept.tierPeak": "忙时",
|
|
210
211
|
"intercept.tierCustom": "高价时段(×{multiplier})",
|
|
211
|
-
"intercept.inputPlaceholder": "输入要发送的内容……",
|
|
212
212
|
"intercept.workspaceLabel": "工作区",
|
|
213
213
|
"intercept.workspacePlaceholder": "留空使用上次使用的工作区",
|
|
214
214
|
"intercept.workspaceWarning": "未设置工作区,将使用服务器默认目录",
|
|
@@ -290,7 +290,7 @@ window.__ModuleLoader__.load({
|
|
|
290
290
|
"settings.title": "闲时计划",
|
|
291
291
|
"settings.loading": "加载闲时计划配置…",
|
|
292
292
|
"settings.onboardingTitle": "快速上手",
|
|
293
|
-
"settings.step1": "
|
|
293
|
+
"settings.step1": "点输入框旁的「新建」投递任务;忙时输入时,提示卡也能一键入队,且不会打断原生输入框",
|
|
294
294
|
"settings.step2": "在队列中裁定放行要跑的任务",
|
|
295
295
|
"settings.step3": "到你设置的时间窗(按你的本地时间),任务自动以闲时半价执行",
|
|
296
296
|
"settings.step4": "次日打开「执行报告」看结果和省下的钱",
|
|
@@ -347,7 +347,7 @@ window.__ModuleLoader__.load({
|
|
|
347
347
|
"settings.unlimited": "不限",
|
|
348
348
|
"settings.windowsTitle": "忙时 / 闲时窗口",
|
|
349
349
|
"settings.addWindow": "添加",
|
|
350
|
-
"settings.windowsHint": "未配置时使用官方忙时(按北京时间判定,见上方说明);你自定义的窗口一律按你的本地时间判定。自定义窗口按「闲时价 × 倍率」计费,倍率大于 1
|
|
350
|
+
"settings.windowsHint": "未配置时使用官方忙时(按北京时间判定,见上方说明);你自定义的窗口一律按你的本地时间判定。自定义窗口按「闲时价 × 倍率」计费,倍率大于 1 且草稿非空时会显示忙时提示,不会接管输入框。",
|
|
351
351
|
"settings.windowLabelName": "名称(可选)",
|
|
352
352
|
"settings.windowMultiplier": "倍率",
|
|
353
353
|
"settings.windowDays": "星期",
|
|
@@ -409,6 +409,7 @@ window.__ModuleLoader__.load({
|
|
|
409
409
|
"dock.disconnected": "Reconnecting…",
|
|
410
410
|
"dock.retry": "Retry",
|
|
411
411
|
"dock.title": "Off-peak queue {count}",
|
|
412
|
+
"dock.tabTitle": "Off-peak queue",
|
|
412
413
|
"dock.pending": "{count} to review",
|
|
413
414
|
"pill.queued": "pending",
|
|
414
415
|
"dock.report": "Report",
|
|
@@ -542,7 +543,6 @@ window.__ModuleLoader__.load({
|
|
|
542
543
|
"intercept.title": "Now {tier} ({window})",
|
|
543
544
|
"intercept.tierPeak": "Peak hours",
|
|
544
545
|
"intercept.tierCustom": "Custom window (×{multiplier})",
|
|
545
|
-
"intercept.inputPlaceholder": "Type your message…",
|
|
546
546
|
"intercept.workspaceLabel": "Workspace",
|
|
547
547
|
"intercept.workspacePlaceholder": "Leave empty to reuse the last one",
|
|
548
548
|
"intercept.workspaceWarning": "No workspace set — the server default directory will be used",
|
|
@@ -624,7 +624,7 @@ window.__ModuleLoader__.load({
|
|
|
624
624
|
"settings.title": "Lowtide",
|
|
625
625
|
"settings.loading": "Loading lowtide config…",
|
|
626
626
|
"settings.onboardingTitle": "Quick start",
|
|
627
|
-
"settings.step1": "Click \"New\" beside the input bar
|
|
627
|
+
"settings.step1": "Click \"New\" beside the input bar, or use the peak-hours prompt; it never replaces the native editor",
|
|
628
628
|
"settings.step2": "Approve tasks in the queue",
|
|
629
629
|
"settings.step3": "Within the window you set (your local time), tasks run at off-peak prices",
|
|
630
630
|
"settings.step4": "Check the execution report next day for results and savings",
|
|
@@ -681,7 +681,7 @@ window.__ModuleLoader__.load({
|
|
|
681
681
|
"settings.unlimited": "Unlimited",
|
|
682
682
|
"settings.windowsTitle": "Peak / off-peak windows",
|
|
683
683
|
"settings.addWindow": "Add",
|
|
684
|
-
"settings.windowsHint": "Uses the official peak hours (judged in Beijing time, see the explainer above) when none are configured; your custom windows are always judged in YOUR local time.
|
|
684
|
+
"settings.windowsHint": "Uses the official peak hours (judged in Beijing time, see the explainer above) when none are configured; your custom windows are always judged in YOUR local time. Above ×1, a non-empty draft shows a peak prompt without taking over the composer.",
|
|
685
685
|
"settings.windowLabelName": "Name (optional)",
|
|
686
686
|
"settings.windowMultiplier": "Multiplier",
|
|
687
687
|
"settings.windowDays": "Days",
|
|
@@ -714,6 +714,13 @@ window.__ModuleLoader__.load({
|
|
|
714
714
|
"settings.exportHint": "Copy the window & price config (JSON) as a backup for later restore."
|
|
715
715
|
}
|
|
716
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
|
+
}
|
|
717
724
|
//#endregion
|
|
718
725
|
//#region client/lib/icons.tsx
|
|
719
726
|
/**
|
|
@@ -776,8 +783,8 @@ window.__ModuleLoader__.load({
|
|
|
776
783
|
return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(Resolved, { ...rest });
|
|
777
784
|
}
|
|
778
785
|
//#endregion
|
|
779
|
-
//#region \0dsh-css:C:\Users\胡克劳\lowtide\work\
|
|
780
|
-
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}";
|
|
781
788
|
const tagId$13 = "dsh-lowtide/atoms.module.css";
|
|
782
789
|
if (typeof document !== "undefined" && document.querySelector("style[data-plugin-css=" + JSON.stringify(tagId$13) + "]") === null) {
|
|
783
790
|
const tag = document.createElement("style");
|
|
@@ -787,11 +794,11 @@ window.__ModuleLoader__.load({
|
|
|
787
794
|
document.head.appendChild(tag);
|
|
788
795
|
}
|
|
789
796
|
var atoms_module_css_default = {
|
|
790
|
-
"modelBadge": "
|
|
791
|
-
"
|
|
792
|
-
"countdown": "
|
|
793
|
-
"
|
|
794
|
-
"modelBadgeQ": "
|
|
797
|
+
"modelBadge": "BLNmbq_modelBadge",
|
|
798
|
+
"money": "BLNmbq_money",
|
|
799
|
+
"countdown": "BLNmbq_countdown",
|
|
800
|
+
"modelBadgeUnknown": "BLNmbq_modelBadgeUnknown",
|
|
801
|
+
"modelBadgeQ": "BLNmbq_modelBadgeQ"
|
|
795
802
|
};
|
|
796
803
|
//#endregion
|
|
797
804
|
//#region client/components/atoms.tsx
|
|
@@ -1881,6 +1888,7 @@ window.__ModuleLoader__.load({
|
|
|
1881
1888
|
connected: false,
|
|
1882
1889
|
error: null,
|
|
1883
1890
|
queueOpen: false,
|
|
1891
|
+
sidebarHosted: false,
|
|
1884
1892
|
reportOpen: false,
|
|
1885
1893
|
reportHistoryOpen: false,
|
|
1886
1894
|
reportUnread: false,
|
|
@@ -1913,6 +1921,7 @@ window.__ModuleLoader__.load({
|
|
|
1913
1921
|
connected: false,
|
|
1914
1922
|
error: null,
|
|
1915
1923
|
queueOpen: false,
|
|
1924
|
+
sidebarHosted: false,
|
|
1916
1925
|
reportOpen: false,
|
|
1917
1926
|
reportHistoryOpen: false,
|
|
1918
1927
|
reportUnread: false,
|
|
@@ -2253,8 +2262,8 @@ window.__ModuleLoader__.load({
|
|
|
2253
2262
|
} catch {}
|
|
2254
2263
|
}
|
|
2255
2264
|
//#endregion
|
|
2256
|
-
//#region \0dsh-css:C:\Users\胡克劳\lowtide\work\
|
|
2257
|
-
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}";
|
|
2258
2267
|
const tagId$12 = "dsh-lowtide/PriceBand.module.css";
|
|
2259
2268
|
if (typeof document !== "undefined" && document.querySelector("style[data-plugin-css=" + JSON.stringify(tagId$12) + "]") === null) {
|
|
2260
2269
|
const tag = document.createElement("style");
|
|
@@ -2264,15 +2273,15 @@ window.__ModuleLoader__.load({
|
|
|
2264
2273
|
document.head.appendChild(tag);
|
|
2265
2274
|
}
|
|
2266
2275
|
var PriceBand_module_css_default = {
|
|
2267
|
-
"
|
|
2268
|
-
"
|
|
2269
|
-
"
|
|
2270
|
-
"
|
|
2271
|
-
"
|
|
2272
|
-
"
|
|
2273
|
-
"
|
|
2274
|
-
"bandOff": "
|
|
2275
|
-
"bandCustom": "
|
|
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"
|
|
2276
2285
|
};
|
|
2277
2286
|
//#endregion
|
|
2278
2287
|
//#region client/components/PriceBand.tsx
|
|
@@ -2326,8 +2335,8 @@ window.__ModuleLoader__.load({
|
|
|
2326
2335
|
});
|
|
2327
2336
|
}
|
|
2328
2337
|
//#endregion
|
|
2329
|
-
//#region \0dsh-css:C:\Users\胡克劳\lowtide\work\
|
|
2330
|
-
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}";
|
|
2331
2340
|
const tagId$11 = "dsh-lowtide/WindowEditorModal.module.css";
|
|
2332
2341
|
if (typeof document !== "undefined" && document.querySelector("style[data-plugin-css=" + JSON.stringify(tagId$11) + "]") === null) {
|
|
2333
2342
|
const tag = document.createElement("style");
|
|
@@ -2337,18 +2346,18 @@ window.__ModuleLoader__.load({
|
|
|
2337
2346
|
document.head.appendChild(tag);
|
|
2338
2347
|
}
|
|
2339
2348
|
var WindowEditorModal_module_css_default = {
|
|
2340
|
-
"
|
|
2341
|
-
"
|
|
2342
|
-
"
|
|
2343
|
-
"
|
|
2344
|
-
"
|
|
2345
|
-
"
|
|
2346
|
-
"
|
|
2347
|
-
"
|
|
2348
|
-
"
|
|
2349
|
-
"
|
|
2350
|
-
"
|
|
2351
|
-
"
|
|
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"
|
|
2352
2361
|
};
|
|
2353
2362
|
//#endregion
|
|
2354
2363
|
//#region client/components/WindowEditorModal.tsx
|
|
@@ -2623,8 +2632,8 @@ window.__ModuleLoader__.load({
|
|
|
2623
2632
|
});
|
|
2624
2633
|
}
|
|
2625
2634
|
//#endregion
|
|
2626
|
-
//#region \0dsh-css:C:\Users\胡克劳\lowtide\work\
|
|
2627
|
-
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)}";
|
|
2628
2637
|
const tagId$10 = "dsh-lowtide/PricePill.module.css";
|
|
2629
2638
|
if (typeof document !== "undefined" && document.querySelector("style[data-plugin-css=" + JSON.stringify(tagId$10) + "]") === null) {
|
|
2630
2639
|
const tag = document.createElement("style");
|
|
@@ -2634,14 +2643,14 @@ window.__ModuleLoader__.load({
|
|
|
2634
2643
|
document.head.appendChild(tag);
|
|
2635
2644
|
}
|
|
2636
2645
|
var PricePill_module_css_default = {
|
|
2637
|
-
"
|
|
2638
|
-
"
|
|
2639
|
-
"
|
|
2640
|
-
"
|
|
2641
|
-
"count": "
|
|
2642
|
-
"
|
|
2643
|
-
"
|
|
2644
|
-
"
|
|
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"
|
|
2645
2654
|
};
|
|
2646
2655
|
//#endregion
|
|
2647
2656
|
//#region client/components/PricePill.tsx
|
|
@@ -2650,7 +2659,7 @@ window.__ModuleLoader__.load({
|
|
|
2650
2659
|
* status dot · one-line state (闲时/忙时/执行中) · queue count badge.
|
|
2651
2660
|
*
|
|
2652
2661
|
* v3.1: the price number is gone from the pill — a static "¥1.5/M" reads as
|
|
2653
|
-
* noise, not an action signal; pricing belongs to the
|
|
2662
|
+
* noise, not an action signal; pricing belongs to the peak prompt where
|
|
2654
2663
|
* the decision happens. The tooltip keeps the full price detail.
|
|
2655
2664
|
* (The "starts at" countdown was removed — no action value for the user.)
|
|
2656
2665
|
* Click toggles the queue dock. All copy rides the `t` seat (i18n).
|
|
@@ -2755,67 +2764,35 @@ window.__ModuleLoader__.load({
|
|
|
2755
2764
|
})] });
|
|
2756
2765
|
}
|
|
2757
2766
|
//#endregion
|
|
2758
|
-
//#region client/
|
|
2759
|
-
|
|
2760
|
-
|
|
2761
|
-
|
|
2762
|
-
|
|
2763
|
-
|
|
2764
|
-
|
|
2765
|
-
|
|
2766
|
-
|
|
2767
|
-
|
|
2768
|
-
|
|
2769
|
-
|
|
2770
|
-
|
|
2771
|
-
|
|
2772
|
-
|
|
2773
|
-
|
|
2774
|
-
|
|
2775
|
-
* Constraint: `selectIntercept` is a PURE selector run by the host chain
|
|
2776
|
-
* machinery — it cannot use hooks. So the draft + exemption state lives in
|
|
2777
|
-
* module scope, and only the WRITE side is wrapped in a hook.
|
|
2778
|
-
*/
|
|
2779
|
-
const INTERCEPT_DISMISS_KEY = "dsh-lowtide:intercept-session-dismissed";
|
|
2780
|
-
let currentDraft = "";
|
|
2781
|
-
/** Sync the live draft into the module state (QueueDock stays mounted inside
|
|
2782
|
-
* the overlay-kept fallback, so it keeps tracking while the card is up).
|
|
2783
|
-
* An emptied draft re-arms interception for the next message. */
|
|
2784
|
-
function useInterceptDraftTracking(draft) {
|
|
2785
|
-
(0, react.useEffect)(() => {
|
|
2786
|
-
if (draft === currentDraft) return;
|
|
2787
|
-
currentDraft = draft;
|
|
2788
|
-
if (draft.trim() === "") clearInterceptSessionDismissal();
|
|
2789
|
-
}, [draft]);
|
|
2790
|
-
}
|
|
2791
|
-
/** Pure read for the chain selector. */
|
|
2792
|
-
function readInterceptDraft() {
|
|
2793
|
-
return currentDraft;
|
|
2794
|
-
}
|
|
2795
|
-
/** ✕ exemption: this message will not be intercepted again this session. */
|
|
2796
|
-
function dismissInterceptSession() {
|
|
2797
|
-
try {
|
|
2798
|
-
sessionStorage.setItem(INTERCEPT_DISMISS_KEY, "1");
|
|
2799
|
-
} catch {}
|
|
2800
|
-
}
|
|
2801
|
-
/** Clear the per-session exemption (new message = re-arm). */
|
|
2802
|
-
function clearInterceptSessionDismissal() {
|
|
2803
|
-
try {
|
|
2804
|
-
sessionStorage.removeItem(INTERCEPT_DISMISS_KEY);
|
|
2805
|
-
} catch {}
|
|
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);
|
|
2806
2784
|
}
|
|
2807
|
-
/**
|
|
2808
|
-
function
|
|
2809
|
-
|
|
2810
|
-
|
|
2811
|
-
|
|
2812
|
-
|
|
2813
|
-
}
|
|
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 "";
|
|
2814
2791
|
}
|
|
2815
2792
|
//#endregion
|
|
2816
|
-
//#region \0dsh-css:C:\Users\胡克劳\lowtide\work\
|
|
2817
|
-
const css$9 = ".
|
|
2818
|
-
const tagId$9 = "dsh-lowtide/
|
|
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";
|
|
2819
2796
|
if (typeof document !== "undefined" && document.querySelector("style[data-plugin-css=" + JSON.stringify(tagId$9) + "]") === null) {
|
|
2820
2797
|
const tag = document.createElement("style");
|
|
2821
2798
|
tag.dataset.plugin = "dsh-lowtide";
|
|
@@ -2823,977 +2800,117 @@ window.__ModuleLoader__.load({
|
|
|
2823
2800
|
tag.textContent = css$9;
|
|
2824
2801
|
document.head.appendChild(tag);
|
|
2825
2802
|
}
|
|
2826
|
-
var
|
|
2827
|
-
"
|
|
2828
|
-
"
|
|
2829
|
-
"
|
|
2830
|
-
"
|
|
2831
|
-
"
|
|
2832
|
-
"
|
|
2833
|
-
"
|
|
2834
|
-
"
|
|
2835
|
-
"
|
|
2836
|
-
"
|
|
2837
|
-
"
|
|
2838
|
-
"
|
|
2839
|
-
"fieldInput": "T9YqrG_fieldInput",
|
|
2840
|
-
"costTag": "T9YqrG_costTag",
|
|
2841
|
-
"compactInput": "T9YqrG_compactInput",
|
|
2842
|
-
"fieldLabel": "T9YqrG_fieldLabel",
|
|
2843
|
-
"guidanceInput": "T9YqrG_guidanceInput",
|
|
2844
|
-
"compactRow": "T9YqrG_compactRow",
|
|
2845
|
-
"compact": "T9YqrG_compact",
|
|
2846
|
-
"modal": "T9YqrG_modal",
|
|
2847
|
-
"pillRow": "T9YqrG_pillRow",
|
|
2848
|
-
"prompt": "T9YqrG_prompt",
|
|
2849
|
-
"modelFallbackRow": "T9YqrG_modelFallbackRow"
|
|
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"
|
|
2850
2816
|
};
|
|
2851
2817
|
//#endregion
|
|
2852
|
-
//#region client/components/
|
|
2853
|
-
|
|
2854
|
-
|
|
2855
|
-
|
|
2856
|
-
|
|
2857
|
-
|
|
2858
|
-
|
|
2859
|
-
|
|
2860
|
-
|
|
2861
|
-
|
|
2862
|
-
|
|
2863
|
-
|
|
2864
|
-
};
|
|
2865
|
-
const STRATEGY_HINT_KEYS = {
|
|
2866
|
-
single: "strategy.singleHint",
|
|
2867
|
-
iterative: "strategy.iterativeHint",
|
|
2868
|
-
sampling: "strategy.samplingHint",
|
|
2869
|
-
review: "strategy.reviewHint"
|
|
2870
|
-
};
|
|
2871
|
-
const STRATEGY_HINT_LABEL_KEYS = {
|
|
2872
|
-
single: null,
|
|
2873
|
-
iterative: "modal.strategyHintIterative",
|
|
2874
|
-
sampling: "modal.strategyHintSampling",
|
|
2875
|
-
review: "modal.strategyHintReview"
|
|
2876
|
-
};
|
|
2877
|
-
const STRATEGY_HINT_PLACEHOLDER_KEYS = {
|
|
2878
|
-
single: null,
|
|
2879
|
-
iterative: "strategyHintPlaceholderIterative",
|
|
2880
|
-
sampling: "strategyHintPlaceholderSampling",
|
|
2881
|
-
review: "strategyHintPlaceholderReview"
|
|
2882
|
-
};
|
|
2883
|
-
/** Cost factor label for each strategy (displayed on the pill). */
|
|
2884
|
-
function strategyCostFactor(s, rounds) {
|
|
2885
|
-
if (s === "single") return "1×";
|
|
2886
|
-
if (s === "review") return "2×";
|
|
2887
|
-
if (s === "iterative") return `~${rounds}×`;
|
|
2888
|
-
return `${rounds}×`;
|
|
2889
|
-
}
|
|
2890
|
-
/** Pick one random option from a '|||'-delimited i18n string. */
|
|
2891
|
-
function randomPick(localized) {
|
|
2892
|
-
const options = localized.split("|||");
|
|
2893
|
-
return options[Math.floor(Math.random() * options.length)];
|
|
2894
|
-
}
|
|
2895
|
-
/** Label for a reasoning effort: the adapter's native name, or the raw id. */
|
|
2896
|
-
function reasoningLabel(effort) {
|
|
2897
|
-
return effort.name !== "" ? effort.name : effort.id;
|
|
2898
|
-
}
|
|
2899
|
-
/** Reasoning efforts to offer for a given model (fallback = standard set). */
|
|
2900
|
-
function reasoningOptions(model) {
|
|
2901
|
-
const efforts = model?.reasoningEfforts;
|
|
2902
|
-
if (efforts !== void 0 && efforts.length > 0) return [...efforts];
|
|
2903
|
-
return [
|
|
2904
|
-
"off",
|
|
2905
|
-
"low",
|
|
2906
|
-
"high",
|
|
2907
|
-
"max"
|
|
2908
|
-
].map((id) => ({
|
|
2909
|
-
id,
|
|
2910
|
-
name: id
|
|
2911
|
-
}));
|
|
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 "";
|
|
2912
2830
|
}
|
|
2913
|
-
/**
|
|
2914
|
-
|
|
2915
|
-
|
|
2916
|
-
|
|
2917
|
-
|
|
2918
|
-
|
|
2919
|
-
|
|
2920
|
-
|
|
2921
|
-
l2: "autonomy.l2Hint",
|
|
2922
|
-
l3: "autonomy.l3Hint"
|
|
2923
|
-
};
|
|
2924
|
-
const AUTONOMY_DESC_KEYS = {
|
|
2925
|
-
l1: "autonomy.l1Desc",
|
|
2926
|
-
l2: "autonomy.l2Desc",
|
|
2927
|
-
l3: "autonomy.l3Desc"
|
|
2928
|
-
};
|
|
2929
|
-
/** Relative "x min/h ago" label for a session's last activity; falls back
|
|
2930
|
-
* to an absolute "MM-DD HH:mm" label once the session is a day old. */
|
|
2931
|
-
function sessionTimeLabel(lastModified, t) {
|
|
2932
|
-
const diff = Date.now() - lastModified;
|
|
2933
|
-
if (diff < 6e4) return t("modal.time.justNow");
|
|
2934
|
-
if (diff < 36e5) return t("modal.time.minutesAgo", { n: Math.floor(diff / 6e4) });
|
|
2935
|
-
if (diff < 864e5) return t("modal.time.hoursAgo", { n: Math.floor(diff / 36e5) });
|
|
2936
|
-
const d = new Date(lastModified);
|
|
2937
|
-
const pad = (n) => String(n).padStart(2, "0");
|
|
2938
|
-
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" });
|
|
2939
2839
|
}
|
|
2940
|
-
function
|
|
2941
|
-
const
|
|
2942
|
-
|
|
2943
|
-
|
|
2944
|
-
|
|
2945
|
-
|
|
2946
|
-
|
|
2947
|
-
|
|
2948
|
-
|
|
2949
|
-
|
|
2950
|
-
|
|
2951
|
-
|
|
2952
|
-
|
|
2953
|
-
|
|
2954
|
-
|
|
2955
|
-
|
|
2956
|
-
|
|
2957
|
-
|
|
2958
|
-
|
|
2959
|
-
|
|
2960
|
-
|
|
2961
|
-
|
|
2962
|
-
|
|
2963
|
-
|
|
2964
|
-
|
|
2965
|
-
|
|
2966
|
-
|
|
2967
|
-
|
|
2968
|
-
|
|
2969
|
-
|
|
2970
|
-
|
|
2971
|
-
|
|
2972
|
-
|
|
2973
|
-
|
|
2974
|
-
|
|
2975
|
-
|
|
2976
|
-
|
|
2977
|
-
|
|
2978
|
-
|
|
2979
|
-
|
|
2980
|
-
|
|
2981
|
-
|
|
2982
|
-
|
|
2983
|
-
|
|
2984
|
-
|
|
2985
|
-
|
|
2986
|
-
|
|
2987
|
-
|
|
2988
|
-
|
|
2989
|
-
|
|
2990
|
-
|
|
2991
|
-
|
|
2992
|
-
|
|
2993
|
-
|
|
2994
|
-
|
|
2995
|
-
|
|
2996
|
-
|
|
2997
|
-
|
|
2998
|
-
|
|
2999
|
-
|
|
3000
|
-
|
|
3001
|
-
|
|
3002
|
-
|
|
3003
|
-
|
|
3004
|
-
|
|
3005
|
-
|
|
3006
|
-
|
|
3007
|
-
|
|
3008
|
-
|
|
3009
|
-
|
|
3010
|
-
|
|
3011
|
-
|
|
3012
|
-
|
|
3013
|
-
|
|
3014
|
-
value: "",
|
|
3015
|
-
children: t("modal.workspaceDefault")
|
|
3016
|
-
}),
|
|
3017
|
-
ws.map((w) => /* @__PURE__ */ (0, react_jsx_runtime.jsx)("option", {
|
|
3018
|
-
value: w.path,
|
|
3019
|
-
children: w.title !== null ? `${w.title} · ${w.path}` : w.path
|
|
3020
|
-
}, w.path)),
|
|
3021
|
-
/* @__PURE__ */ (0, react_jsx_runtime.jsx)("option", {
|
|
3022
|
-
value: CUSTOM,
|
|
3023
|
-
children: t("modal.workspaceCustom")
|
|
3024
|
-
})
|
|
3025
|
-
]
|
|
3026
|
-
}), isCustom && /* @__PURE__ */ (0, react_jsx_runtime.jsx)("input", {
|
|
3027
|
-
className: TaskForm_module_css_default.fieldInput,
|
|
3028
|
-
value: values.workspace,
|
|
3029
|
-
onChange: (e) => onChange({ workspace: e.target.value }),
|
|
3030
|
-
placeholder: t("modal.workspacePlaceholder")
|
|
3031
|
-
})] });
|
|
3032
|
-
}
|
|
3033
|
-
return /* @__PURE__ */ (0, react_jsx_runtime.jsx)("input", {
|
|
3034
|
-
className: TaskForm_module_css_default.fieldInput,
|
|
3035
|
-
value: values.workspace,
|
|
3036
|
-
onChange: (e) => onChange({ workspace: e.target.value }),
|
|
3037
|
-
placeholder: t("modal.workspacePlaceholder")
|
|
3038
|
-
});
|
|
3039
|
-
})()]
|
|
3040
|
-
}),
|
|
3041
|
-
/* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", {
|
|
3042
|
-
className: TaskForm_module_css_default.field,
|
|
3043
|
-
children: [
|
|
3044
|
-
/* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", {
|
|
3045
|
-
className: TaskForm_module_css_default.fieldLabel,
|
|
3046
|
-
children: t("modal.strategy")
|
|
3047
|
-
}),
|
|
3048
|
-
/* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", {
|
|
3049
|
-
className: TaskForm_module_css_default.pillRow,
|
|
3050
|
-
children: [
|
|
3051
|
-
"single",
|
|
3052
|
-
"iterative",
|
|
3053
|
-
"sampling",
|
|
3054
|
-
"review"
|
|
3055
|
-
].map((s) => /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("span", {
|
|
3056
|
-
className: `${TaskForm_module_css_default.strategyPill} ${strategy === s ? TaskForm_module_css_default.strategyActive : ""}`,
|
|
3057
|
-
onClick: () => onChange({ strategy: s }),
|
|
3058
|
-
children: [t(STRATEGY_LABEL_KEYS[s]), /* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", {
|
|
3059
|
-
className: TaskForm_module_css_default.costTag,
|
|
3060
|
-
children: strategyCostFactor(s, values.rounds)
|
|
3061
|
-
})]
|
|
3062
|
-
}, s))
|
|
3063
|
-
}),
|
|
3064
|
-
/* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", {
|
|
3065
|
-
className: TaskForm_module_css_default.strategyHint,
|
|
3066
|
-
children: t(STRATEGY_HINT_KEYS[strategy])
|
|
3067
|
-
})
|
|
3068
|
-
]
|
|
3069
|
-
}),
|
|
3070
|
-
showRounds && /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", {
|
|
3071
|
-
className: TaskForm_module_css_default.field,
|
|
3072
|
-
children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", {
|
|
3073
|
-
className: TaskForm_module_css_default.fieldLabel,
|
|
3074
|
-
children: t("modal.rounds")
|
|
3075
|
-
}), /* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", {
|
|
3076
|
-
className: TaskForm_module_css_default.pillRow,
|
|
3077
|
-
children: [
|
|
3078
|
-
2,
|
|
3079
|
-
3,
|
|
3080
|
-
4,
|
|
3081
|
-
5
|
|
3082
|
-
].map((r) => /* @__PURE__ */ (0, react_jsx_runtime.jsx)(_deepseek_ai_dsh_client_ui_primitives.Pill, {
|
|
3083
|
-
active: values.rounds === r,
|
|
3084
|
-
onClick: () => onChange({ rounds: r }),
|
|
3085
|
-
children: r
|
|
3086
|
-
}, r))
|
|
3087
|
-
})]
|
|
3088
|
-
}),
|
|
3089
|
-
hintLabelKey !== null && hintPlaceholderKey !== null && /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", {
|
|
3090
|
-
className: TaskForm_module_css_default.field,
|
|
3091
|
-
children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", {
|
|
3092
|
-
className: TaskForm_module_css_default.fieldLabel,
|
|
3093
|
-
children: t(hintLabelKey)
|
|
3094
|
-
}), /* @__PURE__ */ (0, react_jsx_runtime.jsx)("textarea", {
|
|
3095
|
-
className: TaskForm_module_css_default.guidanceInput,
|
|
3096
|
-
placeholder: hintPlaceholder,
|
|
3097
|
-
value: values.strategyHint,
|
|
3098
|
-
onChange: (e) => onChange({ strategyHint: e.target.value }),
|
|
3099
|
-
rows: 2
|
|
3100
|
-
})]
|
|
3101
|
-
}),
|
|
3102
|
-
/* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", {
|
|
3103
|
-
className: TaskForm_module_css_default.field,
|
|
3104
|
-
children: [
|
|
3105
|
-
/* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", {
|
|
3106
|
-
className: TaskForm_module_css_default.fieldLabel,
|
|
3107
|
-
children: t("modal.autonomy")
|
|
3108
|
-
}),
|
|
3109
|
-
/* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", {
|
|
3110
|
-
className: TaskForm_module_css_default.pillRow,
|
|
3111
|
-
children: [
|
|
3112
|
-
"l1",
|
|
3113
|
-
"l2",
|
|
3114
|
-
"l3"
|
|
3115
|
-
].map((level) => /* @__PURE__ */ (0, react_jsx_runtime.jsx)(_deepseek_ai_dsh_client_ui_primitives.Tooltip, {
|
|
3116
|
-
label: t(AUTONOMY_HINT_KEYS[level]),
|
|
3117
|
-
side: "top",
|
|
3118
|
-
children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", {
|
|
3119
|
-
className: TaskForm_module_css_default.autonomyBtn,
|
|
3120
|
-
children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(_deepseek_ai_dsh_client_ui_primitives.Button, {
|
|
3121
|
-
size: "sm",
|
|
3122
|
-
variant: values.autonomy === level ? "primary" : "outline",
|
|
3123
|
-
onClick: () => onChange({ autonomy: level }),
|
|
3124
|
-
children: t(AUTONOMY_LABEL_KEYS[level])
|
|
3125
|
-
})
|
|
3126
|
-
})
|
|
3127
|
-
}, level))
|
|
3128
|
-
}),
|
|
3129
|
-
/* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", {
|
|
3130
|
-
className: TaskForm_module_css_default.strategyHint,
|
|
3131
|
-
children: t(AUTONOMY_DESC_KEYS[values.autonomy])
|
|
3132
|
-
})
|
|
3133
|
-
]
|
|
3134
|
-
}),
|
|
3135
|
-
props.onAdvancedOpenChange !== void 0 && /* @__PURE__ */ (0, react_jsx_runtime.jsxs)(react_jsx_runtime.Fragment, { children: [/* @__PURE__ */ (0, react_jsx_runtime.jsxs)("button", {
|
|
3136
|
-
type: "button",
|
|
3137
|
-
className: TaskForm_module_css_default.advancedBtn,
|
|
3138
|
-
onClick: () => props.onAdvancedOpenChange?.(true),
|
|
3139
|
-
children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)(Icon, { name: "IconSettingsOutline14" }), t("modal.advanced")]
|
|
3140
|
-
}), /* @__PURE__ */ (0, react_jsx_runtime.jsx)(_deepseek_ai_dsh_client_ui_primitives.Modal, {
|
|
3141
|
-
open: props.advancedOpen ?? false,
|
|
3142
|
-
onClose: () => props.onAdvancedOpenChange?.(false),
|
|
3143
|
-
title: t("modal.advancedTitle"),
|
|
3144
|
-
closeLabel: t("modal.close"),
|
|
3145
|
-
footer: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(_deepseek_ai_dsh_client_ui_primitives.Button, {
|
|
3146
|
-
variant: "primary",
|
|
3147
|
-
size: "md",
|
|
3148
|
-
onClick: () => props.onAdvancedOpenChange?.(false),
|
|
3149
|
-
children: t("modal.advancedDone")
|
|
3150
|
-
}),
|
|
3151
|
-
children: /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", {
|
|
3152
|
-
className: TaskForm_module_css_default.advancedBody,
|
|
3153
|
-
children: [
|
|
3154
|
-
/* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", {
|
|
3155
|
-
className: TaskForm_module_css_default.field,
|
|
3156
|
-
children: [
|
|
3157
|
-
/* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", {
|
|
3158
|
-
className: TaskForm_module_css_default.fieldLabel,
|
|
3159
|
-
children: t("modal.model")
|
|
3160
|
-
}),
|
|
3161
|
-
(() => {
|
|
3162
|
-
const models = props.models ?? [];
|
|
3163
|
-
if (models.length > 0) {
|
|
3164
|
-
const encode = (m) => `${m.provider}\u0000${m.id}`;
|
|
3165
|
-
const decode = (v) => {
|
|
3166
|
-
if (v === "") return {
|
|
3167
|
-
model: "",
|
|
3168
|
-
modelProvider: ""
|
|
3169
|
-
};
|
|
3170
|
-
const at = v.indexOf("\0");
|
|
3171
|
-
return at >= 0 ? {
|
|
3172
|
-
model: v.slice(at + 1),
|
|
3173
|
-
modelProvider: v.slice(0, at)
|
|
3174
|
-
} : {
|
|
3175
|
-
model: v,
|
|
3176
|
-
modelProvider: ""
|
|
3177
|
-
};
|
|
3178
|
-
};
|
|
3179
|
-
const current = values.model === "" ? "" : (() => {
|
|
3180
|
-
const hit = models.find((m) => m.id === values.model && (values.modelProvider === "" || m.provider === values.modelProvider)) ?? models.find((m) => m.id === values.model);
|
|
3181
|
-
return hit !== void 0 ? encode(hit) : values.model;
|
|
3182
|
-
})();
|
|
3183
|
-
const byProvider = /* @__PURE__ */ new Map();
|
|
3184
|
-
for (const m of models) {
|
|
3185
|
-
const list = byProvider.get(m.provider) ?? [];
|
|
3186
|
-
list.push(m);
|
|
3187
|
-
byProvider.set(m.provider, list);
|
|
3188
|
-
}
|
|
3189
|
-
return /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("select", {
|
|
3190
|
-
className: TaskForm_module_css_default.fieldInput,
|
|
3191
|
-
value: current,
|
|
3192
|
-
onChange: (e) => {
|
|
3193
|
-
const decoded = decode(e.target.value);
|
|
3194
|
-
const efforts = models.find((m) => m.id === decoded.model)?.reasoningEfforts;
|
|
3195
|
-
const resetReasoning = values.reasoning !== "follow" && efforts !== void 0 && efforts.length > 0 && !efforts.some((e) => e.id === values.reasoning);
|
|
3196
|
-
onChange(resetReasoning ? {
|
|
3197
|
-
...decoded,
|
|
3198
|
-
reasoning: "follow"
|
|
3199
|
-
} : decoded);
|
|
3200
|
-
},
|
|
3201
|
-
children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)("option", {
|
|
3202
|
-
value: "",
|
|
3203
|
-
children: t("modal.modelFollowGlobal")
|
|
3204
|
-
}), [...byProvider.keys()].map((provider) => {
|
|
3205
|
-
const group = byProvider.get(provider) ?? [];
|
|
3206
|
-
const label = group[0]?.providerLabel ?? provider;
|
|
3207
|
-
return /* @__PURE__ */ (0, react_jsx_runtime.jsx)("optgroup", {
|
|
3208
|
-
label,
|
|
3209
|
-
children: group.map((m) => /* @__PURE__ */ (0, react_jsx_runtime.jsx)("option", {
|
|
3210
|
-
value: encode(m),
|
|
3211
|
-
children: m.name
|
|
3212
|
-
}, encode(m)))
|
|
3213
|
-
}, provider);
|
|
3214
|
-
})]
|
|
3215
|
-
});
|
|
3216
|
-
}
|
|
3217
|
-
return /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", {
|
|
3218
|
-
className: TaskForm_module_css_default.modelFallbackRow,
|
|
3219
|
-
children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)("input", {
|
|
3220
|
-
className: TaskForm_module_css_default.fieldInput,
|
|
3221
|
-
value: values.model,
|
|
3222
|
-
onChange: (e) => onChange({ model: e.target.value }),
|
|
3223
|
-
placeholder: "model-id"
|
|
3224
|
-
}), /* @__PURE__ */ (0, react_jsx_runtime.jsx)("input", {
|
|
3225
|
-
className: TaskForm_module_css_default.fieldInput,
|
|
3226
|
-
value: values.modelProvider,
|
|
3227
|
-
onChange: (e) => onChange({ modelProvider: e.target.value }),
|
|
3228
|
-
placeholder: "provider-id"
|
|
3229
|
-
})]
|
|
3230
|
-
});
|
|
3231
|
-
})(),
|
|
3232
|
-
/* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", {
|
|
3233
|
-
className: TaskForm_module_css_default.strategyHint,
|
|
3234
|
-
children: t("modal.modelHint")
|
|
3235
|
-
})
|
|
3236
|
-
]
|
|
3237
|
-
}),
|
|
3238
|
-
/* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", {
|
|
3239
|
-
className: TaskForm_module_css_default.field,
|
|
3240
|
-
children: [
|
|
3241
|
-
/* @__PURE__ */ (0, react_jsx_runtime.jsxs)("span", {
|
|
3242
|
-
className: TaskForm_module_css_default.fieldLabel,
|
|
3243
|
-
children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)(Icon, {
|
|
3244
|
-
name: "IconThinkOutline14",
|
|
3245
|
-
className: TaskForm_module_css_default.advancedIcon
|
|
3246
|
-
}), t("modal.reasoning")]
|
|
3247
|
-
}),
|
|
3248
|
-
/* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", {
|
|
3249
|
-
className: TaskForm_module_css_default.pillRow,
|
|
3250
|
-
children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)(_deepseek_ai_dsh_client_ui_primitives.Pill, {
|
|
3251
|
-
active: values.reasoning === "follow",
|
|
3252
|
-
onClick: () => onChange({ reasoning: "follow" }),
|
|
3253
|
-
children: t("reasoning.follow")
|
|
3254
|
-
}), (() => {
|
|
3255
|
-
const selectedModel = props.models?.find((m) => m.id === values.model);
|
|
3256
|
-
return reasoningOptions(selectedModel).map((effort) => /* @__PURE__ */ (0, react_jsx_runtime.jsx)(_deepseek_ai_dsh_client_ui_primitives.Pill, {
|
|
3257
|
-
active: values.reasoning === effort.id,
|
|
3258
|
-
onClick: () => onChange({ reasoning: effort.id }),
|
|
3259
|
-
children: reasoningLabel(effort)
|
|
3260
|
-
}, effort.id));
|
|
3261
|
-
})()]
|
|
3262
|
-
}),
|
|
3263
|
-
/* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", {
|
|
3264
|
-
className: TaskForm_module_css_default.strategyHint,
|
|
3265
|
-
children: t("modal.reasoningHint")
|
|
3266
|
-
})
|
|
3267
|
-
]
|
|
3268
|
-
}),
|
|
3269
|
-
/* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", {
|
|
3270
|
-
className: TaskForm_module_css_default.field,
|
|
3271
|
-
children: [
|
|
3272
|
-
/* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", {
|
|
3273
|
-
className: TaskForm_module_css_default.fieldLabel,
|
|
3274
|
-
children: t("modal.priority")
|
|
3275
|
-
}),
|
|
3276
|
-
/* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", {
|
|
3277
|
-
className: TaskForm_module_css_default.pillRow,
|
|
3278
|
-
children: [
|
|
3279
|
-
0,
|
|
3280
|
-
1,
|
|
3281
|
-
2,
|
|
3282
|
-
3,
|
|
3283
|
-
4,
|
|
3284
|
-
5,
|
|
3285
|
-
6,
|
|
3286
|
-
7,
|
|
3287
|
-
8,
|
|
3288
|
-
9
|
|
3289
|
-
].map((n) => /* @__PURE__ */ (0, react_jsx_runtime.jsx)(_deepseek_ai_dsh_client_ui_primitives.Pill, {
|
|
3290
|
-
active: values.priority === n,
|
|
3291
|
-
onClick: () => onChange({ priority: n }),
|
|
3292
|
-
children: n
|
|
3293
|
-
}, n))
|
|
3294
|
-
}),
|
|
3295
|
-
/* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", {
|
|
3296
|
-
className: TaskForm_module_css_default.strategyHint,
|
|
3297
|
-
children: t("modal.priorityHint")
|
|
3298
|
-
})
|
|
3299
|
-
]
|
|
3300
|
-
}),
|
|
3301
|
-
/* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", {
|
|
3302
|
-
className: TaskForm_module_css_default.field,
|
|
3303
|
-
children: [
|
|
3304
|
-
/* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", {
|
|
3305
|
-
className: TaskForm_module_css_default.fieldLabel,
|
|
3306
|
-
children: t("modal.sessionMode")
|
|
3307
|
-
}),
|
|
3308
|
-
/* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", {
|
|
3309
|
-
className: TaskForm_module_css_default.pillRow,
|
|
3310
|
-
children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", {
|
|
3311
|
-
className: `${TaskForm_module_css_default.strategyPill} ${values.sessionMode === "new" ? TaskForm_module_css_default.strategyActive : ""}`,
|
|
3312
|
-
onClick: () => onChange({
|
|
3313
|
-
sessionMode: "new",
|
|
3314
|
-
continuesFromSession: void 0
|
|
3315
|
-
}),
|
|
3316
|
-
children: t("modal.sessionNew")
|
|
3317
|
-
}), /* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", {
|
|
3318
|
-
className: `${TaskForm_module_css_default.strategyPill} ${values.sessionMode === "continue" ? TaskForm_module_css_default.strategyActive : ""}`,
|
|
3319
|
-
onClick: () => onChange({ sessionMode: "continue" }),
|
|
3320
|
-
children: t("modal.sessionContinue")
|
|
3321
|
-
})]
|
|
3322
|
-
}),
|
|
3323
|
-
/* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", {
|
|
3324
|
-
className: TaskForm_module_css_default.strategyHint,
|
|
3325
|
-
children: values.sessionMode === "new" ? t("modal.sessionNewHint") : t("modal.sessionContinueHint")
|
|
3326
|
-
})
|
|
3327
|
-
]
|
|
3328
|
-
}),
|
|
3329
|
-
values.sessionMode === "continue" && /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", {
|
|
3330
|
-
className: TaskForm_module_css_default.field,
|
|
3331
|
-
children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", {
|
|
3332
|
-
className: TaskForm_module_css_default.fieldLabel,
|
|
3333
|
-
children: t("modal.selectConversation")
|
|
3334
|
-
}), (() => {
|
|
3335
|
-
const workspaces = props.sessionWorkspaces ?? [];
|
|
3336
|
-
if (workspaces.length === 0) return /* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", {
|
|
3337
|
-
className: TaskForm_module_css_default.strategyHint,
|
|
3338
|
-
children: t("modal.noConversations")
|
|
3339
|
-
});
|
|
3340
|
-
const currentWs = workspaces.find((w) => w.cwd === values.workspace) ?? workspaces[0];
|
|
3341
|
-
const sessions = currentWs?.sessions ?? [];
|
|
3342
|
-
return /* @__PURE__ */ (0, react_jsx_runtime.jsxs)(react_jsx_runtime.Fragment, { children: [/* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", {
|
|
3343
|
-
className: TaskForm_module_css_default.sessionPickRow,
|
|
3344
|
-
children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)("select", {
|
|
3345
|
-
className: TaskForm_module_css_default.fieldInput,
|
|
3346
|
-
value: currentWs?.cwd ?? "",
|
|
3347
|
-
onChange: (e) => {
|
|
3348
|
-
const ws = workspaces.find((w) => w.cwd === e.target.value);
|
|
3349
|
-
onChange({
|
|
3350
|
-
workspace: e.target.value,
|
|
3351
|
-
continuesFromSession: void 0
|
|
3352
|
-
});
|
|
3353
|
-
if (ws !== void 0 && ws.sessions.length > 0) onChange({ continuesFromSession: ws.sessions[0].id });
|
|
3354
|
-
},
|
|
3355
|
-
children: workspaces.map((w) => /* @__PURE__ */ (0, react_jsx_runtime.jsx)("option", {
|
|
3356
|
-
value: w.cwd,
|
|
3357
|
-
children: w.label !== null ? `${w.label} · ${w.cwd}` : w.cwd
|
|
3358
|
-
}, w.cwd))
|
|
3359
|
-
}), /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("select", {
|
|
3360
|
-
className: TaskForm_module_css_default.fieldInput,
|
|
3361
|
-
value: values.continuesFromSession ?? "",
|
|
3362
|
-
onChange: (e) => onChange({ continuesFromSession: e.target.value || void 0 }),
|
|
3363
|
-
children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)("option", {
|
|
3364
|
-
value: "",
|
|
3365
|
-
children: t("modal.selectConversationPlaceholder")
|
|
3366
|
-
}), sessions.map((s) => /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("option", {
|
|
3367
|
-
value: s.id,
|
|
3368
|
-
children: [s.title !== null && s.title !== "" ? s.title : s.id.slice(0, 16), s.lastModified > 0 ? ` · ${sessionTimeLabel(s.lastModified, t)}` : ""]
|
|
3369
|
-
}, s.id))]
|
|
3370
|
-
})]
|
|
3371
|
-
}), /* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", {
|
|
3372
|
-
className: TaskForm_module_css_default.strategyHint,
|
|
3373
|
-
children: t("modal.continueHint", { cwd: currentWs?.cwd ?? "" })
|
|
3374
|
-
})] });
|
|
3375
|
-
})()]
|
|
3376
|
-
}),
|
|
3377
|
-
/* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", {
|
|
3378
|
-
className: TaskForm_module_css_default.field,
|
|
3379
|
-
children: [
|
|
3380
|
-
/* @__PURE__ */ (0, react_jsx_runtime.jsxs)("span", {
|
|
3381
|
-
className: TaskForm_module_css_default.fieldLabel,
|
|
3382
|
-
children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)(Icon, {
|
|
3383
|
-
name: "IconPaperclipOutline16",
|
|
3384
|
-
className: TaskForm_module_css_default.advancedIcon
|
|
3385
|
-
}), t("modal.files")]
|
|
3386
|
-
}),
|
|
3387
|
-
/* @__PURE__ */ (0, react_jsx_runtime.jsx)("input", {
|
|
3388
|
-
className: TaskForm_module_css_default.fieldInput,
|
|
3389
|
-
value: values.files,
|
|
3390
|
-
onChange: (e) => onChange({ files: e.target.value }),
|
|
3391
|
-
placeholder: t("modal.filesPlaceholder")
|
|
3392
|
-
}),
|
|
3393
|
-
/* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", {
|
|
3394
|
-
className: TaskForm_module_css_default.strategyHint,
|
|
3395
|
-
children: t("modal.filesAdvancedHint")
|
|
3396
|
-
})
|
|
3397
|
-
]
|
|
3398
|
-
})
|
|
3399
|
-
]
|
|
3400
|
-
})
|
|
3401
|
-
})] })
|
|
3402
|
-
]
|
|
3403
|
-
});
|
|
3404
|
-
}
|
|
3405
|
-
//#endregion
|
|
3406
|
-
//#region \0dsh-css:C:\Users\胡克劳\lowtide\work\lt028\packages\dsh-lowtide\client\components\InterceptCard.module.css.mjs
|
|
3407
|
-
const css$8 = ".IGBZJG_card{background:var(--dsw-specific-input-major);border:1px solid var(--dsw-alias-border-l2-darkmode-thin);box-shadow:var(--dsw-shadow-lv2);border-radius:22px;flex-direction:column;gap:8px;padding:16px 20px;display:flex}.IGBZJG_header{justify-content:space-between;align-items:center;gap:8px;display:flex}.IGBZJG_title{color:var(--dsw-alias-label-primary);font:var(--dsw-font-s-strong-14);align-items:center;gap:6px;display:inline-flex}.IGBZJG_dot{display:inline-flex}.IGBZJG_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}.IGBZJG_close:hover{background:var(--dsw-alias-interactive-bg-hover);color:var(--dsw-alias-label-primary)}.IGBZJG_compare{gap:16px;display:flex}.IGBZJG_priceLabel{color:var(--dsw-alias-label-tertiary);font:var(--dsw-font-xxs-12)}.IGBZJG_row{align-items:center;gap:8px;display:flex}.IGBZJG_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}.IGBZJG_dismiss:hover{color:var(--dsw-alias-label-secondary)}.IGBZJG_queueStatus{color:var(--dsw-alias-label-tertiary);font:var(--dsw-font-xxs-12);align-items:center;gap:4px;display:inline-flex}.IGBZJG_queueIcon{color:var(--dsw-alias-label-tertiary)}";
|
|
3408
|
-
const tagId$8 = "dsh-lowtide/InterceptCard.module.css";
|
|
3409
|
-
if (typeof document !== "undefined" && document.querySelector("style[data-plugin-css=" + JSON.stringify(tagId$8) + "]") === null) {
|
|
3410
|
-
const tag = document.createElement("style");
|
|
3411
|
-
tag.dataset.plugin = "dsh-lowtide";
|
|
3412
|
-
tag.dataset.pluginCss = tagId$8;
|
|
3413
|
-
tag.textContent = css$8;
|
|
3414
|
-
document.head.appendChild(tag);
|
|
3415
|
-
}
|
|
3416
|
-
var InterceptCard_module_css_default = {
|
|
3417
|
-
"queueIcon": "IGBZJG_queueIcon",
|
|
3418
|
-
"close": "IGBZJG_close",
|
|
3419
|
-
"card": "IGBZJG_card",
|
|
3420
|
-
"priceLabel": "IGBZJG_priceLabel",
|
|
3421
|
-
"dismiss": "IGBZJG_dismiss",
|
|
3422
|
-
"compare": "IGBZJG_compare",
|
|
3423
|
-
"header": "IGBZJG_header",
|
|
3424
|
-
"dot": "IGBZJG_dot",
|
|
3425
|
-
"queueStatus": "IGBZJG_queueStatus",
|
|
3426
|
-
"title": "IGBZJG_title",
|
|
3427
|
-
"row": "IGBZJG_row"
|
|
3428
|
-
};
|
|
3429
|
-
//#endregion
|
|
3430
|
-
//#region client/components/InterceptCard.tsx
|
|
3431
|
-
/**
|
|
3432
|
-
* Interface ② InterceptCard (PLAN §6.2 + G0 directive + review rounds):
|
|
3433
|
-
* busy-hour send interception. Claims the composer chain while it is a priced
|
|
3434
|
-
* window (peak, or custom ×multiplier>1) ∧ not dismissed today ∧ a live
|
|
3435
|
-
* session exists ∧ the draft is non-empty. Carries its OWN input surface
|
|
3436
|
-
* (the native bar stays mounted but hidden — draft preserved) via the shared
|
|
3437
|
-
* TaskForm (intercept variant). Decision set ≤3: [现在就跑] sends the draft,
|
|
3438
|
-
* [投递到闲时队列] queues it for off-peak, [今日不再提醒] dismisses for the
|
|
3439
|
-
* day, ✕ exempts this message.
|
|
3440
|
-
*
|
|
3441
|
-
* The workspace is explicit: an empty one falls back to the last used path,
|
|
3442
|
-
* and the warning tells the user the server default directory will be used —
|
|
3443
|
-
* a task must never silently run in the server's cwd (review B8).
|
|
3444
|
-
*
|
|
3445
|
-
* Dismissal mechanics (hooks/useInterceptDraft.ts): the chain re-runs
|
|
3446
|
-
* selectors only on owner re-renders, so ✕ sets the session flag and toggles
|
|
3447
|
-
* the draft once (append + restore, batched into one render) to force the
|
|
3448
|
-
* native composer back with the draft intact.
|
|
3449
|
-
*/
|
|
3450
|
-
/**
|
|
3451
|
-
* Pure chain routing: priced window ∧ not dismissed ∧ session present ∧
|
|
3452
|
-
* draft non-empty. The draft condition keeps the native bar (and the queue
|
|
3453
|
-
* dock) visible until the user actually starts typing (PLAN §6.2).
|
|
3454
|
-
*
|
|
3455
|
-
* v0.2.2: the tier comes from the local clock (`store.tier`), so a stalled
|
|
3456
|
-
* push stream can neither hide nor freeze the intercept card at a boundary.
|
|
3457
|
-
*/
|
|
3458
|
-
function selectIntercept(owner) {
|
|
3459
|
-
const snapshot = lowtideStore.getSnapshot();
|
|
3460
|
-
const host = snapshot.host;
|
|
3461
|
-
if (host === null) return null;
|
|
3462
|
-
const tier = snapshot.tierAt > 0 ? snapshot.tier : null;
|
|
3463
|
-
const level = tier?.level ?? host.price.tier;
|
|
3464
|
-
const multiplier = tier?.multiplier ?? host.price.multiplier;
|
|
3465
|
-
if (!(level === "peak" || level === "custom" && multiplier > 1)) return null;
|
|
3466
|
-
if (host.dismissedPeakToday) return null;
|
|
3467
|
-
if (readInterceptDraft().trim() === "") return null;
|
|
3468
|
-
if (isInterceptSessionDismissed()) return null;
|
|
3469
|
-
if (owner.session === void 0) return null;
|
|
3470
|
-
return { kind: "lt-intercept" };
|
|
3471
|
-
}
|
|
3472
|
-
function InterceptCard(props) {
|
|
3473
|
-
const { t } = props;
|
|
3474
|
-
const draft = props.useInput((input) => input.draft);
|
|
3475
|
-
const host = useLowtide((s) => s.host);
|
|
3476
|
-
const tier = useLowtide((s) => s.tier);
|
|
3477
|
-
const tierAt = useLowtide((s) => s.tierAt);
|
|
3478
|
-
const [workspace, setWorkspace] = (0, react.useState)(() => lastWorkspace());
|
|
3479
|
-
const [submitting, setSubmitting] = (0, react.useState)(false);
|
|
3480
|
-
const [estimateResult, setEstimateResult] = (0, react.useState)(null);
|
|
3481
|
-
const shownLevel = tierAt > 0 ? tier.level : host?.price.tier ?? "off";
|
|
3482
|
-
const shownMultiplier = tierAt > 0 ? tier.multiplier : host?.price.multiplier ?? 1;
|
|
3483
|
-
const shownWindow = tierAt > 0 ? tier.window : host?.level?.window ?? null;
|
|
3484
|
-
const peakWindow = shownWindow !== null ? `${shownWindow.start}–${shownWindow.end}` : "";
|
|
3485
|
-
const customMultiplier = shownLevel === "custom" ? shownMultiplier : null;
|
|
3486
|
-
const tierText = customMultiplier !== null && customMultiplier > 1 ? t("intercept.tierCustom", { multiplier: customMultiplier }) : t("intercept.tierPeak");
|
|
3487
|
-
const formValues = {
|
|
3488
|
-
prompt: draft,
|
|
3489
|
-
workspace,
|
|
3490
|
-
strategy: "single",
|
|
3491
|
-
rounds: 1,
|
|
3492
|
-
priority: 1,
|
|
3493
|
-
files: "",
|
|
3494
|
-
reasoning: "follow",
|
|
3495
|
-
model: host?.price.model ?? "",
|
|
3496
|
-
modelProvider: "",
|
|
3497
|
-
strategyHint: "",
|
|
3498
|
-
autonomy: host?.autonomy === "l1" || host?.autonomy === "l3" ? host.autonomy : "l2",
|
|
3499
|
-
sessionMode: "new"
|
|
3500
|
-
};
|
|
3501
|
-
(0, react.useEffect)(() => {
|
|
3502
|
-
if (draft.trim() === "") {
|
|
3503
|
-
setEstimateResult(null);
|
|
3504
|
-
return;
|
|
3505
|
-
}
|
|
3506
|
-
const timer = setTimeout(() => {
|
|
3507
|
-
const nowModel = host?.price.model;
|
|
3508
|
-
if (nowModel === void 0) return;
|
|
3509
|
-
estimate(draft, [], nowModel, formValues.model).then((res) => {
|
|
3510
|
-
if (res.ok) setEstimateResult({
|
|
3511
|
-
peak: res.peak,
|
|
3512
|
-
off: res.off
|
|
3513
|
-
});
|
|
3514
|
-
}).catch(() => {});
|
|
3515
|
-
}, 400);
|
|
3516
|
-
return () => clearTimeout(timer);
|
|
3517
|
-
}, [
|
|
3518
|
-
draft,
|
|
3519
|
-
host?.price.model,
|
|
3520
|
-
formValues.model
|
|
3521
|
-
]);
|
|
3522
|
-
function onFormChange(patch) {
|
|
3523
|
-
if (patch.prompt !== void 0) props.inputActions.setDraft(patch.prompt);
|
|
3524
|
-
if (patch.workspace !== void 0) setWorkspace(patch.workspace);
|
|
3525
|
-
}
|
|
3526
|
-
function closeAndKeepDraft() {
|
|
3527
|
-
dismissInterceptSession();
|
|
3528
|
-
props.inputActions.setDraft(draft + " ");
|
|
3529
|
-
props.inputActions.setDraft(draft);
|
|
3530
|
-
}
|
|
3531
|
-
async function queueTonight() {
|
|
3532
|
-
if (draft.trim() === "") return;
|
|
3533
|
-
setSubmitting(true);
|
|
3534
|
-
const result = await submitTask({
|
|
3535
|
-
prompt: draft,
|
|
3536
|
-
files: [],
|
|
3537
|
-
workspace: workspace.trim() !== "" ? workspace.trim() : lastWorkspace(),
|
|
3538
|
-
priority: 1,
|
|
3539
|
-
permissionPreset: "lt-standard",
|
|
3540
|
-
model: formValues.model
|
|
3541
|
-
});
|
|
3542
|
-
setSubmitting(false);
|
|
3543
|
-
if (result.ok) {
|
|
3544
|
-
if (workspace.trim() !== "") rememberWorkspace(workspace.trim());
|
|
3545
|
-
props.inputActions.setDraft("");
|
|
3546
|
-
showToast(t("toast.enqueued"));
|
|
3547
|
-
lowtideStore.update((s) => {
|
|
3548
|
-
s.queueOpen = true;
|
|
3549
|
-
});
|
|
3550
|
-
} else showToast(t("toast.submitFailed", { error: result.error ?? "unknown" }));
|
|
3551
|
-
}
|
|
3552
|
-
function dismiss() {
|
|
3553
|
-
dismissPeakToday().then(() => refreshNow()).then(() => {
|
|
3554
|
-
props.inputActions.setDraft(draft + " ");
|
|
3555
|
-
props.inputActions.setDraft(draft);
|
|
3556
|
-
});
|
|
3557
|
-
}
|
|
3558
|
-
const priceKnown = host?.price.priceKnown ?? false;
|
|
3559
|
-
const peakLabel = estimateResult !== null && priceKnown ? `¥${estimateResult.peak.toFixed(2)}` : priceKnown ? t("intercept.priceNowPeak") : t("intercept.priceUnknown");
|
|
3560
|
-
const offLabel = estimateResult !== null && priceKnown ? `¥${estimateResult.off.toFixed(2)}` : priceKnown ? t("intercept.priceTonight") : t("intercept.priceUnknown");
|
|
3561
|
-
return /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", {
|
|
3562
|
-
className: InterceptCard_module_css_default.card,
|
|
3563
|
-
children: [
|
|
3564
|
-
/* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", {
|
|
3565
|
-
className: InterceptCard_module_css_default.header,
|
|
3566
|
-
children: [/* @__PURE__ */ (0, react_jsx_runtime.jsxs)("span", {
|
|
3567
|
-
className: InterceptCard_module_css_default.title,
|
|
3568
|
-
children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", {
|
|
3569
|
-
className: InterceptCard_module_css_default.dot,
|
|
3570
|
-
children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(_deepseek_ai_dsh_client_ui_primitives.StateDot, { state: "error" })
|
|
3571
|
-
}), t("intercept.title", {
|
|
3572
|
-
tier: tierText,
|
|
3573
|
-
window: peakWindow
|
|
3574
|
-
})]
|
|
3575
|
-
}), /* @__PURE__ */ (0, react_jsx_runtime.jsx)("button", {
|
|
3576
|
-
type: "button",
|
|
3577
|
-
className: InterceptCard_module_css_default.close,
|
|
3578
|
-
title: t("intercept.closeTitle"),
|
|
3579
|
-
onClick: closeAndKeepDraft,
|
|
3580
|
-
children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(Icon, { name: "IconCloseOutline16" })
|
|
3581
|
-
})]
|
|
3582
|
-
}),
|
|
3583
|
-
/* @__PURE__ */ (0, react_jsx_runtime.jsx)(TaskForm, {
|
|
3584
|
-
variant: "intercept",
|
|
3585
|
-
t,
|
|
3586
|
-
values: formValues,
|
|
3587
|
-
onChange: onFormChange
|
|
3588
|
-
}),
|
|
3589
|
-
/* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", {
|
|
3590
|
-
className: InterceptCard_module_css_default.compare,
|
|
3591
|
-
children: [
|
|
3592
|
-
/* @__PURE__ */ (0, react_jsx_runtime.jsxs)("span", {
|
|
3593
|
-
className: InterceptCard_module_css_default.priceLabel,
|
|
3594
|
-
children: [customMultiplier !== null && customMultiplier > 1 ? t("intercept.priceNowCustom", { multiplier: customMultiplier }) : t("intercept.priceNowPeak"), /* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", {
|
|
3595
|
-
className: InterceptCard_module_css_default.priceValue,
|
|
3596
|
-
children: peakLabel
|
|
3597
|
-
})]
|
|
3598
|
-
}),
|
|
3599
|
-
/* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", {
|
|
3600
|
-
className: InterceptCard_module_css_default.arrow,
|
|
3601
|
-
children: "→"
|
|
3602
|
-
}),
|
|
3603
|
-
/* @__PURE__ */ (0, react_jsx_runtime.jsxs)("span", {
|
|
3604
|
-
className: InterceptCard_module_css_default.priceLabel,
|
|
3605
|
-
children: [t("intercept.priceTonight"), /* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", {
|
|
3606
|
-
className: InterceptCard_module_css_default.priceValue,
|
|
3607
|
-
children: offLabel
|
|
3608
|
-
})]
|
|
3609
|
-
})
|
|
3610
|
-
]
|
|
3611
|
-
}),
|
|
3612
|
-
host !== null && host !== void 0 && /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", {
|
|
3613
|
-
className: InterceptCard_module_css_default.queueStatus,
|
|
3614
|
-
children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)(Icon, {
|
|
3615
|
-
name: "IconQueueOutline14",
|
|
3616
|
-
className: InterceptCard_module_css_default.queueIcon
|
|
3617
|
-
}), t("intercept.queueStatus", {
|
|
3618
|
-
total: host.queue.total,
|
|
3619
|
-
pending: host.queue.pendingReview
|
|
3620
|
-
})]
|
|
3621
|
-
}),
|
|
3622
|
-
/* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", {
|
|
3623
|
-
className: InterceptCard_module_css_default.row,
|
|
3624
|
-
children: [
|
|
3625
|
-
/* @__PURE__ */ (0, react_jsx_runtime.jsx)(_deepseek_ai_dsh_client_ui_primitives.Button, {
|
|
3626
|
-
variant: "outline",
|
|
3627
|
-
size: "md",
|
|
3628
|
-
onClick: () => props.inputActions.submit(),
|
|
3629
|
-
children: t("intercept.runNow")
|
|
3630
|
-
}),
|
|
3631
|
-
/* @__PURE__ */ (0, react_jsx_runtime.jsx)(_deepseek_ai_dsh_client_ui_primitives.Button, {
|
|
3632
|
-
variant: "primary",
|
|
3633
|
-
size: "md",
|
|
3634
|
-
disabled: submitting || draft.trim() === "",
|
|
3635
|
-
onClick: () => void queueTonight(),
|
|
3636
|
-
children: t("intercept.enqueue")
|
|
3637
|
-
}),
|
|
3638
|
-
/* @__PURE__ */ (0, react_jsx_runtime.jsx)("button", {
|
|
3639
|
-
type: "button",
|
|
3640
|
-
className: InterceptCard_module_css_default.dismiss,
|
|
3641
|
-
onClick: dismiss,
|
|
3642
|
-
children: t("intercept.dismiss")
|
|
3643
|
-
})
|
|
3644
|
-
]
|
|
3645
|
-
})
|
|
3646
|
-
]
|
|
3647
|
-
});
|
|
3648
|
-
}
|
|
3649
|
-
//#endregion
|
|
3650
|
-
//#region client/lib/taskMeta.ts
|
|
3651
|
-
const STATUS_KEYS = {
|
|
3652
|
-
"pending-review": "status.pending-review",
|
|
3653
|
-
queued: "status.queued",
|
|
3654
|
-
deferred: "status.deferred",
|
|
3655
|
-
dropped: "status.dropped",
|
|
3656
|
-
running: "status.running",
|
|
3657
|
-
preflight: "status.preflight",
|
|
3658
|
-
done: "status.done",
|
|
3659
|
-
failed: "status.failed",
|
|
3660
|
-
stale: "status.stale",
|
|
3661
|
-
timeout: "status.timeout",
|
|
3662
|
-
cancelled: "status.cancelled"
|
|
3663
|
-
};
|
|
3664
|
-
/** Localized status label ("待裁定" / "Queued" …). */
|
|
3665
|
-
function statusLabel(t, status) {
|
|
3666
|
-
return t(STATUS_KEYS[status] ?? status);
|
|
3667
|
-
}
|
|
3668
|
-
/** 策略标签:迭代 N 轮 / 采样 N 份 / 复核 / 单次(空)。 */
|
|
3669
|
-
function strategyLabel(t, strategy, roundsRun) {
|
|
3670
|
-
if (strategy === "iterative") return t("report.strategyIterative", { rounds: roundsRun ?? 1 });
|
|
3671
|
-
if (strategy === "sampling") return t("report.strategySampling", { count: roundsRun ?? 1 });
|
|
3672
|
-
if (strategy === "review") return t("report.strategyReview");
|
|
3673
|
-
return "";
|
|
3674
|
-
}
|
|
3675
|
-
//#endregion
|
|
3676
|
-
//#region \0dsh-css:C:\Users\胡克劳\lowtide\work\lt028\packages\dsh-lowtide\client\components\TaskRow.module.css.mjs
|
|
3677
|
-
const css$7 = "._6E7fUq_taskRow{border-left:2px solid #0000;border-radius:8px;align-items:center;gap:8px;min-height:36px;padding:4px 5px 4px 12px;display:flex}._6E7fUq_taskRow:hover{background:var(--dsw-alias-interactive-bg-hover)}._6E7fUq_amber{border-left-color:var(--dsw-alias-state-warn-primary)}._6E7fUq_green{border-left-color:var(--dsw-alias-state-success-primary)}._6E7fUq_blue{border-left-color:var(--dsw-alias-state-business-primary)}._6E7fUq_red{border-left-color:var(--dsw-alias-state-error-primary)}._6E7fUq_taskMain{cursor:pointer;flex-direction:column;flex:1;gap:1px;min-width:0;display:flex}._6E7fUq_taskMain:hover ._6E7fUq_taskPrompt{color:var(--dsw-alias-brand-primary)}._6E7fUq_taskPrompt{color:var(--dsw-alias-label-primary);font:var(--dsw-font-s-14);white-space:nowrap;text-overflow:ellipsis;overflow:hidden}._6E7fUq_taskMeta{color:var(--dsw-alias-label-tertiary);font:var(--dsw-font-xxs-12);white-space:nowrap;text-overflow:ellipsis;overflow:hidden}._6E7fUq_rowActions{gap:2px;display:flex}._6E7fUq_iconBtn{width:28px;height:28px;color:var(--dsw-alias-label-secondary);cursor:pointer;background:0 0;border:none;border-radius:999px;font-size:13px}._6E7fUq_iconBtn:hover{background:var(--dsw-alias-interactive-bg-hover);color:var(--dsw-alias-label-primary)}._6E7fUq_iconBtn:disabled{opacity:.4;cursor:not-allowed}._6E7fUq_iconBtn:disabled:hover{color:var(--dsw-alias-label-secondary);background:0 0}._6E7fUq_confirming{color:var(--dsw-alias-state-error-primary);background:var(--dsw-alias-interactive-bg-hover);font-weight:600}._6E7fUq_confirming:hover{color:var(--dsw-alias-state-error-primary)}._6E7fUq_droppedRow{opacity:.75}._6E7fUq_droppedRow:hover{opacity:1}";
|
|
3678
|
-
const tagId$7 = "dsh-lowtide/TaskRow.module.css";
|
|
3679
|
-
if (typeof document !== "undefined" && document.querySelector("style[data-plugin-css=" + JSON.stringify(tagId$7) + "]") === null) {
|
|
3680
|
-
const tag = document.createElement("style");
|
|
3681
|
-
tag.dataset.plugin = "dsh-lowtide";
|
|
3682
|
-
tag.dataset.pluginCss = tagId$7;
|
|
3683
|
-
tag.textContent = css$7;
|
|
3684
|
-
document.head.appendChild(tag);
|
|
3685
|
-
}
|
|
3686
|
-
var TaskRow_module_css_default = {
|
|
3687
|
-
"amber": "_6E7fUq_amber",
|
|
3688
|
-
"taskRow": "_6E7fUq_taskRow",
|
|
3689
|
-
"taskMain": "_6E7fUq_taskMain",
|
|
3690
|
-
"iconBtn": "_6E7fUq_iconBtn",
|
|
3691
|
-
"taskPrompt": "_6E7fUq_taskPrompt",
|
|
3692
|
-
"droppedRow": "_6E7fUq_droppedRow",
|
|
3693
|
-
"confirming": "_6E7fUq_confirming",
|
|
3694
|
-
"green": "_6E7fUq_green",
|
|
3695
|
-
"rowActions": "_6E7fUq_rowActions",
|
|
3696
|
-
"blue": "_6E7fUq_blue",
|
|
3697
|
-
"red": "_6E7fUq_red",
|
|
3698
|
-
"taskMeta": "_6E7fUq_taskMeta"
|
|
3699
|
-
};
|
|
3700
|
-
//#endregion
|
|
3701
|
-
//#region client/components/TaskRow.tsx
|
|
3702
|
-
/**
|
|
3703
|
-
* TaskRow (Phase D split): one queue row with per-status inline actions
|
|
3704
|
-
* (✓ 批准 / ⏸ 顺延 / ✕ 放弃 / ↻ 重新执行 / 🗑 两段式删除) and a left color
|
|
3705
|
-
* bar by status. Shared by the 待执行 and 已结束 sections.
|
|
3706
|
-
*/
|
|
3707
|
-
function statusClass(status) {
|
|
3708
|
-
if (status === "pending-review" || status === "deferred" || status === "stale") return TaskRow_module_css_default.amber;
|
|
3709
|
-
if (status === "queued" || status === "done") return TaskRow_module_css_default.green;
|
|
3710
|
-
if (status === "running" || status === "preflight") return TaskRow_module_css_default.blue;
|
|
3711
|
-
if (status === "failed" || status === "timeout") return TaskRow_module_css_default.red;
|
|
3712
|
-
return "";
|
|
3713
|
-
}
|
|
3714
|
-
/** Icons for the per-row actions (16px outline set, currentColor). */
|
|
3715
|
-
function RowActionIcon({ kind }) {
|
|
3716
|
-
if (kind === "approve") return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(Icon, { name: "IconCheckOutline16" });
|
|
3717
|
-
if (kind === "defer") return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(Icon, { name: "IconPauseOutline16" });
|
|
3718
|
-
if (kind === "drop") return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(Icon, { name: "IconCloseOutline16" });
|
|
3719
|
-
if (kind === "retry") return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(Icon, { name: "IconRefreshOutline16" });
|
|
3720
|
-
if (kind === "edit") return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(Icon, { name: "IconEditOutline16" });
|
|
3721
|
-
return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(Icon, { name: "IconTrashOutline16" });
|
|
3722
|
-
}
|
|
3723
|
-
function TaskRow({ task, t, onOpenDetail, onEdit }) {
|
|
3724
|
-
const pending = task.status === "pending-review";
|
|
3725
|
-
const deferred = task.status === "deferred";
|
|
3726
|
-
const locked = task.status === "running" || task.status === "preflight";
|
|
3727
|
-
const failed = task.status === "failed" || task.status === "timeout" || task.status === "stale";
|
|
3728
|
-
const editable = (pending || deferred || task.status === "queued") && !locked;
|
|
3729
|
-
const [confirming, setConfirming] = (0, react.useState)(false);
|
|
3730
|
-
async function handleDelete() {
|
|
3731
|
-
if (!confirming) {
|
|
3732
|
-
setConfirming(true);
|
|
3733
|
-
setTimeout(() => setConfirming(false), 3e3);
|
|
3734
|
-
return;
|
|
3735
|
-
}
|
|
3736
|
-
const result = await deleteTask(task.id);
|
|
3737
|
-
if (result.ok) {
|
|
3738
|
-
showToast(t("toast.deleted"));
|
|
3739
|
-
refreshNow();
|
|
3740
|
-
} else showToast(t("toast.deleteFailed", { error: result.error ?? "unknown" }));
|
|
3741
|
-
}
|
|
3742
|
-
const actions = [];
|
|
3743
|
-
if (editable && onEdit !== void 0) actions.push(/* @__PURE__ */ (0, react_jsx_runtime.jsx)("button", {
|
|
3744
|
-
type: "button",
|
|
3745
|
-
className: TaskRow_module_css_default.iconBtn,
|
|
3746
|
-
title: t("action.edit"),
|
|
3747
|
-
onClick: () => onEdit(task),
|
|
3748
|
-
children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(RowActionIcon, { kind: "edit" })
|
|
3749
|
-
}, "edit"));
|
|
3750
|
-
if (pending || deferred) actions.push(/* @__PURE__ */ (0, react_jsx_runtime.jsx)("button", {
|
|
3751
|
-
type: "button",
|
|
3752
|
-
className: TaskRow_module_css_default.iconBtn,
|
|
3753
|
-
title: t("action.approve"),
|
|
3754
|
-
onClick: () => {
|
|
3755
|
-
triage(task.id, "approve").then(refreshNow);
|
|
3756
|
-
},
|
|
3757
|
-
children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(RowActionIcon, { kind: "approve" })
|
|
3758
|
-
}, "approve"), /* @__PURE__ */ (0, react_jsx_runtime.jsx)("button", {
|
|
3759
|
-
type: "button",
|
|
3760
|
-
className: TaskRow_module_css_default.iconBtn,
|
|
3761
|
-
title: t("action.defer"),
|
|
3762
|
-
onClick: () => {
|
|
3763
|
-
triage(task.id, "defer").then(refreshNow);
|
|
3764
|
-
},
|
|
3765
|
-
children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(RowActionIcon, { kind: "defer" })
|
|
3766
|
-
}, "defer"), /* @__PURE__ */ (0, react_jsx_runtime.jsx)("button", {
|
|
3767
|
-
type: "button",
|
|
3768
|
-
className: TaskRow_module_css_default.iconBtn,
|
|
3769
|
-
title: t("action.drop"),
|
|
3770
|
-
onClick: () => {
|
|
3771
|
-
triage(task.id, "drop").then(refreshNow);
|
|
3772
|
-
},
|
|
3773
|
-
children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(RowActionIcon, { kind: "drop" })
|
|
3774
|
-
}, "drop"));
|
|
3775
|
-
if (failed) actions.push(/* @__PURE__ */ (0, react_jsx_runtime.jsx)("button", {
|
|
3776
|
-
type: "button",
|
|
3777
|
-
className: TaskRow_module_css_default.iconBtn,
|
|
3778
|
-
title: t("action.retry"),
|
|
3779
|
-
onClick: () => {
|
|
3780
|
-
retryTask(task.id).then(() => {
|
|
3781
|
-
showToast(t("toast.requeued"));
|
|
3782
|
-
refreshNow();
|
|
3783
|
-
});
|
|
3784
|
-
},
|
|
3785
|
-
children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(RowActionIcon, { kind: "retry" })
|
|
3786
|
-
}, "retry"));
|
|
3787
|
-
actions.push(/* @__PURE__ */ (0, react_jsx_runtime.jsx)("button", {
|
|
3788
|
-
type: "button",
|
|
3789
|
-
className: confirming ? `${TaskRow_module_css_default.iconBtn} ${TaskRow_module_css_default.confirming}` : TaskRow_module_css_default.iconBtn,
|
|
3790
|
-
title: confirming ? t("action.deleteConfirm") : t("action.delete"),
|
|
3791
|
-
disabled: locked,
|
|
3792
|
-
onClick: () => {
|
|
3793
|
-
handleDelete();
|
|
3794
|
-
},
|
|
3795
|
-
children: confirming ? t("action.deleteConfirmShort") : /* @__PURE__ */ (0, react_jsx_runtime.jsx)(RowActionIcon, { kind: "delete" })
|
|
3796
|
-
}, "delete"));
|
|
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"));
|
|
3797
2914
|
return /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", {
|
|
3798
2915
|
className: `${TaskRow_module_css_default.taskRow} ${statusClass(task.status)}`,
|
|
3799
2916
|
children: [/* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", {
|
|
@@ -3868,9 +2985,339 @@ window.__ModuleLoader__.load({
|
|
|
3868
2985
|
});
|
|
3869
2986
|
}
|
|
3870
2987
|
//#endregion
|
|
3871
|
-
//#region \0dsh-css:C:\Users\胡克劳\lowtide\work\
|
|
3872
|
-
const css$
|
|
3873
|
-
const tagId$
|
|
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);
|
|
3065
|
+
})]
|
|
3066
|
+
});
|
|
3067
|
+
}
|
|
3068
|
+
//#endregion
|
|
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
|
|
3098
|
+
/**
|
|
3099
|
+
* TaskDetail (Phase D split): the task drill-down modal — full prompt,
|
|
3100
|
+
* snapshots, strategy, sampling candidates, last run, errors.
|
|
3101
|
+
*/
|
|
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")
|
|
3123
|
+
})]
|
|
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
|
+
})
|
|
3315
|
+
});
|
|
3316
|
+
}
|
|
3317
|
+
//#endregion
|
|
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";
|
|
3874
3321
|
if (typeof document !== "undefined" && document.querySelector("style[data-plugin-css=" + JSON.stringify(tagId$6) + "]") === null) {
|
|
3875
3322
|
const tag = document.createElement("style");
|
|
3876
3323
|
tag.dataset.plugin = "dsh-lowtide";
|
|
@@ -3878,340 +3325,590 @@ window.__ModuleLoader__.load({
|
|
|
3878
3325
|
tag.textContent = css$6;
|
|
3879
3326
|
document.head.appendChild(tag);
|
|
3880
3327
|
}
|
|
3881
|
-
var
|
|
3882
|
-
"
|
|
3883
|
-
"
|
|
3884
|
-
"
|
|
3885
|
-
"
|
|
3886
|
-
"
|
|
3887
|
-
"
|
|
3888
|
-
"
|
|
3889
|
-
"
|
|
3890
|
-
"
|
|
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"
|
|
3891
3352
|
};
|
|
3892
3353
|
//#endregion
|
|
3893
|
-
//#region client/components/
|
|
3894
|
-
|
|
3895
|
-
|
|
3896
|
-
|
|
3897
|
-
|
|
3898
|
-
|
|
3899
|
-
|
|
3900
|
-
|
|
3901
|
-
|
|
3902
|
-
|
|
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]);
|
|
3903
3474
|
return /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", {
|
|
3904
|
-
className:
|
|
3905
|
-
children: [
|
|
3906
|
-
|
|
3907
|
-
|
|
3908
|
-
|
|
3909
|
-
|
|
3910
|
-
|
|
3911
|
-
|
|
3912
|
-
|
|
3913
|
-
|
|
3914
|
-
|
|
3915
|
-
|
|
3916
|
-
|
|
3917
|
-
|
|
3918
|
-
|
|
3919
|
-
|
|
3920
|
-
|
|
3921
|
-
|
|
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 });
|
|
3503
|
+
},
|
|
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)
|
|
3922
3553
|
})]
|
|
3923
|
-
})
|
|
3924
|
-
|
|
3925
|
-
|
|
3926
|
-
|
|
3927
|
-
|
|
3928
|
-
|
|
3929
|
-
|
|
3930
|
-
|
|
3931
|
-
|
|
3932
|
-
|
|
3933
|
-
|
|
3934
|
-
|
|
3935
|
-
|
|
3936
|
-
refreshNow();
|
|
3937
|
-
} else showToast(r.error ?? "unknown");
|
|
3938
|
-
});
|
|
3939
|
-
},
|
|
3940
|
-
children: picked ? t("report.picked") : t("report.pickThis")
|
|
3941
|
-
})
|
|
3942
|
-
]
|
|
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")
|
|
3943
3567
|
}), /* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", {
|
|
3944
|
-
className:
|
|
3945
|
-
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))
|
|
3946
3579
|
})]
|
|
3947
|
-
},
|
|
3948
|
-
|
|
3949
|
-
|
|
3950
|
-
|
|
3951
|
-
|
|
3952
|
-
|
|
3953
|
-
|
|
3954
|
-
|
|
3955
|
-
|
|
3956
|
-
|
|
3957
|
-
|
|
3958
|
-
|
|
3959
|
-
|
|
3960
|
-
|
|
3961
|
-
|
|
3962
|
-
|
|
3963
|
-
|
|
3964
|
-
|
|
3965
|
-
|
|
3966
|
-
|
|
3967
|
-
|
|
3968
|
-
|
|
3969
|
-
|
|
3970
|
-
|
|
3971
|
-
|
|
3972
|
-
|
|
3973
|
-
|
|
3974
|
-
|
|
3975
|
-
|
|
3976
|
-
|
|
3977
|
-
|
|
3978
|
-
|
|
3979
|
-
|
|
3980
|
-
|
|
3981
|
-
|
|
3982
|
-
|
|
3983
|
-
|
|
3984
|
-
|
|
3985
|
-
|
|
3986
|
-
|
|
3987
|
-
|
|
3988
|
-
|
|
3989
|
-
|
|
3990
|
-
|
|
3991
|
-
|
|
3992
|
-
|
|
3993
|
-
|
|
3994
|
-
|
|
3995
|
-
|
|
3996
|
-
|
|
3997
|
-
|
|
3998
|
-
|
|
3999
|
-
|
|
4000
|
-
|
|
4001
|
-
|
|
4002
|
-
|
|
4003
|
-
|
|
4004
|
-
|
|
4005
|
-
|
|
4006
|
-
|
|
4007
|
-
|
|
4008
|
-
|
|
4009
|
-
className: TaskDetail_module_css_default.modalBody,
|
|
4010
|
-
children: [
|
|
4011
|
-
/* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", {
|
|
4012
|
-
className: TaskDetail_module_css_default.detailPrompt,
|
|
4013
|
-
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")
|
|
4014
3642
|
}),
|
|
4015
|
-
/* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", {
|
|
4016
|
-
className:
|
|
3643
|
+
children: /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", {
|
|
3644
|
+
className: TaskForm_module_css_default.advancedBody,
|
|
4017
3645
|
children: [
|
|
4018
|
-
/* @__PURE__ */ (0, react_jsx_runtime.jsxs)("
|
|
4019
|
-
className:
|
|
3646
|
+
/* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", {
|
|
3647
|
+
className: TaskForm_module_css_default.field,
|
|
4020
3648
|
children: [
|
|
4021
|
-
t("detail.workspace"),
|
|
4022
|
-
" ",
|
|
4023
3649
|
/* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", {
|
|
4024
|
-
className:
|
|
4025
|
-
children:
|
|
4026
|
-
})
|
|
4027
|
-
|
|
4028
|
-
|
|
4029
|
-
|
|
4030
|
-
|
|
4031
|
-
|
|
4032
|
-
|
|
4033
|
-
|
|
4034
|
-
|
|
4035
|
-
|
|
4036
|
-
|
|
4037
|
-
|
|
4038
|
-
|
|
4039
|
-
|
|
4040
|
-
|
|
4041
|
-
|
|
4042
|
-
|
|
4043
|
-
|
|
4044
|
-
|
|
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
|
+
})(),
|
|
4045
3724
|
/* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", {
|
|
4046
|
-
className:
|
|
4047
|
-
children:
|
|
3725
|
+
className: TaskForm_module_css_default.strategyHint,
|
|
3726
|
+
children: t("modal.modelHint")
|
|
4048
3727
|
})
|
|
4049
3728
|
]
|
|
4050
3729
|
}),
|
|
4051
|
-
/* @__PURE__ */ (0, react_jsx_runtime.jsxs)("
|
|
4052
|
-
className:
|
|
3730
|
+
/* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", {
|
|
3731
|
+
className: TaskForm_module_css_default.field,
|
|
4053
3732
|
children: [
|
|
4054
|
-
|
|
4055
|
-
|
|
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
|
+
}),
|
|
4056
3755
|
/* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", {
|
|
4057
|
-
className:
|
|
4058
|
-
children:
|
|
3756
|
+
className: TaskForm_module_css_default.strategyHint,
|
|
3757
|
+
children: t("modal.reasoningHint")
|
|
4059
3758
|
})
|
|
4060
3759
|
]
|
|
4061
3760
|
}),
|
|
4062
|
-
|
|
4063
|
-
className:
|
|
3761
|
+
/* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", {
|
|
3762
|
+
className: TaskForm_module_css_default.field,
|
|
4064
3763
|
children: [
|
|
4065
|
-
t("detail.edited"),
|
|
4066
|
-
" ",
|
|
4067
3764
|
/* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", {
|
|
4068
|
-
className:
|
|
4069
|
-
children: t("
|
|
4070
|
-
})
|
|
4071
|
-
|
|
4072
|
-
|
|
4073
|
-
|
|
4074
|
-
|
|
4075
|
-
|
|
4076
|
-
|
|
4077
|
-
|
|
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
|
+
}),
|
|
4078
3787
|
/* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", {
|
|
4079
|
-
className:
|
|
4080
|
-
children:
|
|
3788
|
+
className: TaskForm_module_css_default.strategyHint,
|
|
3789
|
+
children: t("modal.priorityHint")
|
|
4081
3790
|
})
|
|
4082
3791
|
]
|
|
4083
3792
|
}),
|
|
4084
|
-
|
|
4085
|
-
className:
|
|
4086
|
-
children: task.estimateYuan !== void 0 ? t("detail.estimateKnown", {
|
|
4087
|
-
yuan: task.estimateYuan.toFixed(2),
|
|
4088
|
-
tier: strat,
|
|
4089
|
-
minutes: task.estimateMinutes ?? 30
|
|
4090
|
-
}) : t("detail.estimateUnknown")
|
|
4091
|
-
}),
|
|
4092
|
-
task.strategy !== void 0 && task.strategy !== "single" && /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("span", {
|
|
4093
|
-
className: TaskDetail_module_css_default.detailItem,
|
|
3793
|
+
/* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", {
|
|
3794
|
+
className: TaskForm_module_css_default.field,
|
|
4094
3795
|
children: [
|
|
4095
|
-
t("modal.strategy"),
|
|
4096
|
-
" ",
|
|
4097
3796
|
/* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", {
|
|
4098
|
-
className:
|
|
4099
|
-
children:
|
|
4100
|
-
})
|
|
4101
|
-
|
|
4102
|
-
|
|
4103
|
-
|
|
4104
|
-
|
|
4105
|
-
|
|
4106
|
-
|
|
4107
|
-
|
|
4108
|
-
|
|
4109
|
-
|
|
4110
|
-
|
|
4111
|
-
|
|
4112
|
-
|
|
4113
|
-
|
|
4114
|
-
|
|
4115
|
-
|
|
4116
|
-
children: [
|
|
4117
|
-
t("detail.continuesFromSession"),
|
|
4118
|
-
" ",
|
|
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
|
+
}),
|
|
4119
3815
|
/* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", {
|
|
4120
|
-
className:
|
|
4121
|
-
children:
|
|
3816
|
+
className: TaskForm_module_css_default.strategyHint,
|
|
3817
|
+
children: values.sessionMode === "new" ? t("modal.sessionNewHint") : t("modal.sessionContinueHint")
|
|
4122
3818
|
})
|
|
4123
3819
|
]
|
|
4124
|
-
})
|
|
4125
|
-
|
|
4126
|
-
|
|
4127
|
-
|
|
4128
|
-
|
|
4129
|
-
|
|
4130
|
-
|
|
4131
|
-
|
|
4132
|
-
|
|
4133
|
-
|
|
4134
|
-
|
|
4135
|
-
|
|
4136
|
-
|
|
4137
|
-
|
|
4138
|
-
|
|
4139
|
-
|
|
4140
|
-
|
|
4141
|
-
|
|
4142
|
-
|
|
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
|
+
})()]
|
|
4143
3868
|
}),
|
|
4144
3869
|
/* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", {
|
|
4145
|
-
className:
|
|
3870
|
+
className: TaskForm_module_css_default.field,
|
|
4146
3871
|
children: [
|
|
4147
|
-
|
|
4148
|
-
|
|
4149
|
-
|
|
4150
|
-
|
|
4151
|
-
|
|
4152
|
-
|
|
4153
|
-
|
|
4154
|
-
|
|
4155
|
-
|
|
4156
|
-
|
|
4157
|
-
|
|
4158
|
-
|
|
4159
|
-
|
|
4160
|
-
|
|
4161
|
-
|
|
4162
|
-
|
|
4163
|
-
|
|
4164
|
-
|
|
4165
|
-
children: t("detail.forked")
|
|
4166
|
-
}),
|
|
4167
|
-
task.lastRun.resumeNote !== void 0 && /* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", {
|
|
4168
|
-
className: TaskDetail_module_css_default.detailResumeWarn,
|
|
4169
|
-
children: task.lastRun.resumeNote
|
|
4170
|
-
}),
|
|
4171
|
-
task.lastRun.candidates !== void 0 && task.lastRun.candidates.length > 0 && /* @__PURE__ */ (0, react_jsx_runtime.jsx)(CandidatesView, {
|
|
4172
|
-
candidates: task.lastRun.candidates,
|
|
4173
|
-
chosenIndex: task.chosenCandidateIndex,
|
|
4174
|
-
taskId: task.id,
|
|
4175
|
-
t
|
|
4176
|
-
}),
|
|
4177
|
-
task.lastRun.reviewExcerpt !== void 0 && /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("details", {
|
|
4178
|
-
className: TaskDetail_module_css_default.detailReview,
|
|
4179
|
-
children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)("summary", { children: t("report.reviewExcerpt") }), /* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", {
|
|
4180
|
-
className: TaskDetail_module_css_default.detailReviewBody,
|
|
4181
|
-
children: task.lastRun.reviewExcerpt
|
|
4182
|
-
})]
|
|
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
|
+
]
|
|
4183
3890
|
})
|
|
4184
3891
|
]
|
|
4185
|
-
}),
|
|
4186
|
-
task.lastError !== void 0 && /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", {
|
|
4187
|
-
className: TaskDetail_module_css_default.detailSection,
|
|
4188
|
-
children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", {
|
|
4189
|
-
className: TaskDetail_module_css_default.detailLabel,
|
|
4190
|
-
children: t("detail.error")
|
|
4191
|
-
}), /* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", {
|
|
4192
|
-
className: TaskDetail_module_css_default.detailError,
|
|
4193
|
-
children: task.lastError
|
|
4194
|
-
})]
|
|
4195
3892
|
})
|
|
4196
|
-
]
|
|
4197
|
-
|
|
3893
|
+
})] })
|
|
3894
|
+
]
|
|
4198
3895
|
});
|
|
4199
3896
|
}
|
|
4200
3897
|
//#endregion
|
|
4201
|
-
//#region \0dsh-css:C:\Users\胡克劳\lowtide\work\
|
|
4202
|
-
const css$
|
|
4203
|
-
const tagId$
|
|
4204
|
-
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) {
|
|
4205
3902
|
const tag = document.createElement("style");
|
|
4206
3903
|
tag.dataset.plugin = "dsh-lowtide";
|
|
4207
|
-
tag.dataset.pluginCss = tagId$
|
|
4208
|
-
tag.textContent = css$
|
|
3904
|
+
tag.dataset.pluginCss = tagId$5;
|
|
3905
|
+
tag.textContent = css$5;
|
|
4209
3906
|
document.head.appendChild(tag);
|
|
4210
3907
|
}
|
|
4211
3908
|
var NewTaskModal_module_css_default = {
|
|
4212
|
-
"
|
|
4213
|
-
"
|
|
4214
|
-
"modalFooter": "
|
|
3909
|
+
"wide": "tWghgq_wide",
|
|
3910
|
+
"modalBody": "tWghgq_modalBody",
|
|
3911
|
+
"modalFooter": "tWghgq_modalFooter"
|
|
4215
3912
|
};
|
|
4216
3913
|
//#endregion
|
|
4217
3914
|
//#region client/components/NewTaskModal.tsx
|
|
@@ -4502,38 +4199,39 @@ window.__ModuleLoader__.load({
|
|
|
4502
4199
|
});
|
|
4503
4200
|
}
|
|
4504
4201
|
//#endregion
|
|
4505
|
-
//#region \0dsh-css:C:\Users\胡克劳\lowtide\work\
|
|
4506
|
-
const css$
|
|
4507
|
-
const tagId$
|
|
4508
|
-
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) {
|
|
4509
4206
|
const tag = document.createElement("style");
|
|
4510
4207
|
tag.dataset.plugin = "dsh-lowtide";
|
|
4511
|
-
tag.dataset.pluginCss = tagId$
|
|
4512
|
-
tag.textContent = css$
|
|
4208
|
+
tag.dataset.pluginCss = tagId$4;
|
|
4209
|
+
tag.textContent = css$4;
|
|
4513
4210
|
document.head.appendChild(tag);
|
|
4514
4211
|
}
|
|
4515
4212
|
var QueueDock_module_css_default = {
|
|
4516
|
-
"
|
|
4517
|
-
"
|
|
4518
|
-
"
|
|
4519
|
-
"
|
|
4520
|
-
"
|
|
4521
|
-
"
|
|
4522
|
-
"
|
|
4523
|
-
"
|
|
4524
|
-
"
|
|
4525
|
-
"
|
|
4526
|
-
"
|
|
4527
|
-
"
|
|
4528
|
-
"
|
|
4529
|
-
"
|
|
4530
|
-
"
|
|
4531
|
-
"
|
|
4532
|
-
"
|
|
4533
|
-
"
|
|
4534
|
-
"
|
|
4535
|
-
"
|
|
4536
|
-
"
|
|
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"
|
|
4537
4235
|
};
|
|
4538
4236
|
//#endregion
|
|
4539
4237
|
//#region client/components/QueueDock.tsx
|
|
@@ -4542,12 +4240,23 @@ window.__ModuleLoader__.load({
|
|
|
4542
4240
|
* the expandable drawer above it — grouped queue sections (待执行 / 已结束 /
|
|
4543
4241
|
* 已放弃), footer totals and batch controls. Rows and modals live in their
|
|
4544
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.
|
|
4545
4248
|
*/
|
|
4249
|
+
/** Slot entry (conversation.input.dock). */
|
|
4546
4250
|
function QueueDock(props) {
|
|
4251
|
+
return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(QueueDockView, { t: props.t });
|
|
4252
|
+
}
|
|
4253
|
+
function QueueDockView(props) {
|
|
4547
4254
|
const { t } = props;
|
|
4255
|
+
const panel = props.seat === "panel";
|
|
4548
4256
|
const host = useLowtide((s) => s.host);
|
|
4549
4257
|
const connected = useLowtide((s) => s.connected);
|
|
4550
4258
|
const queueOpen = useLowtide((s) => s.queueOpen);
|
|
4259
|
+
const sidebarHosted = useLowtide((s) => s.sidebarHosted);
|
|
4551
4260
|
const reportUnread = useLowtide((s) => s.reportUnread);
|
|
4552
4261
|
const [modalOpen, setModalOpen] = (0, react.useState)(false);
|
|
4553
4262
|
const [detailTask, setDetailTask] = (0, react.useState)(null);
|
|
@@ -4563,9 +4272,9 @@ window.__ModuleLoader__.load({
|
|
|
4563
4272
|
return true;
|
|
4564
4273
|
}
|
|
4565
4274
|
});
|
|
4566
|
-
|
|
4275
|
+
if (sidebarHosted && !panel) return null;
|
|
4567
4276
|
if (host === null) return /* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", {
|
|
4568
|
-
className: QueueDock_module_css_default.dock,
|
|
4277
|
+
className: panel ? QueueDock_module_css_default.panel : QueueDock_module_css_default.dock,
|
|
4569
4278
|
children: /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", {
|
|
4570
4279
|
className: QueueDock_module_css_default.dockRow,
|
|
4571
4280
|
children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", {
|
|
@@ -4670,7 +4379,7 @@ window.__ModuleLoader__.load({
|
|
|
4670
4379
|
children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)(Icon, { name: "IconPlusOutline16" }), t("dock.new")]
|
|
4671
4380
|
})
|
|
4672
4381
|
}),
|
|
4673
|
-
/* @__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, {
|
|
4674
4383
|
variant: "ghost",
|
|
4675
4384
|
size: "sm",
|
|
4676
4385
|
onClick: () => lowtideStore.update((s) => {
|
|
@@ -4681,7 +4390,7 @@ window.__ModuleLoader__.load({
|
|
|
4681
4390
|
]
|
|
4682
4391
|
})]
|
|
4683
4392
|
});
|
|
4684
|
-
if (!queueOpen) return /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", {
|
|
4393
|
+
if (!panel && !queueOpen) return /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", {
|
|
4685
4394
|
className: QueueDock_module_css_default.dock,
|
|
4686
4395
|
children: [
|
|
4687
4396
|
onboardingBanner,
|
|
@@ -4711,7 +4420,7 @@ window.__ModuleLoader__.load({
|
|
|
4711
4420
|
tasks: host.tasks.filter((t2) => t2.workspace === group.workspace && (t2.status === "pending-review" || t2.status === "queued" || t2.status === "deferred"))
|
|
4712
4421
|
})).filter((group) => group.tasks.length > 0);
|
|
4713
4422
|
return /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", {
|
|
4714
|
-
className: QueueDock_module_css_default.dock,
|
|
4423
|
+
className: panel ? QueueDock_module_css_default.panel : QueueDock_module_css_default.dock,
|
|
4715
4424
|
children: [
|
|
4716
4425
|
onboardingBanner,
|
|
4717
4426
|
dockRow,
|
|
@@ -4853,8 +4562,331 @@ window.__ModuleLoader__.load({
|
|
|
4853
4562
|
});
|
|
4854
4563
|
}
|
|
4855
4564
|
//#endregion
|
|
4856
|
-
//#region
|
|
4857
|
-
|
|
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}";
|
|
4858
4890
|
const tagId$2 = "dsh-lowtide/MorningReport.module.css";
|
|
4859
4891
|
if (typeof document !== "undefined" && document.querySelector("style[data-plugin-css=" + JSON.stringify(tagId$2) + "]") === null) {
|
|
4860
4892
|
const tag = document.createElement("style");
|
|
@@ -4864,34 +4896,34 @@ window.__ModuleLoader__.load({
|
|
|
4864
4896
|
document.head.appendChild(tag);
|
|
4865
4897
|
}
|
|
4866
4898
|
var MorningReport_module_css_default = {
|
|
4867
|
-
"
|
|
4868
|
-
"
|
|
4869
|
-
"historyEmpty": "
|
|
4870
|
-
"
|
|
4871
|
-
"
|
|
4872
|
-
"
|
|
4873
|
-
"
|
|
4874
|
-
"
|
|
4875
|
-
"
|
|
4876
|
-
"
|
|
4877
|
-
"
|
|
4878
|
-
"
|
|
4879
|
-
"
|
|
4880
|
-
"
|
|
4881
|
-
"
|
|
4882
|
-
"
|
|
4883
|
-
"
|
|
4884
|
-
"
|
|
4885
|
-
"
|
|
4886
|
-
"
|
|
4887
|
-
"
|
|
4888
|
-
"
|
|
4889
|
-
"
|
|
4890
|
-
"
|
|
4891
|
-
"
|
|
4892
|
-
"
|
|
4893
|
-
"
|
|
4894
|
-
"
|
|
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"
|
|
4895
4927
|
};
|
|
4896
4928
|
//#endregion
|
|
4897
4929
|
//#region client/components/MorningReport.tsx
|
|
@@ -5214,8 +5246,8 @@ window.__ModuleLoader__.load({
|
|
|
5214
5246
|
});
|
|
5215
5247
|
}
|
|
5216
5248
|
//#endregion
|
|
5217
|
-
//#region \0dsh-css:C:\Users\胡克劳\lowtide\work\
|
|
5218
|
-
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)}";
|
|
5219
5251
|
const tagId$1 = "dsh-lowtide/ConfirmGate.module.css";
|
|
5220
5252
|
if (typeof document !== "undefined" && document.querySelector("style[data-plugin-css=" + JSON.stringify(tagId$1) + "]") === null) {
|
|
5221
5253
|
const tag = document.createElement("style");
|
|
@@ -5225,19 +5257,19 @@ window.__ModuleLoader__.load({
|
|
|
5225
5257
|
document.head.appendChild(tag);
|
|
5226
5258
|
}
|
|
5227
5259
|
var ConfirmGate_module_css_default = {
|
|
5228
|
-
"
|
|
5229
|
-
"
|
|
5230
|
-
"
|
|
5231
|
-
"
|
|
5232
|
-
"
|
|
5233
|
-
"
|
|
5234
|
-
"
|
|
5235
|
-
"
|
|
5236
|
-
"
|
|
5237
|
-
"
|
|
5238
|
-
"
|
|
5239
|
-
"defer": "
|
|
5240
|
-
"
|
|
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"
|
|
5241
5273
|
};
|
|
5242
5274
|
//#endregion
|
|
5243
5275
|
//#region client/components/ConfirmGate.tsx
|
|
@@ -5377,8 +5409,8 @@ window.__ModuleLoader__.load({
|
|
|
5377
5409
|
});
|
|
5378
5410
|
}
|
|
5379
5411
|
//#endregion
|
|
5380
|
-
//#region \0dsh-css:C:\Users\胡克劳\lowtide\work\
|
|
5381
|
-
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)}";
|
|
5382
5414
|
const tagId = "dsh-lowtide/settings.module.css";
|
|
5383
5415
|
if (typeof document !== "undefined" && document.querySelector("style[data-plugin-css=" + JSON.stringify(tagId) + "]") === null) {
|
|
5384
5416
|
const tag = document.createElement("style");
|
|
@@ -5388,56 +5420,56 @@ window.__ModuleLoader__.load({
|
|
|
5388
5420
|
document.head.appendChild(tag);
|
|
5389
5421
|
}
|
|
5390
5422
|
var settings_module_css_default = {
|
|
5391
|
-
"
|
|
5392
|
-
"
|
|
5393
|
-
"
|
|
5394
|
-
"
|
|
5395
|
-
"
|
|
5396
|
-
"
|
|
5397
|
-
"
|
|
5398
|
-
"
|
|
5399
|
-
"
|
|
5400
|
-
"
|
|
5401
|
-
"
|
|
5402
|
-
"
|
|
5403
|
-
"
|
|
5404
|
-
"
|
|
5405
|
-
"
|
|
5406
|
-
"
|
|
5407
|
-
"
|
|
5408
|
-
"
|
|
5409
|
-
"
|
|
5410
|
-
"
|
|
5411
|
-
"
|
|
5412
|
-
"
|
|
5413
|
-
"
|
|
5414
|
-
"
|
|
5415
|
-
"
|
|
5416
|
-
"
|
|
5417
|
-
"
|
|
5418
|
-
"
|
|
5419
|
-
"
|
|
5420
|
-
"
|
|
5421
|
-
"
|
|
5422
|
-
"
|
|
5423
|
-
"
|
|
5424
|
-
"
|
|
5425
|
-
"
|
|
5426
|
-
"
|
|
5427
|
-
"
|
|
5428
|
-
"
|
|
5429
|
-
"
|
|
5430
|
-
"
|
|
5431
|
-
"
|
|
5432
|
-
"
|
|
5433
|
-
"priceTier": "
|
|
5434
|
-
"
|
|
5435
|
-
"
|
|
5436
|
-
"
|
|
5437
|
-
"
|
|
5438
|
-
"
|
|
5439
|
-
"
|
|
5440
|
-
"
|
|
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"
|
|
5441
5473
|
};
|
|
5442
5474
|
//#endregion
|
|
5443
5475
|
//#region client/settings.tsx
|
|
@@ -6393,15 +6425,17 @@ window.__ModuleLoader__.load({
|
|
|
6393
6425
|
});
|
|
6394
6426
|
});
|
|
6395
6427
|
const stop = startPolling();
|
|
6428
|
+
installQueueTab(ctx);
|
|
6396
6429
|
ctx.slots.inject("conversation.session.header.utilities", () => ctx.slots.register({
|
|
6397
6430
|
name: "conversation.session.header.utilities",
|
|
6398
6431
|
id: "lt-price-pill",
|
|
6399
6432
|
order: 100,
|
|
6400
6433
|
locale: NS
|
|
6401
6434
|
}, PricePill));
|
|
6402
|
-
ctx.slots.inject("conversation.
|
|
6403
|
-
name: "conversation.
|
|
6404
|
-
|
|
6435
|
+
ctx.slots.inject("conversation.input.dock", () => ctx.slots.register({
|
|
6436
|
+
name: "conversation.input.dock",
|
|
6437
|
+
id: "lt-peak-prompt",
|
|
6438
|
+
order: 90,
|
|
6405
6439
|
locale: NS
|
|
6406
6440
|
}, InterceptCard));
|
|
6407
6441
|
ctx.slots.inject("conversation.input.dock", () => ctx.slots.register({
|