Menghuan1918
648ff27b5f
chore: 版本号升至 v0.12.2(位置兼容模式随本次发布)
2026-08-15 15:37:31 +08:00
Menghuan1918
7ee0b457a3
feat: CI 挂载冒烟门禁 — npm 打包 → 真实挂载 DSH → 无头渲染防 crash
...
新增 plugin-mount job(pnpm test:mount):
- scripts/e2e-mount.sh:scratch profile 引导(allowBuilds/minimumReleaseAgeExclude 预写)→ 官方
dsh plugin --profile web add file:<tarball> 挂载(dsh.profile.bundles 协调校验)→ keyless
dsh web --port 0 → Playwright 无头渲染 → trap 清理
- tests/e2e/mount.e2e.ts:seed 工作区+会话(宿主 RPC)→ 断言 #root 与 [data-dsh-better-sidebar]
挂载、无崩溃标记(错误条/pageerror/插件 console 错误)→ + 菜单逐个打开内置 tab 深扫
- playwright.config.ts:chromium headless、单 worker、retries 0、失败留 trace/截图/HTML 报告
- vitest exclude 与 *.e2e.ts 命名双保险隔离;exclude 整体替换默认值,须保留默认排除项
- CI 钉住 @deepseek-ai/dsh@0.1.0-rc.6;DSH_TELEMETRY_DISABLED=1;workflow_dispatch + PR 并发取消
已验证:本地端到端全绿;人为注入 tab 组件 crash → 门禁变红(错误条检出),还原后变绿;
typecheck/vitest 全绿;CI 同款 npm 安装 CLI 路径实测通过
2026-08-15 01:21:21 +08:00
Menghuan1918
4e275aa321
chore: v0.12.1(0.12.0 被 npm 判定已发布过无法复用,正式版改用 0.12.1;README 版本号同步)
2026-08-15 00:36:09 +08:00
Menghuan1918
ef8a707da8
chore: v0.12.0(正式版)
2026-08-15 00:33:26 +08:00
Menghuan1918
83a658efd4
chore: v0.12.0-beta.1(版本三处同步,api-surface 测试放行预发布版本号)
2026-08-15 00:28:59 +08:00
Menghuan1918
2bcfdfce87
chore: 移除 Office 预览相关依赖与产物声明
...
- dependencies 删除 @aiden0z/pptx-renderer / @univerjs/preset-sheets-core / @univerjs/presets / docx-preview / xlsx
- files 删除已废弃的 lib/client-docx|xlsx|pptx.js 声明
- pnpm-lock.yaml 同步更新
2026-08-14 22:37:23 +08:00
Menghuan1918
0995a58454
fix: 回应独立 CR 的 P2/P3 意见(0×P1)
...
- P2-1 onOpen 收到真正落地的 tab:url 新建场景从 landed 态按 id 反查
(补丁后对象),回调不再拿到未打 url 的 tab
- P2-2 插件设置行显式取值源:FeatureSettingsRows 新增 valueSource prop,
插件行读自己的 pluginSettings blob——插件键与宿主 pref 同名时不再
静默读宿主值(原投影合并有读宿主写插件的读写不对称);prop 命名避开
Object.prototype.valueOf 冲突
- P2-3 consumer 类型检查接入工程:package.json 新增 check:consumer-types
脚本 + CI 在 build 后执行;脚本补 lib/types 存在性前置检查(防假绿)
- P3-1 url seed 只在新建时应用:dedupe 聚焦的 tab 不再被覆写 path
- P3-2 closeTab/activateTab 未知 id 严格 no-op:store.reduce 对同引用
结果短路(不 notify、不重写 localStorage),根因修复 + 回归测试
- P3-3 closeTab/activateTab 增加可选 scope(cwd 随回调传递),Sidebar
双树激活/关闭路径传入 { sessionId, cwd }
- P3-4 定向打开不再自动展开不可见 session 的面板
- P3-5 Sidebar 终端 pty 释放查找覆盖双树(底部面板终端不再漏掉 HTTP
兜底)
- P3-6/P3-7 与 Nits:AGENTS.md/指南文档化(dedupeKey 纯函数、meta 用
null 清除、回调 scope 的 cwd 语义);consumer fixture 补常量导出覆盖
测试 +6(url 落地保真 / url 不覆写聚焦 / 未知 id 无 notify / 定向打开
不展开 / scope 随回调 / valueSource 键隔离),464 全绿;typecheck、
build、consumer 校验全部通过。
2026-08-14 21:28:41 +08:00
Menghuan1918
82a69546d2
feat: 公共 API 基座化(v0.12.0,纯增量)— 类型/能力/设置 seam 全面补齐
...
- 类型生态:service 模块 re-export SidebarTab/SidebarState/SidebarStore/
SidebarSnapshot/SidebarDiffRef/TabType/SessionScope/SidebarPrefs 等公共
状态词汇(此前 TS2459 无法命名);context-types 去 Node 依赖(结构镜像
SidebarHttpRequest/Response/UpgradeSocket/Head),client 可达声明图零
node:* 引用,外部消费者无 @types/node + skipLibCheck:false 可编译
(scripts/check-consumer-types.sh 守护)
- 服务能力:version/features 版本与能力探测(单调只增)、getSnapshot/
subscribeState 状态订阅、updateTab(title/path/meta)、activateTab、
openFile(路径派生 id 与内置拦截一致)、openTab(seed, scope?) 定向到
指定 session(store.reduceFor 不扰动 UI)
- TabDescriptor:badge 角标(99+ 封顶,抛错吞掉)、onOpen/onActivate/
onClose 生命周期回调(service 路径派发,dedupe 聚焦触发 onActivate
而非 onOpen,抛错不打断流程);SidebarTab.meta JSON 可序列化跨刷新
持久化(sanitize 宽松保留)
- 设置 seam 开放:PrefsSchema 增 pluginSettings 开放嵌套 map(z.dict),
settings.pluginToggles(插件自有行,同 switch/text/number 控件)与
settings.render(自定义面板,含 store/service/prefs/updatePluginSetting/
close props);viewer 卡片 v0.12.0 起也有齿轮设置弹窗
- FileViewerDescriptor.load 增第三参 AbortSignal(EditorHost 生命周期中止)
- UI 接线:tab 激活/关闭改走 service(跨树激活修复 + 回调触发)、+ 菜单
传 scope、TabBar badge pill 渲染;active-session scope 走原 reduce 路径
保证 notify
- 测试 +23:生命周期/定向打开/updateTab/activateTab/openFile/meta 持久化/
reduceFor/能力常量(与 package.json 锁步)、consumer-types.ts 编译门、
api-surface.spec.ts(client 图零 node 依赖守护);既有 430 测试全绿
- 文档:AGENTS.md 修 available 三参示例并补全部新 API;external-plugin-
guide.md 刷新至 v0.12.0(7 tab + 9 viewer、设置 seam 开放、类型导入
路径建议);README×2 服务化小节同步
未发版 npm(用户决定);分支 feat/plugin-api-v012。
2026-08-14 20:44:43 +08:00
Menghuan1918
d83490c93e
feat: 终端二级设置支持自定义字体(字体族 + 9–32px 字号,实时生效)
...
- SidebarPrefs 新增 terminalFontFamily(空 = 跟随主题等宽字体)/ terminalFontSize(9–32,默认 13),PrefsSchema 与 parsePrefs 同步校验
- 声明式设置 API 扩展:SidebarSettingToggle 支持 type: 'switch' | 'text' | 'number'(缺省 switch,向后兼容)+ min/max/placeholder/unit
- 终端卡片齿轮弹窗新增「终端字体」「终端字号」两行:blur/Enter 提交、number 钳制、提交失败回滚草稿
- TerminalView 经 store 订阅实时应用字体(options + re-fit + resize),懒加载 chunk 无新增依赖
- 新增 resolveTerminalFont 纯函数(回退链:用户字体 → 主题 token → 内置等宽栈)并单测
- 版本 0.11.0,README/AGENTS.md/设计文档同步
2026-08-14 14:36:49 +08:00
Menghuan1918
e128c303bc
feat: 新增 Windows PowerShell 一键安装脚本 install.ps1,README 安装章节两平台同步
...
- scripts/install.ps1:官方 CLI 方式一键安装(PowerShell 5.1+/pwsh),
与 install.sh 对齐:预写 allowBuilds + minimumReleaseAgeExclude(幂等)、
执行 dsh plugin add、幂等清理旧手动挂载行;支持 -Version/-Restart/-DryRun。
- scripts/install.sh:加固 — -h/--help、Windows Git Bash 下 DSH_HOME 回退
$USERPROFILE、npm/pnpm view 双通道解析最新版本、失败提示细化、挂载行
清理改为逐块扫描(删除注释块跟随)。
- README.md:安装章节改为「① 前置 → ② 对应平台一键命令 → ③ 重启硬刷新」,
macOS/Linux 与 Windows PowerShell 双命令示例。
- package.json:files 列表纳入 scripts/install.ps1。
2026-08-14 00:48:44 +08:00
Menghuan1918
8bf6d1d7ba
chore: v0.10.3 — 发布 turnTail 拦截 slots.inject 修复(issue #15)
2026-08-14 00:41:10 +08:00
Menghuan1918
9fdb44d9f9
feat: 支持官方 CLI 一行安装(dsh plugin add dsh-better-sidebar)
...
- package.json 声明 dsh.bundle.patch(./cordis.patch.yml),随包发布挂载
patch;dsh plugin --profile <name> add dsh-better-sidebar@<v> 自动完成
安装 + 注册到 dsh.profile.bundles + 下次启动挂载(无需手写挂载行)
- cordis.patch.yml:bundle 挂载层(insert better-sidebar)
- scripts/install.sh:改走官方 CLI;预写 allowBuilds(node-pty/protobufjs)
规避 pnpm 11 strict-dep-builds 非零退出;幂等移除旧手动挂载行防双挂载
- README(EN):安装置顶官方 CLI 一行命令
v0.10.2
2026-08-13 23:19:05 +08:00
Menghuan1918
e515d74f77
chore: v0.10.2 — 发布 [data-slot] 布局修复
2026-08-13 22:54:19 +08:00
Menghuan1918
a85d1ab004
feat: v0.10.1 — 新增一键安装脚本 scripts/install.sh,README 安装置顶 npm 方式
...
- scripts/install.sh:把插件以 npm 包形式装进 web profile(幂等写依赖 + 挂载行 + pnpm install;支持版本参数 / --restart / --dry-run)
- 版本 0.10.0 -> 0.10.1(修正 npm 元数据 repository URL 到 omdsh-dev)
- scripts/install.sh 纳入发布 files
2026-08-13 22:42:26 +08:00
Menghuan1918
1b7014b2d4
docs: 仓库迁移至 omdsh-dev/DSH-better-sidebar,更新 URL 引用
2026-08-13 22:29:20 +08:00
Menghuan1918
64c6aa477e
chore: v0.10.0 npm 发布准备
...
- @deepseek-ai/* 依赖换为实际发布版本(dsh-* ^0.1.0-rc.6、cordis ^4.0.1),
补齐 dsh-client-locale peer/dev 声明(对齐 dsh.client.inject)
- pnpm-lock.yaml 重新生成(移除旧 0.0.1-rc.1 图;锁文件不再引用未公开的 dsh-type-meta)
- pnpm-workspace.yaml 补 minimumReleaseAgeExclude 新版本条目
- src/context-types.ts 增加 @deepseek-ai/cordis 双 augmentation
- package.json 发布脚手架:publishConfig.access、prepublishOnly、files 含 README_EN/LICENSE
- README 版本注释同步(^0.1.0-rc.6 / dsh@0.1.0-rc.6)
2026-08-13 22:25:20 +08:00
Menghuan1918
2e9db44a71
chore: v0.9.0 — 版本升级(适配 DSH 命名契约重命名)
2026-08-13 09:07:19 +08:00
Menghuan1918
422d5e3c10
chore: v0.8.2 — 版本升级(跟随 DSH 的 i18n)
2026-08-13 00:43:36 +08:00
Menghuan1918
9c5293c94b
feat: 界面文案跟随 DSH 的 i18n(ctx.locale 语言偏好、实时切换、词典入注册表)
2026-08-13 00:43:28 +08:00
Menghuan1918
983d2b2d71
chore: v0.8.1 — 版本升级(任务输出回放活事件镜像)
2026-08-12 23:04:30 +08:00
Menghuan1918
8c521be26e
chore: v0.8.0 — 任务管理页(子代理拓扑 + 后台命令底部输出 Dock、两击确认终止)
...
- tab 更名为任务管理:同页显示当前树全部后台命令(bash/pwsh 徽标、状态、时长、属主、退出码)
- 点击任务行在侧边栏底部共享 Dock 显示输出(sticky 终端式、自动跟随、单一轮询实例)
- 运行中任务两击确认强制终止;大量任务时列表保持紧凑、排序变动不跳动
- 新增 /sidebar/api tasks.output(非消费 peek,不偷模型 task_output 字节)与 tasks.kill 路由
- 修复任务镜像清空时的 React #300 hook 顺序崩溃(useCallback 移到提前 return 之前)+ 回归测试
2026-08-12 23:04:30 +08:00
Menghuan1918
96b83ae3b8
chore: v0.7.0 — 版本升级(客户端懒加载、移动端体验、内容打开自动展开)
2026-08-12 18:39:19 +08:00
Menghuan1918
bab659f8bd
feat: 客户端懒加载分块 — 重依赖(Univer/xterm/CodeMirror/Office)拆独立 bundle 按需下发(/sidebar/bundle 路由 + __dshChunks__ 注册表),核心启动仅 ~325KB
2026-08-12 18:19:44 +08:00
Menghuan1918
bf54a60e37
chore: v0.6.0 — README 更新双面板说明并升版本
2026-08-12 16:54:36 +08:00
Menghuan1918
7eccc49f6e
revert: 移除构建期 IME 守卫补丁 — 补丁打在产物上不具持久性
...
taekchef 的 apply-ime-guard.mjs 在每次 build/prepare/bundle 后把守卫
字符串注入 lib/client.js,但补丁对象是构建产物而非源码:
- 裸 tsdown 重建 / 其他构建路径产出无守卫的 bundle(#562 复发根因)
- 守卫逻辑游离于源码之外,难以测试与维护
运行时方案(src/client/ime-guard.ts + tests/ime-guard.spec.ts)已在
源码内实现同等守卫,经 document capture 覆盖全部劫持路径,任何构建
方式产物都自带守卫。合并远端提交后撤掉构建期补丁,保留运行时方案。
2026-08-12 14:41:36 +08:00
Menghuan1918
d1c393a048
Merge branch 'main' of https://github.com/dsh-external/DSH-better-sidebar
2026-08-12 14:41:26 +08:00
taekchef
a465bdee38
fix(ime): 持久化 IME 守卫脚本并挂入 build/prepare/bundle 构建路径
...
- scripts/apply-ime-guard.mjs 纳入版本库(此前 untracked,重 clone 即丢)
- Univer InputNumber 在 document capture 拦截全页 ↑/↓ 且无 isComposing
守卫,会摧毁中文输入法组合;prepare/bundle 裸 tsdown 重建会产出无守卫
的 lib/client.js,2026-08-11 因此复发(dsh-external/issues#562)
- 脚本幂等:已注入则跳过;目标模式匹配不到则 exit 1 显式失败
Fixes #562
2026-08-12 03:13:31 +08:00
Menghuan1918
31b78f7941
fix: IME 组合期按键守卫 — document capture 拦截,防内联第三方组件劫持方向键(#562)
...
Univer InputNumber 的 keydown 对 ArrowUp/Down 直接 preventDefault 且无
isComposing 守卫,中文输入法组合期候选词方向键被吞(#562 回归,同类 #535)。
新增 src/client/ime-guard.ts:document capture 阶段对组合期按键(isComposing
或 keyCode 229)stopPropagation,运行于 React 委托与任何原生监听之前,覆盖
内联依赖的全部劫持路径;apply 时经 ctx.effect 注册(HMR-safe)。
- tests/ime-guard.spec.ts:12 个用例,覆盖纯决策、原生 document/input 监听、
React 合成事件路径与 disposer 恢复(新增 jsdom devDependency)
- 全量 280 测试通过,typecheck 干净
2026-08-12 01:16:20 +08:00
Menghuan1918
302c20109f
feat: 内置 HTML 预览器 + 沙箱浏览器 tab(v0.5.0)
...
- html viewer:.html/.htm 沙箱 iframe 预览(相对资源经 /sidebar/html 路径编码路由加载,CSP sandbox + 信任围栏 + cwd 边界),预览/编辑切换
- browser tab:+ 菜单多开(browser:<n>),地址栏后退/前进/刷新/在浏览器中打开(15px 图标),URL 与标题按会话持久化(patchTab + nextBrowser)
- 安全:iframe 一律不透明源沙箱(无 allow-same-origin/top-navigation、no-referrer、权限策略全禁、禁 srcdoc);地址栏仅 http(s)、拒绝 localhost 等本机地址;界面实时沙箱状态(关闭红色警示)+ 临时解锁/恢复
- 设置:htmlViewerNoSandbox / htmlViewerDefaultUnsafe / browserNoSandbox / browserInterceptLinks 四个声明式二级设置(默认安全)
- 外链拦截:聊天/界面 http(s) 外链默认在侧边栏打开(openTab seed.url),Ctrl/Cmd 点击放行
- 嵌入拒绝面板:browser.probe 路由探测 X-Frame-Options/frame-ancestors,被拒站点显示原因 + 在浏览器中打开/仍然加载
- 设置页可滚动;内置 7 tab + 9 viewer;新增设计文档;268 个测试全绿
2026-08-11 19:28:48 +08:00
Menghuan1918
8f3bb1b264
chore: release v0.4.3 — README 精简重排 + npm 启动模式实测兼容
...
- README 341 → 130 行:安装/更新合并为一份提示词 + 手动要点,功能一览
逐节压缩,registry 通道降为可选小节,开发/架构/限制精简;新增
「npm 包启动(npx @deepseek-ai/dsh)同样可用,v0.4.3 起实测验证」
- 版本 0.4.1 → 0.4.3;cordis.patch.yml 注释同步
2026-08-11 15:47:16 +08:00
Menghuan1918
80f4406ff2
chore: devDependencies 去硬编码 — @deepseek-ai/* 改从 npm 解析(^0.0.1-rc.1)
...
- package.json:14 条 link:/Users/menghuan/.dsh/source/current/... 绝对路径
改为 ^0.0.1-rc.1(npm registry 预发布版,官方已发布 0.0.1-rc.1);
peerDependencies 同步 ^0.0.1-rc.1 以匹配 rc 系列
- 安装需安装者自己的只读令牌(~/.npmrc 配置 //registry.npmjs.org/:_authToken,
不写进仓库);或改回指向自己 ~/.dsh/source/current 的 link: —— README 三处说明更新
- .gitignore 加 .npmrc 防令牌误提交;token 全程仅环境变量/临时文件使用,已删除
- vitest.config.ts:npm 版 ui-primitives 的 lib 顶层 import katex css,
node_modules 外部化会被 Node 原生加载撞上 .css —— inline 该包走 Vite 转换 stub
- pnpm-lock.yaml 由 link: 仓库改为 registry tarball(+2001 行);
pnpm-workspace.yaml 追加 minimumReleaseAgeExclude(pnpm 11 自动记账)
2026-08-11 14:46:56 +08:00
Menghuan1918
ff94d0c124
chore: release v0.4.1 — 侧边栏设置声明式化 + 小卡片网格 + 二级设置弹窗
...
- 版本从 0.5.0 定为 0.4.1(patch release,含未打 tag 的 v0.4.0 服务化改造)
- 文档版本标注(AGENTS.md / 设计文档)同步为 v0.4.1+
2026-08-11 14:34:18 +08:00
Menghuan1918
89ddf8a9e7
feat(settings): 侧边栏设置声明式化 — 注册表驱动的开关清单 + 内置支持插头化
...
- SidebarPrefs 新增 tabsEnabled / viewersEnabled 开放 map(缺省 = 启用),
PrefsSchema 用 z.dict 校验,旧文档零迁移
- TabDescriptor/FileViewerDescriptor 新增声明式设置面:viewer 补 title/icon,
两者补 settings.toggles(子代理声明 autoOpenSubagent、终端声明 agentTerminalTools)
- 服务新增 isTabEnabled/isViewerEnabled;openTab 拒绝禁用类型、matchFileViewer
跳过禁用 viewer
- SideCardSection 重写为注册表驱动清单:侧边栏内容(图标+类型id+开关+嵌套开关)
+ 文件预览(图标+标题+扩展名+开关),开关持久化 + 乐观提交回滚
- 消费点 gating:+ 菜单过滤、子代理自动展开、agent 终端 reconcile、
产出文件拦截(editor 关闭时回落默认行)、新会话 explorer 预置
- 内置 viewer 补 6 个手绘 outline 图标;store 快照携带 prefs 使开关变更即时生效
- 测试:service gating / builtins 声明 / parsePrefs map 校验 / schema 断言 /
新增 SideCardSection renderToString 规格
- 文档:README 设置小节、AGENTS.md 描述符与服务方法、新增设计文档;版本 0.5.0
2026-08-11 14:08:55 +08:00
Menghuan1918
7c792c2a96
chore: 移除旧字段 dshClient — 只适配新 dsh 版本(dsh.client 声明)
...
PR #6 修复 client 半未进引导清单时保留了旧字段 dshClient 兼容。
按需精简:新 dsh 的 client-modules 扫描器只读 pkg.dsh.client,旧字段
无任何消费方,删除并同步 README 规范符合性说明。
2026-08-11 12:03:07 +08:00
Menghuan1918
53a9ced6bf
fix(client-modules): package.json 补 dsh.client 声明 — client 半未进引导清单的根因修复
...
诊断(2026-08-11 重启后侧边栏不显示):host 半正常(/sidebar/api 路由
200),但页面 window.__DSH_BOOT__ 引导清单 30 个 client 插件中没有
dsh-better-sidebar。client-modules 扫描器(packages/client/modules)读
package.json 的 pkg.dsh.client 声明 + exports["./client"] 组合 bundle;
插件只声明了旧字段 dshClient(dsH 新版本约定改为 dsh.client,工作正常的
ui-genui 两者并存)。旧字段缺失 → 负判定缓存 → 无 client 入口 → 浏览器
不加载侧边栏。
修复:package.json 新增 "dsh": { "client": { inject, platform } }
与 dshClient 并存(兼容新旧 dsh);README 规范符合性章节同步字段说明,
并顺带修正上一轮安装章节重排遗留的两个失效锚点链接。
2026-08-11 12:00:15 +08:00
Menghuan1918
39455ff18e
docs+fix: exports 加 ./client/api 别名;catch-all+detect 纯嗅探规则;设计文档偏差记录
...
- package.json exports 新增 './client/api' 别名指向 service.d.ts(设计文档
§7 的公共导入路径,api.ts 已被 fetch 助手占用故不换文件名)
- matchFileViewer 补充 sniff-only 规则:exts: [] + detect 的 descriptor 在
无 head 时不得盲认领(AGENTS.md 的 magic-sniffer 示例原实现会吞掉
图片/PDF 等真实 viewer 的文件);有 head 时只认领 detect 命中的。
新增测试断言三种情形(无 head / magic 命中 / magic miss)
- docs/plans/2026-08-11-service-registry-design.md 追加 §17 实施偏差记录:
dedupeKey+single 语法糖、available 三参、单趟匹配+嗅探规则、EditorHost/
TextEditor 拆分、fs.read head 字段、导出别名、+ 菜单 disabled 行、
保留的 store 级操作、内置清单、测试
- AGENTS.md:available 三参、single 语法糖、viewerId、单趟匹配+head 语义、
8 viewer 内置清单、openTab seed.title 可选、参考实现指向 builtins/ 目录
- README 服务化章节:6 viewer → 8 viewer,标注全注册表驱动
2026-08-11 11:25:37 +08:00
HuanLinOTO
291158a3ba
feat: 服务化改造 — ctx.betterSidebar 注册表(registerTab/registerFileViewer),内置 6 tab + 6 viewer 迁移到 registry,v0.4.0
...
- 新增 src/client/service.ts: BetterSidebarService 接口 + createBetterSidebarService 工厂
- registerTab/registerFileViewer 返回 disposer(HMR-safe,挂到 cordis fiber)
- matchFileViewer 三段匹配: priority desc → detect(内容嗅探) → exts
- openTab 走 descriptor.dedupeKey 统一去重(替代 isSingle/editor-path/diff-id 三分支)
- createTab 回调支持自定义 tab 创建(terminal 的 nextTerminal 递增)
- 新增 src/client/builtins.tsx: 6 内置 tab + 6 内置 viewer 自我注册(吃狗粮)
- tab: editor(hidden) / explorer / git / subagent / terminal / diff(hidden)
- viewer: image / pdf / docx / xlsx / pptx / binary-download
- code/markdown 保持 EditorView 内联兜底(matchFileViewer 返回 undefined 时走 fsRead+CodeMirror)
- 新增 src/client/OrphanedTab.tsx: 未注册 type 的占位组件(插件未加载时降级)
- 改造 src/client/index.tsx: ctx.provide('betterSidebar') + registerBuiltins
- 改造 src/client/Sidebar.tsx: TabContent/buildNewTabOptions/onNewTab 查表替代 switch
- 改造 src/client/EditorView.tsx: 预览路由查 matchFileViewer 替代 if/else 链
- 改造 src/client/state.ts: TabType 联合字面量→string,sanitizeNode 接受所有 string type
- 改造 src/context-types.ts: declare module 'cordis' 加 betterSidebar 字段
- 改造 src/index.ts: re-export Context + 服务类型(consumer import type 触发 augmentation)
- package.json: 加 ./client/service exports 子路径,version 0.4.0
- tests/service.spec.ts: 12 个新测试覆盖 register/dispose/matchFileViewer/dedupe/createTab
- tests/unit.spec.ts: sanitizeState 测试更新(未知 type 不再被拒绝,渲染 OrphanedTab)
2026-08-11 00:31:23 +08:00
Menghuan1918
069c754877
feat: Git 面板真正的 diff 显示 + VSCode 式历史与右键高级操作,v0.3.0
...
- 真正的统一 diff 显示:hunk 头 + 双行号 + 红绿着色,长行换行无横向滚动,untracked 全新增视图
- 点击变更/历史自动打开独立 diff tab(首次在下半栏新增分栏,同变更去重聚焦,临时页签刷新不恢复)
- 历史行:分支徽章 + 作者/相对时间,懒加载分页(20 条/页 + 加载更多)
- 右键菜单:文件行(打开/暂存/放弃更改/复制路径)、历史行(复制哈希/信息/还原/捡取),破坏性操作确认弹窗
- 修复暂存/未暂存分类错误(' M' 被误标为已暂存导致 diff 恒空)
- 修复 git 相对路径解析(会话在仓库子目录时 diff/discard/show/read 可用)
- host 新增 git.commit-diff / git.discard / git.revert / git.cherry-pick 路由与 log 分页
2026-08-10 22:29:24 +08:00
HuanLinOTO
6f62d19905
feat: 为 agent 暴露 8 个终端工具(terminal_create/list/send/read/wait_for/resize/signal/close),侧边栏自动同步 agent 终端 tab,v0.2.0
2026-08-10 19:08:58 +08:00
Menghuan1918
61b18cbefe
feat: Subagent 拓扑页面(主代理根节点 + 分层树 + 实时工具调用 + 自动激活设置),v0.1.9
2026-08-10 17:24:42 +08:00
HuanLinOTO
a6befc8b6b
feat: add Office, PDF, and PPTX previews
2026-08-10 16:46:01 +08:00
Menghuan1918
4060bd53e1
fix: 分割线改为 1px 发丝线(保留 7px 拖拽热区),v0.1.3
...
- 分割线视觉从 7px 实底色块改为居中 1px 发丝线(::after 伪元素)
- 悬停/拖拽时线变色为强调色,不再整条填充
- 拖拽热区保持 7px 不变;reduced-motion 下伪元素过渡一并禁用
- version 同步 0.1.3(package.json + dsh.plugin.json)
2026-08-09 23:53:52 +08:00
Menghuan1918
a1286191d6
feat: plugin-registry 标准发布面(dsh.plugin.json + 双 client bundle + registry 打包),v0.1.2
...
- dsh.plugin.json 原生清单:id dsh-external/dsh-better-sidebar,version 0.1.2,
main = lib/index.js,client.main = lib/client-registry.js,contributes 空声明
- tsdown client 构建参数化:lib/client.js(官方通道,id = 包名)+ lib/client-registry.js
(registry 通道,id = 清单 id),同源不漂移
- scripts/package-registry.mjs 组装 registry/ 安装根(gitignore,不入库)
- tests/manifest-consistency.spec.ts:id 两段校验 / version 同步 / 入口存在 /
双 bundle id 不互换 / contributes 空
- README:新增「通过 plugin-registry 安装(标准)」章节 + 保留官方 profile 安装
方案 + 通道互斥说明;架构表补 manifest 与双 client 行
2026-08-09 23:49:58 +08:00
Menghuan1918
9b00135de4
feat: DSH-native flat chrome + Side card settings (plugin-owned settings wire)
...
- Remove every box-shadow; panel uses the native sidebar fill surface
(--dsw-specific-sidebar-fill) with a hairline border, the collapse
control becomes the native 36px circular rail button, the active tab
uses the native interactive-bg-active fill, and rows/typography follow
the native 34px/14px session-row recipe.
- New 'Side card' settings section in the DSH Settings shell: open-by-
default for new conversations (boolean) and default width share as a
percent of the window (20-60). New sessions seed from these prefs;
existing per-session layouts stay untouched.
- The settings namespace is read/written through the plugin's own fenced
/sidebar routes calling the settings seam in-process: the DSH settings
RPC domain only serves allowlisted namespaces to configuration clients,
so third-party namespaces cannot use connection.api.settings (reads are
silently filtered, writes refused with 'not exposed'). The seam still
persists to the user settings document with revision-guarded writes.
2026-08-09 23:49:58 +08:00
Menghuan1918
ed6d86d5ee
chore: release 0.1.1
2026-08-09 22:07:03 +08:00
Menghuan1918
e2ee427ea3
feat: per-session store + configurable host limits; fix divider drag runaway
...
- state: side-store per conversation, injected as a prop instead of a module singleton
- host: schemastery Config (read/media/list/terminal limits) resolved from cordis config
- shape: types/exports/peerDependencies for the web profile + plugin-shape spec
- fix: split divider emits incremental deltas so drags track the cursor 1:1
- docs: README refresh
2026-08-09 22:07:03 +08:00
Menghuan1918
7aa24badf0
theme: terminal and editor follow the app's color scheme, re-theming in place
...
The app resolves light/dark from prefers-color-scheme and the user's
choice (body[data-ds-dark-theme]), but xterm and CodeMirror were pinned to
hardcoded dark themes — a light-mode user got a dark card inside a light
panel. New theme.ts reads the resolved scheme + token values and notifies
on flips (the presenter toggles the body attribute); the terminal now takes
its surface colors from the tokens and a curated one-dark/one-light ANSI
palette, and the editor gets a token-driven surface with the same curated
syntax palettes. Both re-theme in place on a scheme flip: the terminal
re-applies its theme, the editor reconfigures a Compartment holding only
the scheme-dependent extensions, so the document, undo history and scroll
survive. one-dark is dropped (superseded by the curated highlight style).
2026-08-08 17:29:13 +08:00
Menghuan1918
47ebffcf9b
fix: session-cwd attach race, terminal failure surfacing, white-screen hardening; CodeMirror editor
...
- cwd resolution falls back (attached header → client summary cwd → process
cwd) across the JSON API, media route and terminal upgrade, so explorer/
git/terminal work from first paint instead of 'session ... has no working
directory' while the web client hydrates the session (refresh-only fix).
- terminal client threads the summary cwd into the WS URL and stops the
reconnect loop after three unreasoned failures, showing the close code
with a manual retry; a 1011+reason refusal already showed the reason.
- white screen: persisted state is structurally sanitized on load (malformed
shapes fall back to default) and the restored width is clamped to the
viewport; the layout margin is capped at the viewport; the client entry
wraps every lifecycle step in try/catch and pins a visible diagnostic bar
on load/mount/interception failure instead of failing silently.
- editor: textarea replaced with CodeMirror 6 — line wrapping, per-extension
syntax highlighting (js/ts/jsx/tsx, json, python, html, css, xml, yaml,
sql, java, c/c++, rust, go, php, shell, toml, nginx, dockerfile,
properties), one-dark theme, dirty dot + Ctrl/Cmd+S save kept.
- tests: +9 (cwd fallback chain over the API route, state sanitization,
language mapping); 36 pass, typecheck + build + vm materialize clean.
2026-08-08 15:12:56 +08:00
Menghuan1918
63e2988ef1
dsh-better-sidebar: VSCode-like right sidebar plugin for the DSH web GUI
...
Host half (src/index.ts): /sidebar/api JSON API (session cwd, fs tree/read/
write, git status/diff/stage/commit/branch/log/show), /sidebar/file media
route, /sidebar/ws/terminal WebSocket over node-pty; routes share the /api
trust fence (Host-header loopback or connection.trustedHosts).
Client half (src/client): portal-mounted right panel with a per-session
split-pane workbench (recursive row/col splits, draggable dividers, tab
drag-move), tab bar with max-width 160px + plus-menu (explorer/git/terminal
multi-open rules), lazy file explorer rooted at the session cwd, editable
text editor (dirty dot, Ctrl/Cmd+S), image + Markdown preview, xterm
terminal with reconnect, and a VSCode-style git panel. Per-session state
persists to localStorage (dsh-sidebar:v1:<sessionId>). Intercepts the chat
turn-tail produced-files row (priority -1 chain entry) to open files in the
sidebar. UI styled with the dsh --dsw-* theme tokens and ui-primitives.
Build: tsdown emits the host lib plus the __ModuleLoader__ client bundle
(externals = module table words; xterm/css inlined). Tests: 19 unit + smoke
specs (pure state/tree/git parsers + real git/fs integration).
2026-08-08 01:02:24 +08:00