Skip to content

fix agent tool config persistence and refactor mode config canonicalization#333

Merged
GCWing merged 2 commits intoGCWing:mainfrom
wsp1911:main
Apr 2, 2026
Merged

fix agent tool config persistence and refactor mode config canonicalization#333
GCWing merged 2 commits intoGCWing:mainfrom
wsp1911:main

Conversation

@wsp1911
Copy link
Copy Markdown
Collaborator

@wsp1911 wsp1911 commented Apr 2, 2026

Summary
This PR fixes incorrect mode tool state persistence in the agents UI and then refactors mode tool configuration to use canonical override-based storage.

Changes

  • Fix mode tool editing/count display so the agents UI reflects the actual persisted tool state.
  • Stop persisting mode tool state as full available_tools lists.
  • Store user intent as added_tools / removed_tools overrides instead.
  • Resolve effective enabled tools at runtime from current mode defaults plus user overrides.
  • Add a mode config canonicalizer to normalize mode config data and prune empty or obsolete mode entries.
  • Update desktop config APIs and frontend consumers to use enabled_tools view data.
  • Rename the old tool config sync module/entry points to match their actual responsibility.

Why

  • Prevent stale mode tool configuration when defaults change across versions.
  • Keep persisted config aligned with user intent rather than historical snapshots.
  • Reduce config drift and simplify future mode default evolution.

wsp1911 added 2 commits April 1, 2026 21:38
- save agent tool and skill edits as final sets instead of per-item concurrent toggles
- prevent multi-change edits from overwriting earlier tool updates
- show actual enabled tool counts on agent cards and in agent detail metadata
- replace persisted mode tool state with added_tools/removed_tools overrides
- resolve effective mode tools from current defaults at runtime
- expose mode config views via enabled_tools/default_tools for frontend consumers
- remove legacy known_tools and available_tools handling from config model
- rename tool config sync module to mode config canonicalizer
- update desktop config APIs and frontend mode settings consumers
@GCWing GCWing merged commit 9f2c08a into GCWing:main Apr 2, 2026
4 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants