@google/gemini-cli 0.64.0-preview.0 → 0.65.0-nightly.20261007.gef59c532f
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-2QX7AFU2.js} +1 -1
- package/bundle/{chunk-EDYPRCAA.js → chunk-354KMHUX.js} +2 -2
- package/bundle/{chunk-UFQDAROY.js → chunk-3F7OA7UU.js} +1 -1
- package/bundle/{chunk-HN74ORTP.js → chunk-46A63GIT.js} +27 -4
- package/bundle/{chunk-ZQW7OGUO.js → chunk-6FH32SR7.js} +184 -45
- package/bundle/{chunk-SDWOC67Z.js → chunk-7NUXN3UV.js} +1 -1
- package/bundle/{chunk-Y2HXXBXI.js → chunk-ASQYH7O3.js} +1 -1
- package/bundle/{chunk-EBP6K2WG.js → chunk-BT4BJCGX.js} +32 -16
- package/bundle/{chunk-UBGF6JU5.js → chunk-CIKQQ32X.js} +1 -1
- package/bundle/chunk-DIMRHS5O.js +154 -0
- package/bundle/{chunk-NX7TO2DU.js → chunk-EIHDEZQ3.js} +1 -1
- package/bundle/{chunk-QUCRASYB.js → chunk-FE5UXCSL.js} +1 -1
- package/bundle/{chunk-EFX5XL6M.js → chunk-FTB4FVEK.js} +2 -2
- package/bundle/{chunk-A4TO2DY2.js → chunk-HYF74TEA.js} +8018 -14883
- package/bundle/{chunk-6OFXOGEG.js → chunk-JYWQ73Z5.js} +193 -47
- package/bundle/{chunk-HSZIYPL6.js → chunk-KHG7NKQK.js} +3 -3
- package/bundle/chunk-KTOZF7BG.js +401335 -0
- package/bundle/{chunk-2NQXIWQK.js → chunk-KV6RPWUP.js} +27 -4
- package/bundle/{chunk-KCCVXZ52.js → chunk-LNFN3PQL.js} +32 -16
- package/bundle/{chunk-MLSLNORV.js → chunk-LS355CSQ.js} +3 -3
- package/bundle/{chunk-2VN53SWW.js → chunk-NDVLWD4V.js} +9 -8
- package/bundle/{chunk-ZOHM7BPT.js → chunk-NUWDVBI7.js} +1 -1
- package/bundle/{chunk-VJYKQD5D.js → chunk-PYD373NJ.js} +3 -3
- package/bundle/{chunk-VBVCLWLA.js → chunk-QTGBWTWR.js} +2 -2
- package/bundle/chunk-U6ZQ2RUE.js +1571 -0
- package/bundle/chunk-UV4NDIKL.js +118 -0
- package/bundle/{chunk-U76XPSKR.js → chunk-VAONEIPY.js} +96 -67
- package/bundle/chunk-WGJZZTZY.js +425 -0
- package/bundle/{chunk-ZPLFLZQA.js → chunk-WXXOP3OP.js} +33 -8
- package/bundle/chunk-XOG2HJ3Y.js +17530 -0
- package/bundle/chunk-YSKY65XX.js +512 -0
- package/bundle/chunk-ZTPICUAP.js +103137 -0
- package/bundle/{cleanup-GGCB2LVD.js → cleanup-3V27AYOD.js} +2 -2
- package/bundle/{cleanup-JRDG3OTL.js → cleanup-4G3NPQT4.js} +2 -2
- package/bundle/{cleanup-SSW6IXTR.js → cleanup-5XQCOW5U.js} +2 -2
- package/bundle/cleanup-BBUUFPW4.js +32 -0
- package/bundle/{core-IUIZE6JW.js → core-AAGHH24E.js} +1 -1
- package/bundle/{devtoolsService-XZCKFZP5.js → devtoolsService-EVGTOLCK.js} +2 -2
- package/bundle/{devtoolsService-3SADPKKB.js → devtoolsService-J7VIMPHG.js} +2 -2
- package/bundle/{devtoolsService-MF6JKRUV.js → devtoolsService-PZBHHYCE.js} +4 -3
- package/bundle/devtoolsService-Z4ND55GM.js +4359 -0
- package/bundle/{dist-7L3BRW6V.js → dist-6PBUOORE.js} +1 -1
- package/bundle/{core-6HRWFQZW.js → dist-Q7B3BSZW.js} +1 -1
- package/bundle/dist-Z23CJKTC.js +2252 -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/tools/mcp-server.md +41 -12
- package/bundle/{gemini-JPMMQ3KA.js → gemini-2ZS4H5D5.js} +41 -21
- package/bundle/{gemini-QOQNG5VY.js → gemini-NHT6XRJ6.js} +241 -205
- package/bundle/gemini-ORQLMSXW.js +17954 -0
- package/bundle/{gemini-ZMMDUAQJ.js → gemini-YDK3BHCP.js} +41 -21
- package/bundle/gemini.js +7 -7
- package/bundle/{interactiveCli-R3P4A3FC.js → interactiveCli-22MUJI66.js} +23 -14
- package/bundle/{interactiveCli-UDWGRVJL.js → interactiveCli-2JNS4RJW.js} +23 -14
- package/bundle/{interactiveCli-3I4TG5SK.js → interactiveCli-EHUGFQPB.js} +327 -299
- package/bundle/interactiveCli-YANG53MI.js +34988 -0
- package/bundle/{liteRtServerManager-OVPUSK2T.js → liteRtServerManager-PGT3WQWS.js} +4 -4
- package/bundle/{liteRtServerManager-RAV63AGE.js → liteRtServerManager-TW45VSAX.js} +4 -4
- package/bundle/{liteRtServerManager-4MWCEVVM.js → liteRtServerManager-VCTOOEN4.js} +4 -4
- package/bundle/liteRtServerManager-Y2QFKZ5W.js +65 -0
- package/bundle/{oauth2-provider-XFP63FGJ.js → oauth2-provider-4AK74O2H.js} +1 -1
- package/bundle/{oauth2-provider-FVTRRJZR.js → oauth2-provider-IUYZ2A7H.js} +1 -1
- package/bundle/{oauth2-provider-EWOA64PR.js → oauth2-provider-JCJGEWMM.js} +38 -72
- package/bundle/oauth2-provider-QTTPZS6I.js +235 -0
- package/bundle/{start-DJAIXPPY.js → start-4O4IKUM4.js} +6 -6
- package/bundle/{start-VQQ2Q5KT.js → start-74BH6SEW.js} +6 -6
- package/bundle/{start-5O7TBK5L.js → start-EDAVUSEX.js} +6 -6
- package/bundle/start-Q6WRPG2O.js +18 -0
- package/package.json +1 -1
|
@@ -0,0 +1,118 @@
|
|
|
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
|
+
import {
|
|
3
|
+
exitCli,
|
|
4
|
+
require_source
|
|
5
|
+
} from "./chunk-FE5UXCSL.js";
|
|
6
|
+
import {
|
|
7
|
+
DEFAULT_PORT,
|
|
8
|
+
SERVER_START_WAIT_MS,
|
|
9
|
+
getBinaryPath,
|
|
10
|
+
getLiteRtBinDir,
|
|
11
|
+
getLogFilePath,
|
|
12
|
+
getPidFilePath,
|
|
13
|
+
isBinaryInstalled,
|
|
14
|
+
isServerRunning,
|
|
15
|
+
resolveGemmaConfig,
|
|
16
|
+
writeServerProcessInfo
|
|
17
|
+
} from "./chunk-KV6RPWUP.js";
|
|
18
|
+
import {
|
|
19
|
+
debugLogger
|
|
20
|
+
} from "./chunk-JYWQ73Z5.js";
|
|
21
|
+
import {
|
|
22
|
+
__toESM
|
|
23
|
+
} from "./chunk-34MYV7JD.js";
|
|
24
|
+
|
|
25
|
+
// packages/cli/src/commands/gemma/start.ts
|
|
26
|
+
var import_chalk = __toESM(require_source(), 1);
|
|
27
|
+
import fs from "node:fs";
|
|
28
|
+
import path from "node:path";
|
|
29
|
+
import { spawn } from "node:child_process";
|
|
30
|
+
async function startServer(binaryPath, port) {
|
|
31
|
+
const alreadyRunning = await isServerRunning(port);
|
|
32
|
+
if (alreadyRunning) {
|
|
33
|
+
debugLogger.log(`LiteRT server already running on port ${port}`);
|
|
34
|
+
return true;
|
|
35
|
+
}
|
|
36
|
+
const logPath = getLogFilePath();
|
|
37
|
+
fs.mkdirSync(getLiteRtBinDir(), { recursive: true });
|
|
38
|
+
const tmpDir = path.dirname(getPidFilePath());
|
|
39
|
+
fs.mkdirSync(tmpDir, { recursive: true });
|
|
40
|
+
const logFd = fs.openSync(logPath, "a");
|
|
41
|
+
try {
|
|
42
|
+
const child = spawn(binaryPath, ["serve", `--port=${port}`, "--verbose"], {
|
|
43
|
+
detached: true,
|
|
44
|
+
stdio: ["ignore", logFd, logFd]
|
|
45
|
+
});
|
|
46
|
+
if (child.pid) {
|
|
47
|
+
writeServerProcessInfo({
|
|
48
|
+
pid: child.pid,
|
|
49
|
+
binaryPath,
|
|
50
|
+
port
|
|
51
|
+
});
|
|
52
|
+
}
|
|
53
|
+
child.unref();
|
|
54
|
+
} finally {
|
|
55
|
+
fs.closeSync(logFd);
|
|
56
|
+
}
|
|
57
|
+
await new Promise((resolve) => setTimeout(resolve, SERVER_START_WAIT_MS));
|
|
58
|
+
return isServerRunning(port);
|
|
59
|
+
}
|
|
60
|
+
var startCommand = {
|
|
61
|
+
command: "start",
|
|
62
|
+
describe: "Start the LiteRT-LM server",
|
|
63
|
+
builder: (yargs) => yargs.option("port", {
|
|
64
|
+
type: "number",
|
|
65
|
+
description: "Port for the LiteRT server"
|
|
66
|
+
}),
|
|
67
|
+
handler: async (argv) => {
|
|
68
|
+
let port;
|
|
69
|
+
if (argv["port"] !== void 0) {
|
|
70
|
+
port = Number(argv["port"]);
|
|
71
|
+
}
|
|
72
|
+
if (!port) {
|
|
73
|
+
const { configuredPort } = resolveGemmaConfig(DEFAULT_PORT);
|
|
74
|
+
port = configuredPort;
|
|
75
|
+
}
|
|
76
|
+
const binaryPath = getBinaryPath();
|
|
77
|
+
if (!binaryPath || !isBinaryInstalled(binaryPath)) {
|
|
78
|
+
debugLogger.error(
|
|
79
|
+
import_chalk.default.red(
|
|
80
|
+
'LiteRT-LM binary not found. Run "gemini gemma setup" first.'
|
|
81
|
+
)
|
|
82
|
+
);
|
|
83
|
+
await exitCli(1);
|
|
84
|
+
return;
|
|
85
|
+
}
|
|
86
|
+
const alreadyRunning = await isServerRunning(port);
|
|
87
|
+
if (alreadyRunning) {
|
|
88
|
+
debugLogger.log(
|
|
89
|
+
import_chalk.default.green(`LiteRT server is already running on port ${port}.`)
|
|
90
|
+
);
|
|
91
|
+
await exitCli(0);
|
|
92
|
+
return;
|
|
93
|
+
}
|
|
94
|
+
debugLogger.log(`Starting LiteRT server on port ${port}...`);
|
|
95
|
+
const started = await startServer(binaryPath, port);
|
|
96
|
+
if (started) {
|
|
97
|
+
debugLogger.log(import_chalk.default.green(`LiteRT server started on port ${port}.`));
|
|
98
|
+
debugLogger.log(import_chalk.default.dim(`Logs: ${getLogFilePath()}`));
|
|
99
|
+
await exitCli(0);
|
|
100
|
+
} else {
|
|
101
|
+
debugLogger.error(
|
|
102
|
+
import_chalk.default.red("Server may not have started correctly. Check logs:")
|
|
103
|
+
);
|
|
104
|
+
debugLogger.error(import_chalk.default.dim(` ${getLogFilePath()}`));
|
|
105
|
+
await exitCli(1);
|
|
106
|
+
}
|
|
107
|
+
}
|
|
108
|
+
};
|
|
109
|
+
|
|
110
|
+
export {
|
|
111
|
+
startServer,
|
|
112
|
+
startCommand
|
|
113
|
+
};
|
|
114
|
+
/**
|
|
115
|
+
* @license
|
|
116
|
+
* Copyright 2026 Google LLC
|
|
117
|
+
* SPDX-License-Identifier: Apache-2.0
|
|
118
|
+
*/
|
|
@@ -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-2QX7AFU2.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-46A63GIT.js";
|
|
67
67
|
import {
|
|
68
68
|
isDevelopment
|
|
69
|
-
} from "./chunk-
|
|
69
|
+
} from "./chunk-QTGBWTWR.js";
|
|
70
70
|
import {
|
|
71
71
|
emptyIcon,
|
|
72
72
|
mapCoreStatusToDisplayStatus,
|
|
73
73
|
require_react
|
|
74
|
-
} from "./chunk-
|
|
74
|
+
} from "./chunk-YSKY65XX.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-HYF74TEA.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 = "ef59c532f";
|
|
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,
|
|
@@ -83181,12 +83204,12 @@ import path29 from "node:path";
|
|
|
83181
83204
|
function getIdeStatusMessage(ideClient) {
|
|
83182
83205
|
const connection = ideClient.getConnectionStatus();
|
|
83183
83206
|
switch (connection.status) {
|
|
83184
|
-
case
|
|
83207
|
+
case IDEConnectionStatus.Connected:
|
|
83185
83208
|
return {
|
|
83186
83209
|
messageType: "info",
|
|
83187
83210
|
content: `\u{1F7E2} Connected to ${ideClient.getDetectedIdeDisplayName()}`
|
|
83188
83211
|
};
|
|
83189
|
-
case
|
|
83212
|
+
case IDEConnectionStatus.Connecting:
|
|
83190
83213
|
return {
|
|
83191
83214
|
messageType: "info",
|
|
83192
83215
|
content: `\u{1F7E1} Connecting...`
|
|
@@ -83227,7 +83250,7 @@ ${infoMessage}`;
|
|
|
83227
83250
|
async function getIdeStatusMessageWithFiles(ideClient) {
|
|
83228
83251
|
const connection = ideClient.getConnectionStatus();
|
|
83229
83252
|
switch (connection.status) {
|
|
83230
|
-
case
|
|
83253
|
+
case IDEConnectionStatus.Connected: {
|
|
83231
83254
|
let content = `\u{1F7E2} Connected to ${ideClient.getDetectedIdeDisplayName()}`;
|
|
83232
83255
|
const context = ideContextStore.get();
|
|
83233
83256
|
const openFiles = context?.workspaceState?.openFiles;
|
|
@@ -83239,7 +83262,7 @@ async function getIdeStatusMessageWithFiles(ideClient) {
|
|
|
83239
83262
|
content
|
|
83240
83263
|
};
|
|
83241
83264
|
}
|
|
83242
|
-
case
|
|
83265
|
+
case IDEConnectionStatus.Connecting:
|
|
83243
83266
|
return {
|
|
83244
83267
|
messageType: "info",
|
|
83245
83268
|
content: `\u{1F7E1} Connecting...`
|
|
@@ -83261,7 +83284,7 @@ async function setIdeModeAndSyncConnection(config, value, options = {}) {
|
|
|
83261
83284
|
const ideClient = await IdeClient.getInstance();
|
|
83262
83285
|
if (value) {
|
|
83263
83286
|
await ideClient.connect(options);
|
|
83264
|
-
logIdeConnection(config, new IdeConnectionEvent(
|
|
83287
|
+
logIdeConnection(config, new IdeConnectionEvent(IdeConnectionType.SESSION));
|
|
83265
83288
|
} else {
|
|
83266
83289
|
await ideClient.disconnect();
|
|
83267
83290
|
}
|
|
@@ -83349,7 +83372,7 @@ var ideCommand = async () => {
|
|
|
83349
83372
|
logToConsole: false
|
|
83350
83373
|
}
|
|
83351
83374
|
);
|
|
83352
|
-
if (ideClient.getConnectionStatus().status ===
|
|
83375
|
+
if (ideClient.getConnectionStatus().status === IDEConnectionStatus.Connected) {
|
|
83353
83376
|
break;
|
|
83354
83377
|
}
|
|
83355
83378
|
await new Promise((resolve9) => setTimeout(resolve9, 500));
|
|
@@ -83426,7 +83449,7 @@ var ideCommand = async () => {
|
|
|
83426
83449
|
}
|
|
83427
83450
|
};
|
|
83428
83451
|
const { status } = ideClient.getConnectionStatus();
|
|
83429
|
-
const isConnected = status ===
|
|
83452
|
+
const isConnected = status === IDEConnectionStatus.Connected;
|
|
83430
83453
|
if (isConnected) {
|
|
83431
83454
|
ideSlashCommand.subCommands = [statusCommand2, disableCommand5];
|
|
83432
83455
|
} else {
|
|
@@ -83526,13 +83549,13 @@ Use /mcp auth <server-name> to authenticate.`
|
|
|
83526
83549
|
const displayListener = (message) => {
|
|
83527
83550
|
context.ui.addItem({ type: "info", text: message });
|
|
83528
83551
|
};
|
|
83529
|
-
coreEvents.on(
|
|
83552
|
+
coreEvents.on(CoreEvent.OauthDisplayMessage, displayListener);
|
|
83530
83553
|
try {
|
|
83531
83554
|
context.ui.addItem({
|
|
83532
83555
|
type: "info",
|
|
83533
83556
|
text: `Starting OAuth authentication for MCP server '${serverName}'...`
|
|
83534
83557
|
});
|
|
83535
|
-
const { MCPOAuthProvider } = await import("./
|
|
83558
|
+
const { MCPOAuthProvider } = await import("./dist-6PBUOORE.js");
|
|
83536
83559
|
let oauthConfig = server.oauth;
|
|
83537
83560
|
if (!oauthConfig) {
|
|
83538
83561
|
oauthConfig = { enabled: false };
|
|
@@ -83569,7 +83592,7 @@ Use /mcp auth <server-name> to authenticate.`
|
|
|
83569
83592
|
content: `Failed to authenticate with MCP server '${serverName}': ${getErrorMessage(error)}`
|
|
83570
83593
|
};
|
|
83571
83594
|
} finally {
|
|
83572
|
-
coreEvents.removeListener(
|
|
83595
|
+
coreEvents.removeListener(CoreEvent.OauthDisplayMessage, displayListener);
|
|
83573
83596
|
}
|
|
83574
83597
|
},
|
|
83575
83598
|
completion: async (context, partialArg) => {
|
|
@@ -83615,10 +83638,10 @@ var listAction2 = async (context, showDescriptions = false, showSchema = false,
|
|
|
83615
83638
|
}
|
|
83616
83639
|
const serverNames = Object.keys(mcpServers);
|
|
83617
83640
|
const connectingServers = serverNames.filter(
|
|
83618
|
-
(name) => getMCPServerStatus(name) ===
|
|
83641
|
+
(name) => getMCPServerStatus(name) === MCPServerStatus.CONNECTING
|
|
83619
83642
|
);
|
|
83620
83643
|
const discoveryState = getMCPDiscoveryState();
|
|
83621
|
-
const discoveryInProgress = discoveryState ===
|
|
83644
|
+
const discoveryInProgress = discoveryState === MCPDiscoveryState.IN_PROGRESS || connectingServers.length > 0;
|
|
83622
83645
|
const allTools = toolRegistry.getAllTools();
|
|
83623
83646
|
const mcpTools = allTools.filter((tool) => tool instanceof DiscoveredMCPTool);
|
|
83624
83647
|
const promptRegistry = config.getPromptRegistry();
|
|
@@ -97489,10 +97512,16 @@ var MaxSizedBox = ({
|
|
|
97489
97512
|
(0, import_react79.useEffect)(() => {
|
|
97490
97513
|
if (totalHiddenLines > 0) {
|
|
97491
97514
|
addOverflowingId?.(id);
|
|
97492
|
-
} else {
|
|
97515
|
+
} else if (effectiveMaxHeight !== void 0) {
|
|
97493
97516
|
removeOverflowingId?.(id);
|
|
97494
97517
|
}
|
|
97495
|
-
}, [
|
|
97518
|
+
}, [
|
|
97519
|
+
id,
|
|
97520
|
+
totalHiddenLines,
|
|
97521
|
+
effectiveMaxHeight,
|
|
97522
|
+
addOverflowingId,
|
|
97523
|
+
removeOverflowingId
|
|
97524
|
+
]);
|
|
97496
97525
|
(0, import_react79.useEffect)(
|
|
97497
97526
|
() => () => {
|
|
97498
97527
|
removeOverflowingId?.(id);
|
|
@@ -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);
|