diff --git a/promptlib/package.json b/promptlib/package.json index ca05fb0..97c079f 100644 --- a/promptlib/package.json +++ b/promptlib/package.json @@ -1,7 +1,7 @@ { "name": "@iwb-plugin/promptlib", "private": true, - "version": "1.4.8", + "version": "1.4.9", "description": "提示词库:右栏提示词列表(搜索/分组/收藏/新建编辑/插入画布/复制/删除),数据由宿主 promptlib 能力提供", "ibwPlugin": { "id": "promptlib", diff --git a/promptlib/src/index.js b/promptlib/src/index.js index f6140c7..152c9b4 100644 --- a/promptlib/src/index.js +++ b/promptlib/src/index.js @@ -112,7 +112,12 @@ function slimCovers () { if (slimDone) return slimDone = true - var big = prompts.filter(function (p) { return typeof p.cover === 'string' && p.cover.indexOf('data:') === 0 && p.cover.length > 60000 }) + // v1.4.9:除了 >60KB 的,也把老版本存成 PNG 的封面重压一次(448px PNG 仍有 300KB+) + 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 + }) if (!big.length) return var next = prompts.slice() var i = 0 @@ -715,7 +720,7 @@ global.IWBPluginHost.register({ id: 'promptlib', name: '提示词库', - version: '1.4.8', + version: '1.4.9', apiVersion: 1, capabilities: ['panels', 'promptlib'], data: { schemaVersion: 1, maxBytes: 65536 },