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