@google/gemini-cli 0.57.0-preview.1 → 0.57.0
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-S5UX3QS5.js → chunk-4H4K2RBL.js} +3 -3
- package/bundle/{chunk-G65GW52B.js → chunk-7HKQGPWB.js} +4 -4
- package/bundle/{chunk-EAK33LFP.js → chunk-7IKUWYZO.js} +1 -1
- package/bundle/{chunk-ALVDOQNA.js → chunk-7ZGWPQVZ.js} +1 -1
- package/bundle/{chunk-ZMPGHLGO.js → chunk-AOE6E7MU.js} +2 -2
- package/bundle/{chunk-65C235NM.js → chunk-ASZFEU6C.js} +7 -7
- package/bundle/{chunk-O7SBKM7M.js → chunk-DFPYJMVX.js} +4 -4
- package/bundle/{chunk-VBK54QCZ.js → chunk-FVC4WCSP.js} +1 -1
- package/bundle/{chunk-3BVBON3V.js → chunk-FYAMITQ2.js} +1 -1
- package/bundle/{chunk-GK7NUJ35.js → chunk-GAROUUGQ.js} +1 -1
- package/bundle/{chunk-3NPMAHLX.js → chunk-GAS2GAYB.js} +1 -1
- package/bundle/{chunk-4ALCU2HQ.js → chunk-GPOBVDAD.js} +5 -8
- package/bundle/{chunk-RLDNUS35.js → chunk-HY6GN2F7.js} +1 -1
- package/bundle/{chunk-AKCYXG7C.js → chunk-IKHAM2LG.js} +7 -7
- package/bundle/{chunk-MBWROXYM.js → chunk-ISXOUBN5.js} +2 -2
- package/bundle/{chunk-NMMXRZ53.js → chunk-LQJHQ4BU.js} +2 -2
- package/bundle/{chunk-UMQE7UC6.js → chunk-MNBBUQQS.js} +3 -3
- package/bundle/{chunk-W23OOD2C.js → chunk-O7TOZUUB.js} +3 -3
- package/bundle/{chunk-FHDRG5U4.js → chunk-QJ33O2NH.js} +54 -67
- package/bundle/{chunk-Q73BPF7A.js → chunk-RLDNVR77.js} +1 -1
- package/bundle/{chunk-NPOI4K6X.js → chunk-S3MXVTTY.js} +14357 -7673
- package/bundle/{chunk-NQ4RH42O.js → chunk-TAWZWX2B.js} +8 -9
- package/bundle/{chunk-GMQ6QNZB.js → chunk-XG56CL6B.js} +1 -1
- package/bundle/{chunk-SCBVGZXH.js → chunk-YW7SDLZQ.js} +1 -1
- package/bundle/{cleanup-2W5DPMY3.js → cleanup-2HUWGXK6.js} +2 -2
- package/bundle/{cleanup-OTHE7RNU.js → cleanup-7N2HFE2E.js} +2 -2
- package/bundle/{cleanup-SM67K64R.js → cleanup-DA7OSZS5.js} +2 -2
- package/bundle/{core-US34OW5M.js → core-2NMRPWUN.js} +1 -1
- package/bundle/{dist-5TYMQVIZ.js → core-CFPIDJ4Z.js} +1 -1
- package/bundle/{devtoolsService-5J53UK6Z.js → devtoolsService-7YYOUGVF.js} +2 -2
- package/bundle/{devtoolsService-JBFUXTCT.js → devtoolsService-VQSLUOYF.js} +3 -4
- package/bundle/{devtoolsService-GU2GQSOF.js → devtoolsService-WMEEEXY6.js} +2 -2
- package/bundle/{dist-OWKHVWTR.js → dist-AMP5W5P2.js} +1 -1
- package/bundle/{gemini-W2B6CLJC.js → gemini-5LF4JAP7.js} +198 -214
- package/bundle/{gemini-LSMTDETS.js → gemini-OYYGXMHL.js} +14 -14
- package/bundle/{gemini-3M22N2C3.js → gemini-PSRJNVY5.js} +14 -14
- package/bundle/gemini.js +7 -7
- package/bundle/{interactiveCli-LQJM6LRE.js → interactiveCli-5E2C3XOC.js} +8 -8
- package/bundle/{interactiveCli-D6H37PJQ.js → interactiveCli-5O6FZS57.js} +8 -8
- package/bundle/{interactiveCli-L3ZXOVEV.js → interactiveCli-PP7WTUZL.js} +296 -315
- package/bundle/{liteRtServerManager-3BY6TBHG.js → liteRtServerManager-5QBFCLBK.js} +4 -4
- package/bundle/{liteRtServerManager-C5WZRQUF.js → liteRtServerManager-LK6HOSMO.js} +4 -4
- package/bundle/{liteRtServerManager-IGKUGGP4.js → liteRtServerManager-ZPDALIDY.js} +4 -4
- package/bundle/{oauth2-provider-KSRLPOK3.js → oauth2-provider-BGMEA7RS.js} +1 -1
- package/bundle/{oauth2-provider-RWKTMYJF.js → oauth2-provider-BYKBBEKI.js} +1 -1
- package/bundle/{oauth2-provider-VHNLCU4Y.js → oauth2-provider-CO22I6UM.js} +72 -38
- package/bundle/{start-EXAQFM4Y.js → start-JRTTCV3K.js} +6 -6
- package/bundle/{start-IPZF32E3.js → start-KH6WSP5C.js} +6 -6
- package/bundle/{start-SVNTSNHV.js → start-O6LWZY6K.js} +6 -6
- package/package.json +1 -1
- package/bundle/chunk-4SNEOO5E.js +0 -398
- package/bundle/chunk-LNXGFWGZ.js +0 -17332
- package/bundle/chunk-QJP6CMLN.js +0 -118
- package/bundle/chunk-SWQAIZEQ.js +0 -102506
- package/bundle/chunk-VGGWKRAC.js +0 -154
- package/bundle/chunk-WDFSF5L4.js +0 -397601
- package/bundle/chunk-XESAM7IL.js +0 -512
- package/bundle/chunk-Y3APL4PE.js +0 -1571
- package/bundle/cleanup-XAUT5CMD.js +0 -32
- package/bundle/devtoolsService-V46GUHRF.js +0 -4359
- package/bundle/dist-V5VJYW6J.js +0 -2180
- package/bundle/gemini-OZOYJF22.js +0 -17091
- package/bundle/interactiveCli-RGOYDSMH.js +0 -34984
- package/bundle/liteRtServerManager-IJ4I2PZA.js +0 -65
- package/bundle/oauth2-provider-ZT4OFVMK.js +0 -235
- package/bundle/start-ZXU5BFZY.js +0 -18
|
@@ -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-YW7SDLZQ.js";
|
|
6
6
|
import {
|
|
7
7
|
AppEvent,
|
|
8
8
|
appEvents
|
|
@@ -59,22 +59,20 @@ import {
|
|
|
59
59
|
stripUnsafeCharacters,
|
|
60
60
|
toCodePoints,
|
|
61
61
|
validateCustomTheme
|
|
62
|
-
} from "./chunk-
|
|
62
|
+
} from "./chunk-7ZGWPQVZ.js";
|
|
63
63
|
import {
|
|
64
64
|
isDevelopment
|
|
65
|
-
} from "./chunk-
|
|
65
|
+
} from "./chunk-AOE6E7MU.js";
|
|
66
66
|
import {
|
|
67
67
|
emptyIcon,
|
|
68
68
|
require_react
|
|
69
|
-
} from "./chunk-
|
|
69
|
+
} from "./chunk-TAWZWX2B.js";
|
|
70
70
|
import {
|
|
71
71
|
ALL_EDITORS,
|
|
72
72
|
ApprovalMode,
|
|
73
73
|
AsyncFzf,
|
|
74
|
-
AuthType,
|
|
75
74
|
Config,
|
|
76
75
|
CoreEvent,
|
|
77
|
-
CoreToolCallStatus,
|
|
78
76
|
DiscoveredMCPTool,
|
|
79
77
|
ExtensionDisableEvent,
|
|
80
78
|
ExtensionEnableEvent,
|
|
@@ -85,31 +83,20 @@ import {
|
|
|
85
83
|
ExtensionUpdateEvent,
|
|
86
84
|
GEMINI_CLI_COMPANION_EXTENSION_NAME,
|
|
87
85
|
GEMINI_DIR,
|
|
88
|
-
HookType,
|
|
89
|
-
IDEConnectionStatus,
|
|
90
86
|
INITIAL_HISTORY_LENGTH,
|
|
91
87
|
IdeClient,
|
|
92
88
|
IdeConnectionEvent,
|
|
93
|
-
IdeConnectionType,
|
|
94
|
-
IntegrityDataStatus,
|
|
95
89
|
KeychainTokenStorage,
|
|
96
|
-
LlmRole,
|
|
97
|
-
MCPDiscoveryState,
|
|
98
90
|
MCPOAuthTokenStorage,
|
|
99
|
-
MCPServerStatus,
|
|
100
91
|
ModelSlashCommandEvent,
|
|
101
|
-
PolicyDecision,
|
|
102
92
|
ProjectIdRequiredError,
|
|
103
93
|
REFERENCE_CONTENT_END,
|
|
104
94
|
REFERENCE_CONTENT_START,
|
|
105
95
|
ReadManyFilesTool,
|
|
106
96
|
RewindEvent,
|
|
107
|
-
SessionEndReason,
|
|
108
|
-
SessionStartSource,
|
|
109
97
|
ShellExecutionService,
|
|
110
98
|
StartSessionEvent,
|
|
111
99
|
Storage,
|
|
112
|
-
TrustLevel,
|
|
113
100
|
UPGRADE_URL_PAGE,
|
|
114
101
|
UserAccountManager,
|
|
115
102
|
ValidationRequiredError,
|
|
@@ -244,7 +231,7 @@ import {
|
|
|
244
231
|
tokenLimit,
|
|
245
232
|
uiTelemetryService,
|
|
246
233
|
unescapePath
|
|
247
|
-
} from "./chunk-
|
|
234
|
+
} from "./chunk-S3MXVTTY.js";
|
|
248
235
|
import {
|
|
249
236
|
require_src
|
|
250
237
|
} from "./chunk-TUDYL3X4.js";
|
|
@@ -60090,7 +60077,7 @@ var import_react34 = __toESM(require_react(), 1);
|
|
|
60090
60077
|
function useIdeTrustListener() {
|
|
60091
60078
|
const settings = useSettings();
|
|
60092
60079
|
const [connectionStatus, setConnectionStatus] = (0, import_react34.useState)(
|
|
60093
|
-
|
|
60080
|
+
"disconnected" /* Disconnected */
|
|
60094
60081
|
);
|
|
60095
60082
|
const previousTrust = (0, import_react34.useRef)(void 0);
|
|
60096
60083
|
const [restartReason, setRestartReason] = (0, import_react34.useState)("NONE");
|
|
@@ -60120,7 +60107,7 @@ function useIdeTrustListener() {
|
|
|
60120
60107
|
};
|
|
60121
60108
|
}, []);
|
|
60122
60109
|
const getSnapshot = () => {
|
|
60123
|
-
if (connectionStatus !==
|
|
60110
|
+
if (connectionStatus !== "connected" /* Connected */) {
|
|
60124
60111
|
return void 0;
|
|
60125
60112
|
}
|
|
60126
60113
|
return ideContextStore.get()?.workspaceState?.isTrusted;
|
|
@@ -60825,7 +60812,7 @@ async function initializeApp(config, settings) {
|
|
|
60825
60812
|
await ideClient.connect();
|
|
60826
60813
|
logIdeConnection(
|
|
60827
60814
|
config,
|
|
60828
|
-
new IdeConnectionEvent(
|
|
60815
|
+
new IdeConnectionEvent("start" /* START */)
|
|
60829
60816
|
);
|
|
60830
60817
|
}).catch((e) => {
|
|
60831
60818
|
debugLogger.error("Failed to initialize IDE client:", e);
|
|
@@ -60843,17 +60830,17 @@ async function initializeApp(config, settings) {
|
|
|
60843
60830
|
// packages/cli/src/config/auth.ts
|
|
60844
60831
|
async function validateAuthMethod(authMethod) {
|
|
60845
60832
|
loadEnvironment(loadSettings().merged, process.cwd());
|
|
60846
|
-
if (authMethod ===
|
|
60833
|
+
if (authMethod === "oauth-personal" /* LOGIN_WITH_GOOGLE */ || authMethod === "compute-default-credentials" /* COMPUTE_ADC */) {
|
|
60847
60834
|
return null;
|
|
60848
60835
|
}
|
|
60849
|
-
if (authMethod ===
|
|
60836
|
+
if (authMethod === "gemini-api-key" /* USE_GEMINI */) {
|
|
60850
60837
|
const key = process.env["GEMINI_API_KEY"] || await loadApiKey();
|
|
60851
60838
|
if (!key) {
|
|
60852
60839
|
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)!";
|
|
60853
60840
|
}
|
|
60854
60841
|
return null;
|
|
60855
60842
|
}
|
|
60856
|
-
if (authMethod ===
|
|
60843
|
+
if (authMethod === "vertex-ai" /* USE_VERTEX_AI */) {
|
|
60857
60844
|
const hasVertexProjectLocationConfig = !!process.env["GOOGLE_CLOUD_PROJECT"] && !!process.env["GOOGLE_CLOUD_LOCATION"];
|
|
60858
60845
|
const hasGoogleApiKey = !!process.env["GOOGLE_API_KEY"];
|
|
60859
60846
|
if (!hasVertexProjectLocationConfig && !hasGoogleApiKey) {
|
|
@@ -65280,7 +65267,7 @@ var ExtensionManager = class extends ExtensionLoader {
|
|
|
65280
65267
|
const trustedFolders = loadTrustedFolders();
|
|
65281
65268
|
await trustedFolders.setValue(
|
|
65282
65269
|
this.workspaceDir,
|
|
65283
|
-
|
|
65270
|
+
"TRUST_FOLDER" /* TRUST_FOLDER */
|
|
65284
65271
|
);
|
|
65285
65272
|
} else {
|
|
65286
65273
|
throw new Error(
|
|
@@ -65466,7 +65453,7 @@ Would you like to attempt to install via "git clone" instead?`
|
|
|
65466
65453
|
newExtensionConfig.version,
|
|
65467
65454
|
previousExtensionConfig.version,
|
|
65468
65455
|
installMetadata.type,
|
|
65469
|
-
|
|
65456
|
+
"success" /* Success */
|
|
65470
65457
|
)
|
|
65471
65458
|
);
|
|
65472
65459
|
if (newExtensionName !== previousName) {
|
|
@@ -65489,7 +65476,7 @@ Would you like to attempt to install via "git clone" instead?`
|
|
|
65489
65476
|
getExtensionId(newExtensionConfig, installMetadata),
|
|
65490
65477
|
newExtensionConfig.version,
|
|
65491
65478
|
installMetadata.type,
|
|
65492
|
-
|
|
65479
|
+
"success" /* Success */
|
|
65493
65480
|
)
|
|
65494
65481
|
);
|
|
65495
65482
|
await this.enableExtension(
|
|
@@ -65522,7 +65509,7 @@ Would you like to attempt to install via "git clone" instead?`
|
|
|
65522
65509
|
newExtensionConfig?.version ?? "",
|
|
65523
65510
|
previousExtensionConfig.version,
|
|
65524
65511
|
installMetadata.type,
|
|
65525
|
-
|
|
65512
|
+
"error" /* Error */
|
|
65526
65513
|
)
|
|
65527
65514
|
);
|
|
65528
65515
|
} else {
|
|
@@ -65534,7 +65521,7 @@ Would you like to attempt to install via "git clone" instead?`
|
|
|
65534
65521
|
extensionId ?? "",
|
|
65535
65522
|
newExtensionConfig?.version ?? "",
|
|
65536
65523
|
installMetadata.type,
|
|
65537
|
-
|
|
65524
|
+
"error" /* Error */
|
|
65538
65525
|
)
|
|
65539
65526
|
);
|
|
65540
65527
|
}
|
|
@@ -65565,7 +65552,7 @@ Would you like to attempt to install via "git clone" instead?`
|
|
|
65565
65552
|
extension.name,
|
|
65566
65553
|
hashValue(extension.name),
|
|
65567
65554
|
extension.id,
|
|
65568
|
-
|
|
65555
|
+
"success" /* Success */
|
|
65569
65556
|
)
|
|
65570
65557
|
);
|
|
65571
65558
|
}
|
|
@@ -65835,7 +65822,7 @@ Would you like to attempt to install via "git clone" instead?`
|
|
|
65835
65822
|
if (eventHooks) {
|
|
65836
65823
|
for (const definition of eventHooks) {
|
|
65837
65824
|
for (const hook of definition.hooks) {
|
|
65838
|
-
if (hook.type ===
|
|
65825
|
+
if (hook.type === "command" /* Command */) {
|
|
65839
65826
|
hook.env = { ...hook.env, ...hookEnv };
|
|
65840
65827
|
}
|
|
65841
65828
|
}
|
|
@@ -66866,7 +66853,7 @@ async function readMcpResources(resourceParts, config, signal) {
|
|
|
66866
66853
|
callId: `mcp-resource-${resource.serverName}-${resource.uri}`,
|
|
66867
66854
|
name: `resources/read (${resource.serverName})`,
|
|
66868
66855
|
description: resource.uri,
|
|
66869
|
-
status:
|
|
66856
|
+
status: "success" /* Success */,
|
|
66870
66857
|
isClientInitiated: true,
|
|
66871
66858
|
resultDisplay: `Successfully read resource ${resource.uri}`,
|
|
66872
66859
|
confirmationDetails: void 0
|
|
@@ -66881,7 +66868,7 @@ async function readMcpResources(resourceParts, config, signal) {
|
|
|
66881
66868
|
callId: `mcp-resource-${resource.serverName}-${resource.uri}`,
|
|
66882
66869
|
name: `resources/read (${resource.serverName})`,
|
|
66883
66870
|
description: resource.uri,
|
|
66884
|
-
status:
|
|
66871
|
+
status: "error" /* Error */,
|
|
66885
66872
|
isClientInitiated: true,
|
|
66886
66873
|
resultDisplay: `Error reading resource ${resource.uri}: ${getErrorMessage(error)}`,
|
|
66887
66874
|
confirmationDetails: void 0
|
|
@@ -66906,7 +66893,7 @@ Content from @${result.uri}:
|
|
|
66906
66893
|
}
|
|
66907
66894
|
if (hasError) {
|
|
66908
66895
|
const firstError = displays.find(
|
|
66909
|
-
(d) => d.status ===
|
|
66896
|
+
(d) => d.status === "error" /* Error */
|
|
66910
66897
|
);
|
|
66911
66898
|
return {
|
|
66912
66899
|
parts: [],
|
|
@@ -66947,7 +66934,7 @@ async function readLocalFiles(resolvedFiles, config, signal, userMessageTimestam
|
|
|
66947
66934
|
callId: `client-read-${userMessageTimestamp}`,
|
|
66948
66935
|
name: readManyFilesTool.displayName,
|
|
66949
66936
|
description: invocation.getDescription(),
|
|
66950
|
-
status:
|
|
66937
|
+
status: "success" /* Success */,
|
|
66951
66938
|
isClientInitiated: true,
|
|
66952
66939
|
resultDisplay: result.returnDisplay || `Successfully read: ${fileLabelsForDisplay.join(", ")}`,
|
|
66953
66940
|
confirmationDetails: void 0
|
|
@@ -66994,7 +66981,7 @@ Content from @${displayPath}:
|
|
|
66994
66981
|
callId: `client-read-${userMessageTimestamp}`,
|
|
66995
66982
|
name: readManyFilesTool.displayName,
|
|
66996
66983
|
description: invocation?.getDescription() ?? "Error attempting to execute tool to read files",
|
|
66997
|
-
status:
|
|
66984
|
+
status: "error" /* Error */,
|
|
66998
66985
|
isClientInitiated: true,
|
|
66999
66986
|
resultDisplay: `Error reading files (${fileLabelsForDisplay.join(", ")}): ${getErrorMessage(error)}`,
|
|
67000
66987
|
confirmationDetails: void 0
|
|
@@ -70261,7 +70248,7 @@ async function openFileInEditor(filePath, stdin, setRawMode, preferredEditorType
|
|
|
70261
70248
|
if (wasRaw) {
|
|
70262
70249
|
setRawMode?.(true);
|
|
70263
70250
|
}
|
|
70264
|
-
coreEvents.emit(
|
|
70251
|
+
coreEvents.emit("external-editor-closed" /* ExternalEditorClosed */);
|
|
70265
70252
|
}
|
|
70266
70253
|
}
|
|
70267
70254
|
|
|
@@ -72956,7 +72943,7 @@ async function updateExtension(extension, extensionManager, currentState, dispat
|
|
|
72956
72943
|
extension.name,
|
|
72957
72944
|
installMetadata
|
|
72958
72945
|
);
|
|
72959
|
-
if (status ===
|
|
72946
|
+
if (status === "invalid" /* INVALID */) {
|
|
72960
72947
|
throw new Error("Extension integrity cannot be verified");
|
|
72961
72948
|
}
|
|
72962
72949
|
} catch (e) {
|
|
@@ -74377,11 +74364,11 @@ var ShellProcessor = class {
|
|
|
74377
74364
|
},
|
|
74378
74365
|
void 0
|
|
74379
74366
|
);
|
|
74380
|
-
if (decision ===
|
|
74367
|
+
if (decision === "deny" /* DENY */) {
|
|
74381
74368
|
throw new Error(
|
|
74382
74369
|
`${this.commandName} cannot be run. Blocked command: "${command}". Reason: Blocked by policy.`
|
|
74383
74370
|
);
|
|
74384
|
-
} else if (decision ===
|
|
74371
|
+
} else if (decision === "ask_user" /* ASK_USER */) {
|
|
74385
74372
|
commandsToConfirm.add(command);
|
|
74386
74373
|
}
|
|
74387
74374
|
}
|
|
@@ -75499,7 +75486,7 @@ var MultiFolderTrustDialog = ({
|
|
|
75499
75486
|
if (choice === 1 /* YES_AND_REMEMBER */) {
|
|
75500
75487
|
await trustedFolders.setValue(
|
|
75501
75488
|
expandedPath,
|
|
75502
|
-
|
|
75489
|
+
"TRUST_FOLDER" /* TRUST_FOLDER */
|
|
75503
75490
|
);
|
|
75504
75491
|
}
|
|
75505
75492
|
workspaceContext.addDirectory(expandedPath);
|
|
@@ -77177,7 +77164,7 @@ var authCommand = {
|
|
|
77177
77164
|
import process29 from "node:process";
|
|
77178
77165
|
|
|
77179
77166
|
// packages/cli/src/generated/git-commit.ts
|
|
77180
|
-
var GIT_COMMIT_INFO = "
|
|
77167
|
+
var GIT_COMMIT_INFO = "1110ce8bc";
|
|
77181
77168
|
|
|
77182
77169
|
// packages/cli/src/ui/utils/historyExportUtils.ts
|
|
77183
77170
|
import * as fsPromises from "node:fs/promises";
|
|
@@ -77823,7 +77810,7 @@ var clearCommand = {
|
|
|
77823
77810
|
const config = context.services.agentContext?.config;
|
|
77824
77811
|
const hookSystem = config?.getHookSystem();
|
|
77825
77812
|
if (hookSystem) {
|
|
77826
|
-
await hookSystem.fireSessionEndEvent(
|
|
77813
|
+
await hookSystem.fireSessionEndEvent("clear" /* Clear */);
|
|
77827
77814
|
}
|
|
77828
77815
|
config?.injectionService.clear();
|
|
77829
77816
|
let newSessionId;
|
|
@@ -77840,7 +77827,7 @@ var clearCommand = {
|
|
|
77840
77827
|
}
|
|
77841
77828
|
let result;
|
|
77842
77829
|
if (hookSystem) {
|
|
77843
|
-
result = await hookSystem.fireSessionStartEvent(
|
|
77830
|
+
result = await hookSystem.fireSessionStartEvent("clear" /* Clear */);
|
|
77844
77831
|
}
|
|
77845
77832
|
await new Promise((resolve9) => setImmediate(resolve9));
|
|
77846
77833
|
if (config) {
|
|
@@ -80839,7 +80826,7 @@ var Footer = () => {
|
|
|
80839
80826
|
case "auth": {
|
|
80840
80827
|
if (!settings.merged.ui.showUserIdentity) break;
|
|
80841
80828
|
if (!authType) break;
|
|
80842
|
-
const displayStr = authType ===
|
|
80829
|
+
const displayStr = authType === "oauth-personal" /* LOGIN_WITH_GOOGLE */ ? email ?? "google" : authType;
|
|
80843
80830
|
addCol(
|
|
80844
80831
|
id,
|
|
80845
80832
|
header,
|
|
@@ -82607,12 +82594,12 @@ import path29 from "node:path";
|
|
|
82607
82594
|
function getIdeStatusMessage(ideClient) {
|
|
82608
82595
|
const connection = ideClient.getConnectionStatus();
|
|
82609
82596
|
switch (connection.status) {
|
|
82610
|
-
case
|
|
82597
|
+
case "connected" /* Connected */:
|
|
82611
82598
|
return {
|
|
82612
82599
|
messageType: "info",
|
|
82613
82600
|
content: `\u{1F7E2} Connected to ${ideClient.getDetectedIdeDisplayName()}`
|
|
82614
82601
|
};
|
|
82615
|
-
case
|
|
82602
|
+
case "connecting" /* Connecting */:
|
|
82616
82603
|
return {
|
|
82617
82604
|
messageType: "info",
|
|
82618
82605
|
content: `\u{1F7E1} Connecting...`
|
|
@@ -82653,7 +82640,7 @@ ${infoMessage}`;
|
|
|
82653
82640
|
async function getIdeStatusMessageWithFiles(ideClient) {
|
|
82654
82641
|
const connection = ideClient.getConnectionStatus();
|
|
82655
82642
|
switch (connection.status) {
|
|
82656
|
-
case
|
|
82643
|
+
case "connected" /* Connected */: {
|
|
82657
82644
|
let content = `\u{1F7E2} Connected to ${ideClient.getDetectedIdeDisplayName()}`;
|
|
82658
82645
|
const context = ideContextStore.get();
|
|
82659
82646
|
const openFiles = context?.workspaceState?.openFiles;
|
|
@@ -82665,7 +82652,7 @@ async function getIdeStatusMessageWithFiles(ideClient) {
|
|
|
82665
82652
|
content
|
|
82666
82653
|
};
|
|
82667
82654
|
}
|
|
82668
|
-
case
|
|
82655
|
+
case "connecting" /* Connecting */:
|
|
82669
82656
|
return {
|
|
82670
82657
|
messageType: "info",
|
|
82671
82658
|
content: `\u{1F7E1} Connecting...`
|
|
@@ -82687,7 +82674,7 @@ async function setIdeModeAndSyncConnection(config, value, options = {}) {
|
|
|
82687
82674
|
const ideClient = await IdeClient.getInstance();
|
|
82688
82675
|
if (value) {
|
|
82689
82676
|
await ideClient.connect(options);
|
|
82690
|
-
logIdeConnection(config, new IdeConnectionEvent(
|
|
82677
|
+
logIdeConnection(config, new IdeConnectionEvent("session" /* SESSION */));
|
|
82691
82678
|
} else {
|
|
82692
82679
|
await ideClient.disconnect();
|
|
82693
82680
|
}
|
|
@@ -82775,7 +82762,7 @@ var ideCommand = async () => {
|
|
|
82775
82762
|
logToConsole: false
|
|
82776
82763
|
}
|
|
82777
82764
|
);
|
|
82778
|
-
if (ideClient.getConnectionStatus().status ===
|
|
82765
|
+
if (ideClient.getConnectionStatus().status === "connected" /* Connected */) {
|
|
82779
82766
|
break;
|
|
82780
82767
|
}
|
|
82781
82768
|
await new Promise((resolve9) => setTimeout(resolve9, 500));
|
|
@@ -82852,7 +82839,7 @@ var ideCommand = async () => {
|
|
|
82852
82839
|
}
|
|
82853
82840
|
};
|
|
82854
82841
|
const { status } = ideClient.getConnectionStatus();
|
|
82855
|
-
const isConnected = status ===
|
|
82842
|
+
const isConnected = status === "connected" /* Connected */;
|
|
82856
82843
|
if (isConnected) {
|
|
82857
82844
|
ideSlashCommand.subCommands = [statusCommand2, disableCommand5];
|
|
82858
82845
|
} else {
|
|
@@ -82952,13 +82939,13 @@ Use /mcp auth <server-name> to authenticate.`
|
|
|
82952
82939
|
const displayListener = (message) => {
|
|
82953
82940
|
context.ui.addItem({ type: "info", text: message });
|
|
82954
82941
|
};
|
|
82955
|
-
coreEvents.on(
|
|
82942
|
+
coreEvents.on("oauth-display-message" /* OauthDisplayMessage */, displayListener);
|
|
82956
82943
|
try {
|
|
82957
82944
|
context.ui.addItem({
|
|
82958
82945
|
type: "info",
|
|
82959
82946
|
text: `Starting OAuth authentication for MCP server '${serverName}'...`
|
|
82960
82947
|
});
|
|
82961
|
-
const { MCPOAuthProvider } = await import("./
|
|
82948
|
+
const { MCPOAuthProvider } = await import("./core-CFPIDJ4Z.js");
|
|
82962
82949
|
let oauthConfig = server.oauth;
|
|
82963
82950
|
if (!oauthConfig) {
|
|
82964
82951
|
oauthConfig = { enabled: false };
|
|
@@ -82995,7 +82982,7 @@ Use /mcp auth <server-name> to authenticate.`
|
|
|
82995
82982
|
content: `Failed to authenticate with MCP server '${serverName}': ${getErrorMessage(error)}`
|
|
82996
82983
|
};
|
|
82997
82984
|
} finally {
|
|
82998
|
-
coreEvents.removeListener(
|
|
82985
|
+
coreEvents.removeListener("oauth-display-message" /* OauthDisplayMessage */, displayListener);
|
|
82999
82986
|
}
|
|
83000
82987
|
},
|
|
83001
82988
|
completion: async (context, partialArg) => {
|
|
@@ -83041,10 +83028,10 @@ var listAction2 = async (context, showDescriptions = false, showSchema = false,
|
|
|
83041
83028
|
}
|
|
83042
83029
|
const serverNames = Object.keys(mcpServers);
|
|
83043
83030
|
const connectingServers = serverNames.filter(
|
|
83044
|
-
(name) => getMCPServerStatus(name) ===
|
|
83031
|
+
(name) => getMCPServerStatus(name) === "connecting" /* CONNECTING */
|
|
83045
83032
|
);
|
|
83046
83033
|
const discoveryState = getMCPDiscoveryState();
|
|
83047
|
-
const discoveryInProgress = discoveryState ===
|
|
83034
|
+
const discoveryInProgress = discoveryState === "in_progress" /* IN_PROGRESS */ || connectingServers.length > 0;
|
|
83048
83035
|
const allTools = toolRegistry.getAllTools();
|
|
83049
83036
|
const mcpTools = allTools.filter((tool) => tool instanceof DiscoveredMCPTool);
|
|
83050
83037
|
const promptRegistry = config.getPromptRegistry();
|
|
@@ -98803,7 +98790,7 @@ Return a JSON object with:
|
|
|
98803
98790
|
},
|
|
98804
98791
|
abortSignal: new AbortController().signal,
|
|
98805
98792
|
promptId: "triage-duplicates",
|
|
98806
|
-
role:
|
|
98793
|
+
role: "utility_tool" /* UTILITY_TOOL */
|
|
98807
98794
|
});
|
|
98808
98795
|
const rec = response;
|
|
98809
98796
|
let canonical;
|
|
@@ -99637,7 +99624,7 @@ Return a JSON object with:
|
|
|
99637
99624
|
},
|
|
99638
99625
|
abortSignal: abortControllerRef.current.signal,
|
|
99639
99626
|
promptId: "triage-issues",
|
|
99640
|
-
role:
|
|
99627
|
+
role: "utility_tool" /* UTILITY_TOOL */
|
|
99641
99628
|
});
|
|
99642
99629
|
return response;
|
|
99643
99630
|
},
|
|
@@ -100211,8 +100198,8 @@ var planCommand = {
|
|
|
100211
100198
|
return;
|
|
100212
100199
|
}
|
|
100213
100200
|
const previousApprovalMode = config.getApprovalMode();
|
|
100214
|
-
config.setApprovalMode(
|
|
100215
|
-
if (previousApprovalMode !==
|
|
100201
|
+
config.setApprovalMode("plan" /* PLAN */);
|
|
100202
|
+
if (previousApprovalMode !== "plan" /* PLAN */) {
|
|
100216
100203
|
coreEvents.emitFeedback("info", "Switched to Plan Mode.");
|
|
100217
100204
|
}
|
|
100218
100205
|
if (context.invocation?.args) {
|
|
@@ -100271,10 +100258,10 @@ var categorizeRulesByMode = (rules) => {
|
|
|
100271
100258
|
rules.forEach((rule) => {
|
|
100272
100259
|
const modes = rule.modes?.length ? rule.modes : ALL_MODES;
|
|
100273
100260
|
const modeSet = new Set(modes);
|
|
100274
|
-
if (modeSet.has(
|
|
100275
|
-
if (modeSet.has(
|
|
100276
|
-
if (modeSet.has(
|
|
100277
|
-
if (modeSet.has(
|
|
100261
|
+
if (modeSet.has("default" /* DEFAULT */)) result.normal.push(rule);
|
|
100262
|
+
if (modeSet.has("autoEdit" /* AUTO_EDIT */)) result.autoEdit.push(rule);
|
|
100263
|
+
if (modeSet.has("yolo" /* YOLO */)) result.yolo.push(rule);
|
|
100264
|
+
if (modeSet.has("plan" /* PLAN */)) result.plan.push(rule);
|
|
100278
100265
|
});
|
|
100279
100266
|
return result;
|
|
100280
100267
|
};
|
|
@@ -101655,7 +101642,7 @@ var upgradeCommand = {
|
|
|
101655
101642
|
action: async (context) => {
|
|
101656
101643
|
const config = context.services.agentContext?.config;
|
|
101657
101644
|
const authType = config?.getContentGeneratorConfig()?.authType;
|
|
101658
|
-
if (authType !==
|
|
101645
|
+
if (authType !== "oauth-personal" /* LOGIN_WITH_GOOGLE */) {
|
|
101659
101646
|
return {
|
|
101660
101647
|
type: "message",
|
|
101661
101648
|
messageType: "error",
|
|
@@ -101884,7 +101871,7 @@ var BuiltinCommandLoader = class {
|
|
|
101884
101871
|
setupGithubCommand,
|
|
101885
101872
|
terminalSetupCommand,
|
|
101886
101873
|
...this.config?.isVoiceModeEnabled() ? [voiceCommand] : [],
|
|
101887
|
-
...this.config?.getContentGeneratorConfig()?.authType ===
|
|
101874
|
+
...this.config?.getContentGeneratorConfig()?.authType === "oauth-personal" /* LOGIN_WITH_GOOGLE */ ? [upgradeCommand] : []
|
|
101888
101875
|
];
|
|
101889
101876
|
handle?.end();
|
|
101890
101877
|
return allDefinitions.filter((cmd) => cmd !== null);
|