Skip to content

Commit 58206cf

Browse files
committed
refactor(chat): move the scaling test helper out of the route tree
It is a dependency-free complexity-ratio helper shared by a route-tree test and a components/chat test, so living under app/workspace made the canonical tree import back into the route tree. Moves to components/chat, where both consumers reach it in the allowed direction.
1 parent 58c553a commit 58206cf

3 files changed

Lines changed: 2 additions & 2 deletions

File tree

apps/sim/app/workspace/[workspaceId]/home/components/message-content/components/special-tags/special-tags.test.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,14 +14,14 @@ vi.mock('@/lib/auth/auth-client', () => ({
1414
useSession: vi.fn(() => ({ data: null, isPending: false })),
1515
}))
1616

17+
import { scalingRatioOver4x } from '@/components/chat/scaling-test-helpers'
1718
import type { ContentSegment, IndexOfCache } from '@/components/chat/special-tags/parse'
1819
import {
1920
memoizedIndexOf,
2021
parseQuestionTagBody,
2122
parseSpecialTags,
2223
SPECIAL_TAG_NAMES,
2324
} from '@/components/chat/special-tags/parse'
24-
import { scalingRatioOver4x } from '@/app/workspace/[workspaceId]/home/components/message-content/components/scaling-test-helpers'
2525

2626
/**
2727
* What a reader actually sees: the renderer concatenates adjacent text segments

apps/sim/components/chat/chat-content/chat-content.test.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
*/
44
import { describe, expect, it } from 'vitest'
55
import { sanitizeChatDisplayContent } from '@/components/chat/chat-content/chat-sanitize'
6-
import { scalingRatioOver4x } from '@/app/workspace/[workspaceId]/home/components/message-content/components/scaling-test-helpers'
6+
import { scalingRatioOver4x } from '@/components/chat/scaling-test-helpers'
77

88
describe('sanitizeChatDisplayContent', () => {
99
it('unwraps workspace resource tags from inline code spans', () => {

apps/sim/app/workspace/[workspaceId]/home/components/message-content/components/scaling-test-helpers.ts renamed to apps/sim/components/chat/scaling-test-helpers.ts

File renamed without changes.

0 commit comments

Comments
 (0)