mirror of
https://github.com/google-gemini/gemini-cli.git
synced 2026-07-15 04:20:57 -07:00
fix(cli): filter internal session context from history during resumption (#27391)
This commit is contained in:
committed by
GitHub
parent
3cc7e5b096
commit
630ecc21b9
@@ -1111,6 +1111,28 @@ describe('convertSessionToHistoryFormats', () => {
|
||||
});
|
||||
});
|
||||
|
||||
it('should filter out <session_context> from UI history', () => {
|
||||
const messages: MessageRecord[] = [
|
||||
{
|
||||
id: '1',
|
||||
timestamp: new Date().toISOString(),
|
||||
type: 'user',
|
||||
content:
|
||||
'<session_context>\nThis is the Gemini CLI\n</session_context>',
|
||||
},
|
||||
{
|
||||
id: '2',
|
||||
timestamp: new Date().toISOString(),
|
||||
type: 'user',
|
||||
content: 'Real message',
|
||||
},
|
||||
];
|
||||
|
||||
const result = convertSessionToHistoryFormats(messages);
|
||||
expect(result.uiHistory).toHaveLength(1);
|
||||
expect(result.uiHistory[0].text).toBe('Real message');
|
||||
});
|
||||
|
||||
it('should handle missing tool descriptions and displayNames', () => {
|
||||
const messages: MessageRecord[] = [
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user