@google/gemini-cli 0.46.0-preview.0 → 0.46.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-4AGOZ7LL.js → chunk-24H54ISH.js} +7 -7
- package/bundle/{chunk-F2LLVPPS.js → chunk-3EC3ZLRQ.js} +2 -2
- package/bundle/{chunk-2GMVQS2Q.js → chunk-3WW2LTMX.js} +1 -1
- package/bundle/{chunk-ZXN4VW7M.js → chunk-4B7MDBUK.js} +1 -1
- package/bundle/{chunk-J444UQD3.js → chunk-5CWORGE3.js} +1 -1
- package/bundle/{chunk-HMR43ZX2.js → chunk-5IBYZHR7.js} +2 -2
- package/bundle/{chunk-QFEJQS5X.js → chunk-7Y6NU65D.js} +1 -1
- package/bundle/{chunk-4K3E3G6Z.js → chunk-EG7USKV5.js} +8 -5
- package/bundle/{chunk-SHFHGDWR.js → chunk-EZDKSTIF.js} +2 -2
- package/bundle/{chunk-RXG3JOOZ.js → chunk-GRD2P7HY.js} +1 -1
- package/bundle/chunk-HQNVDCXK.js +154 -0
- package/bundle/chunk-ILHDA6XU.js +17320 -0
- package/bundle/{chunk-XRDSBRG4.js → chunk-ITC7TFJU.js} +7560 -14072
- package/bundle/{chunk-BOJOJVNV.js → chunk-JF6RJW53.js} +1 -1
- package/bundle/chunk-JPYTHGMI.js +398 -0
- package/bundle/{chunk-FIM2LOYZ.js → chunk-KOJR46UO.js} +40 -23
- package/bundle/{chunk-MFYAVF7Y.js → chunk-KQ4V7ZN4.js} +67 -54
- package/bundle/chunk-O3UKVEBS.js +81685 -0
- package/bundle/{chunk-S2ICEQVC.js → chunk-ONUDATHO.js} +3 -3
- package/bundle/{chunk-HHFFICNK.js → chunk-QEVRJ7HY.js} +46 -23
- package/bundle/{chunk-LBE2WKE7.js → chunk-QFWAILKU.js} +3 -3
- package/bundle/{chunk-HZNEV3DS.js → chunk-QMCEWHRR.js} +1 -1
- package/bundle/{chunk-ZQGZKIDD.js → chunk-R4LEIQZM.js} +3 -3
- package/bundle/{chunk-5LUCCXOB.js → chunk-RXYIE5L5.js} +1 -1
- package/bundle/{chunk-GTRQQGSJ.js → chunk-UM53YDCH.js} +1 -1
- package/bundle/{chunk-YMNECODB.js → chunk-VEHSYWQT.js} +9 -8
- package/bundle/chunk-VETILJQA.js +1571 -0
- package/bundle/chunk-VOFVOS4I.js +118 -0
- package/bundle/chunk-WRWCUHAM.js +512 -0
- package/bundle/chunk-XVDCGVTF.js +394545 -0
- package/bundle/{chunk-TDYUKPZH.js → chunk-YINW7YTJ.js} +1 -1
- package/bundle/{chunk-773AJHDP.js → chunk-YIOYXRDP.js} +7 -7
- package/bundle/{cleanup-2WXD6UQP.js → cleanup-4ZTB4WMN.js} +2 -2
- package/bundle/{cleanup-L3CLNVX6.js → cleanup-7LLX4OFN.js} +2 -2
- package/bundle/{cleanup-SUDL37MT.js → cleanup-GI5426XS.js} +2 -2
- package/bundle/cleanup-ZBLVGXIK.js +32 -0
- package/bundle/{core-VVRQ2GQD.js → core-3UQQYNJF.js} +3 -1
- package/bundle/{devtoolsService-ZYCBBAV3.js → devtoolsService-GJWWZ2KK.js} +2 -2
- package/bundle/{devtoolsService-E62WA3CY.js → devtoolsService-UNQILSWI.js} +4 -3
- package/bundle/devtoolsService-Z2YXVMYF.js +856 -0
- package/bundle/{devtoolsService-GLW7S6PS.js → devtoolsService-ZYGDAPOV.js} +2 -2
- package/bundle/{dist-GPCRVPKS.js → dist-4NVM6I2N.js} +3 -1
- package/bundle/{core-MOYKPEYV.js → dist-LIQULVXZ.js} +3 -1
- package/bundle/dist-XPP357J7.js +2140 -0
- package/bundle/docs/reference/configuration.md +3 -1
- package/bundle/{gemini-R5NCXCEL.js → gemini-5WY2YO7R.js} +216 -197
- package/bundle/gemini-7GZVH4VW.js +16409 -0
- package/bundle/{gemini-2JTOIMGM.js → gemini-QDOVPRKF.js} +17 -14
- package/bundle/{gemini-KV5CHM4H.js → gemini-RBKWBGCC.js} +17 -14
- package/bundle/gemini.js +7 -7
- package/bundle/{interactiveCli-RMWTSIEN.js → interactiveCli-BMKHWEH4.js} +17 -11
- package/bundle/{interactiveCli-7SIMXKNU.js → interactiveCli-OEFOYFJU.js} +323 -298
- package/bundle/interactiveCli-OGE5OTZB.js +34742 -0
- package/bundle/{interactiveCli-HVAQTBJK.js → interactiveCli-W3CMLQIM.js} +17 -11
- package/bundle/{liteRtServerManager-FY23PYSD.js → liteRtServerManager-3QOJEGNL.js} +4 -4
- package/bundle/{liteRtServerManager-LDS45QKP.js → liteRtServerManager-HPVNUYFX.js} +4 -4
- package/bundle/{liteRtServerManager-BP7XKGNU.js → liteRtServerManager-Q6LTEYH4.js} +4 -4
- package/bundle/liteRtServerManager-YL4YRHOA.js +65 -0
- package/bundle/{oauth2-provider-VVNBQH45.js → oauth2-provider-3WXIASQA.js} +1 -1
- package/bundle/{oauth2-provider-KL44D6HV.js → oauth2-provider-CTPS7JLT.js} +1 -1
- package/bundle/{oauth2-provider-4SSSEI6P.js → oauth2-provider-K52EY6RG.js} +38 -72
- package/bundle/oauth2-provider-PJJE326A.js +235 -0
- package/bundle/{start-FRM2XDGC.js → start-25W6VZG6.js} +6 -6
- package/bundle/{start-OEPJINIW.js → start-JBJSIKIB.js} +6 -6
- package/bundle/{start-DLEOBFRC.js → start-PK22QMBT.js} +6 -6
- package/bundle/start-XAEHV6FV.js +18 -0
- 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-JF6RJW53.js";
|
|
10
10
|
import {
|
|
11
11
|
DEFAULT_BACKGROUND_OPACITY,
|
|
12
12
|
DEFAULT_BORDER_OPACITY,
|
|
@@ -58,20 +58,22 @@ import {
|
|
|
58
58
|
stripUnsafeCharacters,
|
|
59
59
|
toCodePoints,
|
|
60
60
|
validateCustomTheme
|
|
61
|
-
} from "./chunk-
|
|
61
|
+
} from "./chunk-ILHDA6XU.js";
|
|
62
62
|
import {
|
|
63
63
|
isDevelopment
|
|
64
|
-
} from "./chunk-
|
|
64
|
+
} from "./chunk-5IBYZHR7.js";
|
|
65
65
|
import {
|
|
66
66
|
emptyIcon,
|
|
67
67
|
require_react
|
|
68
|
-
} from "./chunk-
|
|
68
|
+
} from "./chunk-VEHSYWQT.js";
|
|
69
69
|
import {
|
|
70
70
|
ALL_EDITORS,
|
|
71
71
|
ApprovalMode,
|
|
72
72
|
AsyncFzf,
|
|
73
|
+
AuthType,
|
|
73
74
|
Config,
|
|
74
75
|
CoreEvent,
|
|
76
|
+
CoreToolCallStatus,
|
|
75
77
|
DiscoveredMCPTool,
|
|
76
78
|
ExtensionDisableEvent,
|
|
77
79
|
ExtensionEnableEvent,
|
|
@@ -82,20 +84,31 @@ import {
|
|
|
82
84
|
ExtensionUpdateEvent,
|
|
83
85
|
GEMINI_CLI_COMPANION_EXTENSION_NAME,
|
|
84
86
|
GEMINI_DIR,
|
|
87
|
+
HookType,
|
|
88
|
+
IDEConnectionStatus,
|
|
85
89
|
INITIAL_HISTORY_LENGTH,
|
|
86
90
|
IdeClient,
|
|
87
91
|
IdeConnectionEvent,
|
|
92
|
+
IdeConnectionType,
|
|
93
|
+
IntegrityDataStatus,
|
|
88
94
|
KeychainTokenStorage,
|
|
95
|
+
LlmRole,
|
|
96
|
+
MCPDiscoveryState,
|
|
89
97
|
MCPOAuthTokenStorage,
|
|
98
|
+
MCPServerStatus,
|
|
90
99
|
ModelSlashCommandEvent,
|
|
100
|
+
PolicyDecision,
|
|
91
101
|
ProjectIdRequiredError,
|
|
92
102
|
REFERENCE_CONTENT_END,
|
|
93
103
|
REFERENCE_CONTENT_START,
|
|
94
104
|
ReadManyFilesTool,
|
|
95
105
|
RewindEvent,
|
|
106
|
+
SessionEndReason,
|
|
107
|
+
SessionStartSource,
|
|
96
108
|
ShellExecutionService,
|
|
97
109
|
StartSessionEvent,
|
|
98
110
|
Storage,
|
|
111
|
+
TrustLevel,
|
|
99
112
|
UPGRADE_URL_PAGE,
|
|
100
113
|
UserAccountManager,
|
|
101
114
|
ValidationRequiredError,
|
|
@@ -230,7 +243,7 @@ import {
|
|
|
230
243
|
tokenLimit,
|
|
231
244
|
uiTelemetryService,
|
|
232
245
|
unescapePath
|
|
233
|
-
} from "./chunk-
|
|
246
|
+
} from "./chunk-XVDCGVTF.js";
|
|
234
247
|
import {
|
|
235
248
|
require_src
|
|
236
249
|
} from "./chunk-TUDYL3X4.js";
|
|
@@ -39447,7 +39460,7 @@ var import_react34 = __toESM(require_react(), 1);
|
|
|
39447
39460
|
function useIdeTrustListener() {
|
|
39448
39461
|
const settings = useSettings();
|
|
39449
39462
|
const [connectionStatus, setConnectionStatus] = (0, import_react34.useState)(
|
|
39450
|
-
|
|
39463
|
+
IDEConnectionStatus.Disconnected
|
|
39451
39464
|
);
|
|
39452
39465
|
const previousTrust = (0, import_react34.useRef)(void 0);
|
|
39453
39466
|
const [restartReason, setRestartReason] = (0, import_react34.useState)("NONE");
|
|
@@ -39477,7 +39490,7 @@ function useIdeTrustListener() {
|
|
|
39477
39490
|
};
|
|
39478
39491
|
}, []);
|
|
39479
39492
|
const getSnapshot = () => {
|
|
39480
|
-
if (connectionStatus !==
|
|
39493
|
+
if (connectionStatus !== IDEConnectionStatus.Connected) {
|
|
39481
39494
|
return void 0;
|
|
39482
39495
|
}
|
|
39483
39496
|
return ideContextStore.get()?.workspaceState?.isTrusted;
|
|
@@ -40182,7 +40195,7 @@ async function initializeApp(config, settings) {
|
|
|
40182
40195
|
await ideClient.connect();
|
|
40183
40196
|
logIdeConnection(
|
|
40184
40197
|
config,
|
|
40185
|
-
new IdeConnectionEvent(
|
|
40198
|
+
new IdeConnectionEvent(IdeConnectionType.START)
|
|
40186
40199
|
);
|
|
40187
40200
|
}).catch((e) => {
|
|
40188
40201
|
debugLogger.error("Failed to initialize IDE client:", e);
|
|
@@ -40200,17 +40213,17 @@ async function initializeApp(config, settings) {
|
|
|
40200
40213
|
// packages/cli/src/config/auth.ts
|
|
40201
40214
|
async function validateAuthMethod(authMethod) {
|
|
40202
40215
|
loadEnvironment(loadSettings().merged, process.cwd());
|
|
40203
|
-
if (authMethod ===
|
|
40216
|
+
if (authMethod === AuthType.LOGIN_WITH_GOOGLE || authMethod === AuthType.COMPUTE_ADC) {
|
|
40204
40217
|
return null;
|
|
40205
40218
|
}
|
|
40206
|
-
if (authMethod ===
|
|
40219
|
+
if (authMethod === AuthType.USE_GEMINI) {
|
|
40207
40220
|
const key = process.env["GEMINI_API_KEY"] || await loadApiKey();
|
|
40208
40221
|
if (!key) {
|
|
40209
40222
|
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)!";
|
|
40210
40223
|
}
|
|
40211
40224
|
return null;
|
|
40212
40225
|
}
|
|
40213
|
-
if (authMethod ===
|
|
40226
|
+
if (authMethod === AuthType.USE_VERTEX_AI) {
|
|
40214
40227
|
const hasVertexProjectLocationConfig = !!process.env["GOOGLE_CLOUD_PROJECT"] && !!process.env["GOOGLE_CLOUD_LOCATION"];
|
|
40215
40228
|
const hasGoogleApiKey = !!process.env["GOOGLE_API_KEY"];
|
|
40216
40229
|
if (!hasVertexProjectLocationConfig && !hasGoogleApiKey) {
|
|
@@ -44637,7 +44650,7 @@ var ExtensionManager = class extends ExtensionLoader {
|
|
|
44637
44650
|
const trustedFolders = loadTrustedFolders();
|
|
44638
44651
|
await trustedFolders.setValue(
|
|
44639
44652
|
this.workspaceDir,
|
|
44640
|
-
|
|
44653
|
+
TrustLevel.TRUST_FOLDER
|
|
44641
44654
|
);
|
|
44642
44655
|
} else {
|
|
44643
44656
|
throw new Error(
|
|
@@ -44823,7 +44836,7 @@ Would you like to attempt to install via "git clone" instead?`
|
|
|
44823
44836
|
newExtensionConfig.version,
|
|
44824
44837
|
previousExtensionConfig.version,
|
|
44825
44838
|
installMetadata.type,
|
|
44826
|
-
|
|
44839
|
+
CoreToolCallStatus.Success
|
|
44827
44840
|
)
|
|
44828
44841
|
);
|
|
44829
44842
|
if (newExtensionName !== previousName) {
|
|
@@ -44846,7 +44859,7 @@ Would you like to attempt to install via "git clone" instead?`
|
|
|
44846
44859
|
getExtensionId(newExtensionConfig, installMetadata),
|
|
44847
44860
|
newExtensionConfig.version,
|
|
44848
44861
|
installMetadata.type,
|
|
44849
|
-
|
|
44862
|
+
CoreToolCallStatus.Success
|
|
44850
44863
|
)
|
|
44851
44864
|
);
|
|
44852
44865
|
await this.enableExtension(
|
|
@@ -44879,7 +44892,7 @@ Would you like to attempt to install via "git clone" instead?`
|
|
|
44879
44892
|
newExtensionConfig?.version ?? "",
|
|
44880
44893
|
previousExtensionConfig.version,
|
|
44881
44894
|
installMetadata.type,
|
|
44882
|
-
|
|
44895
|
+
CoreToolCallStatus.Error
|
|
44883
44896
|
)
|
|
44884
44897
|
);
|
|
44885
44898
|
} else {
|
|
@@ -44891,7 +44904,7 @@ Would you like to attempt to install via "git clone" instead?`
|
|
|
44891
44904
|
extensionId ?? "",
|
|
44892
44905
|
newExtensionConfig?.version ?? "",
|
|
44893
44906
|
installMetadata.type,
|
|
44894
|
-
|
|
44907
|
+
CoreToolCallStatus.Error
|
|
44895
44908
|
)
|
|
44896
44909
|
);
|
|
44897
44910
|
}
|
|
@@ -44922,7 +44935,7 @@ Would you like to attempt to install via "git clone" instead?`
|
|
|
44922
44935
|
extension.name,
|
|
44923
44936
|
hashValue(extension.name),
|
|
44924
44937
|
extension.id,
|
|
44925
|
-
|
|
44938
|
+
CoreToolCallStatus.Success
|
|
44926
44939
|
)
|
|
44927
44940
|
);
|
|
44928
44941
|
}
|
|
@@ -45192,7 +45205,7 @@ Would you like to attempt to install via "git clone" instead?`
|
|
|
45192
45205
|
if (eventHooks) {
|
|
45193
45206
|
for (const definition of eventHooks) {
|
|
45194
45207
|
for (const hook of definition.hooks) {
|
|
45195
|
-
if (hook.type ===
|
|
45208
|
+
if (hook.type === HookType.Command) {
|
|
45196
45209
|
hook.env = { ...hook.env, ...hookEnv };
|
|
45197
45210
|
}
|
|
45198
45211
|
}
|
|
@@ -46223,7 +46236,7 @@ async function readMcpResources(resourceParts, config, signal) {
|
|
|
46223
46236
|
callId: `mcp-resource-${resource.serverName}-${resource.uri}`,
|
|
46224
46237
|
name: `resources/read (${resource.serverName})`,
|
|
46225
46238
|
description: resource.uri,
|
|
46226
|
-
status:
|
|
46239
|
+
status: CoreToolCallStatus.Success,
|
|
46227
46240
|
isClientInitiated: true,
|
|
46228
46241
|
resultDisplay: `Successfully read resource ${resource.uri}`,
|
|
46229
46242
|
confirmationDetails: void 0
|
|
@@ -46238,7 +46251,7 @@ async function readMcpResources(resourceParts, config, signal) {
|
|
|
46238
46251
|
callId: `mcp-resource-${resource.serverName}-${resource.uri}`,
|
|
46239
46252
|
name: `resources/read (${resource.serverName})`,
|
|
46240
46253
|
description: resource.uri,
|
|
46241
|
-
status:
|
|
46254
|
+
status: CoreToolCallStatus.Error,
|
|
46242
46255
|
isClientInitiated: true,
|
|
46243
46256
|
resultDisplay: `Error reading resource ${resource.uri}: ${getErrorMessage(error)}`,
|
|
46244
46257
|
confirmationDetails: void 0
|
|
@@ -46263,7 +46276,7 @@ Content from @${result.uri}:
|
|
|
46263
46276
|
}
|
|
46264
46277
|
if (hasError) {
|
|
46265
46278
|
const firstError = displays.find(
|
|
46266
|
-
(d) => d.status ===
|
|
46279
|
+
(d) => d.status === CoreToolCallStatus.Error
|
|
46267
46280
|
);
|
|
46268
46281
|
return {
|
|
46269
46282
|
parts: [],
|
|
@@ -46304,7 +46317,7 @@ async function readLocalFiles(resolvedFiles, config, signal, userMessageTimestam
|
|
|
46304
46317
|
callId: `client-read-${userMessageTimestamp}`,
|
|
46305
46318
|
name: readManyFilesTool.displayName,
|
|
46306
46319
|
description: invocation.getDescription(),
|
|
46307
|
-
status:
|
|
46320
|
+
status: CoreToolCallStatus.Success,
|
|
46308
46321
|
isClientInitiated: true,
|
|
46309
46322
|
resultDisplay: result.returnDisplay || `Successfully read: ${fileLabelsForDisplay.join(", ")}`,
|
|
46310
46323
|
confirmationDetails: void 0
|
|
@@ -46351,7 +46364,7 @@ Content from @${displayPath}:
|
|
|
46351
46364
|
callId: `client-read-${userMessageTimestamp}`,
|
|
46352
46365
|
name: readManyFilesTool.displayName,
|
|
46353
46366
|
description: invocation?.getDescription() ?? "Error attempting to execute tool to read files",
|
|
46354
|
-
status:
|
|
46367
|
+
status: CoreToolCallStatus.Error,
|
|
46355
46368
|
isClientInitiated: true,
|
|
46356
46369
|
resultDisplay: `Error reading files (${fileLabelsForDisplay.join(", ")}): ${getErrorMessage(error)}`,
|
|
46357
46370
|
confirmationDetails: void 0
|
|
@@ -49618,7 +49631,7 @@ async function openFileInEditor(filePath, stdin, setRawMode, preferredEditorType
|
|
|
49618
49631
|
if (wasRaw) {
|
|
49619
49632
|
setRawMode?.(true);
|
|
49620
49633
|
}
|
|
49621
|
-
coreEvents.emit(
|
|
49634
|
+
coreEvents.emit(CoreEvent.ExternalEditorClosed);
|
|
49622
49635
|
}
|
|
49623
49636
|
}
|
|
49624
49637
|
|
|
@@ -52313,7 +52326,7 @@ async function updateExtension(extension, extensionManager, currentState, dispat
|
|
|
52313
52326
|
extension.name,
|
|
52314
52327
|
installMetadata
|
|
52315
52328
|
);
|
|
52316
|
-
if (status ===
|
|
52329
|
+
if (status === IntegrityDataStatus.INVALID) {
|
|
52317
52330
|
throw new Error("Extension integrity cannot be verified");
|
|
52318
52331
|
}
|
|
52319
52332
|
} catch (e) {
|
|
@@ -53731,11 +53744,11 @@ var ShellProcessor = class {
|
|
|
53731
53744
|
},
|
|
53732
53745
|
void 0
|
|
53733
53746
|
);
|
|
53734
|
-
if (decision ===
|
|
53747
|
+
if (decision === PolicyDecision.DENY) {
|
|
53735
53748
|
throw new Error(
|
|
53736
53749
|
`${this.commandName} cannot be run. Blocked command: "${command}". Reason: Blocked by policy.`
|
|
53737
53750
|
);
|
|
53738
|
-
} else if (decision ===
|
|
53751
|
+
} else if (decision === PolicyDecision.ASK_USER) {
|
|
53739
53752
|
commandsToConfirm.add(command);
|
|
53740
53753
|
}
|
|
53741
53754
|
}
|
|
@@ -54853,7 +54866,7 @@ var MultiFolderTrustDialog = ({
|
|
|
54853
54866
|
if (choice === 1 /* YES_AND_REMEMBER */) {
|
|
54854
54867
|
await trustedFolders.setValue(
|
|
54855
54868
|
expandedPath,
|
|
54856
|
-
|
|
54869
|
+
TrustLevel.TRUST_FOLDER
|
|
54857
54870
|
);
|
|
54858
54871
|
}
|
|
54859
54872
|
workspaceContext.addDirectory(expandedPath);
|
|
@@ -56501,7 +56514,7 @@ var authCommand = {
|
|
|
56501
56514
|
import process28 from "node:process";
|
|
56502
56515
|
|
|
56503
56516
|
// packages/cli/src/generated/git-commit.ts
|
|
56504
|
-
var GIT_COMMIT_INFO = "
|
|
56517
|
+
var GIT_COMMIT_INFO = "700c96118";
|
|
56505
56518
|
|
|
56506
56519
|
// packages/cli/src/ui/utils/historyExportUtils.ts
|
|
56507
56520
|
import * as fsPromises from "node:fs/promises";
|
|
@@ -57147,7 +57160,7 @@ var clearCommand = {
|
|
|
57147
57160
|
const config = context.services.agentContext?.config;
|
|
57148
57161
|
const hookSystem = config?.getHookSystem();
|
|
57149
57162
|
if (hookSystem) {
|
|
57150
|
-
await hookSystem.fireSessionEndEvent(
|
|
57163
|
+
await hookSystem.fireSessionEndEvent(SessionEndReason.Clear);
|
|
57151
57164
|
}
|
|
57152
57165
|
config?.injectionService.clear();
|
|
57153
57166
|
let newSessionId;
|
|
@@ -57164,7 +57177,7 @@ var clearCommand = {
|
|
|
57164
57177
|
}
|
|
57165
57178
|
let result;
|
|
57166
57179
|
if (hookSystem) {
|
|
57167
|
-
result = await hookSystem.fireSessionStartEvent(
|
|
57180
|
+
result = await hookSystem.fireSessionStartEvent(SessionStartSource.Clear);
|
|
57168
57181
|
}
|
|
57169
57182
|
await new Promise((resolve9) => setImmediate(resolve9));
|
|
57170
57183
|
if (config) {
|
|
@@ -60163,7 +60176,7 @@ var Footer = () => {
|
|
|
60163
60176
|
case "auth": {
|
|
60164
60177
|
if (!settings.merged.ui.showUserIdentity) break;
|
|
60165
60178
|
if (!authType) break;
|
|
60166
|
-
const displayStr = authType ===
|
|
60179
|
+
const displayStr = authType === AuthType.LOGIN_WITH_GOOGLE ? email ?? "google" : authType;
|
|
60167
60180
|
addCol(
|
|
60168
60181
|
id,
|
|
60169
60182
|
header,
|
|
@@ -61911,12 +61924,12 @@ import path29 from "node:path";
|
|
|
61911
61924
|
function getIdeStatusMessage(ideClient) {
|
|
61912
61925
|
const connection = ideClient.getConnectionStatus();
|
|
61913
61926
|
switch (connection.status) {
|
|
61914
|
-
case
|
|
61927
|
+
case IDEConnectionStatus.Connected:
|
|
61915
61928
|
return {
|
|
61916
61929
|
messageType: "info",
|
|
61917
61930
|
content: `\u{1F7E2} Connected to ${ideClient.getDetectedIdeDisplayName()}`
|
|
61918
61931
|
};
|
|
61919
|
-
case
|
|
61932
|
+
case IDEConnectionStatus.Connecting:
|
|
61920
61933
|
return {
|
|
61921
61934
|
messageType: "info",
|
|
61922
61935
|
content: `\u{1F7E1} Connecting...`
|
|
@@ -61957,7 +61970,7 @@ ${infoMessage}`;
|
|
|
61957
61970
|
async function getIdeStatusMessageWithFiles(ideClient) {
|
|
61958
61971
|
const connection = ideClient.getConnectionStatus();
|
|
61959
61972
|
switch (connection.status) {
|
|
61960
|
-
case
|
|
61973
|
+
case IDEConnectionStatus.Connected: {
|
|
61961
61974
|
let content = `\u{1F7E2} Connected to ${ideClient.getDetectedIdeDisplayName()}`;
|
|
61962
61975
|
const context = ideContextStore.get();
|
|
61963
61976
|
const openFiles = context?.workspaceState?.openFiles;
|
|
@@ -61969,7 +61982,7 @@ async function getIdeStatusMessageWithFiles(ideClient) {
|
|
|
61969
61982
|
content
|
|
61970
61983
|
};
|
|
61971
61984
|
}
|
|
61972
|
-
case
|
|
61985
|
+
case IDEConnectionStatus.Connecting:
|
|
61973
61986
|
return {
|
|
61974
61987
|
messageType: "info",
|
|
61975
61988
|
content: `\u{1F7E1} Connecting...`
|
|
@@ -61991,7 +62004,7 @@ async function setIdeModeAndSyncConnection(config, value, options = {}) {
|
|
|
61991
62004
|
const ideClient = await IdeClient.getInstance();
|
|
61992
62005
|
if (value) {
|
|
61993
62006
|
await ideClient.connect(options);
|
|
61994
|
-
logIdeConnection(config, new IdeConnectionEvent(
|
|
62007
|
+
logIdeConnection(config, new IdeConnectionEvent(IdeConnectionType.SESSION));
|
|
61995
62008
|
} else {
|
|
61996
62009
|
await ideClient.disconnect();
|
|
61997
62010
|
}
|
|
@@ -62079,7 +62092,7 @@ var ideCommand = async () => {
|
|
|
62079
62092
|
logToConsole: false
|
|
62080
62093
|
}
|
|
62081
62094
|
);
|
|
62082
|
-
if (ideClient.getConnectionStatus().status ===
|
|
62095
|
+
if (ideClient.getConnectionStatus().status === IDEConnectionStatus.Connected) {
|
|
62083
62096
|
break;
|
|
62084
62097
|
}
|
|
62085
62098
|
await new Promise((resolve9) => setTimeout(resolve9, 500));
|
|
@@ -62156,7 +62169,7 @@ var ideCommand = async () => {
|
|
|
62156
62169
|
}
|
|
62157
62170
|
};
|
|
62158
62171
|
const { status } = ideClient.getConnectionStatus();
|
|
62159
|
-
const isConnected = status ===
|
|
62172
|
+
const isConnected = status === IDEConnectionStatus.Connected;
|
|
62160
62173
|
if (isConnected) {
|
|
62161
62174
|
ideSlashCommand.subCommands = [statusCommand2, disableCommand5];
|
|
62162
62175
|
} else {
|
|
@@ -62256,13 +62269,13 @@ Use /mcp auth <server-name> to authenticate.`
|
|
|
62256
62269
|
const displayListener = (message) => {
|
|
62257
62270
|
context.ui.addItem({ type: "info", text: message });
|
|
62258
62271
|
};
|
|
62259
|
-
coreEvents.on(
|
|
62272
|
+
coreEvents.on(CoreEvent.OauthDisplayMessage, displayListener);
|
|
62260
62273
|
try {
|
|
62261
62274
|
context.ui.addItem({
|
|
62262
62275
|
type: "info",
|
|
62263
62276
|
text: `Starting OAuth authentication for MCP server '${serverName}'...`
|
|
62264
62277
|
});
|
|
62265
|
-
const { MCPOAuthProvider } = await import("./
|
|
62278
|
+
const { MCPOAuthProvider } = await import("./dist-XPP357J7.js");
|
|
62266
62279
|
let oauthConfig = server.oauth;
|
|
62267
62280
|
if (!oauthConfig) {
|
|
62268
62281
|
oauthConfig = { enabled: false };
|
|
@@ -62299,7 +62312,7 @@ Use /mcp auth <server-name> to authenticate.`
|
|
|
62299
62312
|
content: `Failed to authenticate with MCP server '${serverName}': ${getErrorMessage(error)}`
|
|
62300
62313
|
};
|
|
62301
62314
|
} finally {
|
|
62302
|
-
coreEvents.removeListener(
|
|
62315
|
+
coreEvents.removeListener(CoreEvent.OauthDisplayMessage, displayListener);
|
|
62303
62316
|
}
|
|
62304
62317
|
},
|
|
62305
62318
|
completion: async (context, partialArg) => {
|
|
@@ -62345,10 +62358,10 @@ var listAction2 = async (context, showDescriptions = false, showSchema = false,
|
|
|
62345
62358
|
}
|
|
62346
62359
|
const serverNames = Object.keys(mcpServers);
|
|
62347
62360
|
const connectingServers = serverNames.filter(
|
|
62348
|
-
(name) => getMCPServerStatus(name) ===
|
|
62361
|
+
(name) => getMCPServerStatus(name) === MCPServerStatus.CONNECTING
|
|
62349
62362
|
);
|
|
62350
62363
|
const discoveryState = getMCPDiscoveryState();
|
|
62351
|
-
const discoveryInProgress = discoveryState ===
|
|
62364
|
+
const discoveryInProgress = discoveryState === MCPDiscoveryState.IN_PROGRESS || connectingServers.length > 0;
|
|
62352
62365
|
const allTools = toolRegistry.getAllTools();
|
|
62353
62366
|
const mcpTools = allTools.filter((tool) => tool instanceof DiscoveredMCPTool);
|
|
62354
62367
|
const promptRegistry = config.getPromptRegistry();
|
|
@@ -78106,7 +78119,7 @@ Return a JSON object with:
|
|
|
78106
78119
|
},
|
|
78107
78120
|
abortSignal: new AbortController().signal,
|
|
78108
78121
|
promptId: "triage-duplicates",
|
|
78109
|
-
role:
|
|
78122
|
+
role: LlmRole.UTILITY_TOOL
|
|
78110
78123
|
});
|
|
78111
78124
|
const rec = response;
|
|
78112
78125
|
let canonical;
|
|
@@ -78940,7 +78953,7 @@ Return a JSON object with:
|
|
|
78940
78953
|
},
|
|
78941
78954
|
abortSignal: abortControllerRef.current.signal,
|
|
78942
78955
|
promptId: "triage-issues",
|
|
78943
|
-
role:
|
|
78956
|
+
role: LlmRole.UTILITY_TOOL
|
|
78944
78957
|
});
|
|
78945
78958
|
return response;
|
|
78946
78959
|
},
|
|
@@ -79514,8 +79527,8 @@ var planCommand = {
|
|
|
79514
79527
|
return;
|
|
79515
79528
|
}
|
|
79516
79529
|
const previousApprovalMode = config.getApprovalMode();
|
|
79517
|
-
config.setApprovalMode(
|
|
79518
|
-
if (previousApprovalMode !==
|
|
79530
|
+
config.setApprovalMode(ApprovalMode.PLAN);
|
|
79531
|
+
if (previousApprovalMode !== ApprovalMode.PLAN) {
|
|
79519
79532
|
coreEvents.emitFeedback("info", "Switched to Plan Mode.");
|
|
79520
79533
|
}
|
|
79521
79534
|
if (context.invocation?.args) {
|
|
@@ -79574,10 +79587,10 @@ var categorizeRulesByMode = (rules) => {
|
|
|
79574
79587
|
rules.forEach((rule) => {
|
|
79575
79588
|
const modes = rule.modes?.length ? rule.modes : ALL_MODES;
|
|
79576
79589
|
const modeSet = new Set(modes);
|
|
79577
|
-
if (modeSet.has(
|
|
79578
|
-
if (modeSet.has(
|
|
79579
|
-
if (modeSet.has(
|
|
79580
|
-
if (modeSet.has(
|
|
79590
|
+
if (modeSet.has(ApprovalMode.DEFAULT)) result.normal.push(rule);
|
|
79591
|
+
if (modeSet.has(ApprovalMode.AUTO_EDIT)) result.autoEdit.push(rule);
|
|
79592
|
+
if (modeSet.has(ApprovalMode.YOLO)) result.yolo.push(rule);
|
|
79593
|
+
if (modeSet.has(ApprovalMode.PLAN)) result.plan.push(rule);
|
|
79581
79594
|
});
|
|
79582
79595
|
return result;
|
|
79583
79596
|
};
|
|
@@ -80929,7 +80942,7 @@ var upgradeCommand = {
|
|
|
80929
80942
|
action: async (context) => {
|
|
80930
80943
|
const config = context.services.agentContext?.config;
|
|
80931
80944
|
const authType = config?.getContentGeneratorConfig()?.authType;
|
|
80932
|
-
if (authType !==
|
|
80945
|
+
if (authType !== AuthType.LOGIN_WITH_GOOGLE) {
|
|
80933
80946
|
return {
|
|
80934
80947
|
type: "message",
|
|
80935
80948
|
messageType: "error",
|
|
@@ -81158,7 +81171,7 @@ var BuiltinCommandLoader = class {
|
|
|
81158
81171
|
setupGithubCommand,
|
|
81159
81172
|
terminalSetupCommand,
|
|
81160
81173
|
...this.config?.isVoiceModeEnabled() ? [voiceCommand] : [],
|
|
81161
|
-
...this.config?.getContentGeneratorConfig()?.authType ===
|
|
81174
|
+
...this.config?.getContentGeneratorConfig()?.authType === AuthType.LOGIN_WITH_GOOGLE ? [upgradeCommand] : []
|
|
81162
81175
|
];
|
|
81163
81176
|
handle?.end();
|
|
81164
81177
|
return allDefinitions.filter((cmd) => cmd !== null);
|