feat(gui): Extract and display thinking traces from AI responses
This commit is contained in:
@@ -28,6 +28,7 @@ from src import app_controller
|
||||
from src import mcp_client
|
||||
from src import markdown_helper
|
||||
from src import bg_shader
|
||||
from src import thinking_parser
|
||||
import re
|
||||
import subprocess
|
||||
if sys.platform == "win32":
|
||||
@@ -2762,7 +2763,11 @@ def hello():
|
||||
imgui.separator()
|
||||
if imgui.button("-> History"):
|
||||
if self.ai_response:
|
||||
self.disc_entries.append({"role": "AI", "content": self.ai_response, "collapsed": True, "ts": project_manager.now_ts()})
|
||||
segments, response = thinking_parser.parse_thinking_trace(self.ai_response)
|
||||
entry = {"role": "AI", "content": response, "collapsed": True, "ts": project_manager.now_ts()}
|
||||
if segments:
|
||||
entry["thinking_segments"] = [{"content": s.content, "marker": s.marker} for s in segments]
|
||||
self.disc_entries.append(entry)
|
||||
if is_blinking:
|
||||
imgui.pop_style_color(2)
|
||||
if self.perf_profiling_enabled: self.perf_monitor.end_component("_render_response_panel")
|
||||
|
||||
Reference in New Issue
Block a user