@google/gemini-cli 0.63.0-nightly.20260928.g2fe7c2d3f → 0.63.0-preview.0
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/bundle/{chunk-QX7M3XMQ.js → chunk-2J6RC447.js} +3 -3
- package/bundle/{chunk-DEI3TS7C.js → chunk-2NCBQURB.js} +125 -47
- package/bundle/{chunk-C2KZGMGL.js → chunk-2P4ETAEG.js} +1 -1
- package/bundle/{chunk-QYTRARRL.js → chunk-5VYF5TVF.js} +30 -3
- package/bundle/{chunk-EATZTV2L.js → chunk-B2C7BQ4Z.js} +7 -7
- package/bundle/{chunk-2AXHER6I.js → chunk-BVDTRESW.js} +1 -1
- package/bundle/{chunk-I5ZBUXWS.js → chunk-CTL6DZSY.js} +1 -1
- package/bundle/{chunk-7ZCWMSGJ.js → chunk-EIMVJG2V.js} +1 -1
- package/bundle/{chunk-4SQTLFVK.js → chunk-EWEUWTBB.js} +58 -71
- package/bundle/{chunk-LNPKSDNP.js → chunk-GRSO6OI3.js} +7 -7
- package/bundle/{chunk-SJFSOFYJ.js → chunk-H4WLRV6U.js} +30 -3
- package/bundle/{chunk-ERMD62K5.js → chunk-HBZBBLAV.js} +14860 -7829
- package/bundle/{chunk-YZPLV23A.js → chunk-JEUVKR2X.js} +3 -3
- package/bundle/{chunk-KRI5JA76.js → chunk-KCB54UJ5.js} +73 -17
- package/bundle/{chunk-ZAM747AR.js → chunk-KPPDDNGJ.js} +1 -1
- package/bundle/{chunk-SZK5XAFL.js → chunk-NTWFJ2RF.js} +30 -3
- package/bundle/{chunk-B3EF23HT.js → chunk-NWSCUKK3.js} +70 -19
- package/bundle/{chunk-I7XQQVIO.js → chunk-R6Q6D3UA.js} +1 -1
- package/bundle/{chunk-RFR5KZGU.js → chunk-RC6VJ6FT.js} +126 -47
- package/bundle/{chunk-PGIM2K4Q.js → chunk-RXHIISMM.js} +1 -1
- package/bundle/{chunk-UOXIYBXB.js → chunk-SNGNFODQ.js} +1 -1
- package/bundle/{chunk-KSWUQTWU.js → chunk-UEOEM4H5.js} +3 -3
- package/bundle/{chunk-4PBNRKYJ.js → chunk-Z5RCAIV5.js} +129 -53
- package/bundle/{chunk-BRTA6WWG.js → chunk-ZDQYLJYN.js} +8 -9
- package/bundle/{cleanup-5PD3O5L7.js → cleanup-EX2L3L3E.js} +2 -2
- package/bundle/{cleanup-6IDD7Q3X.js → cleanup-IT7XR7KS.js} +2 -2
- package/bundle/{cleanup-7UL3PRLF.js → cleanup-WWLYKZIX.js} +2 -2
- package/bundle/{core-IIFMZU4H.js → core-D5D4MF5H.js} +3 -1
- package/bundle/{dist-5HHK4577.js → core-GAJB2LOX.js} +3 -1
- package/bundle/{devtoolsService-AK7UU2FI.js → devtoolsService-4YTFHHPN.js} +2 -2
- package/bundle/{devtoolsService-A7VWEFDQ.js → devtoolsService-S4ZTRGJL.js} +3 -4
- package/bundle/{devtoolsService-67KG4JD7.js → devtoolsService-TJPENQSW.js} +2 -2
- package/bundle/{dist-I74UZ4GA.js → dist-MTMOCTIW.js} +3 -1
- package/bundle/{gemini-OFIYPHV5.js → gemini-5T5BS7L7.js} +14 -14
- package/bundle/{gemini-PGIEQLQD.js → gemini-FHORRYHM.js} +13 -13
- package/bundle/{gemini-PLPMSDXJ.js → gemini-UQRS6TBE.js} +198 -214
- package/bundle/gemini.js +20 -11
- package/bundle/{interactiveCli-JLFFVRVY.js → interactiveCli-5YNYZTMK.js} +18 -10
- package/bundle/{interactiveCli-JF6LE6RN.js → interactiveCli-I5K7O5Z6.js} +18 -10
- package/bundle/{interactiveCli-OG4JE4CU.js → interactiveCli-WOM6QZHM.js} +302 -313
- package/bundle/{liteRtServerManager-4LVWWKUV.js → liteRtServerManager-3N5KI6YS.js} +4 -4
- package/bundle/{liteRtServerManager-DVDNFJNH.js → liteRtServerManager-EH2L2UVH.js} +4 -4
- package/bundle/{liteRtServerManager-G4WG2Q45.js → liteRtServerManager-ZLIHBLZP.js} +4 -4
- package/bundle/{oauth2-provider-KPLVYPVA.js → oauth2-provider-5GFYTXFU.js} +1 -1
- package/bundle/{oauth2-provider-IBKEWCFT.js → oauth2-provider-NGSH2JQK.js} +72 -38
- package/bundle/{oauth2-provider-CEQ4PAUC.js → oauth2-provider-TA2KRXWQ.js} +1 -1
- package/bundle/{start-2A3VVOAH.js → start-CWI6OP6N.js} +6 -6
- package/bundle/{start-6PINHVUA.js → start-M3IUNCYH.js} +6 -6
- package/bundle/{start-BZAGKSC2.js → start-MWDNIQUY.js} +6 -6
- package/package.json +1 -1
- package/bundle/chunk-5G7FE6LZ.js +0 -102951
- package/bundle/chunk-EORMOPQX.js +0 -17368
- package/bundle/chunk-EYGY6SJV.js +0 -512
- package/bundle/chunk-KCZCDPS2.js +0 -398
- package/bundle/chunk-PAIQESPE.js +0 -118
- package/bundle/chunk-TXWIPUPY.js +0 -400484
- package/bundle/chunk-VAGYZO4R.js +0 -1571
- package/bundle/chunk-VNGBTT2C.js +0 -154
- package/bundle/cleanup-UTIIPF3A.js +0 -32
- package/bundle/devtoolsService-REQSIEPU.js +0 -4359
- package/bundle/dist-QMOHSH2B.js +0 -2248
- package/bundle/gemini-I47O5YI2.js +0 -17863
- package/bundle/interactiveCli-CJEDKYUL.js +0 -34907
- package/bundle/liteRtServerManager-MZO6JMNV.js +0 -65
- package/bundle/oauth2-provider-UHJTSOLD.js +0 -235
- package/bundle/start-ZRUVAD7P.js +0 -18
|
@@ -2,8 +2,6 @@ const require = (await import('node:module')).createRequire(import.meta.url); co
|
|
|
2
2
|
import {
|
|
3
3
|
AuthProviderType,
|
|
4
4
|
AuthType,
|
|
5
|
-
CoreEvent,
|
|
6
|
-
CoreToolCallStatus,
|
|
7
5
|
DEFAULT_MODEL_CONFIGS,
|
|
8
6
|
DEFAULT_TRUNCATE_TOOL_OUTPUT_THRESHOLD,
|
|
9
7
|
EDITOR_OPTIONS,
|
|
@@ -33,7 +31,7 @@ import {
|
|
|
33
31
|
partListUnionToString,
|
|
34
32
|
require_strip_json_comments,
|
|
35
33
|
sanitizeFilenamePart
|
|
36
|
-
} from "./chunk-
|
|
34
|
+
} from "./chunk-HBZBBLAV.js";
|
|
37
35
|
import {
|
|
38
36
|
__commonJS,
|
|
39
37
|
__require,
|
|
@@ -112,7 +110,7 @@ var require_package = __commonJS({
|
|
|
112
110
|
var require_main = __commonJS({
|
|
113
111
|
"node_modules/dotenv/lib/main.js"(exports, module) {
|
|
114
112
|
var fs6 = __require("fs");
|
|
115
|
-
var
|
|
113
|
+
var path7 = __require("path");
|
|
116
114
|
var os = __require("os");
|
|
117
115
|
var crypto = __require("crypto");
|
|
118
116
|
var packageJson = require_package();
|
|
@@ -249,7 +247,7 @@ var require_main = __commonJS({
|
|
|
249
247
|
possibleVaultPath = options.path.endsWith(".vault") ? options.path : `${options.path}.vault`;
|
|
250
248
|
}
|
|
251
249
|
} else {
|
|
252
|
-
possibleVaultPath =
|
|
250
|
+
possibleVaultPath = path7.resolve(process.cwd(), ".env.vault");
|
|
253
251
|
}
|
|
254
252
|
if (fs6.existsSync(possibleVaultPath)) {
|
|
255
253
|
return possibleVaultPath;
|
|
@@ -257,7 +255,7 @@ var require_main = __commonJS({
|
|
|
257
255
|
return null;
|
|
258
256
|
}
|
|
259
257
|
function _resolveHome(envPath) {
|
|
260
|
-
return envPath[0] === "~" ?
|
|
258
|
+
return envPath[0] === "~" ? path7.join(os.homedir(), envPath.slice(1)) : envPath;
|
|
261
259
|
}
|
|
262
260
|
function _configVault(options) {
|
|
263
261
|
const debug = Boolean(options && options.debug);
|
|
@@ -274,7 +272,7 @@ var require_main = __commonJS({
|
|
|
274
272
|
return { parsed };
|
|
275
273
|
}
|
|
276
274
|
function configDotenv(options) {
|
|
277
|
-
const dotenvPath =
|
|
275
|
+
const dotenvPath = path7.resolve(process.cwd(), ".env");
|
|
278
276
|
let encoding = "utf8";
|
|
279
277
|
const debug = Boolean(options && options.debug);
|
|
280
278
|
const quiet = Boolean(options && options.quiet);
|
|
@@ -298,13 +296,13 @@ var require_main = __commonJS({
|
|
|
298
296
|
}
|
|
299
297
|
let lastError;
|
|
300
298
|
const parsedAll = {};
|
|
301
|
-
for (const
|
|
299
|
+
for (const path8 of optionPaths) {
|
|
302
300
|
try {
|
|
303
|
-
const parsed = DotenvModule.parse(fs6.readFileSync(
|
|
301
|
+
const parsed = DotenvModule.parse(fs6.readFileSync(path8, { encoding }));
|
|
304
302
|
DotenvModule.populate(parsedAll, parsed, options);
|
|
305
303
|
} catch (e) {
|
|
306
304
|
if (debug) {
|
|
307
|
-
_debug(`Failed to load ${
|
|
305
|
+
_debug(`Failed to load ${path8} ${e.message}`);
|
|
308
306
|
}
|
|
309
307
|
lastError = e;
|
|
310
308
|
}
|
|
@@ -319,7 +317,7 @@ var require_main = __commonJS({
|
|
|
319
317
|
const shortPaths = [];
|
|
320
318
|
for (const filePath of optionPaths) {
|
|
321
319
|
try {
|
|
322
|
-
const relative =
|
|
320
|
+
const relative = path7.relative(process.cwd(), filePath);
|
|
323
321
|
shortPaths.push(relative);
|
|
324
322
|
} catch (e) {
|
|
325
323
|
if (debug) {
|
|
@@ -9456,10 +9454,10 @@ var require_stringify = __commonJS({
|
|
|
9456
9454
|
replacer = null;
|
|
9457
9455
|
indent = EMPTY;
|
|
9458
9456
|
};
|
|
9459
|
-
var
|
|
9457
|
+
var join4 = (one, two, gap) => one ? two ? one + two.trim() + LF + gap : one.trimRight() + LF + gap : two ? two.trimRight() + LF + gap : EMPTY;
|
|
9460
9458
|
var join_content = (inside, value, gap) => {
|
|
9461
9459
|
const comment = process_comments(value, PREFIX_BEFORE, gap + indent, true);
|
|
9462
|
-
return
|
|
9460
|
+
return join4(comment, inside, gap);
|
|
9463
9461
|
};
|
|
9464
9462
|
var array_stringify = (value, gap) => {
|
|
9465
9463
|
const deeper_gap = gap + indent;
|
|
@@ -9470,7 +9468,7 @@ var require_stringify = __commonJS({
|
|
|
9470
9468
|
if (i !== 0) {
|
|
9471
9469
|
inside += COMMA;
|
|
9472
9470
|
}
|
|
9473
|
-
const before =
|
|
9471
|
+
const before = join4(
|
|
9474
9472
|
after_comma,
|
|
9475
9473
|
process_comments(value, BEFORE(i), deeper_gap),
|
|
9476
9474
|
deeper_gap
|
|
@@ -9480,7 +9478,7 @@ var require_stringify = __commonJS({
|
|
|
9480
9478
|
inside += process_comments(value, AFTER_VALUE(i), deeper_gap);
|
|
9481
9479
|
after_comma = process_comments(value, AFTER(i), deeper_gap);
|
|
9482
9480
|
}
|
|
9483
|
-
inside +=
|
|
9481
|
+
inside += join4(
|
|
9484
9482
|
after_comma,
|
|
9485
9483
|
process_comments(value, PREFIX_AFTER, deeper_gap),
|
|
9486
9484
|
deeper_gap
|
|
@@ -9505,7 +9503,7 @@ var require_stringify = __commonJS({
|
|
|
9505
9503
|
inside += COMMA;
|
|
9506
9504
|
}
|
|
9507
9505
|
first = false;
|
|
9508
|
-
const before =
|
|
9506
|
+
const before = join4(
|
|
9509
9507
|
after_comma,
|
|
9510
9508
|
process_comments(value, BEFORE(key), deeper_gap),
|
|
9511
9509
|
deeper_gap
|
|
@@ -9515,7 +9513,7 @@ var require_stringify = __commonJS({
|
|
|
9515
9513
|
after_comma = process_comments(value, AFTER(key), deeper_gap);
|
|
9516
9514
|
};
|
|
9517
9515
|
keys.forEach(iteratee);
|
|
9518
|
-
inside +=
|
|
9516
|
+
inside += join4(
|
|
9519
9517
|
after_comma,
|
|
9520
9518
|
process_comments(value, PREFIX_AFTER, deeper_gap),
|
|
9521
9519
|
deeper_gap
|
|
@@ -10230,7 +10228,7 @@ function convertSessionToHistoryFormats(messages) {
|
|
|
10230
10228
|
args: tool.args,
|
|
10231
10229
|
description: tool.description || "",
|
|
10232
10230
|
renderOutputAsMarkdown: tool.renderOutputAsMarkdown ?? true,
|
|
10233
|
-
status: tool.status === "success" ?
|
|
10231
|
+
status: tool.status === "success" ? "success" /* Success */ : "error" /* Error */,
|
|
10234
10232
|
resultDisplay: tool.resultDisplay,
|
|
10235
10233
|
confirmationDetails: void 0
|
|
10236
10234
|
}))
|
|
@@ -10652,7 +10650,7 @@ async function cleanupToolOutputFiles(settings, debugMode = false, projectTempDi
|
|
|
10652
10650
|
// packages/cli/src/config/settings.ts
|
|
10653
10651
|
var dotenv = __toESM(require_main(), 1);
|
|
10654
10652
|
import * as fs4 from "node:fs";
|
|
10655
|
-
import * as
|
|
10653
|
+
import * as path4 from "node:path";
|
|
10656
10654
|
import { platform } from "node:os";
|
|
10657
10655
|
import process2 from "node:process";
|
|
10658
10656
|
var import_strip_json_comments = __toESM(require_strip_json_comments(), 1);
|
|
@@ -15719,7 +15717,7 @@ function resolveEnvVarsInObjectInternal(obj, visited, customEnv) {
|
|
|
15719
15717
|
function isPlainObject(item) {
|
|
15720
15718
|
return !!item && typeof item === "object" && !Array.isArray(item);
|
|
15721
15719
|
}
|
|
15722
|
-
function mergeRecursively(target, source, getMergeStrategyForPath2,
|
|
15720
|
+
function mergeRecursively(target, source, getMergeStrategyForPath2, path7 = []) {
|
|
15723
15721
|
for (const key of Object.keys(source)) {
|
|
15724
15722
|
if (key === "__proto__" || key === "constructor" || key === "prototype") {
|
|
15725
15723
|
continue;
|
|
@@ -15728,7 +15726,7 @@ function mergeRecursively(target, source, getMergeStrategyForPath2, path6 = [])
|
|
|
15728
15726
|
if (srcValue === void 0) {
|
|
15729
15727
|
continue;
|
|
15730
15728
|
}
|
|
15731
|
-
const newPath = [...
|
|
15729
|
+
const newPath = [...path7, key];
|
|
15732
15730
|
const objValue = target[key];
|
|
15733
15731
|
const mergeStrategy = getMergeStrategyForPath2(newPath);
|
|
15734
15732
|
if (mergeStrategy === "shallow_merge" /* SHALLOW_MERGE */ && objValue && srcValue) {
|
|
@@ -15778,16 +15776,60 @@ function customDeepMerge(getMergeStrategyForPath2, ...sources) {
|
|
|
15778
15776
|
// packages/cli/src/utils/commentJson.ts
|
|
15779
15777
|
var import_comment_json = __toESM(require_src2(), 1);
|
|
15780
15778
|
import * as fs3 from "node:fs";
|
|
15779
|
+
import * as path3 from "node:path";
|
|
15780
|
+
function isDangerousKey(key) {
|
|
15781
|
+
return key === "__proto__" || key === "constructor" || key === "prototype";
|
|
15782
|
+
}
|
|
15783
|
+
var tempCounter = 0;
|
|
15784
|
+
function writeAtomicSync(filePath, content) {
|
|
15785
|
+
const dir = path3.dirname(filePath);
|
|
15786
|
+
if (!fs3.existsSync(dir)) {
|
|
15787
|
+
fs3.mkdirSync(dir, { recursive: true });
|
|
15788
|
+
}
|
|
15789
|
+
const tempPath = path3.join(
|
|
15790
|
+
dir,
|
|
15791
|
+
`.${path3.basename(filePath)}.${process.pid}.${Date.now()}.${tempCounter++}.tmp`
|
|
15792
|
+
);
|
|
15793
|
+
try {
|
|
15794
|
+
fs3.writeFileSync(tempPath, content, "utf-8");
|
|
15795
|
+
fs3.renameSync(tempPath, filePath);
|
|
15796
|
+
} catch {
|
|
15797
|
+
try {
|
|
15798
|
+
if (fs3.existsSync(tempPath)) {
|
|
15799
|
+
fs3.unlinkSync(tempPath);
|
|
15800
|
+
}
|
|
15801
|
+
} catch {
|
|
15802
|
+
}
|
|
15803
|
+
fs3.writeFileSync(filePath, content, "utf-8");
|
|
15804
|
+
}
|
|
15805
|
+
}
|
|
15781
15806
|
function updateSettingsFilePreservingFormat(filePath, updates) {
|
|
15807
|
+
const dirPath = path3.dirname(filePath);
|
|
15808
|
+
if (!fs3.existsSync(dirPath)) {
|
|
15809
|
+
fs3.mkdirSync(dirPath, { recursive: true });
|
|
15810
|
+
}
|
|
15782
15811
|
if (!fs3.existsSync(filePath)) {
|
|
15783
|
-
|
|
15812
|
+
writeAtomicSync(filePath, JSON.stringify(updates, null, 2));
|
|
15784
15813
|
return;
|
|
15785
15814
|
}
|
|
15786
|
-
const originalContent = fs3.readFileSync(filePath, "utf-8");
|
|
15787
15815
|
let parsed;
|
|
15788
15816
|
try {
|
|
15789
|
-
|
|
15817
|
+
const originalContent = fs3.readFileSync(filePath, "utf-8");
|
|
15818
|
+
if (!originalContent.trim()) {
|
|
15819
|
+
parsed = {};
|
|
15820
|
+
} else {
|
|
15821
|
+
const rawParsed = (0, import_comment_json.parse)(originalContent);
|
|
15822
|
+
if (typeof rawParsed !== "object" || rawParsed === null || Array.isArray(rawParsed)) {
|
|
15823
|
+
parsed = {};
|
|
15824
|
+
} else {
|
|
15825
|
+
parsed = rawParsed;
|
|
15826
|
+
}
|
|
15827
|
+
}
|
|
15790
15828
|
} catch (error) {
|
|
15829
|
+
if (error && typeof error === "object" && "code" in error && error.code === "ENOENT") {
|
|
15830
|
+
writeAtomicSync(filePath, JSON.stringify(updates, null, 2));
|
|
15831
|
+
return;
|
|
15832
|
+
}
|
|
15791
15833
|
coreEvents.emitFeedback(
|
|
15792
15834
|
"error",
|
|
15793
15835
|
"Error parsing settings file. Please check the JSON syntax.",
|
|
@@ -15797,9 +15839,12 @@ function updateSettingsFilePreservingFormat(filePath, updates) {
|
|
|
15797
15839
|
}
|
|
15798
15840
|
const updatedStructure = applyUpdates(parsed, updates);
|
|
15799
15841
|
const updatedContent = (0, import_comment_json.stringify)(updatedStructure, null, 2);
|
|
15800
|
-
|
|
15842
|
+
writeAtomicSync(filePath, updatedContent);
|
|
15801
15843
|
}
|
|
15802
15844
|
function preserveCommentsOnPropertyDeletion(container, propName) {
|
|
15845
|
+
if (isDangerousKey(propName)) {
|
|
15846
|
+
return;
|
|
15847
|
+
}
|
|
15803
15848
|
const target = container;
|
|
15804
15849
|
const beforeSym = Symbol.for(`before:${propName}`);
|
|
15805
15850
|
const afterSym = Symbol.for(`after:${propName}`);
|
|
@@ -15838,12 +15883,18 @@ function preserveCommentsOnPropertyDeletion(container, propName) {
|
|
|
15838
15883
|
}
|
|
15839
15884
|
function applyKeyDiff(base, desired) {
|
|
15840
15885
|
for (const existingKey of Object.getOwnPropertyNames(base)) {
|
|
15886
|
+
if (isDangerousKey(existingKey)) {
|
|
15887
|
+
continue;
|
|
15888
|
+
}
|
|
15841
15889
|
if (!Object.prototype.hasOwnProperty.call(desired, existingKey)) {
|
|
15842
15890
|
preserveCommentsOnPropertyDeletion(base, existingKey);
|
|
15843
15891
|
delete base[existingKey];
|
|
15844
15892
|
}
|
|
15845
15893
|
}
|
|
15846
15894
|
for (const nextKey of Object.getOwnPropertyNames(desired)) {
|
|
15895
|
+
if (isDangerousKey(nextKey)) {
|
|
15896
|
+
continue;
|
|
15897
|
+
}
|
|
15847
15898
|
const nextVal = desired[nextKey];
|
|
15848
15899
|
const baseVal = base[nextKey];
|
|
15849
15900
|
const isObj = typeof nextVal === "object" && nextVal !== null && !Array.isArray(nextVal);
|
|
@@ -16079,11 +16130,11 @@ function formatValidationError(error, filePath) {
|
|
|
16079
16130
|
const MAX_ERRORS_TO_DISPLAY = 5;
|
|
16080
16131
|
const displayedIssues = error.issues.slice(0, MAX_ERRORS_TO_DISPLAY);
|
|
16081
16132
|
for (const issue of displayedIssues) {
|
|
16082
|
-
const
|
|
16133
|
+
const path7 = issue.path.reduce(
|
|
16083
16134
|
(acc, curr) => typeof curr === "number" ? `${acc}[${curr}]` : `${acc ? acc + "." : ""}${curr}`,
|
|
16084
16135
|
""
|
|
16085
16136
|
);
|
|
16086
|
-
lines.push(`Error in: ${
|
|
16137
|
+
lines.push(`Error in: ${path7 || "(root)"}`);
|
|
16087
16138
|
lines.push(` ${issue.message}`);
|
|
16088
16139
|
if (issue.code === "invalid_type") {
|
|
16089
16140
|
const expected = issue.expected;
|
|
@@ -16104,11 +16155,11 @@ function formatValidationError(error, filePath) {
|
|
|
16104
16155
|
}
|
|
16105
16156
|
|
|
16106
16157
|
// packages/cli/src/config/settings.ts
|
|
16107
|
-
function getMergeStrategyForPath(
|
|
16158
|
+
function getMergeStrategyForPath(path7) {
|
|
16108
16159
|
let current = void 0;
|
|
16109
16160
|
let currentSchema = getSettingsSchema();
|
|
16110
16161
|
let parent = void 0;
|
|
16111
|
-
for (const key of
|
|
16162
|
+
for (const key of path7) {
|
|
16112
16163
|
if (!currentSchema || !currentSchema[key]) {
|
|
16113
16164
|
if (parent?.additionalProperties?.mergeStrategy) {
|
|
16114
16165
|
return parent.additionalProperties.mergeStrategy;
|
|
@@ -16122,7 +16173,7 @@ function getMergeStrategyForPath(path6) {
|
|
|
16122
16173
|
return current?.mergeStrategy;
|
|
16123
16174
|
}
|
|
16124
16175
|
var USER_SETTINGS_PATH = Storage.getGlobalSettingsPath();
|
|
16125
|
-
var USER_SETTINGS_DIR =
|
|
16176
|
+
var USER_SETTINGS_DIR = path4.dirname(USER_SETTINGS_PATH);
|
|
16126
16177
|
var DEFAULT_EXCLUDED_ENV_VARS = [
|
|
16127
16178
|
"DEBUG",
|
|
16128
16179
|
"DEBUG_MODE",
|
|
@@ -16154,8 +16205,8 @@ function getSystemDefaultsPath() {
|
|
|
16154
16205
|
if (process2.env["GEMINI_CLI_SYSTEM_DEFAULTS_PATH"]) {
|
|
16155
16206
|
return process2.env["GEMINI_CLI_SYSTEM_DEFAULTS_PATH"];
|
|
16156
16207
|
}
|
|
16157
|
-
return
|
|
16158
|
-
|
|
16208
|
+
return path4.join(
|
|
16209
|
+
path4.dirname(getSystemSettingsPath()),
|
|
16159
16210
|
"system-defaults.json"
|
|
16160
16211
|
);
|
|
16161
16212
|
}
|
|
@@ -16176,8 +16227,8 @@ var _loadableSettingScopes = [
|
|
|
16176
16227
|
function isLoadableSettingScope(scope) {
|
|
16177
16228
|
return _loadableSettingScopes.includes(scope);
|
|
16178
16229
|
}
|
|
16179
|
-
function setNestedProperty(obj,
|
|
16180
|
-
const keys =
|
|
16230
|
+
function setNestedProperty(obj, path7, value) {
|
|
16231
|
+
const keys = path7.split(".");
|
|
16181
16232
|
const lastKey = keys.pop();
|
|
16182
16233
|
if (!lastKey) return;
|
|
16183
16234
|
let current = obj;
|
|
@@ -16282,7 +16333,7 @@ var LoadedSettings = class {
|
|
|
16282
16333
|
const adminSchema = adminSettingSchema.properties;
|
|
16283
16334
|
const adminDefaults = getDefaultsFromSchema(adminSchema);
|
|
16284
16335
|
merged.admin = customDeepMerge(
|
|
16285
|
-
(
|
|
16336
|
+
(path7) => getMergeStrategyForPath(["admin", ...path7]),
|
|
16286
16337
|
adminDefaults,
|
|
16287
16338
|
this._remoteAdminSettings?.admin ?? {}
|
|
16288
16339
|
);
|
|
@@ -16309,8 +16360,8 @@ var LoadedSettings = class {
|
|
|
16309
16360
|
// React will pass a listener fn into this subscribe fn
|
|
16310
16361
|
// that listener fn will perform an object identity check on the snapshot and trigger a React re render if the snapshot has changed
|
|
16311
16362
|
subscribe(listener) {
|
|
16312
|
-
coreEvents.on(
|
|
16313
|
-
return () => coreEvents.off(
|
|
16363
|
+
coreEvents.on("settings-changed" /* SettingsChanged */, listener);
|
|
16364
|
+
return () => coreEvents.off("settings-changed" /* SettingsChanged */, listener);
|
|
16314
16365
|
}
|
|
16315
16366
|
getSnapshot() {
|
|
16316
16367
|
return this._snapshot;
|
|
@@ -16414,29 +16465,29 @@ var LoadedSettings = class {
|
|
|
16414
16465
|
}
|
|
16415
16466
|
};
|
|
16416
16467
|
function findEnvFile(startDir, isTrusted, ignoreLocalEnv) {
|
|
16417
|
-
let currentDir =
|
|
16468
|
+
let currentDir = path4.resolve(startDir);
|
|
16418
16469
|
while (true) {
|
|
16419
16470
|
if (isTrusted) {
|
|
16420
|
-
const geminiEnvPath =
|
|
16471
|
+
const geminiEnvPath = path4.join(currentDir, GEMINI_DIR, ".env");
|
|
16421
16472
|
if (fs4.existsSync(geminiEnvPath)) {
|
|
16422
16473
|
return geminiEnvPath;
|
|
16423
16474
|
}
|
|
16424
16475
|
}
|
|
16425
|
-
const envPath =
|
|
16476
|
+
const envPath = path4.join(currentDir, ".env");
|
|
16426
16477
|
if (fs4.existsSync(envPath)) {
|
|
16427
16478
|
if (!ignoreLocalEnv || currentDir === homedir()) {
|
|
16428
16479
|
return envPath;
|
|
16429
16480
|
}
|
|
16430
16481
|
}
|
|
16431
|
-
const parentDir =
|
|
16482
|
+
const parentDir = path4.dirname(currentDir);
|
|
16432
16483
|
if (parentDir === currentDir || !parentDir) {
|
|
16433
16484
|
if (isTrusted) {
|
|
16434
|
-
const homeGeminiEnvPath =
|
|
16485
|
+
const homeGeminiEnvPath = path4.join(homedir(), GEMINI_DIR, ".env");
|
|
16435
16486
|
if (fs4.existsSync(homeGeminiEnvPath)) {
|
|
16436
16487
|
return homeGeminiEnvPath;
|
|
16437
16488
|
}
|
|
16438
16489
|
}
|
|
16439
|
-
const homeEnvPath =
|
|
16490
|
+
const homeEnvPath = path4.join(homedir(), ".env");
|
|
16440
16491
|
if (fs4.existsSync(homeEnvPath)) {
|
|
16441
16492
|
return homeEnvPath;
|
|
16442
16493
|
}
|
|
@@ -16454,7 +16505,7 @@ function setUpCloudShellEnvironment(envFilePath, isTrusted, isSandboxed, selecte
|
|
|
16454
16505
|
}
|
|
16455
16506
|
}
|
|
16456
16507
|
let value = "cloudshell-gca";
|
|
16457
|
-
if (selectedAuthType ===
|
|
16508
|
+
if (selectedAuthType === "vertex-ai" /* USE_VERTEX_AI */) {
|
|
16458
16509
|
value = process2.env[USER_GCP_PROJECT];
|
|
16459
16510
|
}
|
|
16460
16511
|
if (envFilePath && fs4.existsSync(envFilePath)) {
|
|
@@ -16527,7 +16578,7 @@ function isWorktreeEnabled(settings) {
|
|
|
16527
16578
|
return settings.merged.experimental.worktrees;
|
|
16528
16579
|
}
|
|
16529
16580
|
function loadSettings(workspaceDir = process2.cwd()) {
|
|
16530
|
-
const normalizedWorkspaceDir =
|
|
16581
|
+
const normalizedWorkspaceDir = path4.resolve(workspaceDir);
|
|
16531
16582
|
return settingsCache.getOrCreate(
|
|
16532
16583
|
normalizedWorkspaceDir,
|
|
16533
16584
|
() => _doLoadSettings(normalizedWorkspaceDir)
|
|
@@ -16637,6 +16688,31 @@ function _doLoadSettings(workspaceDir) {
|
|
|
16637
16688
|
systemDefaultSettings = systemDefaultsResult.settings;
|
|
16638
16689
|
userSettings = userResult.settings;
|
|
16639
16690
|
workspaceSettings = workspaceResult.settings;
|
|
16691
|
+
const envAuthOverride = process2.env["GEMINI_CLI_AUTH_OVERRIDE"];
|
|
16692
|
+
if (envAuthOverride) {
|
|
16693
|
+
delete process2.env["GEMINI_CLI_AUTH_OVERRIDE"];
|
|
16694
|
+
}
|
|
16695
|
+
const authOverride = envAuthOverride && // eslint-disable-next-line @typescript-eslint/no-unsafe-type-assertion
|
|
16696
|
+
Object.values(AuthType).includes(envAuthOverride) ? (
|
|
16697
|
+
// eslint-disable-next-line @typescript-eslint/no-unsafe-type-assertion
|
|
16698
|
+
envAuthOverride
|
|
16699
|
+
) : void 0;
|
|
16700
|
+
if (authOverride) {
|
|
16701
|
+
if (!userSettings.security) {
|
|
16702
|
+
userSettings.security = {};
|
|
16703
|
+
}
|
|
16704
|
+
if (!userSettings.security.auth) {
|
|
16705
|
+
userSettings.security.auth = {};
|
|
16706
|
+
}
|
|
16707
|
+
userSettings.security.auth.selectedType = authOverride;
|
|
16708
|
+
if (!userOriginalSettings.security) {
|
|
16709
|
+
userOriginalSettings.security = {};
|
|
16710
|
+
}
|
|
16711
|
+
if (!userOriginalSettings.security.auth) {
|
|
16712
|
+
userOriginalSettings.security.auth = {};
|
|
16713
|
+
}
|
|
16714
|
+
userOriginalSettings.security.auth.selectedType = authOverride;
|
|
16715
|
+
}
|
|
16640
16716
|
if (userSettings.ui?.theme === "VS") {
|
|
16641
16717
|
userSettings.ui.theme = DefaultLight.name;
|
|
16642
16718
|
} else if (userSettings.ui?.theme === "VS2015") {
|
|
@@ -16873,7 +16949,7 @@ function migrateDeprecatedSettings(loadedSettings, removeDeprecated = true) {
|
|
|
16873
16949
|
function saveSettings(settingsFile) {
|
|
16874
16950
|
settingsCache.clear();
|
|
16875
16951
|
try {
|
|
16876
|
-
const dirPath =
|
|
16952
|
+
const dirPath = path4.dirname(settingsFile.path);
|
|
16877
16953
|
if (!fs4.existsSync(dirPath)) {
|
|
16878
16954
|
fs4.mkdirSync(dirPath, { recursive: true });
|
|
16879
16955
|
}
|
|
@@ -17000,7 +17076,7 @@ function migrateExperimentalSettings(settings, loadedSettings, scope, removeDepr
|
|
|
17000
17076
|
}
|
|
17001
17077
|
|
|
17002
17078
|
// packages/cli/src/commands/gemma/constants.ts
|
|
17003
|
-
import
|
|
17079
|
+
import path5 from "node:path";
|
|
17004
17080
|
var LITERT_RELEASE_VERSION = "v0.9.0-alpha03";
|
|
17005
17081
|
var LITERT_RELEASE_BASE_URL = "https://github.com/google-ai-edge/LiteRT-LM/releases/download";
|
|
17006
17082
|
var GEMMA_MODEL_NAME = "gemma3-1b-gpu-custom";
|
|
@@ -17019,18 +17095,18 @@ var PLATFORM_BINARY_SHA256 = {
|
|
|
17019
17095
|
"lit.windows_x86_64.exe": "de82d2829d2fb1cbdb318e2d8a78dc2f9659ff14cb11b2894d1f30e0bfde2bf6"
|
|
17020
17096
|
};
|
|
17021
17097
|
function getLiteRtBinDir() {
|
|
17022
|
-
return
|
|
17098
|
+
return path5.join(Storage.getGlobalGeminiDir(), "bin", "litert");
|
|
17023
17099
|
}
|
|
17024
17100
|
function getPidFilePath() {
|
|
17025
|
-
return
|
|
17101
|
+
return path5.join(Storage.getGlobalTempDir(), "litert-server.pid");
|
|
17026
17102
|
}
|
|
17027
17103
|
function getLogFilePath() {
|
|
17028
|
-
return
|
|
17104
|
+
return path5.join(Storage.getGlobalTempDir(), "litert-server.log");
|
|
17029
17105
|
}
|
|
17030
17106
|
|
|
17031
17107
|
// packages/cli/src/commands/gemma/platform.ts
|
|
17032
17108
|
import fs5 from "node:fs";
|
|
17033
|
-
import
|
|
17109
|
+
import path6 from "node:path";
|
|
17034
17110
|
import { execFileSync } from "node:child_process";
|
|
17035
17111
|
function getUserConfiguredBinaryPath(workspaceDir = process.cwd()) {
|
|
17036
17112
|
try {
|
|
@@ -17090,7 +17166,7 @@ function getBinaryPath(binaryName) {
|
|
|
17090
17166
|
}
|
|
17091
17167
|
const name = binaryName ?? detectPlatform()?.binaryName;
|
|
17092
17168
|
if (!name) return null;
|
|
17093
|
-
return
|
|
17169
|
+
return path6.join(getLiteRtBinDir(), name);
|
|
17094
17170
|
}
|
|
17095
17171
|
function getBinaryDownloadUrl(binaryName) {
|
|
17096
17172
|
return `${LITERT_RELEASE_BASE_URL}/${LITERT_RELEASE_VERSION}/${binaryName}`;
|
|
@@ -17225,7 +17301,7 @@ function isExpectedLiteRtServerCommand(commandLine, options) {
|
|
|
17225
17301
|
}
|
|
17226
17302
|
const normalizedBinaryPath = normalizeProcessValue(options.binaryPath);
|
|
17227
17303
|
const normalizedBinaryName = normalizeProcessValue(
|
|
17228
|
-
|
|
17304
|
+
path6.basename(options.binaryPath)
|
|
17229
17305
|
);
|
|
17230
17306
|
return normalizedCommandLine.includes(normalizedBinaryPath) || normalizedCommandLine.includes(normalizedBinaryName);
|
|
17231
17307
|
}
|
|
@@ -1,8 +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
|
-
CoreToolCallStatus,
|
|
4
3
|
checkExhaustive
|
|
5
|
-
} from "./chunk-
|
|
4
|
+
} from "./chunk-KCB54UJ5.js";
|
|
6
5
|
import {
|
|
7
6
|
__commonJS,
|
|
8
7
|
__toESM
|
|
@@ -465,19 +464,19 @@ var require_react = __commonJS({
|
|
|
465
464
|
var import_react = __toESM(require_react(), 1);
|
|
466
465
|
function mapCoreStatusToDisplayStatus(coreStatus) {
|
|
467
466
|
switch (coreStatus) {
|
|
468
|
-
case
|
|
467
|
+
case "validating" /* Validating */:
|
|
469
468
|
return "Pending" /* Pending */;
|
|
470
|
-
case
|
|
469
|
+
case "awaiting_approval" /* AwaitingApproval */:
|
|
471
470
|
return "Confirming" /* Confirming */;
|
|
472
|
-
case
|
|
471
|
+
case "executing" /* Executing */:
|
|
473
472
|
return "Executing" /* Executing */;
|
|
474
|
-
case
|
|
473
|
+
case "success" /* Success */:
|
|
475
474
|
return "Success" /* Success */;
|
|
476
|
-
case
|
|
475
|
+
case "cancelled" /* Cancelled */:
|
|
477
476
|
return "Canceled" /* Canceled */;
|
|
478
|
-
case
|
|
477
|
+
case "error" /* Error */:
|
|
479
478
|
return "Error" /* Error */;
|
|
480
|
-
case
|
|
479
|
+
case "scheduled" /* Scheduled */:
|
|
481
480
|
return "Pending" /* Pending */;
|
|
482
481
|
default:
|
|
483
482
|
return checkExhaustive(coreStatus);
|
|
@@ -11,8 +11,8 @@ import {
|
|
|
11
11
|
runSyncCleanup,
|
|
12
12
|
setupSignalHandlers,
|
|
13
13
|
setupTtyCheck
|
|
14
|
-
} from "./chunk-
|
|
15
|
-
import "./chunk-
|
|
14
|
+
} from "./chunk-RXHIISMM.js";
|
|
15
|
+
import "./chunk-NWSCUKK3.js";
|
|
16
16
|
import "./chunk-664ZODQF.js";
|
|
17
17
|
import "./chunk-IUUIT4SU.js";
|
|
18
18
|
import "./chunk-L6PII3GR.js";
|
|
@@ -11,8 +11,8 @@ import {
|
|
|
11
11
|
runSyncCleanup,
|
|
12
12
|
setupSignalHandlers,
|
|
13
13
|
setupTtyCheck
|
|
14
|
-
} from "./chunk-
|
|
15
|
-
import "./chunk-
|
|
14
|
+
} from "./chunk-CTL6DZSY.js";
|
|
15
|
+
import "./chunk-KCB54UJ5.js";
|
|
16
16
|
import "./chunk-664ZODQF.js";
|
|
17
17
|
import "./chunk-IUUIT4SU.js";
|
|
18
18
|
import "./chunk-L6PII3GR.js";
|
|
@@ -11,8 +11,8 @@ import {
|
|
|
11
11
|
runSyncCleanup,
|
|
12
12
|
setupSignalHandlers,
|
|
13
13
|
setupTtyCheck
|
|
14
|
-
} from "./chunk-
|
|
15
|
-
import "./chunk-
|
|
14
|
+
} from "./chunk-BVDTRESW.js";
|
|
15
|
+
import "./chunk-HBZBBLAV.js";
|
|
16
16
|
import "./chunk-664ZODQF.js";
|
|
17
17
|
import "./chunk-IUUIT4SU.js";
|
|
18
18
|
import "./chunk-L6PII3GR.js";
|
|
@@ -973,6 +973,7 @@ import {
|
|
|
973
973
|
promptIdContext,
|
|
974
974
|
readFileWithEncoding,
|
|
975
975
|
readGeminiMdFiles,
|
|
976
|
+
readOAuthCredsWithRetry,
|
|
976
977
|
readPathFromWorkspace,
|
|
977
978
|
readPolicyFiles,
|
|
978
979
|
readSecureFileBuffer,
|
|
@@ -1117,7 +1118,7 @@ import {
|
|
|
1117
1118
|
wrapUntrusted,
|
|
1118
1119
|
writeToStderr,
|
|
1119
1120
|
writeToStdout
|
|
1120
|
-
} from "./chunk-
|
|
1121
|
+
} from "./chunk-KCB54UJ5.js";
|
|
1121
1122
|
import "./chunk-664ZODQF.js";
|
|
1122
1123
|
import {
|
|
1123
1124
|
SpanStatusCode,
|
|
@@ -2101,6 +2102,7 @@ export {
|
|
|
2101
2102
|
promptIdContext,
|
|
2102
2103
|
readFileWithEncoding,
|
|
2103
2104
|
readGeminiMdFiles,
|
|
2105
|
+
readOAuthCredsWithRetry,
|
|
2104
2106
|
readPathFromWorkspace,
|
|
2105
2107
|
readPolicyFiles,
|
|
2106
2108
|
readSecureFileBuffer,
|
|
@@ -973,6 +973,7 @@ import {
|
|
|
973
973
|
promptIdContext,
|
|
974
974
|
readFileWithEncoding,
|
|
975
975
|
readGeminiMdFiles,
|
|
976
|
+
readOAuthCredsWithRetry,
|
|
976
977
|
readPathFromWorkspace,
|
|
977
978
|
readPolicyFiles,
|
|
978
979
|
readSecureFileBuffer,
|
|
@@ -1117,7 +1118,7 @@ import {
|
|
|
1117
1118
|
wrapUntrusted,
|
|
1118
1119
|
writeToStderr,
|
|
1119
1120
|
writeToStdout
|
|
1120
|
-
} from "./chunk-
|
|
1121
|
+
} from "./chunk-HBZBBLAV.js";
|
|
1121
1122
|
import "./chunk-664ZODQF.js";
|
|
1122
1123
|
import {
|
|
1123
1124
|
SpanStatusCode,
|
|
@@ -2101,6 +2102,7 @@ export {
|
|
|
2101
2102
|
promptIdContext,
|
|
2102
2103
|
readFileWithEncoding,
|
|
2103
2104
|
readGeminiMdFiles,
|
|
2105
|
+
readOAuthCredsWithRetry,
|
|
2104
2106
|
readPathFromWorkspace,
|
|
2105
2107
|
readPolicyFiles,
|
|
2106
2108
|
readSecureFileBuffer,
|
|
@@ -2,7 +2,7 @@ const require = (await import('node:module')).createRequire(import.meta.url); co
|
|
|
2
2
|
import {
|
|
3
3
|
coreEvents,
|
|
4
4
|
debugLogger
|
|
5
|
-
} from "./chunk-
|
|
5
|
+
} from "./chunk-HBZBBLAV.js";
|
|
6
6
|
import "./chunk-664ZODQF.js";
|
|
7
7
|
import "./chunk-IUUIT4SU.js";
|
|
8
8
|
import "./chunk-L6PII3GR.js";
|
|
@@ -4324,7 +4324,7 @@ async function toggleDevToolsPanel(config, isOpen, toggle, setOpen) {
|
|
|
4324
4324
|
return;
|
|
4325
4325
|
}
|
|
4326
4326
|
try {
|
|
4327
|
-
const { openBrowserSecurely, shouldLaunchBrowser } = await import("./core-
|
|
4327
|
+
const { openBrowserSecurely, shouldLaunchBrowser } = await import("./core-GAJB2LOX.js");
|
|
4328
4328
|
const url = await startDevToolsServer(config);
|
|
4329
4329
|
if (shouldLaunchBrowser()) {
|
|
4330
4330
|
try {
|
|
@@ -1,9 +1,8 @@
|
|
|
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
|
-
CoreEvent,
|
|
4
3
|
coreEvents,
|
|
5
4
|
debugLogger
|
|
6
|
-
} from "./chunk-
|
|
5
|
+
} from "./chunk-KCB54UJ5.js";
|
|
7
6
|
import "./chunk-664ZODQF.js";
|
|
8
7
|
import "./chunk-IUUIT4SU.js";
|
|
9
8
|
import "./chunk-L6PII3GR.js";
|
|
@@ -4174,7 +4173,7 @@ var bridgeAttached = false;
|
|
|
4174
4173
|
function bridgeCoreEvents(capture) {
|
|
4175
4174
|
if (bridgeAttached) return;
|
|
4176
4175
|
bridgeAttached = true;
|
|
4177
|
-
coreEvents.on(
|
|
4176
|
+
coreEvents.on("console-log" /* ConsoleLog */, (payload) => {
|
|
4178
4177
|
capture.logConsole(payload);
|
|
4179
4178
|
});
|
|
4180
4179
|
}
|
|
@@ -4325,7 +4324,7 @@ async function toggleDevToolsPanel(config, isOpen, toggle, setOpen) {
|
|
|
4325
4324
|
return;
|
|
4326
4325
|
}
|
|
4327
4326
|
try {
|
|
4328
|
-
const { openBrowserSecurely, shouldLaunchBrowser } = await import("./
|
|
4327
|
+
const { openBrowserSecurely, shouldLaunchBrowser } = await import("./core-D5D4MF5H.js");
|
|
4329
4328
|
const url = await startDevToolsServer(config);
|
|
4330
4329
|
if (shouldLaunchBrowser()) {
|
|
4331
4330
|
try {
|
|
@@ -3,7 +3,7 @@ import {
|
|
|
3
3
|
CoreEvent,
|
|
4
4
|
coreEvents,
|
|
5
5
|
debugLogger
|
|
6
|
-
} from "./chunk-
|
|
6
|
+
} from "./chunk-NWSCUKK3.js";
|
|
7
7
|
import "./chunk-664ZODQF.js";
|
|
8
8
|
import "./chunk-IUUIT4SU.js";
|
|
9
9
|
import "./chunk-L6PII3GR.js";
|
|
@@ -4325,7 +4325,7 @@ async function toggleDevToolsPanel(config, isOpen, toggle, setOpen) {
|
|
|
4325
4325
|
return;
|
|
4326
4326
|
}
|
|
4327
4327
|
try {
|
|
4328
|
-
const { openBrowserSecurely, shouldLaunchBrowser } = await import("./dist-
|
|
4328
|
+
const { openBrowserSecurely, shouldLaunchBrowser } = await import("./dist-MTMOCTIW.js");
|
|
4329
4329
|
const url = await startDevToolsServer(config);
|
|
4330
4330
|
if (shouldLaunchBrowser()) {
|
|
4331
4331
|
try {
|