@google/gemini-cli 0.63.0-preview.0 → 0.64.0-nightly.20261001.gc6bccb7ec
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-EIMVJG2V.js → chunk-2AWGKUBT.js} +1 -1
- package/bundle/{chunk-GRSO6OI3.js → chunk-33M6KTJD.js} +11 -9
- package/bundle/{chunk-2J6RC447.js → chunk-3V7PFNJW.js} +3 -3
- package/bundle/{chunk-NWSCUKK3.js → chunk-5Q2IR4AT.js} +1512 -1317
- package/bundle/{chunk-RXHIISMM.js → chunk-5S3XVXG6.js} +1 -1
- package/bundle/{chunk-R6Q6D3UA.js → chunk-A7EL6FWX.js} +1 -1
- package/bundle/{chunk-UEOEM4H5.js → chunk-AMALQQ3Z.js} +3 -3
- package/bundle/{chunk-EWEUWTBB.js → chunk-CBYMGCHX.js} +75 -60
- package/bundle/{chunk-2NCBQURB.js → chunk-CFKLEVXK.js} +1 -1
- package/bundle/{chunk-RC6VJ6FT.js → chunk-DGM2IXGQ.js} +1 -1
- package/bundle/{chunk-NTWFJ2RF.js → chunk-EUQCH4QF.js} +2 -2
- package/bundle/{chunk-KCB54UJ5.js → chunk-FLYR6TVJ.js} +9279 -16064
- package/bundle/{chunk-H4WLRV6U.js → chunk-FQCPUDNE.js} +2 -2
- package/bundle/{chunk-BVDTRESW.js → chunk-FSELSFI5.js} +1 -1
- package/bundle/{chunk-5VYF5TVF.js → chunk-G4FAHQEH.js} +2 -2
- package/bundle/{chunk-Z5RCAIV5.js → chunk-I5GYMICM.js} +7 -5
- package/bundle/{chunk-JEUVKR2X.js → chunk-IGVQSZBB.js} +3 -3
- package/bundle/{chunk-HBZBBLAV.js → chunk-JMQIN5UZ.js} +1521 -1323
- package/bundle/{chunk-KPPDDNGJ.js → chunk-JW5YA5WN.js} +9 -8
- package/bundle/chunk-KTIX6VY2.js +17446 -0
- package/bundle/{chunk-SNGNFODQ.js → chunk-KUSXLIPR.js} +1 -1
- package/bundle/{chunk-ZDQYLJYN.js → chunk-KVZWFEJY.js} +1 -1
- package/bundle/{chunk-2P4ETAEG.js → chunk-LTM347XQ.js} +1 -1
- package/bundle/chunk-LXT3NLFW.js +118 -0
- package/bundle/chunk-PAWJR2VY.js +1571 -0
- package/bundle/chunk-RVS5CHWO.js +425 -0
- package/bundle/{chunk-B2C7BQ4Z.js → chunk-RW6IRAFG.js} +11 -9
- package/bundle/{chunk-CTL6DZSY.js → chunk-U4667HKR.js} +1 -1
- package/bundle/chunk-WTO5SKFR.js +400730 -0
- package/bundle/chunk-WXSWGEUJ.js +512 -0
- package/bundle/chunk-XKSEOGBW.js +154 -0
- package/bundle/chunk-ZG5IQP2R.js +102953 -0
- package/bundle/{cleanup-EX2L3L3E.js → cleanup-I7CTORMX.js} +2 -2
- package/bundle/{cleanup-IT7XR7KS.js → cleanup-MOFJ6BES.js} +2 -2
- package/bundle/{cleanup-WWLYKZIX.js → cleanup-OAR3IBTA.js} +2 -2
- package/bundle/cleanup-WFLHSVPH.js +32 -0
- package/bundle/{core-GAJB2LOX.js → core-VXMTLS6K.js} +1 -1
- package/bundle/{devtoolsService-TJPENQSW.js → devtoolsService-4QAJJ6WJ.js} +2 -2
- package/bundle/{devtoolsService-S4ZTRGJL.js → devtoolsService-54XKSYYW.js} +4 -3
- package/bundle/{devtoolsService-4YTFHHPN.js → devtoolsService-L6BPP3IA.js} +2 -2
- package/bundle/devtoolsService-LSDQLZ62.js +4359 -0
- package/bundle/{dist-MTMOCTIW.js → dist-BNMP57Q5.js} +1 -1
- package/bundle/{core-D5D4MF5H.js → dist-FJ7DKGAM.js} +1 -1
- package/bundle/dist-U5DFAJ4Y.js +2250 -0
- package/bundle/docs/changelogs/preview.md +54 -65
- package/bundle/{gemini-5T5BS7L7.js → gemini-L553JD26.js} +66 -95
- package/bundle/{gemini-FHORRYHM.js → gemini-LN35PXGR.js} +66 -95
- package/bundle/gemini-VZOPAMKQ.js +17834 -0
- package/bundle/{gemini-UQRS6TBE.js → gemini-W63I3AHM.js} +266 -279
- package/bundle/gemini.js +7 -7
- package/bundle/{interactiveCli-WOM6QZHM.js → interactiveCli-2JCDVYVC.js} +26 -23
- package/bundle/{interactiveCli-I5K7O5Z6.js → interactiveCli-KN6ETEWY.js} +26 -23
- package/bundle/{interactiveCli-5YNYZTMK.js → interactiveCli-N7HBJ434.js} +329 -307
- package/bundle/interactiveCli-TX7INBPE.js +34918 -0
- package/bundle/{liteRtServerManager-EH2L2UVH.js → liteRtServerManager-GIDPQRR4.js} +4 -4
- package/bundle/{liteRtServerManager-ZLIHBLZP.js → liteRtServerManager-NK3OA5CI.js} +4 -4
- package/bundle/{liteRtServerManager-3N5KI6YS.js → liteRtServerManager-NSDSBW7B.js} +4 -4
- package/bundle/liteRtServerManager-PKOODTU4.js +65 -0
- package/bundle/{oauth2-provider-TA2KRXWQ.js → oauth2-provider-DE3RVHTQ.js} +1 -1
- package/bundle/{oauth2-provider-5GFYTXFU.js → oauth2-provider-FDRYB63N.js} +38 -72
- package/bundle/{oauth2-provider-NGSH2JQK.js → oauth2-provider-KMACQ2PX.js} +1 -1
- package/bundle/oauth2-provider-UAZAD3AF.js +235 -0
- package/bundle/{start-M3IUNCYH.js → start-5X2H6QGN.js} +6 -6
- package/bundle/{start-MWDNIQUY.js → start-AMYT67DW.js} +6 -6
- package/bundle/{start-CWI6OP6N.js → start-QYGGE4KC.js} +6 -6
- package/bundle/start-WWUBZPNX.js +18 -0
- package/package.json +1 -1
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
# Preview release: v0.
|
|
1
|
+
# Preview release: v0.63.0-preview.0
|
|
2
2
|
|
|
3
|
-
Released: September
|
|
3
|
+
Released: September 29, 2026
|
|
4
4
|
|
|
5
5
|
Our preview release includes the latest, new, and experimental features. This
|
|
6
6
|
release may not be as stable as our [latest weekly release](latest.md).
|
|
@@ -13,73 +13,62 @@ npm install -g @google/gemini-cli@preview
|
|
|
13
13
|
|
|
14
14
|
## Highlights
|
|
15
15
|
|
|
16
|
-
- **
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
and
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
16
|
+
- **Autonomous Plan Execution**: Enabled autonomous plan execution in
|
|
17
|
+
non-interactive mode, allowing automated agent workflows to run multi-step
|
|
18
|
+
plans without requiring interactive user confirmation.
|
|
19
|
+
- **Memory Lifecycle & Output Bounding**: Bounded tool output sizes and
|
|
20
|
+
optimized the memory lifecycle in long-running agent loops to prevent memory
|
|
21
|
+
leaks, while ensuring full output formatting when truncation is disabled.
|
|
22
|
+
- **Authentication Resilience**: Prevented infinite authentication loops caused
|
|
23
|
+
by file contention, headless keyring environments, and supervisor state drops,
|
|
24
|
+
ensuring reliable credential handling across environments.
|
|
25
|
+
- **CLI & Connection Recovery UX**: Displayed a retry progress indicator during
|
|
26
|
+
connection recovery, restored paused stdin after capability detection, and
|
|
27
|
+
ensured automatic temporary directory cleanup upon background shell execution
|
|
28
|
+
exit.
|
|
27
29
|
|
|
28
30
|
## What's Changed
|
|
29
31
|
|
|
30
|
-
- fix(
|
|
31
|
-
|
|
32
|
-
[#
|
|
33
|
-
- Changelog for v0.61.0-preview.
|
|
34
|
-
[#
|
|
35
|
-
- Changelog for v0.
|
|
36
|
-
[#
|
|
37
|
-
- fix(
|
|
38
|
-
|
|
39
|
-
[#
|
|
40
|
-
-
|
|
32
|
+
- fix(cli): display retry progress indicator during connection recovery (#28340)
|
|
33
|
+
by @amelidev in
|
|
34
|
+
[#29468](https://github.com/google-gemini/gemini-cli/pull/29468)
|
|
35
|
+
- Changelog for v0.61.0-preview.1 by @gemini-cli-robot in
|
|
36
|
+
[#29469](https://github.com/google-gemini/gemini-cli/pull/29469)
|
|
37
|
+
- Changelog for v0.61.0 by @gemini-cli-robot in
|
|
38
|
+
[#29472](https://github.com/google-gemini/gemini-cli/pull/29472)
|
|
39
|
+
- fix(cli): distinguish missing MCP enablement config from malformed JSON by
|
|
40
|
+
@jesussamuel-byte in
|
|
41
|
+
[#29446](https://github.com/google-gemini/gemini-cli/pull/29446)
|
|
42
|
+
- fix(cli): restore paused stdin after capability detection by @ugorla-dev in
|
|
43
|
+
[#29487](https://github.com/google-gemini/gemini-cli/pull/29487)
|
|
44
|
+
- fix(core): bound tool output size and optimize memory lifecycle in
|
|
45
|
+
long-running agent loops by @diegogodinezr in
|
|
46
|
+
[#29451](https://github.com/google-gemini/gemini-cli/pull/29451)
|
|
47
|
+
- fix(core): remove invalid diff.external override by @urielefrenvirtusa in
|
|
48
|
+
[#29467](https://github.com/google-gemini/gemini-cli/pull/29467)
|
|
49
|
+
- chore(release): bump version to 0.63.0-nightly.20260923.gf50ba8608 by
|
|
41
50
|
@gemini-cli-robot in
|
|
42
|
-
[#
|
|
43
|
-
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
- fix(core): synchronize ConPTY process exit lifecycle and harden PTY output
|
|
59
|
-
finalization by @jvargassanchez-dot in
|
|
60
|
-
[#29379](https://github.com/google-gemini/gemini-cli/pull/29379)
|
|
61
|
-
- fix(cli): suppress uncaught AbortError logs during request cancellation by
|
|
62
|
-
@urielefrenvirtusa in
|
|
63
|
-
[#29343](https://github.com/google-gemini/gemini-cli/pull/29343)
|
|
64
|
-
- fix(core,cli): improve terminal buffer memory management and format Windows
|
|
65
|
-
diagnostic paths by @jesussamuel-byte in
|
|
66
|
-
[#29380](https://github.com/google-gemini/gemini-cli/pull/29380)
|
|
67
|
-
- fix(vscode-ide-companion): preserve terminal focus when closing diff tabs by
|
|
68
|
-
@amelidev in [#29378](https://github.com/google-gemini/gemini-cli/pull/29378)
|
|
69
|
-
- fix(core): update auth error documentation link to valid anchor and add
|
|
70
|
-
fallback (#26140) by @villahernandez-coder in
|
|
71
|
-
[#29377](https://github.com/google-gemini/gemini-cli/pull/29377)
|
|
72
|
-
- fix(core): normalize proxy-agent esbuild interop for environment proxy
|
|
73
|
-
resolution by @diegogodinezr in
|
|
74
|
-
[#29401](https://github.com/google-gemini/gemini-cli/pull/29401)
|
|
75
|
-
- fix(cli): emit tool_call update prior to request_permission in ACP mode by
|
|
51
|
+
[#29471](https://github.com/google-gemini/gemini-cli/pull/29471)
|
|
52
|
+
- Changelog for v0.62.0-preview.0 by @gemini-cli-robot in
|
|
53
|
+
[#29470](https://github.com/google-gemini/gemini-cli/pull/29470)
|
|
54
|
+
- fix(core): clean up temporary directory when background shell execution exits
|
|
55
|
+
by @jesussamuel-byte in
|
|
56
|
+
[#29437](https://github.com/google-gemini/gemini-cli/pull/29437)
|
|
57
|
+
- fix(acp): resolve session before config initialization and avoid same-minute
|
|
58
|
+
filename collisions by @jesussamuel-byte in
|
|
59
|
+
[#29463](https://github.com/google-gemini/gemini-cli/pull/29463)
|
|
60
|
+
- fix(core): align policy redirection gates, path validation, and workflow
|
|
61
|
+
parsing by @DavidAPierce in
|
|
62
|
+
[#29506](https://github.com/google-gemini/gemini-cli/pull/29506)
|
|
63
|
+
- fix(auth): prevent infinite auth loop from file contention, headless keyring,
|
|
64
|
+
and supervisor state drops (#28341) by @villahernandez-coder in
|
|
65
|
+
[#29448](https://github.com/google-gemini/gemini-cli/pull/29448)
|
|
66
|
+
- fix(core): enable autonomous plan execution in non-interactive mode by
|
|
76
67
|
@urielefrenvirtusa in
|
|
77
|
-
[#
|
|
78
|
-
-
|
|
79
|
-
|
|
80
|
-
-
|
|
81
|
-
@DavidAPierce in
|
|
82
|
-
[#29462](https://github.com/google-gemini/gemini-cli/pull/29462)
|
|
68
|
+
[#29539](https://github.com/google-gemini/gemini-cli/pull/29539)
|
|
69
|
+
- fix(core): disable truncation when maxChars <= 0 in formatTruncatedToolOutput
|
|
70
|
+
by @diegogodinezr in
|
|
71
|
+
[#29542](https://github.com/google-gemini/gemini-cli/pull/29542)
|
|
83
72
|
|
|
84
73
|
**Full Changelog**:
|
|
85
|
-
https://github.com/google-gemini/gemini-cli/compare/v0.
|
|
74
|
+
https://github.com/google-gemini/gemini-cli/compare/v0.62.0-preview.0...v0.63.0-preview.0
|
|
@@ -2,7 +2,7 @@ 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-LXT3NLFW.js";
|
|
6
6
|
import {
|
|
7
7
|
BuiltinCommandLoader,
|
|
8
8
|
CommandService,
|
|
@@ -46,11 +46,11 @@ import {
|
|
|
46
46
|
updateExtension,
|
|
47
47
|
validateAuthMethod,
|
|
48
48
|
validateContextFilePath
|
|
49
|
-
} from "./chunk-
|
|
49
|
+
} from "./chunk-ZG5IQP2R.js";
|
|
50
50
|
import {
|
|
51
51
|
exitCli,
|
|
52
52
|
require_source
|
|
53
|
-
} from "./chunk-
|
|
53
|
+
} from "./chunk-KUSXLIPR.js";
|
|
54
54
|
import {
|
|
55
55
|
appEvents
|
|
56
56
|
} from "./chunk-5PS3AYFU.js";
|
|
@@ -88,11 +88,11 @@ import {
|
|
|
88
88
|
resolveGemmaConfig,
|
|
89
89
|
saveModelChange,
|
|
90
90
|
stripAnsi
|
|
91
|
-
} from "./chunk-
|
|
91
|
+
} from "./chunk-CFKLEVXK.js";
|
|
92
92
|
import {
|
|
93
93
|
RELAUNCH_EXIT_CODE
|
|
94
|
-
} from "./chunk-
|
|
95
|
-
import "./chunk-
|
|
94
|
+
} from "./chunk-G4FAHQEH.js";
|
|
95
|
+
import "./chunk-JW5YA5WN.js";
|
|
96
96
|
import {
|
|
97
97
|
cleanupCheckpoints,
|
|
98
98
|
registerCleanup,
|
|
@@ -101,7 +101,7 @@ import {
|
|
|
101
101
|
runExitCleanup,
|
|
102
102
|
runSyncCleanup,
|
|
103
103
|
setupSignalHandlers
|
|
104
|
-
} from "./chunk-
|
|
104
|
+
} from "./chunk-5S3XVXG6.js";
|
|
105
105
|
import {
|
|
106
106
|
ASK_USER_TOOL_NAME,
|
|
107
107
|
ApprovalMode,
|
|
@@ -251,11 +251,12 @@ import {
|
|
|
251
251
|
shouldEnterAlternateScreen,
|
|
252
252
|
showMemory,
|
|
253
253
|
startupProfiler,
|
|
254
|
+
tokenLimit,
|
|
254
255
|
uiTelemetryService,
|
|
255
256
|
updatePolicy,
|
|
256
257
|
writeToStderr,
|
|
257
258
|
writeToStdout
|
|
258
|
-
} from "./chunk-
|
|
259
|
+
} from "./chunk-5Q2IR4AT.js";
|
|
259
260
|
import "./chunk-664ZODQF.js";
|
|
260
261
|
import "./chunk-IUUIT4SU.js";
|
|
261
262
|
import "./chunk-L6PII3GR.js";
|
|
@@ -7855,7 +7856,7 @@ async function loadSandboxConfig(settings, argv) {
|
|
|
7855
7856
|
}
|
|
7856
7857
|
const command2 = getSandboxCommand(sandboxValue);
|
|
7857
7858
|
const packageJson = await getPackageJson(__dirname3);
|
|
7858
|
-
const image = process.env["GEMINI_SANDBOX_IMAGE"] ?? "us-docker.pkg.dev/gemini-code-dev/gemini-cli/sandbox:0.
|
|
7859
|
+
const image = process.env["GEMINI_SANDBOX_IMAGE"] ?? "us-docker.pkg.dev/gemini-code-dev/gemini-cli/sandbox:0.64.0-nightly.20261001.gc6bccb7ec" ?? customImage ?? packageJson?.config?.sandboxImageUri;
|
|
7859
7860
|
const isNative = command2 === "windows-native" || command2 === "sandbox-exec" || command2 === "lxc";
|
|
7860
7861
|
return command2 && (image || isNative) ? { enabled: true, allowedPaths, networkAccess, command: command2, image } : void 0;
|
|
7861
7862
|
}
|
|
@@ -11526,7 +11527,7 @@ async function runNonInteractive({
|
|
|
11526
11527
|
}
|
|
11527
11528
|
});
|
|
11528
11529
|
if (process.env["GEMINI_CLI_ACTIVITY_LOG_TARGET"]) {
|
|
11529
|
-
const { setupInitialActivityLogger } = await import("./devtoolsService-
|
|
11530
|
+
const { setupInitialActivityLogger } = await import("./devtoolsService-54XKSYYW.js");
|
|
11530
11531
|
setupInitialActivityLogger(config);
|
|
11531
11532
|
}
|
|
11532
11533
|
const { stdout: workingStdout } = createWorkingStdio();
|
|
@@ -12036,7 +12037,7 @@ async function runNonInteractive2(params) {
|
|
|
12036
12037
|
}
|
|
12037
12038
|
});
|
|
12038
12039
|
if (process.env["GEMINI_CLI_ACTIVITY_LOG_TARGET"]) {
|
|
12039
|
-
const { setupInitialActivityLogger } = await import("./devtoolsService-
|
|
12040
|
+
const { setupInitialActivityLogger } = await import("./devtoolsService-54XKSYYW.js");
|
|
12040
12041
|
setupInitialActivityLogger(config);
|
|
12041
12042
|
}
|
|
12042
12043
|
const { stdout: workingStdout } = createWorkingStdio();
|
|
@@ -15310,6 +15311,11 @@ ${thought.description}`;
|
|
|
15310
15311
|
if (handled) {
|
|
15311
15312
|
return {
|
|
15312
15313
|
stopReason: "end_turn",
|
|
15314
|
+
usage: {
|
|
15315
|
+
inputTokens: 0,
|
|
15316
|
+
outputTokens: 0,
|
|
15317
|
+
totalTokens: 0
|
|
15318
|
+
},
|
|
15313
15319
|
_meta: {
|
|
15314
15320
|
quota: {
|
|
15315
15321
|
token_count: { input_tokens: 0, output_tokens: 0 },
|
|
@@ -15321,33 +15327,43 @@ ${thought.description}`;
|
|
|
15321
15327
|
}
|
|
15322
15328
|
let totalInputTokens = 0;
|
|
15323
15329
|
let totalOutputTokens = 0;
|
|
15330
|
+
let totalCachedTokens = 0;
|
|
15331
|
+
let totalThoughtTokens = 0;
|
|
15324
15332
|
const modelUsageMap = /* @__PURE__ */ new Map();
|
|
15333
|
+
const buildPromptResponse = (stopReason) => ({
|
|
15334
|
+
stopReason,
|
|
15335
|
+
usage: {
|
|
15336
|
+
inputTokens: totalInputTokens,
|
|
15337
|
+
outputTokens: totalOutputTokens,
|
|
15338
|
+
cachedReadTokens: totalCachedTokens || void 0,
|
|
15339
|
+
thoughtTokens: totalThoughtTokens || void 0,
|
|
15340
|
+
totalTokens: totalInputTokens + totalOutputTokens
|
|
15341
|
+
},
|
|
15342
|
+
_meta: {
|
|
15343
|
+
quota: {
|
|
15344
|
+
token_count: {
|
|
15345
|
+
input_tokens: totalInputTokens,
|
|
15346
|
+
output_tokens: totalOutputTokens
|
|
15347
|
+
},
|
|
15348
|
+
model_usage: Array.from(modelUsageMap.entries()).map(
|
|
15349
|
+
([modelName, counts]) => ({
|
|
15350
|
+
model: modelName,
|
|
15351
|
+
token_count: {
|
|
15352
|
+
input_tokens: counts.input,
|
|
15353
|
+
output_tokens: counts.output
|
|
15354
|
+
}
|
|
15355
|
+
})
|
|
15356
|
+
)
|
|
15357
|
+
}
|
|
15358
|
+
}
|
|
15359
|
+
});
|
|
15325
15360
|
let currentParts = parts;
|
|
15326
15361
|
let turnCount = 0;
|
|
15327
15362
|
const maxTurns = this.context.config.getMaxSessionTurns();
|
|
15328
15363
|
while (true) {
|
|
15329
15364
|
turnCount++;
|
|
15330
15365
|
if (maxTurns >= 0 && turnCount > maxTurns) {
|
|
15331
|
-
return
|
|
15332
|
-
stopReason: "max_turn_requests",
|
|
15333
|
-
_meta: {
|
|
15334
|
-
quota: {
|
|
15335
|
-
token_count: {
|
|
15336
|
-
input_tokens: totalInputTokens,
|
|
15337
|
-
output_tokens: totalOutputTokens
|
|
15338
|
-
},
|
|
15339
|
-
model_usage: Array.from(modelUsageMap.entries()).map(
|
|
15340
|
-
([modelName, counts]) => ({
|
|
15341
|
-
model: modelName,
|
|
15342
|
-
token_count: {
|
|
15343
|
-
input_tokens: counts.input,
|
|
15344
|
-
output_tokens: counts.output
|
|
15345
|
-
}
|
|
15346
|
-
})
|
|
15347
|
-
)
|
|
15348
|
-
}
|
|
15349
|
-
}
|
|
15350
|
-
};
|
|
15366
|
+
return buildPromptResponse("max_turn_requests");
|
|
15351
15367
|
}
|
|
15352
15368
|
if (pendingSend.signal.aborted) {
|
|
15353
15369
|
return { stopReason: "cancelled" };
|
|
@@ -15357,6 +15373,8 @@ ${thought.description}`;
|
|
|
15357
15373
|
let turnModelId = this.context.config.getModel();
|
|
15358
15374
|
let turnInputTokens = 0;
|
|
15359
15375
|
let turnOutputTokens = 0;
|
|
15376
|
+
let turnCachedTokens = 0;
|
|
15377
|
+
let turnThoughtTokens = 0;
|
|
15360
15378
|
try {
|
|
15361
15379
|
const responseStream = this.context.geminiClient.sendMessageStream(
|
|
15362
15380
|
currentParts,
|
|
@@ -15396,6 +15414,15 @@ ${event.value.description}`;
|
|
|
15396
15414
|
if (usage2) {
|
|
15397
15415
|
turnInputTokens = usage2.promptTokenCount ?? turnInputTokens;
|
|
15398
15416
|
turnOutputTokens = usage2.candidatesTokenCount ?? turnOutputTokens;
|
|
15417
|
+
turnCachedTokens = usage2.cachedContentTokenCount ?? turnCachedTokens;
|
|
15418
|
+
turnThoughtTokens = usage2.thoughtsTokenCount ?? turnThoughtTokens;
|
|
15419
|
+
await this.sendUpdate({
|
|
15420
|
+
sessionUpdate: "usage_update",
|
|
15421
|
+
used: turnInputTokens + turnOutputTokens,
|
|
15422
|
+
size: tokenLimit(
|
|
15423
|
+
turnModelId || this.context.config.getModel()
|
|
15424
|
+
)
|
|
15425
|
+
});
|
|
15399
15426
|
}
|
|
15400
15427
|
break;
|
|
15401
15428
|
}
|
|
@@ -15439,26 +15466,7 @@ ${event.value.description}`;
|
|
|
15439
15466
|
throw error;
|
|
15440
15467
|
}
|
|
15441
15468
|
if (error instanceof InvalidStreamError || error && typeof error === "object" && "type" in error && (error.type === "NO_RESPONSE_TEXT" || error.type === "NO_FINISH_REASON" || error.type === "MALFORMED_FUNCTION_CALL" || error.type === "UNEXPECTED_TOOL_CALL" || error.type === "MAX_TOKENS_EXCEEDED" || error.type === "SAFETY_BLOCKED" || error.type === "RECITATION_BLOCKED" || error.type === "OTHER_BLOCKED" || error.type === "THINKING_ONLY_RESPONSE")) {
|
|
15442
|
-
return
|
|
15443
|
-
stopReason: "end_turn",
|
|
15444
|
-
_meta: {
|
|
15445
|
-
quota: {
|
|
15446
|
-
token_count: {
|
|
15447
|
-
input_tokens: totalInputTokens,
|
|
15448
|
-
output_tokens: totalOutputTokens
|
|
15449
|
-
},
|
|
15450
|
-
model_usage: Array.from(modelUsageMap.entries()).map(
|
|
15451
|
-
([modelName, counts]) => ({
|
|
15452
|
-
model: modelName,
|
|
15453
|
-
token_count: {
|
|
15454
|
-
input_tokens: counts.input,
|
|
15455
|
-
output_tokens: counts.output
|
|
15456
|
-
}
|
|
15457
|
-
})
|
|
15458
|
-
)
|
|
15459
|
-
}
|
|
15460
|
-
}
|
|
15461
|
-
};
|
|
15469
|
+
return buildPromptResponse("end_turn");
|
|
15462
15470
|
}
|
|
15463
15471
|
throw new RequestError(
|
|
15464
15472
|
getErrorStatus(error) || 500,
|
|
@@ -15467,6 +15475,8 @@ ${event.value.description}`;
|
|
|
15467
15475
|
}
|
|
15468
15476
|
totalInputTokens += turnInputTokens;
|
|
15469
15477
|
totalOutputTokens += turnOutputTokens;
|
|
15478
|
+
totalCachedTokens += turnCachedTokens;
|
|
15479
|
+
totalThoughtTokens += turnThoughtTokens;
|
|
15470
15480
|
if (turnInputTokens > 0 || turnOutputTokens > 0) {
|
|
15471
15481
|
const existing = modelUsageMap.get(turnModelId) ?? {
|
|
15472
15482
|
input: 0,
|
|
@@ -15477,26 +15487,7 @@ ${event.value.description}`;
|
|
|
15477
15487
|
modelUsageMap.set(turnModelId, existing);
|
|
15478
15488
|
}
|
|
15479
15489
|
if (stopReason !== "end_turn") {
|
|
15480
|
-
return
|
|
15481
|
-
stopReason,
|
|
15482
|
-
_meta: {
|
|
15483
|
-
quota: {
|
|
15484
|
-
token_count: {
|
|
15485
|
-
input_tokens: totalInputTokens,
|
|
15486
|
-
output_tokens: totalOutputTokens
|
|
15487
|
-
},
|
|
15488
|
-
model_usage: Array.from(modelUsageMap.entries()).map(
|
|
15489
|
-
([modelName, counts]) => ({
|
|
15490
|
-
model: modelName,
|
|
15491
|
-
token_count: {
|
|
15492
|
-
input_tokens: counts.input,
|
|
15493
|
-
output_tokens: counts.output
|
|
15494
|
-
}
|
|
15495
|
-
})
|
|
15496
|
-
)
|
|
15497
|
-
}
|
|
15498
|
-
}
|
|
15499
|
-
};
|
|
15490
|
+
return buildPromptResponse(stopReason);
|
|
15500
15491
|
}
|
|
15501
15492
|
if (toolCallRequests.length === 0) {
|
|
15502
15493
|
break;
|
|
@@ -15513,27 +15504,7 @@ ${event.value.description}`;
|
|
|
15513
15504
|
}
|
|
15514
15505
|
currentParts = toolResponseParts;
|
|
15515
15506
|
}
|
|
15516
|
-
|
|
15517
|
-
([modelName, counts]) => ({
|
|
15518
|
-
model: modelName,
|
|
15519
|
-
token_count: {
|
|
15520
|
-
input_tokens: counts.input,
|
|
15521
|
-
output_tokens: counts.output
|
|
15522
|
-
}
|
|
15523
|
-
})
|
|
15524
|
-
);
|
|
15525
|
-
return {
|
|
15526
|
-
stopReason: "end_turn",
|
|
15527
|
-
_meta: {
|
|
15528
|
-
quota: {
|
|
15529
|
-
token_count: {
|
|
15530
|
-
input_tokens: totalInputTokens,
|
|
15531
|
-
output_tokens: totalOutputTokens
|
|
15532
|
-
},
|
|
15533
|
-
model_usage: modelUsageArray
|
|
15534
|
-
}
|
|
15535
|
-
}
|
|
15536
|
-
};
|
|
15507
|
+
return buildPromptResponse("end_turn");
|
|
15537
15508
|
}
|
|
15538
15509
|
async handleCommand(commandText, parts) {
|
|
15539
15510
|
const gitService = await this.context.config.getGitService();
|
|
@@ -17347,7 +17318,7 @@ async function resolveSessionId(resumeArg, sessionIdArg, sessionFileArg) {
|
|
|
17347
17318
|
}
|
|
17348
17319
|
}
|
|
17349
17320
|
async function startInteractiveUI(config, settings, startupWarnings, workspaceRoot = process.cwd(), resumedSessionData, initializationResult) {
|
|
17350
|
-
const { startInteractiveUI: doStartUI } = await import("./interactiveCli-
|
|
17321
|
+
const { startInteractiveUI: doStartUI } = await import("./interactiveCli-N7HBJ434.js");
|
|
17351
17322
|
await doStartUI(
|
|
17352
17323
|
config,
|
|
17353
17324
|
settings,
|
|
@@ -17556,7 +17527,7 @@ ${finalArgs[promptIndex + 1]}`;
|
|
|
17556
17527
|
await config.storage.initialize();
|
|
17557
17528
|
adminControlsListner.setConfig(config);
|
|
17558
17529
|
if (config.isInteractive() && settings.merged.general.devtools) {
|
|
17559
|
-
const { setupInitialActivityLogger } = await import("./devtoolsService-
|
|
17530
|
+
const { setupInitialActivityLogger } = await import("./devtoolsService-54XKSYYW.js");
|
|
17560
17531
|
setupInitialActivityLogger(config);
|
|
17561
17532
|
}
|
|
17562
17533
|
registerTelemetryConfig(config);
|
|
@@ -17615,7 +17586,7 @@ ${finalArgs[promptIndex + 1]}`;
|
|
|
17615
17586
|
const initAppHandle = startupProfiler.start("initialize_app");
|
|
17616
17587
|
const initializationResult = await initializeApp(config, settings);
|
|
17617
17588
|
initAppHandle?.end();
|
|
17618
|
-
import("./liteRtServerManager-
|
|
17589
|
+
import("./liteRtServerManager-NK3OA5CI.js").then(({ LiteRtServerManager }) => {
|
|
17619
17590
|
const mergedGemma = settings.merged.experimental?.gemmaModelRouter;
|
|
17620
17591
|
if (!mergedGemma) return;
|
|
17621
17592
|
const userGemma = settings.forScope("User" /* User */).settings.experimental?.gemmaModelRouter;
|