feat(gui): Extract and display thinking traces from AI responses
This commit is contained in:
@@ -64,8 +64,8 @@ palette = "Nord Dark"
|
|||||||
font_path = "C:/projects/manual_slop/assets/fonts/MapleMono-Regular.ttf"
|
font_path = "C:/projects/manual_slop/assets/fonts/MapleMono-Regular.ttf"
|
||||||
font_size = 18.0
|
font_size = 18.0
|
||||||
scale = 1.0
|
scale = 1.0
|
||||||
transparency = 0.5400000214576721
|
transparency = 1.0
|
||||||
child_transparency = 0.5899999737739563
|
child_transparency = 1.0
|
||||||
|
|
||||||
[mma]
|
[mma]
|
||||||
max_workers = 4
|
max_workers = 4
|
||||||
|
|||||||
@@ -28,6 +28,7 @@ from src import app_controller
|
|||||||
from src import mcp_client
|
from src import mcp_client
|
||||||
from src import markdown_helper
|
from src import markdown_helper
|
||||||
from src import bg_shader
|
from src import bg_shader
|
||||||
|
from src import thinking_parser
|
||||||
import re
|
import re
|
||||||
import subprocess
|
import subprocess
|
||||||
if sys.platform == "win32":
|
if sys.platform == "win32":
|
||||||
@@ -2762,7 +2763,11 @@ def hello():
|
|||||||
imgui.separator()
|
imgui.separator()
|
||||||
if imgui.button("-> History"):
|
if imgui.button("-> History"):
|
||||||
if self.ai_response:
|
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:
|
if is_blinking:
|
||||||
imgui.pop_style_color(2)
|
imgui.pop_style_color(2)
|
||||||
if self.perf_profiling_enabled: self.perf_monitor.end_component("_render_response_panel")
|
if self.perf_profiling_enabled: self.perf_monitor.end_component("_render_response_panel")
|
||||||
|
|||||||
Reference in New Issue
Block a user