FEAT: Add availabilityService (#81)

* auto and fallback work

* test fixes

* fixes

* Show model dialog even if there's no more fallback option

* fix tests

* fix failing test

* disable showInDialog for model in settings

* revert package-lock.json

* remove dup line

---------

Co-authored-by: Sehoon Shon <sshon@google.com>
This commit is contained in:
Adam Weidman
2025-12-11 21:51:16 -05:00
committed by Tommaso Sciortino
parent ad994cfe8b
commit 48ad6983a3
37 changed files with 876 additions and 1511 deletions
+6 -2
View File
@@ -7,7 +7,11 @@
import type React from 'react';
import { Box, Text } from 'ink';
import { theme } from '../semantic-colors.js';
import { shortenPath, tildeifyPath } from '@google/gemini-cli-core';
import {
shortenPath,
tildeifyPath,
getDisplayString,
} from '@google/gemini-cli-core';
import { ConsoleSummaryDisplay } from './ConsoleSummaryDisplay.js';
import process from 'node:process';
import { ThemedGradient } from './ThemedGradient.js';
@@ -145,7 +149,7 @@ export const Footer: React.FC = () => {
<Box alignItems="center" justifyContent="flex-end">
<Box alignItems="center">
<Text color={theme.text.accent}>
{model}
{getDisplayString(model)}
{!hideContextPercentage && (
<>
{' '}
@@ -13,6 +13,8 @@ import {
DEFAULT_GEMINI_FLASH_LITE_MODEL,
DEFAULT_GEMINI_FLASH_MODEL,
DEFAULT_GEMINI_MODEL,
FLASH_PREVIEW_MODEL_REVERT_BEFORE_MERGE,
PREVIEW_GEMINI_FLASH_MODEL,
UserTierId,
} from '@google/gemini-cli-core';
@@ -44,7 +46,9 @@ export function ProQuotaDialog({
// flash and flash lite don't have options to switch or upgrade.
if (
failedModel === DEFAULT_GEMINI_FLASH_MODEL ||
failedModel === DEFAULT_GEMINI_FLASH_LITE_MODEL
failedModel === DEFAULT_GEMINI_FLASH_LITE_MODEL ||
failedModel === PREVIEW_GEMINI_FLASH_MODEL ||
failedModel === FLASH_PREVIEW_MODEL_REVERT_BEFORE_MERGE
) {
items = [
{