From 720ad51d86643a484f0254f3f1d8aad73bd33327 Mon Sep 17 00:00:00 2001 From: qiqi Date: Fri, 4 Dec 2026 16:58:59 +0800 Subject: [PATCH] =?UTF-8?q?plugins:=20promptlib=201.14.16=EF=BC=88?= =?UTF-8?q?=E5=AF=BC=E5=85=A5=E5=88=86=E4=BA=AB=E4=BF=9D=E7=95=99=E5=8F=98?= =?UTF-8?q?=E9=87=8F=E5=90=8D/=E5=86=85=E5=AE=B9/=E8=AF=B4=E6=98=8E?= =?UTF-8?q?=EF=BC=89?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- plugins/index.json | 4 ++-- plugins/promptlib/main.js | 8 ++++++-- plugins/promptlib/manifest.json | 4 ++-- site/dev/index.html | 2 +- site/index.html | 4 ++-- site/plugins-index.json | 16 ++++++++-------- site/plugins/index.html | 4 ++-- 7 files changed, 23 insertions(+), 19 deletions(-) diff --git a/plugins/index.json b/plugins/index.json index af5ff5f..e9fe08c 100644 --- a/plugins/index.json +++ b/plugins/index.json @@ -55,9 +55,9 @@ "dir": "promptlib", "main": "main.js", "style": "styles.css", - "version": "1.14.15", + "version": "1.14.16", "files": { - "main.js": "1358d8fb185577e67a928b4f79a15215c726fba53ade39860d1d2e299697e4cc", + "main.js": "fb35d555858fd7116d5c30adc6521f6bdb17a0f901568b06cbcb3f1dd7c302dd", "styles.css": "a086b172cc8261b9f346e612b5f76cc085d5a1e486657d0c656cb87c675f238c" } }, diff --git a/plugins/promptlib/main.js b/plugins/promptlib/main.js index 89508e3..3bb844d 100644 --- a/plugins/promptlib/main.js +++ b/plugins/promptlib/main.js @@ -1597,7 +1597,11 @@ // 分享入库:剪贴板导入与文件导入共用,避免两套逻辑跑偏。 function importShareItem (item) { var name = String(item.name || '').trim() || ('导入的提示词 ' + String(item.text).slice(0, 8) + '…') - var incoming = normalize({ id: uid('q'), name: name, text: item.text, group: String(item.group || ''), tags: item.tags || [] }) + // 2026-12-05:分享里带了 vars(key/名称/内容/说明),导入时必须整段交给 normalize; + // 否则 varsOf 回落 detectVars(text) —— 正文 {} 里是内容原文 ⇒ 名称变成内容、同内容变量被去重合并。 + var incoming = normalize({ id: uid('q'), name: name, text: item.text, + vars: Array.isArray(item.vars) ? item.vars : [], + group: String(item.group || ''), tags: item.tags || [] }) var cv = item.cover var ready = (typeof cv === 'string' && cv.indexOf('data:') === 0 && FILEAPI) ? Promise.resolve(FILEAPI.put(coverFileName(cv), cv)).then(function (res) { return res && res.ok ? Object.assign({}, incoming, { cover: { img: coverFileName(cv) } }) : incoming }).catch(function () { return incoming }) @@ -2270,7 +2274,7 @@ global.IWBPluginHost.register({ id: 'promptlib', name: '提示词库', - version: '1.14.15', + version: '1.14.16', apiVersion: 1, capabilities: ['panels', 'promptlib', 'nodeTypes', 'canvas', 'canvasWrite', 'nodeActions', 'commands'], data: { schemaVersion: 3, maxBytes: 4 * 1024 * 1024 }, diff --git a/plugins/promptlib/manifest.json b/plugins/promptlib/manifest.json index 82b59c5..ab9d2e6 100644 --- a/plugins/promptlib/manifest.json +++ b/plugins/promptlib/manifest.json @@ -1,7 +1,7 @@ { "id": "promptlib", "name": "提示词库", - "version": "1.14.15", + "version": "1.14.16", "apiVersion": 1, "main": "main.js", "style": "styles.css", @@ -13,7 +13,7 @@ "提示词" ], "files": { - "main.js": "1358d8fb185577e67a928b4f79a15215c726fba53ade39860d1d2e299697e4cc", + "main.js": "fb35d555858fd7116d5c30adc6521f6bdb17a0f901568b06cbcb3f1dd7c302dd", "styles.css": "a086b172cc8261b9f346e612b5f76cc085d5a1e486657d0c656cb87c675f238c" } } diff --git a/site/dev/index.html b/site/dev/index.html index 22231c8..c6b1b6e 100644 --- a/site/dev/index.html +++ b/site/dev/index.html @@ -3,7 +3,7 @@ 插件开发规范 · Image Workbench - +