move rag status indictor to usage analytics window/panel
This commit is contained in:
+20
-16
@@ -894,6 +894,7 @@ class App:
|
||||
"""
|
||||
[C: tests/test_gui_window_controls.py:test_gui_window_controls_minimize_maximize_close]
|
||||
"""
|
||||
|
||||
with imscope.menu("manual slop") as (active):
|
||||
if active and imgui.menu_item("Quit", "Ctrl+Q", False)[0]:
|
||||
self.runner_params.app_shall_exit = True
|
||||
@@ -938,19 +939,7 @@ class App:
|
||||
for profile_id, profile in self.workspace_profiles.items():
|
||||
if imgui.menu_item(profile.name, "", False)[0]:
|
||||
self.controller._cb_delete_workspace_profile(profile_id, self._new_workspace_profile_scope)
|
||||
|
||||
# RAG status indicator
|
||||
if self.controller.rag_config and self.controller.rag_config.enabled:
|
||||
imgui.same_line()
|
||||
status = self.controller.rag_status
|
||||
if status == "indexing...": color = vec4(100, 255, 100)
|
||||
elif status == "error": color = vec4(255, 100, 100)
|
||||
else: color = vec4(180, 180, 180)
|
||||
|
||||
imgui.text_colored(color, f"[RAG: {status}]")
|
||||
if imgui.is_item_hovered(): imgui.set_tooltip(f"RAG is enabled. Status: {status}. Click to rebuild index.")
|
||||
if imgui.is_item_clicked(): self.controller.event_queue.put('click', 'btn_rebuild_rag_index')
|
||||
|
||||
|
||||
# Draw right-aligned window controls directly in the menu bar (Win32 only)
|
||||
if sys.platform == "win32":
|
||||
try:
|
||||
@@ -961,7 +950,7 @@ class App:
|
||||
hwnd = ctypes.pythonapi.PyCapsule_GetPointer(hwnd_capsule, b"nb_handle")
|
||||
except Exception:
|
||||
hwnd = 0
|
||||
|
||||
|
||||
if hwnd:
|
||||
btn_w = 40
|
||||
# Use window width (points) instead of display_size (pixels) for correct scaling
|
||||
@@ -1002,9 +991,10 @@ class App:
|
||||
if imgui.button("X", (btn_w, bar_h)):
|
||||
win32gui.PostMessage(hwnd, win32con.WM_CLOSE, 0, 0)
|
||||
imgui.pop_style_color()
|
||||
|
||||
imgui.pop_style_color()
|
||||
|
||||
|
||||
|
||||
def _render_history_window(self) -> None:
|
||||
if not self.show_windows.get('Undo/Redo History', False):
|
||||
return
|
||||
@@ -1167,7 +1157,7 @@ class App:
|
||||
self._flush_to_config()
|
||||
models.save_config(self.config)
|
||||
|
||||
imgui.end()
|
||||
imgui.end()
|
||||
if self.perf_profiling_enabled: self.perf_monitor.end_component("_render_theme_panel")
|
||||
|
||||
def _render_shader_live_editor(self) -> None:
|
||||
@@ -1193,6 +1183,20 @@ class App:
|
||||
self._render_tool_analytics_panel()
|
||||
imgui.separator()
|
||||
self._render_session_insights_panel()
|
||||
imgui.separator()
|
||||
|
||||
# RAG status indicator
|
||||
if self.controller.rag_config and self.controller.rag_config.enabled:
|
||||
# imgui.same_line()
|
||||
status = self.controller.rag_status
|
||||
if status == "indexing...": color = vec4(100, 255, 100)
|
||||
elif status == "error": color = vec4(255, 100, 100)
|
||||
else: color = vec4(180, 180, 180)
|
||||
|
||||
imgui.text_colored(color, f"[RAG: {status}]")
|
||||
if imgui.is_item_hovered(): imgui.set_tooltip(f"RAG is enabled. Status: {status}. Click to rebuild index.")
|
||||
if imgui.is_item_clicked(): self.controller.event_queue.put('click', 'btn_rebuild_rag_index')
|
||||
|
||||
if self.perf_profiling_enabled: self.perf_monitor.end_component("_render_usage_analytics_panel")
|
||||
|
||||
def _render_cache_panel(self) -> None:
|
||||
|
||||
Reference in New Issue
Block a user