@google/gemini-cli 0.39.0-preview.0 → 0.39.0-preview.2
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-NMO6M2JW.js → chunk-3R2FLB3Z.js} +4 -4
- package/bundle/{chunk-UCJYTRQH.js → chunk-45GIY5RT.js} +1 -1
- package/bundle/{chunk-CB4IHCOV.js → chunk-4UUOHXDW.js} +354 -296
- package/bundle/{chunk-ZFUMNFZD.js → chunk-5J5LWISO.js} +6536 -11870
- package/bundle/{chunk-DY3XSEN6.js → chunk-AZ7QQWNX.js} +2 -2
- package/bundle/{chunk-L5FKR6GE.js → chunk-GX4YOB7T.js} +4 -4
- package/bundle/{chunk-KMWY7IVQ.js → chunk-N3GUGFOL.js} +72 -60
- package/bundle/chunk-OXCH4FS3.js +360288 -0
- package/bundle/{chunk-5ZBBJS2A.js → chunk-QC6EGBZW.js} +1 -1
- package/bundle/chunk-RTX4LTWK.js +101702 -0
- package/bundle/chunk-SS4CWRZ5.js +156 -0
- package/bundle/{chunk-LF246RTE.js → chunk-TKGFTY3B.js} +404 -307
- package/bundle/{cleanup-INA6FKQG.js → cleanup-3EICKDDN.js} +2 -2
- package/bundle/{cleanup-DKDGF4IA.js → cleanup-4SLYOL44.js} +3 -3
- package/bundle/{cleanup-B7STSNY5.js → cleanup-6N6E742H.js} +2 -2
- package/bundle/cleanup-OG2MXKZ7.js +33 -0
- package/bundle/{core-6MCGZ334.js → core-KLYK3V6Z.js} +3 -1
- package/bundle/{devtoolsService-QN4BQSIF.js → devtoolsService-FS7WXGBF.js} +2 -2
- package/bundle/{devtoolsService-BXBCDCC2.js → devtoolsService-K4DENTYF.js} +2 -2
- package/bundle/{devtoolsService-DDDJINQW.js → devtoolsService-RLXZWLDT.js} +5 -4
- package/bundle/devtoolsService-X4577PYZ.js +871 -0
- package/bundle/{dist-2M52ZJGU.js → dist-5ET5G5PC.js} +3 -1
- package/bundle/{core-MYQB6KXT.js → dist-DQVXGLSO.js} +4 -2
- package/bundle/dist-P4XAO4SC.js +2010 -0
- package/bundle/docs/cli/plan-mode.md +1 -2
- package/bundle/{gemini-TS2LMZH4.js → gemini-6GWCDHXK.js} +8 -8
- package/bundle/{gemini-BA3BDBJT.js → gemini-FLGPH5GJ.js} +8 -8
- package/bundle/{gemini-JFTJVXU4.js → gemini-NBKLSVA3.js} +184 -169
- package/bundle/gemini-YOFQ5KF4.js +15321 -0
- package/bundle/gemini.js +3 -3
- package/bundle/{interactiveCli-7ZBDFPFP.js → interactiveCli-AGSLCKNH.js} +6 -5
- package/bundle/{interactiveCli-W43ANBCL.js → interactiveCli-H3NLGP7Z.js} +6 -5
- package/bundle/{interactiveCli-K6QHA2GI.js → interactiveCli-NAPN3E2K.js} +277 -259
- package/bundle/interactiveCli-TCZBSTKU.js +34493 -0
- package/bundle/node_modules/@google/gemini-cli-devtools/package.json +1 -1
- package/bundle/{oauth2-provider-53ZABNLX.js → oauth2-provider-CWUR5RGE.js} +1 -1
- package/bundle/{oauth2-provider-T4YYJWZG.js → oauth2-provider-EA452S4C.js} +39 -73
- package/bundle/oauth2-provider-LV6VPYTU.js +237 -0
- package/bundle/{oauth2-provider-3YCIQHIN.js → oauth2-provider-YKYTKUWD.js} +1 -1
- package/package.json +1 -1
|
@@ -4,10 +4,10 @@ import {
|
|
|
4
4
|
isTelemetrySdkInitialized,
|
|
5
5
|
resetBrowserSession,
|
|
6
6
|
shutdownTelemetry
|
|
7
|
-
} from "./chunk-
|
|
7
|
+
} from "./chunk-4UUOHXDW.js";
|
|
8
8
|
import {
|
|
9
9
|
Storage
|
|
10
|
-
} from "./chunk-
|
|
10
|
+
} from "./chunk-67TFD6HC.js";
|
|
11
11
|
|
|
12
12
|
// packages/cli/src/utils/cleanup.ts
|
|
13
13
|
import { promises as fs } from "node:fs";
|
|
@@ -5,7 +5,7 @@ import {
|
|
|
5
5
|
} from "./chunk-5PS3AYFU.js";
|
|
6
6
|
import {
|
|
7
7
|
runExitCleanup
|
|
8
|
-
} from "./chunk-
|
|
8
|
+
} from "./chunk-45GIY5RT.js";
|
|
9
9
|
import {
|
|
10
10
|
AsyncFzf,
|
|
11
11
|
AuthProviderType,
|
|
@@ -178,7 +178,7 @@ import {
|
|
|
178
178
|
tokenLimit,
|
|
179
179
|
uiTelemetryService,
|
|
180
180
|
yellowBright
|
|
181
|
-
} from "./chunk-
|
|
181
|
+
} from "./chunk-OXCH4FS3.js";
|
|
182
182
|
import {
|
|
183
183
|
ApprovalMode,
|
|
184
184
|
CoreEvent,
|
|
@@ -76654,7 +76654,7 @@ var authCommand = {
|
|
|
76654
76654
|
import process35 from "node:process";
|
|
76655
76655
|
|
|
76656
76656
|
// packages/cli/src/generated/git-commit.ts
|
|
76657
|
-
var GIT_COMMIT_INFO = "
|
|
76657
|
+
var GIT_COMMIT_INFO = "a70149e15";
|
|
76658
76658
|
|
|
76659
76659
|
// packages/cli/src/ui/utils/historyExportUtils.ts
|
|
76660
76660
|
import * as fsPromises2 from "node:fs/promises";
|
|
@@ -82138,7 +82138,7 @@ Use /mcp auth <server-name> to authenticate.`
|
|
|
82138
82138
|
type: "info",
|
|
82139
82139
|
text: `Starting OAuth authentication for MCP server '${serverName}'...`
|
|
82140
82140
|
});
|
|
82141
|
-
const { MCPOAuthProvider } = await import("./dist-
|
|
82141
|
+
const { MCPOAuthProvider } = await import("./dist-5ET5G5PC.js");
|
|
82142
82142
|
let oauthConfig = server.oauth;
|
|
82143
82143
|
if (!oauthConfig) {
|
|
82144
82144
|
oauthConfig = { enabled: false };
|
|
@@ -5,11 +5,13 @@ import {
|
|
|
5
5
|
} from "./chunk-5PS3AYFU.js";
|
|
6
6
|
import {
|
|
7
7
|
runExitCleanup
|
|
8
|
-
} from "./chunk-
|
|
8
|
+
} from "./chunk-SS4CWRZ5.js";
|
|
9
9
|
import {
|
|
10
10
|
AsyncFzf,
|
|
11
11
|
AuthProviderType,
|
|
12
|
+
AuthType,
|
|
12
13
|
Config,
|
|
14
|
+
CoreToolCallStatus,
|
|
13
15
|
DEFAULT_MODEL_CONFIGS,
|
|
14
16
|
DEFAULT_TRUNCATE_TOOL_OUTPUT_THRESHOLD,
|
|
15
17
|
ExtensionDisableEvent,
|
|
@@ -20,17 +22,26 @@ import {
|
|
|
20
22
|
ExtensionUninstallEvent,
|
|
21
23
|
ExtensionUpdateEvent,
|
|
22
24
|
GEMINI_CLI_COMPANION_EXTENSION_NAME,
|
|
25
|
+
HookType,
|
|
26
|
+
IDEConnectionStatus,
|
|
23
27
|
INITIAL_HISTORY_LENGTH,
|
|
24
28
|
IdeClient,
|
|
25
29
|
IdeConnectionEvent,
|
|
30
|
+
IdeConnectionType,
|
|
31
|
+
IntegrityDataStatus,
|
|
26
32
|
KeychainTokenStorage,
|
|
33
|
+
LlmRole,
|
|
34
|
+
MCPDiscoveryState,
|
|
27
35
|
MCPOAuthTokenStorage,
|
|
36
|
+
MCPServerStatus,
|
|
28
37
|
MaxBufferError,
|
|
29
38
|
ModelSlashCommandEvent,
|
|
30
39
|
ProjectIdRequiredError,
|
|
31
40
|
ReadManyFilesTool,
|
|
32
41
|
RewindEvent,
|
|
33
42
|
SESSION_FILE_PREFIX,
|
|
43
|
+
SessionEndReason,
|
|
44
|
+
SessionStartSource,
|
|
34
45
|
ShellExecutionService,
|
|
35
46
|
StartSessionEvent,
|
|
36
47
|
TOOL_OUTPUTS_DIR,
|
|
@@ -167,13 +178,14 @@ import {
|
|
|
167
178
|
tokenLimit,
|
|
168
179
|
uiTelemetryService,
|
|
169
180
|
yellowBright
|
|
170
|
-
} from "./chunk-
|
|
181
|
+
} from "./chunk-5J5LWISO.js";
|
|
171
182
|
import {
|
|
172
183
|
ApprovalMode,
|
|
173
184
|
CoreEvent,
|
|
174
185
|
DiscoveredMCPTool,
|
|
175
186
|
FatalConfigError,
|
|
176
187
|
GEMINI_DIR,
|
|
188
|
+
PolicyDecision,
|
|
177
189
|
REFERENCE_CONTENT_END,
|
|
178
190
|
REFERENCE_CONTENT_START,
|
|
179
191
|
Storage,
|
|
@@ -195,7 +207,7 @@ import {
|
|
|
195
207
|
shortenPath,
|
|
196
208
|
tildeifyPath,
|
|
197
209
|
unescapePath
|
|
198
|
-
} from "./chunk-
|
|
210
|
+
} from "./chunk-67TFD6HC.js";
|
|
199
211
|
import {
|
|
200
212
|
__commonJS,
|
|
201
213
|
__export,
|
|
@@ -31886,19 +31898,19 @@ function isWorkspaceTrusted(settings, workspaceDir = process.cwd(), trustConfig,
|
|
|
31886
31898
|
var import_react = __toESM(require_react(), 1);
|
|
31887
31899
|
function mapCoreStatusToDisplayStatus(coreStatus) {
|
|
31888
31900
|
switch (coreStatus) {
|
|
31889
|
-
case
|
|
31901
|
+
case CoreToolCallStatus.Validating:
|
|
31890
31902
|
return "Pending" /* Pending */;
|
|
31891
|
-
case
|
|
31903
|
+
case CoreToolCallStatus.AwaitingApproval:
|
|
31892
31904
|
return "Confirming" /* Confirming */;
|
|
31893
|
-
case
|
|
31905
|
+
case CoreToolCallStatus.Executing:
|
|
31894
31906
|
return "Executing" /* Executing */;
|
|
31895
|
-
case
|
|
31907
|
+
case CoreToolCallStatus.Success:
|
|
31896
31908
|
return "Success" /* Success */;
|
|
31897
|
-
case
|
|
31909
|
+
case CoreToolCallStatus.Cancelled:
|
|
31898
31910
|
return "Canceled" /* Canceled */;
|
|
31899
|
-
case
|
|
31911
|
+
case CoreToolCallStatus.Error:
|
|
31900
31912
|
return "Error" /* Error */;
|
|
31901
|
-
case
|
|
31913
|
+
case CoreToolCallStatus.Scheduled:
|
|
31902
31914
|
return "Pending" /* Pending */;
|
|
31903
31915
|
default:
|
|
31904
31916
|
return checkExhaustive(coreStatus);
|
|
@@ -32483,7 +32495,7 @@ function convertSessionToHistoryFormats(messages) {
|
|
|
32483
32495
|
args: tool.args,
|
|
32484
32496
|
description: tool.description || "",
|
|
32485
32497
|
renderOutputAsMarkdown: tool.renderOutputAsMarkdown ?? true,
|
|
32486
|
-
status: tool.status === "success" ?
|
|
32498
|
+
status: tool.status === "success" ? CoreToolCallStatus.Success : CoreToolCallStatus.Error,
|
|
32487
32499
|
resultDisplay: tool.resultDisplay,
|
|
32488
32500
|
confirmationDetails: void 0
|
|
32489
32501
|
}))
|
|
@@ -38232,8 +38244,8 @@ var LoadedSettings = class {
|
|
|
38232
38244
|
// React will pass a listener fn into this subscribe fn
|
|
38233
38245
|
// that listener fn will perform an object identity check on the snapshot and trigger a React re render if the snapshot has changed
|
|
38234
38246
|
subscribe(listener) {
|
|
38235
|
-
coreEvents.on(
|
|
38236
|
-
return () => coreEvents.off(
|
|
38247
|
+
coreEvents.on(CoreEvent.SettingsChanged, listener);
|
|
38248
|
+
return () => coreEvents.off(CoreEvent.SettingsChanged, listener);
|
|
38237
38249
|
}
|
|
38238
38250
|
getSnapshot() {
|
|
38239
38251
|
return this._snapshot;
|
|
@@ -56380,7 +56392,7 @@ var import_react35 = __toESM(require_react(), 1);
|
|
|
56380
56392
|
function useIdeTrustListener() {
|
|
56381
56393
|
const settings = useSettings();
|
|
56382
56394
|
const [connectionStatus, setConnectionStatus] = (0, import_react35.useState)(
|
|
56383
|
-
|
|
56395
|
+
IDEConnectionStatus.Disconnected
|
|
56384
56396
|
);
|
|
56385
56397
|
const previousTrust = (0, import_react35.useRef)(void 0);
|
|
56386
56398
|
const [restartReason, setRestartReason] = (0, import_react35.useState)("NONE");
|
|
@@ -56410,7 +56422,7 @@ function useIdeTrustListener() {
|
|
|
56410
56422
|
};
|
|
56411
56423
|
}, []);
|
|
56412
56424
|
const getSnapshot = () => {
|
|
56413
|
-
if (connectionStatus !==
|
|
56425
|
+
if (connectionStatus !== IDEConnectionStatus.Connected) {
|
|
56414
56426
|
return void 0;
|
|
56415
56427
|
}
|
|
56416
56428
|
return ideContextStore.get()?.workspaceState?.isTrusted;
|
|
@@ -56796,7 +56808,7 @@ async function initializeApp(config, settings) {
|
|
|
56796
56808
|
await ideClient.connect();
|
|
56797
56809
|
logIdeConnection(
|
|
56798
56810
|
config,
|
|
56799
|
-
new IdeConnectionEvent(
|
|
56811
|
+
new IdeConnectionEvent(IdeConnectionType.START)
|
|
56800
56812
|
);
|
|
56801
56813
|
}).catch((e) => {
|
|
56802
56814
|
debugLogger.error("Failed to initialize IDE client:", e);
|
|
@@ -56814,16 +56826,16 @@ async function initializeApp(config, settings) {
|
|
|
56814
56826
|
// packages/cli/src/config/auth.ts
|
|
56815
56827
|
function validateAuthMethod(authMethod) {
|
|
56816
56828
|
loadEnvironment(loadSettings().merged, process.cwd());
|
|
56817
|
-
if (authMethod ===
|
|
56829
|
+
if (authMethod === AuthType.LOGIN_WITH_GOOGLE || authMethod === AuthType.COMPUTE_ADC) {
|
|
56818
56830
|
return null;
|
|
56819
56831
|
}
|
|
56820
|
-
if (authMethod ===
|
|
56832
|
+
if (authMethod === AuthType.USE_GEMINI) {
|
|
56821
56833
|
if (!process.env["GEMINI_API_KEY"]) {
|
|
56822
56834
|
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)!";
|
|
56823
56835
|
}
|
|
56824
56836
|
return null;
|
|
56825
56837
|
}
|
|
56826
|
-
if (authMethod ===
|
|
56838
|
+
if (authMethod === AuthType.USE_VERTEX_AI) {
|
|
56827
56839
|
const hasVertexProjectLocationConfig = !!process.env["GOOGLE_CLOUD_PROJECT"] && !!process.env["GOOGLE_CLOUD_LOCATION"];
|
|
56828
56840
|
const hasGoogleApiKey = !!process.env["GOOGLE_API_KEY"];
|
|
56829
56841
|
if (!hasVertexProjectLocationConfig && !hasGoogleApiKey) {
|
|
@@ -66723,7 +66735,7 @@ Would you like to attempt to install via "git clone" instead?`
|
|
|
66723
66735
|
newExtensionConfig.version,
|
|
66724
66736
|
previousExtensionConfig.version,
|
|
66725
66737
|
installMetadata.type,
|
|
66726
|
-
|
|
66738
|
+
CoreToolCallStatus.Success
|
|
66727
66739
|
)
|
|
66728
66740
|
);
|
|
66729
66741
|
if (newExtensionName !== previousName) {
|
|
@@ -66746,7 +66758,7 @@ Would you like to attempt to install via "git clone" instead?`
|
|
|
66746
66758
|
getExtensionId(newExtensionConfig, installMetadata),
|
|
66747
66759
|
newExtensionConfig.version,
|
|
66748
66760
|
installMetadata.type,
|
|
66749
|
-
|
|
66761
|
+
CoreToolCallStatus.Success
|
|
66750
66762
|
)
|
|
66751
66763
|
);
|
|
66752
66764
|
await this.enableExtension(
|
|
@@ -66779,7 +66791,7 @@ Would you like to attempt to install via "git clone" instead?`
|
|
|
66779
66791
|
newExtensionConfig?.version ?? "",
|
|
66780
66792
|
previousExtensionConfig.version,
|
|
66781
66793
|
installMetadata.type,
|
|
66782
|
-
|
|
66794
|
+
CoreToolCallStatus.Error
|
|
66783
66795
|
)
|
|
66784
66796
|
);
|
|
66785
66797
|
} else {
|
|
@@ -66791,7 +66803,7 @@ Would you like to attempt to install via "git clone" instead?`
|
|
|
66791
66803
|
extensionId ?? "",
|
|
66792
66804
|
newExtensionConfig?.version ?? "",
|
|
66793
66805
|
installMetadata.type,
|
|
66794
|
-
|
|
66806
|
+
CoreToolCallStatus.Error
|
|
66795
66807
|
)
|
|
66796
66808
|
);
|
|
66797
66809
|
}
|
|
@@ -66822,7 +66834,7 @@ Would you like to attempt to install via "git clone" instead?`
|
|
|
66822
66834
|
extension.name,
|
|
66823
66835
|
hashValue(extension.name),
|
|
66824
66836
|
extension.id,
|
|
66825
|
-
|
|
66837
|
+
CoreToolCallStatus.Success
|
|
66826
66838
|
)
|
|
66827
66839
|
);
|
|
66828
66840
|
}
|
|
@@ -67092,7 +67104,7 @@ Would you like to attempt to install via "git clone" instead?`
|
|
|
67092
67104
|
if (eventHooks) {
|
|
67093
67105
|
for (const definition of eventHooks) {
|
|
67094
67106
|
for (const hook of definition.hooks) {
|
|
67095
|
-
if (hook.type ===
|
|
67107
|
+
if (hook.type === HookType.Command) {
|
|
67096
67108
|
hook.env = { ...hook.env, ...hookEnv };
|
|
67097
67109
|
}
|
|
67098
67110
|
}
|
|
@@ -67965,7 +67977,7 @@ async function readMcpResources(resourceParts, config, signal) {
|
|
|
67965
67977
|
callId: `mcp-resource-${resource.serverName}-${resource.uri}`,
|
|
67966
67978
|
name: `resources/read (${resource.serverName})`,
|
|
67967
67979
|
description: resource.uri,
|
|
67968
|
-
status:
|
|
67980
|
+
status: CoreToolCallStatus.Success,
|
|
67969
67981
|
isClientInitiated: true,
|
|
67970
67982
|
resultDisplay: `Successfully read resource ${resource.uri}`,
|
|
67971
67983
|
confirmationDetails: void 0
|
|
@@ -67980,7 +67992,7 @@ async function readMcpResources(resourceParts, config, signal) {
|
|
|
67980
67992
|
callId: `mcp-resource-${resource.serverName}-${resource.uri}`,
|
|
67981
67993
|
name: `resources/read (${resource.serverName})`,
|
|
67982
67994
|
description: resource.uri,
|
|
67983
|
-
status:
|
|
67995
|
+
status: CoreToolCallStatus.Error,
|
|
67984
67996
|
isClientInitiated: true,
|
|
67985
67997
|
resultDisplay: `Error reading resource ${resource.uri}: ${getErrorMessage(error)}`,
|
|
67986
67998
|
confirmationDetails: void 0
|
|
@@ -68005,7 +68017,7 @@ Content from @${result.uri}:
|
|
|
68005
68017
|
}
|
|
68006
68018
|
if (hasError) {
|
|
68007
68019
|
const firstError = displays.find(
|
|
68008
|
-
(d) => d.status ===
|
|
68020
|
+
(d) => d.status === CoreToolCallStatus.Error
|
|
68009
68021
|
);
|
|
68010
68022
|
return {
|
|
68011
68023
|
parts: [],
|
|
@@ -68041,7 +68053,7 @@ async function readLocalFiles(resolvedFiles, config, signal, userMessageTimestam
|
|
|
68041
68053
|
callId: `client-read-${userMessageTimestamp}`,
|
|
68042
68054
|
name: readManyFilesTool.displayName,
|
|
68043
68055
|
description: invocation.getDescription(),
|
|
68044
|
-
status:
|
|
68056
|
+
status: CoreToolCallStatus.Success,
|
|
68045
68057
|
isClientInitiated: true,
|
|
68046
68058
|
resultDisplay: result.returnDisplay || `Successfully read: ${fileLabelsForDisplay.join(", ")}`,
|
|
68047
68059
|
confirmationDetails: void 0
|
|
@@ -68088,7 +68100,7 @@ Content from @${displayPath}:
|
|
|
68088
68100
|
callId: `client-read-${userMessageTimestamp}`,
|
|
68089
68101
|
name: readManyFilesTool.displayName,
|
|
68090
68102
|
description: invocation?.getDescription() ?? "Error attempting to execute tool to read files",
|
|
68091
|
-
status:
|
|
68103
|
+
status: CoreToolCallStatus.Error,
|
|
68092
68104
|
isClientInitiated: true,
|
|
68093
68105
|
resultDisplay: `Error reading files (${fileLabelsForDisplay.join(", ")}): ${getErrorMessage(error)}`,
|
|
68094
68106
|
confirmationDetails: void 0
|
|
@@ -71317,7 +71329,7 @@ async function openFileInEditor(filePath, stdin, setRawMode, preferredEditorType
|
|
|
71317
71329
|
if (wasRaw) {
|
|
71318
71330
|
setRawMode?.(true);
|
|
71319
71331
|
}
|
|
71320
|
-
coreEvents.emit(
|
|
71332
|
+
coreEvents.emit(CoreEvent.ExternalEditorClosed);
|
|
71321
71333
|
}
|
|
71322
71334
|
}
|
|
71323
71335
|
|
|
@@ -73997,7 +74009,7 @@ async function updateExtension(extension, extensionManager, currentState, dispat
|
|
|
73997
74009
|
extension.name,
|
|
73998
74010
|
installMetadata
|
|
73999
74011
|
);
|
|
74000
|
-
if (status ===
|
|
74012
|
+
if (status === IntegrityDataStatus.INVALID) {
|
|
74001
74013
|
throw new Error("Extension integrity cannot be verified");
|
|
74002
74014
|
}
|
|
74003
74015
|
} catch (e) {
|
|
@@ -76642,7 +76654,7 @@ var authCommand = {
|
|
|
76642
76654
|
import process35 from "node:process";
|
|
76643
76655
|
|
|
76644
76656
|
// packages/cli/src/generated/git-commit.ts
|
|
76645
|
-
var GIT_COMMIT_INFO = "
|
|
76657
|
+
var GIT_COMMIT_INFO = "23f55e0d1";
|
|
76646
76658
|
|
|
76647
76659
|
// packages/cli/src/ui/utils/historyExportUtils.ts
|
|
76648
76660
|
import * as fsPromises2 from "node:fs/promises";
|
|
@@ -77155,7 +77167,7 @@ var clearCommand = {
|
|
|
77155
77167
|
const config = context.services.agentContext?.config;
|
|
77156
77168
|
const hookSystem = config?.getHookSystem();
|
|
77157
77169
|
if (hookSystem) {
|
|
77158
|
-
await hookSystem.fireSessionEndEvent(
|
|
77170
|
+
await hookSystem.fireSessionEndEvent(SessionEndReason.Clear);
|
|
77159
77171
|
}
|
|
77160
77172
|
config?.injectionService.clear();
|
|
77161
77173
|
let newSessionId;
|
|
@@ -77172,7 +77184,7 @@ var clearCommand = {
|
|
|
77172
77184
|
}
|
|
77173
77185
|
let result;
|
|
77174
77186
|
if (hookSystem) {
|
|
77175
|
-
result = await hookSystem.fireSessionStartEvent(
|
|
77187
|
+
result = await hookSystem.fireSessionStartEvent(SessionStartSource.Clear);
|
|
77176
77188
|
}
|
|
77177
77189
|
await new Promise((resolve9) => setImmediate(resolve9));
|
|
77178
77190
|
if (config) {
|
|
@@ -80028,7 +80040,7 @@ var Footer = () => {
|
|
|
80028
80040
|
case "auth": {
|
|
80029
80041
|
if (!settings.merged.ui.showUserIdentity) break;
|
|
80030
80042
|
if (!authType) break;
|
|
80031
|
-
const displayStr = authType ===
|
|
80043
|
+
const displayStr = authType === AuthType.LOGIN_WITH_GOOGLE ? email ?? "google" : authType;
|
|
80032
80044
|
addCol(
|
|
80033
80045
|
id,
|
|
80034
80046
|
header,
|
|
@@ -81775,12 +81787,12 @@ import path34 from "node:path";
|
|
|
81775
81787
|
function getIdeStatusMessage(ideClient) {
|
|
81776
81788
|
const connection = ideClient.getConnectionStatus();
|
|
81777
81789
|
switch (connection.status) {
|
|
81778
|
-
case
|
|
81790
|
+
case IDEConnectionStatus.Connected:
|
|
81779
81791
|
return {
|
|
81780
81792
|
messageType: "info",
|
|
81781
81793
|
content: `\u{1F7E2} Connected to ${ideClient.getDetectedIdeDisplayName()}`
|
|
81782
81794
|
};
|
|
81783
|
-
case
|
|
81795
|
+
case IDEConnectionStatus.Connecting:
|
|
81784
81796
|
return {
|
|
81785
81797
|
messageType: "info",
|
|
81786
81798
|
content: `\u{1F7E1} Connecting...`
|
|
@@ -81821,7 +81833,7 @@ ${infoMessage}`;
|
|
|
81821
81833
|
async function getIdeStatusMessageWithFiles(ideClient) {
|
|
81822
81834
|
const connection = ideClient.getConnectionStatus();
|
|
81823
81835
|
switch (connection.status) {
|
|
81824
|
-
case
|
|
81836
|
+
case IDEConnectionStatus.Connected: {
|
|
81825
81837
|
let content = `\u{1F7E2} Connected to ${ideClient.getDetectedIdeDisplayName()}`;
|
|
81826
81838
|
const context = ideContextStore.get();
|
|
81827
81839
|
const openFiles = context?.workspaceState?.openFiles;
|
|
@@ -81833,7 +81845,7 @@ async function getIdeStatusMessageWithFiles(ideClient) {
|
|
|
81833
81845
|
content
|
|
81834
81846
|
};
|
|
81835
81847
|
}
|
|
81836
|
-
case
|
|
81848
|
+
case IDEConnectionStatus.Connecting:
|
|
81837
81849
|
return {
|
|
81838
81850
|
messageType: "info",
|
|
81839
81851
|
content: `\u{1F7E1} Connecting...`
|
|
@@ -81855,7 +81867,7 @@ async function setIdeModeAndSyncConnection(config, value, options = {}) {
|
|
|
81855
81867
|
const ideClient = await IdeClient.getInstance();
|
|
81856
81868
|
if (value) {
|
|
81857
81869
|
await ideClient.connect(options);
|
|
81858
|
-
logIdeConnection(config, new IdeConnectionEvent(
|
|
81870
|
+
logIdeConnection(config, new IdeConnectionEvent(IdeConnectionType.SESSION));
|
|
81859
81871
|
} else {
|
|
81860
81872
|
await ideClient.disconnect();
|
|
81861
81873
|
}
|
|
@@ -81943,7 +81955,7 @@ var ideCommand = async () => {
|
|
|
81943
81955
|
logToConsole: false
|
|
81944
81956
|
}
|
|
81945
81957
|
);
|
|
81946
|
-
if (ideClient.getConnectionStatus().status ===
|
|
81958
|
+
if (ideClient.getConnectionStatus().status === IDEConnectionStatus.Connected) {
|
|
81947
81959
|
break;
|
|
81948
81960
|
}
|
|
81949
81961
|
await new Promise((resolve9) => setTimeout(resolve9, 500));
|
|
@@ -82020,7 +82032,7 @@ var ideCommand = async () => {
|
|
|
82020
82032
|
}
|
|
82021
82033
|
};
|
|
82022
82034
|
const { status } = ideClient.getConnectionStatus();
|
|
82023
|
-
const isConnected2 = status ===
|
|
82035
|
+
const isConnected2 = status === IDEConnectionStatus.Connected;
|
|
82024
82036
|
if (isConnected2) {
|
|
82025
82037
|
ideSlashCommand.subCommands = [statusCommand, disableCommand5];
|
|
82026
82038
|
} else {
|
|
@@ -82120,13 +82132,13 @@ Use /mcp auth <server-name> to authenticate.`
|
|
|
82120
82132
|
const displayListener = (message) => {
|
|
82121
82133
|
context.ui.addItem({ type: "info", text: message });
|
|
82122
82134
|
};
|
|
82123
|
-
coreEvents.on(
|
|
82135
|
+
coreEvents.on(CoreEvent.OauthDisplayMessage, displayListener);
|
|
82124
82136
|
try {
|
|
82125
82137
|
context.ui.addItem({
|
|
82126
82138
|
type: "info",
|
|
82127
82139
|
text: `Starting OAuth authentication for MCP server '${serverName}'...`
|
|
82128
82140
|
});
|
|
82129
|
-
const { MCPOAuthProvider } = await import("./
|
|
82141
|
+
const { MCPOAuthProvider } = await import("./dist-DQVXGLSO.js");
|
|
82130
82142
|
let oauthConfig = server.oauth;
|
|
82131
82143
|
if (!oauthConfig) {
|
|
82132
82144
|
oauthConfig = { enabled: false };
|
|
@@ -82163,7 +82175,7 @@ Use /mcp auth <server-name> to authenticate.`
|
|
|
82163
82175
|
content: `Failed to authenticate with MCP server '${serverName}': ${getErrorMessage(error)}`
|
|
82164
82176
|
};
|
|
82165
82177
|
} finally {
|
|
82166
|
-
coreEvents.removeListener(
|
|
82178
|
+
coreEvents.removeListener(CoreEvent.OauthDisplayMessage, displayListener);
|
|
82167
82179
|
}
|
|
82168
82180
|
},
|
|
82169
82181
|
completion: async (context, partialArg) => {
|
|
@@ -82209,10 +82221,10 @@ var listAction3 = async (context, showDescriptions = false, showSchema = false,
|
|
|
82209
82221
|
}
|
|
82210
82222
|
const serverNames = Object.keys(mcpServers);
|
|
82211
82223
|
const connectingServers = serverNames.filter(
|
|
82212
|
-
(name) => getMCPServerStatus(name) ===
|
|
82224
|
+
(name) => getMCPServerStatus(name) === MCPServerStatus.CONNECTING
|
|
82213
82225
|
);
|
|
82214
82226
|
const discoveryState = getMCPDiscoveryState();
|
|
82215
|
-
const discoveryInProgress = discoveryState ===
|
|
82227
|
+
const discoveryInProgress = discoveryState === MCPDiscoveryState.IN_PROGRESS || connectingServers.length > 0;
|
|
82216
82228
|
const allTools = toolRegistry.getAllTools();
|
|
82217
82229
|
const mcpTools = allTools.filter((tool) => tool instanceof DiscoveredMCPTool);
|
|
82218
82230
|
const promptRegistry = config.getPromptRegistry();
|
|
@@ -97616,7 +97628,7 @@ Return a JSON object with:
|
|
|
97616
97628
|
},
|
|
97617
97629
|
abortSignal: new AbortController().signal,
|
|
97618
97630
|
promptId: "triage-duplicates",
|
|
97619
|
-
role:
|
|
97631
|
+
role: LlmRole.UTILITY_TOOL
|
|
97620
97632
|
});
|
|
97621
97633
|
const rec = response;
|
|
97622
97634
|
let canonical;
|
|
@@ -98450,7 +98462,7 @@ Return a JSON object with:
|
|
|
98450
98462
|
},
|
|
98451
98463
|
abortSignal: abortControllerRef.current.signal,
|
|
98452
98464
|
promptId: "triage-issues",
|
|
98453
|
-
role:
|
|
98465
|
+
role: LlmRole.UTILITY_TOOL
|
|
98454
98466
|
});
|
|
98455
98467
|
return response;
|
|
98456
98468
|
},
|
|
@@ -99024,8 +99036,8 @@ var planCommand = {
|
|
|
99024
99036
|
return;
|
|
99025
99037
|
}
|
|
99026
99038
|
const previousApprovalMode = config.getApprovalMode();
|
|
99027
|
-
config.setApprovalMode(
|
|
99028
|
-
if (previousApprovalMode !==
|
|
99039
|
+
config.setApprovalMode(ApprovalMode.PLAN);
|
|
99040
|
+
if (previousApprovalMode !== ApprovalMode.PLAN) {
|
|
99029
99041
|
coreEvents.emitFeedback("info", "Switched to Plan Mode.");
|
|
99030
99042
|
}
|
|
99031
99043
|
if (context.invocation?.args) {
|
|
@@ -99084,10 +99096,10 @@ var categorizeRulesByMode = (rules) => {
|
|
|
99084
99096
|
rules.forEach((rule) => {
|
|
99085
99097
|
const modes = rule.modes?.length ? rule.modes : ALL_MODES;
|
|
99086
99098
|
const modeSet = new Set(modes);
|
|
99087
|
-
if (modeSet.has(
|
|
99088
|
-
if (modeSet.has(
|
|
99089
|
-
if (modeSet.has(
|
|
99090
|
-
if (modeSet.has(
|
|
99099
|
+
if (modeSet.has(ApprovalMode.DEFAULT)) result.normal.push(rule);
|
|
99100
|
+
if (modeSet.has(ApprovalMode.AUTO_EDIT)) result.autoEdit.push(rule);
|
|
99101
|
+
if (modeSet.has(ApprovalMode.YOLO)) result.yolo.push(rule);
|
|
99102
|
+
if (modeSet.has(ApprovalMode.PLAN)) result.plan.push(rule);
|
|
99091
99103
|
});
|
|
99092
99104
|
return result;
|
|
99093
99105
|
};
|
|
@@ -100436,7 +100448,7 @@ var upgradeCommand = {
|
|
|
100436
100448
|
action: async (context) => {
|
|
100437
100449
|
const config = context.services.agentContext?.config;
|
|
100438
100450
|
const authType = config?.getContentGeneratorConfig()?.authType;
|
|
100439
|
-
if (authType !==
|
|
100451
|
+
if (authType !== AuthType.LOGIN_WITH_GOOGLE) {
|
|
100440
100452
|
return {
|
|
100441
100453
|
type: "message",
|
|
100442
100454
|
messageType: "error",
|
|
@@ -100606,7 +100618,7 @@ var BuiltinCommandLoader = class {
|
|
|
100606
100618
|
vimCommand,
|
|
100607
100619
|
setupGithubCommand,
|
|
100608
100620
|
terminalSetupCommand,
|
|
100609
|
-
...this.config?.getContentGeneratorConfig()?.authType ===
|
|
100621
|
+
...this.config?.getContentGeneratorConfig()?.authType === AuthType.LOGIN_WITH_GOOGLE ? [upgradeCommand] : []
|
|
100610
100622
|
];
|
|
100611
100623
|
handle?.end();
|
|
100612
100624
|
return allDefinitions.filter((cmd) => cmd !== null);
|
|
@@ -100749,11 +100761,11 @@ var ShellProcessor = class {
|
|
|
100749
100761
|
},
|
|
100750
100762
|
void 0
|
|
100751
100763
|
);
|
|
100752
|
-
if (decision ===
|
|
100764
|
+
if (decision === PolicyDecision.DENY) {
|
|
100753
100765
|
throw new Error(
|
|
100754
100766
|
`${this.commandName} cannot be run. Blocked command: "${command}". Reason: Blocked by policy.`
|
|
100755
100767
|
);
|
|
100756
|
-
} else if (decision ===
|
|
100768
|
+
} else if (decision === PolicyDecision.ASK_USER) {
|
|
100757
100769
|
commandsToConfirm.add(command);
|
|
100758
100770
|
}
|
|
100759
100771
|
}
|