bingAI fix

This commit is contained in:
James Feng Cao 2023-04-25 19:08:18 +08:00
parent 6ae4b1bb30
commit 8f2c1c9ad0
7 changed files with 23 additions and 25 deletions

View file

@ -17,7 +17,7 @@
<input id="restartNewChat" class="onShow" type="button" value="new chat">
<input id="restart" type="button" value="🧹">
<div id="input-div">
<textarea id="input" type="text" enterkeyhint="send" maxlength="2000" autocapitalize="off" autocomplete="off" aria-autocomplete="both" spellcheck="false" aria-label="ask Bing" autocorrect="off" placeholder="type question here..."></textarea>
<textarea id="input" type="text" enterkeyhint="send" autocapitalize="off" autocomplete="off" aria-autocomplete="both" spellcheck="false" aria-label="ask Bing" autocorrect="off" placeholder="type question here..."></textarea>
<input id="send" type="button" value="✓">
</div>

View file

@ -7,6 +7,11 @@ var send_button = document.getElementById('send');
let restartNewChat = document.getElementById('restartNewChat');
var thisChatType = chatTypes.balance;
//全局变量
var talk;
var returnMessage;
var isSpeaking = false;
reSetStartChatMessage();
//(string)
@ -49,7 +54,6 @@ function onMessage(json, returnMessage) {
onMessageIsOKClose = true;
returnMessage.getCatWebSocket().close(1000, 'ok');
} else {
talk = undefined;
localStorage.removeItem('LastChatJson');
if (json.type == 1) {
porserArguments(json.arguments);
@ -78,13 +82,6 @@ input_text.addEventListener('keydown', (event) => {
}
});
//全局变量
var talk;
var returnMessage;
var isSpeaking = false;
/**重置聊天框和聊天建议到初始状态 */
function reSetStartChatMessage(type) {
createChat(thisChatType).then((r) => {