mirror of
https://github.com/ikechan8370/chatgpt-plugin.git
synced 2025-12-16 21:37:11 +00:00
修复bug和旧代码清理 (#553)
* fix: 修复星火api上下文 * 将无星火ck的情况降低为warn * feat: 添加星火设定自定义代码功能 * 修复星火api模式的一些问题 * 修复导出配置问题 * feat:添加工具箱快捷登录接口 * 添加工具箱快捷登录指令 * 阻止群聊使用快捷登录 * 添加Azure配置支持,修复重复的配置项冲突 * 移除旧版本渲染和新版本帮助 * 添加工具箱 * 更新工具箱替换原有后台 * 更新工具箱适配代码
This commit is contained in:
parent
043b80ddd4
commit
bf761c24da
183 changed files with 1206 additions and 7675 deletions
17
apps/help.js
17
apps/help.js
|
|
@ -1,6 +1,6 @@
|
|||
import plugin from '../../../lib/plugins/plugin.js'
|
||||
import { Config } from '../utils/config.js'
|
||||
import { render, renderUrl } from '../utils/common.js'
|
||||
import { render } from '../utils/common.js'
|
||||
let version = Config.version
|
||||
let helpData = [
|
||||
{
|
||||
|
|
@ -326,25 +326,12 @@ export class help extends plugin {
|
|||
{
|
||||
reg: '^#(chatgpt|ChatGPT)(命令|帮助|菜单|help|说明|功能|指令|使用说明)$',
|
||||
fnc: 'help'
|
||||
},
|
||||
{
|
||||
reg: '^#帮助-',
|
||||
fnc: 'newHelp'
|
||||
}
|
||||
]
|
||||
})
|
||||
}
|
||||
|
||||
async help (e) {
|
||||
if (Config.newhelp && !Config.oldview) {
|
||||
await renderUrl(e, `http://127.0.0.1:${Config.serverPort || 3321}/help/`, { Viewport: { width: 800, height: 600 } })
|
||||
} else {
|
||||
await render(e, 'chatgpt-plugin', 'help/index', { helpData, version })
|
||||
}
|
||||
}
|
||||
|
||||
async newHelp (e) {
|
||||
let use = e.msg.replace(/^#帮助-/, '').toUpperCase().trim()
|
||||
await renderUrl(e, `http://127.0.0.1:${Config.serverPort || 3321}/help/` + use, { Viewport: { width: 800, height: 600 } })
|
||||
await render(e, 'chatgpt-plugin', 'help/index', { helpData, version })
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue