Commit e7b5695b authored by Joel's avatar Joel

fix: more than 2 thought caused problem

parent 3119a444
......@@ -513,8 +513,8 @@ const Main: FC<IMainProps> = () => {
if (thought.thought === '[DONE]')
return
responseItem.id = thought.message_id;
// thought finished then start to return message
(responseItem as any).agent_thoughts.push(thought)
// thought finished then start to return message. Warning: use push agent_thoughts.push would caused problem when the thought is more then 2
(responseItem as any).agent_thoughts = [...(responseItem as any).agent_thoughts, thought] // .push(thought)
const newListWithAnswer = produce(
getChatList().filter(item => item.id !== responseItem.id && item.id !== placeholderAnswerId),
(draft) => {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment