@google/gemini-cli 0.65.0-preview.0 → 0.66.0-nightly.20261017.ged96faedf
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +21 -56
- package/bundle/{chunk-NL7ZHGCH.js → chunk-464WBVYM.js} +1 -1
- package/bundle/{chunk-QJK54DSE.js → chunk-5VQUE3OF.js} +1 -1
- package/bundle/{chunk-VF5WQSOE.js → chunk-7ARQMEMX.js} +1 -1
- package/bundle/{chunk-2WVLIJA5.js → chunk-BUG4N6U5.js} +145 -77
- package/bundle/{chunk-F6AJM4WN.js → chunk-DPV3ZEOC.js} +3 -3
- package/bundle/{chunk-GSQEBEGC.js → chunk-ERBSM2HU.js} +3 -3
- package/bundle/{chunk-WTRK3NVX.js → chunk-GEUFOF2X.js} +106 -1500
- package/bundle/{chunk-V2R74WAG.js → chunk-H4U2CWBQ.js} +151 -81
- package/bundle/chunk-HDP6V6JI.js +1956 -0
- package/bundle/{chunk-RPHDSDL6.js → chunk-IDCWFZU3.js} +1 -1
- package/bundle/{chunk-SN7QZKXC.js → chunk-IGOTAEJY.js} +170 -1551
- package/bundle/chunk-J5QPCO3J.js +101859 -0
- package/bundle/{chunk-H2CZXS7F.js → chunk-JY3DYBJT.js} +1 -1
- package/bundle/{chunk-HLOOE7YN.js → chunk-LDGJJCVW.js} +9 -8
- package/bundle/chunk-MH4KAY5W.js +512 -0
- package/bundle/{chunk-LLE5Z636.js → chunk-NAPT3FAL.js} +106 -1500
- package/bundle/chunk-NOSWGXRT.js +1956 -0
- package/bundle/{chunk-43EXRO7A.js → chunk-NU74STQ5.js} +145 -77
- package/bundle/{chunk-K7NOVQ6G.js → chunk-QCWGLPCO.js} +376 -231
- package/bundle/{chunk-WGL5FJOS.js → chunk-QF3ALSJN.js} +3 -3
- package/bundle/{chunk-K4G5D5ZZ.js → chunk-R4KPURFC.js} +1 -1
- package/bundle/chunk-R6XDLHLP.js +1956 -0
- package/bundle/chunk-R7UPATQC.js +1956 -0
- package/bundle/chunk-RACMC24X.js +118 -0
- package/bundle/{chunk-4JGVVJGK.js → chunk-RE4V6I3G.js} +1 -1
- package/bundle/{chunk-S7BCRBI4.js → chunk-UTTFPWGQ.js} +1 -1
- package/bundle/chunk-VXYA6LA4.js +1571 -0
- package/bundle/chunk-XY2QSBID.js +17603 -0
- package/bundle/{chunk-K7AA35SP.js → chunk-YOI4DS3V.js} +365 -230
- package/bundle/chunk-YP27UYI4.js +154 -0
- package/bundle/{chunk-TP236FKO.js → chunk-YPLMNSM4.js} +8243 -15166
- package/bundle/chunk-ZFQ347ZN.js +402181 -0
- package/bundle/{cleanup-HPADDONA.js → cleanup-6FAZDCL3.js} +2 -2
- package/bundle/{cleanup-JOMSXKMP.js → cleanup-GNZLZG55.js} +2 -2
- package/bundle/{cleanup-LYRJHMMO.js → cleanup-RX3AC5ET.js} +2 -2
- package/bundle/cleanup-WAU2KYGS.js +32 -0
- package/bundle/{core-NCJTYARO.js → core-AGGXDQOT.js} +13 -1
- package/bundle/{devtoolsService-WP2OPVPB.js → devtoolsService-6XOCGTLC.js} +2 -2
- package/bundle/{devtoolsService-JFJBTZ4B.js → devtoolsService-FBTSVQ57.js} +4 -3
- package/bundle/{devtoolsService-HIZA3JGR.js → devtoolsService-UO6ZB72B.js} +2 -2
- package/bundle/devtoolsService-W5QGZ3SW.js +4359 -0
- package/bundle/{dist-GQKLLBDW.js → dist-2ELAEESC.js} +13 -1
- package/bundle/{core-IVQAI4S6.js → dist-2R7C2WHA.js} +13 -1
- package/bundle/dist-PALH7PJS.js +2280 -0
- package/bundle/docs/changelogs/index.md +22 -0
- package/bundle/docs/changelogs/latest.md +64 -54
- package/bundle/docs/changelogs/preview.md +91 -55
- package/bundle/docs/reference/configuration.md +8 -3
- package/bundle/docs/reference/keyboard-shortcuts.md +18 -4
- package/bundle/{gemini-5TUKZVGS.js → gemini-6MH55Y7F.js} +37 -18
- package/bundle/{gemini-7CHJYSHM.js → gemini-DOXUDJDY.js} +37 -18
- package/bundle/{gemini-546WMAHG.js → gemini-OHYXI52N.js} +237 -202
- package/bundle/gemini-OUEDCH4P.js +17970 -0
- package/bundle/gemini.js +14 -15
- package/bundle/{interactiveCli-E3PUPYMZ.js → interactiveCli-7LIKGDTJ.js} +1061 -989
- package/bundle/{interactiveCli-5XIAIY74.js → interactiveCli-EGQYN3KR.js} +1371 -1280
- package/bundle/{interactiveCli-L4PK7YY3.js → interactiveCli-TG7PGV4V.js} +1061 -989
- package/bundle/interactiveCli-YEXCUIFZ.js +35601 -0
- package/bundle/{liteRtServerManager-JCTYJBV5.js → liteRtServerManager-KAPXZ3EU.js} +4 -4
- package/bundle/{liteRtServerManager-JERG6KYC.js → liteRtServerManager-MSJIWMWP.js} +4 -4
- package/bundle/{liteRtServerManager-22ISMNN2.js → liteRtServerManager-PD2N3GLD.js} +4 -4
- package/bundle/liteRtServerManager-X5SCFYXM.js +65 -0
- package/bundle/{oauth2-provider-XRUER2XR.js → oauth2-provider-IUN6Z4IO.js} +1 -1
- package/bundle/{oauth2-provider-477UJQX6.js → oauth2-provider-MKJIQNWP.js} +41 -79
- package/bundle/{oauth2-provider-MKWWBW4K.js → oauth2-provider-RMF7U2UN.js} +1 -1
- package/bundle/oauth2-provider-ZM5GWCNX.js +273 -0
- package/bundle/{start-MVIPJNQ5.js → start-5GIUIER3.js} +6 -6
- package/bundle/{start-RZWSVT55.js → start-APIVGXZ3.js} +6 -6
- package/bundle/{start-AGMBPY3O.js → start-GJ4TH4KZ.js} +6 -6
- package/bundle/start-WDS52ZNE.js +18 -0
- package/package.json +1 -1
- package/bundle/chunk-4DCA4L53.js +0 -425
- package/bundle/chunk-BFIV7GTA.js +0 -425
- package/bundle/chunk-V72FRESD.js +0 -425
package/README.md
CHANGED
|
@@ -1,3 +1,12 @@
|
|
|
1
|
+
> [!NOTE]
|
|
2
|
+
>
|
|
3
|
+
> **Unpaid tier and Google One users:** Gemini CLI was replaced by Antigravity
|
|
4
|
+
> CLI on June 18th, 2026. To learn more, see our
|
|
5
|
+
> [blog post](https://developers.googleblog.com/an-important-update-transitioning-gemini-cli-to-antigravity-cli).
|
|
6
|
+
>
|
|
7
|
+
> **Gemini CLI has not been optimized for Gemini 4 Argon.** To use Gemini 4
|
|
8
|
+
> Argon, please use Antigravity.
|
|
9
|
+
|
|
1
10
|
# Gemini CLI
|
|
2
11
|
|
|
3
12
|
[](https://github.com/google-gemini/gemini-cli/actions/workflows/ci.yml)
|
|
@@ -6,7 +15,11 @@
|
|
|
6
15
|
[](https://github.com/google-gemini/gemini-cli/blob/main/LICENSE)
|
|
7
16
|
[](https://codewiki.google/github.com/google-gemini/gemini-cli?utm_source=badge&utm_medium=github&utm_campaign=github.com/google-gemini/gemini-cli)
|
|
8
17
|
|
|
9
|
-
!
|
|
18
|
+
> [!NOTE]
|
|
19
|
+
>
|
|
20
|
+
> Gemini CLI is not optimized for the latest Gemini models. For the best coding
|
|
21
|
+
> experience with Gemini models use
|
|
22
|
+
> [Antigravity CLI](https://antigravity.google/product/antigravity-cli)
|
|
10
23
|
|
|
11
24
|
Gemini CLI is an open-source AI agent that brings the power of Gemini directly
|
|
12
25
|
into your terminal. It provides lightweight access to Gemini, giving you the
|
|
@@ -14,19 +27,6 @@ most direct path from your prompt to our model.
|
|
|
14
27
|
|
|
15
28
|
Learn all about Gemini CLI in our [documentation](https://geminicli.com/docs/).
|
|
16
29
|
|
|
17
|
-
## 🚀 Why Gemini CLI?
|
|
18
|
-
|
|
19
|
-
- **🎯 Free tier**: 60 requests/min and 1,000 requests/day with personal Google
|
|
20
|
-
account.
|
|
21
|
-
- **🧠 Powerful Gemini 3 models**: Access to improved reasoning and 1M token
|
|
22
|
-
context window.
|
|
23
|
-
- **🔧 Built-in tools**: Google Search grounding, file operations, shell
|
|
24
|
-
commands, web fetching.
|
|
25
|
-
- **🔌 Extensible**: MCP (Model Context Protocol) support for custom
|
|
26
|
-
integrations.
|
|
27
|
-
- **💻 Terminal-first**: Designed for developers who live in the command line.
|
|
28
|
-
- **🛡️ Open source**: Apache 2.0 licensed.
|
|
29
|
-
|
|
30
30
|
## 📦 Installation
|
|
31
31
|
|
|
32
32
|
See
|
|
@@ -121,53 +121,13 @@ npm install -g @google/gemini-cli@nightly
|
|
|
121
121
|
[media generation with Imagen, Veo or Lyria](https://github.com/GoogleCloudPlatform/vertex-ai-creative-studio/tree/main/experiments/mcp-genmedia)
|
|
122
122
|
- Run non-interactively in scripts for workflow automation
|
|
123
123
|
|
|
124
|
-
### Advanced Capabilities
|
|
125
|
-
|
|
126
|
-
- Ground your queries with built-in
|
|
127
|
-
[Google Search](https://ai.google.dev/gemini-api/docs/grounding) for real-time
|
|
128
|
-
information
|
|
129
|
-
- Conversation checkpointing to save and resume complex sessions
|
|
130
|
-
- Custom context files (GEMINI.md) to tailor behavior for your projects
|
|
131
|
-
|
|
132
|
-
### GitHub Integration
|
|
133
|
-
|
|
134
|
-
Integrate Gemini CLI directly into your GitHub workflows with
|
|
135
|
-
[**Gemini CLI GitHub Action**](https://github.com/google-github-actions/run-gemini-cli):
|
|
136
|
-
|
|
137
|
-
- **Pull Request Reviews**: Automated code review with contextual feedback and
|
|
138
|
-
suggestions
|
|
139
|
-
- **Issue Triage**: Automated labeling and prioritization of GitHub issues based
|
|
140
|
-
on content analysis
|
|
141
|
-
- **On-demand Assistance**: Mention `@gemini-cli` in issues and pull requests
|
|
142
|
-
for help with debugging, explanations, or task delegation
|
|
143
|
-
- **Custom Workflows**: Build automated, scheduled and on-demand workflows
|
|
144
|
-
tailored to your team's needs
|
|
145
|
-
|
|
146
124
|
## 🔐 Authentication Options
|
|
147
125
|
|
|
148
126
|
Choose the authentication method that best fits your needs:
|
|
149
127
|
|
|
150
128
|
### Option 1: Sign in with Google (OAuth login using your Google Account)
|
|
151
129
|
|
|
152
|
-
|
|
153
|
-
Assist License. (see
|
|
154
|
-
[quota limits and terms of service](https://cloud.google.com/gemini/docs/quotas)
|
|
155
|
-
for details)
|
|
156
|
-
|
|
157
|
-
**Benefits:**
|
|
158
|
-
|
|
159
|
-
- **Free tier**: 60 requests/min and 1,000 requests/day
|
|
160
|
-
- **Gemini 3 models** with 1M token context window
|
|
161
|
-
- **No API key management** - just sign in with your Google account
|
|
162
|
-
- **Automatic updates** to latest models
|
|
163
|
-
|
|
164
|
-
#### Start Gemini CLI, then choose _Sign in with Google_ and follow the browser authentication flow when prompted
|
|
165
|
-
|
|
166
|
-
```bash
|
|
167
|
-
gemini
|
|
168
|
-
```
|
|
169
|
-
|
|
170
|
-
#### If you are using a paid Code Assist License from your organization, remember to set the Google Cloud Project
|
|
130
|
+
#### When using a paid Code Assist License from your organization, remember to set the Google Cloud Project
|
|
171
131
|
|
|
172
132
|
```bash
|
|
173
133
|
# Set your Google Cloud Project
|
|
@@ -181,7 +141,6 @@ gemini
|
|
|
181
141
|
|
|
182
142
|
**Benefits:**
|
|
183
143
|
|
|
184
|
-
- **Free tier**: 1000 requests/day with Gemini 3 (mix of flash and pro)
|
|
185
144
|
- **Model selection**: Choose specific Gemini models
|
|
186
145
|
- **Usage-based billing**: Upgrade for higher limits when needed
|
|
187
146
|
|
|
@@ -213,6 +172,12 @@ For Google Workspace accounts and other authentication methods, see the
|
|
|
213
172
|
|
|
214
173
|
## 🚀 Getting Started
|
|
215
174
|
|
|
175
|
+
> [!NOTE]
|
|
176
|
+
>
|
|
177
|
+
> Gemini CLI is not optimized for the latest Gemini models. For the best coding
|
|
178
|
+
> experience with Gemini models use
|
|
179
|
+
> [Antigravity CLI](https://antigravity.google/product/antigravity-cli)
|
|
180
|
+
|
|
216
181
|
### Basic Usage
|
|
217
182
|
|
|
218
183
|
#### Start in current directory
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
const require = (await import('node:module')).createRequire(import.meta.url); const __chunk_filename = (await import('node:url')).fileURLToPath(import.meta.url); const __chunk_dirname = (await import('node:path')).dirname(__chunk_filename);
|
|
2
2
|
import {
|
|
3
3
|
checkExhaustive
|
|
4
|
-
} from "./chunk-
|
|
4
|
+
} from "./chunk-QCWGLPCO.js";
|
|
5
5
|
import {
|
|
6
6
|
__commonJS,
|
|
7
7
|
__toESM
|
|
@@ -33,7 +33,7 @@ import {
|
|
|
33
33
|
partListUnionToString,
|
|
34
34
|
require_strip_json_comments,
|
|
35
35
|
sanitizeFilenamePart
|
|
36
|
-
} from "./chunk-
|
|
36
|
+
} from "./chunk-YOI4DS3V.js";
|
|
37
37
|
import {
|
|
38
38
|
__commonJS,
|
|
39
39
|
__require,
|
|
@@ -16388,6 +16388,18 @@ var LoadedSettings = class {
|
|
|
16388
16388
|
return;
|
|
16389
16389
|
}
|
|
16390
16390
|
this.isTrusted = isTrusted;
|
|
16391
|
+
if (isTrusted && Object.keys(this._workspaceFile.settings).length === 0 && Object.keys(this._workspaceFile.originalSettings).length > 0) {
|
|
16392
|
+
const resolvedWorkspaceSettings = resolveSettings(
|
|
16393
|
+
this._workspaceFile.originalSettings,
|
|
16394
|
+
this._workspaceFile.path,
|
|
16395
|
+
this.errors
|
|
16396
|
+
);
|
|
16397
|
+
normalizeLegacyTheme(resolvedWorkspaceSettings);
|
|
16398
|
+
this._workspaceFile = {
|
|
16399
|
+
...this._workspaceFile,
|
|
16400
|
+
settings: resolvedWorkspaceSettings
|
|
16401
|
+
};
|
|
16402
|
+
}
|
|
16391
16403
|
this.workspace = isTrusted ? this._workspaceFile : this.createEmptyWorkspace(this._workspaceFile);
|
|
16392
16404
|
this._merged = this.computeMergedSettings();
|
|
16393
16405
|
coreEvents.emitSettingsChanged();
|
|
@@ -16402,12 +16414,12 @@ var LoadedSettings = class {
|
|
|
16402
16414
|
}
|
|
16403
16415
|
computeMergedSettings(forceTrusted = false) {
|
|
16404
16416
|
const isTrusted = forceTrusted || this.isTrusted;
|
|
16405
|
-
const
|
|
16417
|
+
const workspaceSettings = forceTrusted ? Object.keys(this._workspaceFile.settings).length > 0 ? this._workspaceFile.settings : this._workspaceFile.originalSettings : this.workspace.settings;
|
|
16406
16418
|
const merged = mergeSettings(
|
|
16407
16419
|
this.system.settings,
|
|
16408
16420
|
this.systemDefaults.settings,
|
|
16409
16421
|
this.user.settings,
|
|
16410
|
-
|
|
16422
|
+
workspaceSettings,
|
|
16411
16423
|
isTrusted
|
|
16412
16424
|
);
|
|
16413
16425
|
const adminSettingSchema = getSettingsSchema().admin;
|
|
@@ -16674,6 +16686,75 @@ function loadSettings(workspaceDir = process2.cwd()) {
|
|
|
16674
16686
|
() => _doLoadSettings(normalizedWorkspaceDir)
|
|
16675
16687
|
);
|
|
16676
16688
|
}
|
|
16689
|
+
function isRecord(value) {
|
|
16690
|
+
return typeof value === "object" && value !== null && !Array.isArray(value);
|
|
16691
|
+
}
|
|
16692
|
+
function getParentRecord(root, objectPath) {
|
|
16693
|
+
let current = root;
|
|
16694
|
+
for (let i = 0; i < objectPath.length - 1; i++) {
|
|
16695
|
+
if (!isRecord(current)) {
|
|
16696
|
+
return void 0;
|
|
16697
|
+
}
|
|
16698
|
+
current = current[objectPath[i]];
|
|
16699
|
+
}
|
|
16700
|
+
return isRecord(current) ? current : void 0;
|
|
16701
|
+
}
|
|
16702
|
+
function coerceValidSettings(expandedSettings, issues) {
|
|
16703
|
+
const clone2 = structuredClone(expandedSettings);
|
|
16704
|
+
const pathsToRestore = [];
|
|
16705
|
+
for (const issue of issues) {
|
|
16706
|
+
const firstNumberIdx = issue.path.findIndex((p) => typeof p === "number");
|
|
16707
|
+
const objectPath = (firstNumberIdx === -1 ? issue.path : issue.path.slice(0, firstNumberIdx)).filter((p) => typeof p === "string");
|
|
16708
|
+
if (objectPath.length === 0) {
|
|
16709
|
+
return expandedSettings;
|
|
16710
|
+
}
|
|
16711
|
+
const lastKey = objectPath[objectPath.length - 1];
|
|
16712
|
+
const container = getParentRecord(clone2, objectPath);
|
|
16713
|
+
if (container && Object.hasOwn(container, lastKey)) {
|
|
16714
|
+
delete container[lastKey];
|
|
16715
|
+
pathsToRestore.push(objectPath);
|
|
16716
|
+
}
|
|
16717
|
+
}
|
|
16718
|
+
const partialValidation = validateSettings(clone2);
|
|
16719
|
+
if (!partialValidation.success || !partialValidation.data) {
|
|
16720
|
+
return expandedSettings;
|
|
16721
|
+
}
|
|
16722
|
+
const coerced = partialValidation.data;
|
|
16723
|
+
for (const objectPath of pathsToRestore) {
|
|
16724
|
+
const lastKey = objectPath[objectPath.length - 1];
|
|
16725
|
+
const sourceContainer = getParentRecord(expandedSettings, objectPath);
|
|
16726
|
+
const targetContainer = getParentRecord(coerced, objectPath);
|
|
16727
|
+
if (sourceContainer && targetContainer && Object.hasOwn(sourceContainer, lastKey)) {
|
|
16728
|
+
targetContainer[lastKey] = sourceContainer[lastKey];
|
|
16729
|
+
}
|
|
16730
|
+
}
|
|
16731
|
+
return coerced;
|
|
16732
|
+
}
|
|
16733
|
+
function normalizeLegacyTheme(settings) {
|
|
16734
|
+
if (settings.ui?.theme === "VS") {
|
|
16735
|
+
settings.ui.theme = DefaultLight.name;
|
|
16736
|
+
} else if (settings.ui?.theme === "VS2015") {
|
|
16737
|
+
settings.ui.theme = DefaultDark.name;
|
|
16738
|
+
}
|
|
16739
|
+
}
|
|
16740
|
+
function resolveSettings(rawSettings, filePath, settingsErrors) {
|
|
16741
|
+
if (Object.keys(rawSettings).length === 0) {
|
|
16742
|
+
return {};
|
|
16743
|
+
}
|
|
16744
|
+
const expandedSettings = resolveEnvVarsInObject(rawSettings);
|
|
16745
|
+
const validationResult = validateSettings(expandedSettings);
|
|
16746
|
+
if (!validationResult.success && validationResult.error) {
|
|
16747
|
+
if (settingsErrors) {
|
|
16748
|
+
settingsErrors.push({
|
|
16749
|
+
message: formatValidationError(validationResult.error, filePath),
|
|
16750
|
+
path: filePath,
|
|
16751
|
+
severity: "warning"
|
|
16752
|
+
});
|
|
16753
|
+
}
|
|
16754
|
+
return coerceValidSettings(expandedSettings, validationResult.error.issues);
|
|
16755
|
+
}
|
|
16756
|
+
return validationResult.data ?? expandedSettings;
|
|
16757
|
+
}
|
|
16677
16758
|
function _doLoadSettings(workspaceDir) {
|
|
16678
16759
|
let systemSettings = {};
|
|
16679
16760
|
let systemDefaultSettings = {};
|
|
@@ -16695,37 +16776,9 @@ function _doLoadSettings(workspaceDir) {
|
|
|
16695
16776
|
path: filePath,
|
|
16696
16777
|
severity: "error"
|
|
16697
16778
|
});
|
|
16698
|
-
return {
|
|
16699
|
-
}
|
|
16700
|
-
const settingsObject = rawSettings;
|
|
16701
|
-
const expandedSettings = resolveEnvVarsInObject(
|
|
16702
|
-
settingsObject
|
|
16703
|
-
);
|
|
16704
|
-
const validationResult = validateSettings(expandedSettings);
|
|
16705
|
-
if (!validationResult.success && validationResult.error) {
|
|
16706
|
-
const errorMessage = formatValidationError(
|
|
16707
|
-
validationResult.error,
|
|
16708
|
-
filePath
|
|
16709
|
-
);
|
|
16710
|
-
settingsErrors.push({
|
|
16711
|
-
message: errorMessage,
|
|
16712
|
-
path: filePath,
|
|
16713
|
-
severity: "warning"
|
|
16714
|
-
});
|
|
16715
|
-
return {
|
|
16716
|
-
settings: expandedSettings,
|
|
16717
|
-
rawSettings: settingsObject,
|
|
16718
|
-
rawJson: content
|
|
16719
|
-
};
|
|
16779
|
+
return { rawSettings: {} };
|
|
16720
16780
|
}
|
|
16721
|
-
return {
|
|
16722
|
-
// Since we've successfully validated expandedSettings against settingsZodSchema,
|
|
16723
|
-
// it's safe to cast the resulting data to the Settings type.
|
|
16724
|
-
// eslint-disable-next-line @typescript-eslint/no-unsafe-type-assertion
|
|
16725
|
-
settings: validationResult.data ?? expandedSettings,
|
|
16726
|
-
rawSettings: settingsObject,
|
|
16727
|
-
rawJson: content
|
|
16728
|
-
};
|
|
16781
|
+
return { rawSettings, rawJson: content };
|
|
16729
16782
|
}
|
|
16730
16783
|
} catch (error) {
|
|
16731
16784
|
settingsErrors.push({
|
|
@@ -16734,12 +16787,12 @@ function _doLoadSettings(workspaceDir) {
|
|
|
16734
16787
|
severity: "error"
|
|
16735
16788
|
});
|
|
16736
16789
|
}
|
|
16737
|
-
return {
|
|
16790
|
+
return { rawSettings: {} };
|
|
16738
16791
|
};
|
|
16739
16792
|
const securityCache = createPathSecurityCache();
|
|
16740
16793
|
const loadSystemFile = (filePath, fileLabel) => {
|
|
16741
16794
|
if (!fs4.existsSync(filePath)) {
|
|
16742
|
-
return {
|
|
16795
|
+
return { rawSettings: {} };
|
|
16743
16796
|
}
|
|
16744
16797
|
const check = isFileAndDirectorySecureSync(filePath, securityCache);
|
|
16745
16798
|
if (!check.secure) {
|
|
@@ -16748,7 +16801,7 @@ function _doLoadSettings(workspaceDir) {
|
|
|
16748
16801
|
path: filePath,
|
|
16749
16802
|
severity: "warning"
|
|
16750
16803
|
});
|
|
16751
|
-
return {
|
|
16804
|
+
return { rawSettings: {} };
|
|
16752
16805
|
}
|
|
16753
16806
|
return load(filePath);
|
|
16754
16807
|
};
|
|
@@ -16758,26 +16811,10 @@ function _doLoadSettings(workspaceDir) {
|
|
|
16758
16811
|
"system defaults"
|
|
16759
16812
|
);
|
|
16760
16813
|
const userResult = load(USER_SETTINGS_PATH);
|
|
16761
|
-
let workspaceResult = {
|
|
16762
|
-
settings: {},
|
|
16763
|
-
rawSettings: {},
|
|
16764
|
-
rawJson: void 0
|
|
16765
|
-
};
|
|
16814
|
+
let workspaceResult = { rawSettings: {} };
|
|
16766
16815
|
if (!storage.isWorkspaceHomeDir()) {
|
|
16767
16816
|
workspaceResult = load(workspaceSettingsPath);
|
|
16768
16817
|
}
|
|
16769
|
-
const systemOriginalSettings = structuredClone(systemResult.rawSettings);
|
|
16770
|
-
const systemDefaultsOriginalSettings = structuredClone(
|
|
16771
|
-
systemDefaultsResult.rawSettings
|
|
16772
|
-
);
|
|
16773
|
-
const userOriginalSettings = structuredClone(userResult.rawSettings);
|
|
16774
|
-
const workspaceOriginalSettings = structuredClone(
|
|
16775
|
-
workspaceResult.rawSettings
|
|
16776
|
-
);
|
|
16777
|
-
systemSettings = systemResult.settings;
|
|
16778
|
-
systemDefaultSettings = systemDefaultsResult.settings;
|
|
16779
|
-
userSettings = userResult.settings;
|
|
16780
|
-
workspaceSettings = workspaceResult.settings;
|
|
16781
16818
|
const envAuthOverride = process2.env["GEMINI_CLI_AUTH_OVERRIDE"];
|
|
16782
16819
|
if (envAuthOverride) {
|
|
16783
16820
|
delete process2.env["GEMINI_CLI_AUTH_OVERRIDE"];
|
|
@@ -16788,31 +16825,34 @@ function _doLoadSettings(workspaceDir) {
|
|
|
16788
16825
|
envAuthOverride
|
|
16789
16826
|
) : void 0;
|
|
16790
16827
|
if (authOverride) {
|
|
16791
|
-
|
|
16792
|
-
|
|
16793
|
-
|
|
16794
|
-
|
|
16795
|
-
|
|
16796
|
-
|
|
16797
|
-
|
|
16798
|
-
|
|
16799
|
-
|
|
16800
|
-
}
|
|
16801
|
-
if (!userOriginalSettings.security.auth) {
|
|
16802
|
-
userOriginalSettings.security.auth = {};
|
|
16803
|
-
}
|
|
16804
|
-
userOriginalSettings.security.auth.selectedType = authOverride;
|
|
16805
|
-
}
|
|
16806
|
-
if (userSettings.ui?.theme === "VS") {
|
|
16807
|
-
userSettings.ui.theme = DefaultLight.name;
|
|
16808
|
-
} else if (userSettings.ui?.theme === "VS2015") {
|
|
16809
|
-
userSettings.ui.theme = DefaultDark.name;
|
|
16810
|
-
}
|
|
16811
|
-
if (workspaceSettings.ui?.theme === "VS") {
|
|
16812
|
-
workspaceSettings.ui.theme = DefaultLight.name;
|
|
16813
|
-
} else if (workspaceSettings.ui?.theme === "VS2015") {
|
|
16814
|
-
workspaceSettings.ui.theme = DefaultDark.name;
|
|
16828
|
+
userResult.rawSettings = {
|
|
16829
|
+
...userResult.rawSettings,
|
|
16830
|
+
security: {
|
|
16831
|
+
...userResult.rawSettings?.security,
|
|
16832
|
+
auth: {
|
|
16833
|
+
...userResult.rawSettings?.security?.auth,
|
|
16834
|
+
selectedType: authOverride
|
|
16835
|
+
}
|
|
16836
|
+
}
|
|
16837
|
+
};
|
|
16815
16838
|
}
|
|
16839
|
+
const systemOriginalSettings = structuredClone(systemResult.rawSettings);
|
|
16840
|
+
const systemDefaultsOriginalSettings = structuredClone(
|
|
16841
|
+
systemDefaultsResult.rawSettings
|
|
16842
|
+
);
|
|
16843
|
+
const userOriginalSettings = structuredClone(userResult.rawSettings);
|
|
16844
|
+
const workspaceOriginalSettings = structuredClone(
|
|
16845
|
+
workspaceResult.rawSettings
|
|
16846
|
+
);
|
|
16847
|
+
systemSettings = resolveSettings(
|
|
16848
|
+
systemResult.rawSettings,
|
|
16849
|
+
systemSettingsPath
|
|
16850
|
+
);
|
|
16851
|
+
systemDefaultSettings = resolveSettings(
|
|
16852
|
+
systemDefaultsResult.rawSettings,
|
|
16853
|
+
systemDefaultsPath
|
|
16854
|
+
);
|
|
16855
|
+
userSettings = resolveSettings(userResult.rawSettings, USER_SETTINGS_PATH);
|
|
16816
16856
|
const initialTrustCheckSettings = customDeepMerge(
|
|
16817
16857
|
getMergeStrategyForPath,
|
|
16818
16858
|
getDefaultsFromSchema(),
|
|
@@ -16821,6 +16861,12 @@ function _doLoadSettings(workspaceDir) {
|
|
|
16821
16861
|
systemSettings
|
|
16822
16862
|
);
|
|
16823
16863
|
const isTrusted = isWorkspaceTrusted(initialTrustCheckSettings, workspaceDir)?.isTrusted ?? false;
|
|
16864
|
+
if (isTrusted) {
|
|
16865
|
+
workspaceSettings = resolveSettings(
|
|
16866
|
+
workspaceResult.rawSettings,
|
|
16867
|
+
workspaceSettingsPath
|
|
16868
|
+
);
|
|
16869
|
+
}
|
|
16824
16870
|
const tempMergedSettings = mergeSettings(
|
|
16825
16871
|
systemSettings,
|
|
16826
16872
|
systemDefaultSettings,
|
|
@@ -16829,6 +16875,28 @@ function _doLoadSettings(workspaceDir) {
|
|
|
16829
16875
|
isTrusted
|
|
16830
16876
|
);
|
|
16831
16877
|
loadEnvironment(tempMergedSettings, workspaceDir);
|
|
16878
|
+
systemSettings = resolveSettings(
|
|
16879
|
+
systemResult.rawSettings,
|
|
16880
|
+
systemSettingsPath,
|
|
16881
|
+
settingsErrors
|
|
16882
|
+
);
|
|
16883
|
+
systemDefaultSettings = resolveSettings(
|
|
16884
|
+
systemDefaultsResult.rawSettings,
|
|
16885
|
+
systemDefaultsPath,
|
|
16886
|
+
settingsErrors
|
|
16887
|
+
);
|
|
16888
|
+
userSettings = resolveSettings(
|
|
16889
|
+
userResult.rawSettings,
|
|
16890
|
+
USER_SETTINGS_PATH,
|
|
16891
|
+
settingsErrors
|
|
16892
|
+
);
|
|
16893
|
+
workspaceSettings = isTrusted ? resolveSettings(
|
|
16894
|
+
workspaceResult.rawSettings,
|
|
16895
|
+
workspaceSettingsPath,
|
|
16896
|
+
settingsErrors
|
|
16897
|
+
) : {};
|
|
16898
|
+
normalizeLegacyTheme(userSettings);
|
|
16899
|
+
normalizeLegacyTheme(workspaceSettings);
|
|
16832
16900
|
const fatalErrors = settingsErrors.filter((e) => e.severity === "error");
|
|
16833
16901
|
if (fatalErrors.length > 0) {
|
|
16834
16902
|
const errorMessages = fatalErrors.map(
|
|
@@ -2,7 +2,7 @@ const require = (await import('node:module')).createRequire(import.meta.url); co
|
|
|
2
2
|
import {
|
|
3
3
|
exitCli,
|
|
4
4
|
require_source
|
|
5
|
-
} from "./chunk-
|
|
5
|
+
} from "./chunk-R4KPURFC.js";
|
|
6
6
|
import {
|
|
7
7
|
DEFAULT_PORT,
|
|
8
8
|
SERVER_START_WAIT_MS,
|
|
@@ -14,10 +14,10 @@ import {
|
|
|
14
14
|
isServerRunning,
|
|
15
15
|
resolveGemmaConfig,
|
|
16
16
|
writeServerProcessInfo
|
|
17
|
-
} from "./chunk-
|
|
17
|
+
} from "./chunk-H4U2CWBQ.js";
|
|
18
18
|
import {
|
|
19
19
|
debugLogger
|
|
20
|
-
} from "./chunk-
|
|
20
|
+
} from "./chunk-YPLMNSM4.js";
|
|
21
21
|
import {
|
|
22
22
|
__toESM
|
|
23
23
|
} from "./chunk-34MYV7JD.js";
|
|
@@ -2,7 +2,7 @@ const require = (await import('node:module')).createRequire(import.meta.url); co
|
|
|
2
2
|
import {
|
|
3
3
|
exitCli,
|
|
4
4
|
require_source
|
|
5
|
-
} from "./chunk-
|
|
5
|
+
} from "./chunk-VXYA6LA4.js";
|
|
6
6
|
import {
|
|
7
7
|
DEFAULT_PORT,
|
|
8
8
|
SERVER_START_WAIT_MS,
|
|
@@ -14,10 +14,10 @@ import {
|
|
|
14
14
|
isServerRunning,
|
|
15
15
|
resolveGemmaConfig,
|
|
16
16
|
writeServerProcessInfo
|
|
17
|
-
} from "./chunk-
|
|
17
|
+
} from "./chunk-XY2QSBID.js";
|
|
18
18
|
import {
|
|
19
19
|
debugLogger
|
|
20
|
-
} from "./chunk-
|
|
20
|
+
} from "./chunk-ZFQ347ZN.js";
|
|
21
21
|
import {
|
|
22
22
|
__toESM
|
|
23
23
|
} from "./chunk-34MYV7JD.js";
|