@google/gemini-cli 0.70.0 → 0.71.0-nightly.20261120.gd4cb1713f
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-VHXUWMGE.js → chunk-22NLCXU3.js} +2 -2
- package/bundle/{chunk-SPAMAY26.js → chunk-3DBVNRC7.js} +1 -1
- package/bundle/{chunk-FXAACYC3.js → chunk-3VKSDKQA.js} +1 -1
- package/bundle/{chunk-YOEWNBDC.js → chunk-43QQPZRQ.js} +2 -2
- package/bundle/{chunk-5VFAWK3F.js → chunk-4FKCNBUM.js} +1 -1
- package/bundle/{chunk-BOIBJEIO.js → chunk-4SEHQOPY.js} +3 -3
- package/bundle/{chunk-6IKD2NB3.js → chunk-4V6FXIV7.js} +1 -1
- package/bundle/{chunk-FHK4RNCX.js → chunk-4YWPS6WG.js} +7 -7
- package/bundle/{chunk-4BWP3TDK.js → chunk-6VJSIYX5.js} +9 -8
- package/bundle/{chunk-LMNAB62M.js → chunk-7CGFKAQQ.js} +2 -2
- package/bundle/{chunk-3VGGGCOZ.js → chunk-7WRW57EW.js} +2 -2
- package/bundle/{chunk-37D3S3FZ.js → chunk-AQR7HAVC.js} +878 -371
- package/bundle/{chunk-V4HIE5G5.js → chunk-AWAS7A4U.js} +1 -1
- package/bundle/{chunk-GFBMTAPD.js → chunk-BFYOZTEC.js} +8 -6
- package/bundle/{chunk-WRWAVEME.js → chunk-CVDUPOPD.js} +1 -1
- package/bundle/{chunk-JLKRLYZG.js → chunk-EV4MLSRK.js} +2 -2
- package/bundle/{chunk-KV6XIC2Z.js → chunk-H35O2XC7.js} +1 -1
- package/bundle/{chunk-7JS2T75Z.js → chunk-HBX5SUG6.js} +1 -1
- package/bundle/chunk-ID6HT5PN.js +512 -0
- package/bundle/chunk-JUDLPWWJ.js +1962 -0
- package/bundle/{chunk-CB37EK5Y.js → chunk-JVBEESQE.js} +3 -3
- package/bundle/{chunk-EG2BSKPF.js → chunk-L7GW5P2N.js} +1 -1
- package/bundle/{chunk-UF44X63P.js → chunk-MFOWRKY4.js} +782 -323
- package/bundle/chunk-MPPDWK6R.js +40024 -0
- package/bundle/{chunk-G6SC5BOV.js → chunk-NF46UAZ5.js} +1 -1
- package/bundle/chunk-P3QKD7NI.js +190 -0
- package/bundle/chunk-P5SMSWOI.js +65 -0
- package/bundle/{chunk-QYKA4YD7.js → chunk-Q3MSDTUZ.js} +3 -3
- package/bundle/{chunk-AMHNNZY2.js → chunk-QYILFI2Q.js} +7 -7
- package/bundle/{chunk-RFQXG324.js → chunk-R5O4JOJ7.js} +1 -1
- package/bundle/chunk-T5ERFODG.js +118 -0
- package/bundle/{chunk-LMBUPWFC.js → chunk-TKCJYF6S.js} +8765 -15613
- package/bundle/{chunk-CMKRWIX6.js → chunk-WEQEDCCJ.js} +71 -58
- package/bundle/chunk-YGBB6EOP.js +1571 -0
- package/bundle/chunk-ZL2NEMMB.js +420386 -0
- package/bundle/chunk-ZM7BCSH5.js +60338 -0
- package/bundle/{cleanup-BMYAIPAL.js → cleanup-2V4YG4JU.js} +2 -2
- package/bundle/{cleanup-CWOSCK57.js → cleanup-577T3DEI.js} +2 -2
- package/bundle/{cleanup-JTPRPYIQ.js → cleanup-A7BQ5O2C.js} +2 -2
- package/bundle/cleanup-BER5KF3M.js +34 -0
- package/bundle/{core-XZECNCR2.js → core-J5GAQUTA.js} +31 -1
- package/bundle/{devtoolsService-ER22TM2Y.js → devtoolsService-5ICQIIYF.js} +2 -2
- package/bundle/{devtoolsService-WNJOZ7ZT.js → devtoolsService-7E2XLRN6.js} +2 -2
- package/bundle/{devtoolsService-O5VD5YWD.js → devtoolsService-B2G4MIWC.js} +4 -3
- package/bundle/devtoolsService-HFMB7OZU.js +919 -0
- package/bundle/{core-HYVGBZPP.js → dist-63TFONDS.js} +31 -1
- package/bundle/{dist-75NDR3EX.js → dist-J4SRUOE6.js} +31 -1
- package/bundle/dist-J54GSUG2.js +2372 -0
- package/bundle/docs/changelogs/index.md +46 -0
- package/bundle/docs/changelogs/latest.md +82 -100
- package/bundle/docs/changelogs/preview.md +82 -115
- package/bundle/{formatError-M4GLDFGE.js → formatError-ISWUYAZB.js} +2 -2
- package/bundle/{formatError-QOZLAZ32.js → formatError-IX7HHO6M.js} +2 -2
- package/bundle/{formatError-FYLLVZDF.js → formatError-MZRXOV55.js} +2 -2
- package/bundle/formatError-U2ZQLJHB.js +14 -0
- package/bundle/{gemini-AYDYW6NZ.js → gemini-FRGLIXP7.js} +15 -15
- package/bundle/{gemini-PG2FEK5D.js → gemini-GSQARDB2.js} +224 -208
- package/bundle/gemini-KZFVMGY3.js +20020 -0
- package/bundle/{gemini-FRSP6LA3.js → gemini-ZZBTL6TA.js} +15 -15
- package/bundle/gemini.js +8 -8
- package/bundle/{interactiveCli-76LAQB3B.js → interactiveCli-AHDFCTRR.js} +157 -32
- package/bundle/{interactiveCli-BYWR7IEK.js → interactiveCli-MVGIIVAP.js} +157 -32
- package/bundle/{interactiveCli-6TVFB4R5.js → interactiveCli-UN4BNLK2.js} +468 -324
- package/bundle/interactiveCli-XW2S7MKZ.js +36447 -0
- package/bundle/{liteRtServerManager-GIRVSE6M.js → liteRtServerManager-3MOGK3XY.js} +4 -4
- package/bundle/{liteRtServerManager-KZ62KJW3.js → liteRtServerManager-O727KCKA.js} +4 -4
- package/bundle/{liteRtServerManager-BYJWS5BO.js → liteRtServerManager-TSG2V5XN.js} +4 -4
- package/bundle/liteRtServerManager-YLE7JTV7.js +65 -0
- package/bundle/{oauth2-provider-ZBFFAIQE.js → oauth2-provider-3EEFSHG4.js} +1 -1
- package/bundle/{oauth2-provider-SFFQQ6OE.js → oauth2-provider-DWO2KVCY.js} +1 -1
- package/bundle/{oauth2-provider-SRH6I6G7.js → oauth2-provider-G25ZRGDY.js} +41 -79
- package/bundle/oauth2-provider-RHT5OSMO.js +273 -0
- package/bundle/{start-PLK5XHJC.js → start-4XOSRN5A.js} +6 -6
- package/bundle/{start-Q66LTS3Y.js → start-7JXWL6XR.js} +6 -6
- package/bundle/{start-OLEVDFQS.js → start-CAA6RQBK.js} +6 -6
- package/bundle/start-I3RUABAZ.js +18 -0
- package/package.json +1 -1
|
@@ -2,10 +2,10 @@ const require = (await import('node:module')).createRequire(import.meta.url); co
|
|
|
2
2
|
import {
|
|
3
3
|
startCommand,
|
|
4
4
|
startServer
|
|
5
|
-
} from "./chunk-
|
|
5
|
+
} from "./chunk-4SEHQOPY.js";
|
|
6
6
|
import {
|
|
7
7
|
formatCliError
|
|
8
|
-
} from "./chunk-
|
|
8
|
+
} from "./chunk-P5SMSWOI.js";
|
|
9
9
|
import {
|
|
10
10
|
BuiltinCommandLoader,
|
|
11
11
|
CommandService,
|
|
@@ -49,11 +49,11 @@ import {
|
|
|
49
49
|
updateExtension,
|
|
50
50
|
validateAuthMethod,
|
|
51
51
|
validateContextFilePath
|
|
52
|
-
} from "./chunk-
|
|
52
|
+
} from "./chunk-QYILFI2Q.js";
|
|
53
53
|
import {
|
|
54
54
|
exitCli,
|
|
55
55
|
require_source
|
|
56
|
-
} from "./chunk-
|
|
56
|
+
} from "./chunk-YGBB6EOP.js";
|
|
57
57
|
import {
|
|
58
58
|
appEvents
|
|
59
59
|
} from "./chunk-5PS3AYFU.js";
|
|
@@ -93,13 +93,13 @@ import {
|
|
|
93
93
|
saveModelChange,
|
|
94
94
|
setAmbiguousCharactersWide,
|
|
95
95
|
stripAnsi
|
|
96
|
-
} from "./chunk-
|
|
96
|
+
} from "./chunk-43QQPZRQ.js";
|
|
97
97
|
import {
|
|
98
98
|
RELAUNCH_EXIT_CODE,
|
|
99
99
|
isIPCAvailable,
|
|
100
100
|
require_semver
|
|
101
|
-
} from "./chunk-
|
|
102
|
-
import "./chunk-
|
|
101
|
+
} from "./chunk-7WRW57EW.js";
|
|
102
|
+
import "./chunk-R5O4JOJ7.js";
|
|
103
103
|
import {
|
|
104
104
|
cleanupCheckpoints,
|
|
105
105
|
registerCleanup,
|
|
@@ -108,7 +108,7 @@ import {
|
|
|
108
108
|
runExitCleanup,
|
|
109
109
|
runSyncCleanup,
|
|
110
110
|
setupSignalHandlers
|
|
111
|
-
} from "./chunk-
|
|
111
|
+
} from "./chunk-L7GW5P2N.js";
|
|
112
112
|
import {
|
|
113
113
|
ASK_USER_TOOL_NAME,
|
|
114
114
|
AjvJsonSchemaValidator,
|
|
@@ -290,7 +290,7 @@ import {
|
|
|
290
290
|
updatePolicy,
|
|
291
291
|
writeToStderr,
|
|
292
292
|
writeToStdout
|
|
293
|
-
} from "./chunk-
|
|
293
|
+
} from "./chunk-AQR7HAVC.js";
|
|
294
294
|
import "./chunk-W2AJR23G.js";
|
|
295
295
|
import "./chunk-N7J54YNL.js";
|
|
296
296
|
import "./chunk-L6PII3GR.js";
|
|
@@ -8456,7 +8456,7 @@ async function loadSandboxConfig(settings, argv) {
|
|
|
8456
8456
|
}
|
|
8457
8457
|
const command2 = getSandboxCommand(sandboxValue);
|
|
8458
8458
|
const packageJson = await getPackageJson(__dirname3);
|
|
8459
|
-
const image = process.env["GEMINI_SANDBOX_IMAGE"] ?? "us-docker.pkg.dev/gemini-code-dev/gemini-cli/sandbox:0.
|
|
8459
|
+
const image = process.env["GEMINI_SANDBOX_IMAGE"] ?? "us-docker.pkg.dev/gemini-code-dev/gemini-cli/sandbox:0.71.0-nightly.20261118.g615d6bc8c" ?? customImage ?? packageJson?.config?.sandboxImageUri;
|
|
8460
8460
|
const isNative = command2 === "windows-native" || command2 === "sandbox-exec" || command2 === "lxc";
|
|
8461
8461
|
return command2 && (image || isNative) ? { enabled: true, allowedPaths, networkAccess, command: command2, image } : void 0;
|
|
8462
8462
|
}
|
|
@@ -13640,7 +13640,7 @@ async function runNonInteractive({
|
|
|
13640
13640
|
}
|
|
13641
13641
|
});
|
|
13642
13642
|
if (process.env["GEMINI_CLI_ACTIVITY_LOG_TARGET"]) {
|
|
13643
|
-
const { setupInitialActivityLogger } = await import("./devtoolsService-
|
|
13643
|
+
const { setupInitialActivityLogger } = await import("./devtoolsService-7E2XLRN6.js");
|
|
13644
13644
|
setupInitialActivityLogger(config);
|
|
13645
13645
|
}
|
|
13646
13646
|
const { stdout: workingStdout } = createWorkingStdio();
|
|
@@ -14181,7 +14181,7 @@ async function runNonInteractive2(params) {
|
|
|
14181
14181
|
}
|
|
14182
14182
|
});
|
|
14183
14183
|
if (process.env["GEMINI_CLI_ACTIVITY_LOG_TARGET"]) {
|
|
14184
|
-
const { setupInitialActivityLogger } = await import("./devtoolsService-
|
|
14184
|
+
const { setupInitialActivityLogger } = await import("./devtoolsService-7E2XLRN6.js");
|
|
14185
14185
|
setupInitialActivityLogger(config);
|
|
14186
14186
|
}
|
|
14187
14187
|
const { stdout: workingStdout } = createWorkingStdio();
|
|
@@ -19462,7 +19462,7 @@ async function resolveSessionId(resumeArg, sessionIdArg, sessionFileArg) {
|
|
|
19462
19462
|
}
|
|
19463
19463
|
}
|
|
19464
19464
|
async function startInteractiveUI(config, settings, startupWarnings, workspaceRoot = process.cwd(), resumedSessionData, initializationResult) {
|
|
19465
|
-
const { startInteractiveUI: doStartUI } = await import("./interactiveCli-
|
|
19465
|
+
const { startInteractiveUI: doStartUI } = await import("./interactiveCli-MVGIIVAP.js");
|
|
19466
19466
|
await doStartUI(
|
|
19467
19467
|
config,
|
|
19468
19468
|
settings,
|
|
@@ -19697,7 +19697,7 @@ ${finalArgs[promptIndex + 1]}`;
|
|
|
19697
19697
|
await config.storage.initialize();
|
|
19698
19698
|
adminControlsListner.setConfig(config);
|
|
19699
19699
|
if (config.isInteractive() && settings.merged.general.devtools) {
|
|
19700
|
-
const { setupInitialActivityLogger } = await import("./devtoolsService-
|
|
19700
|
+
const { setupInitialActivityLogger } = await import("./devtoolsService-7E2XLRN6.js");
|
|
19701
19701
|
setupInitialActivityLogger(config);
|
|
19702
19702
|
}
|
|
19703
19703
|
registerTelemetryConfig(config);
|
|
@@ -19756,7 +19756,7 @@ ${finalArgs[promptIndex + 1]}`;
|
|
|
19756
19756
|
const initAppHandle = startupProfiler.start("initialize_app");
|
|
19757
19757
|
const initializationResult = await initializeApp(config, settings);
|
|
19758
19758
|
initAppHandle?.end();
|
|
19759
|
-
import("./liteRtServerManager-
|
|
19759
|
+
import("./liteRtServerManager-O727KCKA.js").then(({ LiteRtServerManager }) => {
|
|
19760
19760
|
const mergedGemma = settings.merged.experimental?.gemmaModelRouter;
|
|
19761
19761
|
if (!mergedGemma) return;
|
|
19762
19762
|
const userGemma = settings.forScope("User" /* User */).settings.experimental?.gemmaModelRouter;
|
package/bundle/gemini.js
CHANGED
|
@@ -7,10 +7,10 @@ import {
|
|
|
7
7
|
handleChildProcessClose,
|
|
8
8
|
isSeaEnvironment,
|
|
9
9
|
setupSignalForwarding
|
|
10
|
-
} from "./chunk-
|
|
11
|
-
import "./chunk-
|
|
12
|
-
import "./chunk-
|
|
13
|
-
import "./chunk-
|
|
10
|
+
} from "./chunk-22NLCXU3.js";
|
|
11
|
+
import "./chunk-4FKCNBUM.js";
|
|
12
|
+
import "./chunk-AWAS7A4U.js";
|
|
13
|
+
import "./chunk-MFOWRKY4.js";
|
|
14
14
|
import "./chunk-W2AJR23G.js";
|
|
15
15
|
import "./chunk-N7J54YNL.js";
|
|
16
16
|
import "./chunk-L6PII3GR.js";
|
|
@@ -124,10 +124,10 @@ ${error instanceof Error ? error.stack ?? error.message : String(error)}
|
|
|
124
124
|
}
|
|
125
125
|
}
|
|
126
126
|
} else {
|
|
127
|
-
const { main } = await import("./gemini-
|
|
128
|
-
const { FatalError, writeToStderr } = await import("./dist-
|
|
129
|
-
const { runExitCleanup } = await import("./cleanup-
|
|
130
|
-
const { formatCliError, isCliDebugEnabled } = await import("./formatError-
|
|
127
|
+
const { main } = await import("./gemini-FRGLIXP7.js");
|
|
128
|
+
const { FatalError, writeToStderr } = await import("./dist-J54GSUG2.js");
|
|
129
|
+
const { runExitCleanup } = await import("./cleanup-2V4YG4JU.js");
|
|
130
|
+
const { formatCliError, isCliDebugEnabled } = await import("./formatError-IX7HHO6M.js");
|
|
131
131
|
main().catch(async (error) => {
|
|
132
132
|
const cleanupTimeout = setTimeout(() => {
|
|
133
133
|
writeToStderr("Cleanup timed out, forcing exit...\n");
|
|
@@ -149,10 +149,10 @@ import {
|
|
|
149
149
|
useUIState,
|
|
150
150
|
useVimMode,
|
|
151
151
|
validateAuthMethod
|
|
152
|
-
} from "./chunk-
|
|
152
|
+
} from "./chunk-WEQEDCCJ.js";
|
|
153
153
|
import {
|
|
154
154
|
require_source
|
|
155
|
-
} from "./chunk-
|
|
155
|
+
} from "./chunk-4V6FXIV7.js";
|
|
156
156
|
import {
|
|
157
157
|
appEvents
|
|
158
158
|
} from "./chunk-5PS3AYFU.js";
|
|
@@ -226,25 +226,25 @@ import {
|
|
|
226
226
|
widestLineFromStyledChars,
|
|
227
227
|
wordBreakStyledChars,
|
|
228
228
|
wrapStyledChars
|
|
229
|
-
} from "./chunk-
|
|
229
|
+
} from "./chunk-7CGFKAQQ.js";
|
|
230
230
|
import {
|
|
231
231
|
handleAutoUpdate,
|
|
232
232
|
isDevelopment,
|
|
233
233
|
relaunchApp,
|
|
234
234
|
require_semver,
|
|
235
235
|
setUpdateHandler
|
|
236
|
-
} from "./chunk-
|
|
236
|
+
} from "./chunk-JUDLPWWJ.js";
|
|
237
237
|
import {
|
|
238
238
|
isTodoList,
|
|
239
239
|
mapCoreStatusToDisplayStatus,
|
|
240
240
|
require_react
|
|
241
|
-
} from "./chunk-
|
|
241
|
+
} from "./chunk-ID6HT5PN.js";
|
|
242
242
|
import {
|
|
243
243
|
registerCleanup,
|
|
244
244
|
removeCleanup,
|
|
245
245
|
runExitCleanup,
|
|
246
246
|
setupTtyCheck
|
|
247
|
-
} from "./chunk-
|
|
247
|
+
} from "./chunk-CVDUPOPD.js";
|
|
248
248
|
import {
|
|
249
249
|
ACTIVATE_SKILL_TOOL_NAME,
|
|
250
250
|
AGENT_TOOL_NAME,
|
|
@@ -387,8 +387,10 @@ import {
|
|
|
387
387
|
getPackageJson,
|
|
388
388
|
getPlanModeExitMessage,
|
|
389
389
|
getResponseText,
|
|
390
|
+
getShellConfiguration,
|
|
390
391
|
getVersion,
|
|
391
392
|
hasRedirection,
|
|
393
|
+
hasRedirectionAsync,
|
|
392
394
|
hasSummary,
|
|
393
395
|
hasValidEditorCommand,
|
|
394
396
|
homedir,
|
|
@@ -400,11 +402,15 @@ import {
|
|
|
400
402
|
isBackgroundExecutionData,
|
|
401
403
|
isBinary,
|
|
402
404
|
isBinaryAvailable,
|
|
405
|
+
isDefaultHasRedirection,
|
|
406
|
+
isDefaultIsInteractiveGeminiCommand,
|
|
403
407
|
isEditorAvailable,
|
|
404
408
|
isFileDiff,
|
|
405
409
|
isGrepResult,
|
|
406
410
|
isHeadlessMode,
|
|
407
411
|
isInteractiveGeminiCommand,
|
|
412
|
+
isInteractiveGeminiCommandAsync,
|
|
413
|
+
isKnownInteractiveGeminiCommandSync,
|
|
408
414
|
isListResult,
|
|
409
415
|
isNodeError,
|
|
410
416
|
isOverageEligibleModel,
|
|
@@ -460,7 +466,7 @@ import {
|
|
|
460
466
|
validatePlanContent,
|
|
461
467
|
validatePlanPath,
|
|
462
468
|
writeToStdout
|
|
463
|
-
} from "./chunk-
|
|
469
|
+
} from "./chunk-TKCJYF6S.js";
|
|
464
470
|
import "./chunk-W2AJR23G.js";
|
|
465
471
|
import "./chunk-N7J54YNL.js";
|
|
466
472
|
import "./chunk-L6PII3GR.js";
|
|
@@ -12641,9 +12647,7 @@ ${deceptiveUrlWarnings.map(
|
|
|
12641
12647
|
} else if (confirmationDetails.type === "exec") {
|
|
12642
12648
|
const executionProps = confirmationDetails;
|
|
12643
12649
|
const commandsToDisplay = executionProps.commands && executionProps.commands.length > 0 ? executionProps.commands : [executionProps.command];
|
|
12644
|
-
const containsRedirection = commandsToDisplay.some(
|
|
12645
|
-
(cmd) => hasRedirection(cmd)
|
|
12646
|
-
);
|
|
12650
|
+
const containsRedirection = typeof executionProps.hasRedirection === "boolean" ? executionProps.hasRedirection : commandsToDisplay.some((cmd) => hasRedirection(cmd));
|
|
12647
12651
|
const isAutoEdit = config.getApprovalMode() === ApprovalMode.YOLO || config.getApprovalMode() === ApprovalMode.AUTO_EDIT;
|
|
12648
12652
|
if (containsRedirection && !isAutoEdit) {
|
|
12649
12653
|
extraInfoLines = 1;
|
|
@@ -12870,9 +12874,7 @@ Ensure you trust all modifications made to build files before approving executio
|
|
|
12870
12874
|
const executionProps = confirmationDetails;
|
|
12871
12875
|
const isShell = isShellTool(toolName);
|
|
12872
12876
|
const commandsToDisplay = executionProps.commands && executionProps.commands.length > 1 ? executionProps.commands : [executionProps.command];
|
|
12873
|
-
const containsRedirection = commandsToDisplay.some(
|
|
12874
|
-
(cmd) => hasRedirection(cmd)
|
|
12875
|
-
);
|
|
12877
|
+
const containsRedirection = typeof executionProps.hasRedirection === "boolean" ? executionProps.hasRedirection : commandsToDisplay.some((cmd) => hasRedirection(cmd));
|
|
12876
12878
|
const isAutoEdit = config.getApprovalMode() === ApprovalMode.YOLO || config.getApprovalMode() === ApprovalMode.AUTO_EDIT;
|
|
12877
12879
|
let warnings = null;
|
|
12878
12880
|
if (containsRedirection && !isAutoEdit) {
|
|
@@ -25041,7 +25043,9 @@ var useExecutionLifecycle = (addItemToHistory, setPendingHistoryItem, onExec, on
|
|
|
25041
25043
|
{ type: "user_shell", text: rawQuery },
|
|
25042
25044
|
userMessageTimestamp
|
|
25043
25045
|
);
|
|
25044
|
-
|
|
25046
|
+
const useAsyncPowerShellGeminiCheck = typeof isDefaultIsInteractiveGeminiCommand === "function" && isDefaultIsInteractiveGeminiCommand(isInteractiveGeminiCommand) && typeof isInteractiveGeminiCommandAsync === "function" && typeof isKnownInteractiveGeminiCommandSync === "function" && typeof getShellConfiguration === "function" && getShellConfiguration().shell === "powershell";
|
|
25047
|
+
const syncInteractiveGeminiCheck = useAsyncPowerShellGeminiCheck ? isKnownInteractiveGeminiCommandSync(rawQuery) : isInteractiveGeminiCommand(rawQuery);
|
|
25048
|
+
if (syncInteractiveGeminiCheck === true) {
|
|
25045
25049
|
addItemToHistory(
|
|
25046
25050
|
{ type: "error", text: INTERACTIVE_GEMINI_SHELL_ERROR },
|
|
25047
25051
|
userMessageTimestamp
|
|
@@ -25053,6 +25057,22 @@ var useExecutionLifecycle = (addItemToHistory, setPendingHistoryItem, onExec, on
|
|
|
25053
25057
|
let commandToExecute = rawQuery;
|
|
25054
25058
|
let pwdFilePath;
|
|
25055
25059
|
const executeCommand = async () => {
|
|
25060
|
+
if (syncInteractiveGeminiCheck === void 0 && await isInteractiveGeminiCommandAsync(
|
|
25061
|
+
rawQuery,
|
|
25062
|
+
void 0,
|
|
25063
|
+
abortSignal
|
|
25064
|
+
)) {
|
|
25065
|
+
addItemToHistory(
|
|
25066
|
+
{ type: "error", text: INTERACTIVE_GEMINI_SHELL_ERROR },
|
|
25067
|
+
userMessageTimestamp
|
|
25068
|
+
);
|
|
25069
|
+
return;
|
|
25070
|
+
}
|
|
25071
|
+
if (abortSignal.aborted) {
|
|
25072
|
+
setPendingHistoryItem(null);
|
|
25073
|
+
setShellInputFocused(false);
|
|
25074
|
+
return;
|
|
25075
|
+
}
|
|
25056
25076
|
let cumulativeStdout = "";
|
|
25057
25077
|
let isBinaryStream = false;
|
|
25058
25078
|
let binaryBytesReceived = 0;
|
|
@@ -27760,8 +27780,48 @@ var import_react101 = __toESM(require_react(), 1);
|
|
|
27760
27780
|
|
|
27761
27781
|
// packages/cli/src/ui/hooks/useTurnActivityMonitor.ts
|
|
27762
27782
|
var import_react100 = __toESM(require_react(), 1);
|
|
27783
|
+
var EMPTY_REDIRECTION_MAP = /* @__PURE__ */ new Map();
|
|
27784
|
+
function redirectionCacheReducer(state, action) {
|
|
27785
|
+
switch (action.type) {
|
|
27786
|
+
case "set": {
|
|
27787
|
+
if (state.get(action.command) === action.hasRedirection) {
|
|
27788
|
+
return state;
|
|
27789
|
+
}
|
|
27790
|
+
const next = new Map(state);
|
|
27791
|
+
next.set(action.command, action.hasRedirection);
|
|
27792
|
+
return next;
|
|
27793
|
+
}
|
|
27794
|
+
case "reset":
|
|
27795
|
+
return state.size === 0 ? state : EMPTY_REDIRECTION_MAP;
|
|
27796
|
+
default:
|
|
27797
|
+
return state;
|
|
27798
|
+
}
|
|
27799
|
+
}
|
|
27800
|
+
function shouldUseAsyncPowerShellRedirection() {
|
|
27801
|
+
return typeof isDefaultHasRedirection === "function" && isDefaultHasRedirection(hasRedirection) && typeof hasRedirectionAsync === "function" && typeof getShellConfiguration === "function" && getShellConfiguration().shell === "powershell";
|
|
27802
|
+
}
|
|
27803
|
+
function extractShellCommand(tc) {
|
|
27804
|
+
const rawCommand = tc.request.args?.["command"];
|
|
27805
|
+
return typeof rawCommand === "string" ? rawCommand : "";
|
|
27806
|
+
}
|
|
27763
27807
|
var useTurnActivityMonitor = (streamingState, activePtyId, pendingToolCalls = []) => {
|
|
27764
27808
|
const [operationStartTime, setOperationStartTime] = (0, import_react100.useState)(0);
|
|
27809
|
+
const [resolvedRedirections, dispatchRedirection] = (0, import_react100.useReducer)(
|
|
27810
|
+
redirectionCacheReducer,
|
|
27811
|
+
EMPTY_REDIRECTION_MAP
|
|
27812
|
+
);
|
|
27813
|
+
const inFlightCommandsRef = (0, import_react100.useRef)(/* @__PURE__ */ new Set());
|
|
27814
|
+
const turnEpochRef = (0, import_react100.useRef)(0);
|
|
27815
|
+
const turnAbortControllerRef = (0, import_react100.useRef)(null);
|
|
27816
|
+
const isMountedRef = (0, import_react100.useRef)(true);
|
|
27817
|
+
(0, import_react100.useEffect)(() => {
|
|
27818
|
+
isMountedRef.current = true;
|
|
27819
|
+
return () => {
|
|
27820
|
+
isMountedRef.current = false;
|
|
27821
|
+
turnAbortControllerRef.current?.abort();
|
|
27822
|
+
turnAbortControllerRef.current = null;
|
|
27823
|
+
};
|
|
27824
|
+
}, []);
|
|
27765
27825
|
const prevPtyIdRef = (0, import_react100.useRef)(void 0);
|
|
27766
27826
|
const prevStreamingStateRef = (0, import_react100.useRef)(void 0);
|
|
27767
27827
|
(0, import_react100.useEffect)(() => {
|
|
@@ -27776,17 +27836,69 @@ var useTurnActivityMonitor = (streamingState, activePtyId, pendingToolCalls = []
|
|
|
27776
27836
|
prevPtyIdRef.current = activePtyId;
|
|
27777
27837
|
prevStreamingStateRef.current = streamingState;
|
|
27778
27838
|
}, [streamingState, activePtyId]);
|
|
27779
|
-
|
|
27780
|
-
()
|
|
27781
|
-
|
|
27782
|
-
|
|
27783
|
-
|
|
27784
|
-
|
|
27839
|
+
(0, import_react100.useEffect)(() => {
|
|
27840
|
+
if (streamingState === "idle" /* Idle */ && pendingToolCalls.length === 0) {
|
|
27841
|
+
turnEpochRef.current += 1;
|
|
27842
|
+
turnAbortControllerRef.current?.abort();
|
|
27843
|
+
turnAbortControllerRef.current = null;
|
|
27844
|
+
inFlightCommandsRef.current.clear();
|
|
27845
|
+
dispatchRedirection({ type: "reset" });
|
|
27846
|
+
return;
|
|
27847
|
+
}
|
|
27848
|
+
if (!shouldUseAsyncPowerShellRedirection()) {
|
|
27849
|
+
return;
|
|
27850
|
+
}
|
|
27851
|
+
if (!turnAbortControllerRef.current || turnAbortControllerRef.current.signal.aborted) {
|
|
27852
|
+
turnAbortControllerRef.current = new AbortController();
|
|
27853
|
+
}
|
|
27854
|
+
const turnSignal = turnAbortControllerRef.current.signal;
|
|
27855
|
+
const epoch = turnEpochRef.current;
|
|
27856
|
+
for (const tc of pendingToolCalls) {
|
|
27857
|
+
if (tc.request.name !== "run_shell_command") {
|
|
27858
|
+
continue;
|
|
27859
|
+
}
|
|
27860
|
+
if (tc.confirmationDetails?.type === "exec" && typeof tc.confirmationDetails.hasRedirection === "boolean") {
|
|
27861
|
+
continue;
|
|
27862
|
+
}
|
|
27863
|
+
const command = extractShellCommand(tc);
|
|
27864
|
+
if (!command || !/[><]/.test(command) || resolvedRedirections.has(command) || inFlightCommandsRef.current.has(command)) {
|
|
27865
|
+
continue;
|
|
27866
|
+
}
|
|
27867
|
+
inFlightCommandsRef.current.add(command);
|
|
27868
|
+
void hasRedirectionAsync(command, void 0, turnSignal).then((redirected) => {
|
|
27869
|
+
inFlightCommandsRef.current.delete(command);
|
|
27870
|
+
if (isMountedRef.current && turnEpochRef.current === epoch && !turnSignal.aborted) {
|
|
27871
|
+
dispatchRedirection({
|
|
27872
|
+
type: "set",
|
|
27873
|
+
command,
|
|
27874
|
+
hasRedirection: redirected
|
|
27875
|
+
});
|
|
27876
|
+
}
|
|
27877
|
+
}).catch(() => {
|
|
27878
|
+
inFlightCommandsRef.current.delete(command);
|
|
27879
|
+
});
|
|
27880
|
+
}
|
|
27881
|
+
}, [streamingState, pendingToolCalls, resolvedRedirections]);
|
|
27882
|
+
const isRedirectionActive = (0, import_react100.useMemo)(() => {
|
|
27883
|
+
const useAsyncPowerShell = shouldUseAsyncPowerShellRedirection();
|
|
27884
|
+
return pendingToolCalls.some((tc) => {
|
|
27885
|
+
if (tc.request.name !== "run_shell_command") return false;
|
|
27886
|
+
if (tc.confirmationDetails?.type === "exec" && typeof tc.confirmationDetails.hasRedirection === "boolean") {
|
|
27887
|
+
return tc.confirmationDetails.hasRedirection;
|
|
27888
|
+
}
|
|
27889
|
+
const command = extractShellCommand(tc);
|
|
27890
|
+
if (!command) {
|
|
27891
|
+
return false;
|
|
27892
|
+
}
|
|
27893
|
+
if (!useAsyncPowerShell) {
|
|
27785
27894
|
return hasRedirection(command);
|
|
27786
|
-
}
|
|
27787
|
-
|
|
27788
|
-
|
|
27789
|
-
|
|
27895
|
+
}
|
|
27896
|
+
if (!/[><]/.test(command)) {
|
|
27897
|
+
return false;
|
|
27898
|
+
}
|
|
27899
|
+
return resolvedRedirections.get(command) ?? false;
|
|
27900
|
+
});
|
|
27901
|
+
}, [pendingToolCalls, resolvedRedirections]);
|
|
27790
27902
|
return {
|
|
27791
27903
|
operationStartTime,
|
|
27792
27904
|
isRedirectionActive
|
|
@@ -27878,7 +27990,8 @@ var useAgentStream = ({
|
|
|
27878
27990
|
isClientInitiated: t.isClientInitiated ?? false,
|
|
27879
27991
|
prompt_id: ""
|
|
27880
27992
|
},
|
|
27881
|
-
status: t.status
|
|
27993
|
+
status: t.status,
|
|
27994
|
+
confirmationDetails: t.confirmationDetails
|
|
27882
27995
|
})),
|
|
27883
27996
|
[trackedTools]
|
|
27884
27997
|
);
|
|
@@ -29854,16 +29967,28 @@ var useGeminiStream = (geminiClient, history, addItem, config, settings, onDebug
|
|
|
29854
29967
|
(call) => call.status === "awaiting_approval" && !call.request.forcedAsk
|
|
29855
29968
|
);
|
|
29856
29969
|
if (newApprovalMode === ApprovalMode.AUTO_EDIT) {
|
|
29857
|
-
|
|
29970
|
+
const filteredCalls = [];
|
|
29971
|
+
for (const call of awaitingApprovalCalls) {
|
|
29858
29972
|
if (EDIT_TOOL_NAMES.has(call.request.name)) {
|
|
29859
|
-
|
|
29973
|
+
filteredCalls.push(call);
|
|
29974
|
+
continue;
|
|
29860
29975
|
}
|
|
29861
29976
|
if (call.request.name === SHELL_TOOL_NAME) {
|
|
29862
|
-
|
|
29863
|
-
|
|
29977
|
+
if (call.confirmationDetails?.type === "exec" && typeof call.confirmationDetails.hasRedirection === "boolean") {
|
|
29978
|
+
if (call.confirmationDetails.hasRedirection) {
|
|
29979
|
+
filteredCalls.push(call);
|
|
29980
|
+
}
|
|
29981
|
+
continue;
|
|
29982
|
+
}
|
|
29983
|
+
const rawCommand = call.request.args["command"];
|
|
29984
|
+
const command = typeof rawCommand === "string" ? rawCommand : void 0;
|
|
29985
|
+
const redirected = command ? typeof isDefaultHasRedirection === "function" && isDefaultHasRedirection(hasRedirection) && typeof hasRedirectionAsync === "function" ? await hasRedirectionAsync(command) : hasRedirection(command) : false;
|
|
29986
|
+
if (redirected) {
|
|
29987
|
+
filteredCalls.push(call);
|
|
29988
|
+
}
|
|
29864
29989
|
}
|
|
29865
|
-
|
|
29866
|
-
|
|
29990
|
+
}
|
|
29991
|
+
awaitingApprovalCalls = filteredCalls;
|
|
29867
29992
|
}
|
|
29868
29993
|
for (const call of awaitingApprovalCalls) {
|
|
29869
29994
|
if (call.correlationId) {
|
|
@@ -35285,7 +35410,7 @@ ${queuedText}` : queuedText;
|
|
|
35285
35410
|
if (keyMatchers["app.showErrorDetails" /* SHOW_ERROR_DETAILS */](key)) {
|
|
35286
35411
|
if (settings.merged.general.devtools) {
|
|
35287
35412
|
void (async () => {
|
|
35288
|
-
const { toggleDevToolsPanel } = await import("./devtoolsService-
|
|
35413
|
+
const { toggleDevToolsPanel } = await import("./devtoolsService-5ICQIIYF.js");
|
|
35289
35414
|
await toggleDevToolsPanel(
|
|
35290
35415
|
config,
|
|
35291
35416
|
showErrorDetails,
|