@google/gemini-cli 0.64.0-preview.0 → 0.65.0-nightly.20261008.g44d764ee5
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-2NQXIWQK.js → chunk-3E6LR7PD.js} +32 -4
- package/bundle/{chunk-EBP6K2WG.js → chunk-3HM2DUPL.js} +50 -18
- package/bundle/{chunk-HSZIYPL6.js → chunk-4YOFVKC3.js} +3 -3
- package/bundle/{chunk-KCCVXZ52.js → chunk-63N5Z55Y.js} +114 -69
- package/bundle/{chunk-UFQDAROY.js → chunk-7BGM6KG2.js} +1 -1
- package/bundle/{chunk-EDYPRCAA.js → chunk-7PODN7KW.js} +2 -2
- package/bundle/{chunk-ZQW7OGUO.js → chunk-ARJWMIGO.js} +628 -124
- package/bundle/{chunk-U76XPSKR.js → chunk-AUU7WOFW.js} +50 -18
- package/bundle/{chunk-SDWOC67Z.js → chunk-BA5YFKKS.js} +1 -1
- package/bundle/{chunk-UBGF6JU5.js → chunk-BIHX2DZB.js} +1 -1
- package/bundle/{chunk-HN74ORTP.js → chunk-EZGM7WCW.js} +32 -4
- package/bundle/{chunk-NX7TO2DU.js → chunk-G73R7Q4K.js} +1 -1
- package/bundle/{chunk-EFX5XL6M.js → chunk-HN32MQMG.js} +2 -2
- package/bundle/{chunk-VBVCLWLA.js → chunk-HRPULK65.js} +2 -2
- package/bundle/{chunk-A4TO2DY2.js → chunk-IL5DA7Y5.js} +8460 -14960
- package/bundle/{chunk-2VN53SWW.js → chunk-IUZHBNL5.js} +9 -8
- package/bundle/{chunk-EDVFNWRG.js → chunk-JPVUKQJ7.js} +1 -1
- package/bundle/{chunk-QUCRASYB.js → chunk-LGG27U7G.js} +1 -1
- package/bundle/{chunk-MLSLNORV.js → chunk-MV5ZEQKH.js} +3 -3
- package/bundle/chunk-PFU4B5QN.js +154 -0
- package/bundle/{chunk-ZPLFLZQA.js → chunk-PPUDMLP4.js} +38 -8
- package/bundle/{chunk-VJYKQD5D.js → chunk-Q2G3IFID.js} +3 -3
- package/bundle/chunk-Q6FM3IBA.js +512 -0
- package/bundle/chunk-RUV5VETL.js +17535 -0
- package/bundle/chunk-SQDLQBAY.js +118 -0
- package/bundle/chunk-UB5UMEXC.js +401700 -0
- package/bundle/{chunk-ZOHM7BPT.js → chunk-UCDMKAAW.js} +1 -1
- package/bundle/{chunk-Y2HXXBXI.js → chunk-XDI7ON7P.js} +1 -1
- package/bundle/{chunk-6OFXOGEG.js → chunk-XMBLOFHQ.js} +667 -128
- package/bundle/chunk-YMVWBWWO.js +1571 -0
- package/bundle/chunk-ZCMBTRVW.js +425 -0
- package/bundle/chunk-ZQB4PBVQ.js +103153 -0
- package/bundle/{cleanup-GGCB2LVD.js → cleanup-333PJ32W.js} +2 -2
- package/bundle/{cleanup-JRDG3OTL.js → cleanup-FAR6AR3H.js} +2 -2
- package/bundle/{cleanup-SSW6IXTR.js → cleanup-GL3Y6D27.js} +2 -2
- package/bundle/cleanup-JB3GTDPK.js +32 -0
- package/bundle/{core-IUIZE6JW.js → core-4FIJ3NBL.js} +13 -1
- package/bundle/{devtoolsService-3SADPKKB.js → devtoolsService-2WM4AKWJ.js} +2 -2
- package/bundle/{devtoolsService-XZCKFZP5.js → devtoolsService-3VV6G7M6.js} +2 -2
- package/bundle/{devtoolsService-MF6JKRUV.js → devtoolsService-4Q6IMJZW.js} +4 -3
- package/bundle/devtoolsService-MNAMTUTD.js +4359 -0
- package/bundle/{dist-7L3BRW6V.js → dist-B6O7SDYJ.js} +13 -1
- package/bundle/{core-6HRWFQZW.js → dist-BBUYPVDB.js} +13 -1
- package/bundle/dist-HG6AYV4Z.js +2264 -0
- package/bundle/docs/changelogs/index.md +14 -0
- package/bundle/docs/changelogs/latest.md +55 -34
- package/bundle/docs/changelogs/preview.md +59 -54
- package/bundle/docs/cli/telemetry.md +1 -0
- package/bundle/docs/reference/configuration.md +7 -0
- package/bundle/docs/tools/mcp-server.md +41 -12
- package/bundle/{gemini-JPMMQ3KA.js → gemini-3RQKEPRX.js} +41 -21
- package/bundle/{gemini-QOQNG5VY.js → gemini-O5W6WLU3.js} +241 -205
- package/bundle/gemini-PE5RKGLA.js +17954 -0
- package/bundle/{gemini-ZMMDUAQJ.js → gemini-TZNM5EXD.js} +41 -21
- package/bundle/gemini.js +7 -7
- package/bundle/{interactiveCli-UDWGRVJL.js → interactiveCli-EY52EA4C.js} +50 -32
- package/bundle/{interactiveCli-3I4TG5SK.js → interactiveCli-P4I2OMIO.js} +354 -317
- package/bundle/{interactiveCli-R3P4A3FC.js → interactiveCli-PGWKO5T6.js} +50 -32
- package/bundle/interactiveCli-T2TOLST3.js +34997 -0
- package/bundle/{liteRtServerManager-OVPUSK2T.js → liteRtServerManager-52LZHRIE.js} +4 -4
- package/bundle/{liteRtServerManager-RAV63AGE.js → liteRtServerManager-GG66IH7W.js} +4 -4
- package/bundle/{liteRtServerManager-4MWCEVVM.js → liteRtServerManager-TAPI266B.js} +4 -4
- package/bundle/liteRtServerManager-ZMK3WM5V.js +65 -0
- package/bundle/{oauth2-provider-FVTRRJZR.js → oauth2-provider-7PEUKPJH.js} +47 -9
- package/bundle/{oauth2-provider-XFP63FGJ.js → oauth2-provider-EU3BXPHB.js} +84 -80
- package/bundle/oauth2-provider-JB36DOZE.js +273 -0
- package/bundle/{oauth2-provider-EWOA64PR.js → oauth2-provider-W7KEN635.js} +51 -9
- package/bundle/{start-DJAIXPPY.js → start-2D4TOWA4.js} +6 -6
- package/bundle/{start-VQQ2Q5KT.js → start-G7MFP7R2.js} +6 -6
- package/bundle/{start-5O7TBK5L.js → start-VJAR6RFJ.js} +6 -6
- package/bundle/start-VWUPOWW5.js +18 -0
- package/package.json +1 -1
|
@@ -2,7 +2,7 @@ const require = (await import('node:module')).createRequire(import.meta.url); co
|
|
|
2
2
|
import {
|
|
3
3
|
exitCli,
|
|
4
4
|
require_source
|
|
5
|
-
} from "./chunk-
|
|
5
|
+
} from "./chunk-LGG27U7G.js";
|
|
6
6
|
import {
|
|
7
7
|
AppEvent,
|
|
8
8
|
appEvents
|
|
@@ -63,21 +63,23 @@ import {
|
|
|
63
63
|
stripUnsafeCharacters,
|
|
64
64
|
toCodePoints,
|
|
65
65
|
validateCustomTheme
|
|
66
|
-
} from "./chunk-
|
|
66
|
+
} from "./chunk-PPUDMLP4.js";
|
|
67
67
|
import {
|
|
68
68
|
isDevelopment
|
|
69
|
-
} from "./chunk-
|
|
69
|
+
} from "./chunk-ZCMBTRVW.js";
|
|
70
70
|
import {
|
|
71
71
|
emptyIcon,
|
|
72
72
|
mapCoreStatusToDisplayStatus,
|
|
73
73
|
require_react
|
|
74
|
-
} from "./chunk-
|
|
74
|
+
} from "./chunk-G73R7Q4K.js";
|
|
75
75
|
import {
|
|
76
76
|
ALL_EDITORS,
|
|
77
77
|
ApprovalMode,
|
|
78
78
|
AsyncFzf,
|
|
79
|
+
AuthType,
|
|
79
80
|
Config,
|
|
80
81
|
CoreEvent,
|
|
82
|
+
CoreToolCallStatus,
|
|
81
83
|
DiscoveredMCPTool,
|
|
82
84
|
ExtensionDisableEvent,
|
|
83
85
|
ExtensionEnableEvent,
|
|
@@ -88,21 +90,32 @@ import {
|
|
|
88
90
|
ExtensionUpdateEvent,
|
|
89
91
|
GEMINI_CLI_COMPANION_EXTENSION_NAME,
|
|
90
92
|
GEMINI_DIR,
|
|
93
|
+
HookType,
|
|
94
|
+
IDEConnectionStatus,
|
|
91
95
|
INITIAL_HISTORY_LENGTH,
|
|
92
96
|
IdeClient,
|
|
93
97
|
IdeConnectionEvent,
|
|
98
|
+
IdeConnectionType,
|
|
99
|
+
IntegrityDataStatus,
|
|
94
100
|
KeychainTokenStorage,
|
|
101
|
+
LlmRole,
|
|
102
|
+
MCPDiscoveryState,
|
|
95
103
|
MCPOAuthTokenStorage,
|
|
104
|
+
MCPServerStatus,
|
|
96
105
|
ModelSlashCommandEvent,
|
|
106
|
+
PolicyDecision,
|
|
97
107
|
ProjectIdRequiredError,
|
|
98
108
|
REFERENCE_CONTENT_END,
|
|
99
109
|
REFERENCE_CONTENT_START,
|
|
100
110
|
ReadManyFilesTool,
|
|
101
111
|
RewindEvent,
|
|
102
112
|
SHELL_TOOL_NAME,
|
|
113
|
+
SessionEndReason,
|
|
114
|
+
SessionStartSource,
|
|
103
115
|
ShellExecutionService,
|
|
104
116
|
StartSessionEvent,
|
|
105
117
|
Storage,
|
|
118
|
+
TrustLevel,
|
|
106
119
|
UPGRADE_URL_PAGE,
|
|
107
120
|
UserAccountManager,
|
|
108
121
|
ValidationRequiredError,
|
|
@@ -239,7 +252,7 @@ import {
|
|
|
239
252
|
tokenLimit,
|
|
240
253
|
uiTelemetryService,
|
|
241
254
|
unescapePath
|
|
242
|
-
} from "./chunk-
|
|
255
|
+
} from "./chunk-UB5UMEXC.js";
|
|
243
256
|
import {
|
|
244
257
|
require_src
|
|
245
258
|
} from "./chunk-L6PII3GR.js";
|
|
@@ -60107,7 +60120,7 @@ var import_react34 = __toESM(require_react(), 1);
|
|
|
60107
60120
|
function useIdeTrustListener() {
|
|
60108
60121
|
const settings = useSettings();
|
|
60109
60122
|
const [connectionStatus, setConnectionStatus] = (0, import_react34.useState)(
|
|
60110
|
-
|
|
60123
|
+
IDEConnectionStatus.Disconnected
|
|
60111
60124
|
);
|
|
60112
60125
|
const previousTrust = (0, import_react34.useRef)(void 0);
|
|
60113
60126
|
const [restartReason, setRestartReason] = (0, import_react34.useState)("NONE");
|
|
@@ -60137,7 +60150,7 @@ function useIdeTrustListener() {
|
|
|
60137
60150
|
};
|
|
60138
60151
|
}, []);
|
|
60139
60152
|
const getSnapshot = () => {
|
|
60140
|
-
if (connectionStatus !==
|
|
60153
|
+
if (connectionStatus !== IDEConnectionStatus.Connected) {
|
|
60141
60154
|
return void 0;
|
|
60142
60155
|
}
|
|
60143
60156
|
return ideContextStore.get()?.workspaceState?.isTrusted;
|
|
@@ -60842,7 +60855,7 @@ async function initializeApp(config, settings) {
|
|
|
60842
60855
|
await ideClient.connect();
|
|
60843
60856
|
logIdeConnection(
|
|
60844
60857
|
config,
|
|
60845
|
-
new IdeConnectionEvent(
|
|
60858
|
+
new IdeConnectionEvent(IdeConnectionType.START)
|
|
60846
60859
|
);
|
|
60847
60860
|
}).catch((e) => {
|
|
60848
60861
|
debugLogger.error("Failed to initialize IDE client:", e);
|
|
@@ -60860,17 +60873,17 @@ async function initializeApp(config, settings) {
|
|
|
60860
60873
|
// packages/cli/src/config/auth.ts
|
|
60861
60874
|
async function validateAuthMethod(authMethod) {
|
|
60862
60875
|
loadEnvironment(loadSettings().merged, process.cwd());
|
|
60863
|
-
if (authMethod ===
|
|
60876
|
+
if (authMethod === AuthType.LOGIN_WITH_GOOGLE || authMethod === AuthType.COMPUTE_ADC) {
|
|
60864
60877
|
return null;
|
|
60865
60878
|
}
|
|
60866
|
-
if (authMethod ===
|
|
60879
|
+
if (authMethod === AuthType.USE_GEMINI) {
|
|
60867
60880
|
const key = process.env["GEMINI_API_KEY"] || await loadApiKey();
|
|
60868
60881
|
if (!key) {
|
|
60869
60882
|
return "When using Gemini API, you must specify the GEMINI_API_KEY environment variable.\nUpdate your environment and try again (no reload needed if using .env)!";
|
|
60870
60883
|
}
|
|
60871
60884
|
return null;
|
|
60872
60885
|
}
|
|
60873
|
-
if (authMethod ===
|
|
60886
|
+
if (authMethod === AuthType.USE_VERTEX_AI) {
|
|
60874
60887
|
const hasVertexProjectLocationConfig = !!process.env["GOOGLE_CLOUD_PROJECT"] && !!process.env["GOOGLE_CLOUD_LOCATION"];
|
|
60875
60888
|
const hasGoogleApiKey = !!process.env["GOOGLE_API_KEY"];
|
|
60876
60889
|
if (!hasVertexProjectLocationConfig && !hasGoogleApiKey) {
|
|
@@ -65442,7 +65455,7 @@ var ExtensionManager = class extends ExtensionLoader {
|
|
|
65442
65455
|
const trustedFolders = loadTrustedFolders();
|
|
65443
65456
|
await trustedFolders.setValue(
|
|
65444
65457
|
this.workspaceDir,
|
|
65445
|
-
|
|
65458
|
+
TrustLevel.TRUST_FOLDER
|
|
65446
65459
|
);
|
|
65447
65460
|
} else {
|
|
65448
65461
|
throw new Error(
|
|
@@ -65628,7 +65641,7 @@ Would you like to attempt to install via "git clone" instead?`
|
|
|
65628
65641
|
newExtensionConfig.version,
|
|
65629
65642
|
previousExtensionConfig.version,
|
|
65630
65643
|
installMetadata.type,
|
|
65631
|
-
|
|
65644
|
+
CoreToolCallStatus.Success
|
|
65632
65645
|
)
|
|
65633
65646
|
);
|
|
65634
65647
|
if (newExtensionName !== previousName) {
|
|
@@ -65651,7 +65664,7 @@ Would you like to attempt to install via "git clone" instead?`
|
|
|
65651
65664
|
getExtensionId(newExtensionConfig, installMetadata),
|
|
65652
65665
|
newExtensionConfig.version,
|
|
65653
65666
|
installMetadata.type,
|
|
65654
|
-
|
|
65667
|
+
CoreToolCallStatus.Success
|
|
65655
65668
|
)
|
|
65656
65669
|
);
|
|
65657
65670
|
await this.enableExtension(
|
|
@@ -65690,7 +65703,7 @@ Would you like to attempt to install via "git clone" instead?`
|
|
|
65690
65703
|
newExtensionConfig?.version ?? "",
|
|
65691
65704
|
previousExtensionConfig.version,
|
|
65692
65705
|
installMetadata.type,
|
|
65693
|
-
|
|
65706
|
+
CoreToolCallStatus.Error
|
|
65694
65707
|
)
|
|
65695
65708
|
);
|
|
65696
65709
|
} else {
|
|
@@ -65702,7 +65715,7 @@ Would you like to attempt to install via "git clone" instead?`
|
|
|
65702
65715
|
extensionId ?? "",
|
|
65703
65716
|
newExtensionConfig?.version ?? "",
|
|
65704
65717
|
installMetadata.type,
|
|
65705
|
-
|
|
65718
|
+
CoreToolCallStatus.Error
|
|
65706
65719
|
)
|
|
65707
65720
|
);
|
|
65708
65721
|
}
|
|
@@ -65730,7 +65743,7 @@ Would you like to attempt to install via "git clone" instead?`
|
|
|
65730
65743
|
extension.name,
|
|
65731
65744
|
hashValue(extension.name),
|
|
65732
65745
|
extension.id,
|
|
65733
|
-
|
|
65746
|
+
CoreToolCallStatus.Success
|
|
65734
65747
|
)
|
|
65735
65748
|
);
|
|
65736
65749
|
}
|
|
@@ -65992,7 +66005,7 @@ Would you like to attempt to install via "git clone" instead?`
|
|
|
65992
66005
|
if (eventHooks) {
|
|
65993
66006
|
for (const definition of eventHooks) {
|
|
65994
66007
|
for (const hook of definition.hooks) {
|
|
65995
|
-
if (hook.type ===
|
|
66008
|
+
if (hook.type === HookType.Command) {
|
|
65996
66009
|
hook.env = { ...hook.env, ...hookEnv };
|
|
65997
66010
|
}
|
|
65998
66011
|
}
|
|
@@ -67139,7 +67152,7 @@ async function readMcpResources(resourceParts, config, signal) {
|
|
|
67139
67152
|
callId: `mcp-resource-${resource.serverName}-${resource.uri}`,
|
|
67140
67153
|
name: `resources/read (${resource.serverName})`,
|
|
67141
67154
|
description: resource.uri,
|
|
67142
|
-
status:
|
|
67155
|
+
status: CoreToolCallStatus.Success,
|
|
67143
67156
|
isClientInitiated: true,
|
|
67144
67157
|
resultDisplay: `Successfully read resource ${resource.uri}`,
|
|
67145
67158
|
confirmationDetails: void 0
|
|
@@ -67154,7 +67167,7 @@ async function readMcpResources(resourceParts, config, signal) {
|
|
|
67154
67167
|
callId: `mcp-resource-${resource.serverName}-${resource.uri}`,
|
|
67155
67168
|
name: `resources/read (${resource.serverName})`,
|
|
67156
67169
|
description: resource.uri,
|
|
67157
|
-
status:
|
|
67170
|
+
status: CoreToolCallStatus.Error,
|
|
67158
67171
|
isClientInitiated: true,
|
|
67159
67172
|
resultDisplay: `Error reading resource ${resource.uri}: ${getErrorMessage(error)}`,
|
|
67160
67173
|
confirmationDetails: void 0
|
|
@@ -67179,7 +67192,7 @@ Content from @${result.uri}:
|
|
|
67179
67192
|
}
|
|
67180
67193
|
if (hasError) {
|
|
67181
67194
|
const firstError = displays.find(
|
|
67182
|
-
(d) => d.status ===
|
|
67195
|
+
(d) => d.status === CoreToolCallStatus.Error
|
|
67183
67196
|
);
|
|
67184
67197
|
return {
|
|
67185
67198
|
parts: [],
|
|
@@ -67220,7 +67233,7 @@ async function readLocalFiles(resolvedFiles, config, signal, userMessageTimestam
|
|
|
67220
67233
|
callId: `client-read-${userMessageTimestamp}`,
|
|
67221
67234
|
name: readManyFilesTool.displayName,
|
|
67222
67235
|
description: invocation.getDescription(),
|
|
67223
|
-
status:
|
|
67236
|
+
status: CoreToolCallStatus.Success,
|
|
67224
67237
|
isClientInitiated: true,
|
|
67225
67238
|
resultDisplay: result.returnDisplay || `Successfully read: ${fileLabelsForDisplay.join(", ")}`,
|
|
67226
67239
|
confirmationDetails: void 0
|
|
@@ -67267,7 +67280,7 @@ Content from @${displayPath}:
|
|
|
67267
67280
|
callId: `client-read-${userMessageTimestamp}`,
|
|
67268
67281
|
name: readManyFilesTool.displayName,
|
|
67269
67282
|
description: invocation?.getDescription() ?? "Error attempting to execute tool to read files",
|
|
67270
|
-
status:
|
|
67283
|
+
status: CoreToolCallStatus.Error,
|
|
67271
67284
|
isClientInitiated: true,
|
|
67272
67285
|
resultDisplay: `Error reading files (${fileLabelsForDisplay.join(", ")}): ${getErrorMessage(error)}`,
|
|
67273
67286
|
confirmationDetails: void 0
|
|
@@ -70534,7 +70547,7 @@ async function openFileInEditor(filePath, stdin, setRawMode, preferredEditorType
|
|
|
70534
70547
|
if (wasRaw) {
|
|
70535
70548
|
setRawMode?.(true);
|
|
70536
70549
|
}
|
|
70537
|
-
coreEvents.emit(
|
|
70550
|
+
coreEvents.emit(CoreEvent.ExternalEditorClosed);
|
|
70538
70551
|
}
|
|
70539
70552
|
}
|
|
70540
70553
|
|
|
@@ -73228,7 +73241,7 @@ async function updateExtension(extension, extensionManager, currentState, dispat
|
|
|
73228
73241
|
extension.name,
|
|
73229
73242
|
installMetadata
|
|
73230
73243
|
);
|
|
73231
|
-
if (status ===
|
|
73244
|
+
if (status === IntegrityDataStatus.INVALID) {
|
|
73232
73245
|
throw new Error("Extension integrity cannot be verified");
|
|
73233
73246
|
}
|
|
73234
73247
|
} catch (e) {
|
|
@@ -74723,11 +74736,11 @@ var ShellProcessor = class {
|
|
|
74723
74736
|
},
|
|
74724
74737
|
void 0
|
|
74725
74738
|
);
|
|
74726
|
-
if (decision ===
|
|
74739
|
+
if (decision === PolicyDecision.DENY) {
|
|
74727
74740
|
throw new Error(
|
|
74728
74741
|
`${this.commandName} cannot be run. Blocked command: "${command}". Reason: Blocked by policy.`
|
|
74729
74742
|
);
|
|
74730
|
-
} else if (decision ===
|
|
74743
|
+
} else if (decision === PolicyDecision.ASK_USER) {
|
|
74731
74744
|
commandsToConfirm.add(command);
|
|
74732
74745
|
}
|
|
74733
74746
|
}
|
|
@@ -75857,7 +75870,7 @@ var MultiFolderTrustDialog = ({
|
|
|
75857
75870
|
if (choice === 1 /* YES_AND_REMEMBER */) {
|
|
75858
75871
|
await trustedFolders.setValue(
|
|
75859
75872
|
expandedPath,
|
|
75860
|
-
|
|
75873
|
+
TrustLevel.TRUST_FOLDER
|
|
75861
75874
|
);
|
|
75862
75875
|
}
|
|
75863
75876
|
workspaceContext.addDirectory(expandedPath);
|
|
@@ -76143,10 +76156,10 @@ function isShellTool(name) {
|
|
|
76143
76156
|
return name === SHELL_COMMAND_NAME || name === SHELL_NAME || name === SHELL_TOOL_NAME || normalized === "shell";
|
|
76144
76157
|
}
|
|
76145
76158
|
function isThisShellFocusable(name, status, config) {
|
|
76146
|
-
return !!(isShellTool(name) && status ===
|
|
76159
|
+
return !!(isShellTool(name) && status === CoreToolCallStatus.Executing && config?.getEnableInteractiveShell());
|
|
76147
76160
|
}
|
|
76148
76161
|
function isThisShellFocused(name, status, ptyId, activeShellPtyId, embeddedShellFocused) {
|
|
76149
|
-
return !!(isShellTool(name) && status ===
|
|
76162
|
+
return !!(isShellTool(name) && status === CoreToolCallStatus.Executing && ptyId === activeShellPtyId && embeddedShellFocused);
|
|
76150
76163
|
}
|
|
76151
76164
|
function useFocusHint(isThisShellFocusable2, isThisShellFocused2, resultDisplay) {
|
|
76152
76165
|
const [userHasFocused, setUserHasFocused] = (0, import_react56.useState)(false);
|
|
@@ -76306,14 +76319,14 @@ function getToolGroupBorderAppearance(item, activeShellPtyId, embeddedShellFocus
|
|
|
76306
76319
|
if (isTrackedToolCall(t)) {
|
|
76307
76320
|
return t.status !== "success" && t.status !== "error" && t.status !== "cancelled";
|
|
76308
76321
|
} else {
|
|
76309
|
-
return t.status !==
|
|
76322
|
+
return t.status !== CoreToolCallStatus.Success && t.status !== CoreToolCallStatus.Error && t.status !== CoreToolCallStatus.Cancelled;
|
|
76310
76323
|
}
|
|
76311
76324
|
});
|
|
76312
76325
|
const isEmbeddedShellFocused = toolsToInspect.some((t) => {
|
|
76313
76326
|
if (isTrackedToolCall(t)) {
|
|
76314
76327
|
return isShellTool(t.request.name) && t.status === "executing" && t.pid === activeShellPtyId && !!embeddedShellFocused;
|
|
76315
76328
|
} else {
|
|
76316
|
-
return isShellTool(t.name) && t.status ===
|
|
76329
|
+
return isShellTool(t.name) && t.status === CoreToolCallStatus.Executing && t.ptyId === activeShellPtyId && !!embeddedShellFocused;
|
|
76317
76330
|
}
|
|
76318
76331
|
});
|
|
76319
76332
|
const isShellCommand = toolsToInspect.some((t) => {
|
|
@@ -77751,7 +77764,7 @@ var authCommand = {
|
|
|
77751
77764
|
import process29 from "node:process";
|
|
77752
77765
|
|
|
77753
77766
|
// packages/cli/src/generated/git-commit.ts
|
|
77754
|
-
var GIT_COMMIT_INFO = "
|
|
77767
|
+
var GIT_COMMIT_INFO = "44d764ee5";
|
|
77755
77768
|
|
|
77756
77769
|
// packages/cli/src/ui/utils/historyExportUtils.ts
|
|
77757
77770
|
import * as fsPromises from "node:fs/promises";
|
|
@@ -78397,7 +78410,7 @@ var clearCommand = {
|
|
|
78397
78410
|
const config = context.services.agentContext?.config;
|
|
78398
78411
|
const hookSystem = config?.getHookSystem();
|
|
78399
78412
|
if (hookSystem) {
|
|
78400
|
-
await hookSystem.fireSessionEndEvent(
|
|
78413
|
+
await hookSystem.fireSessionEndEvent(SessionEndReason.Clear);
|
|
78401
78414
|
}
|
|
78402
78415
|
config?.injectionService.clear();
|
|
78403
78416
|
let newSessionId;
|
|
@@ -78414,7 +78427,7 @@ var clearCommand = {
|
|
|
78414
78427
|
}
|
|
78415
78428
|
let result;
|
|
78416
78429
|
if (hookSystem) {
|
|
78417
|
-
result = await hookSystem.fireSessionStartEvent(
|
|
78430
|
+
result = await hookSystem.fireSessionStartEvent(SessionStartSource.Clear);
|
|
78418
78431
|
}
|
|
78419
78432
|
await new Promise((resolve9) => setImmediate(resolve9));
|
|
78420
78433
|
if (config) {
|
|
@@ -80882,18 +80895,22 @@ var import_react71 = __toESM(require_react(), 1);
|
|
|
80882
80895
|
import process33 from "node:process";
|
|
80883
80896
|
var import_jsx_runtime24 = __toESM(require_jsx_runtime(), 1);
|
|
80884
80897
|
var MemoryUsageDisplay = ({ color = theme.text.primary, isActive = true }) => {
|
|
80885
|
-
const [memoryUsage, setMemoryUsage] = (0, import_react71.useState)(
|
|
80886
|
-
|
|
80898
|
+
const [memoryUsage, setMemoryUsage] = (0, import_react71.useState)(
|
|
80899
|
+
() => formatBytes(process33.memoryUsage().rss)
|
|
80900
|
+
);
|
|
80901
|
+
const [memoryUsageColor, setMemoryUsageColor] = (0, import_react71.useState)(
|
|
80902
|
+
() => process33.memoryUsage().rss >= 2 * 1024 * 1024 * 1024 ? theme.status.error : color
|
|
80903
|
+
);
|
|
80887
80904
|
(0, import_react71.useEffect)(() => {
|
|
80888
80905
|
if (!isActive) {
|
|
80889
80906
|
return;
|
|
80890
80907
|
}
|
|
80891
80908
|
const updateMemory = () => {
|
|
80892
80909
|
const usage = process33.memoryUsage().rss;
|
|
80893
|
-
|
|
80894
|
-
|
|
80895
|
-
|
|
80896
|
-
);
|
|
80910
|
+
const formatted = formatBytes(usage);
|
|
80911
|
+
const nextColor = usage >= 2 * 1024 * 1024 * 1024 ? theme.status.error : color;
|
|
80912
|
+
setMemoryUsage((prev) => prev === formatted ? prev : formatted);
|
|
80913
|
+
setMemoryUsageColor((prev) => prev === nextColor ? prev : nextColor);
|
|
80897
80914
|
};
|
|
80898
80915
|
const intervalId = setInterval(updateMemory, 2e3);
|
|
80899
80916
|
updateMemory();
|
|
@@ -81387,7 +81404,13 @@ var Footer = () => {
|
|
|
81387
81404
|
addCol(
|
|
81388
81405
|
id,
|
|
81389
81406
|
header,
|
|
81390
|
-
() => /* @__PURE__ */ (0, import_jsx_runtime27.jsx)(
|
|
81407
|
+
() => /* @__PURE__ */ (0, import_jsx_runtime27.jsx)(
|
|
81408
|
+
MemoryUsageDisplay,
|
|
81409
|
+
{
|
|
81410
|
+
color: itemColor,
|
|
81411
|
+
isActive: !copyModeEnabled && uiState.constrainHeight
|
|
81412
|
+
}
|
|
81413
|
+
),
|
|
81391
81414
|
10
|
|
81392
81415
|
);
|
|
81393
81416
|
break;
|
|
@@ -81413,7 +81436,7 @@ var Footer = () => {
|
|
|
81413
81436
|
case "auth": {
|
|
81414
81437
|
if (!settings.merged.ui.showUserIdentity) break;
|
|
81415
81438
|
if (!authType) break;
|
|
81416
|
-
const displayStr = authType ===
|
|
81439
|
+
const displayStr = authType === AuthType.LOGIN_WITH_GOOGLE ? email ?? "google" : authType;
|
|
81417
81440
|
addCol(
|
|
81418
81441
|
id,
|
|
81419
81442
|
header,
|
|
@@ -81878,6 +81901,18 @@ var import_react74 = __toESM(require_react(), 1);
|
|
|
81878
81901
|
|
|
81879
81902
|
// packages/cli/src/ui/utils/rewindFileOps.ts
|
|
81880
81903
|
import fs32 from "node:fs/promises";
|
|
81904
|
+
function isPartWithKey(part, key) {
|
|
81905
|
+
return typeof part === "object" && part !== null && key in part;
|
|
81906
|
+
}
|
|
81907
|
+
function isToolResponseMessage(msg) {
|
|
81908
|
+
if (msg.type !== "user" || !Array.isArray(msg.content) || msg.content.length === 0) {
|
|
81909
|
+
return false;
|
|
81910
|
+
}
|
|
81911
|
+
const parts = msg.content;
|
|
81912
|
+
return parts.some((p2) => isPartWithKey(p2, "functionResponse")) && parts.every(
|
|
81913
|
+
(p2) => isPartWithKey(p2, "functionResponse") || isPartWithKey(p2, "inlineData") || isPartWithKey(p2, "fileData")
|
|
81914
|
+
);
|
|
81915
|
+
}
|
|
81881
81916
|
function calculateTurnStats(conversation, userMessage) {
|
|
81882
81917
|
const msgIndex = conversation.messages.indexOf(userMessage);
|
|
81883
81918
|
if (msgIndex === -1) return null;
|
|
@@ -81887,7 +81922,9 @@ function calculateTurnStats(conversation, userMessage) {
|
|
|
81887
81922
|
let hasEdits = false;
|
|
81888
81923
|
for (let i = msgIndex + 1; i < conversation.messages.length; i++) {
|
|
81889
81924
|
const msg = conversation.messages[i];
|
|
81890
|
-
if (msg.type === "user")
|
|
81925
|
+
if (msg.type === "user" && !isToolResponseMessage(msg)) {
|
|
81926
|
+
break;
|
|
81927
|
+
}
|
|
81891
81928
|
if (msg.type === "gemini" && msg.toolCalls) {
|
|
81892
81929
|
for (const toolCall of msg.toolCalls) {
|
|
81893
81930
|
const fileDiff = getFileDiffFromResultDisplay(toolCall.resultDisplay);
|
|
@@ -82246,7 +82283,9 @@ var RewindViewer = ({
|
|
|
82246
82283
|
null
|
|
82247
82284
|
);
|
|
82248
82285
|
const interactions = (0, import_react76.useMemo)(
|
|
82249
|
-
() => conversation.messages.filter(
|
|
82286
|
+
() => conversation.messages.filter(
|
|
82287
|
+
(msg) => msg.type === "user" && !isToolResponseMessage(msg)
|
|
82288
|
+
),
|
|
82250
82289
|
[conversation.messages]
|
|
82251
82290
|
);
|
|
82252
82291
|
const items = (0, import_react76.useMemo)(() => {
|
|
@@ -83181,12 +83220,12 @@ import path29 from "node:path";
|
|
|
83181
83220
|
function getIdeStatusMessage(ideClient) {
|
|
83182
83221
|
const connection = ideClient.getConnectionStatus();
|
|
83183
83222
|
switch (connection.status) {
|
|
83184
|
-
case
|
|
83223
|
+
case IDEConnectionStatus.Connected:
|
|
83185
83224
|
return {
|
|
83186
83225
|
messageType: "info",
|
|
83187
83226
|
content: `\u{1F7E2} Connected to ${ideClient.getDetectedIdeDisplayName()}`
|
|
83188
83227
|
};
|
|
83189
|
-
case
|
|
83228
|
+
case IDEConnectionStatus.Connecting:
|
|
83190
83229
|
return {
|
|
83191
83230
|
messageType: "info",
|
|
83192
83231
|
content: `\u{1F7E1} Connecting...`
|
|
@@ -83227,7 +83266,7 @@ ${infoMessage}`;
|
|
|
83227
83266
|
async function getIdeStatusMessageWithFiles(ideClient) {
|
|
83228
83267
|
const connection = ideClient.getConnectionStatus();
|
|
83229
83268
|
switch (connection.status) {
|
|
83230
|
-
case
|
|
83269
|
+
case IDEConnectionStatus.Connected: {
|
|
83231
83270
|
let content = `\u{1F7E2} Connected to ${ideClient.getDetectedIdeDisplayName()}`;
|
|
83232
83271
|
const context = ideContextStore.get();
|
|
83233
83272
|
const openFiles = context?.workspaceState?.openFiles;
|
|
@@ -83239,7 +83278,7 @@ async function getIdeStatusMessageWithFiles(ideClient) {
|
|
|
83239
83278
|
content
|
|
83240
83279
|
};
|
|
83241
83280
|
}
|
|
83242
|
-
case
|
|
83281
|
+
case IDEConnectionStatus.Connecting:
|
|
83243
83282
|
return {
|
|
83244
83283
|
messageType: "info",
|
|
83245
83284
|
content: `\u{1F7E1} Connecting...`
|
|
@@ -83261,7 +83300,7 @@ async function setIdeModeAndSyncConnection(config, value, options = {}) {
|
|
|
83261
83300
|
const ideClient = await IdeClient.getInstance();
|
|
83262
83301
|
if (value) {
|
|
83263
83302
|
await ideClient.connect(options);
|
|
83264
|
-
logIdeConnection(config, new IdeConnectionEvent(
|
|
83303
|
+
logIdeConnection(config, new IdeConnectionEvent(IdeConnectionType.SESSION));
|
|
83265
83304
|
} else {
|
|
83266
83305
|
await ideClient.disconnect();
|
|
83267
83306
|
}
|
|
@@ -83349,7 +83388,7 @@ var ideCommand = async () => {
|
|
|
83349
83388
|
logToConsole: false
|
|
83350
83389
|
}
|
|
83351
83390
|
);
|
|
83352
|
-
if (ideClient.getConnectionStatus().status ===
|
|
83391
|
+
if (ideClient.getConnectionStatus().status === IDEConnectionStatus.Connected) {
|
|
83353
83392
|
break;
|
|
83354
83393
|
}
|
|
83355
83394
|
await new Promise((resolve9) => setTimeout(resolve9, 500));
|
|
@@ -83426,7 +83465,7 @@ var ideCommand = async () => {
|
|
|
83426
83465
|
}
|
|
83427
83466
|
};
|
|
83428
83467
|
const { status } = ideClient.getConnectionStatus();
|
|
83429
|
-
const isConnected = status ===
|
|
83468
|
+
const isConnected = status === IDEConnectionStatus.Connected;
|
|
83430
83469
|
if (isConnected) {
|
|
83431
83470
|
ideSlashCommand.subCommands = [statusCommand2, disableCommand5];
|
|
83432
83471
|
} else {
|
|
@@ -83526,13 +83565,13 @@ Use /mcp auth <server-name> to authenticate.`
|
|
|
83526
83565
|
const displayListener = (message) => {
|
|
83527
83566
|
context.ui.addItem({ type: "info", text: message });
|
|
83528
83567
|
};
|
|
83529
|
-
coreEvents.on(
|
|
83568
|
+
coreEvents.on(CoreEvent.OauthDisplayMessage, displayListener);
|
|
83530
83569
|
try {
|
|
83531
83570
|
context.ui.addItem({
|
|
83532
83571
|
type: "info",
|
|
83533
83572
|
text: `Starting OAuth authentication for MCP server '${serverName}'...`
|
|
83534
83573
|
});
|
|
83535
|
-
const { MCPOAuthProvider } = await import("./
|
|
83574
|
+
const { MCPOAuthProvider } = await import("./dist-BBUYPVDB.js");
|
|
83536
83575
|
let oauthConfig = server.oauth;
|
|
83537
83576
|
if (!oauthConfig) {
|
|
83538
83577
|
oauthConfig = { enabled: false };
|
|
@@ -83569,7 +83608,7 @@ Use /mcp auth <server-name> to authenticate.`
|
|
|
83569
83608
|
content: `Failed to authenticate with MCP server '${serverName}': ${getErrorMessage(error)}`
|
|
83570
83609
|
};
|
|
83571
83610
|
} finally {
|
|
83572
|
-
coreEvents.removeListener(
|
|
83611
|
+
coreEvents.removeListener(CoreEvent.OauthDisplayMessage, displayListener);
|
|
83573
83612
|
}
|
|
83574
83613
|
},
|
|
83575
83614
|
completion: async (context, partialArg) => {
|
|
@@ -83615,10 +83654,10 @@ var listAction2 = async (context, showDescriptions = false, showSchema = false,
|
|
|
83615
83654
|
}
|
|
83616
83655
|
const serverNames = Object.keys(mcpServers);
|
|
83617
83656
|
const connectingServers = serverNames.filter(
|
|
83618
|
-
(name) => getMCPServerStatus(name) ===
|
|
83657
|
+
(name) => getMCPServerStatus(name) === MCPServerStatus.CONNECTING
|
|
83619
83658
|
);
|
|
83620
83659
|
const discoveryState = getMCPDiscoveryState();
|
|
83621
|
-
const discoveryInProgress = discoveryState ===
|
|
83660
|
+
const discoveryInProgress = discoveryState === MCPDiscoveryState.IN_PROGRESS || connectingServers.length > 0;
|
|
83622
83661
|
const allTools = toolRegistry.getAllTools();
|
|
83623
83662
|
const mcpTools = allTools.filter((tool) => tool instanceof DiscoveredMCPTool);
|
|
83624
83663
|
const promptRegistry = config.getPromptRegistry();
|
|
@@ -97489,10 +97528,16 @@ var MaxSizedBox = ({
|
|
|
97489
97528
|
(0, import_react79.useEffect)(() => {
|
|
97490
97529
|
if (totalHiddenLines > 0) {
|
|
97491
97530
|
addOverflowingId?.(id);
|
|
97492
|
-
} else {
|
|
97531
|
+
} else if (effectiveMaxHeight !== void 0) {
|
|
97493
97532
|
removeOverflowingId?.(id);
|
|
97494
97533
|
}
|
|
97495
|
-
}, [
|
|
97534
|
+
}, [
|
|
97535
|
+
id,
|
|
97536
|
+
totalHiddenLines,
|
|
97537
|
+
effectiveMaxHeight,
|
|
97538
|
+
addOverflowingId,
|
|
97539
|
+
removeOverflowingId
|
|
97540
|
+
]);
|
|
97496
97541
|
(0, import_react79.useEffect)(
|
|
97497
97542
|
() => () => {
|
|
97498
97543
|
removeOverflowingId?.(id);
|
|
@@ -99390,7 +99435,7 @@ Return a JSON object with:
|
|
|
99390
99435
|
},
|
|
99391
99436
|
abortSignal: new AbortController().signal,
|
|
99392
99437
|
promptId: "triage-duplicates",
|
|
99393
|
-
role:
|
|
99438
|
+
role: LlmRole.UTILITY_TOOL
|
|
99394
99439
|
});
|
|
99395
99440
|
const rec = response;
|
|
99396
99441
|
let canonical;
|
|
@@ -100224,7 +100269,7 @@ Return a JSON object with:
|
|
|
100224
100269
|
},
|
|
100225
100270
|
abortSignal: abortControllerRef.current.signal,
|
|
100226
100271
|
promptId: "triage-issues",
|
|
100227
|
-
role:
|
|
100272
|
+
role: LlmRole.UTILITY_TOOL
|
|
100228
100273
|
});
|
|
100229
100274
|
return response;
|
|
100230
100275
|
},
|
|
@@ -100798,8 +100843,8 @@ var planCommand = {
|
|
|
100798
100843
|
return;
|
|
100799
100844
|
}
|
|
100800
100845
|
const previousApprovalMode = config.getApprovalMode();
|
|
100801
|
-
config.setApprovalMode(
|
|
100802
|
-
if (previousApprovalMode !==
|
|
100846
|
+
config.setApprovalMode(ApprovalMode.PLAN);
|
|
100847
|
+
if (previousApprovalMode !== ApprovalMode.PLAN) {
|
|
100803
100848
|
coreEvents.emitFeedback("info", "Switched to Plan Mode.");
|
|
100804
100849
|
}
|
|
100805
100850
|
if (context.invocation?.args) {
|
|
@@ -100858,10 +100903,10 @@ var categorizeRulesByMode = (rules) => {
|
|
|
100858
100903
|
rules.forEach((rule) => {
|
|
100859
100904
|
const modes = rule.modes?.length ? rule.modes : ALL_MODES;
|
|
100860
100905
|
const modeSet = new Set(modes);
|
|
100861
|
-
if (modeSet.has(
|
|
100862
|
-
if (modeSet.has(
|
|
100863
|
-
if (modeSet.has(
|
|
100864
|
-
if (modeSet.has(
|
|
100906
|
+
if (modeSet.has(ApprovalMode.DEFAULT)) result.normal.push(rule);
|
|
100907
|
+
if (modeSet.has(ApprovalMode.AUTO_EDIT)) result.autoEdit.push(rule);
|
|
100908
|
+
if (modeSet.has(ApprovalMode.YOLO)) result.yolo.push(rule);
|
|
100909
|
+
if (modeSet.has(ApprovalMode.PLAN)) result.plan.push(rule);
|
|
100865
100910
|
});
|
|
100866
100911
|
return result;
|
|
100867
100912
|
};
|
|
@@ -102242,7 +102287,7 @@ var upgradeCommand = {
|
|
|
102242
102287
|
action: async (context) => {
|
|
102243
102288
|
const config = context.services.agentContext?.config;
|
|
102244
102289
|
const authType = config?.getContentGeneratorConfig()?.authType;
|
|
102245
|
-
if (authType !==
|
|
102290
|
+
if (authType !== AuthType.LOGIN_WITH_GOOGLE) {
|
|
102246
102291
|
return {
|
|
102247
102292
|
type: "message",
|
|
102248
102293
|
messageType: "error",
|
|
@@ -102471,7 +102516,7 @@ var BuiltinCommandLoader = class {
|
|
|
102471
102516
|
setupGithubCommand,
|
|
102472
102517
|
terminalSetupCommand,
|
|
102473
102518
|
...this.config?.isVoiceModeEnabled() ? [voiceCommand] : [],
|
|
102474
|
-
...this.config?.getContentGeneratorConfig()?.authType ===
|
|
102519
|
+
...this.config?.getContentGeneratorConfig()?.authType === AuthType.LOGIN_WITH_GOOGLE ? [upgradeCommand] : []
|
|
102475
102520
|
];
|
|
102476
102521
|
handle?.end();
|
|
102477
102522
|
return allDefinitions.filter((cmd) => cmd !== null);
|
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
const require = (await import('node:module')).createRequire(import.meta.url); const __chunk_filename = (await import('node:url')).fileURLToPath(import.meta.url); const __chunk_dirname = (await import('node:path')).dirname(__chunk_filename);
|
|
2
2
|
import {
|
|
3
3
|
runExitCleanup
|
|
4
|
-
} from "./chunk-
|
|
4
|
+
} from "./chunk-7BGM6KG2.js";
|
|
5
5
|
import {
|
|
6
6
|
RELEASE_CHANNEL_STABILITY,
|
|
7
7
|
debugLogger,
|
|
8
8
|
getChannelFromVersion,
|
|
9
9
|
isGitRepository
|
|
10
|
-
} from "./chunk-
|
|
10
|
+
} from "./chunk-ARJWMIGO.js";
|
|
11
11
|
|
|
12
12
|
// packages/cli/src/utils/installationInfo.ts
|
|
13
13
|
import * as fs from "node:fs";
|