diff --git a/src/chatbox.tsx b/src/chatbox.tsx index cfae0ba..9f9a9df 100644 --- a/src/chatbox.tsx +++ b/src/chatbox.tsx @@ -460,7 +460,9 @@ export default function ChatBOX(props: { disabled={showGenerating || !chatStore.apiKey} onClick={async () => { const messageIndex = chatStore.history.length - 1; - chatStore.history[messageIndex].hide = true; + if (chatStore.history[messageIndex].role === "assistant") { + chatStore.history[messageIndex].hide = true; + } //chatStore.totalTokens = update_total_tokens();