dsh-focus-overlay 0.7.1 → 0.7.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.
package/README.en.md CHANGED
@@ -117,7 +117,7 @@ In the sidebar "Settings → Plugins → Plugin configuration", expand the "Focu
117
117
  | Option | Description |
118
118
  | --- | --- |
119
119
  | Auto-enter focus mode when the AI finishes a reply | On a normal completion: auto-open at your question when closed, or a "New reply ready" toast when open (default off) |
120
- | Sync the current reading position when entering focus mode | Open at the message you're reading; off opens at the latest (default on) |
120
+ | Sync the current reading position when entering focus mode | Open at the message you're reading; off opens at your most recent question (default on) |
121
121
  | Show right-side turn navbar | One navigation dot per user message (turn) — hover to preview, click to jump (default on) |
122
122
  | Text width | 480–1200px slider for the reading column (default 760px) |
123
123
 
package/README.md CHANGED
@@ -115,7 +115,7 @@ dsh web
115
115
  | 选项 | 说明 |
116
116
  | --- | --- |
117
117
  | AI完成回复后,自动进入专注模式 | AI 正常完成回复后自动进入并定位到你的提问;已打开时弹「新回复已生成」(默认关) |
118
- | 进入专注模式时,同步当前阅读位置 | 进入时定位到你正在阅读的消息;关闭则定位到最新(默认开) |
118
+ | 进入专注模式时,同步当前阅读位置 | 进入时定位到你正在阅读的消息;关闭则定位到你最近一次提问(默认开) |
119
119
  | 显示右侧轮次导航条 | 在右侧显示导航圆点,每个用户消息(一轮)对应一个,悬停预览、点击跳转(默认开) |
120
120
  | 文字区宽度 | 480–1200px 滑块,调整正文阅读列宽(默认 760px) |
121
121
 
package/lib/client.js CHANGED
@@ -538,6 +538,18 @@ window.__ModuleLoader__.load({
538
538
  if (prefs.scroll === "preserve" && idx >= 0) {
539
539
  scrollToKey("fm-" + idx, false);
540
540
  setActiveKey("fm-" + idx);
541
+ } else if (prefs.scroll !== "preserve") {
542
+ const lastIdx = lastUserIndex(items);
543
+ if (lastIdx >= 0) {
544
+ scrollToKey("fm-" + lastIdx, false);
545
+ setActiveKey("fm-" + lastIdx);
546
+ } else if (bodyEl) {
547
+ bodyEl.scrollTo({
548
+ top: bodyEl.scrollHeight,
549
+ behavior: "auto"
550
+ });
551
+ setActiveKey(navKeys.length ? navKeys[navKeys.length - 1] : null);
552
+ }
541
553
  } else if (bodyEl) {
542
554
  bodyEl.scrollTo({
543
555
  top: bodyEl.scrollHeight,
@@ -1075,7 +1087,7 @@ body[data-fm-focus] #root :has(> [data-slot="conversation"]){margin-bottom:0!imp
1075
1087
  "settings.navbar": "显示右侧轮次导航条",
1076
1088
  "settings.navbar.hint": "在右侧显示导航圆点,每个用户消息(一轮)对应一个,悬停预览、点击跳转",
1077
1089
  "settings.scrollPreserve": "进入专注模式时,同步当前阅读位置",
1078
- "settings.scrollPreserve.hint": "进入时定位到你正在阅读的消息;关闭则定位到最新",
1090
+ "settings.scrollPreserve.hint": "进入时定位到你正在阅读的消息;关闭则定位到你最近一次提问",
1079
1091
  "settings.autoFocus": "AI完成回复后,自动进入专注模式",
1080
1092
  "settings.autoFocus.hint": "AI 正常完成回复后自动进入并定位到你的提问",
1081
1093
  "settings.width": "文字区宽度",
@@ -1126,7 +1138,7 @@ body[data-fm-focus] #root :has(> [data-slot="conversation"]){margin-bottom:0!imp
1126
1138
  "settings.navbar": "Show right-side turn navbar",
1127
1139
  "settings.navbar.hint": "Show one navigation dot per user message (turn) — hover to preview, click to jump",
1128
1140
  "settings.scrollPreserve": "Sync the current reading position when entering focus mode",
1129
- "settings.scrollPreserve.hint": "Open at the message you're reading; off opens at the latest",
1141
+ "settings.scrollPreserve.hint": "Open at the message you're reading; off opens at your most recent question",
1130
1142
  "settings.autoFocus": "Auto-enter focus mode when the AI finishes a reply",
1131
1143
  "settings.autoFocus.hint": "Auto-open at your question after a normal reply",
1132
1144
  "settings.width": "Text width",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "dsh-focus-overlay",
3
- "version": "0.7.1",
3
+ "version": "0.7.2",
4
4
  "description": "Focus Mode for the dsh web GUI: a full-screen reading overlay that hides chrome and folds the AI tool-call flow into summaries, reusing the official Markdown / image primitives.",
5
5
  "type": "module",
6
6
  "main": "lib/index.mjs",