mirror of
https://github.com/ikechan8370/chatgpt-plugin.git
synced 2025-12-17 05:47:11 +00:00
fix: 调试设定和伪人
This commit is contained in:
parent
efb5a8f174
commit
3c77da5373
11 changed files with 293 additions and 34 deletions
|
|
@ -103,7 +103,7 @@ export async function getPreset (e, presetId, toggleMode, togglePrefix) {
|
|||
const isValidChat = checkChatMsg(e, toggleMode, togglePrefix)
|
||||
const manager = Chaite.getInstance().getChatPresetManager()
|
||||
const presets = await manager.getAllPresets()
|
||||
const prefixHitPresets = presets.filter(p => e.msg.startsWith(p.prefix))
|
||||
const prefixHitPresets = presets.filter(p => e.msg?.startsWith(p.prefix))
|
||||
if (!isValidChat && prefixHitPresets.length === 0) {
|
||||
return null
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue