chore(conductor): Mark track 'Curate Provider Registries' as complete. Includes critical fixes for RecursionError, NoneType Hook API responses, and plurality mismatches.
This commit is contained in:
+25
-13
@@ -46,7 +46,6 @@ else:
|
||||
from pydantic import BaseModel
|
||||
from imgui_bundle import imgui, hello_imgui, immapp, imgui_node_editor as ed, imgui_color_text_edit as ced
|
||||
|
||||
PROVIDERS: list[str] = ["gemini", "anthropic", "gemini_cli", "deepseek", "minimax"]
|
||||
COMMS_CLAMP_CHARS: int = 300
|
||||
|
||||
def hide_tk_root() -> Tk:
|
||||
@@ -114,9 +113,6 @@ class App:
|
||||
self._pending_snapshot: bool = False
|
||||
self._is_applying_snapshot: bool = False
|
||||
|
||||
# Restore legacy PROVIDERS to controller if needed (it already has it via delegation if set on class level, but let's be explicit)
|
||||
if not hasattr(self.controller, 'PROVIDERS'):
|
||||
self.controller.PROVIDERS = PROVIDERS
|
||||
self.controller.init_state()
|
||||
self.workspace_manager = workspace_manager.WorkspaceManager(project_root=self.active_project_root)
|
||||
self.workspace_profiles = self.workspace_manager.load_all_profiles()
|
||||
@@ -273,17 +269,33 @@ class App:
|
||||
self._handle_mma_respond(approved=True)
|
||||
|
||||
def __getattr__(self, name: str) -> Any:
|
||||
if name != 'controller' and hasattr(self, 'controller') and hasattr(self.controller, name):
|
||||
return getattr(self.controller, name)
|
||||
if name == 'controller':
|
||||
raise AttributeError(name)
|
||||
try:
|
||||
# Use object.__getattribute__ to avoid recursion if 'controller' isn't initialized yet
|
||||
ctrl = object.__getattribute__(self, 'controller')
|
||||
except AttributeError:
|
||||
raise AttributeError(f"'{type(self).__name__}' object has no attribute '{name}'")
|
||||
|
||||
if ctrl is not None and hasattr(ctrl, name):
|
||||
return getattr(ctrl, name)
|
||||
raise AttributeError(f"'{type(self).__name__}' object has no attribute '{name}'")
|
||||
|
||||
def __setattr__(self, name: str, value: Any) -> None:
|
||||
if name == 'controller':
|
||||
super().__setattr__(name, value)
|
||||
elif hasattr(self, 'controller') and hasattr(self.controller, name):
|
||||
setattr(self.controller, name, value)
|
||||
object.__setattr__(self, name, value)
|
||||
return
|
||||
|
||||
try:
|
||||
# Use object.__getattribute__ to avoid recursion
|
||||
ctrl = object.__getattribute__(self, 'controller')
|
||||
except AttributeError:
|
||||
ctrl = None
|
||||
|
||||
if ctrl is not None and hasattr(ctrl, name):
|
||||
setattr(ctrl, name, value)
|
||||
else:
|
||||
super().__setattr__(name, value)
|
||||
object.__setattr__(self, name, value)
|
||||
|
||||
@property
|
||||
def current_provider(self) -> str:
|
||||
@@ -1831,7 +1843,7 @@ class App:
|
||||
if self._persona_models_open:
|
||||
if imgui.begin_child("pref_models_scroll", imgui.ImVec2(0, h1), True):
|
||||
to_remove = []
|
||||
providers = self.controller.PROVIDERS
|
||||
providers = models.PROVIDERS
|
||||
if not hasattr(self, '_persona_pref_models_expanded'): self._persona_pref_models_expanded = {}
|
||||
for i, entry in enumerate(self._editing_persona_preferred_models_list):
|
||||
imgui.push_id(f"pref_model_{i}")
|
||||
@@ -3287,7 +3299,7 @@ def hello():
|
||||
if self.perf_profiling_enabled: self.perf_monitor.start_component("_render_provider_panel")
|
||||
imgui.text("Provider")
|
||||
if imgui.begin_combo("##prov", self.current_provider):
|
||||
for p in PROVIDERS:
|
||||
for p in models.PROVIDERS:
|
||||
if imgui.selectable(p, p == self.current_provider)[0]:
|
||||
self.current_provider = p
|
||||
imgui.end_combo()
|
||||
@@ -4391,7 +4403,7 @@ def hello():
|
||||
# Provider selection
|
||||
imgui.push_item_width(80)
|
||||
if imgui.begin_combo("##prov", current_provider):
|
||||
for p in PROVIDERS:
|
||||
for p in models.PROVIDERS:
|
||||
if imgui.selectable(p, p == current_provider)[0]:
|
||||
self.mma_tier_usage[tier]["provider"] = p
|
||||
# Reset model to default for provider
|
||||
|
||||
Reference in New Issue
Block a user