fix(plugins): 拖拽模板节点使用 plugin:promptlib:ptpl 类型 + 1.5.8 同步

This commit is contained in:
qiqi committed 2026-11-22 17:10:14 +08:00
1 parent 0c11b45af5
commit 4bdf6d0313
4 files changed
+4 -4

No files matched your search

+1 -1
View File
@@ -46,7 +46,7 @@
"style": "styles.css",
"version": "1.5.0",
"files": {
"main.js": "5482e49e99329f368c7e63e30ec64989439ac999b684c7dbafc5916807184c61",
"main.js": "4b2381ed6c3418ed6e70073b96f1ad54f51c0a422224862c6d48292fcdf51343",
"styles.css": "28a267866d81708fc51aa61a40f922decd917c9ea907c52c8c916fe6398cad68"
}
},
+1 -1
View File
@@ -940,7 +940,7 @@
text: p.text || '', name: p.name || '',
vars: vd.map(function (v) { return v.key }),
vdefs: vd,
cover: p.cover || '',
cover: p.cover || '', pluginId: ctx.id, nodeType: 'ptpl',
}))
e.dataTransfer.setData('application/x-iwb-promptid', p.id)
e.dataTransfer.setData('text/plain', (p.text || '').slice(0, 200))
+1 -1
View File
@@ -13,7 +13,7 @@
"提示词"
],
"files": {
"main.js": "5482e49e99329f368c7e63e30ec64989439ac999b684c7dbafc5916807184c61",
"main.js": "4b2381ed6c3418ed6e70073b96f1ad54f51c0a422224862c6d48292fcdf51343",
"styles.css": "28a267866d81708fc51aa61a40f922decd917c9ea907c52c8c916fe6398cad68"
}
}
+1 -1
View File
@@ -1093,7 +1093,7 @@
const hasVars = Array.isArray(obj.vars) && obj.vars.length > 0
const node = hasVars
? {
id, type: 'ptpl', x: Math.round(wx - 210), y: Math.round(wy - 20), w: 420,
id, type: 'plugin:' + String(obj.pluginId || 'promptlib') + ':ptpl', x: Math.round(wx - 210), y: Math.round(wy - 20), w: 420,
data: {
promptId: '', name: obj.name || '提示词模板', tpl: obj.text || '',
vdefs: Array.isArray(obj.vdefs) ? obj.vdefs : [],