Menghuan1918
783ac9feb6
merge #600 into dev(草稿保护/冲突门/替换;删掉与 #587 重复的查找接线与词典键,换掉已删图标名)
...
贡献者 PR #600(feat/editor-draft-protection,head a14c1e8)以 --no-ff 落到 dev
基线(9b97e6f)。贡献者的提交原样保留,冲突解决体现为本次合并结果。
保留(PR 独有):
- 草稿保护:src/client/editor-dirty.ts(脏稿登记表 + confirmDiscardDraft)、EditorHost
的登记/卸载清理、Sidebar 的 closeTab 门与 beforeunload、closePathTabs 的确认参数。
- 保存冲突门:fs.read 回报 mtimeMs、fs.write 的 expectedMtimeMs(409 fs-conflict,在写
临时文件之前判定)、TextEditor 的 mtimeRef + 冲突横幅 + onReload、wire 的
fs-conflict 码,以及 fs-write-route / text-editor-conflict 两个新 spec。
- 查找/替换入口:TextEditor 工具栏放大镜按钮(打开 #587 的面板;可编辑视图的面板自带
替换行),文案用 #587 的 searchFind。
删除(与 #587 / 2e22b90 重复的部分):
- TextEditor 里重复的那份查找接线:本地 searchPhrases()、EditorState.phrases.of(...)、
search({ top: true })、编辑器 keymap 里的 ...searchKeymap,以及 search / searchKeymap
两个 import——#587 的 src/client/cm-search.ts 已提供同一套(面板、keymap、phrases 隔间、
令牌主题)。
- 20 份词典里被 #587 取代的 10 个键:find / replace / findNext / findPrevious / findAll /
findMatchCase / findRegexp / findByWord / replaceOne / replaceAll(命名以先落的 #587 为准:
searchFind / searchReplace / searchNext / searchPrevious / searchAll / searchMatchCase /
searchWholeWord / searchRegexp / searchReplaceAll)。
- src/index.ts 里已被 2e22b90 覆盖的临时文件改名(.dsh-write-<uuid>):保留 dev 的
.dsh-sidebar-tmp-<uuid>,tests/fs-write-route.spec.ts 的残留断言改指 dev 命名。
- tests/text-editor-search.spec.tsx 中与 editor-find.spec.tsx 重复的三个用例(en/zh 文案、
Mod-f),只留「工具栏按钮开面板并切到编辑态」这一个独有用例。
- README / README_EN / 指南里未实现的 Ctrl/Cmd + H 声明(PR 从未绑定 Mod-h,且浏览器保留
该组合键),改为如实描述「Ctrl/Cmd + F 的面板含替换行」,并补上 #587 已支持的
Ctrl/Cmd + G / Shift + Ctrl/Cmd + G / Ctrl/Cmd + D。
其它解冲突取舍(dev 上下文已漂移,不复活 PR 基线代码):
- 图标:IconSearchOutline16 在宿主图标整族改名后已不存在,换为 IconSearchOutlineRegular
size={16}(显式尺寸;旧 16 后缀已删,不传会按新默认尺寸)。
- 采纳 dev 侧:fs.read 的 ensureWorkspacePath 两参调用、truncation 横幅不带 mode 条件、
fs.write 的编码探测与 invalidateDirectoryCache、Sidebar 的 closeTab 里 PR 基线的终端
pty 释放块(dev 已移走)与 summaryCwd/pushedBottomHeight/collapsed 块(dev 已删)。
- 测试 harness 跟随 dev:ctx.sidebarRight.mounted、bottomSplits、先打开底部工作台、
apply() 需要的 ctx.on、api 模块改为部分 mock(保留 sessionPhase / sessionCwd)。
- 取舍记录写入 docs/plans/2026-09-09-editor-draft-protection-design.md。
Refs #600
2026-10-05 01:58:18 +08:00
Atlas Zeng
9b97e6f273
Merge pull request #523 from wang-kaopu/fix/506-gbk-encoding
...
fix(editor): preserve original text file encoding
2026-10-05 01:51:01 +08:00
Atlas Zeng
bbae8b812c
Merge pull request #840 from Waser750/feat/sidechat-archive-thread
...
feat(sidechat): archive the bound side chat thread from the header
2026-10-05 01:50:41 +08:00
Menghuan1918
c386652817
merge #523 into dev(非 UTF-8 文件编码检测,写路由按 dev 新形状解冲突)
...
冲突只有两处上下文搬迁,均在 src/index.ts:
- 导入块:保留 dev 的 fs-batch / active-worktree 两行(含其注释),其后追加
PR 的 text-encoding 导入。
- fs.write:保留 dev 的写路由新形状(每请求唯一临时名 + flag:'wx'),
并把 PR 的 encodeText(content, encoding) 接进去(encoding 仍在重命名前
用 encodingOfFile(path) 从磁盘上的原文件探测)。
一并修掉证据实测的截断误判:读上限(readLimit / 64KiB 嗅探窗口)落在多字节
字符中间时,残留的部分字节会被 GBK 探测当成一个合法双字节字,导致 > 上限的
UTF-8 文件整段乱码、保存还可能按错编码落盘(Node v26 实测:三字节汉字缺 2
字节时 utf8=fatal 失败、gbk=成功)。现 decodeTextBytes 接受 truncated 标记,
在截断且尾部确为不完整 UTF-8 序列时按 UTF-8 处理(内容仍沿用原先的 U+FFFD
渲染);完整但不合法的尾部序列照旧交给传统编码探测。测试补齐:单测(三字节 /
四字节截断、完整非法序列不被误裁、>64KiB 嗅探边界)+ 路由级(GBK round-trip、
512KiB readLimit 截断的中文 UTF-8 读取)。
Refs #523
2026-10-05 01:42:41 +08:00
Menghuan1918
f20bd4b0f4
merge #587 into dev(编辑器内查找,README 发布历史与 TextEditor 上下文解冲突)
...
Ctrl/Cmd+F 文件内查找:接入 @codemirror/search 的 search({top:true}) +
searchKeymap,面板文案走 phrases facet(CmSearchPhrases 隔间,语言切换
就地 reconfigure),20 份词典各新增 15 键。
解冲突:
- README.md / README_EN.md:dev 重排了发布历史,冲突整块为过期上下文,
取 dev 侧;仅把 PR 的「文件内查找」快捷键表 1 行按 dev 版式补回。
- src/client/TextEditor.tsx:dev 的 #733 readOnly 行与 PR 的查找接线
插在同一锚点,两段都留(查找两行在 themeComp.of(dark) 之后,仍先于
编辑器自有 keymap,Escape 优先次序与 Mod-s 归属不变)。
Refs #587
2026-10-05 01:40:51 +08:00
Menghuan1918
b2e63d01f6
Merge branch 'pr-840' into resolve/pr-840
2026-10-05 01:40:01 +08:00
Atlas Zeng
b2599b390b
Merge pull request #802 from zhanghunuaa/feat/follow-active-worktree
...
feat(sidebar): 文件树跟随会话实际所在的 git worktree(含跨仓库 linked worktree)
2026-10-05 01:39:22 +08:00
Atlas Zeng
086deb05d7
Merge pull request #803 from MengJiapeng/fix/multi-repo-git-history
...
fix(git): keep history and status on the selected child repository
2026-10-05 01:38:35 +08:00
Atlas Zeng
d694b868b9
Merge pull request #828 from yanzhaohui1999/fix/826-file-link-line-suffix
...
fix(editor): 正文里 `[path](path:131)` 的链接去掉行号后缀再打开(#826 第一半)
2026-10-05 01:38:18 +08:00
Atlas Zeng
b64dea4032
Merge pull request #823 from lhh010/feat/plugin-list-file-trace
...
feat(plugins): add dsh-file-trace to the built-in tab catalog
2026-10-05 01:38:01 +08:00
Menghuan1918
03575e1b67
merge fix/479-quote-directory-mention(Refs #479 )
2026-10-05 01:37:27 +08:00
Menghuan1918
3b5fabe2a4
merge fix/765-git-path-base(Refs #765 )
2026-10-05 01:37:27 +08:00
Menghuan1918
c5d8b13aa7
merge #802 into dev(文件树跟随活动 worktree,按 dev 原位解冲突)
...
三处冲突都是 main/dev 侧后插入行与变量改名造成的上下文漂移,被改的目标代码在
dev 上逐字仍在,按 dev 原位解(不是回退到 PR 的旧上下文):
- src/index.ts 导入区:保留 dev 新增的 FS_TREES_MAX_PATHS 导入与注释,同时加
activeWorktreeRootOf 导入——两边都要;
- src/index.ts /sidebar/file 路由:保留 dev 的路径解析注释(dev 里本来就重复了
一份,本次不顺手清理,避免把无关改动混进合并),cwd 改走 activeWorktreeRootOf;
- src/client/Sidebar.tsx:删掉 summaryCwd(改由 useSessionRoot 提供根),保留
dev 插入的「空白会话」注释;
- src/client/native/tab-adapter.tsx:保留 dev 的 seat/scope 双会话命名与注释,
useSessionCwd(ctx, scopeSessionId) → useSessionRoot(ctx, scopeSessionId)。
落地方另修三处(PR 自带 spec 在本机 macOS 上红,逐条有实测证据):
1. src/active-worktree.ts 的 normalizeActivePath 把分隔符一律折成反斜杠,POSIX
路径随即不再 isAbsolute 而被 addActivePath 丢弃——该特性在 Linux/macOS 上
静默空转(只在 Windows 上有效)。改为折成平台分隔符 sep;Windows 上 sep 就是
反斜杠,行为不变。
2. active-worktree.ts 的根缓存改到 git 探测之前查询,并缓存「不在仓库里」这一
结果:探测是一次真实 spawn(实测 ~6.5ms/次),此前每个 watch 帧、每个路由
调用都要付一遍。dev 的 tests/zip.spec.ts「第 5 个并发构建被拒」正因此从 5/5
绿变成 5/5 红(A/B:只回退 cwdOf 包装即恢复绿),本改动后该用例恢复 5/5 绿。
3. tests/active-worktree.spec.ts 的期望值改用 realpathSync.native:根来自
`git rev-parse --show-toplevel`,本就是规范化路径,macOS 的 /var →
/private/var 会让 resolve() 断言恒红(与 tests/git-worktree.spec.ts 同款写法)。
Refs #802
2026-10-05 01:35:58 +08:00
Menghuan1918
eed2fee0e6
fix(client): 含空格的目录 @ 引用补引号,让宿主能识别成 folder(#479)
...
宿主的两处 token 读取都只认「引号闭合」的目录写法:
`FOLDER_REF_RE`(dsh-client-ui-conversation)的引号分支是 `@"[^"\n]*\/`,
消息气泡的 `@"[^"\n]+"` 也只在闭合时才把 token 判成 folder;而插件目录分支
原先直接拼 `@${rel}/`,含空格目录 `@my dir/` 在补全扫描里完全不命中、在气泡里
退化成只覆盖 `my` 的 file 芯片——文件分支经 fileMention 加引号,目录分支没有,
同一套引号规则被写了两遍,只有一份对。
把「构造 mention 字面量」抽成 conversation-draft.ts 的共用纯函数
`mentionFor(path, kind)`(fileMention 并入,两个调用点:insertFileReference 与
referenceInChat 的目录分支),沿用原有的控制字符/引号拒绝守卫;目录的尾斜杠拼在
引号内侧(`@"my dir/"`)。宿主自己的选择器在补全途中发的是开引号形式
(`@"my dir/`),那是未完成的补全态、气泡里同样判成 file;本插件的动作插入的是
一条完成的引用,所以闭合引号。
行为不变:无空格目录仍是 `@docs/`、cwd 仍是 `@./`、无空格文件仍是 `@notes.md`,
文件分支的引号与 chip 路径逐字未动。宿主 FOLDER_REF_RE 仍能读到 `@"my dir/`
(闭合引号落在 token 之外),文件夹补全不受影响。
验证:pnpm typecheck(exit 0);pnpm exec vitest run --maxWorkers=3(151 files /
1678 passed / 13 skipped);npx eslint 四个改动文件(exit 0)。
tests/reference-in-chat.spec.ts 把目录分支回退到旧写法后 2/7 红(草稿变成
`@my dir/`、守卫路径重新写入不可表示路径)。guide §4.2 的 onReferenceFile 说明
同步引号形式。
Refs #479
2026-10-05 01:31:29 +08:00
Menghuan1918
b4794eb549
merge #823 into dev(推荐目录新增 file-trace 条目,词典 key 位置重锚)
...
Refs #823
2026-10-05 01:31:18 +08:00
Menghuan1918
dbf9a4c1b7
merge #803 into dev(多仓库 worktree 的 git 校验,smoke 导入行解冲突)
...
Refs #803
2026-10-05 01:31:10 +08:00
Menghuan1918
582f814d5e
merge #828 into dev(fileParamsOf 剥掉 path:line 行号后缀,解上下文冲突)
...
贡献者 PR #828(fix/826-file-link-line-suffix,2c5b762)修 issue #826:
宿主 markdown 语法只认 `#L131`,`path:131` 会被 parseFileLink 整串当文件名,
editor tab 于是去读一个叫 `CMakeLists.txt:131` 的文件并报「文件不存在」。
改法是在插件唯一把文件地址转成合成记录的那一步(native/index.ts 的
fileParamsOf)切掉尾部行号规格,tab 标题同源修正;新增纯函数
src/client/path-line.ts 与 tests/path-line.spec.ts。
解冲突:只有 tests/native-surface.spec.ts 的第 9 行 import 块冲突。
dev 侧多了 `import { createNativeSurface } from '../src/client/native/surface.ts'`
(PR #696 移植),PR 侧把同一行改成 `import { fileParamsOf, registerNativeSurface }`。
两边都要,合为两行;docs/external-plugin-guide.md 由 git 三方合并自动解掉
(PR 新增的「地址里的行号(#826)」行与 dev 新增的「文件打开的认领判定」行并存)。
未改贡献者任何实现意图,未 rebase / squash 其提交。
Refs #828
2026-10-05 01:30:34 +08:00
Menghuan1918
130d45dbc7
fix(git): git.diff/git.discard 按仓库根解析状态行路径,不再打中子目录同名文件(#765)
...
根因:`resolveGitPath` 对相对路径先试「会话相对」(`join(cwd, raw)` 存在即采用),
仓库根只作兜底;而变更树的行携带的本来就是**仓库根相对**路径(`git status` 原样
透传)。于是会话 cwd 位于仓库子目录、且该子目录里恰有同名文件时,`git.discard`
还原的是子目录那份(issue 的「还原错文件」),`git.diff` 预览的也是子目录那份
(「预览错内容」)——`git -C <repoRoot> checkout -- <解析结果>` 按其自身基准执行,
与「会话相对」这个猜出来的基准不一致。
只改这两条路由:它们是**状态行驱动**的路径,基准由 git 自己给定(仓库根),新增
`resolveStatusPath` 显式按仓库根判定,与后面 spawn 的 `git -C <repoRoot>` 同基准。
`fs.read` 的会话相对优先语义**保持原样**:编辑器 / 文件树的相对路径本就是会话相对
的(`tests/smoke.spec.ts` 的 `src/git.ts` 一类契约),改成仓库根优先会推翻既有
语义;未跟踪文件的 diff 回退本就送绝对路径,不受影响。`src/git.ts` 零改动。
测试:`tests/smoke.spec.ts` 新增「子目录同名文件」用例(会话 cwd=<repo>/pkg,
`git.discard {path:'README.md'}` 命中仓库根那份、子目录那份仍脏;`git.diff` 预览
仓库根那份),修复前两条均红、修复后全绿。
Refs #765
2026-10-05 01:30:34 +08:00
Menghuan1918
4a03e131e5
fix(diff): 会话镜头 diff 的超大输入退化为全删全增,不再建稠密 LCS 表(#734)
...
rows.ts 的 lcsTable 是无护栏的稠密普通数组矩阵(每单元约 8 字节),成本
完全由输入行数乘积决定。实测:1000×1000 → 8MB、3000×3000 → 71MB、
5000×5000 → 193MB、10000×10000 → heapDelta 765MB(峰值 RSS 865MB)。
会话镜头把上一次 write 的完整文件内容当 prior 传进 diffOf(ops.ts 对
content 无字节/行数截断),选中一个 op 就在 useMemo 里同步跑完,因此一份
万行文件的改动预览会一次性吃掉数百 MB 主线程内存。
护栏落在 diffLines 内部、lcsTable 调用之前(它是会话镜头唯一的 LCS 入口,
一处覆盖 diffOf 的三个分支):新增导出常量 MAX_LCS_CELLS = 4_000_000
(≈32MB,仍精确覆盖 2000×2000 的重写配对),判定
oldLines.length * newLines.length;超限不建表,直接产出全删(oldLines
顺序,oldLine 1..n)+ 全增(newLines 顺序,newLine 1..m)。
退化路径同时跳过 pairMods:在没有找到任何对齐的情况下,del 段与 add 段
会被成对标成 mod,那不是「已判定为改写」。所以退化语义是无 context、无
mod,只有 del/add。10000×10000(中间改一行制造错位)实测 0.44–0.96ms,
原实现为 592ms/765MB;渲染侧既有 MAX_ROWS = 600 截断,无需新增提示文案。
测试新增规模用例(20000 行、kind 全为 del/add、两侧行号严格递增
1..10000、单次耗时 < 2000ms,阈值按慢 CI 放宽)与边界用例(恰好
MAX_LCS_CELLS 时仍走表路径)。
Refs #734
2026-10-05 01:29:00 +08:00
Menghuan1918
1da9e92f79
chore(plugin-list): dsh-memory-delta 的 pin 抬到 v1.3.3
...
#821 把 v1.0.0 抬到 v1.3.1(作者当时的 latest)。上游随后发了两个补丁版,
都直接影响这个目录条目的可用性:
- v1.3.2 修掉「better-sidebar 服务晚到时记忆页签静默不注册」,并补上
better-sidebar 0.19+ 要求的 description——本目录就是 better-sidebar 自己的
插件安装弹窗,pin 到 v1.3.2 之前等于推荐一个在我们服务上会静默失效的版本;
- v1.3.3 修掉差分侧车不落盘(每次重启重灌全量记忆)。
一行改动,与 #821 同一意图(抬到当前可用版),故直接续在其后而不是另开 PR。
Refs #821
2026-10-05 01:26:20 +08:00
Atlas Zeng
f32eb6d305
Merge pull request #843 from PerryLink/docs/prune-dead-catalog-entries
...
docs(catalog): remove the two entries whose repositories no longer exist
2026-10-05 01:26:06 +08:00
Atlas Zeng
5cf7768dbb
Merge pull request #842 from UNscientific-9/fix/checkout-end-of-options
...
fix(git): checkout 的分支名不再被当成选项(补 4100e16 漏掉的那处)
2026-10-05 01:25:51 +08:00
Atlas Zeng
d3df20e8c9
Merge pull request #837 from dat-lequoc/fix/editor-visibility-remeasure
...
fix(editor): remeasure parked CodeMirror views
2026-10-05 01:25:36 +08:00
Atlas Zeng
5b3e9991c3
Merge pull request #821 from lpf20200901/feat/plugin-catalog-memory-delta-v1.3.1
...
chore(plugin-list): bump the dsh-memory-delta install pin to v1.3.1
2026-10-05 01:25:20 +08:00
Menghuan1918
d35f622e66
merge dev into fix/host-load-without-session-log-offset-runtime
...
# Conflicts:
# src/sidechat-routes.ts
2026-10-05 00:55:34 +08:00
Atlas Zeng
00801f5289
Merge pull request #818 from btsd321/feat/tabbar-right-actions
...
feat(tabbar): 新增 TabDescriptor.rightActions,活跃 tab 可注入 tab 栏右侧操作区
2026-10-05 00:54:50 +08:00
Atlas Zeng
e864dabe6f
Merge pull request #814 from ZinChl/fix/tasks-fold-guards
...
fix(tasks): 任务页折叠守卫的三处不一致(根卡死控制 / run 成员绕过 leaf 测试 / 文档矛盾)(#784)
2026-10-05 00:54:34 +08:00
Atlas Zeng
c571e96c65
Merge pull request #813 from ZinChl/fix/subagent-running-after-restart
...
fix(tasks): 会话「驻留」不再当作「agent 在跑」——崩溃重启后的子代理状态(#800)
2026-10-05 00:54:18 +08:00
Atlas Zeng
c7980cee7c
Merge pull request #811 from ZinChl/fix/fs-trees-batch-split
...
fix(files): fs.trees 按宿主上限分块,展开集 ≥64 的会话不再整树报错(#799)
2026-10-05 00:53:58 +08:00
Atlas Zeng
ce3527ca1e
Merge pull request #809 from ZinChl/fix/archive-status-session-scope
...
fix(files): 修「压缩并下载」必然失败——archive.status 缺 sessionId + ready 交接无护栏(#798)
2026-10-05 00:53:43 +08:00
Atlas Zeng
40f0255ad0
Merge pull request #807 from graydovee/fix/blank-session-bottom-entry
...
fix(client): 空白新会话里恢复「打开底部工作台」入口(#698 / #623)
2026-10-05 00:53:27 +08:00
Atlas Zeng
10e99dba7e
Merge pull request #806 from ZinChl/fix/search-result-directory-click
...
fix(files): 搜索结果里的目录行改为导航文件树,不再当文件打开(#801)
2026-10-05 00:53:09 +08:00
PerryLink
fa529fcaff
docs(catalog): remove the two entries whose repositories no longer exist
...
Both repositories are 404, so the install commands cannot succeed.
Removes 2 entries + their 4 i18n keys from all 20 dictionaries (locale parity preserved).
Upstream base: omdsh-dev/DSH-better-sidebar@fc09d1e581
2026-10-04 21:51:35 +08:00
unsc9
9c248d0933
fix(git): checkout 的分支名不再被当成选项(补 4100e16 漏掉的那处)
...
`git.checkout` 把调用方给的分支名当裸操作数拼进 argv,所以 `-f` 被 git 的选项解析器吃掉,直接强制覆盖工作区并丢弃未保存的改动(`--work-tree=…` 则重定向 checkout)。同批加固 4100e16 给 show / commitDiff / revert / cherryPick 四个兄弟调用都加了 `--end-of-options`,只漏了这一处。
实测(真实 git,临时仓库):加哨兵前 `checkout -f` 退出码 0 且未保存改动被覆盖;加哨兵后 `-f` 与 `--work-tree=…` 均被拒且改动保留,正常分支名照常切换。
回归用例:tests/git.spec.ts「never lets a branch operand reach git as an option (checkout)」。
2026-10-04 21:47:17 +08:00
waser0434
477f6271dc
feat(sidechat): archive the bound side chat thread from the header
...
A side chat thread is a real session owned by the host, so archiving it is the
host's own capability (`uiWorkspace.archiveSession(id, { stopActivity: true })`,
the same action the session list's row menu uses) and the current archive set is
read back from `workspaces.list` (`archivedSessionIds`, subscribed via
`useSyncExternalStore`). The plugin's existing `archive` feature is unrelated
(file-tree zip).
Two consequences the view has to honor:
- Archived threads leave the switch menu. The host hides archived sessions from
the session list and refuses to open them ("Archived sessions cannot be
opened"), so keeping them listed would offer a thread that can only dead-end
the panel.
- Archiving the thread this tab is bound to re-binds the tab instead of leaving
it on an archived session: the newest remaining thread that already carries a
real first prompt (creation order comes from the host's subagent catalog),
the newest placeholder only if nothing else is left, and otherwise an unbound
tab that falls back to the empty state.
The button sits next to the switch/save icons and is disabled while the thread
is running or another operation is in flight, with `sideChatArchiveRunning`
explaining the running case.
i18n: `sideChatArchive` / `sideChatArchiveRunning` are added to zh + en and to
all 19 third-language dictionaries (key-set parity is enforced by
tests/locales.spec.ts). The zh-HK/MO/TW entries follow those files' existing
`archive -> 歸檔` convention; the other 16 are drafts that still want a native
review.
2026-10-04 15:10:16 +08:00
LE Quoc Dat
db563ca76c
fix(editor): remeasure parked CodeMirror views
2026-10-03 20:54:00 +00:00
ymac
2c5b7621dd
fix(editor): 正文里 [path](path:131) 的链接去掉行号后缀再打开 ( #826 )
...
DSH 的 markdown 链接语法只认 GitHub 的 `#L131` 片段:目的地没有 `#` 时
`parseFileLink` 把整串当文件名返回。于是模型按编译器诊断的通用写法输出的
`[a/b.c](a/b.c:131)` 变成一次对 `b.c:131` 的文件打开,编辑器读不到、右侧栏
红字报「文件不存在」。
宿主源码不可改,纠正放在插件唯一把文件地址变成合成记录的那一步
(native/index.ts 的 fileParamsOf):尾部行号规格(`:行` / `:起-止` /
`:行:列`)在这里切掉,tab 标题按切完的文件名给(宿主用同一个字符串推导标题,
否则芯片上会写 `b.c:131`)。切完之后读、写、"打开方式"、去重、viewer 匹配
拿到的都是真实路径,所以没有需要重试或记住的状态。
切分规则与宿主的 `#L` 语法对齐:1 起、无前导零、锚在串尾(`data:2024.csv`
和盘符 `C:` 因此原样通过),并拒绝空前缀、只剩一个字符的前缀(`C:131`)和
倒序区间(`a.c:20-12`)。
取舍:从聊天链接打开一个真名以 `:数字` 结尾的文件会丢掉后缀。文件树 / 搜索 /
插件自有流程的路径不经过这一步(只有 `openResource` 的地址会),而 `:` 在
Windows 上本就不是合法文件名字符。
测试:新增 tests/path-line.spec.ts(9 例,含全部「必须原样通过」的反例);
tests/native-surface.spec.ts 补 fileParamsOf 四例 + editor 类型对带行号地址的
标题。typecheck / lint 全绿;全量 1503 passed,tests/locales.spec.ts 的 ja
词典缺 key 在干净 origin/main 上同样失败(既有问题,不在本 PR 范围)。
2026-10-01 22:05:56 +08:00
lhh010
1f4409010f
feat(plugins): add dsh-file-trace to the built-in tab catalog
...
Entry-only addition per the maintainer direction on #780 : the present-files
tracking moved into the standalone dsh-file-trace plugin (v0.3.24), which
registers its native tab through ctx.betterSidebar.registerTab (optional
peer; standalone floating window without better-sidebar). Install line
installs the prerequisite first, then the pinned github: tag (committed
lib/, no build needed).
2026-10-01 19:33:02 +08:00
HuanLinOTO
9cc40472f8
fix(paths): Copilot review 四条全修——共享解析契约贯穿 media/html/fs 变更入口
...
- html 路由 decoder 保留 ~ 首段原样(~/x.html 不再被拼成绝对 /~/x.html),
encoder/decoder 往返与相对资产解析均保持 ~ 标记(#713)
- media/download 路由去掉 isAbsolute 预拼接,raw 直达 ensureWorkspacePath
(~ 展开不再被 cwd 前缀遮蔽);fs.trees 同型守卫
- fs-operations 的 rename/remove/mkdir(resolveEntry)与 upload(base)全部
改走 resolveTarget 共享契约,会话相对路径四入口齐活(#646/#713)
- session-path 的 fs 落盘 remote-mirror 用例改为 Windows-only(win32.join 的
meta 路径拼写在 POSIX 上不指向已创建文件,修 ubuntu ci 红)
新用例 8 个;四处变异验证(还原任一修复对应测试必红)。
2026-10-01 18:41:27 +08:00
HuanLinOTO
0500aa045a
Merge PR #789 (ported): fix(files): 在途层渲染 loading 行,消除新展开文件夹的空目录闪烁(移植到 loadLevels 新形状,#693 #687)
2026-10-01 17:46:52 +08:00
lpf20200901
bb2e66de04
chore(plugin-list): bump the dsh-memory-delta install pin to v1.3.1
...
v1.0.0 writes a custom source.kind into DSH session logs; on kernels up to
0.1.6 the v2->v3 migration refuses the whole session over it, and it predates
every fix since. v1.3.1 writes plugin:dsh-memory-delta, which both format
generations accept. One line, no locale keys touched.
2026-10-01 17:26:41 +08:00
HuanLinOTO
84d89067d4
Merge PR #696 (ported): fix(editor): 打开文件先问原生 tab 注册表,被认领的类型不再被硬编码 editor 顶掉(移植到 sidebar-file.ts 新载体,Fixes #695 #643)
...
# Conflicts:
# src/client/EditorHost.tsx
2026-10-01 17:22:00 +08:00
HuanLinOTO
4836e25aad
fix(train): 合车适配——#730 图标改用改名后的 IconPanelLeftOutlineRegular;#736 测试适配 #776 按会话记账签名
2026-10-01 17:21:42 +08:00
HuanLinOTO
56567b3c4d
fix(editor): 打开文件先问原生 tab 注册表,被认领的类型不再被硬编码 editor 顶掉(#696 移植到 sidebar-file.ts 新载体,Fixes #695 #643)
2026-10-01 17:21:10 +08:00
HuanLinOTO
37fb9204b0
fix(paths): ~ 是主目录路径而不是会话相对路径,展开后再解析(Fixes #713,随 Phase 2 路径簇顺带修)
2026-10-01 17:20:06 +08:00
HuanLinOTO
3345b72699
Merge PR #744 (extracted): fix(paths): 识别 remote-mirror 工作区命名空间投影(#788 #703;html-cwd 半边已由 d71261ac 覆盖)
2026-10-01 17:18:49 +08:00
HuanLinOTO
0f9c7578c0
Merge PR #677 (ported): fix(files): 目录级别加载失败不再被当成缓存命中,自动加载路径可重试(移植到 loadLevels 新形状)
2026-10-01 17:18:49 +08:00
HuanLinOTO
4aaead5b74
Merge: 补齐第三语言词典缺键(i18n 门禁修复,BUG-FIX-261001 附 E 第 2 条)
2026-10-01 17:18:42 +08:00
HuanLinOTO
d23bbde0f7
Merge PR #769 : fix(open-external): support Termux (platform android) openers
2026-10-01 17:18:31 +08:00
HuanLinOTO
470ff579a2
Merge PR #730 : fix: match bottom toggle to the native outline panel icon
2026-10-01 17:18:31 +08:00