mirror of
https://github.com/ikechan8370/chatgpt-plugin.git
synced 2025-12-18 06:17:06 +00:00
修复关闭qr的情况下渲染错误
This commit is contained in:
parent
cefb2a5129
commit
673e8ce852
1 changed files with 8 additions and 8 deletions
16
apps/chat.js
16
apps/chat.js
|
|
@ -468,12 +468,12 @@ export class chatgpt extends plugin {
|
|||
}
|
||||
)
|
||||
let cache = {file:'',cacheUrl:Config.cacheUrl}
|
||||
if (cacheres.ok)
|
||||
cache = await cacheres.json()
|
||||
cache.cacheUrl = Config.cacheUrl
|
||||
if (cacheres.ok) {
|
||||
cache = Object.assign({}, cache, await cacheres.json())
|
||||
}
|
||||
await e.runtime.render('chatgpt-plugin', use !== 'bing' ? 'content/ChatGPT/index' : 'content/Bing/index', { content: escapeHtml(response), prompt: escapeHtml(prompt), senderName: e.sender.nickname, cache: cache })
|
||||
} else {
|
||||
await e.runtime.render('chatgpt-plugin', use !== 'bing' ? 'content/ChatGPT/index' : 'content/Bing/index', { content: escapeHtml(response), prompt: escapeHtml(prompt), senderName: e.sender.nickname })
|
||||
await e.runtime.render('chatgpt-plugin', use !== 'bing' ? 'content/ChatGPT/index' : 'content/Bing/index', { content: escapeHtml(response), prompt: escapeHtml(prompt), senderName: e.sender.nickname, cache: {file:'',cacheUrl:Config.cacheUrl} })
|
||||
}
|
||||
} else {
|
||||
let quotemessage = []
|
||||
|
|
@ -504,12 +504,12 @@ export class chatgpt extends plugin {
|
|||
}
|
||||
)
|
||||
let cache = {file:'',cacheUrl:Config.cacheUrl}
|
||||
if (cacheres.ok)
|
||||
cache = await cacheres.json()
|
||||
cache.cacheUrl = Config.cacheUrl
|
||||
if (cacheres.ok) {
|
||||
cache = Object.assign({}, cache, await cacheres.json())
|
||||
}
|
||||
await e.runtime.render('chatgpt-plugin', use !== 'bing' ? 'content/ChatGPT/index' : 'content/Bing/index', { content: escapeHtml(response), prompt: escapeHtml(prompt), senderName: e.sender.nickname, quote: quotemessage.length > 0 , quotes: quotemessage, cache: cache })
|
||||
} else {
|
||||
await e.runtime.render('chatgpt-plugin', use !== 'bing' ? 'content/ChatGPT/index' : 'content/Bing/index', { content: escapeHtml(response), prompt: escapeHtml(prompt), senderName: e.sender.nickname, quote: quotemessage.length > 0 , quotes: quotemessage })
|
||||
await e.runtime.render('chatgpt-plugin', use !== 'bing' ? 'content/ChatGPT/index' : 'content/Bing/index', { content: escapeHtml(response), prompt: escapeHtml(prompt), senderName: e.sender.nickname, quote: quotemessage.length > 0 , quotes: quotemessage, cache: {file:'',cacheUrl:Config.cacheUrl} })
|
||||
}
|
||||
} else {
|
||||
await this.reply(`${response}`, e.isGroup)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue