@google/gemini-cli 0.70.0-preview.0 → 0.71.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-T7277DWX.js → chunk-3XHFESDF.js} +1 -1
- package/bundle/{chunk-65MRMUKB.js → chunk-532N7TZB.js} +2 -2
- package/bundle/{chunk-CJ7YZ55P.js → chunk-5SC43MXU.js} +3 -3
- package/bundle/{chunk-L5UVIFFB.js → chunk-6E6XAAYL.js} +7 -7
- package/bundle/{chunk-BOYVA4SV.js → chunk-7UJSGYFD.js} +1 -1
- package/bundle/{chunk-IS5SQ7HP.js → chunk-7YXHVH7Y.js} +2 -2
- package/bundle/{chunk-O5EBPO5F.js → chunk-AJZTZFAS.js} +2 -2
- package/bundle/{chunk-SXOGAWDG.js → chunk-AQXZKJST.js} +1 -1
- package/bundle/{chunk-I5QSCSQU.js → chunk-BTH7KEMH.js} +842 -368
- package/bundle/{chunk-F6P6PQSG.js → chunk-DCBU7GEJ.js} +1 -1
- package/bundle/{chunk-RVYQZ73V.js → chunk-DPAMHBTE.js} +3 -3
- package/bundle/{chunk-RTIGPATB.js → chunk-EERY2AEY.js} +1 -1
- package/bundle/{chunk-ECLDXLDB.js → chunk-FUOK6VUJ.js} +3 -3
- package/bundle/{chunk-ZUQTNDGH.js → chunk-IBD2PLWE.js} +7 -7
- package/bundle/{chunk-SA2VIQNQ.js → chunk-JJNQ5PWH.js} +842 -368
- package/bundle/{chunk-STY67ND2.js → chunk-KSDBDSBI.js} +1 -1
- package/bundle/{chunk-BCL7DJOQ.js → chunk-LGRO4U3O.js} +7 -7
- package/bundle/{chunk-NFAJ5FW5.js → chunk-NATMLC5X.js} +1 -1
- package/bundle/{chunk-CMUPNBQQ.js → chunk-NMOD2T37.js} +2 -2
- package/bundle/{chunk-6XLLXGZQ.js → chunk-NQGCTXGR.js} +1 -1
- package/bundle/{chunk-FGTABIOQ.js → chunk-QGOT25K4.js} +1 -1
- package/bundle/{chunk-AMGYQYS7.js → chunk-QQNZHLIF.js} +2 -2
- package/bundle/{chunk-NFBC76U4.js → chunk-UTK4LRWO.js} +1 -1
- package/bundle/{chunk-HBTS2REO.js → chunk-VIXTMKUM.js} +1 -1
- package/bundle/{chunk-FDIF7V5C.js → chunk-W7J7YSH2.js} +1 -1
- package/bundle/{chunk-TX3SX2WI.js → chunk-Y6WF3A3Q.js} +2 -2
- package/bundle/{chunk-O2DXIYZO.js → chunk-YQO7IBVQ.js} +751 -320
- package/bundle/{cleanup-44LV7E4R.js → cleanup-4WL7SSTL.js} +2 -2
- package/bundle/{cleanup-O4QBMRVU.js → cleanup-62ECCOLP.js} +2 -2
- package/bundle/{cleanup-WMYSWXJR.js → cleanup-JWSUGSQB.js} +2 -2
- package/bundle/{core-LJXCBOFM.js → core-6V72TKM3.js} +31 -1
- package/bundle/{dist-QSS2VWMY.js → core-NP64K3HR.js} +31 -1
- package/bundle/{devtoolsService-G4CPAW3U.js → devtoolsService-3G6P4EBB.js} +2 -2
- package/bundle/{devtoolsService-D4VCGQMJ.js → devtoolsService-DWVXCWJ7.js} +2 -2
- package/bundle/{devtoolsService-EBOCEFTO.js → devtoolsService-XMEVE7R4.js} +2 -2
- package/bundle/{core-DJ7VMWCC.js → dist-AAGC2327.js} +31 -1
- package/bundle/docs/changelogs/index.md +23 -0
- package/bundle/docs/changelogs/latest.md +112 -98
- package/bundle/docs/changelogs/preview.md +82 -115
- package/bundle/{formatError-I5Q2HGMN.js → formatError-7YP6B7ZW.js} +2 -2
- package/bundle/{formatError-NLKMYJNL.js → formatError-P6NGVTF2.js} +2 -2
- package/bundle/{formatError-3QIVJAE5.js → formatError-QS36O76I.js} +2 -2
- package/bundle/{gemini-J7ZRUAXR.js → gemini-3VVVLE4J.js} +15 -15
- package/bundle/{gemini-LOYZXP6I.js → gemini-AC4RONBV.js} +15 -15
- package/bundle/{gemini-4325ARIU.js → gemini-TY6A5Q5C.js} +15 -15
- package/bundle/gemini.js +8 -8
- package/bundle/{interactiveCli-O2L63RLG.js → interactiveCli-AO75ICTD.js} +157 -32
- package/bundle/{interactiveCli-CEIWZCYF.js → interactiveCli-BHEEEW2H.js} +157 -32
- package/bundle/{interactiveCli-AQ67IY7V.js → interactiveCli-XULKUHW4.js} +157 -32
- package/bundle/{liteRtServerManager-HMCB6A65.js → liteRtServerManager-7VEEHSC6.js} +4 -4
- package/bundle/{liteRtServerManager-MH32CAZ5.js → liteRtServerManager-DRZ6V4ZL.js} +4 -4
- package/bundle/{liteRtServerManager-EZFHT2B3.js → liteRtServerManager-GFU4D3JF.js} +4 -4
- package/bundle/{oauth2-provider-3TFNA7VY.js → oauth2-provider-S7DQJKA5.js} +1 -1
- package/bundle/{oauth2-provider-NPOZQDQO.js → oauth2-provider-XYK3N74K.js} +1 -1
- package/bundle/{oauth2-provider-UXC7XFV6.js → oauth2-provider-YZI5V6PH.js} +1 -1
- package/bundle/{start-JIKLB3S3.js → start-EMZSUYV6.js} +6 -6
- package/bundle/{start-NSYEL7UE.js → start-JGS6ZUFX.js} +6 -6
- package/bundle/{start-I2GOKFKQ.js → start-QQTZCWPJ.js} +6 -6
- 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-5SC43MXU.js";
|
|
6
6
|
import {
|
|
7
7
|
formatCliError
|
|
8
|
-
} from "./chunk-
|
|
8
|
+
} from "./chunk-QGOT25K4.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-LGRO4U3O.js";
|
|
53
53
|
import {
|
|
54
54
|
exitCli,
|
|
55
55
|
require_source
|
|
56
|
-
} from "./chunk-
|
|
56
|
+
} from "./chunk-7UJSGYFD.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-532N7TZB.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-AJZTZFAS.js";
|
|
102
|
+
import "./chunk-EERY2AEY.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-NQGCTXGR.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-JJNQ5PWH.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-preview.0" ?? 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-XMEVE7R4.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-XMEVE7R4.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-AO75ICTD.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-XMEVE7R4.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-GFU4D3JF.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;
|
|
@@ -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-DPAMHBTE.js";
|
|
6
6
|
import {
|
|
7
7
|
formatCliError
|
|
8
|
-
} from "./chunk-
|
|
8
|
+
} from "./chunk-DCBU7GEJ.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-IBD2PLWE.js";
|
|
53
53
|
import {
|
|
54
54
|
exitCli,
|
|
55
55
|
require_source
|
|
56
|
-
} from "./chunk-
|
|
56
|
+
} from "./chunk-VIXTMKUM.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-Y6WF3A3Q.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-NMOD2T37.js";
|
|
102
|
+
import "./chunk-UTK4LRWO.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-3XHFESDF.js";
|
|
112
112
|
import {
|
|
113
113
|
ASK_USER_TOOL_NAME,
|
|
114
114
|
AjvJsonSchemaValidator,
|
|
@@ -306,7 +306,7 @@ import {
|
|
|
306
306
|
updatePolicy,
|
|
307
307
|
writeToStderr,
|
|
308
308
|
writeToStdout
|
|
309
|
-
} from "./chunk-
|
|
309
|
+
} from "./chunk-YQO7IBVQ.js";
|
|
310
310
|
import "./chunk-W2AJR23G.js";
|
|
311
311
|
import "./chunk-N7J54YNL.js";
|
|
312
312
|
import "./chunk-L6PII3GR.js";
|
|
@@ -8472,7 +8472,7 @@ async function loadSandboxConfig(settings, argv) {
|
|
|
8472
8472
|
}
|
|
8473
8473
|
const command2 = getSandboxCommand(sandboxValue);
|
|
8474
8474
|
const packageJson = await getPackageJson(__dirname3);
|
|
8475
|
-
const image = process.env["GEMINI_SANDBOX_IMAGE"] ?? "us-docker.pkg.dev/gemini-code-dev/gemini-cli/sandbox:0.
|
|
8475
|
+
const image = process.env["GEMINI_SANDBOX_IMAGE"] ?? "us-docker.pkg.dev/gemini-code-dev/gemini-cli/sandbox:0.71.0-preview.0" ?? customImage ?? packageJson?.config?.sandboxImageUri;
|
|
8476
8476
|
const isNative = command2 === "windows-native" || command2 === "sandbox-exec" || command2 === "lxc";
|
|
8477
8477
|
return command2 && (image || isNative) ? { enabled: true, allowedPaths, networkAccess, command: command2, image } : void 0;
|
|
8478
8478
|
}
|
|
@@ -13656,7 +13656,7 @@ async function runNonInteractive({
|
|
|
13656
13656
|
}
|
|
13657
13657
|
});
|
|
13658
13658
|
if (process.env["GEMINI_CLI_ACTIVITY_LOG_TARGET"]) {
|
|
13659
|
-
const { setupInitialActivityLogger } = await import("./devtoolsService-
|
|
13659
|
+
const { setupInitialActivityLogger } = await import("./devtoolsService-DWVXCWJ7.js");
|
|
13660
13660
|
setupInitialActivityLogger(config);
|
|
13661
13661
|
}
|
|
13662
13662
|
const { stdout: workingStdout } = createWorkingStdio();
|
|
@@ -14197,7 +14197,7 @@ async function runNonInteractive2(params) {
|
|
|
14197
14197
|
}
|
|
14198
14198
|
});
|
|
14199
14199
|
if (process.env["GEMINI_CLI_ACTIVITY_LOG_TARGET"]) {
|
|
14200
|
-
const { setupInitialActivityLogger } = await import("./devtoolsService-
|
|
14200
|
+
const { setupInitialActivityLogger } = await import("./devtoolsService-DWVXCWJ7.js");
|
|
14201
14201
|
setupInitialActivityLogger(config);
|
|
14202
14202
|
}
|
|
14203
14203
|
const { stdout: workingStdout } = createWorkingStdio();
|
|
@@ -19478,7 +19478,7 @@ async function resolveSessionId(resumeArg, sessionIdArg, sessionFileArg) {
|
|
|
19478
19478
|
}
|
|
19479
19479
|
}
|
|
19480
19480
|
async function startInteractiveUI(config, settings, startupWarnings, workspaceRoot = process.cwd(), resumedSessionData, initializationResult) {
|
|
19481
|
-
const { startInteractiveUI: doStartUI } = await import("./interactiveCli-
|
|
19481
|
+
const { startInteractiveUI: doStartUI } = await import("./interactiveCli-XULKUHW4.js");
|
|
19482
19482
|
await doStartUI(
|
|
19483
19483
|
config,
|
|
19484
19484
|
settings,
|
|
@@ -19713,7 +19713,7 @@ ${finalArgs[promptIndex + 1]}`;
|
|
|
19713
19713
|
await config.storage.initialize();
|
|
19714
19714
|
adminControlsListner.setConfig(config);
|
|
19715
19715
|
if (config.isInteractive() && settings.merged.general.devtools) {
|
|
19716
|
-
const { setupInitialActivityLogger } = await import("./devtoolsService-
|
|
19716
|
+
const { setupInitialActivityLogger } = await import("./devtoolsService-DWVXCWJ7.js");
|
|
19717
19717
|
setupInitialActivityLogger(config);
|
|
19718
19718
|
}
|
|
19719
19719
|
registerTelemetryConfig(config);
|
|
@@ -19772,7 +19772,7 @@ ${finalArgs[promptIndex + 1]}`;
|
|
|
19772
19772
|
const initAppHandle = startupProfiler.start("initialize_app");
|
|
19773
19773
|
const initializationResult = await initializeApp(config, settings);
|
|
19774
19774
|
initAppHandle?.end();
|
|
19775
|
-
import("./liteRtServerManager-
|
|
19775
|
+
import("./liteRtServerManager-DRZ6V4ZL.js").then(({ LiteRtServerManager }) => {
|
|
19776
19776
|
const mergedGemma = settings.merged.experimental?.gemmaModelRouter;
|
|
19777
19777
|
if (!mergedGemma) return;
|
|
19778
19778
|
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-NMOD2T37.js";
|
|
11
|
+
import "./chunk-UTK4LRWO.js";
|
|
12
|
+
import "./chunk-3XHFESDF.js";
|
|
13
|
+
import "./chunk-YQO7IBVQ.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-TY6A5Q5C.js");
|
|
128
|
+
const { FatalError, writeToStderr } = await import("./dist-AAGC2327.js");
|
|
129
|
+
const { runExitCleanup } = await import("./cleanup-62ECCOLP.js");
|
|
130
|
+
const { formatCliError, isCliDebugEnabled } = await import("./formatError-7YP6B7ZW.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-LGRO4U3O.js";
|
|
153
153
|
import {
|
|
154
154
|
require_source
|
|
155
|
-
} from "./chunk-
|
|
155
|
+
} from "./chunk-7UJSGYFD.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-532N7TZB.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-AJZTZFAS.js";
|
|
237
237
|
import {
|
|
238
238
|
isTodoList,
|
|
239
239
|
mapCoreStatusToDisplayStatus,
|
|
240
240
|
require_react
|
|
241
|
-
} from "./chunk-
|
|
241
|
+
} from "./chunk-EERY2AEY.js";
|
|
242
242
|
import {
|
|
243
243
|
registerCleanup,
|
|
244
244
|
removeCleanup,
|
|
245
245
|
runExitCleanup,
|
|
246
246
|
setupTtyCheck
|
|
247
|
-
} from "./chunk-
|
|
247
|
+
} from "./chunk-NQGCTXGR.js";
|
|
248
248
|
import {
|
|
249
249
|
ACTIVATE_SKILL_TOOL_NAME,
|
|
250
250
|
AGENT_TOOL_NAME,
|
|
@@ -368,8 +368,10 @@ import {
|
|
|
368
368
|
getPackageJson,
|
|
369
369
|
getPlanModeExitMessage,
|
|
370
370
|
getResponseText,
|
|
371
|
+
getShellConfiguration,
|
|
371
372
|
getVersion,
|
|
372
373
|
hasRedirection,
|
|
374
|
+
hasRedirectionAsync,
|
|
373
375
|
hasSummary,
|
|
374
376
|
hasValidEditorCommand,
|
|
375
377
|
homedir,
|
|
@@ -381,11 +383,15 @@ import {
|
|
|
381
383
|
isBackgroundExecutionData,
|
|
382
384
|
isBinary,
|
|
383
385
|
isBinaryAvailable,
|
|
386
|
+
isDefaultHasRedirection,
|
|
387
|
+
isDefaultIsInteractiveGeminiCommand,
|
|
384
388
|
isEditorAvailable,
|
|
385
389
|
isFileDiff,
|
|
386
390
|
isGrepResult,
|
|
387
391
|
isHeadlessMode,
|
|
388
392
|
isInteractiveGeminiCommand,
|
|
393
|
+
isInteractiveGeminiCommandAsync,
|
|
394
|
+
isKnownInteractiveGeminiCommandSync,
|
|
389
395
|
isListResult,
|
|
390
396
|
isNodeError,
|
|
391
397
|
isOverageEligibleModel,
|
|
@@ -441,7 +447,7 @@ import {
|
|
|
441
447
|
validatePlanContent,
|
|
442
448
|
validatePlanPath,
|
|
443
449
|
writeToStdout
|
|
444
|
-
} from "./chunk-
|
|
450
|
+
} from "./chunk-JJNQ5PWH.js";
|
|
445
451
|
import "./chunk-W2AJR23G.js";
|
|
446
452
|
import "./chunk-N7J54YNL.js";
|
|
447
453
|
import "./chunk-L6PII3GR.js";
|
|
@@ -12622,9 +12628,7 @@ ${deceptiveUrlWarnings.map(
|
|
|
12622
12628
|
} else if (confirmationDetails.type === "exec") {
|
|
12623
12629
|
const executionProps = confirmationDetails;
|
|
12624
12630
|
const commandsToDisplay = executionProps.commands && executionProps.commands.length > 0 ? executionProps.commands : [executionProps.command];
|
|
12625
|
-
const containsRedirection = commandsToDisplay.some(
|
|
12626
|
-
(cmd) => hasRedirection(cmd)
|
|
12627
|
-
);
|
|
12631
|
+
const containsRedirection = typeof executionProps.hasRedirection === "boolean" ? executionProps.hasRedirection : commandsToDisplay.some((cmd) => hasRedirection(cmd));
|
|
12628
12632
|
const isAutoEdit = config.getApprovalMode() === "yolo" /* YOLO */ || config.getApprovalMode() === "autoEdit" /* AUTO_EDIT */;
|
|
12629
12633
|
if (containsRedirection && !isAutoEdit) {
|
|
12630
12634
|
extraInfoLines = 1;
|
|
@@ -12851,9 +12855,7 @@ Ensure you trust all modifications made to build files before approving executio
|
|
|
12851
12855
|
const executionProps = confirmationDetails;
|
|
12852
12856
|
const isShell = isShellTool(toolName);
|
|
12853
12857
|
const commandsToDisplay = executionProps.commands && executionProps.commands.length > 1 ? executionProps.commands : [executionProps.command];
|
|
12854
|
-
const containsRedirection = commandsToDisplay.some(
|
|
12855
|
-
(cmd) => hasRedirection(cmd)
|
|
12856
|
-
);
|
|
12858
|
+
const containsRedirection = typeof executionProps.hasRedirection === "boolean" ? executionProps.hasRedirection : commandsToDisplay.some((cmd) => hasRedirection(cmd));
|
|
12857
12859
|
const isAutoEdit = config.getApprovalMode() === "yolo" /* YOLO */ || config.getApprovalMode() === "autoEdit" /* AUTO_EDIT */;
|
|
12858
12860
|
let warnings = null;
|
|
12859
12861
|
if (containsRedirection && !isAutoEdit) {
|
|
@@ -25022,7 +25024,9 @@ var useExecutionLifecycle = (addItemToHistory, setPendingHistoryItem, onExec, on
|
|
|
25022
25024
|
{ type: "user_shell", text: rawQuery },
|
|
25023
25025
|
userMessageTimestamp
|
|
25024
25026
|
);
|
|
25025
|
-
|
|
25027
|
+
const useAsyncPowerShellGeminiCheck = typeof isDefaultIsInteractiveGeminiCommand === "function" && isDefaultIsInteractiveGeminiCommand(isInteractiveGeminiCommand) && typeof isInteractiveGeminiCommandAsync === "function" && typeof isKnownInteractiveGeminiCommandSync === "function" && typeof getShellConfiguration === "function" && getShellConfiguration().shell === "powershell";
|
|
25028
|
+
const syncInteractiveGeminiCheck = useAsyncPowerShellGeminiCheck ? isKnownInteractiveGeminiCommandSync(rawQuery) : isInteractiveGeminiCommand(rawQuery);
|
|
25029
|
+
if (syncInteractiveGeminiCheck === true) {
|
|
25026
25030
|
addItemToHistory(
|
|
25027
25031
|
{ type: "error", text: INTERACTIVE_GEMINI_SHELL_ERROR },
|
|
25028
25032
|
userMessageTimestamp
|
|
@@ -25034,6 +25038,22 @@ var useExecutionLifecycle = (addItemToHistory, setPendingHistoryItem, onExec, on
|
|
|
25034
25038
|
let commandToExecute = rawQuery;
|
|
25035
25039
|
let pwdFilePath;
|
|
25036
25040
|
const executeCommand = async () => {
|
|
25041
|
+
if (syncInteractiveGeminiCheck === void 0 && await isInteractiveGeminiCommandAsync(
|
|
25042
|
+
rawQuery,
|
|
25043
|
+
void 0,
|
|
25044
|
+
abortSignal
|
|
25045
|
+
)) {
|
|
25046
|
+
addItemToHistory(
|
|
25047
|
+
{ type: "error", text: INTERACTIVE_GEMINI_SHELL_ERROR },
|
|
25048
|
+
userMessageTimestamp
|
|
25049
|
+
);
|
|
25050
|
+
return;
|
|
25051
|
+
}
|
|
25052
|
+
if (abortSignal.aborted) {
|
|
25053
|
+
setPendingHistoryItem(null);
|
|
25054
|
+
setShellInputFocused(false);
|
|
25055
|
+
return;
|
|
25056
|
+
}
|
|
25037
25057
|
let cumulativeStdout = "";
|
|
25038
25058
|
let isBinaryStream = false;
|
|
25039
25059
|
let binaryBytesReceived = 0;
|
|
@@ -27741,8 +27761,48 @@ var import_react101 = __toESM(require_react(), 1);
|
|
|
27741
27761
|
|
|
27742
27762
|
// packages/cli/src/ui/hooks/useTurnActivityMonitor.ts
|
|
27743
27763
|
var import_react100 = __toESM(require_react(), 1);
|
|
27764
|
+
var EMPTY_REDIRECTION_MAP = /* @__PURE__ */ new Map();
|
|
27765
|
+
function redirectionCacheReducer(state, action) {
|
|
27766
|
+
switch (action.type) {
|
|
27767
|
+
case "set": {
|
|
27768
|
+
if (state.get(action.command) === action.hasRedirection) {
|
|
27769
|
+
return state;
|
|
27770
|
+
}
|
|
27771
|
+
const next = new Map(state);
|
|
27772
|
+
next.set(action.command, action.hasRedirection);
|
|
27773
|
+
return next;
|
|
27774
|
+
}
|
|
27775
|
+
case "reset":
|
|
27776
|
+
return state.size === 0 ? state : EMPTY_REDIRECTION_MAP;
|
|
27777
|
+
default:
|
|
27778
|
+
return state;
|
|
27779
|
+
}
|
|
27780
|
+
}
|
|
27781
|
+
function shouldUseAsyncPowerShellRedirection() {
|
|
27782
|
+
return typeof isDefaultHasRedirection === "function" && isDefaultHasRedirection(hasRedirection) && typeof hasRedirectionAsync === "function" && typeof getShellConfiguration === "function" && getShellConfiguration().shell === "powershell";
|
|
27783
|
+
}
|
|
27784
|
+
function extractShellCommand(tc) {
|
|
27785
|
+
const rawCommand = tc.request.args?.["command"];
|
|
27786
|
+
return typeof rawCommand === "string" ? rawCommand : "";
|
|
27787
|
+
}
|
|
27744
27788
|
var useTurnActivityMonitor = (streamingState, activePtyId, pendingToolCalls = []) => {
|
|
27745
27789
|
const [operationStartTime, setOperationStartTime] = (0, import_react100.useState)(0);
|
|
27790
|
+
const [resolvedRedirections, dispatchRedirection] = (0, import_react100.useReducer)(
|
|
27791
|
+
redirectionCacheReducer,
|
|
27792
|
+
EMPTY_REDIRECTION_MAP
|
|
27793
|
+
);
|
|
27794
|
+
const inFlightCommandsRef = (0, import_react100.useRef)(/* @__PURE__ */ new Set());
|
|
27795
|
+
const turnEpochRef = (0, import_react100.useRef)(0);
|
|
27796
|
+
const turnAbortControllerRef = (0, import_react100.useRef)(null);
|
|
27797
|
+
const isMountedRef = (0, import_react100.useRef)(true);
|
|
27798
|
+
(0, import_react100.useEffect)(() => {
|
|
27799
|
+
isMountedRef.current = true;
|
|
27800
|
+
return () => {
|
|
27801
|
+
isMountedRef.current = false;
|
|
27802
|
+
turnAbortControllerRef.current?.abort();
|
|
27803
|
+
turnAbortControllerRef.current = null;
|
|
27804
|
+
};
|
|
27805
|
+
}, []);
|
|
27746
27806
|
const prevPtyIdRef = (0, import_react100.useRef)(void 0);
|
|
27747
27807
|
const prevStreamingStateRef = (0, import_react100.useRef)(void 0);
|
|
27748
27808
|
(0, import_react100.useEffect)(() => {
|
|
@@ -27757,17 +27817,69 @@ var useTurnActivityMonitor = (streamingState, activePtyId, pendingToolCalls = []
|
|
|
27757
27817
|
prevPtyIdRef.current = activePtyId;
|
|
27758
27818
|
prevStreamingStateRef.current = streamingState;
|
|
27759
27819
|
}, [streamingState, activePtyId]);
|
|
27760
|
-
|
|
27761
|
-
()
|
|
27762
|
-
|
|
27763
|
-
|
|
27764
|
-
|
|
27765
|
-
|
|
27820
|
+
(0, import_react100.useEffect)(() => {
|
|
27821
|
+
if (streamingState === "idle" /* Idle */ && pendingToolCalls.length === 0) {
|
|
27822
|
+
turnEpochRef.current += 1;
|
|
27823
|
+
turnAbortControllerRef.current?.abort();
|
|
27824
|
+
turnAbortControllerRef.current = null;
|
|
27825
|
+
inFlightCommandsRef.current.clear();
|
|
27826
|
+
dispatchRedirection({ type: "reset" });
|
|
27827
|
+
return;
|
|
27828
|
+
}
|
|
27829
|
+
if (!shouldUseAsyncPowerShellRedirection()) {
|
|
27830
|
+
return;
|
|
27831
|
+
}
|
|
27832
|
+
if (!turnAbortControllerRef.current || turnAbortControllerRef.current.signal.aborted) {
|
|
27833
|
+
turnAbortControllerRef.current = new AbortController();
|
|
27834
|
+
}
|
|
27835
|
+
const turnSignal = turnAbortControllerRef.current.signal;
|
|
27836
|
+
const epoch = turnEpochRef.current;
|
|
27837
|
+
for (const tc of pendingToolCalls) {
|
|
27838
|
+
if (tc.request.name !== "run_shell_command") {
|
|
27839
|
+
continue;
|
|
27840
|
+
}
|
|
27841
|
+
if (tc.confirmationDetails?.type === "exec" && typeof tc.confirmationDetails.hasRedirection === "boolean") {
|
|
27842
|
+
continue;
|
|
27843
|
+
}
|
|
27844
|
+
const command = extractShellCommand(tc);
|
|
27845
|
+
if (!command || !/[><]/.test(command) || resolvedRedirections.has(command) || inFlightCommandsRef.current.has(command)) {
|
|
27846
|
+
continue;
|
|
27847
|
+
}
|
|
27848
|
+
inFlightCommandsRef.current.add(command);
|
|
27849
|
+
void hasRedirectionAsync(command, void 0, turnSignal).then((redirected) => {
|
|
27850
|
+
inFlightCommandsRef.current.delete(command);
|
|
27851
|
+
if (isMountedRef.current && turnEpochRef.current === epoch && !turnSignal.aborted) {
|
|
27852
|
+
dispatchRedirection({
|
|
27853
|
+
type: "set",
|
|
27854
|
+
command,
|
|
27855
|
+
hasRedirection: redirected
|
|
27856
|
+
});
|
|
27857
|
+
}
|
|
27858
|
+
}).catch(() => {
|
|
27859
|
+
inFlightCommandsRef.current.delete(command);
|
|
27860
|
+
});
|
|
27861
|
+
}
|
|
27862
|
+
}, [streamingState, pendingToolCalls, resolvedRedirections]);
|
|
27863
|
+
const isRedirectionActive = (0, import_react100.useMemo)(() => {
|
|
27864
|
+
const useAsyncPowerShell = shouldUseAsyncPowerShellRedirection();
|
|
27865
|
+
return pendingToolCalls.some((tc) => {
|
|
27866
|
+
if (tc.request.name !== "run_shell_command") return false;
|
|
27867
|
+
if (tc.confirmationDetails?.type === "exec" && typeof tc.confirmationDetails.hasRedirection === "boolean") {
|
|
27868
|
+
return tc.confirmationDetails.hasRedirection;
|
|
27869
|
+
}
|
|
27870
|
+
const command = extractShellCommand(tc);
|
|
27871
|
+
if (!command) {
|
|
27872
|
+
return false;
|
|
27873
|
+
}
|
|
27874
|
+
if (!useAsyncPowerShell) {
|
|
27766
27875
|
return hasRedirection(command);
|
|
27767
|
-
}
|
|
27768
|
-
|
|
27769
|
-
|
|
27770
|
-
|
|
27876
|
+
}
|
|
27877
|
+
if (!/[><]/.test(command)) {
|
|
27878
|
+
return false;
|
|
27879
|
+
}
|
|
27880
|
+
return resolvedRedirections.get(command) ?? false;
|
|
27881
|
+
});
|
|
27882
|
+
}, [pendingToolCalls, resolvedRedirections]);
|
|
27771
27883
|
return {
|
|
27772
27884
|
operationStartTime,
|
|
27773
27885
|
isRedirectionActive
|
|
@@ -27859,7 +27971,8 @@ var useAgentStream = ({
|
|
|
27859
27971
|
isClientInitiated: t.isClientInitiated ?? false,
|
|
27860
27972
|
prompt_id: ""
|
|
27861
27973
|
},
|
|
27862
|
-
status: t.status
|
|
27974
|
+
status: t.status,
|
|
27975
|
+
confirmationDetails: t.confirmationDetails
|
|
27863
27976
|
})),
|
|
27864
27977
|
[trackedTools]
|
|
27865
27978
|
);
|
|
@@ -29835,16 +29948,28 @@ var useGeminiStream = (geminiClient, history, addItem, config, settings, onDebug
|
|
|
29835
29948
|
(call) => call.status === "awaiting_approval" && !call.request.forcedAsk
|
|
29836
29949
|
);
|
|
29837
29950
|
if (newApprovalMode === "autoEdit" /* AUTO_EDIT */) {
|
|
29838
|
-
|
|
29951
|
+
const filteredCalls = [];
|
|
29952
|
+
for (const call of awaitingApprovalCalls) {
|
|
29839
29953
|
if (EDIT_TOOL_NAMES.has(call.request.name)) {
|
|
29840
|
-
|
|
29954
|
+
filteredCalls.push(call);
|
|
29955
|
+
continue;
|
|
29841
29956
|
}
|
|
29842
29957
|
if (call.request.name === SHELL_TOOL_NAME) {
|
|
29843
|
-
|
|
29844
|
-
|
|
29958
|
+
if (call.confirmationDetails?.type === "exec" && typeof call.confirmationDetails.hasRedirection === "boolean") {
|
|
29959
|
+
if (call.confirmationDetails.hasRedirection) {
|
|
29960
|
+
filteredCalls.push(call);
|
|
29961
|
+
}
|
|
29962
|
+
continue;
|
|
29963
|
+
}
|
|
29964
|
+
const rawCommand = call.request.args["command"];
|
|
29965
|
+
const command = typeof rawCommand === "string" ? rawCommand : void 0;
|
|
29966
|
+
const redirected = command ? typeof isDefaultHasRedirection === "function" && isDefaultHasRedirection(hasRedirection) && typeof hasRedirectionAsync === "function" ? await hasRedirectionAsync(command) : hasRedirection(command) : false;
|
|
29967
|
+
if (redirected) {
|
|
29968
|
+
filteredCalls.push(call);
|
|
29969
|
+
}
|
|
29845
29970
|
}
|
|
29846
|
-
|
|
29847
|
-
|
|
29971
|
+
}
|
|
29972
|
+
awaitingApprovalCalls = filteredCalls;
|
|
29848
29973
|
}
|
|
29849
29974
|
for (const call of awaitingApprovalCalls) {
|
|
29850
29975
|
if (call.correlationId) {
|
|
@@ -35266,7 +35391,7 @@ ${queuedText}` : queuedText;
|
|
|
35266
35391
|
if (keyMatchers["app.showErrorDetails" /* SHOW_ERROR_DETAILS */](key)) {
|
|
35267
35392
|
if (settings.merged.general.devtools) {
|
|
35268
35393
|
void (async () => {
|
|
35269
|
-
const { toggleDevToolsPanel } = await import("./devtoolsService-
|
|
35394
|
+
const { toggleDevToolsPanel } = await import("./devtoolsService-XMEVE7R4.js");
|
|
35270
35395
|
await toggleDevToolsPanel(
|
|
35271
35396
|
config,
|
|
35272
35397
|
showErrorDetails,
|