fraudTech commited on
Commit
db68e12
·
1 Parent(s): ff2f44c

add debug info

Browse files
Files changed (1) hide show
  1. src/App.js +12 -0
src/App.js CHANGED
@@ -723,6 +723,18 @@ function App() {
723
  assistantMsg.statusText = "";
724
  setMessages([...newMessages]);
725
 
 
 
 
 
 
 
 
 
 
 
 
 
726
  } catch (err) {
727
  assistantMsg.thinking = false;
728
  assistantMsg.text += `\n[Error: ${err.message}]`;
 
723
  assistantMsg.statusText = "";
724
  setMessages([...newMessages]);
725
 
726
+ // Fetch debug info in background without blocking or replacing text
727
+ try {
728
+ const debugResult = await sendChat(userMsg.text, strictMode, historyForBackend, token, sessionId);
729
+ if (debugResult.prolog_query_info) {
730
+ assistantMsg.debug = debugResult.prolog_query_info;
731
+ setMessages([...newMessages]);
732
+ }
733
+ } catch (debugErr) {
734
+ // Silently fail - debug info is optional
735
+ console.warn("Failed to fetch debug info:", debugErr);
736
+ }
737
+
738
  } catch (err) {
739
  assistantMsg.thinking = false;
740
  assistantMsg.text += `\n[Error: ${err.message}]`;