Highlight slash commands in history (#5323)

This commit is contained in:
Miguel Solorio
2025-07-31 16:24:23 -07:00
committed by GitHub
parent 750e647988
commit 8e6c715b0f
2 changed files with 19 additions and 3 deletions

View File

@@ -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,