@klarkxy/dsh-session-manager 0.3.1 → 0.3.2

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.
@@ -59,18 +59,20 @@ const text = {
59
59
  settingsMode: "继续灰影",
60
60
  modeFixed: "固定文本",
61
61
  modeAuto: "模型生成",
62
- settingsModeHint: "输入框为空时显示的灰色继续文本:Tab 填入,点击发送。",
62
+ settingsModeHint: "输入框为空时显示建议;按 Tab 填入,点击直接发送。",
63
+ continueSourceLabel: "内容来源",
63
64
  continueTextLabel: "固定文本内容",
64
65
  continueTextPlaceholder: "留空使用默认「继续」",
65
- ghostModelLabel: "灰影模型",
66
- ghostModelHint: "只在上一轮结束后生成一次,并缓存在这个会话中;留空跟随会话或宿主默认。",
67
- welcomeBackGroup: "欢迎回来",
68
- recapEnabledLabel: "欢迎回来摘要",
69
- recapEnabledHint: "回到空闲的会话时,在对话顶部生成回顾卡片。",
70
- recapMinutesLabel: "摘要阈值(分钟)",
71
- compactEnabledLabel: "压缩建议",
72
- compactEnabledHint: "空闲较久时,回到会话会建议先压缩上下文。",
73
- compactMinutesLabel: "建议阈值(分钟)",
66
+ ghostModelLabel: "生成模型",
67
+ ghostModelHint: "每轮结束后生成一次并缓存;不选择时使用当前会话或宿主的默认模型。",
68
+ welcomeBackGroup: "回到会话时",
69
+ recapEnabledLabel: "显示会话摘要",
70
+ recapEnabledHint: "在对话中回顾上次进展。",
71
+ recapMinutesLabel: "离开多久后显示摘要",
72
+ compactEnabledLabel: "建议压缩上下文",
73
+ compactEnabledHint: "长时间离开后,建议先压缩上下文。",
74
+ compactMinutesLabel: "离开多久后显示建议",
75
+ minutesUnit: "分钟",
74
76
  modelLabel: "摘要模型",
75
77
  modelFollowOption: "当前会话 / 宿主默认模型",
76
78
  modelGroupHint: "只用于欢迎回来摘要;留空跟随会话或宿主默认。",
@@ -113,18 +115,20 @@ const text = {
113
115
  settingsMode: "Continue ghost",
114
116
  modeFixed: "Fixed text",
115
117
  modeAuto: "Model-generated",
116
- settingsModeHint: "The grey continuation shown on an empty composer: Tab fills it, clicking sends it.",
118
+ settingsModeHint: "Show a suggestion when the composer is empty. Press Tab to fill it, or click to send.",
119
+ continueSourceLabel: "Source",
117
120
  continueTextLabel: "Fixed text",
118
121
  continueTextPlaceholder: "Empty uses the default \"Continue\"",
119
- ghostModelLabel: "Ghost model",
120
- ghostModelHint: "Generated once after the previous turn ends and cached for this session; empty follows the conversation or host default.",
121
- welcomeBackGroup: "Welcome back",
122
- recapEnabledLabel: "Welcome-back recap",
123
- recapEnabledHint: "Shows a recap card at the top of the conversation when you return to an idle session.",
124
- recapMinutesLabel: "Recap threshold (minutes)",
125
- compactEnabledLabel: "Compaction suggestion",
126
- compactEnabledHint: "Suggests compacting the context when you return after a longer idle stretch.",
127
- compactMinutesLabel: "Suggestion threshold (minutes)",
122
+ ghostModelLabel: "Generation model",
123
+ ghostModelHint: "Generated once after each turn and cached. The default follows the current conversation or host.",
124
+ welcomeBackGroup: "When you return",
125
+ recapEnabledLabel: "Show session recap",
126
+ recapEnabledHint: "Review your previous progress in the conversation.",
127
+ recapMinutesLabel: "Show recap after",
128
+ compactEnabledLabel: "Suggest context compaction",
129
+ compactEnabledHint: "Suggest compacting the context after a long time away.",
130
+ compactMinutesLabel: "Show suggestion after",
131
+ minutesUnit: "minutes",
128
132
  modelLabel: "Recap model",
129
133
  modelFollowOption: "Current conversation / host default",
130
134
  modelGroupHint: "Used only for the welcome-back recap; empty follows the conversation or host default.",
@@ -1654,25 +1658,88 @@ ${modelMenuCss}
1654
1658
  min-width: 0;
1655
1659
  }
1656
1660
  .${FREE_CHAT_ROOT} .dsh-free-alert { margin: 0; }
1657
- /* Settings page: a feature is its toggle row plus the nested well that holds
1658
- * the fields the switch gates. The well reuses the nested-card surface
1659
- * (layer-2 on layer-1) so the grouping reads without another heading. */
1661
+ /* Settings page: one quiet reading surface. Rules, not nested wells, separate
1662
+ * sections; dependent controls align with the feature they belong to. */
1663
+ .${FREE_CHAT_ROOT} .dsm-settings {
1664
+ display: flex;
1665
+ flex-direction: column;
1666
+ gap: 20px;
1667
+ min-width: 0;
1668
+ }
1669
+ .${FREE_CHAT_ROOT} .dsm-setting {
1670
+ display: flex;
1671
+ flex-direction: column;
1672
+ gap: 12px;
1673
+ min-width: 0;
1674
+ }
1675
+ .${FREE_CHAT_ROOT} .dsm-setting + .dsm-setting {
1676
+ padding-top: 20px;
1677
+ border-top: 0.5px solid var(--dsw-alias-border-l2);
1678
+ }
1679
+ .${FREE_CHAT_ROOT} .dsm-setting-header {
1680
+ display: flex;
1681
+ flex-direction: column;
1682
+ gap: 4px;
1683
+ }
1684
+ .${FREE_CHAT_ROOT} .dsm-ghost-controls {
1685
+ display: grid;
1686
+ grid-template-columns: minmax(220px, 0.8fr) minmax(0, 1.2fr);
1687
+ align-items: start;
1688
+ gap: 16px;
1689
+ }
1690
+ /* SegmentedTabs is 42px tall; its adjacent text controls share that baseline. */
1691
+ .${FREE_CHAT_ROOT} .dsm-ghost-controls .dsh-model-menu-trigger,
1692
+ .${FREE_CHAT_ROOT} .dsm-ghost-controls .dsm-ghost-input {
1693
+ height: 42px;
1694
+ }
1660
1695
  .${FREE_CHAT_ROOT} .dsm-feature + .dsm-feature {
1696
+ margin-top: 4px;
1661
1697
  border-top: 0.5px solid var(--dsw-alias-border-l2);
1662
1698
  }
1663
- .${FREE_CHAT_ROOT} .dsm-subs {
1699
+ .${FREE_CHAT_ROOT} .dsm-feature > .dsh-ui-toggle-row { padding: 8px 0; }
1700
+ .${FREE_CHAT_ROOT} .dsm-feature-options {
1664
1701
  display: flex;
1665
1702
  flex-direction: column;
1666
- gap: 12px;
1667
- margin: 0 0 4px;
1668
- padding: 12px;
1669
- border-radius: var(--dsw-radius-md);
1670
- background: var(--dsw-alias-bg-layer-2);
1703
+ gap: 8px;
1704
+ padding: 4px 0 8px;
1671
1705
  }
1672
- .${FREE_CHAT_ROOT} .dsm-subs[data-disabled='true'] .dsh-ui-label {
1706
+ .${FREE_CHAT_ROOT} .dsm-feature-options[data-disabled='true'] .dsh-ui-label,
1707
+ .${FREE_CHAT_ROOT} .dsm-feature-options[data-disabled='true'] .dsh-ui-meta {
1673
1708
  color: var(--dsw-alias-label-tertiary);
1674
1709
  }
1675
- .${FREE_CHAT_ROOT} .dsm-minutes { width: 120px; }
1710
+ .${FREE_CHAT_ROOT} .dsm-compact-options { max-width: calc(50% - 10px); }
1711
+ .${FREE_CHAT_ROOT} .dsm-model-field .dsh-model-menu-root,
1712
+ .${FREE_CHAT_ROOT} .dsm-model-field .dsh-model-menu-trigger {
1713
+ width: 100%;
1714
+ max-width: none;
1715
+ }
1716
+ .${FREE_CHAT_ROOT} .dsm-model-field .dsh-model-menu-trigger {
1717
+ justify-content: space-between;
1718
+ height: 32px;
1719
+ padding: 0 10px;
1720
+ border: 0.5px solid var(--dsw-alias-border-l4);
1721
+ border-radius: var(--dsw-radius-md);
1722
+ background: var(--dsw-alias-bg-layer-3);
1723
+ color: var(--dsw-alias-label-primary);
1724
+ }
1725
+ .${FREE_CHAT_ROOT} .dsm-model-field .dsh-model-menu-triggerLabel {
1726
+ flex: 1;
1727
+ text-align: left;
1728
+ }
1729
+ .${FREE_CHAT_ROOT} .dsm-settings-footer .dsh-ui-notice--error {
1730
+ flex: 0 0 100%;
1731
+ min-width: 0;
1732
+ }
1733
+ .${FREE_CHAT_ROOT} .dsm-minutes-control {
1734
+ display: flex;
1735
+ align-items: center;
1736
+ gap: 8px;
1737
+ }
1738
+ .${FREE_CHAT_ROOT} .dsm-minutes { width: 88px; }
1739
+ @media (max-width: 560px) {
1740
+ .${FREE_CHAT_ROOT} .dsm-ghost-controls { grid-template-columns: minmax(0, 1fr); }
1741
+ .${FREE_CHAT_ROOT} .dsm-compact-options { max-width: none; }
1742
+ }
1676
1743
  /* Welcome-back card: one flat full-width row at the latest turn's tail in the
1677
1744
  * chat flow — a single bordered surface with the recap laid out inline, no
1678
1745
  * nested box. */
@@ -2814,11 +2881,11 @@ function createContinueModel(host) {
2814
2881
  load(sessionId) {
2815
2882
  if (sessionId === "" || lifetime.signal.aborted || inflight.has(sessionId)) return;
2816
2883
  const current = read(sessionId);
2817
- if (current.text !== void 0 && current.seq === void 0) return;
2884
+ if (current.text !== void 0 && current.seq === void 0 && current.pending !== true) return;
2818
2885
  const ticket = new AbortController();
2819
2886
  inflight.set(sessionId, ticket);
2820
2887
  const signal = AbortSignal.any([lifetime.signal, ticket.signal]);
2821
- callContinueSuggest(host, sessionId, current.seq, signal).then((value) => {
2888
+ callContinueSuggest(host, sessionId, current.text ? current.seq : void 0, signal).then((value) => {
2822
2889
  if (signal.aborted || inflight.get(sessionId) !== ticket) return;
2823
2890
  write(sessionId, value);
2824
2891
  }).catch(() => {}).finally(() => {
@@ -2857,7 +2924,9 @@ async function callContinueSuggest(host, sessionId, knownSeq, signal) {
2857
2924
  const seq = typeof value?.seq === "number" && Number.isSafeInteger(value.seq) && value.seq >= 0 ? value.seq : void 0;
2858
2925
  return {
2859
2926
  text,
2860
- ...seq === void 0 ? {} : { seq }
2927
+ ...seq === void 0 ? {} : { seq },
2928
+ ...value?.pending === true ? { pending: true } : {},
2929
+ ...value?.fallback === true ? { fallback: true } : {}
2861
2930
  };
2862
2931
  }
2863
2932
  function createPresenceConfigModel(host, delay = (ms) => new Promise((resolve) => setTimeout(resolve, ms))) {
@@ -3314,8 +3383,10 @@ function ContinueGhost(props) {
3314
3383
  const blank = props.useSession?.((state) => state.blank) ?? true;
3315
3384
  const running = props.useSessionStatus?.((state) => state.get(sessionId)?.running === true) ?? false;
3316
3385
  const snapshot = (0, react.useSyncExternalStore)(props.model.subscribe, () => props.model.getSnapshot(sessionId), () => props.model.getSnapshot(sessionId));
3317
- const text = snapshot.text ?? uiText(props.locale, "continueDefault");
3318
- const active = sessionId !== "" && !blank && bare && draft === "" && phase === "plain";
3386
+ const shown = running || snapshot.pending === true || snapshot.text === void 0 ? "" : snapshot.text ?? (snapshot.fallback === true ? uiText(props.locale, "continueDefault") : "");
3387
+ const idle = sessionId !== "" && !blank && bare && draft === "" && phase === "plain" && !running;
3388
+ const active = shown !== "" && idle;
3389
+ const text = shown;
3319
3390
  const latest = (0, react.useRef)({
3320
3391
  active,
3321
3392
  text
@@ -3331,18 +3402,18 @@ function ContinueGhost(props) {
3331
3402
  const finished = wasRunning.current && !running;
3332
3403
  wasRunning.current = running;
3333
3404
  if (finished && sessionId !== "") props.model.invalidate(sessionId);
3334
- if (active && !running) props.model.load(sessionId);
3405
+ if (idle && !running) props.model.load(sessionId);
3335
3406
  }, [
3336
3407
  props.model,
3337
- active,
3408
+ idle,
3338
3409
  running,
3339
3410
  sessionId
3340
3411
  ]);
3341
3412
  (0, react.useEffect)(() => {
3342
- if (active && !running && snapshot.text === void 0) props.model.load(sessionId);
3413
+ if (idle && !running && snapshot.text === void 0) props.model.load(sessionId);
3343
3414
  }, [
3344
3415
  props.model,
3345
- active,
3416
+ idle,
3346
3417
  running,
3347
3418
  sessionId,
3348
3419
  snapshot
@@ -3638,117 +3709,135 @@ function SessionManagerSettings(props) {
3638
3709
  };
3639
3710
  return /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", {
3640
3711
  className: `${FREE_CHAT_ROOT} dsh-ui-page`,
3641
- children: [
3642
- /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("section", {
3643
- className: "dsh-ui-card",
3712
+ children: [/* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", {
3713
+ className: "dsm-settings",
3714
+ children: [/* @__PURE__ */ (0, react_jsx_runtime.jsxs)("section", {
3715
+ className: "dsm-setting",
3716
+ "aria-labelledby": `${tabsId}-ghost-heading`,
3644
3717
  children: [
3645
- /* @__PURE__ */ (0, react_jsx_runtime.jsx)("h3", {
3646
- className: "dsh-ui-heading",
3647
- children: copy("settingsMode")
3648
- }),
3649
- /* @__PURE__ */ (0, react_jsx_runtime.jsx)("p", {
3650
- className: "dsh-ui-hint",
3651
- children: copy("settingsModeHint")
3652
- }),
3653
- /* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", { children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(_deepseek_ai_dsh_client_ui_primitives.SegmentedTabs, {
3654
- label: copy("settingsMode"),
3655
- items: [{
3656
- id: `${tabsId}-fixed`,
3657
- panelId: fixedPanelId,
3658
- value: "fixed",
3659
- label: copy("modeFixed")
3660
- }, {
3661
- id: `${tabsId}-auto`,
3662
- panelId: autoPanelId,
3663
- value: "auto",
3664
- label: copy("modeAuto")
3665
- }],
3666
- value: draft.continueMode,
3667
- onChange: (value) => edit({
3668
- ...draft,
3669
- continueMode: value
3670
- })
3671
- }) }),
3672
- /* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", {
3673
- role: "tabpanel",
3674
- id: fixedPanelId,
3675
- "aria-labelledby": `${tabsId}-fixed`,
3676
- hidden: draft.continueMode !== "fixed",
3677
- children: draft.continueMode === "fixed" ? /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("label", {
3678
- className: "dsh-ui-field",
3679
- children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", {
3680
- className: "dsh-ui-label",
3681
- children: copy("continueTextLabel")
3682
- }), /* @__PURE__ */ (0, react_jsx_runtime.jsx)(_deepseek_ai_dsh_client_ui_primitives.Input, {
3683
- value: draft.continueText,
3684
- placeholder: copy("continueTextPlaceholder"),
3685
- onChange: (event) => edit({
3686
- ...draft,
3687
- continueText: event.target.value
3688
- })
3689
- })]
3690
- }) : null
3718
+ /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("header", {
3719
+ className: "dsm-setting-header",
3720
+ children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)("h3", {
3721
+ id: `${tabsId}-ghost-heading`,
3722
+ className: "dsh-ui-title",
3723
+ children: copy("settingsMode")
3724
+ }), /* @__PURE__ */ (0, react_jsx_runtime.jsx)("p", {
3725
+ className: "dsh-ui-hint",
3726
+ children: copy("settingsModeHint")
3727
+ })]
3691
3728
  }),
3692
- /* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", {
3693
- role: "tabpanel",
3694
- id: autoPanelId,
3695
- "aria-labelledby": `${tabsId}-auto`,
3696
- hidden: draft.continueMode !== "auto",
3697
- children: draft.continueMode === "auto" ? /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", {
3698
- className: "dsh-ui-field",
3699
- children: [
3700
- /* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", {
3729
+ /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", {
3730
+ className: "dsm-ghost-controls",
3731
+ children: [
3732
+ /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", {
3733
+ className: "dsh-ui-field",
3734
+ children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", {
3701
3735
  className: "dsh-ui-label",
3702
- children: copy("ghostModelLabel")
3703
- }),
3704
- /* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", { children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(ModelMenu, {
3705
- locale: props.locale,
3706
- open: ghostMenuOpen,
3707
- onOpenChange: setGhostMenuOpen,
3708
- listClassName: FREE_CHAT_ROOT,
3709
- anchor: /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("button", {
3710
- type: "button",
3711
- className: "dsh-model-menu-trigger",
3712
- "aria-label": `${copy("ghostModelLabel")}: ${ghostLabel}`,
3713
- "aria-haspopup": "menu",
3714
- "aria-expanded": ghostMenuOpen,
3715
- children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", {
3716
- className: "dsh-model-menu-triggerLabel",
3717
- children: ghostLabel
3718
- }), /* @__PURE__ */ (0, react_jsx_runtime.jsx)(_deepseek_ai_dsh_client_ui_primitives.IconChevronDownOutlineRegular, { className: `dsh-model-menu-chevron${ghostMenuOpen ? " dsh-model-menu-chevronOpen" : ""}` })]
3719
- }),
3720
- choices: selectableChoices,
3721
- selected: ghostRoute,
3722
- onPick: (route) => edit({
3723
- ...draft,
3724
- ghostModel: modelRouteKey(route.provider, route.model)
3725
- }),
3726
- leading: [{
3727
- id: "follow",
3728
- label: copy("modelFollowOption"),
3729
- selected: !ghostRoute
3736
+ children: copy("continueSourceLabel")
3737
+ }), /* @__PURE__ */ (0, react_jsx_runtime.jsx)(_deepseek_ai_dsh_client_ui_primitives.SegmentedTabs, {
3738
+ label: copy("continueSourceLabel"),
3739
+ items: [{
3740
+ id: `${tabsId}-fixed`,
3741
+ panelId: fixedPanelId,
3742
+ value: "fixed",
3743
+ label: copy("modeFixed")
3744
+ }, {
3745
+ id: `${tabsId}-auto`,
3746
+ panelId: autoPanelId,
3747
+ value: "auto",
3748
+ label: copy("modeAuto")
3730
3749
  }],
3731
- onPickLeading: () => edit({
3750
+ value: draft.continueMode,
3751
+ onChange: (value) => edit({
3732
3752
  ...draft,
3733
- ghostModel: ""
3734
- }),
3735
- modelValue: ghostLabel
3736
- }) }),
3737
- /* @__PURE__ */ (0, react_jsx_runtime.jsx)("p", {
3738
- className: "dsh-ui-hint",
3739
- children: copy("ghostModelHint")
3740
- })
3741
- ]
3742
- }) : null
3743
- })
3753
+ continueMode: value
3754
+ })
3755
+ })]
3756
+ }),
3757
+ /* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", {
3758
+ role: "tabpanel",
3759
+ id: fixedPanelId,
3760
+ "aria-labelledby": `${tabsId}-fixed`,
3761
+ hidden: draft.continueMode !== "fixed",
3762
+ children: draft.continueMode === "fixed" ? /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("label", {
3763
+ className: "dsh-ui-field",
3764
+ children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", {
3765
+ className: "dsh-ui-label",
3766
+ children: copy("continueTextLabel")
3767
+ }), /* @__PURE__ */ (0, react_jsx_runtime.jsx)(_deepseek_ai_dsh_client_ui_primitives.Input, {
3768
+ className: "dsm-ghost-input",
3769
+ value: draft.continueText,
3770
+ placeholder: copy("continueTextPlaceholder"),
3771
+ onChange: (event) => edit({
3772
+ ...draft,
3773
+ continueText: event.target.value
3774
+ })
3775
+ })]
3776
+ }) : null
3777
+ }),
3778
+ /* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", {
3779
+ role: "tabpanel",
3780
+ id: autoPanelId,
3781
+ "aria-labelledby": `${tabsId}-auto`,
3782
+ hidden: draft.continueMode !== "auto",
3783
+ children: draft.continueMode === "auto" ? /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", {
3784
+ className: "dsh-ui-field dsm-model-field",
3785
+ children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", {
3786
+ className: "dsh-ui-label",
3787
+ children: copy("ghostModelLabel")
3788
+ }), /* @__PURE__ */ (0, react_jsx_runtime.jsx)(ModelMenu, {
3789
+ locale: props.locale,
3790
+ open: ghostMenuOpen,
3791
+ onOpenChange: setGhostMenuOpen,
3792
+ listClassName: FREE_CHAT_ROOT,
3793
+ anchor: /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("button", {
3794
+ type: "button",
3795
+ className: "dsh-model-menu-trigger",
3796
+ "aria-label": `${copy("ghostModelLabel")}: ${ghostLabel}`,
3797
+ "aria-haspopup": "menu",
3798
+ "aria-expanded": ghostMenuOpen,
3799
+ children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", {
3800
+ className: "dsh-model-menu-triggerLabel",
3801
+ children: ghostLabel
3802
+ }), /* @__PURE__ */ (0, react_jsx_runtime.jsx)(_deepseek_ai_dsh_client_ui_primitives.IconChevronDownOutlineRegular, { className: `dsh-model-menu-chevron${ghostMenuOpen ? " dsh-model-menu-chevronOpen" : ""}` })]
3803
+ }),
3804
+ choices: selectableChoices,
3805
+ selected: ghostRoute,
3806
+ onPick: (route) => edit({
3807
+ ...draft,
3808
+ ghostModel: modelRouteKey(route.provider, route.model)
3809
+ }),
3810
+ leading: [{
3811
+ id: "follow",
3812
+ label: copy("modelFollowOption"),
3813
+ selected: !ghostRoute
3814
+ }],
3815
+ onPickLeading: () => edit({
3816
+ ...draft,
3817
+ ghostModel: ""
3818
+ }),
3819
+ modelValue: ghostLabel
3820
+ })]
3821
+ }) : null
3822
+ })
3823
+ ]
3824
+ }),
3825
+ draft.continueMode === "auto" ? /* @__PURE__ */ (0, react_jsx_runtime.jsx)("p", {
3826
+ className: "dsh-ui-hint",
3827
+ children: copy("ghostModelHint")
3828
+ }) : null
3744
3829
  ]
3745
- }),
3746
- /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("section", {
3747
- className: "dsh-ui-card",
3830
+ }), /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("section", {
3831
+ className: "dsm-setting",
3832
+ "aria-labelledby": `${tabsId}-return-heading`,
3748
3833
  children: [
3749
- /* @__PURE__ */ (0, react_jsx_runtime.jsx)("h3", {
3750
- className: "dsh-ui-heading",
3751
- children: copy("welcomeBackGroup")
3834
+ /* @__PURE__ */ (0, react_jsx_runtime.jsx)("header", {
3835
+ className: "dsm-setting-header",
3836
+ children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)("h3", {
3837
+ id: `${tabsId}-return-heading`,
3838
+ className: "dsh-ui-title",
3839
+ children: copy("welcomeBackGroup")
3840
+ })
3752
3841
  }),
3753
3842
  /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", {
3754
3843
  className: "dsm-feature",
@@ -3772,84 +3861,82 @@ function SessionManagerSettings(props) {
3772
3861
  })
3773
3862
  })]
3774
3863
  }), /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", {
3775
- className: "dsm-subs",
3864
+ className: "dsm-feature-options",
3776
3865
  "data-disabled": draft.recapEnabled ? void 0 : "true",
3777
- children: [
3778
- /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", { children: [/* @__PURE__ */ (0, react_jsx_runtime.jsxs)("label", {
3866
+ children: [/* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", {
3867
+ className: "dsh-ui-fields-grid",
3868
+ children: [/* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", { children: [/* @__PURE__ */ (0, react_jsx_runtime.jsxs)("label", {
3779
3869
  className: "dsh-ui-field",
3780
3870
  children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", {
3781
3871
  className: "dsh-ui-label",
3782
3872
  children: copy("recapMinutesLabel")
3783
- }), /* @__PURE__ */ (0, react_jsx_runtime.jsx)(_deepseek_ai_dsh_client_ui_primitives.Input, {
3784
- className: "dsm-minutes",
3785
- value: draft.recapMinutes,
3786
- inputMode: "numeric",
3787
- disabled: !draft.recapEnabled,
3788
- "aria-invalid": recapInvalid || void 0,
3789
- "aria-describedby": recapInvalid ? `${tabsId}-recap-error` : void 0,
3790
- onChange: (event) => edit({
3791
- ...draft,
3792
- recapMinutes: event.target.value
3793
- })
3873
+ }), /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("span", {
3874
+ className: "dsm-minutes-control",
3875
+ children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)(_deepseek_ai_dsh_client_ui_primitives.Input, {
3876
+ className: "dsm-minutes",
3877
+ value: draft.recapMinutes,
3878
+ inputMode: "numeric",
3879
+ disabled: !draft.recapEnabled,
3880
+ "aria-invalid": recapInvalid || void 0,
3881
+ "aria-describedby": recapInvalid ? `${tabsId}-recap-error` : void 0,
3882
+ onChange: (event) => edit({
3883
+ ...draft,
3884
+ recapMinutes: event.target.value
3885
+ })
3886
+ }), /* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", {
3887
+ className: "dsh-ui-meta",
3888
+ children: copy("minutesUnit")
3889
+ })]
3794
3890
  })]
3795
3891
  }), recapInvalid ? /* @__PURE__ */ (0, react_jsx_runtime.jsx)("p", {
3796
3892
  id: `${tabsId}-recap-error`,
3797
3893
  className: "dsh-ui-error",
3798
3894
  role: "alert",
3799
3895
  children: copy("minutesInvalid")
3800
- }) : null] }),
3801
- /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", {
3802
- className: "dsh-ui-field",
3803
- children: [
3804
- /* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", {
3805
- className: "dsh-ui-label",
3806
- children: copy("modelLabel")
3896
+ }) : null] }), /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", {
3897
+ className: "dsh-ui-field dsm-model-field",
3898
+ children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", {
3899
+ className: "dsh-ui-label",
3900
+ children: copy("modelLabel")
3901
+ }), /* @__PURE__ */ (0, react_jsx_runtime.jsx)(ModelMenu, {
3902
+ locale: props.locale,
3903
+ open: menuOpen,
3904
+ onOpenChange: setMenuOpen,
3905
+ listClassName: FREE_CHAT_ROOT,
3906
+ anchor: /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("button", {
3907
+ type: "button",
3908
+ className: "dsh-model-menu-trigger",
3909
+ disabled: !draft.recapEnabled,
3910
+ "aria-label": `${copy("modelLabel")}: ${selectedLabel}`,
3911
+ "aria-haspopup": "menu",
3912
+ "aria-expanded": menuOpen,
3913
+ children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", {
3914
+ className: "dsh-model-menu-triggerLabel",
3915
+ children: selectedLabel
3916
+ }), /* @__PURE__ */ (0, react_jsx_runtime.jsx)(_deepseek_ai_dsh_client_ui_primitives.IconChevronDownOutlineRegular, { className: `dsh-model-menu-chevron${menuOpen ? " dsh-model-menu-chevronOpen" : ""}` })]
3807
3917
  }),
3808
- /* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", { children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(ModelMenu, {
3809
- locale: props.locale,
3810
- open: menuOpen,
3811
- onOpenChange: setMenuOpen,
3812
- listClassName: FREE_CHAT_ROOT,
3813
- anchor: /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("button", {
3814
- type: "button",
3815
- className: "dsh-model-menu-trigger",
3816
- disabled: !draft.recapEnabled,
3817
- "aria-label": `${copy("modelLabel")}: ${selectedLabel}`,
3818
- "aria-haspopup": "menu",
3819
- "aria-expanded": menuOpen,
3820
- children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", {
3821
- className: "dsh-model-menu-triggerLabel",
3822
- children: selectedLabel
3823
- }), /* @__PURE__ */ (0, react_jsx_runtime.jsx)(_deepseek_ai_dsh_client_ui_primitives.IconChevronDownOutlineRegular, { className: `dsh-model-menu-chevron${menuOpen ? " dsh-model-menu-chevronOpen" : ""}` })]
3824
- }),
3825
- choices: selectableChoices,
3826
- selected: selectedRoute,
3827
- onPick: (route) => edit({
3828
- ...draft,
3829
- model: modelRouteKey(route.provider, route.model)
3830
- }),
3831
- leading: [{
3832
- id: "follow",
3833
- label: copy("modelFollowOption"),
3834
- selected: !selectedRoute
3835
- }],
3836
- onPickLeading: () => edit({
3837
- ...draft,
3838
- model: ""
3839
- }),
3840
- modelValue: selectedLabel
3841
- }) }),
3842
- /* @__PURE__ */ (0, react_jsx_runtime.jsx)("p", {
3843
- className: "dsh-ui-hint",
3844
- children: copy("modelGroupHint")
3845
- })
3846
- ]
3847
- }),
3848
- /* @__PURE__ */ (0, react_jsx_runtime.jsx)(ModelCatalogStatus, {
3849
- state: catalog,
3850
- locale: props.locale
3851
- })
3852
- ]
3918
+ choices: selectableChoices,
3919
+ selected: selectedRoute,
3920
+ onPick: (route) => edit({
3921
+ ...draft,
3922
+ model: modelRouteKey(route.provider, route.model)
3923
+ }),
3924
+ leading: [{
3925
+ id: "follow",
3926
+ label: copy("modelFollowOption"),
3927
+ selected: !selectedRoute
3928
+ }],
3929
+ onPickLeading: () => edit({
3930
+ ...draft,
3931
+ model: ""
3932
+ }),
3933
+ modelValue: selectedLabel
3934
+ })]
3935
+ })]
3936
+ }), /* @__PURE__ */ (0, react_jsx_runtime.jsx)(ModelCatalogStatus, {
3937
+ state: catalog,
3938
+ locale: props.locale
3939
+ })]
3853
3940
  })]
3854
3941
  }),
3855
3942
  /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", {
@@ -3874,24 +3961,30 @@ function SessionManagerSettings(props) {
3874
3961
  })
3875
3962
  })]
3876
3963
  }), /* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", {
3877
- className: "dsm-subs",
3964
+ className: "dsm-feature-options dsm-compact-options",
3878
3965
  "data-disabled": draft.compactEnabled ? void 0 : "true",
3879
3966
  children: /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", { children: [/* @__PURE__ */ (0, react_jsx_runtime.jsxs)("label", {
3880
3967
  className: "dsh-ui-field",
3881
3968
  children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", {
3882
3969
  className: "dsh-ui-label",
3883
3970
  children: copy("compactMinutesLabel")
3884
- }), /* @__PURE__ */ (0, react_jsx_runtime.jsx)(_deepseek_ai_dsh_client_ui_primitives.Input, {
3885
- className: "dsm-minutes",
3886
- value: draft.compactMinutes,
3887
- inputMode: "numeric",
3888
- disabled: !draft.compactEnabled,
3889
- "aria-invalid": compactInvalid || void 0,
3890
- "aria-describedby": compactInvalid ? `${tabsId}-compact-error` : void 0,
3891
- onChange: (event) => edit({
3892
- ...draft,
3893
- compactMinutes: event.target.value
3894
- })
3971
+ }), /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("span", {
3972
+ className: "dsm-minutes-control",
3973
+ children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)(_deepseek_ai_dsh_client_ui_primitives.Input, {
3974
+ className: "dsm-minutes",
3975
+ value: draft.compactMinutes,
3976
+ inputMode: "numeric",
3977
+ disabled: !draft.compactEnabled,
3978
+ "aria-invalid": compactInvalid || void 0,
3979
+ "aria-describedby": compactInvalid ? `${tabsId}-compact-error` : void 0,
3980
+ onChange: (event) => edit({
3981
+ ...draft,
3982
+ compactMinutes: event.target.value
3983
+ })
3984
+ }), /* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", {
3985
+ className: "dsh-ui-meta",
3986
+ children: copy("minutesUnit")
3987
+ })]
3895
3988
  })]
3896
3989
  }), compactInvalid ? /* @__PURE__ */ (0, react_jsx_runtime.jsx)("p", {
3897
3990
  id: `${tabsId}-compact-error`,
@@ -3902,34 +3995,33 @@ function SessionManagerSettings(props) {
3902
3995
  })]
3903
3996
  })
3904
3997
  ]
3905
- }),
3906
- /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", {
3907
- className: "dsh-ui-form-footer",
3908
- children: [
3909
- /* @__PURE__ */ (0, react_jsx_runtime.jsx)(_deepseek_ai_dsh_client_ui_primitives.Button, {
3910
- variant: "primary",
3911
- disabled: invalid || snapshot.saving,
3912
- onClick: save,
3913
- children: snapshot.saving ? copy("settingsSaving") : copy("saveSettings")
3914
- }),
3915
- snapshot.saved ? /* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", {
3916
- className: "dsh-ui-notice",
3917
- role: "status",
3918
- children: copy("settingsSaved")
3919
- }) : null,
3920
- externalChange ? /* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", {
3921
- className: "dsh-ui-notice dsh-ui-notice--error",
3922
- role: "alert",
3923
- children: copy("externalChange")
3924
- }) : null,
3925
- snapshot.failure ? /* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", {
3926
- className: "dsh-ui-notice dsh-ui-notice--error",
3927
- role: "alert",
3928
- children: failureText(props.locale, snapshot.failure)
3929
- }) : null
3930
- ]
3931
- })
3932
- ]
3998
+ })]
3999
+ }), /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", {
4000
+ className: "dsh-ui-form-footer dsm-settings-footer",
4001
+ children: [
4002
+ /* @__PURE__ */ (0, react_jsx_runtime.jsx)(_deepseek_ai_dsh_client_ui_primitives.Button, {
4003
+ variant: "primary",
4004
+ disabled: invalid || snapshot.saving,
4005
+ onClick: save,
4006
+ children: snapshot.saving ? copy("settingsSaving") : copy("saveSettings")
4007
+ }),
4008
+ snapshot.saved ? /* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", {
4009
+ className: "dsh-ui-notice",
4010
+ role: "status",
4011
+ children: copy("settingsSaved")
4012
+ }) : null,
4013
+ externalChange ? /* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", {
4014
+ className: "dsh-ui-notice dsh-ui-notice--error",
4015
+ role: "alert",
4016
+ children: copy("externalChange")
4017
+ }) : null,
4018
+ snapshot.failure ? /* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", {
4019
+ className: "dsh-ui-notice dsh-ui-notice--error",
4020
+ role: "alert",
4021
+ children: failureText(props.locale, snapshot.failure)
4022
+ }) : null
4023
+ ]
4024
+ })]
3933
4025
  });
3934
4026
  }
3935
4027
  //#endregion