feat(FN-1484): fix agent picker stale cache on project switch

- Clear agent cache when projectId changes in QuickEntryBox and InlineCreateCard
- Add regression tests for agent picker cache invalidation behavior
- Add changeset for @gsxdsm/fusion patch release
This commit is contained in:
gsxdsm
2026-04-09 21:39:09 -07:00
parent b7005001d2
commit 5883dffc74
5 changed files with 215 additions and 0 deletions

View File

@@ -119,6 +119,12 @@ export function InlineCreateCard({
}
}, [description, projectId]);
// Clear agents cache when projectId changes to prevent stale agents from leaking across projects
useEffect(() => {
setAgents([]);
setSelectedAgentId(null);
}, [projectId]);
const loadModels = useCallback(async () => {
if (availableModels) {
setLoadedModels(availableModels);