Fix #5177: Add Google Cloud Project ID setting for Gemini CLI

- Add project ID input field to GeminiCli settings component
- Add translation strings for project ID field with helpful descriptions
- Enables users to set custom project ID for enterprise/non-free tier access
- Backend support was already implemented, this adds the missing UI
This commit is contained in:
Roo Code 2025-06-30 08:11:04 +00:00
parent 3a8ba27615
commit 616ec2b7aa
2 changed files with 14 additions and 0 deletions

View file

@ -40,6 +40,17 @@ export const GeminiCli = ({ apiConfiguration, setApiConfigurationField }: Gemini
{t("settings:providers.geminiCli.oauthPathDescription")}
</div>
<VSCodeTextField
value={apiConfiguration?.geminiCliProjectId || ""}
onInput={handleInputChange("geminiCliProjectId")}
placeholder={t("settings:providers.geminiCli.projectIdPlaceholder")}
className="w-full">
<label className="block font-medium mb-1">{t("settings:providers.geminiCli.projectId")}</label>
</VSCodeTextField>
<div className="text-sm text-vscode-descriptionForeground -mt-2">
{t("settings:providers.geminiCli.projectIdDescription")}
</div>
<div className="text-sm text-vscode-descriptionForeground mt-3">
{t("settings:providers.geminiCli.description")}
</div>

View file

@ -313,6 +313,9 @@
"description": "This provider uses OAuth authentication from the Gemini CLI tool and does not require API keys.",
"oauthPath": "OAuth Credentials Path (optional)",
"oauthPathDescription": "Path to the OAuth credentials file. Leave empty to use the default location (~/.gemini/oauth_creds.json).",
"projectId": "Google Cloud Project ID (optional)",
"projectIdDescription": "Specify your Google Cloud Project ID for enterprise or non-free tier access. Leave empty for automatic project discovery with personal accounts.",
"projectIdPlaceholder": "e.g., my-project-id",
"instructions": "If you haven't authenticated yet, please run",
"instructionsContinued": "in your terminal first.",
"setupLink": "Gemini CLI Setup Instructions",