mirror of
https://github.com/ikechan8370/chatgpt-plugin.git
synced 2025-12-16 21:37: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
|
|
@ -221,6 +221,10 @@ export function mkdirs (dirname) {
|
|||
}
|
||||
}
|
||||
|
||||
export async function getMasterQQ () {
|
||||
return (await import('../../../lib/config/config.js')).default.masterQQ
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
* @param pluginKey plugin key
|
||||
|
|
|
|||
|
|
@ -70,7 +70,7 @@ const defaultConfig = {
|
|||
allowOtherMode: true,
|
||||
sydneyContext: '',
|
||||
emojiBaseURL: 'https://www.gstatic.com/android/keyboard/emojikitchen',
|
||||
version: 'v2.3.4'
|
||||
version: 'v2.4.0'
|
||||
}
|
||||
const _path = process.cwd()
|
||||
let config = {}
|
||||
|
|
|
|||
|
|
@ -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