plugins: promptlib 1.14.16(导入分享保留变量名/内容/说明)
Verify (Gitea) / gate (build · unit · facts) (push) Failing after 1m14s
Verify (Gitea) / gate (build · unit · facts) (push) Failing after 1m14s
This commit is contained in:
1 parent
41675b8233
commit
720ad51d86
7 files changed
+23
-19
No files matched your search
+2
-2
@@ -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"
|
||||
}
|
||||
},
|
||||
|
||||
@@ -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 },
|
||||
|
||||
@@ -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"
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user