feat: launch Gemini 3 in Gemini CLI 🚀🚀🚀 (in main) (#13287)

Co-authored-by: Adam Weidman <65992621+adamfweidman@users.noreply.github.com>
Co-authored-by: Sehoon Shon <sshon@google.com>
Co-authored-by: Adib234 <30782825+Adib234@users.noreply.github.com>
Co-authored-by: Sandy Tao <sandytao520@icloud.com>
Co-authored-by: Abhi <43648792+abhipatel12@users.noreply.github.com>
Co-authored-by: Aishanee Shah <aishaneeshah@gmail.com>
Co-authored-by: gemini-cli-robot <gemini-cli-robot@google.com>
Co-authored-by: Gal Zahavi <38544478+galz10@users.noreply.github.com>
Co-authored-by: Jacob Richman <jacob314@gmail.com>
Co-authored-by: joshualitt <joshualitt@google.com>
Co-authored-by: Jenna Inouye <jinouye@google.com>
This commit is contained in:
Shreya Keshive
2025-11-18 12:01:16 -05:00
committed by GitHub
parent 78075c8a37
commit 86828bb561
79 changed files with 3148 additions and 605 deletions

View File

@@ -181,6 +181,10 @@ export const AppContainer = (props: AppContainerProps) => {
null,
);
const [defaultBannerText, setDefaultBannerText] = useState('');
const [warningBannerText, setWarningBannerText] = useState('');
const [bannerVisible, setBannerVisible] = useState(true);
const extensionManager = config.getExtensionLoader() as ExtensionManager;
// We are in the interactive CLI, update how we request consent and settings.
extensionManager.setRequestConsent((description) =>
@@ -596,6 +600,7 @@ Logging in with Google... Please restart Gemini CLI to continue.
slashCommandActions,
extensionsUpdateStateInternal,
isConfigInitialized,
setBannerVisible,
setCustomDialog,
);
@@ -1305,6 +1310,38 @@ Logging in with Google... Please restart Gemini CLI to continue.
};
}, []);
useEffect(() => {
let isMounted = true;
const fetchBannerTexts = async () => {
const [defaultBanner, warningBanner] = await Promise.all([
config.getBannerTextNoCapacityIssues(),
config.getBannerTextCapacityIssues(),
]);
if (isMounted) {
setDefaultBannerText(defaultBanner);
setWarningBannerText(warningBanner);
setBannerVisible(true);
refreshStatic();
const authType = config.getContentGeneratorConfig()?.authType;
if (
authType === AuthType.USE_GEMINI ||
authType === AuthType.USE_VERTEX_AI
) {
setDefaultBannerText(
'Gemini 3 is now available.\nTo use Gemini 3, enable "Preview features" in /settings\nLearn more at https://goo.gle/enable-preview-features',
);
}
}
};
fetchBannerTexts();
return () => {
isMounted = false;
};
}, [config, refreshStatic]);
const uiState: UIState = useMemo(
() => ({
history: historyManager.history,
@@ -1394,6 +1431,11 @@ Logging in with Google... Please restart Gemini CLI to continue.
customDialog,
copyModeEnabled,
warningMessage,
bannerData: {
defaultText: defaultBannerText,
warningText: warningBannerText,
},
bannerVisible,
}),
[
isThemeDialogOpen,
@@ -1482,6 +1524,9 @@ Logging in with Google... Please restart Gemini CLI to continue.
authState,
copyModeEnabled,
warningMessage,
defaultBannerText,
warningBannerText,
bannerVisible,
],
);
@@ -1519,6 +1564,7 @@ Logging in with Google... Please restart Gemini CLI to continue.
popAllMessages,
handleApiKeySubmit,
handleApiKeyCancel,
setBannerVisible,
}),
[
handleThemeSelect,
@@ -1548,6 +1594,7 @@ Logging in with Google... Please restart Gemini CLI to continue.
popAllMessages,
handleApiKeySubmit,
handleApiKeyCancel,
setBannerVisible,
],
);