diff --git a/web/src/api/asset_interfaces/chat/chatMessageInterfaces.ts b/web/src/api/asset_interfaces/chat/chatMessageInterfaces.ts index 7a0839da3..4a064f6c2 100644 --- a/web/src/api/asset_interfaces/chat/chatMessageInterfaces.ts +++ b/web/src/api/asset_interfaces/chat/chatMessageInterfaces.ts @@ -46,7 +46,6 @@ export type BusterChatResponseMessage_file = { file_type: FileType; file_name: string; version_number: number; - version_id: string; filter_version_id: string | null; metadata?: BusterChatResponseMessage_fileMetadata[]; }; diff --git a/web/src/context/Chats/useChatStreamMessage.ts b/web/src/context/Chats/useChatStreamMessage.ts index 71a71c16c..2fa30a8be 100644 --- a/web/src/context/Chats/useChatStreamMessage.ts +++ b/web/src/context/Chats/useChatStreamMessage.ts @@ -75,6 +75,11 @@ export const useChatStreamMessage = () => { { id: responseMessage.id, version_number: responseMessage.version_number }, queryClient ); + const options = queryKeys.metricsGetMetric( + responseMessage.id, + responseMessage.version_number + ); + queryClient.invalidateQueries({ queryKey: options.queryKey }); } }); } @@ -88,6 +93,7 @@ export const useChatStreamMessage = () => { normalizeChatMessage(iChatMessages); onUpdateChat(iChat); prefetchLastMessageMetricData(iChat, iChatMessages); + queryClient.invalidateQueries({ queryKey: [queryKeys.chatsGetList().queryKey, queryKeys.metricsGetList().queryKey] });