Commit Graph
849 Commits
Author SHA1 Message Date
Menghuan1918 7ef1dfa989 fix(sidechat): 模型切换不再把 model/selection 记两次(0.2.2 的 AgentModel.select 自己落盘) 2026-11-04 22:20:41 +08:00
Menghuan1918 7a4a15292e chore(dsh): 适配 DSH 0.2.2-rc.1(基线/peer/CI/脚本/文档 + AgentModel 与 PTC 类型变化) 2026-11-04 22:13:07 +08:00
Menghuan1918 a1af72a641 test(e2e): 引用 chip 的可见标签是本地化文案,按文件名断言而不是冒号分隔(#1111 后续) 2026-11-04 21:18:08 +08:00
Menghuan1918 91a5d79f19 merge #1072/#1071: fix(editor) 原生页签关闭与桌面退出保留未保存草稿(宿主无确认钩子,改草稿备份 + 重开恢复)
# Conflicts:
#	CHANGELOG.md
#	CHANGELOG_EN.md
2026-11-04 21:06:04 +08:00
Menghuan1918 cafb73b21b merge #1109: fix(sidechat) 压缩 seed 里重映射 delivery 水位线,不再产出不可读的子会话日志
# Conflicts:
#	CHANGELOG.md
#	CHANGELOG_EN.md
2026-11-04 21:05:59 +08:00
Menghuan1918 4224c78a98 fix(editor): 原生页签关闭与桌面退出保留未保存草稿(#1072 / #1071)
宿主原生页签条的关闭路径只有一个同步清理钩子(唯一的阻止方式是 throw,
会把异常抛给 replaceTab / 公共 close() 调用方),桌面 Cmd+Q 则完全在壳内
完成(before-quit → app.exitRequested),页面没有可取消事件;壳内也没有
will-prevent-unload 处理器。插件因此不伪造拦截,改为降低损失:

- 草稿变脏时按 1 s 节流把实时文档写入 localStorage(sessionId::path,
  单条 200k 字符 / 总计 600k / 最多 8 条 FIFO)
- 原生 registerCloseHandler('editor') 与 beforeunload 时立即 flush
- 重开同一文件提示恢复;保存、确认丢弃、确认刷新/换文件即删除备份

新增 src/client/editor-draft-backup.ts;docs/host-contracts.md §C 记录宿主
限制与将来的接法。测试:新增 editor-draft-backup.spec.tsx(8 例)+ guard
spec 2 例;去掉任一修复点后对应用例均转红。
2026-11-04 21:04:16 +08:00
Menghuan1918 4c1d4177d9 fix(install): 装完先查 profile 自带的宿主包是否混版(#1107)
profile 自带的 @deepseek-ai/dsh-* 会覆盖宿主安装的同一批包(DSH 的 profile
解析先取 profile 前缀内的副本),本插件静态 import 的 dsh-subagent 因此绑到
混搭版本;混版缺导出时宿主只报 DesktopHostFatalError / required plugins did
not activate,看不到是哪个包缺了什么。

新增随包发布的 scripts/check-profile-host-tree.mjs:按 DSH 的 profile 解析
规则(只看 profile 前缀内的副本、上级 profiles/node_modules 不参与)判定
dsh-subagent 精确声明的 dsh-attachment peer。install.sh / install.ps1 装完
运行它,混版时打印两份版本号与修复命令并退出,不再提示重启。README 常见
问题、docs/host-contracts.md 与中英 CHANGELOG 同批记录;新增
tests/install-host-tree.spec.ts 真跑发布脚本钉住行为。
2026-11-04 21:03:54 +08:00
Menghuan1918 45b4d42ef6 fix(sidechat): rebase inherited delivery watermarks in the compaction seed
A side thread opened while the parent was mid-turn could persist a child
session the host can never read again: SessionFormatError "delivery
throughSeq must precede its marker".

Root cause: when the parent has compacted, buildSidechatInheritance copies
the log around its last checkpoint with RENUMBERED seqs, but the inherited
session-log-deepseek/delivery-accepted watermark (throughSeq) is an
absolute seq. Left alone it keeps pointing at the parent's position and
can land at or after the marker's own new seq, which the v4 reader treats
as corrupt; the parent's includeDescendants export then fails with it.

The rebase now carries the watermark through the same map it applies to
every other seq citation, and drops the record when the watermark fell
inside the dropped span (there is no child-side equivalent). The verbatim
full-copy path is untouched — seqs are identity there, so nothing changes.

Tests: tests/sidechat-compaction-seed.spec.ts builds a compacted parent
carrying real delivery markers and asserts every surviving marker cites
the same earlier event the parent marked, while markers whose watermark
was trimmed away do not survive (red before the fix: throughSeq 15 for a
marker at seq 8).

Closes #1109
2026-11-04 20:59:08 +08:00
Menghuan1918 4f6b763d1e merge #1089: fix(changelog) 恢复被 mermaid 合并截断的发布历史,并加完整性守卫 2026-11-04 20:49:50 +08:00
Menghuan1918 89b85a82a8 merge #1111: feat(sidebar) 划选引用 chip 可点击回跳源文件并闪行段(合入前修正:二次点击 nonce、落盘失败回退、注册契约与文档)
# Conflicts:
#	CHANGELOG.md
#	CHANGELOG_EN.md
2026-11-04 20:48:47 +08:00
Menghuan1918 45b538283d merge #1099: feat(sidechat) 支持粘贴/选中图片(合入前修正:大 body 才计入准入、宿主附件错误分类、文档与常量收敛)
# Conflicts:
#	CHANGELOG.md
2026-11-04 20:47:47 +08:00
Menghuan1918 5de590e61f test: 引用 chip 的二次点击、落盘失败与真实注册契约 2026-11-04 20:46:52 +08:00
Menghuan1918 68778b36a0 chore(sidechat): share image constants and drop the dead transcript helper 2026-11-04 20:45:25 +08:00
Menghuan1918 7780387820 fix(sidechat): gate image prompt admission and classify host failures
Only a prompt body past the 1 MiB metadata cap is counted toward the concurrent image admission limit, so plain-text prompts are never rejected; exceeding the cap answers 413 too-large instead of a retryable 503. admitPromptContent failures now route on the host attachment code: oversized images are 413 too-large, storage faults are 500 sidechat-error, both keeping the host message.
2026-11-04 20:45:22 +08:00
Menghuan1918 85593d4769 merge #1112: feat(git) 容器工作区在 Git 面板顶部显示全部子仓库并可切换(#988 可见性后续)
# Conflicts:
#	CHANGELOG.md
2026-11-04 20:36:37 +08:00
Menghuan1918 5178cabcec merge #1101: fix(changes) 视角切换改用公开 SegmentedControl,删除对宿主私有 CSS 哈希类名的依赖(#1098) 2026-11-04 20:33:57 +08:00
Zabo f49bad2279 feat(git): show every child repository in the Git panel with a visible switcher
A container workspace (a project directory that is not itself a repository)
can hold several independent repositories. Discovery and `git.status`
already report all of them; the panel listed them only in the
"more actions -> repository" submenu, so nothing on screen said the others
existed and the body silently rendered repositories[0].

Render one chip per discovered root above the Changes section, mark the
root the panel is pinned to, and switch through the existing chooseRepo so
reads, mutations and the commit graph follow the selection. A single
repository workspace renders no row; the menu entry stays.
2026-11-04 16:55:51 +08:00
xiangzz 805a03f91f feat(sidebar): 划选「添加到对话」落可点击引用 chip(点击回跳源文件并闪行段)
- 移植到 dev 基线(#1052 / #1002 之上):只加「可点击 + 行段落地」,不重做 chip 本体
- 自有 input-trigger source `betterSidebarQuote`:`openReference` 校验会话后回跳,
  `codec.serialize` 在发送时还原成与升级前字节一致的 `路径:起止` + 围栏正文
- 行段末行走模块级一次性旁路 `src/client/line-target.ts`(key = path + line,cap 32),
  不写进宿主导航参数(宿主 `SidebarRightResourceParamsMap.file` 只声明了 `line`)
- 引用记录存 `localStorage`(`dsh-better-sidebar:quote-refs`,FIFO 200):模块同时进
  core bundle 与 lazy editor chunk,两个实例只能靠它互见;插入失败即回滚记录
- 行段闪光用 CodeMirror 行装饰 + 皮肤令牌 `--dsw-alias-interactive-bg-hover-accent`
- 三级降级:自有 chip → #1052 内置 chip → 纯文本,永不比升级前更差
- 新增 peer `@deepseek-ai/dsh-client-ui-input-trigger` `^0.2.1-rc.1`(DSH peer 增至 14 条)
- 文档:指南新增 §7.2,并补 `openFile` options / `FileViewerProps.lineEnd` / peer 说明;
  AGENTS §3、CHANGELOG 双语、README 双语、`docs/plans/2026-11-03-selection-quote-chip.md`
- 测试:`selection-quote` 23、`quote-flash` 13、`line-target` 7,`conversation-draft` +2
2026-11-04 01:47:15 +08:00
HootRock d3b887f179 fix: account for CSS page zoom in panel host geometry checks 2026-11-03 20:18:22 +08:00
Kunping Wang 3ce803c691 fix(changes): 修复 Changes 视角切换按钮样式 2026-11-02 20:57:24 +08:00
CCColastic 9601182720 test(sidechat): verify image input through a real host 2026-11-02 15:19:28 +08:00
CCColastic 00bb16ae6c fix(sidechat): guard model changes before image enqueue 2026-11-02 15:19:28 +08:00
CCColastic ba72fc4c9c fix(sidechat): defer image reads until message projection 2026-11-02 14:02:44 +08:00
CCColastic dcafe7d2dc fix(sidechat): restore thread bindings after page reload 2026-11-02 13:46:22 +08:00
CCColastic 23a2b61f33 feat(sidechat): accept pasted and selected image prompts 2026-11-02 13:37:43 +08:00
unsc9 06c384e5ba test(changelog): guard both changelogs against silent truncation
A merge can drop the release history without any test noticing (04c6cb8).
Assert both files keep the oldest release, stay above the historical floor,
and that English never lists a release the authoritative Chinese file lacks.
The truncated 41/27-line files fail both checks.
2026-10-30 11:58:43 +08:00
Menghuan1918 bd6cfa55b4 test(e2e): measure the folder-archive flow in the perf audit 2026-10-30 02:14:40 +08:00
Menghuan1918 0e643852c3 test(e2e): correct the audit seed comment (the tree cap is 1,000 rows) 2026-10-30 02:07:02 +08:00
Menghuan1918 f1323d6c57 chore(e2e): launch dsh web with --no-open and add the opt-in page/API perf audit 2026-10-30 02:01:47 +08:00
Menghuan1918 2c48ff451d test(e2e): match the visible preview copy, not the hidden editor's (mount-lane flake) 2026-10-30 00:20:29 +08:00
Menghuan1918 7bff1a1cb4 merge fix/949-951: block archiving side threads (#949), keep sidebar_open registered while settings are unreadable (#951) 2026-10-29 23:53:34 +08:00
Menghuan1918 d77adf25e3 merge fix/1009-card-toggles: hidden tab types are not settings cards (#1009) 2026-10-29 23:53:10 +08:00
Menghuan1918 d7483f6b33 fix(sidechat): disable archiving a side thread the host can never recover (#949)
The host's session list hides every subagent-origin row in ALL archive filters (sessionVisible() returns false before the filter), and its unarchive control only lives on those rows. Archiving a side conversation is therefore a one-way door with no entry left to recover it, so the composer-bar action is disabled for any bound session the list cannot show again, with a hover tip (all 21 dictionaries) explaining why and pointing at Save as new session. The handler keeps the same guard.
The archive-and-rebind path stays covered for a host-visible binding.
2026-10-29 23:51:47 +08:00
Menghuan1918 af0e7b7c9d fix(host): keep sidebar_open registered when the settings row is unreadable (#951)
The gate read an absent settings row (the host only lists entries whose fiber is ACTIVE) as the schema default false and unregistered a live tool mid-session. Read the switch tri-state instead: only an explicit boolean is a decision, so an absent row or a thrown read keeps the current registration.
Also re-evaluate right after a settings write and after the loader settles, so enabling the feature registers the tool for the first turn instead of waiting for an unrelated settings.get.
2026-10-29 23:51:45 +08:00
Menghuan1918 15b51ca55e fix(settings): stop inventorying programmatic-only tab types (#1009)
Hidden tab types (the built-in diff page, dsh-remote's dsh-remote:file)
have no + menu row and no native guide entry, yet the side-card inventory
still gave them an enable switch. Turning one off changed nothing in the
sidebar and only made openTab silently refuse that type - which the
reporter saw as "remote:file cannot be turned off / git:diff does
nothing", and dsh-remote saw as "remote files stop opening".

- SideCardSection: the inventory skips hidden types (the count badge
  follows); tabOrder becomes the order-only tabInventory.
- service.isTabEnabled: a hidden type is always enabled, so a
  tabsEnabled[id] = false written by an older build cannot keep refusing
  its programmatic opens.
- docs/external-plugin-guide.md and CHANGELOG describe the contract; the
  two new specs fail on the previous code.
2026-10-29 23:48:23 +08:00
Menghuan1918 dcd5cf66b1 merge fix/1014-panel-host-dvh: use 100dvh for the panel host (#1014) 2026-10-29 23:45:22 +08:00
Menghuan1918 eb7edb0818 fix(panel-host): 宿主高度改用 100dvh 回退 100vh,修掉手机端整页可拖动(#1014)
`height: 100vh` 取的是大视口:手机浏览器地址栏展开时该层比布局视口
(innerHeight)高,挂载自检把 rect.height 与 innerHeight 的差值当成页面级
transform,降级为 position:absolute 后高度计入文档并持续触发自检,整页可
上下拖动且不自愈。dvh 跟随动态视口(即 innerHeight),声明在 vh 之后;
不支持 dvh 的引擎在解析期丢弃该行、保留 vh,即 #616 的修复不变。

tests/panel-host-css.spec.ts 把高度声明整表钉为
['height: 100vh', 'height: 100dvh'],级联顺序即契约。
2026-10-29 23:44:40 +08:00
Menghuan1918 04c6cb8a10 merge review/mermaid-frame: #1040 sandbox-iframe mermaid layout isolation 2026-10-29 23:43:11 +08:00
Menghuan1918 ac8fcd5516 merge review/path-roots: #1079 UNC prefix, #1070 subdirectory session root 2026-10-29 23:42:13 +08:00
Menghuan1918 88c86abb11 merge review/markdown-links: #1067 angle-bracket link destinations, #1074 Side Chat local source links 2026-10-29 23:42:06 +08:00
Menghuan1918 2e691142da merge review/1083-editor-draft: #1083 confirm before an in-place file switch drops an unsaved draft 2026-10-29 23:41:57 +08:00
Menghuan1918 b1c33577be merge review/html-preview-mime: #972 serve preview assets with real MIME types 2026-10-29 23:41:47 +08:00
Menghuan1918 51f8cebda5 merge review/menu-submenu: #974 close the reduced-motion media query, #988 submenu flip tokens for Git More Actions 2026-10-29 23:41:37 +08:00
Menghuan1918 e17ab5c52e merge: keep the UNC prefix when folding separators (#1079) 2026-10-29 23:36:41 +08:00
Menghuan1918 845837f958 merge: keep a subdirectory session cwd (#1070) 2026-10-29 23:36:10 +08:00
Menghuan1918 56560e24a1 test(active-worktree): pin a subdirectory session cwd as the root (#1024) 2026-10-29 23:35:42 +08:00
Menghuan1918 e290059fd5 test(markdown): pin angle-delimited destination semantics with spaces 2026-10-29 23:31:27 +08:00
Menghuan1918 f1d52c9241 merge: PR #1074 (Side Chat local source links) 2026-10-29 23:31:01 +08:00
Menghuan1918 e790701791 fix(git): publish submenu flip tokens for More Actions (#988)
The More Actions menu's repo/worktree rows open nested submenus, but this button-anchored entry never called useSubmenuFlip — the body attribute layout.css consumes was absent, so even with #955's unclosed media query fixed the submenus still opened past the right edge of the docked sidebar.

Keep the trigger's measured corner in the menu state (a boolean cannot feed the coordinate-based hook, and a keyboard activation has no cursor point) and hand it to the same hook the file-tree row menu uses. The new test opens the real menu on a mocked right-edge trigger and pins the 'down left' tokens plus their removal on close.
2026-10-29 23:29:02 +08:00
Menghuan1918 27e9417e63 merge: PR #966 — bounded retry for concurrent same-name upload rename contention 2026-10-29 23:28:16 +08:00