fix(agent-designer): release picker locks on new chat + show only bound tools/skills#606
Merged
Merged
Conversation
The agent-binding picker locks live in root singleton services (Model/Tool/Skill Service) that outlive the session component. Clicking "New chat" navigates to `/`, which recreates the session component with fresh assistant()/agent() signals (both null). The lock-release lived inside the `if (loadedAssistant || … || agent())` guard, which is false on that fresh component — so the stale locks from the previous agent conversation were never released, leaving the model + tools pickers stuck. Move `clearAgentBindingLocks()` out of the guard so it always runs when there is no assistant in the URL. Idempotent — a no-op when nothing is locked. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
…locks the settings When an Agent dictates a fixed toolset/skillset, the settings panel listed every accessible tool/skill with the bound ones toggled on and the rest greyed off — a long, noisy list. Filter to show ONLY the bound (enabled) tools/skills so the panel reflects exactly what the agent uses. - ToolService.visibleTools / SkillService.visibleSkills: agent-locked → filter to the bound ids; otherwise the full accessible list. - model-settings template iterates the visible* lists. Tests: +1 tool-lock, +1 skill-lock spec (ng test green); tsc + AOT build clean. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Two follow-up fixes to the chat-input agent-binding locks (#603), from Phil's testing.
1. Locks not released on "New chat" (bug)
The picker locks live in root singleton services (
ModelService/ToolService/SkillService) that outlive the session component. "New chat" navigates to/, recreating the session component with freshassistant()/agent()signals (both null). The lock-release sat inside theif (loadedAssistant || … || agent())guard — false on the fresh component — so the stale locks from the previous agent conversation were never released, leaving the model + tool pickers stuck.Fix: move
clearAgentBindingLocks()out of the guard so it always runs when there's no assistant in the URL (idempotent).2. Filter the settings to only the bound tools/skills (enhancement)
When an agent locks the settings, the panel listed every accessible tool/skill (bound ones on, rest greyed off) — long and noisy. Now it shows only the bound tools/skills, via
ToolService.visibleTools/SkillService.visibleSkillscomputeds (agent-locked → filter to the bound ids; otherwise the full list). The banner + disabled toggles remain.Verification
ng testgreen (50 in the affected specs)tscclean; production build (AOT template validation) cleanAGENTS_API_ENABLED+ auth) — manual test: chat an agent with bound tools → open settings (only bound tools show, locked) → click New chat → confirm model + tool pickers are free-select again.🤖 Generated with Claude Code