chore: improve error messages for --resume (#15360)

This commit is contained in:
Jack Wotherspoon
2025-12-22 17:44:41 -05:00
committed by GitHub
parent 0a216b28f3
commit 24c722454b
2 changed files with 52 additions and 8 deletions

View File

@@ -10,6 +10,7 @@ import {
extractFirstUserMessage,
formatRelativeTime,
hasUserOrAssistantMessage,
SessionError,
} from './sessionUtils.js';
import type { Config, MessageRecord } from '@google/gemini-cli-core';
import { SESSION_FILE_PREFIX } from '@google/gemini-cli-core';
@@ -333,10 +334,10 @@ describe('SessionSelector', () => {
await expect(
sessionSelector.resolveSession('invalid-uuid'),
).rejects.toThrow('Invalid session identifier "invalid-uuid"');
).rejects.toThrow(SessionError);
await expect(sessionSelector.resolveSession('999')).rejects.toThrow(
'Invalid session identifier "999"',
SessionError,
);
});