Commit Graph
113 Commits
Author SHA1 Message Date
qiqi fbc6e55964 release(plugins): 同步 album 1.2.5 / gallery 1.9.9 / promptlib 1.14.11(hover 简化)+ 修正各插件 manifest 版本号
Verify (Gitea) / gate (build · unit · facts) (push) Failing after 34s
2026-12-01 07:01:36 +08:00
qiqi 9ef5218856 perf: v3.26.152 简化卡片 hover 效果 + 可见空闲回收 2026-12-01 01:51:10 +08:00
qiqi a0526e7860 feat(images): v3.26.124 插件图片策略 v2(宿主三层 API + 解码闸门 + 插件全部改走小图) 2026-11-30 17:21:39 +08:00
qiqi fd9575a96e chore(plugins): 两仓同步 + 一致性守卫 + 插件规范(gallery 1.9.6 / promptlib 1.14.9 / sticky 1.0.8)
Verify (Gitea) / gate (build · unit · facts) (push) Failing after 1m0s
插件源码改回源仓(iwb-plugins-desktop),桌面仓 plugins/ 只作产物:
- 源仓侧:把 11-28 直接改在产物层的图库/提示词库改动回写为源码;修 validate 的字段扫描(先扫 register 块,
  找不到再回退整份文件,避免被业务代码 id: 'q' 误命中、也兼顾 __IWB_*_MANIFEST__ 构建产物);
  gallery 1.9.6 修「全部重试无效」与「量不到宽度时塌成 1 列」,promptlib 1.14.9
- 本仓侧:node scripts/sync-plugins-from-repo.js 重新生成 plugins/(gallery 1.9.6 / promptlib 1.14.9 / sticky 1.0.8)

新增机制:
- scripts/check-plugins-sync.js:逐插件比对产物与源仓(main.js/styles.css 的 sha256 + manifest/index 版本),
  不一致列出清单并给出修复命令;源仓不存在时跳过(CI/别人机器不阻塞)
- gen-market.js 开头调用该守卫:两仓不一致直接中止,不允许发市场
- package.json: npm run check:plugins
- docs/standards/plugin-source-of-truth.md:两仓职责、目录对照、三条红线、日常流程、应急回写步骤、常见错误对照

验证:源仓 npm run validate 15/15、npm test 全绿;桌面仓 verify:ci 32 passed。
2026-11-29 12:30:01 +08:00
qiqi 0ccc9041d0 fix(promptlib): 1.14.8 给新 token 加兜底,旧客户端也能正常显示
Verify (Gitea) / gate (build · unit · facts) (push) Failing after 1m34s
1.14.7 直接用 var(--iwb-accent-on-surface) / var(--iwb-accent-tint),但这两个 token 是 3.26.108 才加进客户端的;
3.26.107 及更早的客户端取不到值 → 药丸会变成透明底 + 继承色。

- styles.css:两个 var() 都补上 color-mix 兜底值(与 token 定义一致),新旧客户端视觉一致
2026-11-28 20:56:01 +08:00
qiqi 04cc527002 feat(tokens): 新增 --iwb-accent-on-surface / --iwb-accent-tint 并接入生成链
Verify (Gitea) / gate (build · unit · facts) (push) Failing after 1m27s
「强调色当文字用」以前各插件各自混色,暗色下对比度不足。现在固化成两个语义 token:

- --iwb-accent-on-surface = color-mix(--iwb-brand 45%, --iwb-text):文字/图标用的安全强调色
- --iwb-accent-tint = color-mix(--iwb-brand 18%, transparent):选中标签/药丸的淡底
  两者都是关系式(跟随主题与自定义强调色),不写死 hex

生成链:scripts/gen-tokens.js 的 LIGHT_ONLY 表 → src/design-tokens.css / dist/tokens.json
(npm run tokens:write 重生成,tokens:check 守卫)

落地:
- plugins/promptlib 1.14.7:参考图药丸改用这两个 token
- style.css:质量档位选中态、右键菜单 hover 底改用这两个 token(顺手去掉两处散落的 12% mix)
- docs/standards/design-tokens.md 新增 §3.9:取值、成对用法、四条规则(填充用 brand / 文字用 accent-on-surface 等)
2026-11-28 20:48:09 +08:00
qiqi 73a56c60f2 fix(promptlib): 1.14.6 强调色当文字用时与正文色混合,修暗色对比度
Verify (Gitea) / gate (build · unit · facts) (push) Failing after 2m18s
暗色下「封面作参考图 1 张」是 brand 蓝直接压深灰底,对比度不足。

- .iwb-plp-nref.is-on 的文字色改为 color-mix(brand 45%, --iwb-text):
  亮色混深更沉、暗色混浅更亮,两端都过 4.5:1(估算 8.8:1 / 5.1:1)
  这是仓库既有写法(--iwb-focus-ring 也是 brand-text 混出来的),不新增token、不写死颜色
- 药丸底 tint 从 14% 提到 18%(暗色下淡底更可见)
- 勾选框描边改为 color-mix(--iwb-border2 70%, --iwb-text2):暗色描边提亮一档,未选中也能看清
2026-11-28 20:33:42 +08:00
qiqi 9b535e77ce fix(promptlib): 1.14.4/1.14.5 参考图勾选框对齐与暗色修正
Verify (Gitea) / gate (build · unit · facts) (push) Failing after 1m1s
用户反馈:勾选后对勾没对齐;取消勾选是紫色;暗色下勾选框发黑。

- 未选中药丸改中性色:原来底/文字沿用了 promptlib 的紫色 accent(--iwb-plp-accent),
  现在用 --iwb-layer + --iwb-text2,只有 is-on 才是 brand 蓝
- 勾选框尺寸 14→15px、圆角改 --iwb-set-check-radius(4px) 呈方形(原来 6px 在 14px 上像圆点)
- 对勾改用 left/top 50% + translate(-50%,-58%) 居中,不再靠像素偏移
- 暗色:未选中填充用 --iwb-field(深一档的灰),避免在暗色药丸上变成黑块;边框仍用 --iwb-border2
- is-on 时张数 em 跟随文字色(opacity .8),不再固定灰
2026-11-28 20:27:12 +08:00
qiqi 016d837aae feat(promptlib): 1.14.3 参考图勾选框改成自绘蓝色实心勾(与样式节点一致)
Verify (Gitea) / gate (build · unit · facts) (push) Failing after 1m13s
- styles.css:.iwb-plp-nref 的 input[type=checkbox] 改 appearance:none 自绘:14px 圆角方块,
  选中时 brand 底 + 白色对勾(对勾用 --iwb-on-brand,不写死 #fff —— 插件主题契约禁止裸中性色)
  圆角用 --iwb-radius-chip(尺度闭集,否则 plugin-scale-contract 棘轮报新增 4px)
- .iwb-plp-nref.is-on:选中时药丸底色切成 brand 淡底 + brand 文字(同样式节点)
- main.js:st 里带上 refRow,同步时 toggle is-on
2026-11-28 20:16:59 +08:00
qiqi de92f0ec90 feat(promptlib): 1.14.2 提示词模板的「封面作参考图」开关移到头部(对齐样式节点)
Verify (Gitea) / gate (build · unit · facts) (push) Failing after 1m32s
用户要求:提示词变量节点里「图片参考选择」的位置,照样式节点改造。
原来 refRow 挂在节点最底部(变量列表之后),变量一多就要滚到底才点得到;样式节点是放在标题下方。

- plugins/promptlib/main.js:buildTplSkeleton 里把 refRow 挂进 titleBox(标题 + 变量数下方),
  底部不再追加
- styles.css:.iwb-plp-nref 从「底部分隔行」改成浅色药丸(inline-flex + accent 淡底 + 圆角),
  与样式节点的「示例图作参考 1 张」一致
- 版本 1.14.2,manifest 与 plugins/index.json 哈希同步
2026-11-28 20:03:46 +08:00
qiqi ea1e865426 fix(promptlib): 1.14.1 修正 manifest.files 哈希(1.14.0 市场安装报完整性校验失败)
1.14.0 改了 main.js,但 manifest.files 仍写着旧哈希 720b8aaa,客户端装载时
比对真实字节 e6e9ec6a 直接拒绝,界面显示「未加载 · 完整性校验失败」。

- plugins/promptlib/manifest.json:版本 1.14.1,files 按真实字节重算
- plugins/index.json:同步版本与三处哈希
- scripts/gen-market.js:生成市场包前断言 manifest.files == 实际字节,不符即中断
- tests/plugin-manifest-hashes-test.js:门禁守住 manifest.files / index.json 哈希与版本一致
2026-11-27 12:08:35 +08:00
qiqi 2cd52d1d4e refactor(promptlib): 收藏入口归插件(宿主不再自带,随插件启停)
Verify (Gitea) / gate (build · unit · facts) (push) Failing after 43s
按项目所有人要求:提示词库插件负责「管理与收集」的完整能力,宿主只保留基础接口。

宿主侧移除(全部 4 处入口 + 实现):
- 节点气泡星标(app.js 单选气泡的「添加到提示词库」)
- 「选中操作 ▸ 添加到提示词库」、「该节点 ▸ 添加该提示词」
- 提示词节点标题栏星标(src/ui-node-card.js)
- src/runtime-workbench-logic.js 的 addPromptToLibrary(约 45 行)与 ui-canvas-nodes 的 onFavorite 注入

宿主侧保留:promptlib 能力(list/save/insert/copy/notify/onChanged/file*)、prompts 状态与 api('prompts')(备份/迁移)、插件数据通道。

宿主侧补回(此前缺失):右键菜单重新渲染 ctx.commands 注册的插件命令(「插件命令」分区)。

插件 promptlib 1.13.1 → 1.14.0:
- capabilities 增 nodeActions / commands
- nodeActions「收藏为提示词」:仅对 type=prompt 且 text 非空的节点出现(气泡按钮)
- commands「收藏选中的提示词」:右键「插件命令」入口
- 收藏写入插件数据 plugin-data/promptlib.json(以现有数据为基底,保留 cover:{img} 与分组),
  新条目 group:'' 即未分组,并 notify 回执

测试:
- tests/iwb-prompt-collect.spec.js 改为 3 条新契约:插件提供气泡入口 + 宿主无自带入口;
  右键插件命令可用且宿主旧条目已移除;插件停用后两个入口同时消失
- canvas-meta-notice 的旧「点按钮报错回执」用例改为「宿主不得再渲染该入口」
- tests/_helpers/wait.js openDockPanel 加固(等插件宿主初始化,修并行偶发)
- 棘轮下调:app.js 8324 / Workbench 2178

验证:npm run verify:ci 全绿(含 e2e 冒烟 31 条)。
2026-11-27 10:06:03 +08:00
qiqi 87276f2473 chore(plugins): 同步 promptlib 1.13.1(变量栏去 i 按钮 + 行间分割线)
Verify (Gitea) / gate (build · unit · facts) (push) Failing after 58s
- 变量编辑右栏删掉每行的 i 圆按钮(与整行点击重复),整行点击成为唯一入口;
  展开态由 caret 主色 + 整行 hover 反馈表达。
- 分割线按 design-tokens.md §3.11 的 --iwb-set-divider 公式落在「行与行之间」,
  1px 实线、首行与末行之后都不画;标题下与展开字段前不另画线。
- 市场包 promptlib-1.13.1.zip、market/index.json、市场首页、下载站索引与页面
  全部同步;公网回读索引版本与 zip sha256 一致。
2026-11-25 13:56:05 +08:00
qiqi 5dd4dd0a74 chore(plugins): 内置 promptlib 同步 1.13.0(正文 {} 里放内容原文、名宽 4 字、内容框 10 行)
Verify (Gitea) / gate (build · unit · facts) (push) Failing after 55s
2026-11-24 18:52:56 +08:00
qiqi 5cfda44b46 chore(plugins): 内置 promptlib 同步 1.12.3(变量三字段 + 节点默认空、内容兜底)
Verify (Gitea) / gate (build · unit · facts) (push) Failing after 2m4s
2026-11-24 18:32:33 +08:00
qiqi 7035d8fad2 chore(plugins): 内置 promptlib 同步 1.12.2(搜索框常驻修中文输入 + 变量标签定宽 6 字)
Verify (Gitea) / gate (build · unit · facts) (push) Failing after 53s
2026-11-24 18:16:47 +08:00
qiqi 348bf56c3f chore(plugins): 内置 promptlib 同步 1.12.0(变量四字段 + 节点多行变量框)
Verify (Gitea) / gate (build · unit · facts) (push) Failing after 44s
2026-11-24 18:01:13 +08:00
qiqi e966b348b9 feat(backup): v3.26.59 备份带上插件文件(提示词封面不再换机丢失)
P0(宿主):
- 备份 ZIP 新增 plugin-files/<插件id>/<文件名> 通道,恢复时写回沙箱;
  此前只备份 JSON ⇒ 换机后「提示词都在、封面全是灰块」,而状态行写着「已恢复」
- IWBStorageFile.pluginFiles 增 readBytes / listAll(不 mkdir、只读字节)
- IWBPluginData 增 listFiles / readFile / restoreFiles:清单一次给出、字节逐条读写
  (插件文件单插件上限 64MB,攒数组会 OOM)
- 校验和口径统一:images / imagesData / pluginFiles / pluginFilesData 全部排除;
  JSON 兜底导出按自身内容重算 checksum,避免「换个打包形态就报校验不一致」
- 备份二次确认的体积/张数把插件文件计入;恢复摘要显示「含 N 个插件文件(封面等)」
- tests/plugin-data-test:新增插件文件清单/读字节/写回 三条行为断言

P1(插件 promptlib 1.11.0,随包同步):
- 封面保存/上传即落成文件(JSON 只留文件名)、孤儿封面可回收
  (启动后一次 + 删词条后一次 + 设置页手动入口;空集合/非插件数据来源一律不删)
- 四处内联 djb2 哈希合并为 coverFileName,同图不再存两份
- 样式散值归零(4px→6px、margin 13px→12px),插件尺度棘轮基线保持 0
2026-11-24 15:16:08 +08:00
qiqi 054db215cd feat(plugins): 同步提示词库 promptlib v1.10.1(移除封面开关 + 详情竖向分割线)
Verify (Gitea) / gate (build · unit · facts) (push) Failing after 46s
2026-11-24 14:25:17 +08:00
qiqi b34b936d2e feat(plugins): 同步提示词库 promptlib v1.10.0(文本/文件分享双路径 + 新入口布局)
Verify (Gitea) / gate (build · unit · facts) (push) Failing after 1m11s
2026-11-24 14:19:15 +08:00
qiqi 1ebb07d389 feat(plugins): 同步提示词库 promptlib v1.9.3(编辑区变量浅主色底色)
Verify (Gitea) / gate (build · unit · facts) (push) Failing after 1m3s
2026-11-24 13:36:10 +08:00
qiqi b45d6b2712 feat(plugins): 同步提示词库 promptlib v1.9.2(分享封面开关)
Verify (Gitea) / gate (build · unit · facts) (push) Failing after 45s
2026-11-24 13:25:26 +08:00
qiqi 48b85cae04 chore(plugins): promptlib 1.9.1 市场同步
Verify (Gitea) / gate (build · unit · facts) (push) Failing after 36s
2026-11-24 11:16:22 +08:00
qiqi 2f8f355716 feat(plugins): 分享/导入分享、单节点收藏走提示词库、组内解组、图库打开目录与删除字节、插件设置页 token 化
Verify (Gitea) / gate (build · unit · facts) (push) Failing after 2m1s
2026-11-24 10:39:25 +08:00
qiqi 12ed8e6cbf chore(plugins): promptlib 1.8.24 市场同步
Verify (Gitea) / gate (build · unit · facts) (push) Failing after 41s
2026-11-23 20:13:23 +08:00
qiqi 56961d6d8a chore(plugins): promptlib 1.8.23 尺寸 token 迁移 + 基线下调
Verify (Gitea) / gate (build · unit · facts) (push) Canceled after 1m4s
2026-11-23 20:12:16 +08:00
qiqi 293c500dca chore(plugins): promptlib 1.8.22 颜色 token 迁移同步
Verify (Gitea) / gate (build · unit · facts) (push) Failing after 2m51s
2026-11-23 20:06:05 +08:00
qiqi 01c922d7e4 chore(plugins): promptlib 1.8.21 市场同步
Verify (Gitea) / gate (build · unit · facts) (push) Failing after 44s
2026-11-23 10:09:42 +08:00
qiqi 7c0896ed97 chore(plugins): promptlib 1.8.20 市场同步
Verify (Gitea) / gate (build · unit · facts) (push) Failing after 28s
2026-11-23 10:08:05 +08:00
qiqi fcb429772e chore(plugins): promptlib 1.8.19 市场同步
Verify (Gitea) / gate (build · unit · facts) (push) Canceled after 23s
2026-11-23 10:07:41 +08:00
qiqi de1a38e211 chore(plugins): promptlib 1.8.18 市场同步
Verify (Gitea) / gate (build · unit · facts) (push) Failing after 42s
2026-11-23 10:04:56 +08:00
qiqi 3abe96d389 chore(plugins): promptlib 1.8.17 市场同步(1.8.8 样式基线)
Verify (Gitea) / gate (build · unit · facts) (push) Failing after 31s
2026-11-23 09:54:20 +08:00
qiqi 8c87ae2743 chore(plugins): promptlib 1.8.16 市场同步(样式回退)
Verify (Gitea) / gate (build · unit · facts) (push) Failing after 31s
2026-11-23 09:51:20 +08:00
qiqi 5ca6cda7a5 chore(plugins): promptlib 1.8.15 市场同步
Verify (Gitea) / gate (build · unit · facts) (push) Failing after 34s
2026-11-23 09:48:55 +08:00
qiqi edc0b1f916 chore(plugins): promptlib 1.8.14 市场同步
Verify (Gitea) / gate (build · unit · facts) (push) Canceled after 11s
2026-11-23 09:48:43 +08:00
qiqi 9a011dc825 chore(plugins): promptlib 1.8.13 市场同步
Verify (Gitea) / gate (build · unit · facts) (push) Canceled after 33s
2026-11-23 09:47:37 +08:00
qiqi f1462a5862 chore(plugins): promptlib 1.8.12 市场同步
Verify (Gitea) / gate (build · unit · facts) (push) Canceled after 2s
2026-11-23 09:47:24 +08:00
qiqi cd7d478782 chore(plugins): promptlib 1.8.11 市场同步
Verify (Gitea) / gate (build · unit · facts) (push) Canceled after 11s
2026-11-23 09:47:08 +08:00
qiqi 071f7f44d6 chore(plugins): promptlib 1.8.10 市场同步
Verify (Gitea) / gate (build · unit · facts) (push) Canceled after 43s
2026-11-23 09:46:22 +08:00
qiqi 980481a897 chore(plugins): promptlib 1.8.9 市场同步
Verify (Gitea) / gate (build · unit · facts) (push) Failing after 36s
2026-11-23 09:40:31 +08:00
qiqi bc77f007a0 fix(windows): 内存探测改用 GetProcessMemoryInfo,不再启动 PowerShell 2026-11-23 00:57:46 +08:00
qiqi f6c66fcd89 chore(plugins): promptlib 1.8.8 市场同步
Verify (Gitea) / gate (build · unit · facts) (push) Failing after 1m45s
2026-11-22 23:51:05 +08:00
qiqi 262bcc037b chore(plugins): promptlib 1.8.7 市场同步
Verify (Gitea) / gate (build · unit · facts) (push) Failing after 1m55s
2026-11-22 23:48:22 +08:00
qiqi 2cc5126f70 chore(plugins): promptlib 1.8.6 市场同步
Verify (Gitea) / gate (build · unit · facts) (push) Failing after 1m8s
2026-11-22 23:44:36 +08:00
qiqi 5d68e0249a chore(plugins): promptlib 1.8.5 市场同步
Verify (Gitea) / gate (build · unit · facts) (push) Canceled after 19s
2026-11-22 23:44:13 +08:00
qiqi bb0b3f3e8f chore(plugins): promptlib 1.8.4 市场同步
Verify (Gitea) / gate (build · unit · facts) (push) Failing after 51s
2026-11-22 23:39:45 +08:00
qiqi 204f9103aa chore(plugins): promptlib 1.8.3 市场同步
Verify (Gitea) / gate (build · unit · facts) (push) Canceled after 1m32s
2026-11-22 23:38:10 +08:00
qiqi 8e40ba2870 chore(plugins): promptlib 1.8.2 市场同步
Verify (Gitea) / gate (build · unit · facts) (push) Failing after 1m34s
2026-11-22 23:36:28 +08:00
qiqi d45065101b chore(plugins): promptlib 1.8.1 市场同步
Verify (Gitea) / gate (build · unit · facts) (push) Failing after 1m0s
2026-11-22 23:35:11 +08:00
qiqi 702fbf5132 chore(plugins): promptlib 1.8.0 市场同步
Verify (Gitea) / gate (build · unit · facts) (push) Failing after 1m13s
2026-11-22 23:32:15 +08:00