@google/gemini-cli 0.43.0-preview.0 → 0.43.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-MXKXLNQD.js → chunk-3BNJIKEP.js} +2 -2
- package/bundle/{chunk-UIG2IVPJ.js → chunk-4G3X2H3F.js} +1 -1
- package/bundle/{chunk-LFGJVOVZ.js → chunk-4SLX6GS6.js} +7 -7
- package/bundle/{chunk-MRHFLHPJ.js → chunk-4ZT3EIBI.js} +1 -1
- package/bundle/{chunk-HQXINMBL.js → chunk-6YMGRLOQ.js} +1 -1
- package/bundle/{chunk-43AGRA7S.js → chunk-CKPZGEE3.js} +2 -2
- package/bundle/{chunk-WQOLTO3C.js → chunk-CZPVSLJF.js} +1 -1
- package/bundle/{chunk-PSWUV2OO.js → chunk-DJCG6GWZ.js} +2 -2
- package/bundle/{chunk-6XOSIMPZ.js → chunk-ERQUIEOO.js} +9 -8
- package/bundle/{chunk-SYD5SJFT.js → chunk-EWAAFVBK.js} +9 -6
- package/bundle/{chunk-T3SUXLQQ.js → chunk-F7PEGIBA.js} +2 -2
- package/bundle/{chunk-P4UQCQUB.js → chunk-ICOPZSVB.js} +3 -3
- package/bundle/{chunk-PGJUNQPO.js → chunk-IF5BAOVJ.js} +1 -1
- package/bundle/chunk-KILFUY3Y.js +512 -0
- package/bundle/{chunk-JENIU3E3.js → chunk-L4LBKMR6.js} +1 -1
- package/bundle/{chunk-LBQFRHYD.js → chunk-LTFEPQ67.js} +1 -1
- package/bundle/{chunk-X26T73X6.js → chunk-LTSFEC7U.js} +2 -2
- package/bundle/{chunk-SAISHGWW.js → chunk-MRVZNBXY.js} +4 -4
- package/bundle/{chunk-QYUN3J2L.js → chunk-N3MLU4IQ.js} +68 -55
- package/bundle/{chunk-UNAVBUTP.js → chunk-NDSJWRFE.js} +6974 -13060
- package/bundle/{chunk-NBRZ4A3S.js → chunk-NG2WIKH5.js} +2 -2
- package/bundle/chunk-PLEERNRJ.js +156 -0
- package/bundle/{chunk-PYLHDAUK.js → chunk-QAQT56LH.js} +3 -3
- package/bundle/{chunk-4TLQKGTR.js → chunk-S36EONMM.js} +1 -1
- package/bundle/chunk-UB4AWMZC.js +391 -0
- package/bundle/{chunk-Q23X5R4A.js → chunk-UBCHSKF2.js} +7 -7
- package/bundle/chunk-ULCEBJMK.js +17248 -0
- package/bundle/chunk-UUHMEKLA.js +357199 -0
- package/bundle/chunk-UW3H4T6A.js +1571 -0
- package/bundle/{chunk-46T44JOY.js → chunk-VSTO23O2.js} +1 -1
- package/bundle/chunk-XKIM3BNI.js +118 -0
- package/bundle/chunk-YIHNW7CC.js +81649 -0
- package/bundle/{cleanup-MI76P55B.js → cleanup-BMLCC7SO.js} +2 -2
- package/bundle/{cleanup-NZBQYB7U.js → cleanup-LMJA4J5S.js} +3 -3
- package/bundle/cleanup-M7RSLDBR.js +33 -0
- package/bundle/{cleanup-EIZJH2E3.js → cleanup-NMUMRIEF.js} +2 -2
- package/bundle/{core-T2TBFAYG.js → core-WXTAU5UX.js} +1 -1
- package/bundle/{devtoolsService-LV5NJ2BT.js → devtoolsService-2L5U47ZQ.js} +2 -2
- package/bundle/{devtoolsService-FYTOIC37.js → devtoolsService-6THA6GNX.js} +2 -2
- package/bundle/{devtoolsService-7KZDSYEF.js → devtoolsService-J2AC6YXM.js} +5 -4
- package/bundle/devtoolsService-SRWIME2Q.js +857 -0
- package/bundle/{dist-ETX67B7P.js → dist-DIIMIT2U.js} +1 -1
- package/bundle/{core-ERSGIOMQ.js → dist-MXL7ZG46.js} +2 -2
- package/bundle/dist-POIHCQVM.js +2124 -0
- package/bundle/{gemini-IVKBXHDT.js → gemini-D32FDZXN.js} +13 -13
- package/bundle/{gemini-Z77GAAR6.js → gemini-DLZ2R4X7.js} +202 -188
- package/bundle/{gemini-JKWQQTKP.js → gemini-HYQU2RK2.js} +13 -13
- package/bundle/gemini-JJG7ZGWB.js +16356 -0
- package/bundle/gemini.js +7 -7
- package/bundle/{interactiveCli-36WZS6KT.js → interactiveCli-DHMPW4RS.js} +8 -8
- package/bundle/{interactiveCli-SME5QTEN.js → interactiveCli-K7ETWJMN.js} +315 -296
- package/bundle/{interactiveCli-BQ36B66Z.js → interactiveCli-NR7OUF3G.js} +8 -8
- package/bundle/interactiveCli-X4AUP7T7.js +34752 -0
- package/bundle/{liteRtServerManager-2QD4R3A3.js → liteRtServerManager-L7C3D5RL.js} +4 -4
- package/bundle/{liteRtServerManager-N6OMT6W5.js → liteRtServerManager-PKRLUK2P.js} +4 -4
- package/bundle/{liteRtServerManager-ISYDOBNC.js → liteRtServerManager-TEBDIGEN.js} +5 -5
- package/bundle/liteRtServerManager-UPCAT7Z2.js +66 -0
- package/bundle/node_modules/@google/gemini-cli-devtools/package.json +1 -1
- package/bundle/{oauth2-provider-DOSIH6VE.js → oauth2-provider-52IJKUJI.js} +1 -1
- package/bundle/{oauth2-provider-VFOABWBW.js → oauth2-provider-OPOTTZ5C.js} +1 -1
- package/bundle/{oauth2-provider-TZF6EZRX.js → oauth2-provider-TOAKXOL7.js} +39 -73
- package/bundle/oauth2-provider-WN4YIDA4.js +237 -0
- package/bundle/{start-3GPIRK3E.js → start-6KIIUSAH.js} +6 -6
- package/bundle/{start-6NONW677.js → start-7ZNSGJD6.js} +7 -7
- package/bundle/start-EPIILWLN.js +19 -0
- package/bundle/{start-M6MUPEJS.js → start-TMFPUYEL.js} +6 -6
- package/package.json +1 -1
|
@@ -6,7 +6,7 @@ import {
|
|
|
6
6
|
import {
|
|
7
7
|
exitCli,
|
|
8
8
|
require_source
|
|
9
|
-
} from "./chunk-
|
|
9
|
+
} from "./chunk-LTFEPQ67.js";
|
|
10
10
|
import {
|
|
11
11
|
DEFAULT_BACKGROUND_OPACITY,
|
|
12
12
|
DEFAULT_BORDER_OPACITY,
|
|
@@ -58,17 +58,19 @@ import {
|
|
|
58
58
|
stripUnsafeCharacters,
|
|
59
59
|
toCodePoints,
|
|
60
60
|
validateCustomTheme
|
|
61
|
-
} from "./chunk-
|
|
61
|
+
} from "./chunk-EWAAFVBK.js";
|
|
62
62
|
import {
|
|
63
63
|
isDevelopment
|
|
64
|
-
} from "./chunk-
|
|
64
|
+
} from "./chunk-QAQT56LH.js";
|
|
65
65
|
import {
|
|
66
66
|
emptyIcon,
|
|
67
67
|
require_react
|
|
68
|
-
} from "./chunk-
|
|
68
|
+
} from "./chunk-CZPVSLJF.js";
|
|
69
69
|
import {
|
|
70
70
|
AsyncFzf,
|
|
71
|
+
AuthType,
|
|
71
72
|
Config,
|
|
73
|
+
CoreToolCallStatus,
|
|
72
74
|
ExtensionDisableEvent,
|
|
73
75
|
ExtensionEnableEvent,
|
|
74
76
|
ExtensionInstallEvent,
|
|
@@ -77,17 +79,27 @@ import {
|
|
|
77
79
|
ExtensionUninstallEvent,
|
|
78
80
|
ExtensionUpdateEvent,
|
|
79
81
|
GEMINI_CLI_COMPANION_EXTENSION_NAME,
|
|
82
|
+
HookType,
|
|
83
|
+
IDEConnectionStatus,
|
|
80
84
|
INITIAL_HISTORY_LENGTH,
|
|
81
85
|
IdeClient,
|
|
82
86
|
IdeConnectionEvent,
|
|
87
|
+
IdeConnectionType,
|
|
88
|
+
IntegrityDataStatus,
|
|
83
89
|
KeychainTokenStorage,
|
|
90
|
+
LlmRole,
|
|
91
|
+
MCPDiscoveryState,
|
|
84
92
|
MCPOAuthTokenStorage,
|
|
93
|
+
MCPServerStatus,
|
|
85
94
|
ModelSlashCommandEvent,
|
|
86
95
|
ProjectIdRequiredError,
|
|
87
96
|
ReadManyFilesTool,
|
|
88
97
|
RewindEvent,
|
|
98
|
+
SessionEndReason,
|
|
99
|
+
SessionStartSource,
|
|
89
100
|
ShellExecutionService,
|
|
90
101
|
StartSessionEvent,
|
|
102
|
+
TrustLevel,
|
|
91
103
|
UPGRADE_URL_PAGE,
|
|
92
104
|
UserAccountManager,
|
|
93
105
|
ValidationRequiredError,
|
|
@@ -201,12 +213,13 @@ import {
|
|
|
201
213
|
stripAnsi,
|
|
202
214
|
tokenLimit,
|
|
203
215
|
uiTelemetryService
|
|
204
|
-
} from "./chunk-
|
|
216
|
+
} from "./chunk-NDSJWRFE.js";
|
|
205
217
|
import {
|
|
206
218
|
ApprovalMode,
|
|
207
219
|
CoreEvent,
|
|
208
220
|
DiscoveredMCPTool,
|
|
209
221
|
GEMINI_DIR,
|
|
222
|
+
PolicyDecision,
|
|
210
223
|
REFERENCE_CONTENT_END,
|
|
211
224
|
REFERENCE_CONTENT_START,
|
|
212
225
|
Storage,
|
|
@@ -227,7 +240,7 @@ import {
|
|
|
227
240
|
shortenPath,
|
|
228
241
|
tildeifyPath,
|
|
229
242
|
unescapePath
|
|
230
|
-
} from "./chunk-
|
|
243
|
+
} from "./chunk-UJ26GAE5.js";
|
|
231
244
|
import {
|
|
232
245
|
require_src
|
|
233
246
|
} from "./chunk-RJTRUG2J.js";
|
|
@@ -39444,7 +39457,7 @@ var import_react34 = __toESM(require_react(), 1);
|
|
|
39444
39457
|
function useIdeTrustListener() {
|
|
39445
39458
|
const settings = useSettings();
|
|
39446
39459
|
const [connectionStatus, setConnectionStatus] = (0, import_react34.useState)(
|
|
39447
|
-
|
|
39460
|
+
IDEConnectionStatus.Disconnected
|
|
39448
39461
|
);
|
|
39449
39462
|
const previousTrust = (0, import_react34.useRef)(void 0);
|
|
39450
39463
|
const [restartReason, setRestartReason] = (0, import_react34.useState)("NONE");
|
|
@@ -39474,7 +39487,7 @@ function useIdeTrustListener() {
|
|
|
39474
39487
|
};
|
|
39475
39488
|
}, []);
|
|
39476
39489
|
const getSnapshot = () => {
|
|
39477
|
-
if (connectionStatus !==
|
|
39490
|
+
if (connectionStatus !== IDEConnectionStatus.Connected) {
|
|
39478
39491
|
return void 0;
|
|
39479
39492
|
}
|
|
39480
39493
|
return ideContextStore.get()?.workspaceState?.isTrusted;
|
|
@@ -40179,7 +40192,7 @@ async function initializeApp(config, settings) {
|
|
|
40179
40192
|
await ideClient.connect();
|
|
40180
40193
|
logIdeConnection(
|
|
40181
40194
|
config,
|
|
40182
|
-
new IdeConnectionEvent(
|
|
40195
|
+
new IdeConnectionEvent(IdeConnectionType.START)
|
|
40183
40196
|
);
|
|
40184
40197
|
}).catch((e) => {
|
|
40185
40198
|
debugLogger.error("Failed to initialize IDE client:", e);
|
|
@@ -40197,16 +40210,16 @@ async function initializeApp(config, settings) {
|
|
|
40197
40210
|
// packages/cli/src/config/auth.ts
|
|
40198
40211
|
function validateAuthMethod(authMethod) {
|
|
40199
40212
|
loadEnvironment(loadSettings().merged, process.cwd());
|
|
40200
|
-
if (authMethod ===
|
|
40213
|
+
if (authMethod === AuthType.LOGIN_WITH_GOOGLE || authMethod === AuthType.COMPUTE_ADC) {
|
|
40201
40214
|
return null;
|
|
40202
40215
|
}
|
|
40203
|
-
if (authMethod ===
|
|
40216
|
+
if (authMethod === AuthType.USE_GEMINI) {
|
|
40204
40217
|
if (!process.env["GEMINI_API_KEY"]) {
|
|
40205
40218
|
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)!";
|
|
40206
40219
|
}
|
|
40207
40220
|
return null;
|
|
40208
40221
|
}
|
|
40209
|
-
if (authMethod ===
|
|
40222
|
+
if (authMethod === AuthType.USE_VERTEX_AI) {
|
|
40210
40223
|
const hasVertexProjectLocationConfig = !!process.env["GOOGLE_CLOUD_PROJECT"] && !!process.env["GOOGLE_CLOUD_LOCATION"];
|
|
40211
40224
|
const hasGoogleApiKey = !!process.env["GOOGLE_API_KEY"];
|
|
40212
40225
|
if (!hasVertexProjectLocationConfig && !hasGoogleApiKey) {
|
|
@@ -44626,7 +44639,7 @@ var ExtensionManager = class extends ExtensionLoader {
|
|
|
44626
44639
|
const trustedFolders = loadTrustedFolders();
|
|
44627
44640
|
await trustedFolders.setValue(
|
|
44628
44641
|
this.workspaceDir,
|
|
44629
|
-
|
|
44642
|
+
TrustLevel.TRUST_FOLDER
|
|
44630
44643
|
);
|
|
44631
44644
|
} else {
|
|
44632
44645
|
throw new Error(
|
|
@@ -44812,7 +44825,7 @@ Would you like to attempt to install via "git clone" instead?`
|
|
|
44812
44825
|
newExtensionConfig.version,
|
|
44813
44826
|
previousExtensionConfig.version,
|
|
44814
44827
|
installMetadata.type,
|
|
44815
|
-
|
|
44828
|
+
CoreToolCallStatus.Success
|
|
44816
44829
|
)
|
|
44817
44830
|
);
|
|
44818
44831
|
if (newExtensionName !== previousName) {
|
|
@@ -44835,7 +44848,7 @@ Would you like to attempt to install via "git clone" instead?`
|
|
|
44835
44848
|
getExtensionId(newExtensionConfig, installMetadata),
|
|
44836
44849
|
newExtensionConfig.version,
|
|
44837
44850
|
installMetadata.type,
|
|
44838
|
-
|
|
44851
|
+
CoreToolCallStatus.Success
|
|
44839
44852
|
)
|
|
44840
44853
|
);
|
|
44841
44854
|
await this.enableExtension(
|
|
@@ -44868,7 +44881,7 @@ Would you like to attempt to install via "git clone" instead?`
|
|
|
44868
44881
|
newExtensionConfig?.version ?? "",
|
|
44869
44882
|
previousExtensionConfig.version,
|
|
44870
44883
|
installMetadata.type,
|
|
44871
|
-
|
|
44884
|
+
CoreToolCallStatus.Error
|
|
44872
44885
|
)
|
|
44873
44886
|
);
|
|
44874
44887
|
} else {
|
|
@@ -44880,7 +44893,7 @@ Would you like to attempt to install via "git clone" instead?`
|
|
|
44880
44893
|
extensionId ?? "",
|
|
44881
44894
|
newExtensionConfig?.version ?? "",
|
|
44882
44895
|
installMetadata.type,
|
|
44883
|
-
|
|
44896
|
+
CoreToolCallStatus.Error
|
|
44884
44897
|
)
|
|
44885
44898
|
);
|
|
44886
44899
|
}
|
|
@@ -44911,7 +44924,7 @@ Would you like to attempt to install via "git clone" instead?`
|
|
|
44911
44924
|
extension.name,
|
|
44912
44925
|
hashValue(extension.name),
|
|
44913
44926
|
extension.id,
|
|
44914
|
-
|
|
44927
|
+
CoreToolCallStatus.Success
|
|
44915
44928
|
)
|
|
44916
44929
|
);
|
|
44917
44930
|
}
|
|
@@ -45181,7 +45194,7 @@ Would you like to attempt to install via "git clone" instead?`
|
|
|
45181
45194
|
if (eventHooks) {
|
|
45182
45195
|
for (const definition of eventHooks) {
|
|
45183
45196
|
for (const hook of definition.hooks) {
|
|
45184
|
-
if (hook.type ===
|
|
45197
|
+
if (hook.type === HookType.Command) {
|
|
45185
45198
|
hook.env = { ...hook.env, ...hookEnv };
|
|
45186
45199
|
}
|
|
45187
45200
|
}
|
|
@@ -46213,7 +46226,7 @@ async function readMcpResources(resourceParts, config, signal) {
|
|
|
46213
46226
|
callId: `mcp-resource-${resource.serverName}-${resource.uri}`,
|
|
46214
46227
|
name: `resources/read (${resource.serverName})`,
|
|
46215
46228
|
description: resource.uri,
|
|
46216
|
-
status:
|
|
46229
|
+
status: CoreToolCallStatus.Success,
|
|
46217
46230
|
isClientInitiated: true,
|
|
46218
46231
|
resultDisplay: `Successfully read resource ${resource.uri}`,
|
|
46219
46232
|
confirmationDetails: void 0
|
|
@@ -46228,7 +46241,7 @@ async function readMcpResources(resourceParts, config, signal) {
|
|
|
46228
46241
|
callId: `mcp-resource-${resource.serverName}-${resource.uri}`,
|
|
46229
46242
|
name: `resources/read (${resource.serverName})`,
|
|
46230
46243
|
description: resource.uri,
|
|
46231
|
-
status:
|
|
46244
|
+
status: CoreToolCallStatus.Error,
|
|
46232
46245
|
isClientInitiated: true,
|
|
46233
46246
|
resultDisplay: `Error reading resource ${resource.uri}: ${getErrorMessage(error)}`,
|
|
46234
46247
|
confirmationDetails: void 0
|
|
@@ -46253,7 +46266,7 @@ Content from @${result.uri}:
|
|
|
46253
46266
|
}
|
|
46254
46267
|
if (hasError) {
|
|
46255
46268
|
const firstError = displays.find(
|
|
46256
|
-
(d) => d.status ===
|
|
46269
|
+
(d) => d.status === CoreToolCallStatus.Error
|
|
46257
46270
|
);
|
|
46258
46271
|
return {
|
|
46259
46272
|
parts: [],
|
|
@@ -46289,7 +46302,7 @@ async function readLocalFiles(resolvedFiles, config, signal, userMessageTimestam
|
|
|
46289
46302
|
callId: `client-read-${userMessageTimestamp}`,
|
|
46290
46303
|
name: readManyFilesTool.displayName,
|
|
46291
46304
|
description: invocation.getDescription(),
|
|
46292
|
-
status:
|
|
46305
|
+
status: CoreToolCallStatus.Success,
|
|
46293
46306
|
isClientInitiated: true,
|
|
46294
46307
|
resultDisplay: result.returnDisplay || `Successfully read: ${fileLabelsForDisplay.join(", ")}`,
|
|
46295
46308
|
confirmationDetails: void 0
|
|
@@ -46336,7 +46349,7 @@ Content from @${displayPath}:
|
|
|
46336
46349
|
callId: `client-read-${userMessageTimestamp}`,
|
|
46337
46350
|
name: readManyFilesTool.displayName,
|
|
46338
46351
|
description: invocation?.getDescription() ?? "Error attempting to execute tool to read files",
|
|
46339
|
-
status:
|
|
46352
|
+
status: CoreToolCallStatus.Error,
|
|
46340
46353
|
isClientInitiated: true,
|
|
46341
46354
|
resultDisplay: `Error reading files (${fileLabelsForDisplay.join(", ")}): ${getErrorMessage(error)}`,
|
|
46342
46355
|
confirmationDetails: void 0
|
|
@@ -49565,7 +49578,7 @@ async function openFileInEditor(filePath, stdin, setRawMode, preferredEditorType
|
|
|
49565
49578
|
if (wasRaw) {
|
|
49566
49579
|
setRawMode?.(true);
|
|
49567
49580
|
}
|
|
49568
|
-
coreEvents.emit(
|
|
49581
|
+
coreEvents.emit(CoreEvent.ExternalEditorClosed);
|
|
49569
49582
|
}
|
|
49570
49583
|
}
|
|
49571
49584
|
|
|
@@ -52255,7 +52268,7 @@ async function updateExtension(extension, extensionManager, currentState, dispat
|
|
|
52255
52268
|
extension.name,
|
|
52256
52269
|
installMetadata
|
|
52257
52270
|
);
|
|
52258
|
-
if (status ===
|
|
52271
|
+
if (status === IntegrityDataStatus.INVALID) {
|
|
52259
52272
|
throw new Error("Extension integrity cannot be verified");
|
|
52260
52273
|
}
|
|
52261
52274
|
} catch (e) {
|
|
@@ -53673,11 +53686,11 @@ var ShellProcessor = class {
|
|
|
53673
53686
|
},
|
|
53674
53687
|
void 0
|
|
53675
53688
|
);
|
|
53676
|
-
if (decision ===
|
|
53689
|
+
if (decision === PolicyDecision.DENY) {
|
|
53677
53690
|
throw new Error(
|
|
53678
53691
|
`${this.commandName} cannot be run. Blocked command: "${command}". Reason: Blocked by policy.`
|
|
53679
53692
|
);
|
|
53680
|
-
} else if (decision ===
|
|
53693
|
+
} else if (decision === PolicyDecision.ASK_USER) {
|
|
53681
53694
|
commandsToConfirm.add(command);
|
|
53682
53695
|
}
|
|
53683
53696
|
}
|
|
@@ -54795,7 +54808,7 @@ var MultiFolderTrustDialog = ({
|
|
|
54795
54808
|
if (choice === 1 /* YES_AND_REMEMBER */) {
|
|
54796
54809
|
await trustedFolders.setValue(
|
|
54797
54810
|
expandedPath,
|
|
54798
|
-
|
|
54811
|
+
TrustLevel.TRUST_FOLDER
|
|
54799
54812
|
);
|
|
54800
54813
|
}
|
|
54801
54814
|
workspaceContext.addDirectory(expandedPath);
|
|
@@ -56443,7 +56456,7 @@ var authCommand = {
|
|
|
56443
56456
|
import process28 from "node:process";
|
|
56444
56457
|
|
|
56445
56458
|
// packages/cli/src/generated/git-commit.ts
|
|
56446
|
-
var GIT_COMMIT_INFO = "
|
|
56459
|
+
var GIT_COMMIT_INFO = "31ea2a85b";
|
|
56447
56460
|
|
|
56448
56461
|
// packages/cli/src/ui/utils/historyExportUtils.ts
|
|
56449
56462
|
import * as fsPromises from "node:fs/promises";
|
|
@@ -57089,7 +57102,7 @@ var clearCommand = {
|
|
|
57089
57102
|
const config = context.services.agentContext?.config;
|
|
57090
57103
|
const hookSystem = config?.getHookSystem();
|
|
57091
57104
|
if (hookSystem) {
|
|
57092
|
-
await hookSystem.fireSessionEndEvent(
|
|
57105
|
+
await hookSystem.fireSessionEndEvent(SessionEndReason.Clear);
|
|
57093
57106
|
}
|
|
57094
57107
|
config?.injectionService.clear();
|
|
57095
57108
|
let newSessionId;
|
|
@@ -57106,7 +57119,7 @@ var clearCommand = {
|
|
|
57106
57119
|
}
|
|
57107
57120
|
let result;
|
|
57108
57121
|
if (hookSystem) {
|
|
57109
|
-
result = await hookSystem.fireSessionStartEvent(
|
|
57122
|
+
result = await hookSystem.fireSessionStartEvent(SessionStartSource.Clear);
|
|
57110
57123
|
}
|
|
57111
57124
|
await new Promise((resolve9) => setImmediate(resolve9));
|
|
57112
57125
|
if (config) {
|
|
@@ -60105,7 +60118,7 @@ var Footer = () => {
|
|
|
60105
60118
|
case "auth": {
|
|
60106
60119
|
if (!settings.merged.ui.showUserIdentity) break;
|
|
60107
60120
|
if (!authType) break;
|
|
60108
|
-
const displayStr = authType ===
|
|
60121
|
+
const displayStr = authType === AuthType.LOGIN_WITH_GOOGLE ? email ?? "google" : authType;
|
|
60109
60122
|
addCol(
|
|
60110
60123
|
id,
|
|
60111
60124
|
header,
|
|
@@ -61853,12 +61866,12 @@ import path29 from "node:path";
|
|
|
61853
61866
|
function getIdeStatusMessage(ideClient) {
|
|
61854
61867
|
const connection = ideClient.getConnectionStatus();
|
|
61855
61868
|
switch (connection.status) {
|
|
61856
|
-
case
|
|
61869
|
+
case IDEConnectionStatus.Connected:
|
|
61857
61870
|
return {
|
|
61858
61871
|
messageType: "info",
|
|
61859
61872
|
content: `\u{1F7E2} Connected to ${ideClient.getDetectedIdeDisplayName()}`
|
|
61860
61873
|
};
|
|
61861
|
-
case
|
|
61874
|
+
case IDEConnectionStatus.Connecting:
|
|
61862
61875
|
return {
|
|
61863
61876
|
messageType: "info",
|
|
61864
61877
|
content: `\u{1F7E1} Connecting...`
|
|
@@ -61899,7 +61912,7 @@ ${infoMessage}`;
|
|
|
61899
61912
|
async function getIdeStatusMessageWithFiles(ideClient) {
|
|
61900
61913
|
const connection = ideClient.getConnectionStatus();
|
|
61901
61914
|
switch (connection.status) {
|
|
61902
|
-
case
|
|
61915
|
+
case IDEConnectionStatus.Connected: {
|
|
61903
61916
|
let content = `\u{1F7E2} Connected to ${ideClient.getDetectedIdeDisplayName()}`;
|
|
61904
61917
|
const context = ideContextStore.get();
|
|
61905
61918
|
const openFiles = context?.workspaceState?.openFiles;
|
|
@@ -61911,7 +61924,7 @@ async function getIdeStatusMessageWithFiles(ideClient) {
|
|
|
61911
61924
|
content
|
|
61912
61925
|
};
|
|
61913
61926
|
}
|
|
61914
|
-
case
|
|
61927
|
+
case IDEConnectionStatus.Connecting:
|
|
61915
61928
|
return {
|
|
61916
61929
|
messageType: "info",
|
|
61917
61930
|
content: `\u{1F7E1} Connecting...`
|
|
@@ -61933,7 +61946,7 @@ async function setIdeModeAndSyncConnection(config, value, options = {}) {
|
|
|
61933
61946
|
const ideClient = await IdeClient.getInstance();
|
|
61934
61947
|
if (value) {
|
|
61935
61948
|
await ideClient.connect(options);
|
|
61936
|
-
logIdeConnection(config, new IdeConnectionEvent(
|
|
61949
|
+
logIdeConnection(config, new IdeConnectionEvent(IdeConnectionType.SESSION));
|
|
61937
61950
|
} else {
|
|
61938
61951
|
await ideClient.disconnect();
|
|
61939
61952
|
}
|
|
@@ -62021,7 +62034,7 @@ var ideCommand = async () => {
|
|
|
62021
62034
|
logToConsole: false
|
|
62022
62035
|
}
|
|
62023
62036
|
);
|
|
62024
|
-
if (ideClient.getConnectionStatus().status ===
|
|
62037
|
+
if (ideClient.getConnectionStatus().status === IDEConnectionStatus.Connected) {
|
|
62025
62038
|
break;
|
|
62026
62039
|
}
|
|
62027
62040
|
await new Promise((resolve9) => setTimeout(resolve9, 500));
|
|
@@ -62098,7 +62111,7 @@ var ideCommand = async () => {
|
|
|
62098
62111
|
}
|
|
62099
62112
|
};
|
|
62100
62113
|
const { status } = ideClient.getConnectionStatus();
|
|
62101
|
-
const isConnected = status ===
|
|
62114
|
+
const isConnected = status === IDEConnectionStatus.Connected;
|
|
62102
62115
|
if (isConnected) {
|
|
62103
62116
|
ideSlashCommand.subCommands = [statusCommand2, disableCommand5];
|
|
62104
62117
|
} else {
|
|
@@ -62198,13 +62211,13 @@ Use /mcp auth <server-name> to authenticate.`
|
|
|
62198
62211
|
const displayListener = (message) => {
|
|
62199
62212
|
context.ui.addItem({ type: "info", text: message });
|
|
62200
62213
|
};
|
|
62201
|
-
coreEvents.on(
|
|
62214
|
+
coreEvents.on(CoreEvent.OauthDisplayMessage, displayListener);
|
|
62202
62215
|
try {
|
|
62203
62216
|
context.ui.addItem({
|
|
62204
62217
|
type: "info",
|
|
62205
62218
|
text: `Starting OAuth authentication for MCP server '${serverName}'...`
|
|
62206
62219
|
});
|
|
62207
|
-
const { MCPOAuthProvider } = await import("./
|
|
62220
|
+
const { MCPOAuthProvider } = await import("./dist-POIHCQVM.js");
|
|
62208
62221
|
let oauthConfig = server.oauth;
|
|
62209
62222
|
if (!oauthConfig) {
|
|
62210
62223
|
oauthConfig = { enabled: false };
|
|
@@ -62241,7 +62254,7 @@ Use /mcp auth <server-name> to authenticate.`
|
|
|
62241
62254
|
content: `Failed to authenticate with MCP server '${serverName}': ${getErrorMessage(error)}`
|
|
62242
62255
|
};
|
|
62243
62256
|
} finally {
|
|
62244
|
-
coreEvents.removeListener(
|
|
62257
|
+
coreEvents.removeListener(CoreEvent.OauthDisplayMessage, displayListener);
|
|
62245
62258
|
}
|
|
62246
62259
|
},
|
|
62247
62260
|
completion: async (context, partialArg) => {
|
|
@@ -62287,10 +62300,10 @@ var listAction2 = async (context, showDescriptions = false, showSchema = false,
|
|
|
62287
62300
|
}
|
|
62288
62301
|
const serverNames = Object.keys(mcpServers);
|
|
62289
62302
|
const connectingServers = serverNames.filter(
|
|
62290
|
-
(name) => getMCPServerStatus(name) ===
|
|
62303
|
+
(name) => getMCPServerStatus(name) === MCPServerStatus.CONNECTING
|
|
62291
62304
|
);
|
|
62292
62305
|
const discoveryState = getMCPDiscoveryState();
|
|
62293
|
-
const discoveryInProgress = discoveryState ===
|
|
62306
|
+
const discoveryInProgress = discoveryState === MCPDiscoveryState.IN_PROGRESS || connectingServers.length > 0;
|
|
62294
62307
|
const allTools = toolRegistry.getAllTools();
|
|
62295
62308
|
const mcpTools = allTools.filter((tool) => tool instanceof DiscoveredMCPTool);
|
|
62296
62309
|
const promptRegistry = config.getPromptRegistry();
|
|
@@ -78070,7 +78083,7 @@ Return a JSON object with:
|
|
|
78070
78083
|
},
|
|
78071
78084
|
abortSignal: new AbortController().signal,
|
|
78072
78085
|
promptId: "triage-duplicates",
|
|
78073
|
-
role:
|
|
78086
|
+
role: LlmRole.UTILITY_TOOL
|
|
78074
78087
|
});
|
|
78075
78088
|
const rec = response;
|
|
78076
78089
|
let canonical;
|
|
@@ -78904,7 +78917,7 @@ Return a JSON object with:
|
|
|
78904
78917
|
},
|
|
78905
78918
|
abortSignal: abortControllerRef.current.signal,
|
|
78906
78919
|
promptId: "triage-issues",
|
|
78907
|
-
role:
|
|
78920
|
+
role: LlmRole.UTILITY_TOOL
|
|
78908
78921
|
});
|
|
78909
78922
|
return response;
|
|
78910
78923
|
},
|
|
@@ -79478,8 +79491,8 @@ var planCommand = {
|
|
|
79478
79491
|
return;
|
|
79479
79492
|
}
|
|
79480
79493
|
const previousApprovalMode = config.getApprovalMode();
|
|
79481
|
-
config.setApprovalMode(
|
|
79482
|
-
if (previousApprovalMode !==
|
|
79494
|
+
config.setApprovalMode(ApprovalMode.PLAN);
|
|
79495
|
+
if (previousApprovalMode !== ApprovalMode.PLAN) {
|
|
79483
79496
|
coreEvents.emitFeedback("info", "Switched to Plan Mode.");
|
|
79484
79497
|
}
|
|
79485
79498
|
if (context.invocation?.args) {
|
|
@@ -79538,10 +79551,10 @@ var categorizeRulesByMode = (rules) => {
|
|
|
79538
79551
|
rules.forEach((rule) => {
|
|
79539
79552
|
const modes = rule.modes?.length ? rule.modes : ALL_MODES;
|
|
79540
79553
|
const modeSet = new Set(modes);
|
|
79541
|
-
if (modeSet.has(
|
|
79542
|
-
if (modeSet.has(
|
|
79543
|
-
if (modeSet.has(
|
|
79544
|
-
if (modeSet.has(
|
|
79554
|
+
if (modeSet.has(ApprovalMode.DEFAULT)) result.normal.push(rule);
|
|
79555
|
+
if (modeSet.has(ApprovalMode.AUTO_EDIT)) result.autoEdit.push(rule);
|
|
79556
|
+
if (modeSet.has(ApprovalMode.YOLO)) result.yolo.push(rule);
|
|
79557
|
+
if (modeSet.has(ApprovalMode.PLAN)) result.plan.push(rule);
|
|
79545
79558
|
});
|
|
79546
79559
|
return result;
|
|
79547
79560
|
};
|
|
@@ -80893,7 +80906,7 @@ var upgradeCommand = {
|
|
|
80893
80906
|
action: async (context) => {
|
|
80894
80907
|
const config = context.services.agentContext?.config;
|
|
80895
80908
|
const authType = config?.getContentGeneratorConfig()?.authType;
|
|
80896
|
-
if (authType !==
|
|
80909
|
+
if (authType !== AuthType.LOGIN_WITH_GOOGLE) {
|
|
80897
80910
|
return {
|
|
80898
80911
|
type: "message",
|
|
80899
80912
|
messageType: "error",
|
|
@@ -81122,7 +81135,7 @@ var BuiltinCommandLoader = class {
|
|
|
81122
81135
|
setupGithubCommand,
|
|
81123
81136
|
terminalSetupCommand,
|
|
81124
81137
|
...this.config?.isVoiceModeEnabled() ? [voiceCommand] : [],
|
|
81125
|
-
...this.config?.getContentGeneratorConfig()?.authType ===
|
|
81138
|
+
...this.config?.getContentGeneratorConfig()?.authType === AuthType.LOGIN_WITH_GOOGLE ? [upgradeCommand] : []
|
|
81126
81139
|
];
|
|
81127
81140
|
handle?.end();
|
|
81128
81141
|
return allDefinitions.filter((cmd) => cmd !== null);
|