Spaces:
Sleeping
Sleeping
fix red cross replaced with green ticks
Browse files- web/src/App.tsx +3 -2
web/src/App.tsx
CHANGED
|
@@ -441,14 +441,15 @@ function App() {
|
|
| 441 |
)
|
| 442 |
);
|
| 443 |
} else if (event === 'response') {
|
| 444 |
-
// Final response
|
| 445 |
setMessages((prev) =>
|
| 446 |
prev.map((msg) =>
|
| 447 |
msg.id === assistantId
|
| 448 |
? {
|
| 449 |
...msg,
|
| 450 |
content: data.content,
|
| 451 |
-
|
|
|
|
| 452 |
}
|
| 453 |
: msg
|
| 454 |
)
|
|
|
|
| 441 |
)
|
| 442 |
);
|
| 443 |
} else if (event === 'response') {
|
| 444 |
+
// Final response - preserve error flags from existing tool calls
|
| 445 |
setMessages((prev) =>
|
| 446 |
prev.map((msg) =>
|
| 447 |
msg.id === assistantId
|
| 448 |
? {
|
| 449 |
...msg,
|
| 450 |
content: data.content,
|
| 451 |
+
// Keep existing toolCalls with their error flags, don't overwrite
|
| 452 |
+
toolCalls: msg.toolCalls,
|
| 453 |
}
|
| 454 |
: msg
|
| 455 |
)
|