Spaces:
Sleeping
Sleeping
debug panel fix
Browse files- src/App.js +5 -0
src/App.js
CHANGED
|
@@ -499,6 +499,11 @@ function App() {
|
|
| 499 |
try {
|
| 500 |
const debugResult = await sendChat(userMsg.text, strictMode, historyForBackend, token, sessionId);
|
| 501 |
if (debugResult.prolog_query_info) {
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 502 |
assistantMsg.debug = debugResult.prolog_query_info;
|
| 503 |
setMessages([...newMessages]);
|
| 504 |
} else {
|
|
|
|
| 499 |
try {
|
| 500 |
const debugResult = await sendChat(userMsg.text, strictMode, historyForBackend, token, sessionId);
|
| 501 |
if (debugResult.prolog_query_info) {
|
| 502 |
+
// Replace the streamed text with the authoritative non-streaming reply
|
| 503 |
+
// so citations/strict-mode enforcement match the debug panel.
|
| 504 |
+
if (typeof debugResult.reply === "string" && debugResult.reply.trim()) {
|
| 505 |
+
assistantMsg.text = debugResult.reply;
|
| 506 |
+
}
|
| 507 |
assistantMsg.debug = debugResult.prolog_query_info;
|
| 508 |
setMessages([...newMessages]);
|
| 509 |
} else {
|