Skip to content

Commit e424e2d

Browse files
committed
fix(thinking): remove thinking text
1 parent 6dc3fa6 commit e424e2d

2 files changed

Lines changed: 42 additions & 1 deletion

File tree

Lines changed: 42 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,42 @@
1+
/**
2+
* @vitest-environment node
3+
*/
4+
import type { ReactNode } from 'react'
5+
import { renderToStaticMarkup } from 'react-dom/server'
6+
import { describe, expect, it, vi } from 'vitest'
7+
import { ToolCallItem } from './tool-call-item'
8+
9+
vi.mock('@/components/ui', () => ({
10+
ShimmerText: ({ children }: { children: ReactNode }) => <span>{children}</span>,
11+
}))
12+
13+
describe('ToolCallItem', () => {
14+
it.each(['executing', 'success', 'error', 'cancelled'] as const)(
15+
'renders the %s tool row without an icon',
16+
(status) => {
17+
const markup = renderToStaticMarkup(
18+
<ToolCallItem
19+
toolName='grep'
20+
displayTitle={status === 'executing' ? 'Searching for Pulse' : 'Searched for Pulse'}
21+
status={status}
22+
/>
23+
)
24+
25+
expect(markup).not.toContain('<svg')
26+
}
27+
)
28+
29+
it('does not restore a progressive streamed title after the tool settles', () => {
30+
const markup = renderToStaticMarkup(
31+
<ToolCallItem
32+
toolName='workspace_file'
33+
displayTitle='Wrote brief.md'
34+
status='success'
35+
streamingArgs='{"operation":"update","title":"brief.md"}'
36+
/>
37+
)
38+
39+
expect(markup).toContain('Wrote brief.md')
40+
expect(markup).not.toContain('Writing brief.md')
41+
})
42+
})

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

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -399,7 +399,6 @@ describe('completed tool titles', () => {
399399
})
400400

401401
describe('narration text seams', () => {
402-
403402
it('never inserts a space into a segment split mid-word or mid-URL', () => {
404403
const seam = (first: string, second: string): string => {
405404
const blocks: ContentBlock[] = [

0 commit comments

Comments
 (0)