@google/gemini-cli 0.64.0-preview.0 → 0.64.0-preview.1
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-EDVFNWRG.js → chunk-2XMCTNPW.js} +1 -1
- package/bundle/{chunk-HN74ORTP.js → chunk-46DG3MEK.js} +15 -3
- package/bundle/{chunk-UFQDAROY.js → chunk-4TPFLAND.js} +1 -1
- package/bundle/{chunk-A4TO2DY2.js → chunk-627EICDK.js} +8258 -14927
- package/bundle/{chunk-EDYPRCAA.js → chunk-6JF3XGX6.js} +2 -2
- package/bundle/{chunk-SDWOC67Z.js → chunk-7AV6KELE.js} +1 -1
- package/bundle/{chunk-EBP6K2WG.js → chunk-7FPYEHDV.js} +25 -9
- package/bundle/{chunk-U76XPSKR.js → chunk-7OAPTXNW.js} +89 -60
- package/bundle/{chunk-EFX5XL6M.js → chunk-BONG2QK5.js} +2 -2
- package/bundle/{chunk-VBVCLWLA.js → chunk-BRVQMVD5.js} +2 -2
- package/bundle/{chunk-2NQXIWQK.js → chunk-BSE7BCTQ.js} +15 -3
- package/bundle/chunk-BYVRH4VZ.js +103137 -0
- package/bundle/{chunk-HSZIYPL6.js → chunk-EE4FVMPM.js} +3 -3
- package/bundle/{chunk-QUCRASYB.js → chunk-GWH2CDNQ.js} +1 -1
- package/bundle/{chunk-NX7TO2DU.js → chunk-H2WBGLUF.js} +1 -1
- package/bundle/{chunk-Y2HXXBXI.js → chunk-J7KGQZGT.js} +1 -1
- package/bundle/{chunk-UBGF6JU5.js → chunk-JLBO43LX.js} +1 -1
- package/bundle/{chunk-ZPLFLZQA.js → chunk-L3JNREL2.js} +21 -7
- package/bundle/{chunk-ZQW7OGUO.js → chunk-MN5WGELB.js} +426 -91
- package/bundle/{chunk-6OFXOGEG.js → chunk-NTBZBCDY.js} +456 -94
- package/bundle/{chunk-ZOHM7BPT.js → chunk-ONZZ4MZP.js} +1 -1
- package/bundle/chunk-POXVKWMH.js +17519 -0
- package/bundle/{chunk-MLSLNORV.js → chunk-R7OEYEVK.js} +3 -3
- package/bundle/{chunk-KCCVXZ52.js → chunk-RIRMXE4G.js} +25 -9
- package/bundle/{chunk-2VN53SWW.js → chunk-RQB6UOWL.js} +9 -8
- package/bundle/{chunk-VJYKQD5D.js → chunk-SQZOWFWU.js} +3 -3
- package/bundle/chunk-T7UXARRX.js +401531 -0
- package/bundle/chunk-TDYDNMXH.js +425 -0
- package/bundle/chunk-TVJ4WAFU.js +512 -0
- package/bundle/chunk-XNLASMX4.js +154 -0
- package/bundle/chunk-Y3EQFIOM.js +118 -0
- package/bundle/chunk-YKGBOB2S.js +1571 -0
- package/bundle/{cleanup-GGCB2LVD.js → cleanup-5HA3CDPH.js} +2 -2
- package/bundle/{cleanup-JRDG3OTL.js → cleanup-LXXTR2OE.js} +2 -2
- package/bundle/{cleanup-SSW6IXTR.js → cleanup-RM72YALN.js} +2 -2
- package/bundle/cleanup-TBTZ6WZD.js +32 -0
- package/bundle/{core-IUIZE6JW.js → core-NBQGNNOM.js} +11 -1
- package/bundle/{devtoolsService-3SADPKKB.js → devtoolsService-BUAVC3ZD.js} +2 -2
- package/bundle/{devtoolsService-XZCKFZP5.js → devtoolsService-DCRIOTR4.js} +2 -2
- package/bundle/{devtoolsService-MF6JKRUV.js → devtoolsService-PXS65V3Y.js} +4 -3
- package/bundle/devtoolsService-ZHFOHPIS.js +4359 -0
- package/bundle/{dist-7L3BRW6V.js → dist-24APVFHT.js} +11 -1
- package/bundle/{core-6HRWFQZW.js → dist-EOOSNLUQ.js} +11 -1
- package/bundle/dist-YP3VMVL6.js +2262 -0
- package/bundle/docs/tools/mcp-server.md +41 -12
- package/bundle/{gemini-JPMMQ3KA.js → gemini-LHZDQRUM.js} +13 -13
- package/bundle/{gemini-ZMMDUAQJ.js → gemini-Q4LI2KHU.js} +214 -198
- package/bundle/gemini-QM6PZXIH.js +17934 -0
- package/bundle/{gemini-QOQNG5VY.js → gemini-UEMV4Y7B.js} +13 -13
- package/bundle/gemini.js +7 -7
- package/bundle/{interactiveCli-R3P4A3FC.js → interactiveCli-HMZ5ZWK4.js} +9 -20
- package/bundle/{interactiveCli-UDWGRVJL.js → interactiveCli-IQQYS4AV.js} +9 -20
- package/bundle/{interactiveCli-3I4TG5SK.js → interactiveCli-QCNSW3M7.js} +313 -305
- package/bundle/interactiveCli-QXZXFSNY.js +34968 -0
- package/bundle/{liteRtServerManager-OVPUSK2T.js → liteRtServerManager-2I4N5IEZ.js} +4 -4
- package/bundle/{liteRtServerManager-RAV63AGE.js → liteRtServerManager-3IZ2LKBD.js} +4 -4
- package/bundle/{liteRtServerManager-4MWCEVVM.js → liteRtServerManager-RABYR6TB.js} +4 -4
- package/bundle/liteRtServerManager-T3MOB7VG.js +65 -0
- package/bundle/{oauth2-provider-FVTRRJZR.js → oauth2-provider-I3CU23H3.js} +1 -1
- package/bundle/{oauth2-provider-EWOA64PR.js → oauth2-provider-INBLO6HF.js} +38 -72
- package/bundle/oauth2-provider-UZV2BJA3.js +235 -0
- package/bundle/{oauth2-provider-XFP63FGJ.js → oauth2-provider-XFPEOXNY.js} +1 -1
- package/bundle/{start-DJAIXPPY.js → start-4UWH3BI7.js} +6 -6
- package/bundle/{start-VQQ2Q5KT.js → start-CQTZWDLV.js} +6 -6
- package/bundle/{start-5O7TBK5L.js → start-D6DJS7SZ.js} +6 -6
- package/bundle/start-IXFELTCY.js +18 -0
- package/package.json +1 -1
|
@@ -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-4TPFLAND.js";
|
|
5
5
|
import {
|
|
6
6
|
RELEASE_CHANNEL_STABILITY,
|
|
7
7
|
debugLogger,
|
|
8
8
|
getChannelFromVersion,
|
|
9
9
|
isGitRepository
|
|
10
|
-
} from "./chunk-
|
|
10
|
+
} from "./chunk-T7UXARRX.js";
|
|
11
11
|
|
|
12
12
|
// packages/cli/src/utils/installationInfo.ts
|
|
13
13
|
import * as fs from "node:fs";
|
|
@@ -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-2XMCTNPW.js";
|
|
6
6
|
import {
|
|
7
7
|
AppEvent,
|
|
8
8
|
appEvents
|
|
@@ -63,15 +63,15 @@ import {
|
|
|
63
63
|
stripUnsafeCharacters,
|
|
64
64
|
toCodePoints,
|
|
65
65
|
validateCustomTheme
|
|
66
|
-
} from "./chunk-
|
|
66
|
+
} from "./chunk-46DG3MEK.js";
|
|
67
67
|
import {
|
|
68
68
|
isDevelopment
|
|
69
|
-
} from "./chunk-
|
|
69
|
+
} from "./chunk-TDYDNMXH.js";
|
|
70
70
|
import {
|
|
71
71
|
emptyIcon,
|
|
72
72
|
mapCoreStatusToDisplayStatus,
|
|
73
73
|
require_react
|
|
74
|
-
} from "./chunk-
|
|
74
|
+
} from "./chunk-H2WBGLUF.js";
|
|
75
75
|
import {
|
|
76
76
|
ALL_EDITORS,
|
|
77
77
|
ApprovalMode,
|
|
@@ -252,7 +252,7 @@ import {
|
|
|
252
252
|
tokenLimit,
|
|
253
253
|
uiTelemetryService,
|
|
254
254
|
unescapePath
|
|
255
|
-
} from "./chunk-
|
|
255
|
+
} from "./chunk-MN5WGELB.js";
|
|
256
256
|
import {
|
|
257
257
|
require_src
|
|
258
258
|
} from "./chunk-L6PII3GR.js";
|
|
@@ -77764,7 +77764,7 @@ var authCommand = {
|
|
|
77764
77764
|
import process29 from "node:process";
|
|
77765
77765
|
|
|
77766
77766
|
// packages/cli/src/generated/git-commit.ts
|
|
77767
|
-
var GIT_COMMIT_INFO = "
|
|
77767
|
+
var GIT_COMMIT_INFO = "581fdbbfa";
|
|
77768
77768
|
|
|
77769
77769
|
// packages/cli/src/ui/utils/historyExportUtils.ts
|
|
77770
77770
|
import * as fsPromises from "node:fs/promises";
|
|
@@ -81891,6 +81891,18 @@ var import_react74 = __toESM(require_react(), 1);
|
|
|
81891
81891
|
|
|
81892
81892
|
// packages/cli/src/ui/utils/rewindFileOps.ts
|
|
81893
81893
|
import fs32 from "node:fs/promises";
|
|
81894
|
+
function isPartWithKey(part, key) {
|
|
81895
|
+
return typeof part === "object" && part !== null && key in part;
|
|
81896
|
+
}
|
|
81897
|
+
function isToolResponseMessage(msg) {
|
|
81898
|
+
if (msg.type !== "user" || !Array.isArray(msg.content) || msg.content.length === 0) {
|
|
81899
|
+
return false;
|
|
81900
|
+
}
|
|
81901
|
+
const parts = msg.content;
|
|
81902
|
+
return parts.some((p2) => isPartWithKey(p2, "functionResponse")) && parts.every(
|
|
81903
|
+
(p2) => isPartWithKey(p2, "functionResponse") || isPartWithKey(p2, "inlineData") || isPartWithKey(p2, "fileData")
|
|
81904
|
+
);
|
|
81905
|
+
}
|
|
81894
81906
|
function calculateTurnStats(conversation, userMessage) {
|
|
81895
81907
|
const msgIndex = conversation.messages.indexOf(userMessage);
|
|
81896
81908
|
if (msgIndex === -1) return null;
|
|
@@ -81900,7 +81912,9 @@ function calculateTurnStats(conversation, userMessage) {
|
|
|
81900
81912
|
let hasEdits = false;
|
|
81901
81913
|
for (let i = msgIndex + 1; i < conversation.messages.length; i++) {
|
|
81902
81914
|
const msg = conversation.messages[i];
|
|
81903
|
-
if (msg.type === "user")
|
|
81915
|
+
if (msg.type === "user" && !isToolResponseMessage(msg)) {
|
|
81916
|
+
break;
|
|
81917
|
+
}
|
|
81904
81918
|
if (msg.type === "gemini" && msg.toolCalls) {
|
|
81905
81919
|
for (const toolCall of msg.toolCalls) {
|
|
81906
81920
|
const fileDiff = getFileDiffFromResultDisplay(toolCall.resultDisplay);
|
|
@@ -82259,7 +82273,9 @@ var RewindViewer = ({
|
|
|
82259
82273
|
null
|
|
82260
82274
|
);
|
|
82261
82275
|
const interactions = (0, import_react76.useMemo)(
|
|
82262
|
-
() => conversation.messages.filter(
|
|
82276
|
+
() => conversation.messages.filter(
|
|
82277
|
+
(msg) => msg.type === "user" && !isToolResponseMessage(msg)
|
|
82278
|
+
),
|
|
82263
82279
|
[conversation.messages]
|
|
82264
82280
|
);
|
|
82265
82281
|
const items = (0, import_react76.useMemo)(() => {
|
|
@@ -83545,7 +83561,7 @@ Use /mcp auth <server-name> to authenticate.`
|
|
|
83545
83561
|
type: "info",
|
|
83546
83562
|
text: `Starting OAuth authentication for MCP server '${serverName}'...`
|
|
83547
83563
|
});
|
|
83548
|
-
const { MCPOAuthProvider } = await import("./dist-
|
|
83564
|
+
const { MCPOAuthProvider } = await import("./dist-EOOSNLUQ.js");
|
|
83549
83565
|
let oauthConfig = server.oauth;
|
|
83550
83566
|
if (!oauthConfig) {
|
|
83551
83567
|
oauthConfig = { enabled: false };
|
|
@@ -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-ONZZ4MZP.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-L3JNREL2.js";
|
|
67
67
|
import {
|
|
68
68
|
isDevelopment
|
|
69
|
-
} from "./chunk-
|
|
69
|
+
} from "./chunk-6JF3XGX6.js";
|
|
70
70
|
import {
|
|
71
71
|
emptyIcon,
|
|
72
72
|
mapCoreStatusToDisplayStatus,
|
|
73
73
|
require_react
|
|
74
|
-
} from "./chunk-
|
|
74
|
+
} from "./chunk-RQB6UOWL.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-T7UXARRX.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 = "581fdbbfa";
|
|
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) {
|
|
@@ -81413,7 +81426,7 @@ var Footer = () => {
|
|
|
81413
81426
|
case "auth": {
|
|
81414
81427
|
if (!settings.merged.ui.showUserIdentity) break;
|
|
81415
81428
|
if (!authType) break;
|
|
81416
|
-
const displayStr = authType ===
|
|
81429
|
+
const displayStr = authType === AuthType.LOGIN_WITH_GOOGLE ? email ?? "google" : authType;
|
|
81417
81430
|
addCol(
|
|
81418
81431
|
id,
|
|
81419
81432
|
header,
|
|
@@ -81878,6 +81891,18 @@ var import_react74 = __toESM(require_react(), 1);
|
|
|
81878
81891
|
|
|
81879
81892
|
// packages/cli/src/ui/utils/rewindFileOps.ts
|
|
81880
81893
|
import fs32 from "node:fs/promises";
|
|
81894
|
+
function isPartWithKey(part, key) {
|
|
81895
|
+
return typeof part === "object" && part !== null && key in part;
|
|
81896
|
+
}
|
|
81897
|
+
function isToolResponseMessage(msg) {
|
|
81898
|
+
if (msg.type !== "user" || !Array.isArray(msg.content) || msg.content.length === 0) {
|
|
81899
|
+
return false;
|
|
81900
|
+
}
|
|
81901
|
+
const parts = msg.content;
|
|
81902
|
+
return parts.some((p2) => isPartWithKey(p2, "functionResponse")) && parts.every(
|
|
81903
|
+
(p2) => isPartWithKey(p2, "functionResponse") || isPartWithKey(p2, "inlineData") || isPartWithKey(p2, "fileData")
|
|
81904
|
+
);
|
|
81905
|
+
}
|
|
81881
81906
|
function calculateTurnStats(conversation, userMessage) {
|
|
81882
81907
|
const msgIndex = conversation.messages.indexOf(userMessage);
|
|
81883
81908
|
if (msgIndex === -1) return null;
|
|
@@ -81887,7 +81912,9 @@ function calculateTurnStats(conversation, userMessage) {
|
|
|
81887
81912
|
let hasEdits = false;
|
|
81888
81913
|
for (let i = msgIndex + 1; i < conversation.messages.length; i++) {
|
|
81889
81914
|
const msg = conversation.messages[i];
|
|
81890
|
-
if (msg.type === "user")
|
|
81915
|
+
if (msg.type === "user" && !isToolResponseMessage(msg)) {
|
|
81916
|
+
break;
|
|
81917
|
+
}
|
|
81891
81918
|
if (msg.type === "gemini" && msg.toolCalls) {
|
|
81892
81919
|
for (const toolCall of msg.toolCalls) {
|
|
81893
81920
|
const fileDiff = getFileDiffFromResultDisplay(toolCall.resultDisplay);
|
|
@@ -82246,7 +82273,9 @@ var RewindViewer = ({
|
|
|
82246
82273
|
null
|
|
82247
82274
|
);
|
|
82248
82275
|
const interactions = (0, import_react76.useMemo)(
|
|
82249
|
-
() => conversation.messages.filter(
|
|
82276
|
+
() => conversation.messages.filter(
|
|
82277
|
+
(msg) => msg.type === "user" && !isToolResponseMessage(msg)
|
|
82278
|
+
),
|
|
82250
82279
|
[conversation.messages]
|
|
82251
82280
|
);
|
|
82252
82281
|
const items = (0, import_react76.useMemo)(() => {
|
|
@@ -83181,12 +83210,12 @@ import path29 from "node:path";
|
|
|
83181
83210
|
function getIdeStatusMessage(ideClient) {
|
|
83182
83211
|
const connection = ideClient.getConnectionStatus();
|
|
83183
83212
|
switch (connection.status) {
|
|
83184
|
-
case
|
|
83213
|
+
case IDEConnectionStatus.Connected:
|
|
83185
83214
|
return {
|
|
83186
83215
|
messageType: "info",
|
|
83187
83216
|
content: `\u{1F7E2} Connected to ${ideClient.getDetectedIdeDisplayName()}`
|
|
83188
83217
|
};
|
|
83189
|
-
case
|
|
83218
|
+
case IDEConnectionStatus.Connecting:
|
|
83190
83219
|
return {
|
|
83191
83220
|
messageType: "info",
|
|
83192
83221
|
content: `\u{1F7E1} Connecting...`
|
|
@@ -83227,7 +83256,7 @@ ${infoMessage}`;
|
|
|
83227
83256
|
async function getIdeStatusMessageWithFiles(ideClient) {
|
|
83228
83257
|
const connection = ideClient.getConnectionStatus();
|
|
83229
83258
|
switch (connection.status) {
|
|
83230
|
-
case
|
|
83259
|
+
case IDEConnectionStatus.Connected: {
|
|
83231
83260
|
let content = `\u{1F7E2} Connected to ${ideClient.getDetectedIdeDisplayName()}`;
|
|
83232
83261
|
const context = ideContextStore.get();
|
|
83233
83262
|
const openFiles = context?.workspaceState?.openFiles;
|
|
@@ -83239,7 +83268,7 @@ async function getIdeStatusMessageWithFiles(ideClient) {
|
|
|
83239
83268
|
content
|
|
83240
83269
|
};
|
|
83241
83270
|
}
|
|
83242
|
-
case
|
|
83271
|
+
case IDEConnectionStatus.Connecting:
|
|
83243
83272
|
return {
|
|
83244
83273
|
messageType: "info",
|
|
83245
83274
|
content: `\u{1F7E1} Connecting...`
|
|
@@ -83261,7 +83290,7 @@ async function setIdeModeAndSyncConnection(config, value, options = {}) {
|
|
|
83261
83290
|
const ideClient = await IdeClient.getInstance();
|
|
83262
83291
|
if (value) {
|
|
83263
83292
|
await ideClient.connect(options);
|
|
83264
|
-
logIdeConnection(config, new IdeConnectionEvent(
|
|
83293
|
+
logIdeConnection(config, new IdeConnectionEvent(IdeConnectionType.SESSION));
|
|
83265
83294
|
} else {
|
|
83266
83295
|
await ideClient.disconnect();
|
|
83267
83296
|
}
|
|
@@ -83349,7 +83378,7 @@ var ideCommand = async () => {
|
|
|
83349
83378
|
logToConsole: false
|
|
83350
83379
|
}
|
|
83351
83380
|
);
|
|
83352
|
-
if (ideClient.getConnectionStatus().status ===
|
|
83381
|
+
if (ideClient.getConnectionStatus().status === IDEConnectionStatus.Connected) {
|
|
83353
83382
|
break;
|
|
83354
83383
|
}
|
|
83355
83384
|
await new Promise((resolve9) => setTimeout(resolve9, 500));
|
|
@@ -83426,7 +83455,7 @@ var ideCommand = async () => {
|
|
|
83426
83455
|
}
|
|
83427
83456
|
};
|
|
83428
83457
|
const { status } = ideClient.getConnectionStatus();
|
|
83429
|
-
const isConnected = status ===
|
|
83458
|
+
const isConnected = status === IDEConnectionStatus.Connected;
|
|
83430
83459
|
if (isConnected) {
|
|
83431
83460
|
ideSlashCommand.subCommands = [statusCommand2, disableCommand5];
|
|
83432
83461
|
} else {
|
|
@@ -83526,13 +83555,13 @@ Use /mcp auth <server-name> to authenticate.`
|
|
|
83526
83555
|
const displayListener = (message) => {
|
|
83527
83556
|
context.ui.addItem({ type: "info", text: message });
|
|
83528
83557
|
};
|
|
83529
|
-
coreEvents.on(
|
|
83558
|
+
coreEvents.on(CoreEvent.OauthDisplayMessage, displayListener);
|
|
83530
83559
|
try {
|
|
83531
83560
|
context.ui.addItem({
|
|
83532
83561
|
type: "info",
|
|
83533
83562
|
text: `Starting OAuth authentication for MCP server '${serverName}'...`
|
|
83534
83563
|
});
|
|
83535
|
-
const { MCPOAuthProvider } = await import("./
|
|
83564
|
+
const { MCPOAuthProvider } = await import("./dist-24APVFHT.js");
|
|
83536
83565
|
let oauthConfig = server.oauth;
|
|
83537
83566
|
if (!oauthConfig) {
|
|
83538
83567
|
oauthConfig = { enabled: false };
|
|
@@ -83569,7 +83598,7 @@ Use /mcp auth <server-name> to authenticate.`
|
|
|
83569
83598
|
content: `Failed to authenticate with MCP server '${serverName}': ${getErrorMessage(error)}`
|
|
83570
83599
|
};
|
|
83571
83600
|
} finally {
|
|
83572
|
-
coreEvents.removeListener(
|
|
83601
|
+
coreEvents.removeListener(CoreEvent.OauthDisplayMessage, displayListener);
|
|
83573
83602
|
}
|
|
83574
83603
|
},
|
|
83575
83604
|
completion: async (context, partialArg) => {
|
|
@@ -83615,10 +83644,10 @@ var listAction2 = async (context, showDescriptions = false, showSchema = false,
|
|
|
83615
83644
|
}
|
|
83616
83645
|
const serverNames = Object.keys(mcpServers);
|
|
83617
83646
|
const connectingServers = serverNames.filter(
|
|
83618
|
-
(name) => getMCPServerStatus(name) ===
|
|
83647
|
+
(name) => getMCPServerStatus(name) === MCPServerStatus.CONNECTING
|
|
83619
83648
|
);
|
|
83620
83649
|
const discoveryState = getMCPDiscoveryState();
|
|
83621
|
-
const discoveryInProgress = discoveryState ===
|
|
83650
|
+
const discoveryInProgress = discoveryState === MCPDiscoveryState.IN_PROGRESS || connectingServers.length > 0;
|
|
83622
83651
|
const allTools = toolRegistry.getAllTools();
|
|
83623
83652
|
const mcpTools = allTools.filter((tool) => tool instanceof DiscoveredMCPTool);
|
|
83624
83653
|
const promptRegistry = config.getPromptRegistry();
|
|
@@ -99390,7 +99419,7 @@ Return a JSON object with:
|
|
|
99390
99419
|
},
|
|
99391
99420
|
abortSignal: new AbortController().signal,
|
|
99392
99421
|
promptId: "triage-duplicates",
|
|
99393
|
-
role:
|
|
99422
|
+
role: LlmRole.UTILITY_TOOL
|
|
99394
99423
|
});
|
|
99395
99424
|
const rec = response;
|
|
99396
99425
|
let canonical;
|
|
@@ -100224,7 +100253,7 @@ Return a JSON object with:
|
|
|
100224
100253
|
},
|
|
100225
100254
|
abortSignal: abortControllerRef.current.signal,
|
|
100226
100255
|
promptId: "triage-issues",
|
|
100227
|
-
role:
|
|
100256
|
+
role: LlmRole.UTILITY_TOOL
|
|
100228
100257
|
});
|
|
100229
100258
|
return response;
|
|
100230
100259
|
},
|
|
@@ -100798,8 +100827,8 @@ var planCommand = {
|
|
|
100798
100827
|
return;
|
|
100799
100828
|
}
|
|
100800
100829
|
const previousApprovalMode = config.getApprovalMode();
|
|
100801
|
-
config.setApprovalMode(
|
|
100802
|
-
if (previousApprovalMode !==
|
|
100830
|
+
config.setApprovalMode(ApprovalMode.PLAN);
|
|
100831
|
+
if (previousApprovalMode !== ApprovalMode.PLAN) {
|
|
100803
100832
|
coreEvents.emitFeedback("info", "Switched to Plan Mode.");
|
|
100804
100833
|
}
|
|
100805
100834
|
if (context.invocation?.args) {
|
|
@@ -100858,10 +100887,10 @@ var categorizeRulesByMode = (rules) => {
|
|
|
100858
100887
|
rules.forEach((rule) => {
|
|
100859
100888
|
const modes = rule.modes?.length ? rule.modes : ALL_MODES;
|
|
100860
100889
|
const modeSet = new Set(modes);
|
|
100861
|
-
if (modeSet.has(
|
|
100862
|
-
if (modeSet.has(
|
|
100863
|
-
if (modeSet.has(
|
|
100864
|
-
if (modeSet.has(
|
|
100890
|
+
if (modeSet.has(ApprovalMode.DEFAULT)) result.normal.push(rule);
|
|
100891
|
+
if (modeSet.has(ApprovalMode.AUTO_EDIT)) result.autoEdit.push(rule);
|
|
100892
|
+
if (modeSet.has(ApprovalMode.YOLO)) result.yolo.push(rule);
|
|
100893
|
+
if (modeSet.has(ApprovalMode.PLAN)) result.plan.push(rule);
|
|
100865
100894
|
});
|
|
100866
100895
|
return result;
|
|
100867
100896
|
};
|
|
@@ -102242,7 +102271,7 @@ var upgradeCommand = {
|
|
|
102242
102271
|
action: async (context) => {
|
|
102243
102272
|
const config = context.services.agentContext?.config;
|
|
102244
102273
|
const authType = config?.getContentGeneratorConfig()?.authType;
|
|
102245
|
-
if (authType !==
|
|
102274
|
+
if (authType !== AuthType.LOGIN_WITH_GOOGLE) {
|
|
102246
102275
|
return {
|
|
102247
102276
|
type: "message",
|
|
102248
102277
|
messageType: "error",
|
|
@@ -102471,7 +102500,7 @@ var BuiltinCommandLoader = class {
|
|
|
102471
102500
|
setupGithubCommand,
|
|
102472
102501
|
terminalSetupCommand,
|
|
102473
102502
|
...this.config?.isVoiceModeEnabled() ? [voiceCommand] : [],
|
|
102474
|
-
...this.config?.getContentGeneratorConfig()?.authType ===
|
|
102503
|
+
...this.config?.getContentGeneratorConfig()?.authType === AuthType.LOGIN_WITH_GOOGLE ? [upgradeCommand] : []
|
|
102475
102504
|
];
|
|
102476
102505
|
handle?.end();
|
|
102477
102506
|
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-JLBO43LX.js";
|
|
5
5
|
import {
|
|
6
6
|
RELEASE_CHANNEL_STABILITY,
|
|
7
7
|
debugLogger,
|
|
8
8
|
getChannelFromVersion,
|
|
9
9
|
isGitRepository
|
|
10
|
-
} from "./chunk-
|
|
10
|
+
} from "./chunk-627EICDK.js";
|
|
11
11
|
|
|
12
12
|
// packages/cli/src/utils/installationInfo.ts
|
|
13
13
|
import * as fs from "node:fs";
|