@@ -2,7 +2,10 @@ import { MessageScroller } from "@shadcn/react/message-scroller";
22import type { Meta , StoryObj } from "@storybook/react-vite" ;
33import type { FC } from "react" ;
44import { expect , fn , userEvent , waitFor , within } from "storybook/test" ;
5- import { chatPromptsKey , userCompactionThresholds } from "#/api/queries/chats" ;
5+ import {
6+ chatPromptsKey ,
7+ userCompactionThresholdsKey ,
8+ } from "#/api/queries/chats" ;
69import { preferenceSettings } from "#/api/queries/users" ;
710import type * as TypesGen from "#/api/typesGenerated" ;
811import { MockChat , MockChatQueuedMessage } from "#/testHelpers/chatEntities" ;
@@ -43,7 +46,7 @@ const meta = {
4346 data : MockUserPreferenceSettings ,
4447 } ,
4548 {
46- key : userCompactionThresholds ( ) . queryKey ,
49+ key : userCompactionThresholdsKey ,
4750 data : MockUserChatCompactionThresholds ,
4851 } ,
4952 ] ,
@@ -55,7 +58,7 @@ type Story = StoryObj<typeof meta>;
5558
5659const CHAT_ID = "chat-page-content-stories" ;
5760
58- const MockUserChatCompactionThresholdsWithOverride : TypesGen . UserChatCompactionThresholds =
61+ const mockUserChatCompactionThresholdsWithOverride : TypesGen . UserChatCompactionThresholds =
5962 {
6063 ...MockUserChatCompactionThresholds ,
6164 thresholds : [
@@ -66,7 +69,7 @@ const MockUserChatCompactionThresholdsWithOverride: TypesGen.UserChatCompactionT
6669 ] ,
6770 } ;
6871
69- const compactionModels : readonly TypesGen . ChatModel [ ] = [
72+ const mockCompactionModels : readonly TypesGen . ChatModel [ ] = [
7073 {
7174 ...MockChatModel ,
7275 id : MockChat . last_model_config_id ,
@@ -391,7 +394,7 @@ const CompactionChatPageInput: FC = () => {
391394 < ChatPageInput
392395 chat = { MockChat }
393396 store = { store }
394- models = { compactionModels }
397+ models = { mockCompactionModels }
395398 onSend = { fn ( ) }
396399 onDeleteQueuedMessage = { fn ( ) }
397400 onPromoteQueuedMessage = { fn ( ) }
@@ -429,8 +432,8 @@ export const CompactsAtUserOverride: Story = {
429432 data : MockUserPreferenceSettings ,
430433 } ,
431434 {
432- key : userCompactionThresholds ( ) . queryKey ,
433- data : MockUserChatCompactionThresholdsWithOverride ,
435+ key : userCompactionThresholdsKey ,
436+ data : mockUserChatCompactionThresholdsWithOverride ,
434437 } ,
435438 {
436439 key : chatPromptsKey ( MockChat . id ) ,
@@ -456,7 +459,7 @@ export const CompactsAtHistoricalModelDefault: Story = {
456459 data : MockUserPreferenceSettings ,
457460 } ,
458461 {
459- key : userCompactionThresholds ( ) . queryKey ,
462+ key : userCompactionThresholdsKey ,
460463 data : MockUserChatCompactionThresholds ,
461464 } ,
462465 {
0 commit comments