mirror of
https://github.com/ikechan8370/chatgpt-plugin.git
synced 2025-12-17 05:47:11 +00:00
fix: 尝试支持设定分享和导入 (#286)
* fix: 尝试支持设定分享和导入 * fix: 设定分享和洗脑操作的帮助 * fix: 导入设定失败的提示 * fix: 允许覆盖修改 * fix: version
This commit is contained in:
parent
07d1db0a2a
commit
bfc55df6a6
5 changed files with 268 additions and 16 deletions
|
|
@ -40,3 +40,11 @@ export function saveOnePrompt (name, content) {
|
|||
let filePath = `${_path}/plugins/chatgpt-plugin/prompts/${name}.txt`
|
||||
fs.writeFileSync(filePath, content)
|
||||
}
|
||||
|
||||
export function deleteOnePrompt (name) {
|
||||
const _path = process.cwd()
|
||||
mkdirs(`${_path}/plugins/chatgpt-plugin/prompts`)
|
||||
let filePath = `${_path}/plugins/chatgpt-plugin/prompts/${name}.txt`
|
||||
fs.unlinkSync(filePath)
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue