Added in proper checks for customer tiers in 429/Quota error messaging (#3863)

Co-authored-by: Ioannis Papapanagiotou <iduckhd@hotmail.com>
This commit is contained in:
Bryan Morgan
2025-07-11 11:25:30 -04:00
committed by GitHub
parent c9e1e6d3bd
commit cdbe2fffd9
5 changed files with 79 additions and 4 deletions

View File

@@ -67,6 +67,7 @@ interface MockServerConfig {
getAccessibility: Mock<() => AccessibilitySettings>;
getProjectRoot: Mock<() => string | undefined>;
getAllGeminiMdFilenames: Mock<() => string[]>;
getUserTier: Mock<() => Promise<string | undefined>>;
}
// Mock @google/gemini-cli-core and its Config class
@@ -129,6 +130,7 @@ vi.mock('@google/gemini-cli-core', async (importOriginal) => {
getAllGeminiMdFilenames: vi.fn(() => ['GEMINI.md']),
setFlashFallbackHandler: vi.fn(),
getSessionId: vi.fn(() => 'test-session-id'),
getUserTier: vi.fn().mockResolvedValue(undefined),
};
});
return {
@@ -155,6 +157,8 @@ vi.mock('./hooks/useAuthCommand', () => ({
openAuthDialog: vi.fn(),
handleAuthSelect: vi.fn(),
handleAuthHighlight: vi.fn(),
isAuthenticating: false,
cancelAuthentication: vi.fn(),
})),
}));