to:sync
This commit is contained in:
parent
8aef5f48be
commit
77ef0fde0a
@ -27,6 +27,7 @@
|
|||||||
overflow-y: scroll;
|
overflow-y: scroll;
|
||||||
border-bottom: 1px solid #ccc;
|
border-bottom: 1px solid #ccc;
|
||||||
padding-bottom: 10px;
|
padding-bottom: 10px;
|
||||||
|
white-space: pre-line;
|
||||||
}
|
}
|
||||||
|
|
||||||
#user-input {
|
#user-input {
|
||||||
@ -56,6 +57,10 @@
|
|||||||
color: #000;
|
color: #000;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.gpt span{
|
||||||
|
white-space: pre-line;
|
||||||
|
}
|
||||||
|
|
||||||
.sender {
|
.sender {
|
||||||
font-weight: bold;
|
font-weight: bold;
|
||||||
}
|
}
|
||||||
@ -131,7 +136,7 @@
|
|||||||
// body
|
// body
|
||||||
body,
|
body,
|
||||||
// 收到事件时的回调。这里将事件的data显示在htmlSpanElement中
|
// 收到事件时的回调。这里将事件的data显示在htmlSpanElement中
|
||||||
(event) => {const content = getContent(event.data); if (content) htmlSpanElement.innerHTML += content},
|
(event) => {const content = getContent(event.data); if (content) htmlSpanElement.innerHTML += content.toString()},
|
||||||
// 结束时的回调。1.将消息添加到历史消息中 2.将等待状态设置为false
|
// 结束时的回调。1.将消息添加到历史消息中 2.将等待状态设置为false
|
||||||
() => {addMessage("assistant", htmlSpanElement.innerHTML); waiting = false},
|
() => {addMessage("assistant", htmlSpanElement.innerHTML); waiting = false},
|
||||||
// 发生错误时的回调
|
// 发生错误时的回调
|
||||||
|
Loading…
x
Reference in New Issue
Block a user