patch: fakePort stop

This commit is contained in:
josc146
2023-09-23 21:37:09 +08:00
parent 711e0d3493
commit 40ae4575a7
3 changed files with 6 additions and 9 deletions
+2 -3
View File
@@ -260,6 +260,7 @@ function ConversationCard(props) {
const lastRecord = session.conversationRecords[session.conversationRecords.length - 1]
if (
conversationItemData[conversationItemData.length - 1].done &&
conversationItemData.length > 1 &&
lastRecord.question === conversationItemData[conversationItemData.length - 2].content
) {
session.conversationRecords.pop()
@@ -484,15 +485,13 @@ function ConversationCard(props) {
key={idx}
type={data.type}
session={session}
done={data.done}
port={port}
onRetry={idx === conversationItemData.length - 1 ? getRetryFn(session) : null}
/>
))}
</div>
<InputBox
enabled={isReady}
port={port}
postMessage={postMessage}
reverseResizeDir={props.pageMode}
onSubmit={async (question) => {
const newQuestion = new ConversationItemData('question', question)