mirror of
https://github.com/google-gemini/gemini-cli.git
synced 2026-03-18 01:51:20 -07:00
Fix bugs where Rewind and Resume showed Ugly and 100X too verbose content. (#17940)
This commit is contained in:
@@ -178,6 +178,30 @@ describe('convertSessionToHistoryFormats', () => {
|
||||
});
|
||||
});
|
||||
|
||||
it('should prioritize displayContent for UI history but use content for client history', () => {
|
||||
const messages: MessageRecord[] = [
|
||||
{
|
||||
type: 'user',
|
||||
content: [{ text: 'Expanded content' }],
|
||||
displayContent: [{ text: 'User input' }],
|
||||
} as MessageRecord,
|
||||
];
|
||||
|
||||
const result = convertSessionToHistoryFormats(messages);
|
||||
|
||||
expect(result.uiHistory).toHaveLength(1);
|
||||
expect(result.uiHistory[0]).toMatchObject({
|
||||
type: 'user',
|
||||
text: 'User input',
|
||||
});
|
||||
|
||||
expect(result.clientHistory).toHaveLength(1);
|
||||
expect(result.clientHistory[0]).toEqual({
|
||||
role: 'user',
|
||||
parts: [{ text: 'Expanded content' }],
|
||||
});
|
||||
});
|
||||
|
||||
it('should filter out slash commands from client history but keep in UI', () => {
|
||||
const messages: MessageRecord[] = [
|
||||
{ type: 'user', content: '/help' } as MessageRecord,
|
||||
|
||||
Reference in New Issue
Block a user