diff options
| author | Miguel Solorio <[email protected]> | 2025-07-31 16:24:23 -0700 |
|---|---|---|
| committer | GitHub <[email protected]> | 2025-07-31 23:24:23 +0000 |
| commit | 6f7beb414cae67df59aea3f8a3e99389c3a82aec (patch) | |
| tree | 43112dfa7e96cbe484c94a3694d6efbdc5a59a98 /packages/cli/src/ui/components/HistoryItemDisplay.test.tsx | |
| parent | 61e382444a69409b066a6c8382379f86492d579f (diff) | |
Highlight slash commands in history (#5323)
Diffstat (limited to 'packages/cli/src/ui/components/HistoryItemDisplay.test.tsx')
| -rw-r--r-- | packages/cli/src/ui/components/HistoryItemDisplay.test.tsx | 12 |
1 files changed, 12 insertions, 0 deletions
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('<HistoryItemDisplay />', () => { 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( + <HistoryItemDisplay {...baseItem} item={item} />, + ); + expect(lastFrame()).toContain('/theme'); + }); + it('renders StatsDisplay for "stats" type', () => { const item: HistoryItem = { ...baseItem, |
