Open XiaoXiaoJiangYun opened 1 year ago
I have create the json file.
Error: Could not find an entry of 'plugin-data:/prompt_shortcut.json'
I have fix this problem:
\utility\sdapi\python_replacement.js,function loadPromptShortcut,add create a new json file:
async function loadPromptShortcut(file_name) {
const json_file_name = file_name
const folder = await fs.getDataFolder()
try {
const json_entry = await folder.getEntry(json_file_name)
if (json_entry) {
// await json_entry.read()
const json = JSON.parse(
await json_entry.read({
format: storage.formats.utf8,
})
)
return json
}
} catch (e) {
const file = await folder.createFile('prompt_shortcut.json', {type: storage.types.file, overwrite: true});
if (file.isFile) {
await file.write('{}', {append: false});
data = {};
return file;
}
console.warn(e)
return {}
}
}
const dialog_box = require('./dialog_box')
const {
...
// dialog_box,
...
} = require('./typescripts/dist/bundle')
always temple, can not save or load