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:
@@ -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") {
|
||||
|
||||
Reference in New Issue
Block a user