diff --git a/web/src/controllers/MetricController/MetricViewChart/MetricViewChart.tsx b/web/src/controllers/MetricController/MetricViewChart/MetricViewChart.tsx index a733dff64..9e8719c27 100644 --- a/web/src/controllers/MetricController/MetricViewChart/MetricViewChart.tsx +++ b/web/src/controllers/MetricController/MetricViewChart/MetricViewChart.tsx @@ -4,7 +4,7 @@ import React, { useMemo } from 'react'; import { MetricViewChartContent } from './MetricViewChartContent'; import { MetricViewChartHeader } from './MetricViewChartHeader'; import { useGetMetric, useGetMetricData } from '@/api/buster_rest/metrics'; -import { useMemoizedFn, useMount } from '@/hooks'; +import { useMemoizedFn } from '@/hooks'; import { inputHasText } from '@/lib/text'; import { MetricChartEvaluation } from './MetricChartEvaluation'; import { ChartType } from '@/api/asset_interfaces/metric/charts/enum'; diff --git a/web/src/layouts/ChatLayout/ChatContainer/ChatContent/ChatResponseMessages/ChatResponseReasoning.tsx b/web/src/layouts/ChatLayout/ChatContainer/ChatContent/ChatResponseMessages/ChatResponseReasoning.tsx index dbe10f18e..04aab118d 100644 --- a/web/src/layouts/ChatLayout/ChatContainer/ChatContent/ChatResponseMessages/ChatResponseReasoning.tsx +++ b/web/src/layouts/ChatLayout/ChatContainer/ChatContent/ChatResponseMessages/ChatResponseReasoning.tsx @@ -27,6 +27,7 @@ export const ChatResponseReasoning: React.FC<{ messageId: string; chatId: string; }> = React.memo(({ reasoningMessageId, isCompletedStream, messageId, chatId }) => { + const urlMessageId = useChatLayoutContextSelector((x) => x.messageId); const { data: lastMessageTitle } = useGetChatMessage(messageId, { select: (x) => x?.reasoning_messages?.[reasoningMessageId ?? '']?.title }); @@ -34,7 +35,7 @@ export const ChatResponseReasoning: React.FC<{ select: (x) => x?.final_reasoning_message }); const selectedFileType = useChatLayoutContextSelector((x) => x.selectedFileType); - const isReasonginFileSelected = selectedFileType === 'reasoning'; + const isReasonginFileSelected = selectedFileType === 'reasoning' && urlMessageId === messageId; const showShimmerText = isReasonginFileSelected ? false : !isCompletedStream; const blackBoxMessage = useQuery({ @@ -74,7 +75,9 @@ export const ChatResponseReasoning: React.FC<{ key={text} className="flex h-[14px] max-h-[14px] w-fit cursor-pointer items-center"> {!showShimmerText ? ( - + {text} ) : ( diff --git a/web/src/layouts/ChatLayout/ChatContext/useAutoChangeLayout.ts b/web/src/layouts/ChatLayout/ChatContext/useAutoChangeLayout.ts index 3a9bc32bb..15044a128 100644 --- a/web/src/layouts/ChatLayout/ChatContext/useAutoChangeLayout.ts +++ b/web/src/layouts/ChatLayout/ChatContext/useAutoChangeLayout.ts @@ -25,7 +25,6 @@ export const useAutoChangeLayout = ({ const messageId = useChatLayoutContextSelector((x) => x.messageId); const metricId = useChatLayoutContextSelector((x) => x.metricId); const dashboardId = useChatLayoutContextSelector((x) => x.dashboardId); - const secondaryView = useChatLayoutContextSelector((x) => x.secondaryView); const dashboardVersionNumber = useChatLayoutContextSelector((x) => x.dashboardVersionNumber); const metricVersionNumber = useChatLayoutContextSelector((x) => x.metricVersionNumber); const currentRoute = useChatLayoutContextSelector((x) => x.currentRoute);