fix(plugins): 拖拽模板节点使用 plugin:promptlib:ptpl 类型 + 1.5.8 同步
This commit is contained in:
1 parent
0c11b45af5
commit
4bdf6d0313
4 files changed
+4
-4
No files matched your search
+1
-1
@@ -46,7 +46,7 @@
|
||||
"style": "styles.css",
|
||||
"version": "1.5.0",
|
||||
"files": {
|
||||
"main.js": "5482e49e99329f368c7e63e30ec64989439ac999b684c7dbafc5916807184c61",
|
||||
"main.js": "4b2381ed6c3418ed6e70073b96f1ad54f51c0a422224862c6d48292fcdf51343",
|
||||
"styles.css": "28a267866d81708fc51aa61a40f922decd917c9ea907c52c8c916fe6398cad68"
|
||||
}
|
||||
},
|
||||
|
||||
@@ -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))
|
||||
|
||||
@@ -13,7 +13,7 @@
|
||||
"提示词"
|
||||
],
|
||||
"files": {
|
||||
"main.js": "5482e49e99329f368c7e63e30ec64989439ac999b684c7dbafc5916807184c61",
|
||||
"main.js": "4b2381ed6c3418ed6e70073b96f1ad54f51c0a422224862c6d48292fcdf51343",
|
||||
"styles.css": "28a267866d81708fc51aa61a40f922decd917c9ea907c52c8c916fe6398cad68"
|
||||
}
|
||||
}
|
||||
@@ -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 : [],
|
||||
|
||||
Reference in new issue
Block a user