fix(gui): prevent dictionary size change during iteration
- Wrap discussions.items() with list() in takes_panel to prevent RuntimeError when dictionary changes during iteration - This was causing crashes when switching discussions
This commit is contained in:
@@ -1544,7 +1544,6 @@ class AppController:
|
||||
self.active_project_path = fallback_path
|
||||
if fallback_path not in self.project_paths:
|
||||
self.project_paths.append(fallback_path)
|
||||
self._refresh_from_project()
|
||||
self._configure_mcp_for_project()
|
||||
|
||||
def _prune_old_logs(self) -> None:
|
||||
|
||||
+1
-1
@@ -3024,7 +3024,7 @@ class App:
|
||||
imgui.table_setup_column("Entries", imgui.TableColumnFlags_.width_fixed, 80)
|
||||
imgui.table_setup_column("Actions", imgui.TableColumnFlags_.width_fixed, 150)
|
||||
imgui.table_headers_row()
|
||||
for name, disc in discussions.items():
|
||||
for name, disc in list(discussions.items()):
|
||||
imgui.table_next_row()
|
||||
imgui.table_set_column_index(0)
|
||||
is_active = name == self.active_discussion
|
||||
|
||||
Reference in New Issue
Block a user