From 6f7beb414cae67df59aea3f8a3e99389c3a82aec Mon Sep 17 00:00:00 2001 From: Miguel Solorio Date: Thu, 31 Jul 2025 16:24:23 -0700 Subject: Highlight slash commands in history (#5323) --- packages/cli/src/ui/components/HistoryItemDisplay.test.tsx | 12 ++++++++++++ 1 file changed, 12 insertions(+) (limited to 'packages/cli/src/ui/components/HistoryItemDisplay.test.tsx') diff --git a/packages/cli/src/ui/components/HistoryItemDisplay.test.tsx b/packages/cli/src/ui/components/HistoryItemDisplay.test.tsx index b40b20bc..f806abd6 100644 --- a/packages/cli/src/ui/components/HistoryItemDisplay.test.tsx +++ b/packages/cli/src/ui/components/HistoryItemDisplay.test.tsx @@ -35,6 +35,18 @@ describe('', () => { expect(lastFrame()).toContain('Hello'); }); + it('renders UserMessage for "user" type with slash command', () => { + const item: HistoryItem = { + ...baseItem, + type: MessageType.USER, + text: '/theme', + }; + const { lastFrame } = render( + , + ); + expect(lastFrame()).toContain('/theme'); + }); + it('renders StatsDisplay for "stats" type', () => { const item: HistoryItem = { ...baseItem, -- cgit v1.2.3