mirror of
https://github.com/ChatGPTNextWeb/ChatGPT-Next-Web.git
synced 2025-11-13 12:43:42 +08:00
feat: 支持插件异常反馈
This commit is contained in:
@@ -287,14 +287,15 @@ export class ChatGPTApi implements LLMApi {
|
||||
}
|
||||
},
|
||||
onmessage(msg) {
|
||||
if (msg.data === "[DONE]" || finished) {
|
||||
return finish();
|
||||
}
|
||||
let response = JSON.parse(msg.data);
|
||||
if (!response.isSuccess) {
|
||||
console.error("[Request]", response, msg);
|
||||
console.error("[Request]", msg.data);
|
||||
responseText = msg.data;
|
||||
throw Error(response.message);
|
||||
}
|
||||
if (msg.data === "[DONE]" || finished) {
|
||||
return finish();
|
||||
}
|
||||
try {
|
||||
if (response && !response.isToolMessage) {
|
||||
responseText += response.message;
|
||||
|
||||
1
app/icons/plugin_disenable.svg
Normal file
1
app/icons/plugin_disenable.svg
Normal file
@@ -0,0 +1 @@
|
||||
<svg fill="#333333" width="16" height="16" viewBox="-1.8 -1.8 39.60 39.60" version="1.1" preserveAspectRatio="xMidYMid meet" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" stroke="#333333" transform="rotate(0)" stroke-width="1"><g id="plugin_bgCarrier" stroke-width="0"></g><g id="plugin_tracerCarrier" stroke-linecap="round" stroke-linejoin="round"></g><g id="plugin_iconCarrier"> <title>plugin-line</title> <path d="M29.81,16H29V8.83a2,2,0,0,0-2-2H21A5.14,5.14,0,0,0,16.51,2,5,5,0,0,0,11,6.83H4a2,2,0,0,0-2,2V17H4.81A3.13,3.13,0,0,1,8,19.69,3,3,0,0,1,7.22,22,3,3,0,0,1,5,23H2v8.83a2,2,0,0,0,2,2H27a2,2,0,0,0,2-2V26h1a5,5,0,0,0,5-5.51A5.15,5.15,0,0,0,29.81,16Zm2.41,7A3,3,0,0,1,30,24H27v7.83H4V25H5a5,5,0,0,0,5-5.51A5.15,5.15,0,0,0,4.81,15H4V8.83h9V7a3,3,0,0,1,1-2.22A3,3,0,0,1,16.31,4,3.13,3.13,0,0,1,19,7.19V8.83h8V18h2.81A3.13,3.13,0,0,1,33,20.69,3,3,0,0,1,32.22,23Z" class="clr-i-outline clr-i-outline-path-1"></path></g></svg>
|
||||
|
After Width: | Height: | Size: 963 B |
1
app/icons/plugin_enable.svg
Normal file
1
app/icons/plugin_enable.svg
Normal file
@@ -0,0 +1 @@
|
||||
<svg fill="#333333" width="16" height="16" viewBox="-1.8 -1.8 39.60 39.60" version="1.1" preserveAspectRatio="xMidYMid meet" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" stroke="#333333" stroke-width="0"><g id="plugin_bgCarrier" stroke-width="0"></g><g id="plugin_tracerCarrier" stroke-linecap="round" stroke-linejoin="round"></g><g id="plugin_iconCarrier"> <title>plugin-solid</title> <path d="M29.81,16H29V8.83a2,2,0,0,0-2-2H21A5.14,5.14,0,0,0,16.51,2,5,5,0,0,0,11,6.83H4a2,2,0,0,0-2,2V17H4.81A3.13,3.13,0,0,1,8,19.69,3,3,0,0,1,7.22,22,3,3,0,0,1,5,23H2v8.83a2,2,0,0,0,2,2H27a2,2,0,0,0,2-2V26h1a5,5,0,0,0,5-5.51A5.15,5.15,0,0,0,29.81,16Z" class="clr-i-solid clr-i-solid-path-1"></path></g></svg>
|
||||
|
After Width: | Height: | Size: 729 B |
Reference in New Issue
Block a user