fixees
This commit is contained in:
23
src/gui_2.py
23
src/gui_2.py
@@ -262,7 +262,8 @@ class App:
|
||||
sys.stderr.flush()
|
||||
self._process_pending_gui_tasks()
|
||||
self._process_pending_history_adds()
|
||||
self.controller._process_pending_tool_calls()
|
||||
if self.controller._process_pending_tool_calls():
|
||||
self._tool_log_dirty = True
|
||||
self._render_track_proposal_modal()
|
||||
self._render_patch_modal()
|
||||
# Auto-save (every 60s)
|
||||
@@ -310,14 +311,6 @@ class App:
|
||||
self._tool_log_cache = log_raw
|
||||
self._tool_log_dirty = False
|
||||
|
||||
with self._pending_tool_calls_lock:
|
||||
if self._pending_tool_calls:
|
||||
if self.ui_auto_scroll_tool_calls:
|
||||
self._scroll_tool_calls_to_bottom = True
|
||||
self._tool_log_dirty = True
|
||||
for tc in self._pending_tool_calls:
|
||||
self._tool_log.append(tc)
|
||||
self._pending_tool_calls.clear()
|
||||
if self.show_windows.get("Context Hub", False):
|
||||
exp, opened = imgui.begin("Context Hub", self.show_windows["Context Hub"])
|
||||
self.show_windows["Context Hub"] = bool(opened)
|
||||
@@ -1883,20 +1876,22 @@ class App:
|
||||
|
||||
imgui.table_next_column()
|
||||
script = entry.get("script", "")
|
||||
res = entry.get("result", "")
|
||||
combined = f"--- COMMAND ---\n{script}\n\n--- OUTPUT ---\n{res}"
|
||||
|
||||
script_preview = script.replace("\n", " ")[:150]
|
||||
if len(script) > 150: script_preview += "..."
|
||||
if imgui.selectable(f"{script_preview}##tc_{i}", False, imgui.SelectableFlags_.span_all_columns)[0]:
|
||||
self.text_viewer_title = f"Tool Script #{i+1}"
|
||||
self.text_viewer_content = script
|
||||
self.text_viewer_title = f"Tool Call #{i+1}"
|
||||
self.text_viewer_content = combined
|
||||
self.show_text_viewer = True
|
||||
|
||||
imgui.table_next_column()
|
||||
res = entry.get("result", "")
|
||||
res_preview = res.replace("\n", " ")[:30]
|
||||
if len(res) > 30: res_preview += "..."
|
||||
if imgui.button(f"View##res_{i}"):
|
||||
self.text_viewer_title = f"Call Output #{i+1}"
|
||||
self.text_viewer_content = res
|
||||
self.text_viewer_title = f"Tool Call #{i+1}"
|
||||
self.text_viewer_content = combined
|
||||
self.show_text_viewer = True
|
||||
|
||||
imgui.end_table()
|
||||
|
||||
Reference in New Issue
Block a user