Skip to content

Commit 3d172e2

Browse files
cyliu0Copilot
andauthored
Update src/specify_cli/extensions.py
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
1 parent f2a929d commit 3d172e2

1 file changed

Lines changed: 12 additions & 5 deletions

File tree

src/specify_cli/extensions.py

Lines changed: 12 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1422,11 +1422,18 @@ def unregister_agent_artifacts(self, agent_name: str) -> None:
14221422
self.registry.update(ext_id, updates)
14231423

14241424
def register_enabled_extensions_for_agent(self, agent_name: str) -> None:
1425-
"""Register installed, enabled extensions for the active agent.
1426-
1427-
This is used after integration switches. It mirrors extension install
1428-
behavior while avoiding stale default-mode command directories when an
1429-
agent is currently running in skills mode (notably Copilot ``--skills``).
1425+
"""Register installed, enabled extensions for ``agent_name``.
1426+
1427+
This is intended to be called after switching integrations. Command
1428+
registration is scoped to the explicit ``agent_name`` argument, but some
1429+
behavior still depends on the current init-options state (for example,
1430+
skills-mode handling uses the active ``ai`` / ``ai_skills`` settings).
1431+
1432+
Callers should therefore pass the agent that has just been made active
1433+
in init-options; in normal use, ``agent_name`` is expected to match the
1434+
current ``ai`` value. This mirrors extension install behavior while
1435+
avoiding stale default-mode command directories when that active agent
1436+
is running in skills mode (notably Copilot ``--skills``).
14301437
"""
14311438
if not agent_name:
14321439
return

0 commit comments

Comments
 (0)