fix(promptlib): 1.4.10 封面迁移阈值 150KB / 仅 PNG 触发
validate / validate (push) Canceled after 0s

This commit is contained in:
qiqi committed 2026-11-22 00:19:23 +08:00
1 parent c25144138d
commit 3e55a83169
2 files changed
+4 -3

No files matched your search

+1 -1
View File
@@ -1,7 +1,7 @@
{
"name": "@iwb-plugin/promptlib",
"private": true,
"version": "1.4.9",
"version": "1.4.10",
"description": "提示词库:右栏提示词列表(搜索/分组/收藏/新建编辑/插入画布/复制/删除),数据由宿主 promptlib 能力提供",
"ibwPlugin": {
"id": "promptlib",
+3 -2
View File
@@ -116,7 +116,8 @@
var big = prompts.filter(function (p) {
var c = p && p.cover
if (typeof c !== 'string' || c.indexOf('data:') !== 0) return false
return c.length > 60000 || c.indexOf('data:image/png') === 0
// v1.4.10:阈值提到 150KB,且只在 PNG(体积虚高)时迁移 —— 否则 JPEG 封面每次挂载都会被再压一次
return c.length > 150000 || c.indexOf('data:image/png') === 0
})
if (!big.length) return
var next = prompts.slice()
@@ -720,7 +721,7 @@
global.IWBPluginHost.register({
id: 'promptlib',
name: '提示词库',
version: '1.4.9',
version: '1.4.10',
apiVersion: 1,
capabilities: ['panels', 'promptlib'],
data: { schemaVersion: 1, maxBytes: 65536 },