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