dsh-edge 0.32.0 → 0.33.0

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.
@@ -14548,6 +14548,20 @@ window.__ModuleLoader__.load({
14548
14548
  * literal one in text would forge chip positions.
14549
14549
  */
14550
14550
  const REFERENCE_PLACEHOLDER_RE = /[\uE100-\uE11D\uFFFC]/gu;
14551
+ /**
14552
+ * Append one paragraph per line of `text` to the editor root and move the caret
14553
+ * to the end. Must run inside an editor update.
14554
+ * @param text - sanitized plain text.
14555
+ */
14556
+ function $appendParagraphs(text) {
14557
+ const root = nl();
14558
+ for (const line of text.split("\n")) {
14559
+ const paragraph = es();
14560
+ if (line !== "") paragraph.append(Go(line));
14561
+ root.append(paragraph);
14562
+ }
14563
+ root.selectEnd();
14564
+ }
14551
14565
  /** Undo merge window for contiguous typing, in ms (the old machine's mergeWindowMs). */
14552
14566
  const HISTORY_MERGE_DELAY_MS = 1e3;
14553
14567
  /** One model-owned editor; registration and disposal remain with its model. */
@@ -14673,14 +14687,29 @@ window.__ModuleLoader__.load({
14673
14687
  const clean = text.replace(REFERENCE_PLACEHOLDER_RE, "");
14674
14688
  if (clean === this.projection.clipboardText && this.projection.occurrences.length === 0) return;
14675
14689
  this.editor.update(() => {
14676
- const root = nl();
14677
- root.clear();
14678
- for (const line of clean.split("\n")) {
14679
- const paragraph = es();
14680
- if (line !== "") paragraph.append(Go(line));
14681
- root.append(paragraph);
14682
- }
14683
- root.selectEnd();
14690
+ nl().clear();
14691
+ $appendParagraphs(clean);
14692
+ }, {
14693
+ discrete: true,
14694
+ tag: xo
14695
+ });
14696
+ }
14697
+ /**
14698
+ * Add plain text after the current draft as new paragraphs, keeping its text
14699
+ * and references; an empty draft takes the text as its whole content.
14700
+ * Placeholder-sanitized; the caret lands at the end; merged into history
14701
+ * like {@link setDraft}.
14702
+ * @param text - plain text to add.
14703
+ */
14704
+ appendDraft(text) {
14705
+ const clean = text.replace(REFERENCE_PLACEHOLDER_RE, "");
14706
+ if (clean === "") return;
14707
+ if (this.projection.clipboardText === "" && this.projection.occurrences.length === 0) {
14708
+ this.setDraft(clean);
14709
+ return;
14710
+ }
14711
+ this.editor.update(() => {
14712
+ $appendParagraphs(clean);
14684
14713
  }, {
14685
14714
  discrete: true,
14686
14715
  tag: xo
@@ -15074,15 +15103,24 @@ window.__ModuleLoader__.load({
15074
15103
  }
15075
15104
  /**
15076
15105
  * Apply one new-task request to this already-initialized input model.
15077
- * @param options - replacement content and explicit permission to clear existing text.
15106
+ * @param options - content to adopt and the handling of an existing draft.
15078
15107
  * @returns applied when the requested text is adopted, even if unchanged;
15079
15108
  * preserved when the current draft is kept; blocked after disposal or during a pending submission.
15080
15109
  */
15081
15110
  requestDraftInitialization(options) {
15082
15111
  if (this.draftInitializationBlocked()) return "blocked";
15083
- if (options.prompt === void 0 && options.clearPreviousDraft !== true) return "preserved";
15084
- if (options.clearPreviousDraft !== true && (this.snapshot.draft !== "" || this.attachmentIds.length > 0)) return "preserved";
15085
- this.setDraft(options.prompt ?? "");
15112
+ const whenDraftExists = options.whenDraftExists ?? (options.clearPreviousDraft === true ? "replace" : "keep");
15113
+ if (whenDraftExists === "replace") {
15114
+ this.setDraft(options.prompt ?? "");
15115
+ return "applied";
15116
+ }
15117
+ if (options.prompt === void 0) return "preserved";
15118
+ if (this.snapshot.draft === "" && this.attachmentIds.length === 0) {
15119
+ this.setDraft(options.prompt);
15120
+ return "applied";
15121
+ }
15122
+ if (whenDraftExists === "keep") return "preserved";
15123
+ this.draftEditor.appendDraft(options.prompt);
15086
15124
  return "applied";
15087
15125
  }
15088
15126
  draftInitializationBlocked() {
@@ -15698,6 +15736,20 @@ window.__ModuleLoader__.load({
15698
15736
  //#endregion
15699
15737
  //#region lib/types/client/input/submission-analytics.js
15700
15738
  /**
15739
+ * Map a preset id to its fixed analytics category; custom ids never leave the Client.
15740
+ * @param id - Agent preset id the Session records.
15741
+ * @returns the built-in category, or other.
15742
+ */
15743
+ function analyticsPreset(id) {
15744
+ switch (id) {
15745
+ case "cordis": return "creator";
15746
+ case "ptc": return "ptc";
15747
+ case "minimal": return "minimal";
15748
+ case "standard": return "standard";
15749
+ default: return "other";
15750
+ }
15751
+ }
15752
+ /**
15701
15753
  * Report the original message occurrence without reading newer Session facts.
15702
15754
  * @param ctx - client context.
15703
15755
  * @param submission - original occurrence and Session snapshot.
@@ -15713,7 +15765,9 @@ window.__ModuleLoader__.load({
15713
15765
  ...model.effort === void 0 ? {} : { thinking_effort: model.effort }
15714
15766
  },
15715
15767
  run_mode: state.runMode,
15716
- msg_type: state.running ? mode : "default"
15768
+ msg_type: state.running ? mode : "default",
15769
+ is_new_session: state.newSession,
15770
+ ...state.agentPreset === void 0 ? {} : { agent_preset: analyticsPreset(state.agentPreset) }
15717
15771
  }, timestamp);
15718
15772
  }
15719
15773
  //#endregion
@@ -15765,6 +15819,7 @@ window.__ModuleLoader__.load({
15765
15819
  const model = session.projections.faceOf("modelSelection").getSnapshot();
15766
15820
  const plan = session.projections.faceOf("plan").getSnapshot();
15767
15821
  const goal = session.projections.faceOf("goal").getSnapshot();
15822
+ const agentPreset = session.projections.faceOf("agentPreset").getSnapshot();
15768
15823
  const selection = model?.next ?? model?.lastUsed;
15769
15824
  return Object.freeze({
15770
15825
  ...state.blank ? {} : { sessionId: state.sessionId },
@@ -15774,7 +15829,9 @@ window.__ModuleLoader__.load({
15774
15829
  ...selection.reasoningEffort === void 0 ? {} : { effort: selection.reasoningEffort }
15775
15830
  }) },
15776
15831
  runMode: plan?.active ? "plan" : goal?.goal.phase === "active" ? "goal" : "default",
15777
- running: state.running
15832
+ running: state.running,
15833
+ newSession: state.blank,
15834
+ ...typeof agentPreset === "string" ? { agentPreset } : {}
15778
15835
  });
15779
15836
  },
15780
15837
  messageSubmitted: (submission) => {
@@ -16087,6 +16144,8 @@ window.__ModuleLoader__.load({
16087
16144
  "hero.preview": "预览版",
16088
16145
  "hero.chooseWorkspace": "选择工作区",
16089
16146
  "session.hierarchy": "会话层级",
16147
+ "session.moreViews": "更多会话视图",
16148
+ "session.moreViewsCurrent": "更多会话视图 · {name}",
16090
16149
  "todo.title": "任务",
16091
16150
  "todo.progress.done": "{done} 已完成",
16092
16151
  "todo.progress.active": "{active} 进行中",
@@ -16463,6 +16522,8 @@ window.__ModuleLoader__.load({
16463
16522
  "hero.preview": "Preview",
16464
16523
  "hero.chooseWorkspace": "Choose workspace",
16465
16524
  "session.hierarchy": "Session hierarchy",
16525
+ "session.moreViews": "More conversation views",
16526
+ "session.moreViewsCurrent": "More conversation views · {name}",
16466
16527
  "todo.title": "To-dos",
16467
16528
  "todo.progress.done": "{done} completed",
16468
16529
  "todo.progress.active": "{active} in progress",
@@ -17322,7 +17383,7 @@ window.__ModuleLoader__.load({
17322
17383
  }
17323
17384
  //#endregion
17324
17385
  //#region \0dsh-css:/home/runner/work/deepseek-harness/deepseek-harness/packages/client/ui-conversation/src/client/skeleton/ConversationRoot.module.css.mjs
17325
- const css$4 = ".wSkVaW_root{background:var(--dsw-alias-bg-base);flex-direction:column;min-width:0;height:100%;display:flex;position:relative}.wSkVaW_header{box-sizing:border-box;border-bottom:.5px solid var(--dsw-alias-border-l3);flex:none;grid-template-columns:auto minmax(0,1fr);min-height:76px;padding:10px 28px 0 20px;display:grid}.wSkVaW_header:where(:not(:has(.wSkVaW_tabs))){min-height:0;padding-bottom:10px}.wSkVaW_headerBlank{border-bottom:none;min-height:0;padding-bottom:0}.wSkVaW_headerBlank .wSkVaW_headerCorner{margin-left:auto}html:not([data-platform=darwin]) .wSkVaW_headerSessionless{padding-top:0}html:not([data-platform=darwin]) .wSkVaW_headerSessionless .wSkVaW_titleRow{min-height:0}[data-platform=darwin] .wSkVaW_headerLeading,[data-platform=darwin] .wSkVaW_headerActions,[data-platform=darwin] .wSkVaW_headerUtilities,[data-platform=darwin] .wSkVaW_headerCorner{-webkit-app-region:no-drag}.wSkVaW_titleRow{min-height:30px;grid-column:2;align-items:center;gap:0;padding-inline-start:max(0px, calc(var(--dsh-frame-leading-clearance,0px) - 20px));display:flex;container-type:inline-size}.wSkVaW_titleCluster{flex:1;align-items:center;gap:10px;min-width:0;display:flex}.wSkVaW_headerLeading{flex:none;grid-area:1/1;align-items:center;gap:8px;display:flex}.wSkVaW_crumbs{white-space:nowrap;align-items:center;gap:4px;min-width:0;display:flex;overflow:hidden}.wSkVaW_crumbSeg{align-items:center;gap:4px;min-width:0;display:inline-flex}.wSkVaW_crumbSep{color:var(--dsw-alias-label-caption);font-size:14px;line-height:20px}.wSkVaW_crumb{border-radius:var(--dsw-radius-md);max-width:220px;color:var(--dsw-alias-label-tertiary);text-overflow:ellipsis;white-space:nowrap;cursor:pointer;background:0 0;border:none;padding:4px 8px;font-size:14px;line-height:20px;display:inline-block;overflow:hidden}.wSkVaW_crumbSubagent{font-size:12px;line-height:18px}button.wSkVaW_crumb:hover{background:var(--dsw-alias-interactive-bg-hover)}.wSkVaW_crumbCurrent{color:var(--dsw-alias-label-primary);cursor:default;font-weight:500}.wSkVaW_headerActions{flex:none;align-items:center;gap:8px;display:flex}.wSkVaW_headerUtilities{flex:none;align-items:center;gap:8px;margin-left:20px;display:flex}.wSkVaW_headerUtilities:empty{display:none}.wSkVaW_headerCorner{flex:none;align-items:center;margin-left:8px;margin-right:-16px;display:flex}.wSkVaW_headerCorner:empty{display:none}.wSkVaW_tabs{z-index:1;grid-column:1/-1;gap:36px;margin-top:10px;padding-left:8px;display:flex;position:relative}.wSkVaW_tab{color:var(--dsw-alias-label-tertiary);cursor:pointer;background:0 0;border:none;padding:0 0 9px;font-size:13px;font-weight:500;line-height:16px;position:relative}.wSkVaW_tab:after{content:\"\";background:0 0;border-radius:2px;height:2px;position:absolute;bottom:-1px;left:0;right:0}.wSkVaW_tabActive{color:var(--dsw-alias-state-business-primary)}.wSkVaW_tabActive:after{background:var(--dsw-alias-state-business-primary)}.wSkVaW_viewArea{flex-direction:column;flex:1;min-height:0;display:flex}.wSkVaW_widthHandle{z-index:0;width:min(10px, calc((100% - var(--dsh-chat-content-width)) / 2 - 24px - 24px));cursor:col-resize;position:absolute;top:0;bottom:0}.wSkVaW_widthHandle[data-side=left]{right:calc(50% + var(--dsh-chat-content-width) / 2 + 24px)}.wSkVaW_widthHandle[data-side=right]{left:calc(50% + var(--dsh-chat-content-width) / 2 + 24px)}.wSkVaW_widthHandle:after{content:\"\";background:linear-gradient(to bottom, transparent calc(var(--dsh-width-handle-pointer-y,50%) - 36px), var(--dsw-alias-scrollbar-bg-l1) calc(var(--dsh-width-handle-pointer-y,50%) - 8px), var(--dsw-alias-scrollbar-bg-l1) calc(var(--dsh-width-handle-pointer-y,50%) + 8px), transparent calc(var(--dsh-width-handle-pointer-y,50%) + 36px));opacity:0;pointer-events:none;border-radius:2px;width:2px;position:absolute;top:0;bottom:0}.wSkVaW_widthHandle[data-side=left]:after{right:4px}.wSkVaW_widthHandle[data-side=right]:after{left:4px}.wSkVaW_widthHandle:hover:after,.wSkVaW_widthHandle[data-dragging]:after{opacity:1}.wSkVaW_widthHandle[data-dragging]{z-index:8}.wSkVaW_root:has([data-conversation-composer-overlay]) .wSkVaW_widthHandle{display:none}.wSkVaW_composerStack{--dsh-composer-stack-gap:6px;gap:var(--dsh-composer-stack-gap);flex-direction:column;display:flex}.wSkVaW_composerSeat{--dsh-composer-text-max-height:336px;flex-direction:column;flex:none;display:flex}.wSkVaW_root[data-phase=active]{overflow:hidden}.wSkVaW_root[data-phase=active] .wSkVaW_header{flex:none}.wSkVaW_body{--dsh-chat-content-width:var(--dsh-chat-user-width,clamp(680px, calc(var(--dsh-conversation-column-width,0px) * .64), 920px));--dsh-composer-card-max-width:calc(var(--dsh-chat-content-width) + 32px);--dsh-composer-side-clearance:16px;--dsh-composer-dock-inset:8px;flex-direction:column;flex:1;min-height:0;display:flex;position:relative}.wSkVaW_embeddedBody{--dsh-chat-content-width:min(calc(100% - 32px), 920px);--dsh-composer-card-max-width:min(calc(100% - 16px), 952px);--dsh-composer-side-clearance:8px;--dsh-composer-dock-inset:8px;overflow:hidden}.wSkVaW_scrollBody{scrollbar-gutter:stable;flex-direction:column;flex:1;min-height:0;margin-right:2px;display:flex;overflow-y:auto}.wSkVaW_scrollBody::-webkit-scrollbar-track{margin:2px}.wSkVaW_root[data-phase=active] .wSkVaW_viewArea,.wSkVaW_embeddedBody[data-content-phase=active] .wSkVaW_viewArea{flex:1 0 auto;min-height:auto}.wSkVaW_root[data-phase=active] .wSkVaW_composerSeat,.wSkVaW_embeddedBody[data-content-phase=active] .wSkVaW_composerSeat{z-index:7;background:linear-gradient(180deg, color-mix(in srgb, var(--dsw-alias-bg-base) 0%, transparent) 0px, var(--dsw-alias-bg-base) 36px);position:sticky;bottom:0}.wSkVaW_root[data-phase=active] .wSkVaW_composerSeat:has([data-trigger-menu]){z-index:9}.wSkVaW_scrollBody:has([data-conversation-composer-overlay]){scrollbar-gutter:auto;position:relative;overflow:hidden auto}.wSkVaW_scrollBody:has([data-conversation-composer-overlay])>[data-slot=conversation\\.session]>.wSkVaW_viewArea{flex:1 1 0;min-height:0;overflow:hidden}.wSkVaW_scrollBody:has([data-conversation-composer-overlay])>.wSkVaW_composerSeat{right:var(--dsh-scrollbar-width);position:absolute;bottom:0;left:0}.wSkVaW_composerHero{width:min(calc(var(--dsh-composer-card-max-width) + 2 * var(--dsh-composer-side-clearance)), 100%);z-index:1;align-self:center;gap:8px;padding-bottom:32px}.wSkVaW_heroWorkspaceRow{align-items:center;gap:2px;min-width:0;margin-top:4px;padding:0 16px 0 20px;display:flex}.wSkVaW_heroOptions{flex:none;align-items:center;gap:2px;min-width:0;margin-left:auto;display:flex}.wSkVaW_heroOptions:empty{display:none}.wSkVaW_root[data-phase=hero] .wSkVaW_scrollBody,.wSkVaW_embeddedBody[data-content-phase=hero] .wSkVaW_scrollBody{justify-content:center;overflow-y:auto}.wSkVaW_root[data-phase=settling] .wSkVaW_composerSeat,.wSkVaW_embeddedBody[data-content-phase=settling] .wSkVaW_composerSeat{visibility:hidden}";
17386
+ const css$4 = ".wSkVaW_root{background:var(--dsw-alias-bg-base);flex-direction:column;min-width:0;height:100%;display:flex;position:relative}.wSkVaW_header{box-sizing:border-box;border-bottom:.5px solid var(--dsw-alias-border-l3);flex:none;grid-template-columns:auto minmax(0,1fr);min-height:76px;padding:10px 28px 0 20px;display:grid}.wSkVaW_header:where(:not(:has(.wSkVaW_tabs))){min-height:0;padding-bottom:10px}.wSkVaW_headerBlank{border-bottom:none;min-height:0;padding-bottom:0}.wSkVaW_headerBlank .wSkVaW_headerCorner{margin-left:auto}html:not([data-platform=darwin]) .wSkVaW_headerSessionless{padding-top:0}html:not([data-platform=darwin]) .wSkVaW_headerSessionless .wSkVaW_titleRow{min-height:0}[data-platform=darwin] .wSkVaW_headerLeading,[data-platform=darwin] .wSkVaW_headerActions,[data-platform=darwin] .wSkVaW_headerUtilities,[data-platform=darwin] .wSkVaW_headerCorner{-webkit-app-region:no-drag}.wSkVaW_titleRow{min-height:30px;grid-column:2;align-items:center;gap:0;padding-inline-start:max(0px, calc(var(--dsh-frame-leading-clearance,0px) - 20px));display:flex;container-type:inline-size}.wSkVaW_titleCluster{flex:1;align-items:center;gap:10px;min-width:0;display:flex}.wSkVaW_headerLeading{flex:none;grid-area:1/1;align-items:center;gap:8px;display:flex}.wSkVaW_crumbs{white-space:nowrap;align-items:center;gap:4px;min-width:0;display:flex;overflow:hidden}.wSkVaW_crumbSeg{align-items:center;gap:4px;min-width:0;display:inline-flex}.wSkVaW_crumbSep{color:var(--dsw-alias-label-caption);font-size:14px;line-height:20px}.wSkVaW_crumb{border-radius:var(--dsw-radius-md);max-width:220px;color:var(--dsw-alias-label-tertiary);text-overflow:ellipsis;white-space:nowrap;cursor:pointer;background:0 0;border:none;padding:4px 8px;font-size:14px;line-height:20px;display:inline-block;overflow:hidden}.wSkVaW_crumbSubagent{font-size:12px;line-height:18px}button.wSkVaW_crumb:hover{background:var(--dsw-alias-interactive-bg-hover)}.wSkVaW_crumbCurrent{color:var(--dsw-alias-label-primary);cursor:default;font-weight:500}.wSkVaW_headerActions{flex:none;align-items:center;gap:8px;display:flex}.wSkVaW_headerUtilities{flex:none;align-items:center;gap:8px;margin-left:20px;display:flex}.wSkVaW_headerUtilities:empty{display:none}.wSkVaW_headerCorner{flex:none;align-items:center;margin-left:8px;margin-right:-16px;display:flex}.wSkVaW_headerCorner:empty{display:none}.wSkVaW_tabs{z-index:1;box-sizing:border-box;flex-wrap:wrap;grid-column:1/-1;align-items:flex-start;gap:16px 20px;width:100%;min-width:0;margin-top:10px;padding-left:8px;display:flex;position:relative}.wSkVaW_viewTabs{flex-wrap:wrap;gap:32px;min-width:0;min-height:25px;display:flex}.wSkVaW_tab{min-height:25px;color:var(--dsw-alias-label-tertiary);cursor:pointer;background:0 0;border:none;padding:0 0 9px;font-size:13px;font-weight:500;line-height:16px;position:relative}.wSkVaW_tab:after{content:\"\";background:0 0;border-radius:2px;height:2px;position:absolute;bottom:-1px;left:0;right:0}.wSkVaW_tabActive{color:var(--dsw-alias-state-business-primary)}.wSkVaW_tabActive:after{background:var(--dsw-alias-state-business-primary)}.wSkVaW_viewsMoreAnchor{flex:none}.wSkVaW_viewsMore{width:22px;height:22px;color:var(--dsw-alias-label-secondary);margin-top:-3px;padding:0}.wSkVaW_viewsMoreActive{color:var(--dsw-alias-state-business-primary)}.wSkVaW_tabLabel{text-overflow:ellipsis;white-space:nowrap;max-width:88px;display:block;overflow:hidden}.wSkVaW_viewsMore[aria-expanded=true]{background:var(--dsw-alias-interactive-bg-hover)}.wSkVaW_viewsMoreMenu{width:288px;max-width:calc(100vw - 24px)}.wSkVaW_viewArea{flex-direction:column;flex:1;min-height:0;display:flex}.wSkVaW_widthHandle{z-index:0;width:min(10px, calc((100% - var(--dsh-chat-content-width)) / 2 - 24px - 24px));cursor:col-resize;position:absolute;top:0;bottom:0}.wSkVaW_widthHandle[data-side=left]{right:calc(50% + var(--dsh-chat-content-width) / 2 + 24px)}.wSkVaW_widthHandle[data-side=right]{left:calc(50% + var(--dsh-chat-content-width) / 2 + 24px)}.wSkVaW_widthHandle:after{content:\"\";background:linear-gradient(to bottom, transparent calc(var(--dsh-width-handle-pointer-y,50%) - 36px), var(--dsw-alias-scrollbar-bg-l1) calc(var(--dsh-width-handle-pointer-y,50%) - 8px), var(--dsw-alias-scrollbar-bg-l1) calc(var(--dsh-width-handle-pointer-y,50%) + 8px), transparent calc(var(--dsh-width-handle-pointer-y,50%) + 36px));opacity:0;pointer-events:none;border-radius:2px;width:2px;position:absolute;top:0;bottom:0}.wSkVaW_widthHandle[data-side=left]:after{right:4px}.wSkVaW_widthHandle[data-side=right]:after{left:4px}.wSkVaW_widthHandle:hover:after,.wSkVaW_widthHandle[data-dragging]:after{opacity:1}.wSkVaW_widthHandle[data-dragging]{z-index:8}.wSkVaW_root:has([data-conversation-composer-overlay]) .wSkVaW_widthHandle{display:none}.wSkVaW_composerStack{--dsh-composer-stack-gap:6px;gap:var(--dsh-composer-stack-gap);flex-direction:column;display:flex}.wSkVaW_composerSeat{--dsh-composer-text-max-height:336px;flex-direction:column;flex:none;display:flex}.wSkVaW_root[data-phase=active]{overflow:hidden}.wSkVaW_root[data-phase=active] .wSkVaW_header{flex:none}.wSkVaW_body{--dsh-chat-content-width:var(--dsh-chat-user-width,clamp(680px, calc(var(--dsh-conversation-column-width,0px) * .64), 920px));--dsh-composer-card-max-width:calc(var(--dsh-chat-content-width) + 32px);--dsh-composer-side-clearance:16px;--dsh-composer-dock-inset:8px;flex-direction:column;flex:1;min-height:0;display:flex;position:relative}.wSkVaW_embeddedBody{--dsh-chat-content-width:min(calc(100% - 32px), 920px);--dsh-composer-card-max-width:min(calc(100% - 16px), 952px);--dsh-composer-side-clearance:8px;--dsh-composer-dock-inset:8px;overflow:hidden}.wSkVaW_scrollBody{scrollbar-gutter:stable;flex-direction:column;flex:1;min-height:0;margin-right:2px;display:flex;overflow-y:auto}.wSkVaW_scrollBody::-webkit-scrollbar-track{margin:2px}.wSkVaW_root[data-phase=active] .wSkVaW_viewArea,.wSkVaW_embeddedBody[data-content-phase=active] .wSkVaW_viewArea{flex:1 0 auto;min-height:auto}.wSkVaW_root[data-phase=active] .wSkVaW_composerSeat,.wSkVaW_embeddedBody[data-content-phase=active] .wSkVaW_composerSeat{z-index:7;background:linear-gradient(180deg, color-mix(in srgb, var(--dsw-alias-bg-base) 0%, transparent) 0px, var(--dsw-alias-bg-base) 36px);position:sticky;bottom:0}.wSkVaW_root[data-phase=active] .wSkVaW_composerSeat:has([data-trigger-menu]){z-index:9}.wSkVaW_scrollBody:has([data-conversation-composer-overlay]){scrollbar-gutter:auto;position:relative;overflow:hidden auto}.wSkVaW_scrollBody:has([data-conversation-composer-overlay])>[data-slot=conversation\\.session]>.wSkVaW_viewArea{flex:1 1 0;min-height:0;overflow:hidden}.wSkVaW_scrollBody:has([data-conversation-composer-overlay])>.wSkVaW_composerSeat{right:var(--dsh-scrollbar-width);position:absolute;bottom:0;left:0}.wSkVaW_composerHero{width:min(calc(var(--dsh-composer-card-max-width) + 2 * var(--dsh-composer-side-clearance)), 100%);z-index:1;align-self:center;gap:8px;padding-bottom:32px}.wSkVaW_heroWorkspaceRow{align-items:center;gap:2px;min-width:0;margin-top:4px;padding:0 16px 0 20px;display:flex}.wSkVaW_heroOptions{flex:none;align-items:center;gap:2px;min-width:0;margin-left:auto;display:flex}.wSkVaW_heroOptions:empty{display:none}.wSkVaW_root[data-phase=hero] .wSkVaW_scrollBody,.wSkVaW_embeddedBody[data-content-phase=hero] .wSkVaW_scrollBody{justify-content:center;overflow-y:auto}.wSkVaW_root[data-phase=settling] .wSkVaW_composerSeat,.wSkVaW_embeddedBody[data-content-phase=settling] .wSkVaW_composerSeat{visibility:hidden}";
17326
17387
  const tagId$4 = "@deepseek-ai/dsh-client-ui-conversation/ConversationRoot.module.css";
17327
17388
  if (typeof document !== "undefined" && document.querySelector("style[data-plugin-css=" + JSON.stringify(tagId$4) + "]") === null) {
17328
17389
  const tag = document.createElement("style");
@@ -17356,10 +17417,16 @@ window.__ModuleLoader__.load({
17356
17417
  "scrollBody": "wSkVaW_scrollBody",
17357
17418
  "tab": "wSkVaW_tab",
17358
17419
  "tabActive": "wSkVaW_tabActive",
17420
+ "tabLabel": "wSkVaW_tabLabel",
17359
17421
  "tabs": "wSkVaW_tabs",
17360
17422
  "titleCluster": "wSkVaW_titleCluster",
17361
17423
  "titleRow": "wSkVaW_titleRow",
17362
17424
  "viewArea": "wSkVaW_viewArea",
17425
+ "viewTabs": "wSkVaW_viewTabs",
17426
+ "viewsMore": "wSkVaW_viewsMore",
17427
+ "viewsMoreActive": "wSkVaW_viewsMoreActive",
17428
+ "viewsMoreAnchor": "wSkVaW_viewsMoreAnchor",
17429
+ "viewsMoreMenu": "wSkVaW_viewsMoreMenu",
17363
17430
  "widthHandle": "wSkVaW_widthHandle"
17364
17431
  };
17365
17432
  //#endregion
@@ -17918,6 +17985,30 @@ window.__ModuleLoader__.load({
17918
17985
  return (selectedId === null ? void 0 : tabs.find((view) => view.id === selectedId)) ?? tabs.find((view) => view.id === "chat");
17919
17986
  }
17920
17987
  //#endregion
17988
+ //#region lib/types/client/view-pins.js
17989
+ /** In-memory pin choices for the Conversation View tabs. */
17990
+ /** View whose tab always shows and never enters the customization list. */
17991
+ const FIXED_VIEW_ID = "chat";
17992
+ const NO_VIEWS = [];
17993
+ /**
17994
+ * Create the in-memory View pin list; the snapshot keeps its reference until the list changes.
17995
+ * @returns Unpinned View ids and the pin mutation.
17996
+ */
17997
+ function createViewPins() {
17998
+ const store = (0, _deepseek_ai_dsh_client_store.createSnapshotStore)({ unpinned: NO_VIEWS });
17999
+ return {
18000
+ unpinned: {
18001
+ getSnapshot: () => store.getSnapshot().unpinned,
18002
+ subscribe: (listener) => store.subscribe(listener)
18003
+ },
18004
+ setPinned: (id, pinned) => {
18005
+ const current = store.getSnapshot().unpinned;
18006
+ if (id === "chat" || pinned !== current.includes(id)) return;
18007
+ store.set({ unpinned: pinned ? current.filter((entry) => entry !== id) : [...current, id] });
18008
+ }
18009
+ };
18010
+ }
18011
+ //#endregion
17921
18012
  //#region lib/types/client/skeleton/DefaultConversationViews.js
17922
18013
  /**
17923
18014
  * Renders the active Session view inside the resident scrollport and keeps
@@ -17954,6 +18045,42 @@ window.__ModuleLoader__.load({
17954
18045
  //#endregion
17955
18046
  //#region lib/types/client/skeleton/ConversationSession.js
17956
18047
  /** Strict per-session header/body content inserted into the resident conversation layout. */
18048
+ /** The View tab row's More launcher; its menu rows come from `conversation.session.header.views.actions`. */
18049
+ function ViewsMoreMenu({ label, current, entries, onOpen, onPinnedChange, renderSlot }) {
18050
+ const [open, setOpen] = (0, react.useState)(false);
18051
+ const onDismiss = () => {
18052
+ setOpen(false);
18053
+ };
18054
+ return (0, react_jsx_runtime.jsx)(_deepseek_ai_dsh_client_ui_primitives.Menu, {
18055
+ open,
18056
+ onClose: onDismiss,
18057
+ portal: true,
18058
+ autoFocus: true,
18059
+ className: ConversationRoot_module_css_default.viewsMoreAnchor,
18060
+ listClassName: ConversationRoot_module_css_default.viewsMoreMenu,
18061
+ anchor: (0, react_jsx_runtime.jsx)(_deepseek_ai_dsh_client_ui_primitives.Tooltip, {
18062
+ label,
18063
+ portal: true,
18064
+ children: (0, react_jsx_runtime.jsx)(_deepseek_ai_dsh_client_ui_primitives.Button, {
18065
+ size: "sm",
18066
+ className: clsx(ConversationRoot_module_css_default.viewsMore, current && ConversationRoot_module_css_default.viewsMoreActive),
18067
+ "aria-label": label,
18068
+ "aria-haspopup": "menu",
18069
+ "aria-expanded": open,
18070
+ onClick: () => {
18071
+ setOpen((value) => !value);
18072
+ },
18073
+ children: (0, react_jsx_runtime.jsx)(_deepseek_ai_dsh_client_ui_primitives.IconEllipsisOutlineRegular, { size: 13 })
18074
+ })
18075
+ }),
18076
+ children: renderSlot("conversation.session.header.views.actions", {
18077
+ entries,
18078
+ onOpen,
18079
+ onPinnedChange,
18080
+ onDismiss
18081
+ })
18082
+ });
18083
+ }
17957
18084
  function deriveAncestry(list, id) {
17958
18085
  const chain = [];
17959
18086
  const seen = /* @__PURE__ */ new Set();
@@ -17984,11 +18111,44 @@ window.__ModuleLoader__.load({
17984
18111
  * @param props - Strict Session store, view ledger, navigation, render, and locale shares.
17985
18112
  * @returns Session navigation controls, with title and tabs after conversation starts.
17986
18113
  */
17987
- function ConversationSessionHeader({ sessionId, hideChrome, useSessions, useConversationViews, useStore, renderSlot, open, selectView, t }) {
18114
+ function ConversationSessionHeader({ sessionId, hideChrome, useSessions, useConversationViews, useStore, renderSlot, open, selectView, setPinned, t, useEntryPins, useEntryActions }) {
17988
18115
  const tabs = useConversationViews((value) => value);
17989
18116
  const active = resolveActiveView(tabs, useStore((s) => s.view));
17990
18117
  const ancestry = useSessions((s) => deriveAncestry(s, sessionId), equalBreadcrumbs);
18118
+ const unpinned = useEntryPins((ids) => ids);
18119
+ const hasEntryActions = useEntryActions((registered) => registered);
17991
18120
  const showTabs = !hideChrome && tabs.length > 1;
18121
+ const tabRow = (0, react.useRef)(null);
18122
+ const [visibleViewLimit, setVisibleViewLimit] = (0, react.useState)(1);
18123
+ (0, react.useLayoutEffect)(() => {
18124
+ const row = tabRow.current;
18125
+ if (row === null || !hasEntryActions) return;
18126
+ const updateLimit = () => {
18127
+ setVisibleViewLimit(Math.max(1, Math.floor((row.clientWidth - 48) / 120)));
18128
+ };
18129
+ updateLimit();
18130
+ if (typeof ResizeObserver === "undefined") return;
18131
+ const observer = new ResizeObserver(updateLimit);
18132
+ observer.observe(row);
18133
+ return () => {
18134
+ observer.disconnect();
18135
+ };
18136
+ }, [showTabs, hasEntryActions]);
18137
+ const { visibleTabs, moreTabs } = (0, react.useMemo)(() => {
18138
+ const preferred = [...tabs.filter((tab) => tab.id === FIXED_VIEW_ID), ...tabs.filter((tab) => tab.id !== "chat" && !unpinned.includes(tab.id))];
18139
+ const visibleTabs = hasEntryActions ? preferred.slice(0, visibleViewLimit) : preferred;
18140
+ const visibleIds = new Set(visibleTabs.map((tab) => tab.id));
18141
+ return {
18142
+ visibleTabs,
18143
+ moreTabs: tabs.filter((tab) => !visibleIds.has(tab.id))
18144
+ };
18145
+ }, [
18146
+ tabs,
18147
+ unpinned,
18148
+ hasEntryActions,
18149
+ visibleViewLimit
18150
+ ]);
18151
+ const currentInMore = moreTabs.some((tab) => tab.id === active?.id);
17992
18152
  return (0, react_jsx_runtime.jsxs)(react_jsx_runtime.Fragment, { children: [(0, react_jsx_runtime.jsxs)("div", {
17993
18153
  className: ConversationRoot_module_css_default.titleRow,
17994
18154
  children: [!hideChrome && (0, react_jsx_runtime.jsxs)(react_jsx_runtime.Fragment, { children: [(0, react_jsx_runtime.jsxs)("div", {
@@ -18040,20 +18200,43 @@ window.__ModuleLoader__.load({
18040
18200
  "data-conversation-header-corner": "",
18041
18201
  children: renderSlot("conversation.session.header.corner", {})
18042
18202
  })]
18043
- }), showTabs && (0, react_jsx_runtime.jsx)("div", {
18203
+ }), showTabs && (0, react_jsx_runtime.jsxs)("div", {
18204
+ ref: tabRow,
18044
18205
  className: ConversationRoot_module_css_default.tabs,
18045
- role: "tablist",
18046
- "data-conversation-tabs": "",
18047
- children: tabs.map((viewTab) => (0, react_jsx_runtime.jsx)("button", {
18048
- type: "button",
18049
- role: "tab",
18050
- "aria-selected": viewTab.id === active?.id,
18051
- className: clsx(ConversationRoot_module_css_default.tab, viewTab.id === active?.id && ConversationRoot_module_css_default.tabActive),
18052
- onClick: () => {
18053
- selectView(viewTab.id);
18054
- },
18055
- children: viewTab.label
18056
- }, viewTab.id))
18206
+ children: [(0, react_jsx_runtime.jsx)("div", {
18207
+ className: ConversationRoot_module_css_default.viewTabs,
18208
+ role: "tablist",
18209
+ "data-conversation-tabs": "",
18210
+ children: visibleTabs.map((viewTab) => (0, react_jsx_runtime.jsx)("button", {
18211
+ type: "button",
18212
+ role: "tab",
18213
+ "aria-selected": viewTab.id === active?.id,
18214
+ className: clsx(ConversationRoot_module_css_default.tab, viewTab.id === active?.id && ConversationRoot_module_css_default.tabActive),
18215
+ onClick: () => {
18216
+ selectView(viewTab.id);
18217
+ },
18218
+ children: (0, react_jsx_runtime.jsx)(_deepseek_ai_dsh_client_ui_primitives.Tooltip, {
18219
+ label: viewTab.label,
18220
+ portal: true,
18221
+ children: (0, react_jsx_runtime.jsx)("span", {
18222
+ className: ConversationRoot_module_css_default.tabLabel,
18223
+ children: viewTab.label
18224
+ })
18225
+ })
18226
+ }, viewTab.id))
18227
+ }), hasEntryActions && (0, react_jsx_runtime.jsx)(ViewsMoreMenu, {
18228
+ label: currentInMore && active !== void 0 ? t("session.moreViewsCurrent", { name: active.label }) : t("session.moreViews"),
18229
+ current: currentInMore,
18230
+ entries: moreTabs.map((viewTab) => ({
18231
+ id: viewTab.id,
18232
+ label: viewTab.label,
18233
+ pinned: !unpinned.includes(viewTab.id),
18234
+ active: viewTab.id === active?.id
18235
+ })),
18236
+ onOpen: selectView,
18237
+ onPinnedChange: setPinned,
18238
+ renderSlot
18239
+ })]
18057
18240
  })] });
18058
18241
  }
18059
18242
  /**
@@ -19573,6 +19756,11 @@ window.__ModuleLoader__.load({
19573
19756
  activateView(sessionId, readConversationViewPreference(sessionId));
19574
19757
  };
19575
19758
  const conversationViews = (0, _deepseek_ai_dsh_client_store.createSnapshotStore)(viewTabs());
19759
+ const viewPins = createViewPins();
19760
+ const viewActions = {
19761
+ getSnapshot: () => slots.entriesOfSlot("conversation.session.header.views.actions").length > 0,
19762
+ subscribe: (listener) => slots.subscribe("conversation.session.header.views.actions", listener)
19763
+ };
19576
19764
  const bindings = /* @__PURE__ */ new Set();
19577
19765
  const trackedBindings = /* @__PURE__ */ new WeakSet();
19578
19766
  const trackBinding = (binding) => {
@@ -19863,11 +20051,20 @@ window.__ModuleLoader__.load({
19863
20051
  "conversation.session.header.corner": {
19864
20052
  kind: "single",
19865
20053
  scope: "session"
20054
+ },
20055
+ "conversation.session.header.views.actions": {
20056
+ kind: "list",
20057
+ scope: "root"
19866
20058
  }
19867
20059
  },
19868
20060
  store: conversationStore,
19869
20061
  inject: (sessionId, actions) => ({
19870
- hooks: { conversationViews },
20062
+ hooks: {
20063
+ conversationViews,
20064
+ entryPins: viewPins.unpinned,
20065
+ entryActions: viewActions
20066
+ },
20067
+ setPinned: viewPins.setPinned,
19871
20068
  open: (id) => {
19872
20069
  workspaceNavigation.openSession(id);
19873
20070
  },
@@ -660,7 +660,7 @@ window.__ModuleLoader__.load({
660
660
  function CurrentVersionRow({ t }) {
661
661
  return (0, react_jsx_runtime.jsx)("div", {
662
662
  className: CurrentVersionRow_module_css_default.row,
663
- children: t("general.currentVersion", { version: "0.2.1-rc.2" })
663
+ children: t("general.currentVersion", { version: "0.2.1-rc.3" })
664
664
  });
665
665
  }
666
666
  //#endregion
@@ -1083,7 +1083,13 @@ window.__ModuleLoader__.load({
1083
1083
  locale: NS,
1084
1084
  inject: () => ({
1085
1085
  hooks: { developerTools: ctx.configForms.developerTools.enabled },
1086
- setEnabled: (enabled) => ctx.configForms.developerTools.setEnabled(enabled)
1086
+ setEnabled: async (enabled) => {
1087
+ const settings = ctx.configForms.get("ui-settings");
1088
+ const previous = settings.getSnapshot().value?.enabled;
1089
+ const timestamp = Date.now();
1090
+ await ctx.configForms.developerTools.setEnabled(enabled);
1091
+ if (previous !== void 0 && previous !== enabled && settings.getSnapshot().value?.enabled === enabled) ctx.get("productAnalytics")?.track("code_work_view_toggle", { is_enabled: enabled }, timestamp);
1092
+ }
1087
1093
  })
1088
1094
  }, DeveloperToolsRow));
1089
1095
  ctx.slots.inject("settings.general.item", () => ctx.slots.register({