import { describe, expect, it } from 'vitest' import { coerceThinkingText } from './chat-runtime' describe('coerceThinkingText', () => { it('strips streaming status prefixes from thinking deltas', () => { expect(coerceThinkingText("◉_◉ processing... checking the user's request")).toBe("checking the user's request") expect(coerceThinkingText('(¬‿¬) analyzing... reading the file')).toBe('reading the file') }) it('drops empty thinking rewrite placeholder text', () => { expect( coerceThinkingText( "◉_◉ processing... I don't see any current rewritten thinking or next thinking to process. Could you provide the thinking content you'd like me to rewrite?" ) ).toBe('') }) })