dsh-focus-overlay 0.10.0 → 0.11.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.
- package/README.en.md +48 -34
- package/README.md +50 -35
- package/lib/client.js +1370 -377
- package/package.json +10 -4
package/README.en.md
CHANGED
|
@@ -5,25 +5,25 @@
|
|
|
5
5
|
</p>
|
|
6
6
|
|
|
7
7
|
<p align="center">
|
|
8
|
-
A <b>focus mode</b> for the DeepSeek Harness (DSH) web GUI: one click to a full-screen reading
|
|
9
|
-
Text and
|
|
8
|
+
A <b>focus mode</b> for the DeepSeek Harness (DSH) web GUI: one click to a full-screen reading overlay that hides the header, composer and sidebars, folding the AI tool-call flow into official-style count summaries — leaving only the conversation between you and the AI.<br>
|
|
9
|
+
Text, images, the turn rail, width handles and the answer card all reuse or 1:1 replicate official components, matching the chat view's look.
|
|
10
10
|
</p>
|
|
11
11
|
|
|
12
12
|
<p align="center">
|
|
13
13
|
<img src="https://img.shields.io/npm/v/dsh-focus-overlay" alt="npm version">
|
|
14
14
|
<img src="https://img.shields.io/npm/dm/dsh-focus-overlay" alt="npm downloads (monthly)">
|
|
15
15
|
<img src="https://badgen.net/badge/license/MIT/green" alt="license">
|
|
16
|
-
<img src="https://badgen.net/badge/dsh/%3E%3D0.1.
|
|
16
|
+
<img src="https://badgen.net/badge/dsh/%3E%3D0.1.2-rc.1/blue" alt="dsh version">
|
|
17
17
|
</p>
|
|
18
18
|
|
|
19
19
|
## Features
|
|
20
20
|
|
|
21
|
-
- **Full-screen
|
|
22
|
-
- **
|
|
23
|
-
- **
|
|
24
|
-
- **
|
|
25
|
-
- **
|
|
26
|
-
- **
|
|
21
|
+
- **Full-screen reading** — an overlay registered additively into `shell.overlay`, covering header / composer / sidebars, giving all vertical space to the conversation
|
|
22
|
+
- **Folded tool calls** — an assistant turn collapses into one official TurnProcess-style count line, clickable to expand the full work detail
|
|
23
|
+
- **Turn navbar** — a right-side rail 1:1 replicating the official TurnNavigator: one mark per turn, hover previews, click to jump
|
|
24
|
+
- **Bottom dock** — a compact input bar appears at the live edge and shares the main composer's draft; AI questions and approvals expand into an in-place answer card, so you never leave focus to reply
|
|
25
|
+
- **Auto-focus & reminders** — after a reply completes normally, optionally auto-enter focus at your question; while in focus, get a toast for a new reply or when the AI is waiting on you
|
|
26
|
+
- **Width handles** — draggable strips beside the content column (official WidthHandle replica) that resize the reading column live and persist
|
|
27
27
|
- **Hotkey F** — press `F` anywhere to enter focus mode instantly (toggleable in settings); typing in an input never triggers it
|
|
28
28
|
|
|
29
29
|
These features are designed to give **small screens** more content space: tucking away the persistent header/composer and tool steps lets the conversation use as much of the screen as possible.
|
|
@@ -40,36 +40,49 @@ These features are designed to give **small screens** more content space: tuckin
|
|
|
40
40
|
|
|
41
41
|
<!-- Drop your screenshots into screenshots/:
|
|
42
42
|
- before.png — the normal chat view (header / composer / tool cards)
|
|
43
|
-
- after.png — focus mode (full-screen overlay + summary line + right-side navbar)
|
|
44
|
-
Optionally add navbar.png as
|
|
43
|
+
- after.png — focus mode (full-screen overlay + summary line + right-side navbar + bottom dock)
|
|
44
|
+
Optionally add navbar.png / card.png as navbar and answer-card close-ups. -->
|
|
45
45
|
|
|
46
|
-
Once in focus mode, an assistant turn no longer shows every step — it folds into a single
|
|
46
|
+
Once in focus mode, an assistant turn no longer shows every step — it folds into a single official-style count line:
|
|
47
47
|
|
|
48
|
-
>
|
|
48
|
+
> 12 tool calls · 4 messages · 1 subagent
|
|
49
|
+
|
|
50
|
+
Click the line to expand that turn's full work detail (per-category one-line summaries: commands, edits, searches, reads, and more).
|
|
49
51
|
|
|
50
52
|
## Capabilities
|
|
51
53
|
|
|
52
54
|
| Feature | Description |
|
|
53
55
|
| --- | --- |
|
|
54
|
-
| Full-screen overlay | Registered into `shell.overlay` (additive, `replaceRisk: none`) — covers header / composer / sidebar
|
|
55
|
-
| Official rendering | Assistant text through official `MarkdownText` (GFM + code highlighting + TeX); user messages through `MessageText`;
|
|
56
|
-
| Image resolution | Assistant `image` blocks resolve through `
|
|
57
|
-
| Tool-call folding |
|
|
58
|
-
|
|
|
59
|
-
|
|
|
56
|
+
| Full-screen overlay | Registered into `shell.overlay` (additive, `replaceRisk: none`) — covers header / composer / sidebar; the thin top bar keeps only the session title and an exit button |
|
|
57
|
+
| Official rendering primitives | Assistant text through official `MarkdownText` (GFM + code highlighting + TeX + code copy buttons + footnotes); user messages through `MessageText`; buttons, modals and icons are all official primitives |
|
|
58
|
+
| Image resolution | Assistant `image` blocks resolve through `uiConversation.imageUrl` (the dsh 0.1.2+ session-authorized image cache), falling back to the legacy resolver on older dsh |
|
|
59
|
+
| Tool-call folding | Follows the official "transcript view" preference (normal / compact); compact mode folds each turn's work part into a "N tool calls · M messages · K subagents" disclosure line ("Thought for a while" when nothing is countable), clickable to expand the full detail; steering messages always stay top-level, never buried; the last turn stays unfolded while streaming |
|
|
60
|
+
| Categorized summaries | The expanded detail counts tools by family: commands / edits / searches / reads / directory listings / subagents / todos / goals / workflows / skills / questions / plans / background jobs / context injections |
|
|
61
|
+
| Full-history load | dsh 0.1.2 pages history by turns; opening focus drives `loadOlder` to the session start (bounded, aborted on unmount) for a complete reading view |
|
|
62
|
+
| Precise scroll preservation | Opens at the message you're reading in the chat (chat anchor key → `seq`); an anti-drift corrector re-steadies the position against history prepends and async layout shifts |
|
|
63
|
+
| Turn navbar (TurnRail) | A 1:1 replica of the official TurnNavigator: one mark per turn, the active mark follows scroll, a hover/focus preview card (1-line prompt + 3-line response), click to jump, 24px fade bands at each end, `prefers-reduced-motion` support; auto-hidden under 2 turns |
|
|
64
|
+
| Width handles (WidthHandle) | A drag strip on each side of the column, 1:1 replica of the official WidthHandle: symmetric on both sides (2× outward), rAF-throttled live drag, pointer glow indicator, commit-on-release persisted; 640px floor + 88px edge budget per side |
|
|
60
65
|
| Back to latest | A centered "↓" floating button when you scroll away from the bottom with no draft |
|
|
61
|
-
|
|
|
62
|
-
|
|
|
63
|
-
|
|
|
64
|
-
|
|
|
65
|
-
|
|
|
66
|
-
|
|
|
67
|
-
| Reply / waiting reminders | In focus, a "New reply ready + View" toast on completion; a question/approval raises "AI is waiting for your reply + Answer",
|
|
68
|
-
|
|
|
66
|
+
| Bottom dock | Five mutually exclusive forms decided by one pure selector: answer card / waiting toast / input bar / collapsed pill / jump-to-bottom; the compact bar appears when you reach the bottom (48px hysteresis band) |
|
|
67
|
+
| Shared draft | The bar wires the official per-session input machine (`conversation.input.for`): text typed before entering focus is already here, and text typed here is still in the main composer after leaving; on older dsh without the input service it degrades to a plugin-local draft |
|
|
68
|
+
| Input bar details | `Enter` sends (queue delivery — queued while the AI runs, with a "Queued N" badge), `Shift+Enter` newlines, IME-composition safe, auto-growing; send failures surface an error line; a draft containing references/commands warns to edit outside focus mode; with a draft, clicking the conversation folds the bar into a blue-dot pill, one click back with the caret in place |
|
|
69
|
+
| Reveal-on-send | After sending a long message from the live edge, the view scrolls up just enough to fully reveal the row — never hidden behind the dock; sending from up in history never scrolls |
|
|
70
|
+
| Answer card (pending interaction) | Built on the dsh 0.1.2 `uiSession` pending-interactions service: the question card replicates the official QuestionComposer (numbered single-select / checkbox multi-select, a "Recommended" badge, custom answers, one batched submit, an "answer everything" nudge); the approval card replicates the PlanReviewPanel warn strip (allow / deny, showing tool name and reason); a rejection keeps its error on the card; older dsh falls back through a legacy adapter |
|
|
71
|
+
| Auto-enter focus | After a reply **completes normally**, auto-open focus at your question; abnormal endings (stop / error / max-tokens / interrupt) never fire — the judgement waits for a stable snapshot (streaming tail drained) first |
|
|
72
|
+
| Reply / waiting reminders | In focus, a one-shot "New reply ready + View" toast on completion (auto-dismissed after 6s); a question/approval raises "AI is waiting for your reply + Answer", whose button expands the in-place answer card — auto-cleared once answered, never leaving focus |
|
|
73
|
+
| F hotkey | Press `F` anywhere to enter focus mode instantly (default on, toggleable in settings); never fires while typing in an input or editable element, modifiers and auto-repeat ignored |
|
|
74
|
+
| Esc peels layer by layer | Answer card → input bar → focus mode, one layer per press; Esc mid-IME-composition cancels the composition first |
|
|
75
|
+
| i18n | Chinese / English copy registered under the `focus` namespace, follows the UI language |
|
|
76
|
+
| Plugin configuration card | A collapsible card under "Settings → Plugins → Plugin configuration", preferences persisted to `localStorage`; the Node half registers the same settings namespace (schemastery schema) so the tab dispatches it |
|
|
77
|
+
| First-run onboarding | After installing, the welcome page shows a one-time "Focus Mode" intro (feature overview + in-place configuration) as a `settings.onboarding` step with its own versioned seen-flag |
|
|
78
|
+
| Official preference sync | Reads the official "transcript view" preference (normal / compact); flipping it applies immediately |
|
|
79
|
+
| Render error boundary | The overlay content is wrapped in an error boundary: one render crash never bricks the Focus button — the next open retries |
|
|
80
|
+
| DSH-better-sidebar compatibility | While in focus, a `<body>` marker makes the package stylesheet hide better-sidebar's top-right panel toggles and any open right/bottom panels (and release the squeezed layout); restored on exit |
|
|
81
|
+
| Legacy compatibility mode | On dsh < 0.1.2 missing the new services, the overlay degrades gracefully (legacy snapshot adapters) with a one-time console notice — no crash |
|
|
69
82
|
|
|
70
83
|
## Install
|
|
71
84
|
|
|
72
|
-
Requires the `dsh` CLI (`>= 0.1.
|
|
85
|
+
Requires the `dsh` CLI (`>= 0.1.2-rc.1`) and Node `>= 22.19.0`.
|
|
73
86
|
|
|
74
87
|
**From npm (recommended)**
|
|
75
88
|
|
|
@@ -109,12 +122,12 @@ Restart `dsh web` after install.
|
|
|
109
122
|
## Usage
|
|
110
123
|
|
|
111
124
|
1. Open a session and click the **"Focus"** button in the session header action row (or press `F` — toggleable in settings).
|
|
112
|
-
2. You enter the full-screen focus view:
|
|
113
|
-
3. Hover the right-side
|
|
114
|
-
4. Reply right in the bar: `Enter` sends, `Shift+Enter` newlines (queued while the AI runs), drafts shared with the main composer; clicking the conversation folds it into a blue-dot pill. AI questions/approvals raise an "Answer"
|
|
125
|
+
2. You enter the full-screen focus view: the thin top bar keeps only the session title and exit, the conversation only, with tool steps folded into count summary lines; history pages in automatically for the full session.
|
|
126
|
+
3. Hover the right-side navbar to preview and click to jump; drag the strips beside the column to resize it live. The compact input bar appears when you reach the very bottom (a "↓" button shows when you scroll away with no draft).
|
|
127
|
+
4. Reply right in the bar: `Enter` sends, `Shift+Enter` newlines (queued while the AI runs), drafts shared with the main composer; clicking the conversation folds it into a blue-dot pill. AI questions/approvals raise an "Answer" button that expands the in-place card for options, free text, or approvals.
|
|
115
128
|
5. `Esc` peels back layer by layer (answer card → input bar → focus mode); or click "Exit focus" to return — the original UI is untouched.
|
|
116
129
|
|
|
117
|
-
> **Compatibility note**: if [DSH-better-sidebar](https://github.com/omdsh-dev/DSH-better-sidebar) is also installed, entering focus mode auto-hides its
|
|
130
|
+
> **Compatibility note**: if [DSH-better-sidebar](https://github.com/omdsh-dev/DSH-better-sidebar) is also installed, entering focus mode auto-hides its top-right panel toggle buttons and any open right/bottom panels (releasing the squeezed layout); they're restored as they were on exit, without touching that plugin's layout state.
|
|
118
131
|
|
|
119
132
|
## Settings
|
|
120
133
|
|
|
@@ -125,8 +138,9 @@ In the sidebar "Settings → Plugins → Plugin configuration", expand the "Focu
|
|
|
125
138
|
| 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) |
|
|
126
139
|
| Press F to enter focus mode | Press `F` anywhere to enter focus mode instantly; never fires while typing in an input (default on) |
|
|
127
140
|
| 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) |
|
|
128
|
-
| Show right-side turn navbar | One
|
|
129
|
-
|
|
141
|
+
| Show right-side turn navbar | One rail mark per user message (turn) — hover to preview, click to jump (default on) |
|
|
142
|
+
|
|
143
|
+
> **Text width** is not in the settings card: drag the handles beside the content column while in focus mode to resize it live; the value persists on release (default 760px, minimum 640px).
|
|
130
144
|
|
|
131
145
|
## License
|
|
132
146
|
|
package/README.md
CHANGED
|
@@ -3,27 +3,28 @@
|
|
|
3
3
|
<p align="center">中文 | <a href="README.en.md">English</a></p>
|
|
4
4
|
|
|
5
5
|
<p align="center">
|
|
6
|
-
为 DeepSeek Harness(DSH)Web GUI 提供的<b>专注模式</b
|
|
7
|
-
|
|
6
|
+
为 DeepSeek Harness(DSH)Web GUI 提供的<b>专注模式</b>:一键进入全屏阅读遮罩,隐藏标题区、输入区与侧栏,把 AI 的工具调用过程折叠成官方样式的计数摘要,只保留「你与 AI 的对话」本身。<br>
|
|
7
|
+
文本、图片、导航条、宽度调节与答题卡均复用或 1:1 复刻官方组件,观感与聊天视图一致。
|
|
8
8
|
</p>
|
|
9
9
|
|
|
10
10
|
<p align="center">
|
|
11
11
|
<img src="https://img.shields.io/npm/v/dsh-focus-overlay" alt="npm version">
|
|
12
12
|
<img src="https://img.shields.io/npm/dm/dsh-focus-overlay" alt="npm downloads (monthly)">
|
|
13
13
|
<img src="https://badgen.net/badge/license/MIT/green" alt="license">
|
|
14
|
-
<img src="https://badgen.net/badge/dsh/%3E%3D0.1.
|
|
14
|
+
<img src="https://badgen.net/badge/dsh/%3E%3D0.1.2-rc.1/blue" alt="dsh version">
|
|
15
15
|
</p>
|
|
16
16
|
|
|
17
17
|
## 功能
|
|
18
18
|
|
|
19
|
-
-
|
|
20
|
-
-
|
|
21
|
-
-
|
|
22
|
-
-
|
|
23
|
-
- **自动专注与提醒** ——
|
|
24
|
-
-
|
|
19
|
+
- **全屏阅读** —— 经 `shell.overlay` 以纯增量方式注册的遮罩,覆盖标题区 / 输入区 / 侧栏,纵向空间尽给对话
|
|
20
|
+
- **折叠工具调用** —— 一轮 AI 回复折叠成一行官方 TurnProcess 风格的计数摘要,可点击展开完整工作明细
|
|
21
|
+
- **轮次导航条** —— 右侧导航条 1:1 复刻官方 TurnNavigator:每个回合一个刻度、悬停预览、点击跳转
|
|
22
|
+
- **底部输入坞** —— 回到最底部出现精简输入条,与主输入框共享同一份草稿;AI 提问 / 审批时原地展开答题卡,作答无需退出专注
|
|
23
|
+
- **自动专注与提醒** —— 回复正常完成后可自动进入专注并定位到你的提问;专注中收到新回复、或 AI 等待你回答时弹出提醒
|
|
24
|
+
- **宽度调节** —— 正文两侧的拖拽把手(官方 WidthHandle 复刻),实时拖动阅读列宽并持久化
|
|
25
|
+
- **快捷键 F** —— 任意界面按 `F` 一键进入专注模式,可在设置中关闭;输入框内打字不会误触发
|
|
25
26
|
|
|
26
|
-
|
|
27
|
+
这些功能专为**小屏幕**提供更多内容呈现空间:收起常驻的标题 / 输入区与工具步骤,让有限的屏幕尽可能多地展示对话。
|
|
27
28
|
|
|
28
29
|
## 效果
|
|
29
30
|
|
|
@@ -37,36 +38,49 @@
|
|
|
37
38
|
|
|
38
39
|
<!-- 截图请放到 screenshots/ 目录:
|
|
39
40
|
- before.png —— 普通聊天视图(含标题区/输入区/工具卡)
|
|
40
|
-
- after.png —— 专注模式(全屏遮罩 + 摘要行 +
|
|
41
|
-
可再补一张 navbar.png
|
|
41
|
+
- after.png —— 专注模式(全屏遮罩 + 摘要行 + 右侧导航条 + 底部输入坞)
|
|
42
|
+
可再补一张 navbar.png / card.png 作为导航条与答题卡特写。 -->
|
|
42
43
|
|
|
43
|
-
进入专注后,一轮 AI
|
|
44
|
+
进入专注后,一轮 AI 回复不再逐个展示步骤,而是折叠成一行官方样式的计数摘要:
|
|
44
45
|
|
|
45
|
-
>
|
|
46
|
+
> 12 次工具调用 · 4 条消息 · 1 个 subagent
|
|
47
|
+
|
|
48
|
+
点击摘要可展开该轮的完整工作明细(命令、编辑、搜索、读取等按类计数的一行式摘要)。
|
|
46
49
|
|
|
47
50
|
## 能力
|
|
48
51
|
|
|
49
52
|
| 功能 | 说明 |
|
|
50
53
|
| --- | --- |
|
|
51
|
-
| 全屏专注遮罩 | 经 `shell.overlay` 注册(纯增量、`replaceRisk: none
|
|
52
|
-
|
|
|
53
|
-
| 图片解析 | assistant 的 `image` 块经 `
|
|
54
|
-
| 工具调用折叠 |
|
|
55
|
-
|
|
|
56
|
-
|
|
|
54
|
+
| 全屏专注遮罩 | 经 `shell.overlay` 注册(纯增量、`replaceRisk: none`),覆盖标题区 / 输入区 / 侧栏;顶部只留会话标题与「退出专注」按钮 |
|
|
55
|
+
| 官方渲染原语 | AI 文本走官方 `MarkdownText`(GFM + 代码高亮 + TeX + 代码复制按钮 + 脚注),用户消息走 `MessageText`;按钮、模态、图标均为官方原语 |
|
|
56
|
+
| 图片解析 | assistant 的 `image` 块经 `uiConversation.imageUrl`(dsh 0.1.2+ 的会话授权图片缓存)解析,旧版 dsh 自动回退到 legacy 解析器 |
|
|
57
|
+
| 工具调用折叠 | 遵循官方「对话显示」偏好(normal / compact);compact 模式把每轮的工作部分折叠成「N 次工具调用 · M 条消息 · K 个 subagent」披露行(无内容时显示「已思考」),点击可展开完整明细;steering 消息始终独立成行不被折叠;流式中的最后一轮保持展开直到结束 |
|
|
58
|
+
| 分类摘要明细 | 展开后按工具类别计数:命令 / 编辑 / 搜索 / 读取 / 列目录 / 子代理 / 待办 / 目标 / 工作流 / 技能 / 提问 / 计划 / 后台任务 / 上下文注入 |
|
|
59
|
+
| 完整历史加载 | dsh 0.1.2 按回合分页,打开专注时自动驱动 `loadOlder` 翻页到会话开头(有上限、卸载即中止),保证全量阅读视图 |
|
|
60
|
+
| 精确保留位置 | 进入专注时定位到聊天视图中正在阅读的消息(按 chat anchor key → `seq` 对齐);历史分页与前插造成的漂移由防漂移校正器自动回稳 |
|
|
61
|
+
| 轮次导航条(TurnRail) | 1:1 复刻官方 TurnNavigator:每个回合一个刻度、激活刻度随滚动跟随、悬停 / 键盘聚焦弹出预览卡(1 行提问 + 3 行回复)、点击平滑跳转、两端 24px 渐隐、`prefers-reduced-motion` 适配;少于 2 个回合自动隐藏 |
|
|
62
|
+
| 宽度调节(WidthHandle) | 正文两侧各一条拖拽把手,1:1 复刻官方 WidthHandle:双侧等比(外拖 2×)、rAF 节流实时跟手、指针辉光指示、松手提交并持久化;640px 下限 + 两侧各 88px 边缘预算 |
|
|
57
63
|
| 回到最新 | 无草稿且离开底部时,底部居中显示「↓」悬浮按钮 |
|
|
58
|
-
|
|
|
59
|
-
|
|
|
60
|
-
|
|
|
61
|
-
|
|
|
62
|
-
|
|
|
63
|
-
|
|
|
64
|
-
| 回复 / 等待提醒 | 专注中回复完成弹「新回复已生成 +
|
|
65
|
-
|
|
|
64
|
+
| 底部输入坞 | 五种互斥形态由纯函数统一裁决:答题卡 / 等待提示 / 输入条 / 折叠圆钮 / 回到底部;滚到底部(48px 滞回区间)自动展开精简输入条 |
|
|
65
|
+
| 共享草稿 | 输入条接官方 per-session 输入机(`conversation.input.for`):进专注前在主输入框打的字已在条内,专注内打的字离开后仍在主输入框;无输入服务的旧版 dsh 回退到插件本地草稿 |
|
|
66
|
+
| 输入条细节 | `Enter` 发送(queue 投递,AI 忙时自动排队并显示「已排队 N」)、`Shift+Enter` 换行、输入法组词中不触发、自动增高;发送失败显示错误行;草稿含引用 / 命令时提示「建议退出专注模式编辑」;有草稿点击对话区自动收起为带蓝点的圆钮,一键展开且光标就位 |
|
|
67
|
+
| 发送自动上滚 | 在底部发送长消息后自动上滚刚好一段,让刚发出的消息完整露出、不被输入坞遮挡;在历史区发送绝不拉动视图 |
|
|
68
|
+
| 答题卡(pending interaction) | dsh 0.1.2 `uiSession` 待交互服务:提问卡复刻官方 QuestionComposer(单选编号 / 多选勾选、「推荐」徽章、自定义答案、整批一次提交、未答完提示),审批卡复刻 PlanReviewPanel 警示条样式(允许 / 拒绝,展示工具名与理由);被拒绝时错误留在卡上;旧版 dsh 经 legacy 适配器回退 |
|
|
69
|
+
| 自动进入专注 | 回复**正常完成**后自动打开专注并定位到本轮你的提问;异常结束(停止 / 报错 / 超 token / 打断)不触发——判定要求快照稳定(流式尾部排空)后才下结论 |
|
|
70
|
+
| 回复 / 等待提醒 | 专注中回复完成弹「新回复已生成 + 查看」(6 秒自动消失,一次性);AI 提问 / 审批等待时弹「AI 正在等待你的回复 + 去回答」,按钮原地展开答题卡,作答后自动消失——全程无需退出专注 |
|
|
71
|
+
| F 键快捷键 | 任意界面按 `F` 立即进入专注(默认开,可在设置中关闭);输入框 / 可编辑元素内打字不触发,忽略修饰键与长按自动重复 |
|
|
72
|
+
| Esc 逐层退出 | 答题卡 → 输入条 → 专注模式,一层一层退;输入法组词中的 Esc 优先取消组词 |
|
|
73
|
+
| i18n | 中 / 英文案,注册到 `focus` 命名空间,跟随界面语言 |
|
|
74
|
+
| 插件配置卡片 | 「设置 → 插件 → 插件配置」中的可折叠卡片,偏好持久化到 `localStorage`;Node 半区以 schemastery schema 注册同名设置 namespace 供其分发 |
|
|
75
|
+
| 首次引导 | 首次安装后欢迎页弹出一次「专注模式」引导(功能一览 + 就地配置),`settings.onboarding` 步骤自带已读标记与版本号 |
|
|
76
|
+
| 官方偏好联动 | 读取官方「对话显示」(normal / compact)偏好,切换即时生效 |
|
|
77
|
+
| 渲染错误兜底 | 遮罩内容包裹错误边界:一次渲染崩溃不会永久打死「专注」按钮,下次打开自动重试 |
|
|
78
|
+
| 兼容 DSH-better-sidebar | 进入专注时在 `<body>` 打标记,样式层自动隐藏其右上角的收放面板按钮与已开启的右侧 / 底部面板,并释放被挤压的布局;退出专注后按原状态还原 |
|
|
79
|
+
| 旧版兼容模式 | dsh < 0.1.2 缺少新服务时降级运行(legacy 快照适配),控制台一次性提示,不会崩溃 |
|
|
66
80
|
|
|
67
81
|
## 安装
|
|
68
82
|
|
|
69
|
-
需要 `dsh` CLI(`>= 0.1.
|
|
83
|
+
需要 `dsh` CLI(`>= 0.1.2-rc.1`),Node `>= 22.19.0`。
|
|
70
84
|
|
|
71
85
|
**从 npm(推荐)**
|
|
72
86
|
|
|
@@ -106,12 +120,12 @@ dsh web
|
|
|
106
120
|
## 使用
|
|
107
121
|
|
|
108
122
|
1. 打开任意会话,点击标题栏操作区的 **「专注」** 按钮(或直接按 `F` 键,可在设置中关闭该快捷键)。
|
|
109
|
-
2.
|
|
110
|
-
3.
|
|
111
|
-
4. 在输入条里直接回复:`Enter` 发送、`Shift+Enter` 换行(AI 忙时自动排队),草稿与主输入框互通;点击对话区域自动收起为带蓝点的圆钮。AI 提问 /
|
|
123
|
+
2. 进入全屏专注视图:顶部只有会话标题与退出按钮,正文只显示你与 AI 的对话,工具步骤折叠为计数摘要行;历史会自动翻页加载完整。
|
|
124
|
+
3. 右侧导航条可悬停预览、点击跳转;拖动正文两侧的把手实时调节列宽。滚到最底部时底部居中自动展开精简输入条(无草稿离开底部则显示「↓」按钮)。
|
|
125
|
+
4. 在输入条里直接回复:`Enter` 发送、`Shift+Enter` 换行(AI 忙时自动排队),草稿与主输入框互通;点击对话区域自动收起为带蓝点的圆钮。AI 提问 / 审批时弹「去回答」,点击原地展开答题卡,就地进行选项 / 文本 / 审批作答。
|
|
112
126
|
5. 按 `Esc` 逐层退出(答题卡 → 输入条 → 专注模式),或点「退出专注」返回原界面,原位置/状态保持不变。
|
|
113
127
|
|
|
114
|
-
> **兼容提示**:若同时安装了 [DSH-better-sidebar](https://github.com/omdsh-dev/DSH-better-sidebar)
|
|
128
|
+
> **兼容提示**:若同时安装了 [DSH-better-sidebar](https://github.com/omdsh-dev/DSH-better-sidebar),进入专注模式会自动隐藏其右上角的收放面板按钮以及已开启的右侧/底部面板(并释放被挤压的布局);退出专注后按原状态恢复,不会改动该插件的面板布局。
|
|
115
129
|
|
|
116
130
|
## 设置
|
|
117
131
|
|
|
@@ -122,8 +136,9 @@ dsh web
|
|
|
122
136
|
| AI完成回复后,自动进入专注模式 | AI 正常完成回复后自动进入并定位到你的提问;已打开时弹「新回复已生成」(默认关) |
|
|
123
137
|
| 按 F 键进入专注模式 | 任意界面按 `F` 立即进入专注模式;输入框内打字不触发(默认开) |
|
|
124
138
|
| 进入专注模式时,同步当前阅读位置 | 进入时定位到你正在阅读的消息;关闭则定位到你最近一次提问(默认开) |
|
|
125
|
-
| 显示右侧轮次导航条 |
|
|
126
|
-
|
|
139
|
+
| 显示右侧轮次导航条 | 每个用户消息(一轮)对应一个刻度,悬停预览、点击跳转(默认开) |
|
|
140
|
+
|
|
141
|
+
> **文字区宽度**不在设置卡片中:在专注模式内拖动正文两侧的把手即可实时调节,松手自动保存(默认 760px,最小 640px)。
|
|
127
142
|
|
|
128
143
|
## 许可
|
|
129
144
|
|