@klarkxy/dsh-session-manager 0.3.3 → 0.3.4

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/lib/client.js CHANGED
@@ -88,6 +88,20 @@ const text = {
88
88
  compactEnabledLabel: "建议压缩上下文",
89
89
  compactEnabledHint: "长时间离开后,建议先压缩上下文。",
90
90
  compactMinutesLabel: "离开多久后显示建议",
91
+ autoContinue: "自动继续",
92
+ autoContinueOff: "关闭",
93
+ autoContinueCautious: "谨慎",
94
+ autoContinueBold: "奔放",
95
+ autoContinueTooltip: "回复提前结束时自动发送继续。谨慎:有明确依据才继续;奔放:没完成就继续,低风险的选择按推荐方案走。会话开始后锁定。",
96
+ autoContinueLocked: "请在会话开始前选择自动继续",
97
+ autoContinueStale: "状态已在别处更改,已刷新",
98
+ autoContinueFailed: "切换失败",
99
+ autoContinueGroup: "自动继续",
100
+ autoContinueDefaultLabel: "新会话默认形态",
101
+ autoContinueDefaultHint: "只影响之后新建的会话;发送第一条消息前可在输入框上方单独选择,会话开始后保持锁定。",
102
+ autoContinueMaxLabel: "续跑次数上限",
103
+ autoContinueMaxHint: "你每发一条消息之后,最多自动继续的次数(1–10)。",
104
+ autoContinueMaxInvalid: "请填写 1–10 的整数。",
91
105
  minutesUnit: "分钟",
92
106
  modelLabel: "摘要模型",
93
107
  modelFollowOption: "当前会话 / 宿主默认模型",
@@ -150,6 +164,20 @@ const text = {
150
164
  compactEnabledLabel: "Suggest context compaction",
151
165
  compactEnabledHint: "Suggest compacting the context after a long time away.",
152
166
  compactMinutesLabel: "Show suggestion after",
167
+ autoContinue: "Auto-continue",
168
+ autoContinueOff: "Off",
169
+ autoContinueCautious: "Cautious",
170
+ autoContinueBold: "Bold",
171
+ autoContinueTooltip: "Sends a follow-up when a reply stops early. Cautious: continues only on clear evidence. Bold: continues unless done, taking the recommended option on low-risk choices. Locked once the session starts.",
172
+ autoContinueLocked: "Choose Auto-continue before the session starts",
173
+ autoContinueStale: "State changed elsewhere; refreshed",
174
+ autoContinueFailed: "Could not change Auto-continue",
175
+ autoContinueGroup: "Auto-continue",
176
+ autoContinueDefaultLabel: "Default for new sessions",
177
+ autoContinueDefaultHint: "Only affects sessions created later. Choose above the composer before sending the first message; the choice stays locked once the session starts.",
178
+ autoContinueMaxLabel: "Maximum continuations",
179
+ autoContinueMaxHint: "How many times it may continue automatically after each message you send (1–10).",
180
+ autoContinueMaxInvalid: "Enter a whole number from 1 to 10.",
153
181
  minutesUnit: "minutes",
154
182
  modelLabel: "Recap model",
155
183
  modelFollowOption: "Current conversation / host default",
@@ -211,6 +239,8 @@ const EDIT_PREPARE_ENDPOINT = "edit.prepare";
211
239
  const EDIT_FILE_ENDPOINT = "edit.file";
212
240
  const CONFIG_READ_ENDPOINT = "config.read";
213
241
  const CONFIG_WRITE_ENDPOINT = "config.write";
242
+ const AUTO_CONTINUE_STATUS_ENDPOINT = "autocontinue.status";
243
+ const AUTO_CONTINUE_UPDATE_ENDPOINT = "autocontinue.update";
214
244
  /** Card entry id in the chat flow; the recap renders at the latest completed turn's tail. */
215
245
  const WELCOME_BACK_CARD_ID = "@klarkxy/dsh-session-manager.welcome-back";
216
246
  const TURN_TAIL_SLOT = "conversation.chat.turnTail";
@@ -1931,6 +1961,50 @@ ${modelMenuCss}
1931
1961
  }
1932
1962
  .${FREE_CHAT_ROOT} .dsh-welcome-done { margin: 6px 0 0; }
1933
1963
 
1964
+ /* Hero-row Auto-continue chip: icon + mode label, tinted while a mode is on. */
1965
+ .${FREE_CHAT_ROOT}.smac-option {
1966
+ display: inline-flex;
1967
+ align-items: center;
1968
+ gap: 6px;
1969
+ }
1970
+ .${FREE_CHAT_ROOT} .smac-chip {
1971
+ display: inline-flex;
1972
+ align-items: center;
1973
+ gap: 4px;
1974
+ height: 28px;
1975
+ padding: 0 10px;
1976
+ border-radius: 999px;
1977
+ font-size: 13px;
1978
+ line-height: 20px;
1979
+ border: 1px solid var(--dsw-alias-border-l3);
1980
+ background: transparent;
1981
+ color: var(--dsw-alias-label-secondary);
1982
+ cursor: pointer;
1983
+ }
1984
+ .${FREE_CHAT_ROOT} .smac-chip svg { width: 16px; height: 16px; }
1985
+ .${FREE_CHAT_ROOT} .smac-chip .smac-chevron { width: 12px; height: 12px; }
1986
+ .${FREE_CHAT_ROOT} .smac-chip:hover:not(:disabled) {
1987
+ background: var(--dsw-alias-interactive-bg-hover);
1988
+ }
1989
+ .${FREE_CHAT_ROOT} .smac-chip.smac-chip-on {
1990
+ background: var(--dsw-alias-button-primary-fill);
1991
+ border-color: var(--dsw-alias-button-primary-fill);
1992
+ color: var(--dsw-alias-label-primary-foreground);
1993
+ }
1994
+ .${FREE_CHAT_ROOT} .smac-chip.smac-chip-on:hover:not(:disabled) {
1995
+ background: var(--dsw-alias-button-primary-hover);
1996
+ border-color: var(--dsw-alias-button-primary-hover);
1997
+ }
1998
+ .${FREE_CHAT_ROOT} .smac-chip:disabled {
1999
+ opacity: 0.5;
2000
+ cursor: default;
2001
+ }
2002
+ .${FREE_CHAT_ROOT} .smac-note {
2003
+ font-size: 12px;
2004
+ line-height: 18px;
2005
+ color: var(--dsw-alias-label-tertiary);
2006
+ }
2007
+
1934
2008
  .${FREE_CHAT_ROOT} .dsm-user-original { display: contents; }
1935
2009
  .${FREE_CHAT_ROOT} .dsm-user-original[hidden] { display: none; }
1936
2010
  .${FREE_CHAT_ROOT} .dsm-message-edit { width: min(100%, 720px); align-self: flex-end; }
@@ -3341,6 +3415,175 @@ function createWelcomeBackModel(host, ids = () => crypto.randomUUID(), minInterv
3341
3415
  };
3342
3416
  }
3343
3417
  //#endregion
3418
+ //#region src/auto-continue-option.tsx
3419
+ /**
3420
+ * The hero-row Auto-continue option: a chip that opens a three-mode menu on a
3421
+ * blank session and locks once the session starts. Mirrors the delegation
3422
+ * chip's revision discipline: stale reads never roll the chip back, a 'stale'
3423
+ * rejection refetches, and 'session-locked' explains itself in the tooltip.
3424
+ */
3425
+ var RpcError = class extends Error {
3426
+ code;
3427
+ constructor(code, message) {
3428
+ super(message);
3429
+ this.name = "RpcError";
3430
+ this.code = code;
3431
+ }
3432
+ };
3433
+ async function rpc(call, endpoint, payload) {
3434
+ const result = await call(endpoint, payload);
3435
+ if (!result || result.ok !== true) {
3436
+ const failed = result && "error" in result ? result.error : void 0;
3437
+ throw new RpcError(failed?.code ?? "unknown", failed?.message ?? "");
3438
+ }
3439
+ return result.value;
3440
+ }
3441
+ const MODES = [
3442
+ "off",
3443
+ "cautious",
3444
+ "bold"
3445
+ ];
3446
+ function AutoContinueOption({ sessionId, call, subscribeGeneration, useSession, locale }) {
3447
+ const [status, setStatus] = (0, react.useState)();
3448
+ const [saving, setSaving] = (0, react.useState)(false);
3449
+ const [notice, setNotice] = (0, react.useState)("");
3450
+ const [open, setOpen] = (0, react.useState)(false);
3451
+ const generationRef = (0, react.useRef)(0);
3452
+ const readSeqRef = (0, react.useRef)(0);
3453
+ const openState = useSession?.((snapshot) => snapshot.openState);
3454
+ const sessionRunning = useSession?.((snapshot) => snapshot.running === true);
3455
+ const sessionBlank = useSession?.((snapshot) => snapshot.blank);
3456
+ const submitting = useSession?.((snapshot) => snapshot.awaitingFirstTurn === true || (snapshot.pendingSubmissions?.length ?? 0) > 0);
3457
+ const load = (0, react.useCallback)(async () => {
3458
+ const generation = generationRef.current;
3459
+ const seq = ++readSeqRef.current;
3460
+ try {
3461
+ const next = await rpc(call, AUTO_CONTINUE_STATUS_ENDPOINT, { sessionId });
3462
+ if (generationRef.current !== generation || seq !== readSeqRef.current) return;
3463
+ setStatus((prev) => prev && prev.sessionId === next.sessionId && next.revision < prev.revision ? prev : next);
3464
+ } catch {}
3465
+ }, [call, sessionId]);
3466
+ (0, react.useEffect)(() => {
3467
+ generationRef.current += 1;
3468
+ readSeqRef.current += 1;
3469
+ setStatus(void 0);
3470
+ setSaving(false);
3471
+ setNotice("");
3472
+ setOpen(false);
3473
+ }, [sessionId]);
3474
+ (0, react.useEffect)(() => {
3475
+ load();
3476
+ }, [
3477
+ load,
3478
+ openState,
3479
+ sessionRunning,
3480
+ sessionBlank
3481
+ ]);
3482
+ (0, react.useEffect)(() => {
3483
+ const off = subscribeGeneration?.(() => {
3484
+ load();
3485
+ });
3486
+ const win = typeof window === "undefined" ? void 0 : window;
3487
+ const onFocus = () => {
3488
+ load();
3489
+ };
3490
+ win?.addEventListener("focus", onFocus);
3491
+ return () => {
3492
+ off?.();
3493
+ win?.removeEventListener("focus", onFocus);
3494
+ };
3495
+ }, [load, subscribeGeneration]);
3496
+ (0, react.useEffect)(() => {
3497
+ if (!notice) return;
3498
+ const timer = setTimeout(() => setNotice(""), 4e3);
3499
+ return () => clearTimeout(timer);
3500
+ }, [notice]);
3501
+ const choose = (0, react.useCallback)(async (mode) => {
3502
+ if (!status || saving || status.locked || sessionBlank === false || sessionRunning || submitting || mode === status.mode) return;
3503
+ const generation = generationRef.current;
3504
+ readSeqRef.current += 1;
3505
+ setSaving(true);
3506
+ setNotice("");
3507
+ try {
3508
+ const next = await rpc(call, AUTO_CONTINUE_UPDATE_ENDPOINT, {
3509
+ sessionId,
3510
+ mode,
3511
+ expectedRevision: status.revision
3512
+ });
3513
+ if (generationRef.current !== generation) return;
3514
+ setStatus(next);
3515
+ } catch (reason) {
3516
+ if (generationRef.current !== generation) return;
3517
+ if (reason instanceof RpcError && (reason.code === "stale" || reason.code === "session-locked")) {
3518
+ setNotice(reason.code === "stale" ? "autoContinueStale" : "autoContinueLocked");
3519
+ load();
3520
+ } else setNotice("autoContinueFailed");
3521
+ } finally {
3522
+ if (generationRef.current === generation) setSaving(false);
3523
+ }
3524
+ }, [
3525
+ call,
3526
+ load,
3527
+ saving,
3528
+ sessionId,
3529
+ status,
3530
+ sessionBlank,
3531
+ sessionRunning,
3532
+ submitting
3533
+ ]);
3534
+ if (!status || status.role === "executor" || sessionBlank === false) return null;
3535
+ const mode = status.mode;
3536
+ const locked = status.locked || sessionRunning === true || submitting === true;
3537
+ const tooltip = locked ? uiText(locale, "autoContinueLocked") : notice ? uiText(locale, notice) : uiText(locale, "autoContinueTooltip");
3538
+ const modeKey = mode === "cautious" ? "autoContinueCautious" : mode === "bold" ? "autoContinueBold" : "autoContinueOff";
3539
+ const label = `${uiText(locale, "autoContinue")} · ${uiText(locale, modeKey)}`;
3540
+ return /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("span", {
3541
+ className: `${FREE_CHAT_ROOT} smac-option`,
3542
+ children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)(_deepseek_ai_dsh_client_ui_primitives.Menu, {
3543
+ open,
3544
+ align: "end",
3545
+ portal: true,
3546
+ listClassName: FREE_CHAT_ROOT,
3547
+ selectedId: mode,
3548
+ items: MODES.map((value) => ({
3549
+ id: value,
3550
+ label: uiText(locale, value === "off" ? "autoContinueOff" : value === "cautious" ? "autoContinueCautious" : "autoContinueBold")
3551
+ })),
3552
+ onSelect: (id) => {
3553
+ setOpen(false);
3554
+ choose(id);
3555
+ },
3556
+ onClose: () => setOpen(false),
3557
+ anchor: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(_deepseek_ai_dsh_client_ui_primitives.Tooltip, {
3558
+ label: tooltip,
3559
+ side: "bottom",
3560
+ gap: 4,
3561
+ children: /* @__PURE__ */ (0, react_jsx_runtime.jsxs)(_deepseek_ai_dsh_client_ui_primitives.Pill, {
3562
+ className: `smac-chip${mode !== "off" ? " smac-chip-on" : ""}`,
3563
+ active: mode !== "off",
3564
+ "aria-haspopup": "menu",
3565
+ "aria-expanded": open,
3566
+ "aria-label": label,
3567
+ disabled: locked || saving,
3568
+ onClick: () => setOpen((current) => !current),
3569
+ children: [
3570
+ /* @__PURE__ */ (0, react_jsx_runtime.jsx)(_deepseek_ai_dsh_client_ui_primitives.IconRefreshOutlineRegular, {}),
3571
+ /* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", {
3572
+ className: "smac-chip-label",
3573
+ children: label
3574
+ }),
3575
+ /* @__PURE__ */ (0, react_jsx_runtime.jsx)(_deepseek_ai_dsh_client_ui_primitives.IconChevronDownOutlineRegular, { className: "smac-chevron" })
3576
+ ]
3577
+ })
3578
+ })
3579
+ }), notice ? /* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", {
3580
+ role: "status",
3581
+ className: "smac-note",
3582
+ children: uiText(locale, notice)
3583
+ }) : null]
3584
+ });
3585
+ }
3586
+ //#endregion
3344
3587
  //#region ../dsh-plugin-kit/src/contracts.ts
3345
3588
  /** `@klarkxy/dsh-git-commit` becomes `KlarkxyDshGitCommitModelSettingsChanges`. */
3346
3589
  function modelSettingsChangesIdentity(packageName) {
@@ -3767,6 +4010,8 @@ function toDraft(values) {
3767
4010
  compactMinutes: String(compactEnabled ? values.compactMinutes : 60),
3768
4011
  continueText: values.continueText,
3769
4012
  continueMode: values.continueMode,
4013
+ autoContinueMode: values.autoContinueMode,
4014
+ autoContinueMax: String(values.autoContinueMax),
3770
4015
  model: values.model === null ? "" : modelRouteKey(values.model.provider, values.model.model),
3771
4016
  ghostModel: values.ghostModel === null ? "" : modelRouteKey(values.ghostModel.provider, values.ghostModel.model)
3772
4017
  };
@@ -3777,8 +4022,14 @@ function minutesOf(text) {
3777
4022
  const value = Number.parseInt(text.trim(), 10);
3778
4023
  return Number.isSafeInteger(value) && value >= 1 ? value : void 0;
3779
4024
  }
4025
+ /** Automatic continuations per human message: a whole number from 1 to 10. */
4026
+ function autoMaxOf(text) {
4027
+ if (!/^\d+$/.test(text.trim())) return void 0;
4028
+ const value = Number.parseInt(text.trim(), 10);
4029
+ return Number.isSafeInteger(value) && value >= 1 && value <= 10 ? value : void 0;
4030
+ }
3780
4031
  function sameDraft(left, right) {
3781
- return left.recapEnabled === right.recapEnabled && left.recapMinutes === right.recapMinutes && left.compactEnabled === right.compactEnabled && left.compactMinutes === right.compactMinutes && left.continueText === right.continueText && left.continueMode === right.continueMode && left.model === right.model && left.ghostModel === right.ghostModel;
4032
+ return left.recapEnabled === right.recapEnabled && left.recapMinutes === right.recapMinutes && left.compactEnabled === right.compactEnabled && left.compactMinutes === right.compactMinutes && left.continueText === right.continueText && left.continueMode === right.continueMode && left.autoContinueMode === right.autoContinueMode && left.autoContinueMax === right.autoContinueMax && left.model === right.model && left.ghostModel === right.ghostModel;
3782
4033
  }
3783
4034
  const missingCatalog = async () => {
3784
4035
  throw new Error("Model catalog service unavailable");
@@ -3837,9 +4088,11 @@ function SessionManagerSettings(props) {
3837
4088
  const ghostLabel = selectableChoices.find((choice) => modelRouteKey(choice.provider, choice.model) === draft.ghostModel)?.label ?? copy("modelFollowOption");
3838
4089
  const recapMinutes = draft.recapEnabled ? minutesOf(draft.recapMinutes) : 0;
3839
4090
  const compactMinutes = draft.compactEnabled ? minutesOf(draft.compactMinutes) : 0;
4091
+ const autoContinueMax = autoMaxOf(draft.autoContinueMax);
3840
4092
  const recapInvalid = recapMinutes === void 0;
3841
4093
  const compactInvalid = compactMinutes === void 0;
3842
- const invalid = recapInvalid || compactInvalid;
4094
+ const autoMaxInvalid = autoContinueMax === void 0;
4095
+ const invalid = recapInvalid || compactInvalid || autoMaxInvalid;
3843
4096
  const fixedPanelId = `${tabsId}-fixed-panel`;
3844
4097
  const autoPanelId = `${tabsId}-auto-panel`;
3845
4098
  const save = () => {
@@ -3852,6 +4105,8 @@ function SessionManagerSettings(props) {
3852
4105
  compactMinutes,
3853
4106
  continueText: draft.continueText,
3854
4107
  continueMode: draft.continueMode,
4108
+ autoContinueMode: draft.autoContinueMode,
4109
+ autoContinueMax,
3855
4110
  ...draft.model === baseline.current?.model ? {} : { model: route === void 0 ? null : {
3856
4111
  provider: route.provider,
3857
4112
  model: route.model
@@ -3866,291 +4121,374 @@ function SessionManagerSettings(props) {
3866
4121
  className: `${FREE_CHAT_ROOT} dsh-ui-page`,
3867
4122
  children: [/* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", {
3868
4123
  className: "dsm-settings",
3869
- children: [/* @__PURE__ */ (0, react_jsx_runtime.jsxs)("section", {
3870
- className: "dsm-setting",
3871
- "aria-labelledby": `${tabsId}-ghost-heading`,
3872
- children: [
3873
- /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("header", {
3874
- className: "dsm-setting-header",
3875
- children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)("h3", {
3876
- id: `${tabsId}-ghost-heading`,
3877
- className: "dsh-ui-title",
3878
- children: copy("settingsMode")
3879
- }), /* @__PURE__ */ (0, react_jsx_runtime.jsx)("p", {
3880
- className: "dsh-ui-hint",
3881
- children: copy("settingsModeHint")
3882
- })]
3883
- }),
3884
- /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", {
3885
- className: "dsm-ghost-controls",
3886
- children: [
3887
- /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", {
3888
- className: "dsh-ui-field",
3889
- children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", {
3890
- className: "dsh-ui-label",
3891
- children: copy("continueSourceLabel")
3892
- }), /* @__PURE__ */ (0, react_jsx_runtime.jsx)(_deepseek_ai_dsh_client_ui_primitives.SegmentedTabs, {
3893
- label: copy("continueSourceLabel"),
3894
- items: [{
3895
- id: `${tabsId}-fixed`,
3896
- panelId: fixedPanelId,
3897
- value: "fixed",
3898
- label: copy("modeFixed")
3899
- }, {
3900
- id: `${tabsId}-auto`,
3901
- panelId: autoPanelId,
3902
- value: "auto",
3903
- label: copy("modeAuto")
3904
- }],
3905
- value: draft.continueMode,
3906
- onChange: (value) => edit({
3907
- ...draft,
3908
- continueMode: value
3909
- })
3910
- })]
3911
- }),
3912
- /* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", {
3913
- role: "tabpanel",
3914
- id: fixedPanelId,
3915
- "aria-labelledby": `${tabsId}-fixed`,
3916
- hidden: draft.continueMode !== "fixed",
3917
- children: draft.continueMode === "fixed" ? /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("label", {
4124
+ children: [
4125
+ /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("section", {
4126
+ className: "dsm-setting",
4127
+ "aria-labelledby": `${tabsId}-ghost-heading`,
4128
+ children: [
4129
+ /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("header", {
4130
+ className: "dsm-setting-header",
4131
+ children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)("h3", {
4132
+ id: `${tabsId}-ghost-heading`,
4133
+ className: "dsh-ui-title",
4134
+ children: copy("settingsMode")
4135
+ }), /* @__PURE__ */ (0, react_jsx_runtime.jsx)("p", {
4136
+ className: "dsh-ui-hint",
4137
+ children: copy("settingsModeHint")
4138
+ })]
4139
+ }),
4140
+ /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", {
4141
+ className: "dsm-ghost-controls",
4142
+ children: [
4143
+ /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", {
3918
4144
  className: "dsh-ui-field",
3919
4145
  children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", {
3920
4146
  className: "dsh-ui-label",
3921
- children: copy("continueTextLabel")
3922
- }), /* @__PURE__ */ (0, react_jsx_runtime.jsx)(_deepseek_ai_dsh_client_ui_primitives.Input, {
3923
- className: "dsm-ghost-input",
3924
- value: draft.continueText,
3925
- placeholder: copy("continueTextPlaceholder"),
3926
- onChange: (event) => edit({
3927
- ...draft,
3928
- continueText: event.target.value
3929
- })
3930
- })]
3931
- }) : null
3932
- }),
3933
- /* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", {
3934
- role: "tabpanel",
3935
- id: autoPanelId,
3936
- "aria-labelledby": `${tabsId}-auto`,
3937
- hidden: draft.continueMode !== "auto",
3938
- children: draft.continueMode === "auto" ? /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", {
3939
- className: "dsh-ui-field dsm-model-field",
3940
- children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", {
3941
- className: "dsh-ui-label",
3942
- children: copy("ghostModelLabel")
3943
- }), /* @__PURE__ */ (0, react_jsx_runtime.jsx)(ModelMenu, {
3944
- locale: props.locale,
3945
- open: ghostMenuOpen,
3946
- onOpenChange: setGhostMenuOpen,
3947
- listClassName: FREE_CHAT_ROOT,
3948
- anchor: /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("button", {
3949
- type: "button",
3950
- className: "dsh-model-menu-trigger",
3951
- "aria-label": `${copy("ghostModelLabel")}: ${ghostLabel}`,
3952
- "aria-haspopup": "menu",
3953
- "aria-expanded": ghostMenuOpen,
3954
- children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", {
3955
- className: "dsh-model-menu-triggerLabel",
3956
- children: ghostLabel
3957
- }), /* @__PURE__ */ (0, react_jsx_runtime.jsx)(_deepseek_ai_dsh_client_ui_primitives.IconChevronDownOutlineRegular, { className: `dsh-model-menu-chevron${ghostMenuOpen ? " dsh-model-menu-chevronOpen" : ""}` })]
3958
- }),
3959
- choices: selectableChoices,
3960
- selected: ghostRoute,
3961
- onPick: (route) => edit({
3962
- ...draft,
3963
- ghostModel: modelRouteKey(route.provider, route.model)
3964
- }),
3965
- leading: [{
3966
- id: "follow",
3967
- label: copy("modelFollowOption"),
3968
- selected: !ghostRoute
4147
+ children: copy("continueSourceLabel")
4148
+ }), /* @__PURE__ */ (0, react_jsx_runtime.jsx)(_deepseek_ai_dsh_client_ui_primitives.SegmentedTabs, {
4149
+ label: copy("continueSourceLabel"),
4150
+ items: [{
4151
+ id: `${tabsId}-fixed`,
4152
+ panelId: fixedPanelId,
4153
+ value: "fixed",
4154
+ label: copy("modeFixed")
4155
+ }, {
4156
+ id: `${tabsId}-auto`,
4157
+ panelId: autoPanelId,
4158
+ value: "auto",
4159
+ label: copy("modeAuto")
3969
4160
  }],
3970
- onPickLeading: () => edit({
4161
+ value: draft.continueMode,
4162
+ onChange: (value) => edit({
3971
4163
  ...draft,
3972
- ghostModel: ""
3973
- }),
3974
- modelValue: ghostLabel
4164
+ continueMode: value
4165
+ })
3975
4166
  })]
3976
- }) : null
3977
- })
3978
- ]
3979
- }),
3980
- draft.continueMode === "auto" ? /* @__PURE__ */ (0, react_jsx_runtime.jsx)("p", {
3981
- className: "dsh-ui-hint",
3982
- children: copy("ghostModelHint")
3983
- }) : null
3984
- ]
3985
- }), /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("section", {
3986
- className: "dsm-setting",
3987
- "aria-labelledby": `${tabsId}-return-heading`,
3988
- children: [
3989
- /* @__PURE__ */ (0, react_jsx_runtime.jsx)("header", {
4167
+ }),
4168
+ /* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", {
4169
+ role: "tabpanel",
4170
+ id: fixedPanelId,
4171
+ "aria-labelledby": `${tabsId}-fixed`,
4172
+ hidden: draft.continueMode !== "fixed",
4173
+ children: draft.continueMode === "fixed" ? /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("label", {
4174
+ className: "dsh-ui-field",
4175
+ children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", {
4176
+ className: "dsh-ui-label",
4177
+ children: copy("continueTextLabel")
4178
+ }), /* @__PURE__ */ (0, react_jsx_runtime.jsx)(_deepseek_ai_dsh_client_ui_primitives.Input, {
4179
+ className: "dsm-ghost-input",
4180
+ value: draft.continueText,
4181
+ placeholder: copy("continueTextPlaceholder"),
4182
+ onChange: (event) => edit({
4183
+ ...draft,
4184
+ continueText: event.target.value
4185
+ })
4186
+ })]
4187
+ }) : null
4188
+ }),
4189
+ /* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", {
4190
+ role: "tabpanel",
4191
+ id: autoPanelId,
4192
+ "aria-labelledby": `${tabsId}-auto`,
4193
+ hidden: draft.continueMode !== "auto",
4194
+ children: draft.continueMode === "auto" ? /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", {
4195
+ className: "dsh-ui-field dsm-model-field",
4196
+ children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", {
4197
+ className: "dsh-ui-label",
4198
+ children: copy("ghostModelLabel")
4199
+ }), /* @__PURE__ */ (0, react_jsx_runtime.jsx)(ModelMenu, {
4200
+ locale: props.locale,
4201
+ open: ghostMenuOpen,
4202
+ onOpenChange: setGhostMenuOpen,
4203
+ listClassName: FREE_CHAT_ROOT,
4204
+ anchor: /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("button", {
4205
+ type: "button",
4206
+ className: "dsh-model-menu-trigger",
4207
+ "aria-label": `${copy("ghostModelLabel")}: ${ghostLabel}`,
4208
+ "aria-haspopup": "menu",
4209
+ "aria-expanded": ghostMenuOpen,
4210
+ children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", {
4211
+ className: "dsh-model-menu-triggerLabel",
4212
+ children: ghostLabel
4213
+ }), /* @__PURE__ */ (0, react_jsx_runtime.jsx)(_deepseek_ai_dsh_client_ui_primitives.IconChevronDownOutlineRegular, { className: `dsh-model-menu-chevron${ghostMenuOpen ? " dsh-model-menu-chevronOpen" : ""}` })]
4214
+ }),
4215
+ choices: selectableChoices,
4216
+ selected: ghostRoute,
4217
+ onPick: (route) => edit({
4218
+ ...draft,
4219
+ ghostModel: modelRouteKey(route.provider, route.model)
4220
+ }),
4221
+ leading: [{
4222
+ id: "follow",
4223
+ label: copy("modelFollowOption"),
4224
+ selected: !ghostRoute
4225
+ }],
4226
+ onPickLeading: () => edit({
4227
+ ...draft,
4228
+ ghostModel: ""
4229
+ }),
4230
+ modelValue: ghostLabel
4231
+ })]
4232
+ }) : null
4233
+ })
4234
+ ]
4235
+ }),
4236
+ draft.continueMode === "auto" ? /* @__PURE__ */ (0, react_jsx_runtime.jsx)("p", {
4237
+ className: "dsh-ui-hint",
4238
+ children: copy("ghostModelHint")
4239
+ }) : null
4240
+ ]
4241
+ }),
4242
+ /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("section", {
4243
+ className: "dsm-setting",
4244
+ "aria-labelledby": `${tabsId}-auto-continue-heading`,
4245
+ children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)("header", {
3990
4246
  className: "dsm-setting-header",
3991
4247
  children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)("h3", {
3992
- id: `${tabsId}-return-heading`,
4248
+ id: `${tabsId}-auto-continue-heading`,
3993
4249
  className: "dsh-ui-title",
3994
- children: copy("welcomeBackGroup")
4250
+ children: copy("autoContinueGroup")
3995
4251
  })
3996
- }),
3997
- /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", {
3998
- className: "dsm-feature",
3999
- children: [/* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", {
4000
- className: "dsh-ui-toggle-row",
4001
- children: [/* @__PURE__ */ (0, react_jsx_runtime.jsxs)("span", {
4002
- className: "dsh-ui-toggle-text",
4252
+ }), /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", {
4253
+ className: "dsm-feature-options",
4254
+ children: [/* @__PURE__ */ (0, react_jsx_runtime.jsxs)("label", {
4255
+ className: "dsh-ui-field",
4256
+ children: [
4257
+ /* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", {
4258
+ className: "dsh-ui-label",
4259
+ children: copy("autoContinueDefaultLabel")
4260
+ }),
4261
+ /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("select", {
4262
+ className: "dsh-ui-select",
4263
+ value: draft.autoContinueMode,
4264
+ onChange: (event) => edit({
4265
+ ...draft,
4266
+ autoContinueMode: event.target.value
4267
+ }),
4268
+ children: [
4269
+ /* @__PURE__ */ (0, react_jsx_runtime.jsx)("option", {
4270
+ value: "off",
4271
+ children: copy("autoContinueOff")
4272
+ }),
4273
+ /* @__PURE__ */ (0, react_jsx_runtime.jsx)("option", {
4274
+ value: "cautious",
4275
+ children: copy("autoContinueCautious")
4276
+ }),
4277
+ /* @__PURE__ */ (0, react_jsx_runtime.jsx)("option", {
4278
+ value: "bold",
4279
+ children: copy("autoContinueBold")
4280
+ })
4281
+ ]
4282
+ }),
4283
+ /* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", {
4284
+ className: "dsh-ui-hint",
4285
+ children: copy("autoContinueDefaultHint")
4286
+ })
4287
+ ]
4288
+ }), /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", { children: [
4289
+ /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("label", {
4290
+ className: "dsh-ui-field",
4003
4291
  children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", {
4004
- className: "dsh-ui-toggle-label",
4005
- children: copy("recapEnabledLabel")
4292
+ className: "dsh-ui-label",
4293
+ children: copy("autoContinueMaxLabel")
4006
4294
  }), /* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", {
4007
- className: "dsh-ui-hint",
4008
- children: copy("recapEnabledHint")
4295
+ className: "dsm-minutes-control",
4296
+ children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(_deepseek_ai_dsh_client_ui_primitives.Input, {
4297
+ className: "dsm-minutes",
4298
+ value: draft.autoContinueMax,
4299
+ inputMode: "numeric",
4300
+ "aria-invalid": autoMaxInvalid || void 0,
4301
+ "aria-describedby": autoMaxInvalid ? `${tabsId}-auto-max-error` : void 0,
4302
+ onChange: (event) => edit({
4303
+ ...draft,
4304
+ autoContinueMax: event.target.value
4305
+ })
4306
+ })
4307
+ })]
4308
+ }),
4309
+ /* @__PURE__ */ (0, react_jsx_runtime.jsx)("p", {
4310
+ className: "dsh-ui-hint",
4311
+ children: copy("autoContinueMaxHint")
4312
+ }),
4313
+ autoMaxInvalid ? /* @__PURE__ */ (0, react_jsx_runtime.jsx)("p", {
4314
+ id: `${tabsId}-auto-max-error`,
4315
+ className: "dsh-ui-error",
4316
+ role: "alert",
4317
+ children: copy("autoContinueMaxInvalid")
4318
+ }) : null
4319
+ ] })]
4320
+ })]
4321
+ }),
4322
+ /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("section", {
4323
+ className: "dsm-setting",
4324
+ "aria-labelledby": `${tabsId}-return-heading`,
4325
+ children: [
4326
+ /* @__PURE__ */ (0, react_jsx_runtime.jsx)("header", {
4327
+ className: "dsm-setting-header",
4328
+ children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)("h3", {
4329
+ id: `${tabsId}-return-heading`,
4330
+ className: "dsh-ui-title",
4331
+ children: copy("welcomeBackGroup")
4332
+ })
4333
+ }),
4334
+ /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", {
4335
+ className: "dsm-feature",
4336
+ children: [/* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", {
4337
+ className: "dsh-ui-toggle-row",
4338
+ children: [/* @__PURE__ */ (0, react_jsx_runtime.jsxs)("span", {
4339
+ className: "dsh-ui-toggle-text",
4340
+ children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", {
4341
+ className: "dsh-ui-toggle-label",
4342
+ children: copy("recapEnabledLabel")
4343
+ }), /* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", {
4344
+ className: "dsh-ui-hint",
4345
+ children: copy("recapEnabledHint")
4346
+ })]
4347
+ }), /* @__PURE__ */ (0, react_jsx_runtime.jsx)(_deepseek_ai_dsh_client_ui_primitives.Switch, {
4348
+ label: copy("recapEnabledLabel"),
4349
+ checked: draft.recapEnabled,
4350
+ onChange: (next) => edit({
4351
+ ...draft,
4352
+ recapEnabled: next
4353
+ })
4354
+ })]
4355
+ }), /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", {
4356
+ className: "dsm-feature-options",
4357
+ "data-disabled": draft.recapEnabled ? void 0 : "true",
4358
+ children: [/* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", {
4359
+ className: "dsh-ui-fields-grid",
4360
+ children: [/* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", { children: [/* @__PURE__ */ (0, react_jsx_runtime.jsxs)("label", {
4361
+ className: "dsh-ui-field",
4362
+ children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", {
4363
+ className: "dsh-ui-label",
4364
+ children: copy("recapMinutesLabel")
4365
+ }), /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("span", {
4366
+ className: "dsm-minutes-control",
4367
+ children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)(_deepseek_ai_dsh_client_ui_primitives.Input, {
4368
+ className: "dsm-minutes",
4369
+ value: draft.recapMinutes,
4370
+ inputMode: "numeric",
4371
+ disabled: !draft.recapEnabled,
4372
+ "aria-invalid": recapInvalid || void 0,
4373
+ "aria-describedby": recapInvalid ? `${tabsId}-recap-error` : void 0,
4374
+ onChange: (event) => edit({
4375
+ ...draft,
4376
+ recapMinutes: event.target.value
4377
+ })
4378
+ }), /* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", {
4379
+ className: "dsh-ui-meta",
4380
+ children: copy("minutesUnit")
4381
+ })]
4382
+ })]
4383
+ }), recapInvalid ? /* @__PURE__ */ (0, react_jsx_runtime.jsx)("p", {
4384
+ id: `${tabsId}-recap-error`,
4385
+ className: "dsh-ui-error",
4386
+ role: "alert",
4387
+ children: copy("minutesInvalid")
4388
+ }) : null] }), /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", {
4389
+ className: "dsh-ui-field dsm-model-field",
4390
+ children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", {
4391
+ className: "dsh-ui-label",
4392
+ children: copy("modelLabel")
4393
+ }), /* @__PURE__ */ (0, react_jsx_runtime.jsx)(ModelMenu, {
4394
+ locale: props.locale,
4395
+ open: menuOpen,
4396
+ onOpenChange: setMenuOpen,
4397
+ listClassName: FREE_CHAT_ROOT,
4398
+ anchor: /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("button", {
4399
+ type: "button",
4400
+ className: "dsh-model-menu-trigger",
4401
+ disabled: !draft.recapEnabled,
4402
+ "aria-label": `${copy("modelLabel")}: ${selectedLabel}`,
4403
+ "aria-haspopup": "menu",
4404
+ "aria-expanded": menuOpen,
4405
+ children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", {
4406
+ className: "dsh-model-menu-triggerLabel",
4407
+ children: selectedLabel
4408
+ }), /* @__PURE__ */ (0, react_jsx_runtime.jsx)(_deepseek_ai_dsh_client_ui_primitives.IconChevronDownOutlineRegular, { className: `dsh-model-menu-chevron${menuOpen ? " dsh-model-menu-chevronOpen" : ""}` })]
4409
+ }),
4410
+ choices: selectableChoices,
4411
+ selected: selectedRoute,
4412
+ onPick: (route) => edit({
4413
+ ...draft,
4414
+ model: modelRouteKey(route.provider, route.model)
4415
+ }),
4416
+ leading: [{
4417
+ id: "follow",
4418
+ label: copy("modelFollowOption"),
4419
+ selected: !selectedRoute
4420
+ }],
4421
+ onPickLeading: () => edit({
4422
+ ...draft,
4423
+ model: ""
4424
+ }),
4425
+ modelValue: selectedLabel
4426
+ })]
4427
+ })]
4428
+ }), /* @__PURE__ */ (0, react_jsx_runtime.jsx)(ModelCatalogStatus, {
4429
+ state: catalog,
4430
+ locale: props.locale
4009
4431
  })]
4010
- }), /* @__PURE__ */ (0, react_jsx_runtime.jsx)(_deepseek_ai_dsh_client_ui_primitives.Switch, {
4011
- label: copy("recapEnabledLabel"),
4012
- checked: draft.recapEnabled,
4013
- onChange: (next) => edit({
4014
- ...draft,
4015
- recapEnabled: next
4016
- })
4017
4432
  })]
4018
- }), /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", {
4019
- className: "dsm-feature-options",
4020
- "data-disabled": draft.recapEnabled ? void 0 : "true",
4433
+ }),
4434
+ /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", {
4435
+ className: "dsm-feature",
4021
4436
  children: [/* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", {
4022
- className: "dsh-ui-fields-grid",
4023
- children: [/* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", { children: [/* @__PURE__ */ (0, react_jsx_runtime.jsxs)("label", {
4437
+ className: "dsh-ui-toggle-row",
4438
+ children: [/* @__PURE__ */ (0, react_jsx_runtime.jsxs)("span", {
4439
+ className: "dsh-ui-toggle-text",
4440
+ children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", {
4441
+ className: "dsh-ui-toggle-label",
4442
+ children: copy("compactEnabledLabel")
4443
+ }), /* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", {
4444
+ className: "dsh-ui-hint",
4445
+ children: copy("compactEnabledHint")
4446
+ })]
4447
+ }), /* @__PURE__ */ (0, react_jsx_runtime.jsx)(_deepseek_ai_dsh_client_ui_primitives.Switch, {
4448
+ label: copy("compactEnabledLabel"),
4449
+ checked: draft.compactEnabled,
4450
+ onChange: (next) => edit({
4451
+ ...draft,
4452
+ compactEnabled: next
4453
+ })
4454
+ })]
4455
+ }), /* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", {
4456
+ className: "dsm-feature-options dsm-compact-options",
4457
+ "data-disabled": draft.compactEnabled ? void 0 : "true",
4458
+ children: /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", { children: [/* @__PURE__ */ (0, react_jsx_runtime.jsxs)("label", {
4024
4459
  className: "dsh-ui-field",
4025
4460
  children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", {
4026
4461
  className: "dsh-ui-label",
4027
- children: copy("recapMinutesLabel")
4462
+ children: copy("compactMinutesLabel")
4028
4463
  }), /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("span", {
4029
4464
  className: "dsm-minutes-control",
4030
4465
  children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)(_deepseek_ai_dsh_client_ui_primitives.Input, {
4031
4466
  className: "dsm-minutes",
4032
- value: draft.recapMinutes,
4467
+ value: draft.compactMinutes,
4033
4468
  inputMode: "numeric",
4034
- disabled: !draft.recapEnabled,
4035
- "aria-invalid": recapInvalid || void 0,
4036
- "aria-describedby": recapInvalid ? `${tabsId}-recap-error` : void 0,
4469
+ disabled: !draft.compactEnabled,
4470
+ "aria-invalid": compactInvalid || void 0,
4471
+ "aria-describedby": compactInvalid ? `${tabsId}-compact-error` : void 0,
4037
4472
  onChange: (event) => edit({
4038
4473
  ...draft,
4039
- recapMinutes: event.target.value
4474
+ compactMinutes: event.target.value
4040
4475
  })
4041
4476
  }), /* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", {
4042
4477
  className: "dsh-ui-meta",
4043
4478
  children: copy("minutesUnit")
4044
4479
  })]
4045
4480
  })]
4046
- }), recapInvalid ? /* @__PURE__ */ (0, react_jsx_runtime.jsx)("p", {
4047
- id: `${tabsId}-recap-error`,
4481
+ }), compactInvalid ? /* @__PURE__ */ (0, react_jsx_runtime.jsx)("p", {
4482
+ id: `${tabsId}-compact-error`,
4048
4483
  className: "dsh-ui-error",
4049
4484
  role: "alert",
4050
4485
  children: copy("minutesInvalid")
4051
- }) : null] }), /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", {
4052
- className: "dsh-ui-field dsm-model-field",
4053
- children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", {
4054
- className: "dsh-ui-label",
4055
- children: copy("modelLabel")
4056
- }), /* @__PURE__ */ (0, react_jsx_runtime.jsx)(ModelMenu, {
4057
- locale: props.locale,
4058
- open: menuOpen,
4059
- onOpenChange: setMenuOpen,
4060
- listClassName: FREE_CHAT_ROOT,
4061
- anchor: /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("button", {
4062
- type: "button",
4063
- className: "dsh-model-menu-trigger",
4064
- disabled: !draft.recapEnabled,
4065
- "aria-label": `${copy("modelLabel")}: ${selectedLabel}`,
4066
- "aria-haspopup": "menu",
4067
- "aria-expanded": menuOpen,
4068
- children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", {
4069
- className: "dsh-model-menu-triggerLabel",
4070
- children: selectedLabel
4071
- }), /* @__PURE__ */ (0, react_jsx_runtime.jsx)(_deepseek_ai_dsh_client_ui_primitives.IconChevronDownOutlineRegular, { className: `dsh-model-menu-chevron${menuOpen ? " dsh-model-menu-chevronOpen" : ""}` })]
4072
- }),
4073
- choices: selectableChoices,
4074
- selected: selectedRoute,
4075
- onPick: (route) => edit({
4076
- ...draft,
4077
- model: modelRouteKey(route.provider, route.model)
4078
- }),
4079
- leading: [{
4080
- id: "follow",
4081
- label: copy("modelFollowOption"),
4082
- selected: !selectedRoute
4083
- }],
4084
- onPickLeading: () => edit({
4085
- ...draft,
4086
- model: ""
4087
- }),
4088
- modelValue: selectedLabel
4089
- })]
4090
- })]
4091
- }), /* @__PURE__ */ (0, react_jsx_runtime.jsx)(ModelCatalogStatus, {
4092
- state: catalog,
4093
- locale: props.locale
4094
- })]
4095
- })]
4096
- }),
4097
- /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", {
4098
- className: "dsm-feature",
4099
- children: [/* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", {
4100
- className: "dsh-ui-toggle-row",
4101
- children: [/* @__PURE__ */ (0, react_jsx_runtime.jsxs)("span", {
4102
- className: "dsh-ui-toggle-text",
4103
- children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", {
4104
- className: "dsh-ui-toggle-label",
4105
- children: copy("compactEnabledLabel")
4106
- }), /* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", {
4107
- className: "dsh-ui-hint",
4108
- children: copy("compactEnabledHint")
4109
- })]
4110
- }), /* @__PURE__ */ (0, react_jsx_runtime.jsx)(_deepseek_ai_dsh_client_ui_primitives.Switch, {
4111
- label: copy("compactEnabledLabel"),
4112
- checked: draft.compactEnabled,
4113
- onChange: (next) => edit({
4114
- ...draft,
4115
- compactEnabled: next
4116
- })
4486
+ }) : null] })
4117
4487
  })]
4118
- }), /* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", {
4119
- className: "dsm-feature-options dsm-compact-options",
4120
- "data-disabled": draft.compactEnabled ? void 0 : "true",
4121
- children: /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", { children: [/* @__PURE__ */ (0, react_jsx_runtime.jsxs)("label", {
4122
- className: "dsh-ui-field",
4123
- children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", {
4124
- className: "dsh-ui-label",
4125
- children: copy("compactMinutesLabel")
4126
- }), /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("span", {
4127
- className: "dsm-minutes-control",
4128
- children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)(_deepseek_ai_dsh_client_ui_primitives.Input, {
4129
- className: "dsm-minutes",
4130
- value: draft.compactMinutes,
4131
- inputMode: "numeric",
4132
- disabled: !draft.compactEnabled,
4133
- "aria-invalid": compactInvalid || void 0,
4134
- "aria-describedby": compactInvalid ? `${tabsId}-compact-error` : void 0,
4135
- onChange: (event) => edit({
4136
- ...draft,
4137
- compactMinutes: event.target.value
4138
- })
4139
- }), /* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", {
4140
- className: "dsh-ui-meta",
4141
- children: copy("minutesUnit")
4142
- })]
4143
- })]
4144
- }), compactInvalid ? /* @__PURE__ */ (0, react_jsx_runtime.jsx)("p", {
4145
- id: `${tabsId}-compact-error`,
4146
- className: "dsh-ui-error",
4147
- role: "alert",
4148
- children: copy("minutesInvalid")
4149
- }) : null] })
4150
- })]
4151
- })
4152
- ]
4153
- })]
4488
+ })
4489
+ ]
4490
+ })
4491
+ ]
4154
4492
  }), /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", {
4155
4493
  className: "dsh-ui-form-footer dsm-settings-footer",
4156
4494
  children: [
@@ -5050,6 +5388,21 @@ function apply(ctx) {
5050
5388
  ...props
5051
5389
  }))));
5052
5390
  stops.push(installTemporaryWorkspacePicker(client.slots, temporary, temporaryHost.createWorkspace, client.locale));
5391
+ stops.push(client.slots.inject("conversation.hero.options", () => client.slots.register({
5392
+ name: "conversation.hero.options",
5393
+ id: "auto-continue",
5394
+ order: 30,
5395
+ inject: () => ({
5396
+ call: (endpoint, payload) => client.connection?.rpc?.call(TEMP_WORKSPACE_CHANNEL, endpoint, payload),
5397
+ subscribeGeneration: (listener) => client.connection?.generation?.subscribe(listener)
5398
+ })
5399
+ }, (props) => /* @__PURE__ */ (0, react_jsx_runtime.jsx)(AutoContinueOption, {
5400
+ sessionId: props.sessionId,
5401
+ call: props.call,
5402
+ subscribeGeneration: props.subscribeGeneration,
5403
+ useSession: props.useSession,
5404
+ locale: useLiveLocale(client.locale)
5405
+ }))));
5053
5406
  stops.push(client.slots.inject(USER_ACTIONS_SLOT, () => client.slots.register({
5054
5407
  name: USER_ACTIONS_SLOT,
5055
5408
  id: USER_ACTIONS_ID,