From 0b539e6fe8216adedafc4fac519fa41c26267680 Mon Sep 17 00:00:00 2001 From: Nate Kelley Date: Mon, 14 Apr 2025 22:43:04 -0600 Subject: [PATCH] update reasoing builder --- web/.storybook/mocks/next-navigation.ts | 3 ++- .../stories/BusterChart.BarChart.stories.tsx | 18 +++++++++--------- .../ChatResponseReasoning.tsx | 6 +++++- .../useSelectedFile/createSelectedFile.ts | 3 ++- 4 files changed, 18 insertions(+), 12 deletions(-) diff --git a/web/.storybook/mocks/next-navigation.ts b/web/.storybook/mocks/next-navigation.ts index 82363f0b5..6a64b2c7c 100644 --- a/web/.storybook/mocks/next-navigation.ts +++ b/web/.storybook/mocks/next-navigation.ts @@ -3,7 +3,8 @@ export const useRouter = () => ({ push: () => {}, replace: () => {}, refresh: () => {}, - back: () => {} + back: () => {}, + prefetch: () => {} }); export const usePathname = () => '/'; diff --git a/web/src/components/ui/charts/stories/BusterChart.BarChart.stories.tsx b/web/src/components/ui/charts/stories/BusterChart.BarChart.stories.tsx index e175caf0d..ff8bc0ded 100644 --- a/web/src/components/ui/charts/stories/BusterChart.BarChart.stories.tsx +++ b/web/src/components/ui/charts/stories/BusterChart.BarChart.stories.tsx @@ -50,7 +50,7 @@ export const Default: Story = { }, render: (args) => { return ( -
+
); @@ -93,7 +93,7 @@ export const MultipleYAxis: Story = { }, render: (args) => { return ( -
+
); @@ -137,7 +137,7 @@ export const WithCategory: Story = { }, render: (args) => { return ( -
+
); @@ -182,7 +182,7 @@ export const DateXAxis: Story = { }, render: (args) => { return ( -
+
); @@ -223,7 +223,7 @@ export const HorizontalBar: Story = { }, render: (args) => { return ( -
+
); @@ -273,7 +273,7 @@ export const WithDataLabels: Story = { }, render: (args) => { return ( -
+
); @@ -325,7 +325,7 @@ export const WithDataLabelsAndStackTotal: Story = { }, render: (args) => { return ( -
+
); @@ -370,7 +370,7 @@ export const LargeDataset: Story = { }, render: (args) => { return ( -
+
); @@ -416,7 +416,7 @@ export const LargeDatasetWithDualYAxis: Story = { }, render: (args) => { return ( -
+
); diff --git a/web/src/layouts/ChatLayout/ChatContainer/ChatContent/ChatResponseMessages/ChatResponseReasoning.tsx b/web/src/layouts/ChatLayout/ChatContainer/ChatContent/ChatResponseMessages/ChatResponseReasoning.tsx index 383bebba2..17c6ddd7d 100644 --- a/web/src/layouts/ChatLayout/ChatContainer/ChatContent/ChatResponseMessages/ChatResponseReasoning.tsx +++ b/web/src/layouts/ChatLayout/ChatContainer/ChatContent/ChatResponseMessages/ChatResponseReasoning.tsx @@ -50,7 +50,11 @@ export const ChatResponseReasoning: React.FC<{ }, [lastMessageTitle, finalReasoningMessage, blackBoxMessage]); const onClickReasoningFile = useMemoizedFn(() => { - onSetSelectedFile(isReasonginFileSelected ? null : { id: messageId, type: 'reasoning' }); + onSetSelectedFile( + isReasonginFileSelected + ? null + : { id: messageId, type: 'reasoning', versionNumber: undefined } + ); }); const href = useMemo(() => { diff --git a/web/src/layouts/ChatLayout/ChatLayoutContext/useSelectedFile/createSelectedFile.ts b/web/src/layouts/ChatLayout/ChatLayoutContext/useSelectedFile/createSelectedFile.ts index 6cb012cc8..2d3dc16e2 100644 --- a/web/src/layouts/ChatLayout/ChatLayoutContext/useSelectedFile/createSelectedFile.ts +++ b/web/src/layouts/ChatLayout/ChatLayoutContext/useSelectedFile/createSelectedFile.ts @@ -34,7 +34,8 @@ export const createSelectedFile = ( if (messageId) { return { id: messageId, - type: 'reasoning' + type: 'reasoning', + versionNumber: undefined }; }