@google/gemini-cli 0.56.0 → 0.57.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/builtin/antigravity-support/SKILL.md +55 -18
- package/bundle/builtin/skill-creator/SKILL.md +221 -84
- package/bundle/{chunk-3KYPKZPU.js → chunk-3BVBON3V.js} +1 -1
- package/bundle/{chunk-DGFXNTHD.js → chunk-3NPMAHLX.js} +1 -1
- package/bundle/{chunk-IG5K7R25.js → chunk-4ALCU2HQ.js} +1 -1
- package/bundle/{chunk-ISEPPPFO.js → chunk-4SNEOO5E.js} +2 -2
- package/bundle/{chunk-CNSLGANE.js → chunk-65C235NM.js} +10 -9
- package/bundle/{chunk-R34LMPUE.js → chunk-AKCYXG7C.js} +10 -9
- package/bundle/{chunk-C5FHWCAU.js → chunk-ALVDOQNA.js} +1 -1
- package/bundle/{chunk-3YGHKCB7.js → chunk-EAK33LFP.js} +1 -1
- package/bundle/{chunk-7IXYIWSX.js → chunk-FHDRG5U4.js} +70 -56
- package/bundle/{chunk-LZUWGCRJ.js → chunk-G65GW52B.js} +1708 -1352
- package/bundle/{chunk-KUIZDCN6.js → chunk-GK7NUJ35.js} +8 -5
- package/bundle/{chunk-VBIDFL63.js → chunk-GMQ6QNZB.js} +1 -1
- package/bundle/chunk-LNXGFWGZ.js +17332 -0
- package/bundle/{chunk-TV27OEQP.js → chunk-MBWROXYM.js} +2 -2
- package/bundle/{chunk-M6D6BI7B.js → chunk-NMMXRZ53.js} +2 -2
- package/bundle/{chunk-NUVMJEWM.js → chunk-NPOI4K6X.js} +9291 -15583
- package/bundle/{chunk-435NYDJB.js → chunk-NQ4RH42O.js} +9 -8
- package/bundle/{chunk-MYCBWRZE.js → chunk-O7SBKM7M.js} +1770 -1378
- package/bundle/{chunk-HAZMOWRC.js → chunk-Q73BPF7A.js} +1 -1
- package/bundle/{chunk-Y3KSGWY2.js → chunk-QJP6CMLN.js} +3 -3
- package/bundle/{chunk-BIPFNROE.js → chunk-RLDNUS35.js} +1 -1
- package/bundle/{chunk-ZXYNNAXR.js → chunk-S5UX3QS5.js} +3 -3
- package/bundle/{chunk-Y734TK7O.js → chunk-SCBVGZXH.js} +1 -1
- package/bundle/chunk-SWQAIZEQ.js +102506 -0
- package/bundle/{chunk-MKKOABMJ.js → chunk-UMQE7UC6.js} +3 -3
- package/bundle/{chunk-JFVPVDW6.js → chunk-VBK54QCZ.js} +1 -1
- package/bundle/chunk-VGGWKRAC.js +154 -0
- package/bundle/chunk-W23OOD2C.js +118 -0
- package/bundle/chunk-WDFSF5L4.js +397601 -0
- package/bundle/chunk-XESAM7IL.js +512 -0
- package/bundle/chunk-Y3APL4PE.js +1571 -0
- package/bundle/chunk-ZMPGHLGO.js +398 -0
- package/bundle/{cleanup-IZHI7N6V.js → cleanup-2W5DPMY3.js} +2 -2
- package/bundle/{cleanup-JZLQPF2L.js → cleanup-OTHE7RNU.js} +2 -2
- package/bundle/{cleanup-LJAAR5DT.js → cleanup-SM67K64R.js} +2 -2
- package/bundle/cleanup-XAUT5CMD.js +32 -0
- package/bundle/{core-TJ2XBV6Y.js → core-US34OW5M.js} +9 -1
- package/bundle/{devtoolsService-KFURCXJN.js → devtoolsService-5J53UK6Z.js} +2 -2
- package/bundle/{devtoolsService-BFW3BN3D.js → devtoolsService-GU2GQSOF.js} +2 -2
- package/bundle/{devtoolsService-NWA77XKC.js → devtoolsService-JBFUXTCT.js} +4 -3
- package/bundle/devtoolsService-V46GUHRF.js +4359 -0
- package/bundle/{dist-7KO3HJ4C.js → dist-5TYMQVIZ.js} +9 -1
- package/bundle/{core-BQJQAXVF.js → dist-OWKHVWTR.js} +9 -1
- package/bundle/dist-V5VJYW6J.js +2180 -0
- package/bundle/docs/changelogs/latest.md +224 -3
- package/bundle/docs/get-started/authentication.mdx +1 -1
- package/bundle/docs/reference/commands.md +7 -5
- package/bundle/{gemini-54R2PJOR.js → gemini-3M22N2C3.js} +19 -16
- package/bundle/{gemini-KK7AERSF.js → gemini-LSMTDETS.js} +19 -16
- package/bundle/{gemini-2RHAL2LS.js → gemini-OZOYJF22.js} +219 -200
- package/bundle/gemini-W2B6CLJC.js +17091 -0
- package/bundle/gemini.js +7 -7
- package/bundle/{interactiveCli-QBZRIN4M.js → interactiveCli-D6H37PJQ.js} +60 -30
- package/bundle/{interactiveCli-BAGEJ4VO.js → interactiveCli-L3ZXOVEV.js} +367 -318
- package/bundle/{interactiveCli-F5YXG24U.js → interactiveCli-LQJM6LRE.js} +60 -30
- package/bundle/interactiveCli-RGOYDSMH.js +34984 -0
- package/bundle/{liteRtServerManager-CYBHL4LH.js → liteRtServerManager-3BY6TBHG.js} +4 -4
- package/bundle/{liteRtServerManager-DMTHAOJH.js → liteRtServerManager-C5WZRQUF.js} +4 -4
- package/bundle/{liteRtServerManager-7LTDMYKI.js → liteRtServerManager-IGKUGGP4.js} +4 -4
- package/bundle/liteRtServerManager-IJ4I2PZA.js +65 -0
- package/bundle/{oauth2-provider-NOSS4GIR.js → oauth2-provider-KSRLPOK3.js} +1 -1
- package/bundle/{oauth2-provider-S2564L6K.js → oauth2-provider-RWKTMYJF.js} +1 -1
- package/bundle/{oauth2-provider-HNMIIJDH.js → oauth2-provider-VHNLCU4Y.js} +38 -72
- package/bundle/oauth2-provider-ZT4OFVMK.js +235 -0
- package/bundle/{start-L2WLGVI3.js → start-EXAQFM4Y.js} +6 -6
- package/bundle/{start-UGLCJG5Y.js → start-IPZF32E3.js} +6 -6
- package/bundle/{start-5F3JQ7EX.js → start-SVNTSNHV.js} +6 -6
- package/bundle/start-ZXU5BFZY.js +18 -0
- package/package.json +1 -1
|
@@ -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-Y3APL4PE.js";
|
|
6
6
|
import {
|
|
7
7
|
AppEvent,
|
|
8
8
|
appEvents
|
|
@@ -59,20 +59,22 @@ import {
|
|
|
59
59
|
stripUnsafeCharacters,
|
|
60
60
|
toCodePoints,
|
|
61
61
|
validateCustomTheme
|
|
62
|
-
} from "./chunk-
|
|
62
|
+
} from "./chunk-GK7NUJ35.js";
|
|
63
63
|
import {
|
|
64
64
|
isDevelopment
|
|
65
|
-
} from "./chunk-
|
|
65
|
+
} from "./chunk-MBWROXYM.js";
|
|
66
66
|
import {
|
|
67
67
|
emptyIcon,
|
|
68
68
|
require_react
|
|
69
|
-
} from "./chunk-
|
|
69
|
+
} from "./chunk-XESAM7IL.js";
|
|
70
70
|
import {
|
|
71
71
|
ALL_EDITORS,
|
|
72
72
|
ApprovalMode,
|
|
73
73
|
AsyncFzf,
|
|
74
|
+
AuthType,
|
|
74
75
|
Config,
|
|
75
76
|
CoreEvent,
|
|
77
|
+
CoreToolCallStatus,
|
|
76
78
|
DiscoveredMCPTool,
|
|
77
79
|
ExtensionDisableEvent,
|
|
78
80
|
ExtensionEnableEvent,
|
|
@@ -83,20 +85,31 @@ import {
|
|
|
83
85
|
ExtensionUpdateEvent,
|
|
84
86
|
GEMINI_CLI_COMPANION_EXTENSION_NAME,
|
|
85
87
|
GEMINI_DIR,
|
|
88
|
+
HookType,
|
|
89
|
+
IDEConnectionStatus,
|
|
86
90
|
INITIAL_HISTORY_LENGTH,
|
|
87
91
|
IdeClient,
|
|
88
92
|
IdeConnectionEvent,
|
|
93
|
+
IdeConnectionType,
|
|
94
|
+
IntegrityDataStatus,
|
|
89
95
|
KeychainTokenStorage,
|
|
96
|
+
LlmRole,
|
|
97
|
+
MCPDiscoveryState,
|
|
90
98
|
MCPOAuthTokenStorage,
|
|
99
|
+
MCPServerStatus,
|
|
91
100
|
ModelSlashCommandEvent,
|
|
101
|
+
PolicyDecision,
|
|
92
102
|
ProjectIdRequiredError,
|
|
93
103
|
REFERENCE_CONTENT_END,
|
|
94
104
|
REFERENCE_CONTENT_START,
|
|
95
105
|
ReadManyFilesTool,
|
|
96
106
|
RewindEvent,
|
|
107
|
+
SessionEndReason,
|
|
108
|
+
SessionStartSource,
|
|
97
109
|
ShellExecutionService,
|
|
98
110
|
StartSessionEvent,
|
|
99
111
|
Storage,
|
|
112
|
+
TrustLevel,
|
|
100
113
|
UPGRADE_URL_PAGE,
|
|
101
114
|
UserAccountManager,
|
|
102
115
|
ValidationRequiredError,
|
|
@@ -150,6 +163,7 @@ import {
|
|
|
150
163
|
getMCPServerPrompts,
|
|
151
164
|
getMCPServerStatus,
|
|
152
165
|
getRealPath,
|
|
166
|
+
getSafeGitEnv,
|
|
153
167
|
getShellConfiguration,
|
|
154
168
|
getToolCallDataSchema,
|
|
155
169
|
getTruncatedCheckpointNames,
|
|
@@ -230,7 +244,7 @@ import {
|
|
|
230
244
|
tokenLimit,
|
|
231
245
|
uiTelemetryService,
|
|
232
246
|
unescapePath
|
|
233
|
-
} from "./chunk-
|
|
247
|
+
} from "./chunk-G65GW52B.js";
|
|
234
248
|
import {
|
|
235
249
|
require_src
|
|
236
250
|
} from "./chunk-TUDYL3X4.js";
|
|
@@ -60076,7 +60090,7 @@ var import_react34 = __toESM(require_react(), 1);
|
|
|
60076
60090
|
function useIdeTrustListener() {
|
|
60077
60091
|
const settings = useSettings();
|
|
60078
60092
|
const [connectionStatus, setConnectionStatus] = (0, import_react34.useState)(
|
|
60079
|
-
|
|
60093
|
+
IDEConnectionStatus.Disconnected
|
|
60080
60094
|
);
|
|
60081
60095
|
const previousTrust = (0, import_react34.useRef)(void 0);
|
|
60082
60096
|
const [restartReason, setRestartReason] = (0, import_react34.useState)("NONE");
|
|
@@ -60106,7 +60120,7 @@ function useIdeTrustListener() {
|
|
|
60106
60120
|
};
|
|
60107
60121
|
}, []);
|
|
60108
60122
|
const getSnapshot = () => {
|
|
60109
|
-
if (connectionStatus !==
|
|
60123
|
+
if (connectionStatus !== IDEConnectionStatus.Connected) {
|
|
60110
60124
|
return void 0;
|
|
60111
60125
|
}
|
|
60112
60126
|
return ideContextStore.get()?.workspaceState?.isTrusted;
|
|
@@ -60811,7 +60825,7 @@ async function initializeApp(config, settings) {
|
|
|
60811
60825
|
await ideClient.connect();
|
|
60812
60826
|
logIdeConnection(
|
|
60813
60827
|
config,
|
|
60814
|
-
new IdeConnectionEvent(
|
|
60828
|
+
new IdeConnectionEvent(IdeConnectionType.START)
|
|
60815
60829
|
);
|
|
60816
60830
|
}).catch((e) => {
|
|
60817
60831
|
debugLogger.error("Failed to initialize IDE client:", e);
|
|
@@ -60829,17 +60843,17 @@ async function initializeApp(config, settings) {
|
|
|
60829
60843
|
// packages/cli/src/config/auth.ts
|
|
60830
60844
|
async function validateAuthMethod(authMethod) {
|
|
60831
60845
|
loadEnvironment(loadSettings().merged, process.cwd());
|
|
60832
|
-
if (authMethod ===
|
|
60846
|
+
if (authMethod === AuthType.LOGIN_WITH_GOOGLE || authMethod === AuthType.COMPUTE_ADC) {
|
|
60833
60847
|
return null;
|
|
60834
60848
|
}
|
|
60835
|
-
if (authMethod ===
|
|
60849
|
+
if (authMethod === AuthType.USE_GEMINI) {
|
|
60836
60850
|
const key = process.env["GEMINI_API_KEY"] || await loadApiKey();
|
|
60837
60851
|
if (!key) {
|
|
60838
60852
|
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)!";
|
|
60839
60853
|
}
|
|
60840
60854
|
return null;
|
|
60841
60855
|
}
|
|
60842
|
-
if (authMethod ===
|
|
60856
|
+
if (authMethod === AuthType.USE_VERTEX_AI) {
|
|
60843
60857
|
const hasVertexProjectLocationConfig = !!process.env["GOOGLE_CLOUD_PROJECT"] && !!process.env["GOOGLE_CLOUD_LOCATION"];
|
|
60844
60858
|
const hasGoogleApiKey = !!process.env["GOOGLE_API_KEY"];
|
|
60845
60859
|
if (!hasVertexProjectLocationConfig && !hasGoogleApiKey) {
|
|
@@ -64619,7 +64633,7 @@ async function fetchJson(url, redirectCount = 0) {
|
|
|
64619
64633
|
// packages/cli/src/config/extensions/github.ts
|
|
64620
64634
|
async function cloneFromGit(installMetadata, destination) {
|
|
64621
64635
|
try {
|
|
64622
|
-
const git = simpleGit(destination);
|
|
64636
|
+
const git = simpleGit(destination).env(getSafeGitEnv());
|
|
64623
64637
|
let sourceUrl = installMetadata.source;
|
|
64624
64638
|
const token = getGitHubToken();
|
|
64625
64639
|
if (token) {
|
|
@@ -64751,7 +64765,7 @@ async function checkForExtensionUpdate(extension, extensionManager) {
|
|
|
64751
64765
|
}
|
|
64752
64766
|
try {
|
|
64753
64767
|
if (installMetadata.type === "git") {
|
|
64754
|
-
const git = simpleGit(extension.path);
|
|
64768
|
+
const git = simpleGit(extension.path).env(getSafeGitEnv());
|
|
64755
64769
|
const remotes = await git.getRemotes(true);
|
|
64756
64770
|
if (remotes.length === 0) {
|
|
64757
64771
|
debugLogger.error("No git remotes found.");
|
|
@@ -65266,7 +65280,7 @@ var ExtensionManager = class extends ExtensionLoader {
|
|
|
65266
65280
|
const trustedFolders = loadTrustedFolders();
|
|
65267
65281
|
await trustedFolders.setValue(
|
|
65268
65282
|
this.workspaceDir,
|
|
65269
|
-
|
|
65283
|
+
TrustLevel.TRUST_FOLDER
|
|
65270
65284
|
);
|
|
65271
65285
|
} else {
|
|
65272
65286
|
throw new Error(
|
|
@@ -65452,7 +65466,7 @@ Would you like to attempt to install via "git clone" instead?`
|
|
|
65452
65466
|
newExtensionConfig.version,
|
|
65453
65467
|
previousExtensionConfig.version,
|
|
65454
65468
|
installMetadata.type,
|
|
65455
|
-
|
|
65469
|
+
CoreToolCallStatus.Success
|
|
65456
65470
|
)
|
|
65457
65471
|
);
|
|
65458
65472
|
if (newExtensionName !== previousName) {
|
|
@@ -65475,7 +65489,7 @@ Would you like to attempt to install via "git clone" instead?`
|
|
|
65475
65489
|
getExtensionId(newExtensionConfig, installMetadata),
|
|
65476
65490
|
newExtensionConfig.version,
|
|
65477
65491
|
installMetadata.type,
|
|
65478
|
-
|
|
65492
|
+
CoreToolCallStatus.Success
|
|
65479
65493
|
)
|
|
65480
65494
|
);
|
|
65481
65495
|
await this.enableExtension(
|
|
@@ -65508,7 +65522,7 @@ Would you like to attempt to install via "git clone" instead?`
|
|
|
65508
65522
|
newExtensionConfig?.version ?? "",
|
|
65509
65523
|
previousExtensionConfig.version,
|
|
65510
65524
|
installMetadata.type,
|
|
65511
|
-
|
|
65525
|
+
CoreToolCallStatus.Error
|
|
65512
65526
|
)
|
|
65513
65527
|
);
|
|
65514
65528
|
} else {
|
|
@@ -65520,7 +65534,7 @@ Would you like to attempt to install via "git clone" instead?`
|
|
|
65520
65534
|
extensionId ?? "",
|
|
65521
65535
|
newExtensionConfig?.version ?? "",
|
|
65522
65536
|
installMetadata.type,
|
|
65523
|
-
|
|
65537
|
+
CoreToolCallStatus.Error
|
|
65524
65538
|
)
|
|
65525
65539
|
);
|
|
65526
65540
|
}
|
|
@@ -65551,7 +65565,7 @@ Would you like to attempt to install via "git clone" instead?`
|
|
|
65551
65565
|
extension.name,
|
|
65552
65566
|
hashValue(extension.name),
|
|
65553
65567
|
extension.id,
|
|
65554
|
-
|
|
65568
|
+
CoreToolCallStatus.Success
|
|
65555
65569
|
)
|
|
65556
65570
|
);
|
|
65557
65571
|
}
|
|
@@ -65821,7 +65835,7 @@ Would you like to attempt to install via "git clone" instead?`
|
|
|
65821
65835
|
if (eventHooks) {
|
|
65822
65836
|
for (const definition of eventHooks) {
|
|
65823
65837
|
for (const hook of definition.hooks) {
|
|
65824
|
-
if (hook.type ===
|
|
65838
|
+
if (hook.type === HookType.Command) {
|
|
65825
65839
|
hook.env = { ...hook.env, ...hookEnv };
|
|
65826
65840
|
}
|
|
65827
65841
|
}
|
|
@@ -66852,7 +66866,7 @@ async function readMcpResources(resourceParts, config, signal) {
|
|
|
66852
66866
|
callId: `mcp-resource-${resource.serverName}-${resource.uri}`,
|
|
66853
66867
|
name: `resources/read (${resource.serverName})`,
|
|
66854
66868
|
description: resource.uri,
|
|
66855
|
-
status:
|
|
66869
|
+
status: CoreToolCallStatus.Success,
|
|
66856
66870
|
isClientInitiated: true,
|
|
66857
66871
|
resultDisplay: `Successfully read resource ${resource.uri}`,
|
|
66858
66872
|
confirmationDetails: void 0
|
|
@@ -66867,7 +66881,7 @@ async function readMcpResources(resourceParts, config, signal) {
|
|
|
66867
66881
|
callId: `mcp-resource-${resource.serverName}-${resource.uri}`,
|
|
66868
66882
|
name: `resources/read (${resource.serverName})`,
|
|
66869
66883
|
description: resource.uri,
|
|
66870
|
-
status:
|
|
66884
|
+
status: CoreToolCallStatus.Error,
|
|
66871
66885
|
isClientInitiated: true,
|
|
66872
66886
|
resultDisplay: `Error reading resource ${resource.uri}: ${getErrorMessage(error)}`,
|
|
66873
66887
|
confirmationDetails: void 0
|
|
@@ -66892,7 +66906,7 @@ Content from @${result.uri}:
|
|
|
66892
66906
|
}
|
|
66893
66907
|
if (hasError) {
|
|
66894
66908
|
const firstError = displays.find(
|
|
66895
|
-
(d) => d.status ===
|
|
66909
|
+
(d) => d.status === CoreToolCallStatus.Error
|
|
66896
66910
|
);
|
|
66897
66911
|
return {
|
|
66898
66912
|
parts: [],
|
|
@@ -66933,7 +66947,7 @@ async function readLocalFiles(resolvedFiles, config, signal, userMessageTimestam
|
|
|
66933
66947
|
callId: `client-read-${userMessageTimestamp}`,
|
|
66934
66948
|
name: readManyFilesTool.displayName,
|
|
66935
66949
|
description: invocation.getDescription(),
|
|
66936
|
-
status:
|
|
66950
|
+
status: CoreToolCallStatus.Success,
|
|
66937
66951
|
isClientInitiated: true,
|
|
66938
66952
|
resultDisplay: result.returnDisplay || `Successfully read: ${fileLabelsForDisplay.join(", ")}`,
|
|
66939
66953
|
confirmationDetails: void 0
|
|
@@ -66980,7 +66994,7 @@ Content from @${displayPath}:
|
|
|
66980
66994
|
callId: `client-read-${userMessageTimestamp}`,
|
|
66981
66995
|
name: readManyFilesTool.displayName,
|
|
66982
66996
|
description: invocation?.getDescription() ?? "Error attempting to execute tool to read files",
|
|
66983
|
-
status:
|
|
66997
|
+
status: CoreToolCallStatus.Error,
|
|
66984
66998
|
isClientInitiated: true,
|
|
66985
66999
|
resultDisplay: `Error reading files (${fileLabelsForDisplay.join(", ")}): ${getErrorMessage(error)}`,
|
|
66986
67000
|
confirmationDetails: void 0
|
|
@@ -70247,7 +70261,7 @@ async function openFileInEditor(filePath, stdin, setRawMode, preferredEditorType
|
|
|
70247
70261
|
if (wasRaw) {
|
|
70248
70262
|
setRawMode?.(true);
|
|
70249
70263
|
}
|
|
70250
|
-
coreEvents.emit(
|
|
70264
|
+
coreEvents.emit(CoreEvent.ExternalEditorClosed);
|
|
70251
70265
|
}
|
|
70252
70266
|
}
|
|
70253
70267
|
|
|
@@ -72942,7 +72956,7 @@ async function updateExtension(extension, extensionManager, currentState, dispat
|
|
|
72942
72956
|
extension.name,
|
|
72943
72957
|
installMetadata
|
|
72944
72958
|
);
|
|
72945
|
-
if (status ===
|
|
72959
|
+
if (status === IntegrityDataStatus.INVALID) {
|
|
72946
72960
|
throw new Error("Extension integrity cannot be verified");
|
|
72947
72961
|
}
|
|
72948
72962
|
} catch (e) {
|
|
@@ -74363,11 +74377,11 @@ var ShellProcessor = class {
|
|
|
74363
74377
|
},
|
|
74364
74378
|
void 0
|
|
74365
74379
|
);
|
|
74366
|
-
if (decision ===
|
|
74380
|
+
if (decision === PolicyDecision.DENY) {
|
|
74367
74381
|
throw new Error(
|
|
74368
74382
|
`${this.commandName} cannot be run. Blocked command: "${command}". Reason: Blocked by policy.`
|
|
74369
74383
|
);
|
|
74370
|
-
} else if (decision ===
|
|
74384
|
+
} else if (decision === PolicyDecision.ASK_USER) {
|
|
74371
74385
|
commandsToConfirm.add(command);
|
|
74372
74386
|
}
|
|
74373
74387
|
}
|
|
@@ -75485,7 +75499,7 @@ var MultiFolderTrustDialog = ({
|
|
|
75485
75499
|
if (choice === 1 /* YES_AND_REMEMBER */) {
|
|
75486
75500
|
await trustedFolders.setValue(
|
|
75487
75501
|
expandedPath,
|
|
75488
|
-
|
|
75502
|
+
TrustLevel.TRUST_FOLDER
|
|
75489
75503
|
);
|
|
75490
75504
|
}
|
|
75491
75505
|
workspaceContext.addDirectory(expandedPath);
|
|
@@ -77163,7 +77177,7 @@ var authCommand = {
|
|
|
77163
77177
|
import process29 from "node:process";
|
|
77164
77178
|
|
|
77165
77179
|
// packages/cli/src/generated/git-commit.ts
|
|
77166
|
-
var GIT_COMMIT_INFO = "
|
|
77180
|
+
var GIT_COMMIT_INFO = "3910b2093";
|
|
77167
77181
|
|
|
77168
77182
|
// packages/cli/src/ui/utils/historyExportUtils.ts
|
|
77169
77183
|
import * as fsPromises from "node:fs/promises";
|
|
@@ -77809,7 +77823,7 @@ var clearCommand = {
|
|
|
77809
77823
|
const config = context.services.agentContext?.config;
|
|
77810
77824
|
const hookSystem = config?.getHookSystem();
|
|
77811
77825
|
if (hookSystem) {
|
|
77812
|
-
await hookSystem.fireSessionEndEvent(
|
|
77826
|
+
await hookSystem.fireSessionEndEvent(SessionEndReason.Clear);
|
|
77813
77827
|
}
|
|
77814
77828
|
config?.injectionService.clear();
|
|
77815
77829
|
let newSessionId;
|
|
@@ -77826,7 +77840,7 @@ var clearCommand = {
|
|
|
77826
77840
|
}
|
|
77827
77841
|
let result;
|
|
77828
77842
|
if (hookSystem) {
|
|
77829
|
-
result = await hookSystem.fireSessionStartEvent(
|
|
77843
|
+
result = await hookSystem.fireSessionStartEvent(SessionStartSource.Clear);
|
|
77830
77844
|
}
|
|
77831
77845
|
await new Promise((resolve9) => setImmediate(resolve9));
|
|
77832
77846
|
if (config) {
|
|
@@ -80825,7 +80839,7 @@ var Footer = () => {
|
|
|
80825
80839
|
case "auth": {
|
|
80826
80840
|
if (!settings.merged.ui.showUserIdentity) break;
|
|
80827
80841
|
if (!authType) break;
|
|
80828
|
-
const displayStr = authType ===
|
|
80842
|
+
const displayStr = authType === AuthType.LOGIN_WITH_GOOGLE ? email ?? "google" : authType;
|
|
80829
80843
|
addCol(
|
|
80830
80844
|
id,
|
|
80831
80845
|
header,
|
|
@@ -82593,12 +82607,12 @@ import path29 from "node:path";
|
|
|
82593
82607
|
function getIdeStatusMessage(ideClient) {
|
|
82594
82608
|
const connection = ideClient.getConnectionStatus();
|
|
82595
82609
|
switch (connection.status) {
|
|
82596
|
-
case
|
|
82610
|
+
case IDEConnectionStatus.Connected:
|
|
82597
82611
|
return {
|
|
82598
82612
|
messageType: "info",
|
|
82599
82613
|
content: `\u{1F7E2} Connected to ${ideClient.getDetectedIdeDisplayName()}`
|
|
82600
82614
|
};
|
|
82601
|
-
case
|
|
82615
|
+
case IDEConnectionStatus.Connecting:
|
|
82602
82616
|
return {
|
|
82603
82617
|
messageType: "info",
|
|
82604
82618
|
content: `\u{1F7E1} Connecting...`
|
|
@@ -82639,7 +82653,7 @@ ${infoMessage}`;
|
|
|
82639
82653
|
async function getIdeStatusMessageWithFiles(ideClient) {
|
|
82640
82654
|
const connection = ideClient.getConnectionStatus();
|
|
82641
82655
|
switch (connection.status) {
|
|
82642
|
-
case
|
|
82656
|
+
case IDEConnectionStatus.Connected: {
|
|
82643
82657
|
let content = `\u{1F7E2} Connected to ${ideClient.getDetectedIdeDisplayName()}`;
|
|
82644
82658
|
const context = ideContextStore.get();
|
|
82645
82659
|
const openFiles = context?.workspaceState?.openFiles;
|
|
@@ -82651,7 +82665,7 @@ async function getIdeStatusMessageWithFiles(ideClient) {
|
|
|
82651
82665
|
content
|
|
82652
82666
|
};
|
|
82653
82667
|
}
|
|
82654
|
-
case
|
|
82668
|
+
case IDEConnectionStatus.Connecting:
|
|
82655
82669
|
return {
|
|
82656
82670
|
messageType: "info",
|
|
82657
82671
|
content: `\u{1F7E1} Connecting...`
|
|
@@ -82673,7 +82687,7 @@ async function setIdeModeAndSyncConnection(config, value, options = {}) {
|
|
|
82673
82687
|
const ideClient = await IdeClient.getInstance();
|
|
82674
82688
|
if (value) {
|
|
82675
82689
|
await ideClient.connect(options);
|
|
82676
|
-
logIdeConnection(config, new IdeConnectionEvent(
|
|
82690
|
+
logIdeConnection(config, new IdeConnectionEvent(IdeConnectionType.SESSION));
|
|
82677
82691
|
} else {
|
|
82678
82692
|
await ideClient.disconnect();
|
|
82679
82693
|
}
|
|
@@ -82761,7 +82775,7 @@ var ideCommand = async () => {
|
|
|
82761
82775
|
logToConsole: false
|
|
82762
82776
|
}
|
|
82763
82777
|
);
|
|
82764
|
-
if (ideClient.getConnectionStatus().status ===
|
|
82778
|
+
if (ideClient.getConnectionStatus().status === IDEConnectionStatus.Connected) {
|
|
82765
82779
|
break;
|
|
82766
82780
|
}
|
|
82767
82781
|
await new Promise((resolve9) => setTimeout(resolve9, 500));
|
|
@@ -82838,7 +82852,7 @@ var ideCommand = async () => {
|
|
|
82838
82852
|
}
|
|
82839
82853
|
};
|
|
82840
82854
|
const { status } = ideClient.getConnectionStatus();
|
|
82841
|
-
const isConnected = status ===
|
|
82855
|
+
const isConnected = status === IDEConnectionStatus.Connected;
|
|
82842
82856
|
if (isConnected) {
|
|
82843
82857
|
ideSlashCommand.subCommands = [statusCommand2, disableCommand5];
|
|
82844
82858
|
} else {
|
|
@@ -82938,13 +82952,13 @@ Use /mcp auth <server-name> to authenticate.`
|
|
|
82938
82952
|
const displayListener = (message) => {
|
|
82939
82953
|
context.ui.addItem({ type: "info", text: message });
|
|
82940
82954
|
};
|
|
82941
|
-
coreEvents.on(
|
|
82955
|
+
coreEvents.on(CoreEvent.OauthDisplayMessage, displayListener);
|
|
82942
82956
|
try {
|
|
82943
82957
|
context.ui.addItem({
|
|
82944
82958
|
type: "info",
|
|
82945
82959
|
text: `Starting OAuth authentication for MCP server '${serverName}'...`
|
|
82946
82960
|
});
|
|
82947
|
-
const { MCPOAuthProvider } = await import("./
|
|
82961
|
+
const { MCPOAuthProvider } = await import("./dist-V5VJYW6J.js");
|
|
82948
82962
|
let oauthConfig = server.oauth;
|
|
82949
82963
|
if (!oauthConfig) {
|
|
82950
82964
|
oauthConfig = { enabled: false };
|
|
@@ -82981,7 +82995,7 @@ Use /mcp auth <server-name> to authenticate.`
|
|
|
82981
82995
|
content: `Failed to authenticate with MCP server '${serverName}': ${getErrorMessage(error)}`
|
|
82982
82996
|
};
|
|
82983
82997
|
} finally {
|
|
82984
|
-
coreEvents.removeListener(
|
|
82998
|
+
coreEvents.removeListener(CoreEvent.OauthDisplayMessage, displayListener);
|
|
82985
82999
|
}
|
|
82986
83000
|
},
|
|
82987
83001
|
completion: async (context, partialArg) => {
|
|
@@ -83027,10 +83041,10 @@ var listAction2 = async (context, showDescriptions = false, showSchema = false,
|
|
|
83027
83041
|
}
|
|
83028
83042
|
const serverNames = Object.keys(mcpServers);
|
|
83029
83043
|
const connectingServers = serverNames.filter(
|
|
83030
|
-
(name) => getMCPServerStatus(name) ===
|
|
83044
|
+
(name) => getMCPServerStatus(name) === MCPServerStatus.CONNECTING
|
|
83031
83045
|
);
|
|
83032
83046
|
const discoveryState = getMCPDiscoveryState();
|
|
83033
|
-
const discoveryInProgress = discoveryState ===
|
|
83047
|
+
const discoveryInProgress = discoveryState === MCPDiscoveryState.IN_PROGRESS || connectingServers.length > 0;
|
|
83034
83048
|
const allTools = toolRegistry.getAllTools();
|
|
83035
83049
|
const mcpTools = allTools.filter((tool) => tool instanceof DiscoveredMCPTool);
|
|
83036
83050
|
const promptRegistry = config.getPromptRegistry();
|
|
@@ -98789,7 +98803,7 @@ Return a JSON object with:
|
|
|
98789
98803
|
},
|
|
98790
98804
|
abortSignal: new AbortController().signal,
|
|
98791
98805
|
promptId: "triage-duplicates",
|
|
98792
|
-
role:
|
|
98806
|
+
role: LlmRole.UTILITY_TOOL
|
|
98793
98807
|
});
|
|
98794
98808
|
const rec = response;
|
|
98795
98809
|
let canonical;
|
|
@@ -99623,7 +99637,7 @@ Return a JSON object with:
|
|
|
99623
99637
|
},
|
|
99624
99638
|
abortSignal: abortControllerRef.current.signal,
|
|
99625
99639
|
promptId: "triage-issues",
|
|
99626
|
-
role:
|
|
99640
|
+
role: LlmRole.UTILITY_TOOL
|
|
99627
99641
|
});
|
|
99628
99642
|
return response;
|
|
99629
99643
|
},
|
|
@@ -100197,8 +100211,8 @@ var planCommand = {
|
|
|
100197
100211
|
return;
|
|
100198
100212
|
}
|
|
100199
100213
|
const previousApprovalMode = config.getApprovalMode();
|
|
100200
|
-
config.setApprovalMode(
|
|
100201
|
-
if (previousApprovalMode !==
|
|
100214
|
+
config.setApprovalMode(ApprovalMode.PLAN);
|
|
100215
|
+
if (previousApprovalMode !== ApprovalMode.PLAN) {
|
|
100202
100216
|
coreEvents.emitFeedback("info", "Switched to Plan Mode.");
|
|
100203
100217
|
}
|
|
100204
100218
|
if (context.invocation?.args) {
|
|
@@ -100257,10 +100271,10 @@ var categorizeRulesByMode = (rules) => {
|
|
|
100257
100271
|
rules.forEach((rule) => {
|
|
100258
100272
|
const modes = rule.modes?.length ? rule.modes : ALL_MODES;
|
|
100259
100273
|
const modeSet = new Set(modes);
|
|
100260
|
-
if (modeSet.has(
|
|
100261
|
-
if (modeSet.has(
|
|
100262
|
-
if (modeSet.has(
|
|
100263
|
-
if (modeSet.has(
|
|
100274
|
+
if (modeSet.has(ApprovalMode.DEFAULT)) result.normal.push(rule);
|
|
100275
|
+
if (modeSet.has(ApprovalMode.AUTO_EDIT)) result.autoEdit.push(rule);
|
|
100276
|
+
if (modeSet.has(ApprovalMode.YOLO)) result.yolo.push(rule);
|
|
100277
|
+
if (modeSet.has(ApprovalMode.PLAN)) result.plan.push(rule);
|
|
100264
100278
|
});
|
|
100265
100279
|
return result;
|
|
100266
100280
|
};
|
|
@@ -101641,7 +101655,7 @@ var upgradeCommand = {
|
|
|
101641
101655
|
action: async (context) => {
|
|
101642
101656
|
const config = context.services.agentContext?.config;
|
|
101643
101657
|
const authType = config?.getContentGeneratorConfig()?.authType;
|
|
101644
|
-
if (authType !==
|
|
101658
|
+
if (authType !== AuthType.LOGIN_WITH_GOOGLE) {
|
|
101645
101659
|
return {
|
|
101646
101660
|
type: "message",
|
|
101647
101661
|
messageType: "error",
|
|
@@ -101870,7 +101884,7 @@ var BuiltinCommandLoader = class {
|
|
|
101870
101884
|
setupGithubCommand,
|
|
101871
101885
|
terminalSetupCommand,
|
|
101872
101886
|
...this.config?.isVoiceModeEnabled() ? [voiceCommand] : [],
|
|
101873
|
-
...this.config?.getContentGeneratorConfig()?.authType ===
|
|
101887
|
+
...this.config?.getContentGeneratorConfig()?.authType === AuthType.LOGIN_WITH_GOOGLE ? [upgradeCommand] : []
|
|
101874
101888
|
];
|
|
101875
101889
|
handle?.end();
|
|
101876
101890
|
return allDefinitions.filter((cmd) => cmd !== null);
|