Skip to content

Releases

v0.3.3

Choose a tag to compare

@Ztyss Ztyss released this 20 Oct 03:07

修复

折叠卡片存在时的补充输入体验,三项:

  • 焦点保持:宿主 composer(Lexical)的 setDraft 在每次写回后 selectEnd() 抢走焦点,导致补充框每输入一个字符就失焦、需点击恢复——现在写回后立即归还焦点与光标位置。
  • Enter 发送:补充框是插件自绘 textarea,宿主的 Enter 发送键位管不到它——现在 Enter 直接走宿主主发送路径(inputActions.submit()),Shift+Enter 换行,中文输入法选词回车(IME 组合中)不会误发。
  • 字体一致:补充框此前无任何字体样式(浏览器默认字,比宿主输入框大一号),且首轮的 font: inherit 只能继承到 portal 容器——现在折叠时动态读取宿主输入框(contenteditable)的 computedStyle 同步 font,自适应宿主改版与聊天字号设置;去掉多余横向 margin,起点与宿主草稿区对齐。

顺带修复:摘要卡「在文本框中显示」按钮的聚焦自始失效(与字体同步同款的坏选择器——[data-input-scroll] textarea 在 Lexical 架构下不存在,改为 contenteditable 优先、textarea 兜底)。

测试

  • tests/long-draft-dock.test.js 新增 4 例:Enter 提交、Shift/IME 防误触、焦点归还、合并全文断言(36/36 通过)。

v0.3.2 插件图标

Choose a tag to compare

@Ztyss Ztyss released this 27 Sep 09:56

新增插件图标:折叠行字形 tile(官方蓝渐变 + 白色圆头描边),经 manifest.icon 接入插件管理页。另含 0.3.1 的全部修复:插件页 plugins.bundle.config 设置卡(summary/page 双视图,page 为平铺表单)、locale meta 本地化(草稿折叠 / Draft fold)。

v0.3.1 plugins.bundle.config

Choose a tag to compare

@Ztyss Ztyss released this 27 Sep 05:59

0.1.7+ 的设置卡从内核内置插件清单页(settings.plugins.tab)迁移到插件管理页的 keyed 槽 plugins.bundle.config(key=bundle 包名,configForms.whileServed 守护),与 dsh-context / dsh-rewind 同位;DraftFoldTab 支持 summary/page 双视图,page 视图为平铺表单(无折叠卡壳)。插件显示名经 locale meta 词典本地化(草稿折叠 / Draft fold)。0.1.5 路径不变。

v0.3.0 — 双内核自适应(0.1.5 / 0.1.7+)

Choose a tag to compare

@Ztyss Ztyss released this 26 Sep 03:53

双内核自适应:内核 ≤0.1.5 走 settingsScope + settings.plugin.item 卡(原路径不变);内核 0.1.7+ 改 configForms/Config 投影 + settings.plugins.tab 页。修复 0.1.7 下 settingsScope 静态注入导致的 boot 门卡死;chevron 改内联 SVG 规避内核图标改名。折叠功能与设置卡在 0.1.7-rc.1 隔离实例全链路验证通过。预构建产物直装,无构建脚本。

v0.2.0 · 草稿折叠设置卡 + 热生效

Choose a tag to compare

@Ztyss Ztyss released this 23 Sep 07:18

草稿折叠 v0.2.0

阈值设置从 loader 条目配置(profile patch 层)迁移为插件自有持久设置文档,新增设置卡片,支持热生效。

新增

  • 设置 → 插件 → 插件配置 → 「草稿折叠」卡片:官方 PluginCard 壳(默认收起、整头点击展开、未保存徽标、chevron 旋转)
  • 字段:折叠阈值(字符,默认 300)、摘要预览长度(字符,默认 120);已覆盖字段可一键「恢复默认」
  • 保存即热生效:当前页签立即按新阈值折叠/展开,无需重启

变更

  • 移除 loader 条目 Config 与 profile patch 层配置;设置文档是唯一运行时真值
  • 默认阈值 300 / 预览 120(继承原 patch 偏好,升级无感)
  • client 依赖声明追加 @deepseek-ai/dsh-client-ui-primitives

修复

  • 表单快照遵循 useSyncExternalStore 缓存契约(稳定身份),避免渲染崩溃被 keyed 槽位罢黜
  • 设置卡经 settingsScope 注入回调延迟注册,对齐官方/rewind 成熟形态

安装

dsh plugin add --profile web github:Ztyss/dsh-draft-fold

测试

vitest 24 用例(摘要回归、折叠边界、文档兜底解析、暂存表单、卡片渲染、host 注册),pnpm install --ignore-scripts && pnpm test

v0.1.0

Choose a tag to compare

@Ztyss Ztyss released this 23 Sep 12:42

预构建安装包(lib/ 已内置,无构建步骤)。

dsh plugin add --profile web "https://github.com/Ztyss/dsh-draft-fold/releases/latest/download/dsh-draft-fold.tgz"

或从源码:dsh plugin add --profile web "github:Ztyss/dsh-draft-fold"