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

@@ -230,6 +230,12 @@ export function QuickEntryBox({ onCreate, addToast, tasks = [], availableModels,
}
}, [description, projectId]);
// Clear agents cache when projectId changes to prevent stale agents from leaking across projects
useEffect(() => {
setAgents([]);
setSelectedAgentId(null);
}, [projectId]);
// Clean up legacy disclosure persistence key from previous versions
useEffect(() => {
if (typeof window !== "undefined") {