未验证 提交 21b7024f 编写于 作者: X XiaoXiaoJiangYun 提交者: GitHub

Update python_replacement.js to fix first run prompts library

If you are first time to run prompts library, you will always use temple because you didn't have file in the uxp storage DataFolder.
上级 75814b06
......@@ -393,6 +393,12 @@ async function loadPromptShortcut(file_name) {
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 {}
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册