🤖 fix: Minor Assistants Endpoint Fixes (#2472)

* fix(useCreateAssistantMutation): force re-render of assistants map by avoiding use shallow reference of listRes.data

* fix(AppService): regression by not including azure assistant defaults when no assistant endpoint values are set
This commit is contained in:
Danny Avila 2024-04-19 19:05:25 -04:00 committed by GitHub
parent 3d1dec62a4
commit e6310c806a
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
4 changed files with 48 additions and 17 deletions

View file

@ -315,8 +315,7 @@ export const useCreateAssistantMutation = (
return options?.onSuccess?.(newAssistant, variables, context);
}
const currentAssistants = listRes.data;
currentAssistants.push(newAssistant);
const currentAssistants = [newAssistant, ...JSON.parse(JSON.stringify(listRes.data))];
queryClient.setQueryData<AssistantListResponse>([QueryKeys.assistants, defaultOrderQuery], {
...listRes,