@google/gemini-cli 0.35.0-preview.1 → 0.35.0-preview.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/bundle/{chunk-RIKAIXXN.js → chunk-5OVDZKPV.js} +6 -6
- package/bundle/{chunk-FKGF3664.js → chunk-6AQAEYFC.js} +5315 -9974
- package/bundle/{chunk-OK6A2T3J.js → chunk-C2LINL7G.js} +14 -12
- package/bundle/{chunk-OVO7PV7Z.js → chunk-ELVZ5MKI.js} +4 -4
- package/bundle/{chunk-DHZSW3D5.js → chunk-HYF34ISK.js} +4 -4
- package/bundle/{chunk-FIQWQZVG.js → chunk-QO53VEHI.js} +15 -12
- package/bundle/{chunk-7JZWJYL2.js → chunk-SCIFYSWM.js} +4 -4
- package/bundle/{chunk-J7ZVHCWL.js → chunk-TYZCRVGB.js} +70 -58
- package/bundle/chunk-WTYAEXC3.js +325893 -0
- package/bundle/chunk-WXXNCSKU.js +92840 -0
- package/bundle/{core-OSNLJAKB.js → core-ZWMLWHG7.js} +2 -2
- package/bundle/{devtoolsService-UPY6AYM7.js → devtoolsService-DH7MKZL2.js} +3 -3
- package/bundle/{devtoolsService-YJFR2ZTU.js → devtoolsService-EVTQ32UO.js} +3 -3
- package/bundle/{devtoolsService-CH2PM4E2.js → devtoolsService-FPFZEEVK.js} +5 -4
- package/bundle/devtoolsService-XMVPJFZ7.js +855 -0
- package/bundle/{core-YBLRHI5E.js → dist-6LCHGUBD.js} +2 -2
- package/bundle/{dist-PQCTLJ67.js → dist-AWPSKKKO.js} +2 -2
- package/bundle/dist-WOQEPX5R.js +1781 -0
- package/bundle/gemini.js +7 -7
- package/bundle/{interactiveCli-SIJB4G3Q.js → interactiveCli-7H3T4KJF.js} +4 -4
- package/bundle/{interactiveCli-AKIKCHLF.js → interactiveCli-E3DWTWRM.js} +239 -222
- package/bundle/{interactiveCli-3JVKXF42.js → interactiveCli-N4QW3NCZ.js} +4 -4
- package/bundle/interactiveCli-Z4Y6XB7M.js +48702 -0
- package/bundle/{memoryDiscovery-2RH76CMO.js → memoryDiscovery-7LUUOJNM.js} +1 -1
- package/bundle/{memoryDiscovery-P6SEGMWA.js → memoryDiscovery-RRX6QF4Y.js} +1 -1
- package/bundle/node_modules/@google/gemini-cli-devtools/package.json +1 -1
- package/bundle/{oauth2-provider-G4RXUPFH.js → oauth2-provider-CPMX7ITW.js} +2 -2
- package/bundle/{oauth2-provider-ZZIJ6OXB.js → oauth2-provider-IU6STKL7.js} +2 -2
- package/bundle/{oauth2-provider-N6KBVMX3.js → oauth2-provider-LTBDSRHY.js} +39 -73
- package/bundle/oauth2-provider-ZWWMTBET.js +238 -0
- package/package.json +1 -1
|
@@ -180,12 +180,14 @@ import {
|
|
|
180
180
|
widestLineFromStyledChars,
|
|
181
181
|
wordBreakStyledChars,
|
|
182
182
|
wrapStyledChars
|
|
183
|
-
} from "./chunk-
|
|
183
|
+
} from "./chunk-WXXNCSKU.js";
|
|
184
184
|
import {
|
|
185
185
|
ApiKeyUpdatedEvent,
|
|
186
186
|
AsyncFzf,
|
|
187
187
|
AuthType,
|
|
188
|
+
CompressionStatus,
|
|
188
189
|
ConversationFinishedEvent,
|
|
190
|
+
CoreToolCallStatus,
|
|
189
191
|
CreditPurchaseClickEvent,
|
|
190
192
|
EDITOR_DISPLAY_NAMES,
|
|
191
193
|
EmptyWalletMenuShownEvent,
|
|
@@ -194,10 +196,15 @@ import {
|
|
|
194
196
|
FileSearchFactory,
|
|
195
197
|
FolderTrustDiscoveryService,
|
|
196
198
|
G1_UTM_CAMPAIGNS,
|
|
199
|
+
GeminiCliOperation,
|
|
200
|
+
GeminiEventType,
|
|
197
201
|
GitService,
|
|
198
202
|
IdeClient,
|
|
199
203
|
LlmRole,
|
|
200
204
|
Logger,
|
|
205
|
+
MCPDiscoveryState,
|
|
206
|
+
MCPServerStatus,
|
|
207
|
+
MessageSenderType,
|
|
201
208
|
ModelNotFoundError,
|
|
202
209
|
ModelSlashCommandEvent,
|
|
203
210
|
OverageMenuShownEvent,
|
|
@@ -206,6 +213,8 @@ import {
|
|
|
206
213
|
ProjectIdRequiredError,
|
|
207
214
|
ROOT_SCHEDULER_ID,
|
|
208
215
|
Scheduler,
|
|
216
|
+
SessionEndReason,
|
|
217
|
+
SessionStartSource,
|
|
209
218
|
ShellExecutionService,
|
|
210
219
|
SlashCommandStatus,
|
|
211
220
|
TerminalQuotaError,
|
|
@@ -213,6 +222,7 @@ import {
|
|
|
213
222
|
UserPromptEvent,
|
|
214
223
|
UserTierId,
|
|
215
224
|
ValidationRequiredError,
|
|
225
|
+
WarningPriority,
|
|
216
226
|
addMCPStatusChangeListener,
|
|
217
227
|
allowEditorTypeInSandbox,
|
|
218
228
|
buildG1Url,
|
|
@@ -288,12 +298,14 @@ import {
|
|
|
288
298
|
validatePlanContent,
|
|
289
299
|
validatePlanPath,
|
|
290
300
|
writeToStdout
|
|
291
|
-
} from "./chunk-
|
|
301
|
+
} from "./chunk-6AQAEYFC.js";
|
|
292
302
|
import "./chunk-37ZTTFQF.js";
|
|
293
303
|
import {
|
|
294
304
|
ACTIVATE_SKILL_TOOL_NAME,
|
|
295
305
|
ASK_USER_TOOL_NAME,
|
|
306
|
+
ApprovalMode,
|
|
296
307
|
ChangeAuthRequestedError,
|
|
308
|
+
CoreEvent,
|
|
297
309
|
DEFAULT_GEMINI_FLASH_LITE_MODEL,
|
|
298
310
|
DEFAULT_GEMINI_FLASH_MODEL,
|
|
299
311
|
DEFAULT_GEMINI_MODEL,
|
|
@@ -301,14 +313,19 @@ import {
|
|
|
301
313
|
EDIT_TOOL_NAMES,
|
|
302
314
|
FinishReason,
|
|
303
315
|
GEMINI_DIR,
|
|
316
|
+
Kind,
|
|
317
|
+
MessageBusType,
|
|
304
318
|
PREVIEW_GEMINI_3_1_CUSTOM_TOOLS_MODEL,
|
|
305
319
|
PREVIEW_GEMINI_3_1_FLASH_LITE_MODEL,
|
|
306
320
|
PREVIEW_GEMINI_3_1_MODEL,
|
|
307
321
|
PREVIEW_GEMINI_FLASH_MODEL,
|
|
308
322
|
PREVIEW_GEMINI_MODEL,
|
|
309
323
|
PREVIEW_GEMINI_MODEL_AUTO,
|
|
324
|
+
QuestionType,
|
|
310
325
|
SHELL_TOOL_NAME,
|
|
311
326
|
Storage,
|
|
327
|
+
ToolConfirmationOutcome,
|
|
328
|
+
ToolErrorType,
|
|
312
329
|
UnauthorizedError,
|
|
313
330
|
VALID_GEMINI_MODELS,
|
|
314
331
|
coreEvents,
|
|
@@ -327,7 +344,7 @@ import {
|
|
|
327
344
|
refreshServerHierarchicalMemory,
|
|
328
345
|
shortenPath,
|
|
329
346
|
tildeifyPath
|
|
330
|
-
} from "./chunk-
|
|
347
|
+
} from "./chunk-C2LINL7G.js";
|
|
331
348
|
import "./chunk-664ZODQF.js";
|
|
332
349
|
import "./chunk-RJTRUG2J.js";
|
|
333
350
|
import "./chunk-IUUIT4SU.js";
|
|
@@ -22231,7 +22248,7 @@ function calculateShellMaxLines(options) {
|
|
|
22231
22248
|
if (isAlternateBuffer && isThisShellFocused2 && !constrainHeight) {
|
|
22232
22249
|
return maxLinesBasedOnHeight;
|
|
22233
22250
|
}
|
|
22234
|
-
const isExecuting = status ===
|
|
22251
|
+
const isExecuting = status === CoreToolCallStatus.Executing;
|
|
22235
22252
|
const shellMaxLinesLimit = isExecuting ? ACTIVE_SHELL_MAX_LINES - SHELL_CONTENT_OVERHEAD : COMPLETED_SHELL_MAX_LINES - SHELL_CONTENT_OVERHEAD;
|
|
22236
22253
|
return Math.min(maxLinesBasedOnHeight, shellMaxLinesLimit);
|
|
22237
22254
|
}
|
|
@@ -22264,10 +22281,10 @@ function isShellTool(name) {
|
|
|
22264
22281
|
return name === SHELL_COMMAND_NAME || name === SHELL_NAME || name === SHELL_TOOL_NAME;
|
|
22265
22282
|
}
|
|
22266
22283
|
function isThisShellFocusable(name, status, config) {
|
|
22267
|
-
return !!(isShellTool(name) && status ===
|
|
22284
|
+
return !!(isShellTool(name) && status === CoreToolCallStatus.Executing && config?.getEnableInteractiveShell());
|
|
22268
22285
|
}
|
|
22269
22286
|
function isThisShellFocused(name, status, ptyId, activeShellPtyId, embeddedShellFocused) {
|
|
22270
|
-
return !!(isShellTool(name) && status ===
|
|
22287
|
+
return !!(isShellTool(name) && status === CoreToolCallStatus.Executing && ptyId === activeShellPtyId && embeddedShellFocused);
|
|
22271
22288
|
}
|
|
22272
22289
|
function useFocusHint(isThisShellFocusable2, isThisShellFocused2, resultDisplay) {
|
|
22273
22290
|
const [userHasFocused, setUserHasFocused] = (0, import_react21.useState)(false);
|
|
@@ -22786,7 +22803,7 @@ var ToolMessage = ({
|
|
|
22786
22803
|
paddingX: 1,
|
|
22787
22804
|
flexDirection: "column",
|
|
22788
22805
|
children: [
|
|
22789
|
-
status ===
|
|
22806
|
+
status === CoreToolCallStatus.Executing && progress !== void 0 && /* @__PURE__ */ (0, import_jsx_runtime25.jsx)(
|
|
22790
22807
|
McpProgressIndicator,
|
|
22791
22808
|
{
|
|
22792
22809
|
progress,
|
|
@@ -22803,8 +22820,8 @@ var ToolMessage = ({
|
|
|
22803
22820
|
terminalWidth,
|
|
22804
22821
|
renderOutputAsMarkdown,
|
|
22805
22822
|
hasFocus: isThisShellFocused2,
|
|
22806
|
-
maxLines: kind ===
|
|
22807
|
-
overflowDirection: kind ===
|
|
22823
|
+
maxLines: kind === Kind.Agent && availableTerminalHeight !== void 0 ? SUBAGENT_MAX_LINES : void 0,
|
|
22824
|
+
overflowDirection: kind === Kind.Agent ? "bottom" : "top"
|
|
22808
22825
|
}
|
|
22809
22826
|
),
|
|
22810
22827
|
isThisShellFocused2 && config && /* @__PURE__ */ (0, import_jsx_runtime25.jsx)(Box_default, { paddingLeft: STATUS_INDICATOR_WIDTH, marginTop: 1, children: /* @__PURE__ */ (0, import_jsx_runtime25.jsx)(
|
|
@@ -23529,7 +23546,7 @@ var ShellToolMessage = ({
|
|
|
23529
23546
|
maxLinesLimit: maxLines
|
|
23530
23547
|
});
|
|
23531
23548
|
import_react29.default.useEffect(() => {
|
|
23532
|
-
const isExecuting = status ===
|
|
23549
|
+
const isExecuting = status === CoreToolCallStatus.Executing;
|
|
23533
23550
|
if (isExecuting && ptyId) {
|
|
23534
23551
|
try {
|
|
23535
23552
|
const childWidth = terminalWidth - 4;
|
|
@@ -23667,14 +23684,14 @@ function getToolGroupBorderAppearance(item, activeShellPtyId, embeddedShellFocus
|
|
|
23667
23684
|
if (isTrackedToolCall(t)) {
|
|
23668
23685
|
return t.status !== "success" && t.status !== "error" && t.status !== "cancelled";
|
|
23669
23686
|
} else {
|
|
23670
|
-
return t.status !==
|
|
23687
|
+
return t.status !== CoreToolCallStatus.Success && t.status !== CoreToolCallStatus.Error && t.status !== CoreToolCallStatus.Cancelled;
|
|
23671
23688
|
}
|
|
23672
23689
|
});
|
|
23673
23690
|
const isEmbeddedShellFocused = toolsToInspect.some((t) => {
|
|
23674
23691
|
if (isTrackedToolCall(t)) {
|
|
23675
23692
|
return isShellTool(t.request.name) && t.status === "executing" && t.pid === activeShellPtyId && !!embeddedShellFocused;
|
|
23676
23693
|
} else {
|
|
23677
|
-
return isShellTool(t.name) && t.status ===
|
|
23694
|
+
return isShellTool(t.name) && t.status === CoreToolCallStatus.Executing && t.ptyId === activeShellPtyId && !!embeddedShellFocused;
|
|
23678
23695
|
}
|
|
23679
23696
|
});
|
|
23680
23697
|
const isShellCommand = toolsToInspect.some((t) => {
|
|
@@ -23709,7 +23726,7 @@ var ToolGroupMessage = ({
|
|
|
23709
23726
|
const isLowErrorVerbosity = settings.merged.ui?.errorVerbosity !== "full";
|
|
23710
23727
|
const toolCalls = (0, import_react30.useMemo)(
|
|
23711
23728
|
() => allToolCalls.filter((t) => {
|
|
23712
|
-
if (isLowErrorVerbosity && t.status ===
|
|
23729
|
+
if (isLowErrorVerbosity && t.status === CoreToolCallStatus.Error && !t.isClientInitiated) {
|
|
23713
23730
|
return false;
|
|
23714
23731
|
}
|
|
23715
23732
|
return !shouldHideToolCall({
|
|
@@ -23886,18 +23903,18 @@ function CompressionMessage({
|
|
|
23886
23903
|
return "Compressing chat history";
|
|
23887
23904
|
}
|
|
23888
23905
|
switch (compressionStatus) {
|
|
23889
|
-
case
|
|
23906
|
+
case CompressionStatus.COMPRESSED:
|
|
23890
23907
|
return `Chat history compressed from ${originalTokens} to ${newTokens} tokens.`;
|
|
23891
|
-
case
|
|
23908
|
+
case CompressionStatus.COMPRESSION_FAILED_INFLATED_TOKEN_COUNT:
|
|
23892
23909
|
if (originalTokens < 5e4) {
|
|
23893
23910
|
return "Compression was not beneficial for this history size.";
|
|
23894
23911
|
}
|
|
23895
23912
|
return "Chat history compression did not reduce size. This may indicate issues with the compression prompt.";
|
|
23896
|
-
case
|
|
23913
|
+
case CompressionStatus.COMPRESSION_FAILED_TOKEN_COUNT_ERROR:
|
|
23897
23914
|
return "Could not compress chat history due to a token counting error.";
|
|
23898
|
-
case
|
|
23915
|
+
case CompressionStatus.COMPRESSION_FAILED_EMPTY_SUMMARY:
|
|
23899
23916
|
return "Chat history compression failed: the model returned an empty summary.";
|
|
23900
|
-
case
|
|
23917
|
+
case CompressionStatus.NOOP:
|
|
23901
23918
|
return "Nothing to compress.";
|
|
23902
23919
|
default:
|
|
23903
23920
|
return "";
|
|
@@ -24635,7 +24652,7 @@ var StatsDisplay = ({
|
|
|
24635
24652
|
const settings = useSettings();
|
|
24636
24653
|
const config = useConfig();
|
|
24637
24654
|
const useGemini3_1 = config.getGemini31LaunchedSync?.() ?? false;
|
|
24638
|
-
const useCustomToolModel = useGemini3_1 && config.getContentGeneratorConfig().authType ===
|
|
24655
|
+
const useCustomToolModel = useGemini3_1 && config.getContentGeneratorConfig().authType === AuthType.USE_GEMINI;
|
|
24639
24656
|
const pooledRemaining = quotaStats?.remaining;
|
|
24640
24657
|
const pooledLimit = quotaStats?.limit;
|
|
24641
24658
|
const pooledResetTime = quotaStats?.resetTime;
|
|
@@ -24864,8 +24881,8 @@ var ModelStatsDisplay = ({
|
|
|
24864
24881
|
return validRoles.includes(role);
|
|
24865
24882
|
}).sort((a, b) => {
|
|
24866
24883
|
if (a === b) return 0;
|
|
24867
|
-
if (a ===
|
|
24868
|
-
if (b ===
|
|
24884
|
+
if (a === LlmRole.MAIN) return -1;
|
|
24885
|
+
if (b === LlmRole.MAIN) return 1;
|
|
24869
24886
|
return a.localeCompare(b);
|
|
24870
24887
|
});
|
|
24871
24888
|
const createRow = (metric, getValue, options = {}) => {
|
|
@@ -25642,7 +25659,7 @@ var McpStatus = ({
|
|
|
25642
25659
|
);
|
|
25643
25660
|
const originalStatus = serverStatus(serverName);
|
|
25644
25661
|
const hasCachedItems = serverTools.length > 0 || serverPrompts.length > 0 || serverResources.length > 0;
|
|
25645
|
-
const status = originalStatus ===
|
|
25662
|
+
const status = originalStatus === MCPServerStatus.DISCONNECTED && hasCachedItems ? MCPServerStatus.CONNECTED : originalStatus;
|
|
25646
25663
|
let statusIndicator = "";
|
|
25647
25664
|
let statusText = "";
|
|
25648
25665
|
let statusColor = theme.text.primary;
|
|
@@ -25654,17 +25671,17 @@ var McpStatus = ({
|
|
|
25654
25671
|
statusColor = theme.text.secondary;
|
|
25655
25672
|
} else {
|
|
25656
25673
|
switch (status) {
|
|
25657
|
-
case
|
|
25674
|
+
case MCPServerStatus.CONNECTED:
|
|
25658
25675
|
statusIndicator = "\u{1F7E2}";
|
|
25659
25676
|
statusText = "Ready";
|
|
25660
25677
|
statusColor = theme.status.success;
|
|
25661
25678
|
break;
|
|
25662
|
-
case
|
|
25679
|
+
case MCPServerStatus.CONNECTING:
|
|
25663
25680
|
statusIndicator = "\u{1F504}";
|
|
25664
25681
|
statusText = "Starting... (first startup may take longer)";
|
|
25665
25682
|
statusColor = theme.status.warning;
|
|
25666
25683
|
break;
|
|
25667
|
-
case
|
|
25684
|
+
case MCPServerStatus.DISCONNECTED:
|
|
25668
25685
|
default:
|
|
25669
25686
|
statusIndicator = "\u{1F534}";
|
|
25670
25687
|
statusText = "Disconnected";
|
|
@@ -25712,12 +25729,12 @@ var McpStatus = ({
|
|
|
25712
25729
|
/* @__PURE__ */ (0, import_jsx_runtime50.jsxs)(Text, { children: [
|
|
25713
25730
|
" - ",
|
|
25714
25731
|
statusText,
|
|
25715
|
-
status ===
|
|
25732
|
+
status === MCPServerStatus.CONNECTED && parts.length > 0 && ` (${parts.join(", ")})`
|
|
25716
25733
|
] }),
|
|
25717
25734
|
authStatusNode
|
|
25718
25735
|
] }),
|
|
25719
|
-
status ===
|
|
25720
|
-
status ===
|
|
25736
|
+
status === MCPServerStatus.CONNECTING && /* @__PURE__ */ (0, import_jsx_runtime50.jsx)(Text, { children: " (tools and prompts will appear when ready)" }),
|
|
25737
|
+
status === MCPServerStatus.DISCONNECTED && toolCount > 0 && /* @__PURE__ */ (0, import_jsx_runtime50.jsxs)(Text, { children: [
|
|
25721
25738
|
" (",
|
|
25722
25739
|
toolCount,
|
|
25723
25740
|
" tools cached)"
|
|
@@ -26195,7 +26212,7 @@ var Notifications = () => {
|
|
|
26195
26212
|
if (dismissed) return [];
|
|
26196
26213
|
const counts = persistentState.get("startupWarningCounts") || {};
|
|
26197
26214
|
return startupWarnings.filter((w) => {
|
|
26198
|
-
if (w.priority ===
|
|
26215
|
+
if (w.priority === WarningPriority.Low) {
|
|
26199
26216
|
const count = counts[w.id] || 0;
|
|
26200
26217
|
return count < MAX_STARTUP_WARNING_SHOW_COUNT;
|
|
26201
26218
|
}
|
|
@@ -26208,7 +26225,7 @@ var Notifications = () => {
|
|
|
26208
26225
|
const counts = { ...persistentState.get("startupWarningCounts") || {} };
|
|
26209
26226
|
let changed = false;
|
|
26210
26227
|
visibleWarnings.forEach((w) => {
|
|
26211
|
-
if (w.priority ===
|
|
26228
|
+
if (w.priority === WarningPriority.Low) {
|
|
26212
26229
|
counts[w.id] = (counts[w.id] || 0) + 1;
|
|
26213
26230
|
changed = true;
|
|
26214
26231
|
}
|
|
@@ -26313,7 +26330,7 @@ var UserIdentity = ({ config }) => {
|
|
|
26313
26330
|
}
|
|
26314
26331
|
return /* @__PURE__ */ (0, import_jsx_runtime59.jsxs)(Box_default, { flexDirection: "column", children: [
|
|
26315
26332
|
/* @__PURE__ */ (0, import_jsx_runtime59.jsxs)(Box_default, { children: [
|
|
26316
|
-
/* @__PURE__ */ (0, import_jsx_runtime59.jsx)(Text, { color: theme.text.primary, wrap: "truncate-end", children: authType ===
|
|
26333
|
+
/* @__PURE__ */ (0, import_jsx_runtime59.jsx)(Text, { color: theme.text.primary, wrap: "truncate-end", children: authType === AuthType.LOGIN_WITH_GOOGLE ? /* @__PURE__ */ (0, import_jsx_runtime59.jsxs)(Text, { children: [
|
|
26317
26334
|
/* @__PURE__ */ (0, import_jsx_runtime59.jsxs)(Text, { bold: true, children: [
|
|
26318
26335
|
"Signed in with Google",
|
|
26319
26336
|
email ? ":" : ""
|
|
@@ -26523,7 +26540,7 @@ var import_react41 = __toESM(require_react(), 1);
|
|
|
26523
26540
|
function getConfirmingToolState(pendingHistoryItems) {
|
|
26524
26541
|
const allPendingTools = pendingHistoryItems.filter((item) => item.type === "tool_group").flatMap((group) => group.tools);
|
|
26525
26542
|
const confirmingTools = allPendingTools.filter(
|
|
26526
|
-
(tool) => tool.status ===
|
|
26543
|
+
(tool) => tool.status === CoreToolCallStatus.AwaitingApproval
|
|
26527
26544
|
);
|
|
26528
26545
|
if (confirmingTools.length === 0) {
|
|
26529
26546
|
return null;
|
|
@@ -26602,14 +26619,14 @@ var ToolActionsProvider = (props) => {
|
|
|
26602
26619
|
}
|
|
26603
26620
|
const details = tool.confirmationDetails;
|
|
26604
26621
|
if (details?.type === "edit" && isDiffingEnabled && "filePath" in details) {
|
|
26605
|
-
const cliOutcome = outcome ===
|
|
26622
|
+
const cliOutcome = outcome === ToolConfirmationOutcome.Cancel ? "rejected" : "accepted";
|
|
26606
26623
|
await ideClient?.resolveDiffFromCli(details.filePath, cliOutcome);
|
|
26607
26624
|
}
|
|
26608
26625
|
if (tool.correlationId) {
|
|
26609
26626
|
await config.getMessageBus().publish({
|
|
26610
|
-
type:
|
|
26627
|
+
type: MessageBusType.TOOL_CONFIRMATION_RESPONSE,
|
|
26611
26628
|
correlationId: tool.correlationId,
|
|
26612
|
-
confirmed: outcome !==
|
|
26629
|
+
confirmed: outcome !== ToolConfirmationOutcome.Cancel,
|
|
26613
26630
|
requiresUserConfirmation: false,
|
|
26614
26631
|
outcome,
|
|
26615
26632
|
payload
|
|
@@ -26628,7 +26645,7 @@ var ToolActionsProvider = (props) => {
|
|
|
26628
26645
|
);
|
|
26629
26646
|
const cancel = (0, import_react42.useCallback)(
|
|
26630
26647
|
async (callId) => {
|
|
26631
|
-
await confirm(callId,
|
|
26648
|
+
await confirm(callId, ToolConfirmationOutcome.Cancel);
|
|
26632
26649
|
},
|
|
26633
26650
|
[confirm]
|
|
26634
26651
|
);
|
|
@@ -27889,7 +27906,7 @@ var ExitPlanModeDialog = ({
|
|
|
27889
27906
|
{
|
|
27890
27907
|
questions: [
|
|
27891
27908
|
{
|
|
27892
|
-
type:
|
|
27909
|
+
type: QuestionType.CHOICE,
|
|
27893
27910
|
header: "Approval",
|
|
27894
27911
|
question: planContent,
|
|
27895
27912
|
options: [
|
|
@@ -27910,9 +27927,9 @@ var ExitPlanModeDialog = ({
|
|
|
27910
27927
|
onSubmit: (answers) => {
|
|
27911
27928
|
const answer = answers["0"];
|
|
27912
27929
|
if (answer === "Yes, automatically accept edits" /* Auto */) {
|
|
27913
|
-
onApprove(
|
|
27930
|
+
onApprove(ApprovalMode.AUTO_EDIT);
|
|
27914
27931
|
} else if (answer === "Yes, manually accept edits" /* Manual */) {
|
|
27915
|
-
onApprove(
|
|
27932
|
+
onApprove(ApprovalMode.DEFAULT);
|
|
27916
27933
|
} else if (answer) {
|
|
27917
27934
|
onFeedback(answer);
|
|
27918
27935
|
}
|
|
@@ -28059,7 +28076,7 @@ var ToolConfirmationMessage = ({
|
|
|
28059
28076
|
return true;
|
|
28060
28077
|
}
|
|
28061
28078
|
if (keyMatchers["basic.cancel" /* ESCAPE */](key)) {
|
|
28062
|
-
handleConfirm(
|
|
28079
|
+
handleConfirm(ToolConfirmationOutcome.Cancel);
|
|
28063
28080
|
return true;
|
|
28064
28081
|
}
|
|
28065
28082
|
if (keyMatchers["basic.quit" /* QUIT */](key)) {
|
|
@@ -28102,19 +28119,19 @@ ${deceptiveUrlWarnings.map(
|
|
|
28102
28119
|
if (!confirmationDetails.isModifying) {
|
|
28103
28120
|
options2.push({
|
|
28104
28121
|
label: "Allow once",
|
|
28105
|
-
value:
|
|
28122
|
+
value: ToolConfirmationOutcome.ProceedOnce,
|
|
28106
28123
|
key: "Allow once"
|
|
28107
28124
|
});
|
|
28108
28125
|
if (isTrustedFolder) {
|
|
28109
28126
|
options2.push({
|
|
28110
28127
|
label: "Allow for this session",
|
|
28111
|
-
value:
|
|
28128
|
+
value: ToolConfirmationOutcome.ProceedAlways,
|
|
28112
28129
|
key: "Allow for this session"
|
|
28113
28130
|
});
|
|
28114
28131
|
if (allowPermanentApproval) {
|
|
28115
28132
|
options2.push({
|
|
28116
28133
|
label: "Allow for this file in all future sessions",
|
|
28117
|
-
value:
|
|
28134
|
+
value: ToolConfirmationOutcome.ProceedAlwaysAndSave,
|
|
28118
28135
|
key: "Allow for this file in all future sessions"
|
|
28119
28136
|
});
|
|
28120
28137
|
}
|
|
@@ -28122,94 +28139,94 @@ ${deceptiveUrlWarnings.map(
|
|
|
28122
28139
|
if (!config.getIdeMode() || !isDiffingEnabled) {
|
|
28123
28140
|
options2.push({
|
|
28124
28141
|
label: "Modify with external editor",
|
|
28125
|
-
value:
|
|
28142
|
+
value: ToolConfirmationOutcome.ModifyWithEditor,
|
|
28126
28143
|
key: "Modify with external editor"
|
|
28127
28144
|
});
|
|
28128
28145
|
}
|
|
28129
28146
|
options2.push({
|
|
28130
28147
|
label: "No, suggest changes (esc)",
|
|
28131
|
-
value:
|
|
28148
|
+
value: ToolConfirmationOutcome.Cancel,
|
|
28132
28149
|
key: "No, suggest changes (esc)"
|
|
28133
28150
|
});
|
|
28134
28151
|
}
|
|
28135
28152
|
} else if (confirmationDetails.type === "exec") {
|
|
28136
28153
|
options2.push({
|
|
28137
28154
|
label: "Allow once",
|
|
28138
|
-
value:
|
|
28155
|
+
value: ToolConfirmationOutcome.ProceedOnce,
|
|
28139
28156
|
key: "Allow once"
|
|
28140
28157
|
});
|
|
28141
28158
|
if (isTrustedFolder) {
|
|
28142
28159
|
options2.push({
|
|
28143
28160
|
label: `Allow for this session`,
|
|
28144
|
-
value:
|
|
28161
|
+
value: ToolConfirmationOutcome.ProceedAlways,
|
|
28145
28162
|
key: `Allow for this session`
|
|
28146
28163
|
});
|
|
28147
28164
|
if (allowPermanentApproval) {
|
|
28148
28165
|
options2.push({
|
|
28149
28166
|
label: `Allow this command for all future sessions`,
|
|
28150
|
-
value:
|
|
28167
|
+
value: ToolConfirmationOutcome.ProceedAlwaysAndSave,
|
|
28151
28168
|
key: `Allow for all future sessions`
|
|
28152
28169
|
});
|
|
28153
28170
|
}
|
|
28154
28171
|
}
|
|
28155
28172
|
options2.push({
|
|
28156
28173
|
label: "No, suggest changes (esc)",
|
|
28157
|
-
value:
|
|
28174
|
+
value: ToolConfirmationOutcome.Cancel,
|
|
28158
28175
|
key: "No, suggest changes (esc)"
|
|
28159
28176
|
});
|
|
28160
28177
|
} else if (confirmationDetails.type === "info") {
|
|
28161
28178
|
options2.push({
|
|
28162
28179
|
label: "Allow once",
|
|
28163
|
-
value:
|
|
28180
|
+
value: ToolConfirmationOutcome.ProceedOnce,
|
|
28164
28181
|
key: "Allow once"
|
|
28165
28182
|
});
|
|
28166
28183
|
if (isTrustedFolder) {
|
|
28167
28184
|
options2.push({
|
|
28168
28185
|
label: "Allow for this session",
|
|
28169
|
-
value:
|
|
28186
|
+
value: ToolConfirmationOutcome.ProceedAlways,
|
|
28170
28187
|
key: "Allow for this session"
|
|
28171
28188
|
});
|
|
28172
28189
|
if (allowPermanentApproval) {
|
|
28173
28190
|
options2.push({
|
|
28174
28191
|
label: "Allow for all future sessions",
|
|
28175
|
-
value:
|
|
28192
|
+
value: ToolConfirmationOutcome.ProceedAlwaysAndSave,
|
|
28176
28193
|
key: "Allow for all future sessions"
|
|
28177
28194
|
});
|
|
28178
28195
|
}
|
|
28179
28196
|
}
|
|
28180
28197
|
options2.push({
|
|
28181
28198
|
label: "No, suggest changes (esc)",
|
|
28182
|
-
value:
|
|
28199
|
+
value: ToolConfirmationOutcome.Cancel,
|
|
28183
28200
|
key: "No, suggest changes (esc)"
|
|
28184
28201
|
});
|
|
28185
28202
|
} else if (confirmationDetails.type === "mcp") {
|
|
28186
28203
|
options2.push({
|
|
28187
28204
|
label: "Allow once",
|
|
28188
|
-
value:
|
|
28205
|
+
value: ToolConfirmationOutcome.ProceedOnce,
|
|
28189
28206
|
key: "Allow once"
|
|
28190
28207
|
});
|
|
28191
28208
|
if (isTrustedFolder) {
|
|
28192
28209
|
options2.push({
|
|
28193
28210
|
label: "Allow tool for this session",
|
|
28194
|
-
value:
|
|
28211
|
+
value: ToolConfirmationOutcome.ProceedAlwaysTool,
|
|
28195
28212
|
key: "Allow tool for this session"
|
|
28196
28213
|
});
|
|
28197
28214
|
options2.push({
|
|
28198
28215
|
label: "Allow all server tools for this session",
|
|
28199
|
-
value:
|
|
28216
|
+
value: ToolConfirmationOutcome.ProceedAlwaysServer,
|
|
28200
28217
|
key: "Allow all server tools for this session"
|
|
28201
28218
|
});
|
|
28202
28219
|
if (allowPermanentApproval) {
|
|
28203
28220
|
options2.push({
|
|
28204
28221
|
label: "Allow tool for all future sessions",
|
|
28205
|
-
value:
|
|
28222
|
+
value: ToolConfirmationOutcome.ProceedAlwaysAndSave,
|
|
28206
28223
|
key: "Allow tool for all future sessions"
|
|
28207
28224
|
});
|
|
28208
28225
|
}
|
|
28209
28226
|
}
|
|
28210
28227
|
options2.push({
|
|
28211
28228
|
label: "No, suggest changes (esc)",
|
|
28212
|
-
value:
|
|
28229
|
+
value: ToolConfirmationOutcome.Cancel,
|
|
28213
28230
|
key: "No, suggest changes (esc)"
|
|
28214
28231
|
});
|
|
28215
28232
|
}
|
|
@@ -28246,7 +28263,7 @@ ${deceptiveUrlWarnings.map(
|
|
|
28246
28263
|
const isSafeToPersist = confirmationDetails.type === "info" || confirmationDetails.type === "edit" || confirmationDetails.type === "mcp";
|
|
28247
28264
|
if (isSafeToPersist && settings.merged.security.autoAddToPolicyByDefault) {
|
|
28248
28265
|
const alwaysAndSaveIndex = options2.findIndex(
|
|
28249
|
-
(o) => o.value ===
|
|
28266
|
+
(o) => o.value === ToolConfirmationOutcome.ProceedAlwaysAndSave
|
|
28250
28267
|
);
|
|
28251
28268
|
if (alwaysAndSaveIndex !== -1) {
|
|
28252
28269
|
initialIndex2 = alwaysAndSaveIndex;
|
|
@@ -28262,10 +28279,10 @@ ${deceptiveUrlWarnings.map(
|
|
|
28262
28279
|
{
|
|
28263
28280
|
questions: confirmationDetails.questions,
|
|
28264
28281
|
onSubmit: (answers) => {
|
|
28265
|
-
handleConfirm(
|
|
28282
|
+
handleConfirm(ToolConfirmationOutcome.ProceedOnce, { answers });
|
|
28266
28283
|
},
|
|
28267
28284
|
onCancel: () => {
|
|
28268
|
-
handleConfirm(
|
|
28285
|
+
handleConfirm(ToolConfirmationOutcome.Cancel);
|
|
28269
28286
|
},
|
|
28270
28287
|
width: terminalWidth,
|
|
28271
28288
|
availableHeight: availableBodyContentHeight()
|
|
@@ -28286,19 +28303,19 @@ ${deceptiveUrlWarnings.map(
|
|
|
28286
28303
|
planPath: confirmationDetails.planPath,
|
|
28287
28304
|
getPreferredEditor,
|
|
28288
28305
|
onApprove: (approvalMode) => {
|
|
28289
|
-
handleConfirm(
|
|
28306
|
+
handleConfirm(ToolConfirmationOutcome.ProceedOnce, {
|
|
28290
28307
|
approved: true,
|
|
28291
28308
|
approvalMode
|
|
28292
28309
|
});
|
|
28293
28310
|
},
|
|
28294
28311
|
onFeedback: (feedback) => {
|
|
28295
|
-
handleConfirm(
|
|
28312
|
+
handleConfirm(ToolConfirmationOutcome.ProceedOnce, {
|
|
28296
28313
|
approved: false,
|
|
28297
28314
|
feedback
|
|
28298
28315
|
});
|
|
28299
28316
|
},
|
|
28300
28317
|
onCancel: () => {
|
|
28301
|
-
handleConfirm(
|
|
28318
|
+
handleConfirm(ToolConfirmationOutcome.Cancel);
|
|
28302
28319
|
},
|
|
28303
28320
|
width: terminalWidth,
|
|
28304
28321
|
availableHeight: availableBodyContentHeight()
|
|
@@ -30506,7 +30523,7 @@ function validateAuthMethodWithSettings(authType, settings) {
|
|
|
30506
30523
|
if (settings.merged.security.auth.useExternal) {
|
|
30507
30524
|
return null;
|
|
30508
30525
|
}
|
|
30509
|
-
if (authType ===
|
|
30526
|
+
if (authType === AuthType.USE_GEMINI) {
|
|
30510
30527
|
return null;
|
|
30511
30528
|
}
|
|
30512
30529
|
return validateAuthMethod(authType);
|
|
@@ -30558,7 +30575,7 @@ var useAuthCommand = (settings, config, initialAuthError = null, initialAccountS
|
|
|
30558
30575
|
}
|
|
30559
30576
|
return;
|
|
30560
30577
|
}
|
|
30561
|
-
if (authType ===
|
|
30578
|
+
if (authType === AuthType.USE_GEMINI) {
|
|
30562
30579
|
const key = await reloadApiKey();
|
|
30563
30580
|
if (!key) {
|
|
30564
30581
|
setAuthState("awaiting_api_key_input" /* AwaitingApiKeyInput */);
|
|
@@ -30633,31 +30650,31 @@ function AuthDialog({
|
|
|
30633
30650
|
let items = [
|
|
30634
30651
|
{
|
|
30635
30652
|
label: "Sign in with Google",
|
|
30636
|
-
value:
|
|
30637
|
-
key:
|
|
30653
|
+
value: AuthType.LOGIN_WITH_GOOGLE,
|
|
30654
|
+
key: AuthType.LOGIN_WITH_GOOGLE
|
|
30638
30655
|
},
|
|
30639
30656
|
...process.env["CLOUD_SHELL"] === "true" ? [
|
|
30640
30657
|
{
|
|
30641
30658
|
label: "Use Cloud Shell user credentials",
|
|
30642
|
-
value:
|
|
30643
|
-
key:
|
|
30659
|
+
value: AuthType.COMPUTE_ADC,
|
|
30660
|
+
key: AuthType.COMPUTE_ADC
|
|
30644
30661
|
}
|
|
30645
30662
|
] : process.env["GEMINI_CLI_USE_COMPUTE_ADC"] === "true" ? [
|
|
30646
30663
|
{
|
|
30647
30664
|
label: "Use metadata server application default credentials",
|
|
30648
|
-
value:
|
|
30649
|
-
key:
|
|
30665
|
+
value: AuthType.COMPUTE_ADC,
|
|
30666
|
+
key: AuthType.COMPUTE_ADC
|
|
30650
30667
|
}
|
|
30651
30668
|
] : [],
|
|
30652
30669
|
{
|
|
30653
30670
|
label: "Use Gemini API Key",
|
|
30654
|
-
value:
|
|
30655
|
-
key:
|
|
30671
|
+
value: AuthType.USE_GEMINI,
|
|
30672
|
+
key: AuthType.USE_GEMINI
|
|
30656
30673
|
},
|
|
30657
30674
|
{
|
|
30658
30675
|
label: "Vertex AI",
|
|
30659
|
-
value:
|
|
30660
|
-
key:
|
|
30676
|
+
value: AuthType.USE_VERTEX_AI,
|
|
30677
|
+
key: AuthType.USE_VERTEX_AI
|
|
30661
30678
|
}
|
|
30662
30679
|
];
|
|
30663
30680
|
if (settings.merged.security.auth.enforcedType) {
|
|
@@ -30679,9 +30696,9 @@ function AuthDialog({
|
|
|
30679
30696
|
return item.value === defaultAuthType;
|
|
30680
30697
|
}
|
|
30681
30698
|
if (process.env["GEMINI_API_KEY"]) {
|
|
30682
|
-
return item.value ===
|
|
30699
|
+
return item.value === AuthType.USE_GEMINI;
|
|
30683
30700
|
}
|
|
30684
|
-
return item.value ===
|
|
30701
|
+
return item.value === AuthType.LOGIN_WITH_GOOGLE;
|
|
30685
30702
|
});
|
|
30686
30703
|
if (settings.merged.security.auth.enforcedType) {
|
|
30687
30704
|
initialAuthIndex = 0;
|
|
@@ -30692,19 +30709,19 @@ function AuthDialog({
|
|
|
30692
30709
|
return;
|
|
30693
30710
|
}
|
|
30694
30711
|
if (authType) {
|
|
30695
|
-
if (authType ===
|
|
30712
|
+
if (authType === AuthType.LOGIN_WITH_GOOGLE) {
|
|
30696
30713
|
setAuthContext({ requiresRestart: true });
|
|
30697
30714
|
} else {
|
|
30698
30715
|
setAuthContext({});
|
|
30699
30716
|
}
|
|
30700
30717
|
await clearCachedCredentialFile();
|
|
30701
30718
|
settings.setValue(scope, "security.auth.selectedType", authType);
|
|
30702
|
-
if (authType ===
|
|
30719
|
+
if (authType === AuthType.LOGIN_WITH_GOOGLE && config.isBrowserLaunchSuppressed()) {
|
|
30703
30720
|
setExiting(true);
|
|
30704
30721
|
setTimeout(relaunchApp, 100);
|
|
30705
30722
|
return;
|
|
30706
30723
|
}
|
|
30707
|
-
if (authType ===
|
|
30724
|
+
if (authType === AuthType.USE_GEMINI) {
|
|
30708
30725
|
if (process.env["GEMINI_API_KEY"] !== void 0) {
|
|
30709
30726
|
setAuthState("unauthenticated" /* Unauthenticated */);
|
|
30710
30727
|
return;
|
|
@@ -31459,11 +31476,11 @@ var PrivacyNoticeText = ({
|
|
|
31459
31476
|
}) => {
|
|
31460
31477
|
const authType = config.getContentGeneratorConfig()?.authType;
|
|
31461
31478
|
switch (authType) {
|
|
31462
|
-
case
|
|
31479
|
+
case AuthType.USE_GEMINI:
|
|
31463
31480
|
return /* @__PURE__ */ (0, import_jsx_runtime85.jsx)(GeminiPrivacyNotice, { onExit });
|
|
31464
|
-
case
|
|
31481
|
+
case AuthType.USE_VERTEX_AI:
|
|
31465
31482
|
return /* @__PURE__ */ (0, import_jsx_runtime85.jsx)(CloudPaidPrivacyNotice, { onExit });
|
|
31466
|
-
case
|
|
31483
|
+
case AuthType.LOGIN_WITH_GOOGLE:
|
|
31467
31484
|
default:
|
|
31468
31485
|
return /* @__PURE__ */ (0, import_jsx_runtime85.jsx)(CloudFreePrivacyNotice, { config, onExit });
|
|
31469
31486
|
}
|
|
@@ -31504,7 +31521,7 @@ function ProQuotaDialog({
|
|
|
31504
31521
|
value: "retry_always",
|
|
31505
31522
|
key: "retry_always"
|
|
31506
31523
|
},
|
|
31507
|
-
...authType ===
|
|
31524
|
+
...authType === AuthType.LOGIN_WITH_GOOGLE && !isUltra ? [
|
|
31508
31525
|
{
|
|
31509
31526
|
label: "Upgrade for higher limits",
|
|
31510
31527
|
value: "upgrade",
|
|
@@ -32501,7 +32518,7 @@ function ModelDialog({ onClose }) {
|
|
|
32501
32518
|
const shouldShowPreviewModels = config?.getHasAccessToPreviewModel();
|
|
32502
32519
|
const useGemini31 = config?.getGemini31LaunchedSync?.() ?? false;
|
|
32503
32520
|
const selectedAuthType = settings.merged.security.auth.selectedType;
|
|
32504
|
-
const useCustomToolModel = useGemini31 && selectedAuthType ===
|
|
32521
|
+
const useCustomToolModel = useGemini31 && selectedAuthType === AuthType.USE_GEMINI;
|
|
32505
32522
|
const manualModelSelected = (0, import_react64.useMemo)(() => {
|
|
32506
32523
|
const manualModels = [
|
|
32507
32524
|
DEFAULT_GEMINI_MODEL,
|
|
@@ -34128,22 +34145,22 @@ var ApprovalModeIndicator = ({
|
|
|
34128
34145
|
const cycleHint = formatCommand("app.cycleApprovalMode" /* CYCLE_APPROVAL_MODE */);
|
|
34129
34146
|
const yoloHint = formatCommand("app.toggleYolo" /* TOGGLE_YOLO */);
|
|
34130
34147
|
switch (approvalMode) {
|
|
34131
|
-
case
|
|
34148
|
+
case ApprovalMode.AUTO_EDIT:
|
|
34132
34149
|
textColor = theme.status.warning;
|
|
34133
34150
|
textContent = "auto-accept edits";
|
|
34134
34151
|
subText = allowPlanMode ? `${cycleHint} to plan` : `${cycleHint} to manual`;
|
|
34135
34152
|
break;
|
|
34136
|
-
case
|
|
34153
|
+
case ApprovalMode.PLAN:
|
|
34137
34154
|
textColor = theme.status.success;
|
|
34138
34155
|
textContent = "plan";
|
|
34139
34156
|
subText = `${cycleHint} to manual`;
|
|
34140
34157
|
break;
|
|
34141
|
-
case
|
|
34158
|
+
case ApprovalMode.YOLO:
|
|
34142
34159
|
textColor = theme.status.error;
|
|
34143
34160
|
textContent = "YOLO";
|
|
34144
34161
|
subText = yoloHint;
|
|
34145
34162
|
break;
|
|
34146
|
-
case
|
|
34163
|
+
case ApprovalMode.DEFAULT:
|
|
34147
34164
|
default:
|
|
34148
34165
|
textColor = theme.text.accent;
|
|
34149
34166
|
textContent = "";
|
|
@@ -36208,7 +36225,7 @@ function usePromptCompletion({
|
|
|
36208
36225
|
{ model: "prompt-completion" },
|
|
36209
36226
|
contents,
|
|
36210
36227
|
signal,
|
|
36211
|
-
|
|
36228
|
+
LlmRole.UTILITY_AUTOCOMPLETE
|
|
36212
36229
|
);
|
|
36213
36230
|
if (signal.aborted) {
|
|
36214
36231
|
return;
|
|
@@ -37762,9 +37779,9 @@ var InputPrompt = ({
|
|
|
37762
37779
|
onSuggestionsVisibilityChange(shouldShowSuggestions);
|
|
37763
37780
|
}
|
|
37764
37781
|
}, [shouldShowSuggestions, onSuggestionsVisibilityChange]);
|
|
37765
|
-
const showAutoAcceptStyling = !shellModeActive && approvalMode ===
|
|
37766
|
-
const showYoloStyling = !shellModeActive && approvalMode ===
|
|
37767
|
-
const showPlanStyling = !shellModeActive && approvalMode ===
|
|
37782
|
+
const showAutoAcceptStyling = !shellModeActive && approvalMode === ApprovalMode.AUTO_EDIT;
|
|
37783
|
+
const showYoloStyling = !shellModeActive && approvalMode === ApprovalMode.YOLO;
|
|
37784
|
+
const showPlanStyling = !shellModeActive && approvalMode === ApprovalMode.PLAN;
|
|
37768
37785
|
let statusColor;
|
|
37769
37786
|
let statusText = "";
|
|
37770
37787
|
if (shellModeActive) {
|
|
@@ -38041,7 +38058,7 @@ var ConfigInitDisplay = ({
|
|
|
38041
38058
|
let connected = 0;
|
|
38042
38059
|
const connecting = [];
|
|
38043
38060
|
for (const [name, client] of clients.entries()) {
|
|
38044
|
-
if (client.getStatus() ===
|
|
38061
|
+
if (client.getStatus() === MCPServerStatus.CONNECTED) {
|
|
38045
38062
|
connected++;
|
|
38046
38063
|
} else {
|
|
38047
38064
|
connecting.push(name);
|
|
@@ -38063,9 +38080,9 @@ var ConfigInitDisplay = ({
|
|
|
38063
38080
|
);
|
|
38064
38081
|
}
|
|
38065
38082
|
};
|
|
38066
|
-
coreEvents.on(
|
|
38083
|
+
coreEvents.on(CoreEvent.McpClientUpdate, onChange);
|
|
38067
38084
|
return () => {
|
|
38068
|
-
coreEvents.off(
|
|
38085
|
+
coreEvents.off(CoreEvent.McpClientUpdate, onChange);
|
|
38069
38086
|
};
|
|
38070
38087
|
}, [initialMessage]);
|
|
38071
38088
|
return /* @__PURE__ */ (0, import_jsx_runtime119.jsx)(Box_default, { marginTop: 1, children: /* @__PURE__ */ (0, import_jsx_runtime119.jsxs)(Text, { children: [
|
|
@@ -38279,7 +38296,7 @@ var Composer = ({ isFocused = true }) => {
|
|
|
38279
38296
|
(item) => item.type === "tool_group"
|
|
38280
38297
|
).some(
|
|
38281
38298
|
(item) => item.tools.some(
|
|
38282
|
-
(tool) => tool.status ===
|
|
38299
|
+
(tool) => tool.status === CoreToolCallStatus.AwaitingApproval
|
|
38283
38300
|
)
|
|
38284
38301
|
),
|
|
38285
38302
|
[uiState.pendingHistoryItems]
|
|
@@ -38304,16 +38321,16 @@ var Composer = ({ isFocused = true }) => {
|
|
|
38304
38321
|
const showRawMarkdownIndicator = !uiState.renderMarkdown;
|
|
38305
38322
|
let modeBleedThrough = null;
|
|
38306
38323
|
switch (showApprovalModeIndicator) {
|
|
38307
|
-
case
|
|
38324
|
+
case ApprovalMode.YOLO:
|
|
38308
38325
|
modeBleedThrough = { text: "YOLO", color: theme.status.error };
|
|
38309
38326
|
break;
|
|
38310
|
-
case
|
|
38327
|
+
case ApprovalMode.PLAN:
|
|
38311
38328
|
modeBleedThrough = { text: "plan", color: theme.status.success };
|
|
38312
38329
|
break;
|
|
38313
|
-
case
|
|
38330
|
+
case ApprovalMode.AUTO_EDIT:
|
|
38314
38331
|
modeBleedThrough = { text: "auto edit", color: theme.status.warning };
|
|
38315
38332
|
break;
|
|
38316
|
-
case
|
|
38333
|
+
case ApprovalMode.DEFAULT:
|
|
38317
38334
|
modeBleedThrough = null;
|
|
38318
38335
|
break;
|
|
38319
38336
|
default:
|
|
@@ -38952,7 +38969,7 @@ var useShellCommandProcessor = (addItemToHistory, setPendingHistoryItem, onExec,
|
|
|
38952
38969
|
callId,
|
|
38953
38970
|
name: SHELL_COMMAND_NAME,
|
|
38954
38971
|
description: rawQuery,
|
|
38955
|
-
status:
|
|
38972
|
+
status: CoreToolCallStatus.Executing,
|
|
38956
38973
|
isClientInitiated: true,
|
|
38957
38974
|
resultDisplay: "",
|
|
38958
38975
|
confirmationDetails: void 0
|
|
@@ -39072,24 +39089,24 @@ var useShellCommandProcessor = (addItemToHistory, setPendingHistoryItem, onExec,
|
|
|
39072
39089
|
mainContent = result.output.trim() || "(Command produced no output)";
|
|
39073
39090
|
}
|
|
39074
39091
|
let finalOutput = mainContent;
|
|
39075
|
-
let finalStatus =
|
|
39092
|
+
let finalStatus = CoreToolCallStatus.Success;
|
|
39076
39093
|
if (result.error) {
|
|
39077
|
-
finalStatus =
|
|
39094
|
+
finalStatus = CoreToolCallStatus.Error;
|
|
39078
39095
|
finalOutput = `${result.error.message}
|
|
39079
39096
|
${finalOutput}`;
|
|
39080
39097
|
} else if (result.aborted) {
|
|
39081
|
-
finalStatus =
|
|
39098
|
+
finalStatus = CoreToolCallStatus.Cancelled;
|
|
39082
39099
|
finalOutput = `Command was cancelled.
|
|
39083
39100
|
${finalOutput}`;
|
|
39084
39101
|
} else if (result.backgrounded) {
|
|
39085
|
-
finalStatus =
|
|
39102
|
+
finalStatus = CoreToolCallStatus.Success;
|
|
39086
39103
|
finalOutput = `Command moved to background (PID: ${result.pid}). Output hidden. Press Ctrl+B to view.`;
|
|
39087
39104
|
} else if (result.signal) {
|
|
39088
|
-
finalStatus =
|
|
39105
|
+
finalStatus = CoreToolCallStatus.Error;
|
|
39089
39106
|
finalOutput = `Command terminated by signal: ${result.signal}.
|
|
39090
39107
|
${finalOutput}`;
|
|
39091
39108
|
} else if (result.exitCode !== 0) {
|
|
39092
|
-
finalStatus =
|
|
39109
|
+
finalStatus = CoreToolCallStatus.Error;
|
|
39093
39110
|
finalOutput = `Command exited with code ${result.exitCode}.
|
|
39094
39111
|
${finalOutput}`;
|
|
39095
39112
|
}
|
|
@@ -39107,7 +39124,7 @@ ${finalOutput}`;
|
|
|
39107
39124
|
status: finalStatus,
|
|
39108
39125
|
resultDisplay: finalOutput
|
|
39109
39126
|
};
|
|
39110
|
-
if (finalStatus !==
|
|
39127
|
+
if (finalStatus !== CoreToolCallStatus.Cancelled) {
|
|
39111
39128
|
addItemToHistory(
|
|
39112
39129
|
{
|
|
39113
39130
|
type: "tool_group",
|
|
@@ -40087,7 +40104,7 @@ function useQuotaAndFallback({
|
|
|
40087
40104
|
error.retryDelayMs ? `Access resets at ${getResetTimeMessage(error.retryDelayMs)}.` : null,
|
|
40088
40105
|
`/stats model for usage details`,
|
|
40089
40106
|
`/model to switch models.`,
|
|
40090
|
-
contentGeneratorConfig?.authType ===
|
|
40107
|
+
contentGeneratorConfig?.authType === AuthType.LOGIN_WITH_GOOGLE ? `/auth to switch to API key.` : null
|
|
40091
40108
|
].filter(Boolean);
|
|
40092
40109
|
message = messageLines.join("\n");
|
|
40093
40110
|
} else if (error instanceof ModelNotFoundError) {
|
|
@@ -40275,7 +40292,7 @@ var useEditorSettings = (loadedSettings, setEditorError, addItem) => {
|
|
|
40275
40292
|
);
|
|
40276
40293
|
setEditorError(null);
|
|
40277
40294
|
setIsEditorDialogOpen(false);
|
|
40278
|
-
coreEvents.emit(
|
|
40295
|
+
coreEvents.emit(CoreEvent.EditorSelected, { editor: editorType });
|
|
40279
40296
|
} catch (error) {
|
|
40280
40297
|
setEditorError(`Failed to set editor preference: ${error}`);
|
|
40281
40298
|
}
|
|
@@ -40284,7 +40301,7 @@ var useEditorSettings = (loadedSettings, setEditorError, addItem) => {
|
|
|
40284
40301
|
);
|
|
40285
40302
|
const exitEditorDialog = (0, import_react94.useCallback)(() => {
|
|
40286
40303
|
setIsEditorDialogOpen(false);
|
|
40287
|
-
coreEvents.emit(
|
|
40304
|
+
coreEvents.emit(CoreEvent.EditorSelected, { editor: void 0 });
|
|
40288
40305
|
}, []);
|
|
40289
40306
|
return {
|
|
40290
40307
|
isEditorDialogOpen,
|
|
@@ -40639,7 +40656,7 @@ var useSlashCommandProcessor = (config, settings, addItem, clearItems, loadHisto
|
|
|
40639
40656
|
canonicalPath: resolvedCommandPath
|
|
40640
40657
|
} = parseSlashCommand(trimmed, commands);
|
|
40641
40658
|
if (!commandToExecute) {
|
|
40642
|
-
const isMcpLoading = config?.getMcpClientManager()?.getDiscoveryState() ===
|
|
40659
|
+
const isMcpLoading = config?.getMcpClientManager()?.getDiscoveryState() === MCPDiscoveryState.IN_PROGRESS;
|
|
40643
40660
|
if (isMcpLoading) {
|
|
40644
40661
|
setIsProcessing(true);
|
|
40645
40662
|
if (addToHistory) {
|
|
@@ -40807,7 +40824,7 @@ var useSlashCommandProcessor = (config, settings, addItem, clearItems, loadHisto
|
|
|
40807
40824
|
onConfirm: async (resolvedOutcome) => {
|
|
40808
40825
|
resolve3({
|
|
40809
40826
|
outcome: resolvedOutcome,
|
|
40810
|
-
approvedCommands: resolvedOutcome ===
|
|
40827
|
+
approvedCommands: resolvedOutcome === ToolConfirmationOutcome.Cancel ? [] : result.commandsToConfirm
|
|
40811
40828
|
});
|
|
40812
40829
|
}
|
|
40813
40830
|
};
|
|
@@ -40815,7 +40832,7 @@ var useSlashCommandProcessor = (config, settings, addItem, clearItems, loadHisto
|
|
|
40815
40832
|
callId,
|
|
40816
40833
|
name: "Expansion",
|
|
40817
40834
|
description: "Command expansion needs shell access",
|
|
40818
|
-
status:
|
|
40835
|
+
status: CoreToolCallStatus.AwaitingApproval,
|
|
40819
40836
|
isClientInitiated: true,
|
|
40820
40837
|
resultDisplay: void 0,
|
|
40821
40838
|
confirmationDetails
|
|
@@ -40826,7 +40843,7 @@ var useSlashCommandProcessor = (config, settings, addItem, clearItems, loadHisto
|
|
|
40826
40843
|
});
|
|
40827
40844
|
});
|
|
40828
40845
|
setPendingItem(null);
|
|
40829
|
-
if (outcome ===
|
|
40846
|
+
if (outcome === ToolConfirmationOutcome.Cancel || !approvedCommands || approvedCommands.length === 0) {
|
|
40830
40847
|
addItem(
|
|
40831
40848
|
{
|
|
40832
40849
|
type: "info" /* INFO */,
|
|
@@ -40836,7 +40853,7 @@ var useSlashCommandProcessor = (config, settings, addItem, clearItems, loadHisto
|
|
|
40836
40853
|
);
|
|
40837
40854
|
return { type: "handled" };
|
|
40838
40855
|
}
|
|
40839
|
-
if (outcome ===
|
|
40856
|
+
if (outcome === ToolConfirmationOutcome.ProceedAlways) {
|
|
40840
40857
|
setSessionShellAllowlist(
|
|
40841
40858
|
(prev) => /* @__PURE__ */ new Set([...prev, ...approvedCommands])
|
|
40842
40859
|
);
|
|
@@ -41036,11 +41053,11 @@ function useConsoleMessages() {
|
|
|
41036
41053
|
}
|
|
41037
41054
|
handleNewMessage({ type: "log", content, count: 1 });
|
|
41038
41055
|
};
|
|
41039
|
-
coreEvents.on(
|
|
41040
|
-
coreEvents.on(
|
|
41056
|
+
coreEvents.on(CoreEvent.ConsoleLog, handleConsoleLog);
|
|
41057
|
+
coreEvents.on(CoreEvent.Output, handleOutput);
|
|
41041
41058
|
return () => {
|
|
41042
|
-
coreEvents.off(
|
|
41043
|
-
coreEvents.off(
|
|
41059
|
+
coreEvents.off(CoreEvent.ConsoleLog, handleConsoleLog);
|
|
41060
|
+
coreEvents.off(CoreEvent.Output, handleOutput);
|
|
41044
41061
|
};
|
|
41045
41062
|
}, [handleNewMessage]);
|
|
41046
41063
|
const clearConsoleMessages = (0, import_react98.useCallback)(() => {
|
|
@@ -41421,7 +41438,7 @@ function mapToDisplay(toolOrTools, options = {}) {
|
|
|
41421
41438
|
let description;
|
|
41422
41439
|
let renderOutputAsMarkdown = false;
|
|
41423
41440
|
const displayName = call.tool?.displayName ?? call.request.name;
|
|
41424
|
-
if (call.status ===
|
|
41441
|
+
if (call.status === CoreToolCallStatus.Error) {
|
|
41425
41442
|
description = JSON.stringify(call.request.args);
|
|
41426
41443
|
} else {
|
|
41427
41444
|
description = call.invocation.getDescription();
|
|
@@ -41443,27 +41460,27 @@ function mapToDisplay(toolOrTools, options = {}) {
|
|
|
41443
41460
|
let progress = void 0;
|
|
41444
41461
|
let progressTotal = void 0;
|
|
41445
41462
|
switch (call.status) {
|
|
41446
|
-
case
|
|
41463
|
+
case CoreToolCallStatus.Success:
|
|
41447
41464
|
resultDisplay = call.response.resultDisplay;
|
|
41448
41465
|
outputFile = call.response.outputFile;
|
|
41449
41466
|
break;
|
|
41450
|
-
case
|
|
41451
|
-
case
|
|
41467
|
+
case CoreToolCallStatus.Error:
|
|
41468
|
+
case CoreToolCallStatus.Cancelled:
|
|
41452
41469
|
resultDisplay = call.response.resultDisplay;
|
|
41453
41470
|
break;
|
|
41454
|
-
case
|
|
41471
|
+
case CoreToolCallStatus.AwaitingApproval:
|
|
41455
41472
|
correlationId = call.correlationId;
|
|
41456
41473
|
confirmationDetails = call.confirmationDetails;
|
|
41457
41474
|
break;
|
|
41458
|
-
case
|
|
41475
|
+
case CoreToolCallStatus.Executing:
|
|
41459
41476
|
resultDisplay = call.liveOutput;
|
|
41460
41477
|
ptyId = call.pid;
|
|
41461
41478
|
progressMessage = call.progressMessage;
|
|
41462
41479
|
progress = call.progress;
|
|
41463
41480
|
progressTotal = call.progressTotal;
|
|
41464
41481
|
break;
|
|
41465
|
-
case
|
|
41466
|
-
case
|
|
41482
|
+
case CoreToolCallStatus.Scheduled:
|
|
41483
|
+
case CoreToolCallStatus.Validating:
|
|
41467
41484
|
break;
|
|
41468
41485
|
default: {
|
|
41469
41486
|
const exhaustiveCheck = call;
|
|
@@ -41532,7 +41549,7 @@ function useToolScheduler(onComplete, config, getPreferredEditor) {
|
|
|
41532
41549
|
const handler = (event) => {
|
|
41533
41550
|
const isRoot = event.schedulerId === ROOT_SCHEDULER_ID;
|
|
41534
41551
|
const hasExecuting = event.toolCalls.some(
|
|
41535
|
-
(tc) => tc.status ===
|
|
41552
|
+
(tc) => tc.status === CoreToolCallStatus.Executing || (tc.status === CoreToolCallStatus.Success || tc.status === CoreToolCallStatus.Error) && "tailToolCallRequest" in tc && tc.tailToolCallRequest != null
|
|
41536
41553
|
);
|
|
41537
41554
|
if (hasExecuting) {
|
|
41538
41555
|
setLastToolOutputTime(Date.now());
|
|
@@ -41541,7 +41558,7 @@ function useToolScheduler(onComplete, config, getPreferredEditor) {
|
|
|
41541
41558
|
const prevCalls = prev[event.schedulerId] ?? [];
|
|
41542
41559
|
const prevCallIds = new Set(prevCalls.map((tc) => tc.request.callId));
|
|
41543
41560
|
const filteredToolCalls = isRoot ? event.toolCalls : event.toolCalls.filter(
|
|
41544
|
-
(tc) => tc.status ===
|
|
41561
|
+
(tc) => tc.status === CoreToolCallStatus.AwaitingApproval || prevCallIds.has(tc.request.callId)
|
|
41545
41562
|
);
|
|
41546
41563
|
if (!isRoot && filteredToolCalls.length === 0 && prevCalls.length === 0) {
|
|
41547
41564
|
return prev;
|
|
@@ -41553,9 +41570,9 @@ function useToolScheduler(onComplete, config, getPreferredEditor) {
|
|
|
41553
41570
|
};
|
|
41554
41571
|
});
|
|
41555
41572
|
};
|
|
41556
|
-
messageBus.subscribe(
|
|
41573
|
+
messageBus.subscribe(MessageBusType.TOOL_CALLS_UPDATE, handler);
|
|
41557
41574
|
return () => {
|
|
41558
|
-
messageBus.unsubscribe(
|
|
41575
|
+
messageBus.unsubscribe(MessageBusType.TOOL_CALLS_UPDATE, handler);
|
|
41559
41576
|
};
|
|
41560
41577
|
}, [messageBus, internalAdaptToolCalls]);
|
|
41561
41578
|
const schedule = (0, import_react101.useCallback)(
|
|
@@ -41627,8 +41644,8 @@ function adaptToolCalls(coreCalls, prevTracked) {
|
|
|
41627
41644
|
const prev = prevMap.get(coreCall.request.callId);
|
|
41628
41645
|
const responseSubmittedToGemini = prev?.responseSubmittedToGemini ?? false;
|
|
41629
41646
|
let status = coreCall.status;
|
|
41630
|
-
if ((status ===
|
|
41631
|
-
status =
|
|
41647
|
+
if ((status === CoreToolCallStatus.Success || status === CoreToolCallStatus.Error) && "tailToolCallRequest" in coreCall && coreCall.tailToolCallRequest != null) {
|
|
41648
|
+
status = CoreToolCallStatus.Executing;
|
|
41632
41649
|
}
|
|
41633
41650
|
return {
|
|
41634
41651
|
...coreCall,
|
|
@@ -41659,7 +41676,7 @@ function getBackgroundedToolInfo(toolCall) {
|
|
|
41659
41676
|
};
|
|
41660
41677
|
}
|
|
41661
41678
|
function isBackgroundableExecutingToolCall(toolCall) {
|
|
41662
|
-
return toolCall.status ===
|
|
41679
|
+
return toolCall.status === CoreToolCallStatus.Executing && typeof toolCall.pid === "number";
|
|
41663
41680
|
}
|
|
41664
41681
|
function showCitations(settings) {
|
|
41665
41682
|
const enabled = settings.merged.ui.showCitations;
|
|
@@ -41669,14 +41686,14 @@ function showCitations(settings) {
|
|
|
41669
41686
|
return true;
|
|
41670
41687
|
}
|
|
41671
41688
|
function calculateStreamingState(isResponding, toolCalls) {
|
|
41672
|
-
if (toolCalls.some((tc) => tc.status ===
|
|
41689
|
+
if (toolCalls.some((tc) => tc.status === CoreToolCallStatus.AwaitingApproval)) {
|
|
41673
41690
|
return "waiting_for_confirmation" /* WaitingForConfirmation */;
|
|
41674
41691
|
}
|
|
41675
41692
|
const isAnyToolActive = toolCalls.some((tc) => {
|
|
41676
|
-
if (tc.status ===
|
|
41693
|
+
if (tc.status === CoreToolCallStatus.Executing || tc.status === CoreToolCallStatus.Scheduled || tc.status === CoreToolCallStatus.Validating) {
|
|
41677
41694
|
return true;
|
|
41678
41695
|
}
|
|
41679
|
-
if (tc.status ===
|
|
41696
|
+
if (tc.status === CoreToolCallStatus.Success || tc.status === CoreToolCallStatus.Error || tc.status === CoreToolCallStatus.Cancelled) {
|
|
41680
41697
|
return !tc.responseSubmittedToGemini;
|
|
41681
41698
|
}
|
|
41682
41699
|
return false;
|
|
@@ -41729,9 +41746,9 @@ var useGeminiStream = (geminiClient, history, addItem, config, settings, onDebug
|
|
|
41729
41746
|
const handleRetryAttempt = (payload) => {
|
|
41730
41747
|
setRetryStatus(payload);
|
|
41731
41748
|
};
|
|
41732
|
-
coreEvents.on(
|
|
41749
|
+
coreEvents.on(CoreEvent.RetryAttempt, handleRetryAttempt);
|
|
41733
41750
|
return () => {
|
|
41734
|
-
coreEvents.off(
|
|
41751
|
+
coreEvents.off(CoreEvent.RetryAttempt, handleRetryAttempt);
|
|
41735
41752
|
};
|
|
41736
41753
|
}, []);
|
|
41737
41754
|
const [
|
|
@@ -41954,7 +41971,7 @@ var useGeminiStream = (geminiClient, history, addItem, config, settings, onDebug
|
|
|
41954
41971
|
prevActiveShellPtyIdRef.current = activeShellPtyId;
|
|
41955
41972
|
}, [activeShellPtyId, addItem, setIsResponding]);
|
|
41956
41973
|
(0, import_react102.useEffect)(() => {
|
|
41957
|
-
if (config.getApprovalMode() ===
|
|
41974
|
+
if (config.getApprovalMode() === ApprovalMode.YOLO && streamingState === "idle" /* Idle */) {
|
|
41958
41975
|
const lastUserMessageIndex = history.findLastIndex(
|
|
41959
41976
|
(item) => item.type === "user" /* USER */
|
|
41960
41977
|
);
|
|
@@ -42039,7 +42056,7 @@ var useGeminiStream = (geminiClient, history, addItem, config, settings, onDebug
|
|
|
42039
42056
|
if (tool.name === SHELL_COMMAND_NAME) {
|
|
42040
42057
|
return {
|
|
42041
42058
|
...tool,
|
|
42042
|
-
status:
|
|
42059
|
+
status: CoreToolCallStatus.Cancelled,
|
|
42043
42060
|
resultDisplay: tool.resultDisplay
|
|
42044
42061
|
};
|
|
42045
42062
|
}
|
|
@@ -42095,7 +42112,7 @@ var useGeminiStream = (geminiClient, history, addItem, config, settings, onDebug
|
|
|
42095
42112
|
let localQueryToSendToGemini = null;
|
|
42096
42113
|
if (typeof query === "string") {
|
|
42097
42114
|
const trimmedQuery = query.trim();
|
|
42098
|
-
await logger?.logMessage(
|
|
42115
|
+
await logger?.logMessage(MessageSenderType.USER, trimmedQuery);
|
|
42099
42116
|
if (!shellModeActive) {
|
|
42100
42117
|
const slashCommandResult = isSlashCommand(trimmedQuery) ? await handleSlashCommand(trimmedQuery) : false;
|
|
42101
42118
|
if (slashCommandResult) {
|
|
@@ -42251,7 +42268,7 @@ var useGeminiStream = (geminiClient, history, addItem, config, settings, onDebug
|
|
|
42251
42268
|
if (pendingHistoryItemRef.current) {
|
|
42252
42269
|
if (pendingHistoryItemRef.current.type === "tool_group") {
|
|
42253
42270
|
const updatedTools = pendingHistoryItemRef.current.tools.map(
|
|
42254
|
-
(tool) => tool.status ===
|
|
42271
|
+
(tool) => tool.status === CoreToolCallStatus.Validating || tool.status === CoreToolCallStatus.Scheduled || tool.status === CoreToolCallStatus.AwaitingApproval || tool.status === CoreToolCallStatus.Executing ? { ...tool, status: CoreToolCallStatus.Cancelled } : tool
|
|
42255
42272
|
);
|
|
42256
42273
|
const pendingItem = {
|
|
42257
42274
|
...pendingHistoryItemRef.current,
|
|
@@ -42497,15 +42514,15 @@ var useGeminiStream = (geminiClient, history, addItem, config, settings, onDebug
|
|
|
42497
42514
|
let geminiMessageBuffer = "";
|
|
42498
42515
|
const toolCallRequests = [];
|
|
42499
42516
|
for await (const event of stream) {
|
|
42500
|
-
if (event.type !==
|
|
42517
|
+
if (event.type !== GeminiEventType.Thought && thoughtRef.current !== null) {
|
|
42501
42518
|
setThought(null);
|
|
42502
42519
|
}
|
|
42503
42520
|
switch (event.type) {
|
|
42504
|
-
case
|
|
42521
|
+
case GeminiEventType.Thought:
|
|
42505
42522
|
setLastGeminiActivityTime(Date.now());
|
|
42506
42523
|
handleThoughtEvent(event.value, userMessageTimestamp);
|
|
42507
42524
|
break;
|
|
42508
|
-
case
|
|
42525
|
+
case GeminiEventType.Content:
|
|
42509
42526
|
setLastGeminiActivityTime(Date.now());
|
|
42510
42527
|
geminiMessageBuffer = handleContentEvent(
|
|
42511
42528
|
event.value,
|
|
@@ -42513,16 +42530,16 @@ var useGeminiStream = (geminiClient, history, addItem, config, settings, onDebug
|
|
|
42513
42530
|
userMessageTimestamp
|
|
42514
42531
|
);
|
|
42515
42532
|
break;
|
|
42516
|
-
case
|
|
42533
|
+
case GeminiEventType.ToolCallRequest:
|
|
42517
42534
|
toolCallRequests.push(event.value);
|
|
42518
42535
|
break;
|
|
42519
|
-
case
|
|
42536
|
+
case GeminiEventType.UserCancelled:
|
|
42520
42537
|
handleUserCancelledEvent(userMessageTimestamp);
|
|
42521
42538
|
break;
|
|
42522
|
-
case
|
|
42539
|
+
case GeminiEventType.Error:
|
|
42523
42540
|
handleErrorEvent(event.value, userMessageTimestamp);
|
|
42524
42541
|
break;
|
|
42525
|
-
case
|
|
42542
|
+
case GeminiEventType.AgentExecutionStopped:
|
|
42526
42543
|
handleAgentExecutionStoppedEvent(
|
|
42527
42544
|
event.value.reason,
|
|
42528
42545
|
userMessageTimestamp,
|
|
@@ -42530,7 +42547,7 @@ var useGeminiStream = (geminiClient, history, addItem, config, settings, onDebug
|
|
|
42530
42547
|
event.value.contextCleared
|
|
42531
42548
|
);
|
|
42532
42549
|
break;
|
|
42533
|
-
case
|
|
42550
|
+
case GeminiEventType.AgentExecutionBlocked:
|
|
42534
42551
|
handleAgentExecutionBlockedEvent(
|
|
42535
42552
|
event.value.reason,
|
|
42536
42553
|
userMessageTimestamp,
|
|
@@ -42538,35 +42555,35 @@ var useGeminiStream = (geminiClient, history, addItem, config, settings, onDebug
|
|
|
42538
42555
|
event.value.contextCleared
|
|
42539
42556
|
);
|
|
42540
42557
|
break;
|
|
42541
|
-
case
|
|
42558
|
+
case GeminiEventType.ChatCompressed:
|
|
42542
42559
|
handleChatCompressionEvent(event.value, userMessageTimestamp);
|
|
42543
42560
|
break;
|
|
42544
|
-
case
|
|
42545
|
-
case
|
|
42561
|
+
case GeminiEventType.ToolCallConfirmation:
|
|
42562
|
+
case GeminiEventType.ToolCallResponse:
|
|
42546
42563
|
break;
|
|
42547
|
-
case
|
|
42564
|
+
case GeminiEventType.MaxSessionTurns:
|
|
42548
42565
|
handleMaxSessionTurnsEvent();
|
|
42549
42566
|
break;
|
|
42550
|
-
case
|
|
42567
|
+
case GeminiEventType.ContextWindowWillOverflow:
|
|
42551
42568
|
handleContextWindowWillOverflowEvent(
|
|
42552
42569
|
event.value.estimatedRequestTokenCount,
|
|
42553
42570
|
event.value.remainingTokenCount
|
|
42554
42571
|
);
|
|
42555
42572
|
break;
|
|
42556
|
-
case
|
|
42573
|
+
case GeminiEventType.Finished:
|
|
42557
42574
|
handleFinishedEvent(event, userMessageTimestamp);
|
|
42558
42575
|
break;
|
|
42559
|
-
case
|
|
42576
|
+
case GeminiEventType.Citation:
|
|
42560
42577
|
handleCitationEvent(event.value, userMessageTimestamp);
|
|
42561
42578
|
break;
|
|
42562
|
-
case
|
|
42579
|
+
case GeminiEventType.ModelInfo:
|
|
42563
42580
|
handleChatModelEvent(event.value, userMessageTimestamp);
|
|
42564
42581
|
break;
|
|
42565
|
-
case
|
|
42582
|
+
case GeminiEventType.LoopDetected:
|
|
42566
42583
|
loopDetectedRef.current = true;
|
|
42567
42584
|
break;
|
|
42568
|
-
case
|
|
42569
|
-
case
|
|
42585
|
+
case GeminiEventType.Retry:
|
|
42586
|
+
case GeminiEventType.InvalidStream:
|
|
42570
42587
|
break;
|
|
42571
42588
|
default: {
|
|
42572
42589
|
const unreachable = event;
|
|
@@ -42607,7 +42624,7 @@ var useGeminiStream = (geminiClient, history, addItem, config, settings, onDebug
|
|
|
42607
42624
|
const submitQuery = (0, import_react102.useCallback)(
|
|
42608
42625
|
async (query, options, prompt_id) => runInDevTraceSpan(
|
|
42609
42626
|
{
|
|
42610
|
-
operation: options?.isContinuation ?
|
|
42627
|
+
operation: options?.isContinuation ? GeminiCliOperation.SystemPrompt : GeminiCliOperation.UserPrompt
|
|
42611
42628
|
},
|
|
42612
42629
|
async ({ metadata: spanMetadata }) => {
|
|
42613
42630
|
spanMetadata.input = query;
|
|
@@ -42766,7 +42783,7 @@ var useGeminiStream = (geminiClient, history, addItem, config, settings, onDebug
|
|
|
42766
42783
|
);
|
|
42767
42784
|
const handleApprovalModeChange = (0, import_react102.useCallback)(
|
|
42768
42785
|
async (newApprovalMode) => {
|
|
42769
|
-
if (previousApprovalModeRef.current ===
|
|
42786
|
+
if (previousApprovalModeRef.current === ApprovalMode.PLAN && newApprovalMode !== ApprovalMode.PLAN && streamingState === "idle" /* Idle */) {
|
|
42770
42787
|
if (geminiClient) {
|
|
42771
42788
|
try {
|
|
42772
42789
|
await geminiClient.addHistory({
|
|
@@ -42789,11 +42806,11 @@ var useGeminiStream = (geminiClient, history, addItem, config, settings, onDebug
|
|
|
42789
42806
|
}
|
|
42790
42807
|
}
|
|
42791
42808
|
previousApprovalModeRef.current = newApprovalMode;
|
|
42792
|
-
if (newApprovalMode ===
|
|
42809
|
+
if (newApprovalMode === ApprovalMode.YOLO || newApprovalMode === ApprovalMode.AUTO_EDIT) {
|
|
42793
42810
|
let awaitingApprovalCalls = toolCalls.filter(
|
|
42794
42811
|
(call) => call.status === "awaiting_approval"
|
|
42795
42812
|
);
|
|
42796
|
-
if (newApprovalMode ===
|
|
42813
|
+
if (newApprovalMode === ApprovalMode.AUTO_EDIT) {
|
|
42797
42814
|
awaitingApprovalCalls = awaitingApprovalCalls.filter(
|
|
42798
42815
|
(call) => EDIT_TOOL_NAMES.has(call.request.name)
|
|
42799
42816
|
);
|
|
@@ -42802,11 +42819,11 @@ var useGeminiStream = (geminiClient, history, addItem, config, settings, onDebug
|
|
|
42802
42819
|
if (call.correlationId) {
|
|
42803
42820
|
try {
|
|
42804
42821
|
await config.getMessageBus().publish({
|
|
42805
|
-
type:
|
|
42822
|
+
type: MessageBusType.TOOL_CONFIRMATION_RESPONSE,
|
|
42806
42823
|
correlationId: call.correlationId,
|
|
42807
42824
|
confirmed: true,
|
|
42808
42825
|
requiresUserConfirmation: false,
|
|
42809
|
-
outcome:
|
|
42826
|
+
outcome: ToolConfirmationOutcome.ProceedOnce
|
|
42810
42827
|
});
|
|
42811
42828
|
} catch (error) {
|
|
42812
42829
|
debugLogger.warn(
|
|
@@ -42862,14 +42879,14 @@ var useGeminiStream = (geminiClient, history, addItem, config, settings, onDebug
|
|
|
42862
42879
|
);
|
|
42863
42880
|
if (isLowErrorVerbosity) {
|
|
42864
42881
|
suppressedToolErrorCountRef.current += geminiTools.filter(
|
|
42865
|
-
(tc) => tc.status ===
|
|
42882
|
+
(tc) => tc.status === CoreToolCallStatus.Error
|
|
42866
42883
|
).length;
|
|
42867
42884
|
}
|
|
42868
42885
|
if (geminiTools.length === 0) {
|
|
42869
42886
|
return;
|
|
42870
42887
|
}
|
|
42871
42888
|
const stopExecutionTool = geminiTools.find(
|
|
42872
|
-
(tc) => tc.response.errorType ===
|
|
42889
|
+
(tc) => tc.response.errorType === ToolErrorType.STOP_EXECUTION
|
|
42873
42890
|
);
|
|
42874
42891
|
if (stopExecutionTool && stopExecutionTool.response.error) {
|
|
42875
42892
|
maybeAddSuppressedToolErrorNote();
|
|
@@ -42886,7 +42903,7 @@ var useGeminiStream = (geminiClient, history, addItem, config, settings, onDebug
|
|
|
42886
42903
|
return;
|
|
42887
42904
|
}
|
|
42888
42905
|
const allToolsCancelled = geminiTools.every(
|
|
42889
|
-
(tc) => tc.status ===
|
|
42906
|
+
(tc) => tc.status === CoreToolCallStatus.Cancelled
|
|
42890
42907
|
);
|
|
42891
42908
|
if (allToolsCancelled) {
|
|
42892
42909
|
if (!turnCancelledRef.current) {
|
|
@@ -42968,7 +42985,7 @@ var useGeminiStream = (geminiClient, history, addItem, config, settings, onDebug
|
|
|
42968
42985
|
return;
|
|
42969
42986
|
}
|
|
42970
42987
|
const restorableToolCalls = toolCalls.filter(
|
|
42971
|
-
(toolCall) => EDIT_TOOL_NAMES.has(toolCall.request.name) && toolCall.status ===
|
|
42988
|
+
(toolCall) => EDIT_TOOL_NAMES.has(toolCall.request.name) && toolCall.status === CoreToolCallStatus.AwaitingApproval
|
|
42972
42989
|
);
|
|
42973
42990
|
if (restorableToolCalls.length > 0) {
|
|
42974
42991
|
if (!gitService) {
|
|
@@ -45429,7 +45446,7 @@ function useMessageQueue({
|
|
|
45429
45446
|
var import_react109 = __toESM(require_react(), 1);
|
|
45430
45447
|
function useMcpStatus(config) {
|
|
45431
45448
|
const [discoveryState, setDiscoveryState] = (0, import_react109.useState)(
|
|
45432
|
-
() => config.getMcpClientManager()?.getDiscoveryState() ??
|
|
45449
|
+
() => config.getMcpClientManager()?.getDiscoveryState() ?? MCPDiscoveryState.NOT_STARTED
|
|
45433
45450
|
);
|
|
45434
45451
|
const [mcpServerCount, setMcpServerCount] = (0, import_react109.useState)(
|
|
45435
45452
|
() => config.getMcpClientManager()?.getMcpServerCount() ?? 0
|
|
@@ -45442,12 +45459,12 @@ function useMcpStatus(config) {
|
|
|
45442
45459
|
setMcpServerCount(manager.getMcpServerCount());
|
|
45443
45460
|
}
|
|
45444
45461
|
};
|
|
45445
|
-
coreEvents.on(
|
|
45462
|
+
coreEvents.on(CoreEvent.McpClientUpdate, onChange);
|
|
45446
45463
|
return () => {
|
|
45447
|
-
coreEvents.off(
|
|
45464
|
+
coreEvents.off(CoreEvent.McpClientUpdate, onChange);
|
|
45448
45465
|
};
|
|
45449
45466
|
}, [config]);
|
|
45450
|
-
const isMcpReady = discoveryState ===
|
|
45467
|
+
const isMcpReady = discoveryState === MCPDiscoveryState.COMPLETED || discoveryState === MCPDiscoveryState.NOT_STARTED && mcpServerCount === 0;
|
|
45451
45468
|
return {
|
|
45452
45469
|
discoveryState,
|
|
45453
45470
|
mcpServerCount,
|
|
@@ -45474,7 +45491,7 @@ function useApprovalModeIndicator({
|
|
|
45474
45491
|
(key) => {
|
|
45475
45492
|
let nextApprovalMode;
|
|
45476
45493
|
if (keyMatchers["app.toggleYolo" /* TOGGLE_YOLO */](key)) {
|
|
45477
|
-
if (config.isYoloModeDisabled() && config.getApprovalMode() !==
|
|
45494
|
+
if (config.isYoloModeDisabled() && config.getApprovalMode() !== ApprovalMode.YOLO) {
|
|
45478
45495
|
if (addItem) {
|
|
45479
45496
|
let text = "You cannot enter YOLO mode since it is disabled in your settings.";
|
|
45480
45497
|
const adminSettings = config.getRemoteAdminSettings();
|
|
@@ -45492,21 +45509,21 @@ function useApprovalModeIndicator({
|
|
|
45492
45509
|
}
|
|
45493
45510
|
return;
|
|
45494
45511
|
}
|
|
45495
|
-
nextApprovalMode = config.getApprovalMode() ===
|
|
45512
|
+
nextApprovalMode = config.getApprovalMode() === ApprovalMode.YOLO ? ApprovalMode.DEFAULT : ApprovalMode.YOLO;
|
|
45496
45513
|
} else if (keyMatchers["app.cycleApprovalMode" /* CYCLE_APPROVAL_MODE */](key)) {
|
|
45497
45514
|
const currentMode = config.getApprovalMode();
|
|
45498
45515
|
switch (currentMode) {
|
|
45499
|
-
case
|
|
45500
|
-
nextApprovalMode =
|
|
45516
|
+
case ApprovalMode.DEFAULT:
|
|
45517
|
+
nextApprovalMode = ApprovalMode.AUTO_EDIT;
|
|
45501
45518
|
break;
|
|
45502
|
-
case
|
|
45503
|
-
nextApprovalMode = allowPlanMode ?
|
|
45519
|
+
case ApprovalMode.AUTO_EDIT:
|
|
45520
|
+
nextApprovalMode = allowPlanMode ? ApprovalMode.PLAN : ApprovalMode.DEFAULT;
|
|
45504
45521
|
break;
|
|
45505
|
-
case
|
|
45506
|
-
nextApprovalMode =
|
|
45522
|
+
case ApprovalMode.PLAN:
|
|
45523
|
+
nextApprovalMode = ApprovalMode.DEFAULT;
|
|
45507
45524
|
break;
|
|
45508
|
-
case
|
|
45509
|
-
nextApprovalMode =
|
|
45525
|
+
case ApprovalMode.YOLO:
|
|
45526
|
+
nextApprovalMode = ApprovalMode.AUTO_EDIT;
|
|
45510
45527
|
break;
|
|
45511
45528
|
default:
|
|
45512
45529
|
}
|
|
@@ -45898,11 +45915,11 @@ var useHookDisplayState = () => {
|
|
|
45898
45915
|
removeHook();
|
|
45899
45916
|
}
|
|
45900
45917
|
};
|
|
45901
|
-
coreEvents.on(
|
|
45902
|
-
coreEvents.on(
|
|
45918
|
+
coreEvents.on(CoreEvent.HookStart, handleHookStart);
|
|
45919
|
+
coreEvents.on(CoreEvent.HookEnd, handleHookEnd);
|
|
45903
45920
|
return () => {
|
|
45904
|
-
coreEvents.off(
|
|
45905
|
-
coreEvents.off(
|
|
45921
|
+
coreEvents.off(CoreEvent.HookStart, handleHookStart);
|
|
45922
|
+
coreEvents.off(CoreEvent.HookEnd, handleHookEnd);
|
|
45906
45923
|
activeTimeouts.forEach(clearTimeout);
|
|
45907
45924
|
activeTimeouts.clear();
|
|
45908
45925
|
};
|
|
@@ -46550,7 +46567,7 @@ function isToolExecuting(pendingHistoryItems) {
|
|
|
46550
46567
|
return pendingHistoryItems.some((item) => {
|
|
46551
46568
|
if (item && item.type === "tool_group") {
|
|
46552
46569
|
return item.tools.some(
|
|
46553
|
-
(tool) =>
|
|
46570
|
+
(tool) => CoreToolCallStatus.Executing === tool.status
|
|
46554
46571
|
);
|
|
46555
46572
|
}
|
|
46556
46573
|
return false;
|
|
@@ -46559,7 +46576,7 @@ function isToolExecuting(pendingHistoryItems) {
|
|
|
46559
46576
|
function isToolAwaitingConfirmation(pendingHistoryItems) {
|
|
46560
46577
|
return pendingHistoryItems.filter((item) => item.type === "tool_group").some(
|
|
46561
46578
|
(item) => item.tools.some(
|
|
46562
|
-
(tool) =>
|
|
46579
|
+
(tool) => CoreToolCallStatus.AwaitingApproval === tool.status
|
|
46563
46580
|
)
|
|
46564
46581
|
);
|
|
46565
46582
|
}
|
|
@@ -46717,7 +46734,7 @@ var AppContainer = (props) => {
|
|
|
46717
46734
|
}
|
|
46718
46735
|
setConfigInitialized(true);
|
|
46719
46736
|
startupProfiler.flush(config);
|
|
46720
|
-
const sessionStartSource = resumedSessionData ?
|
|
46737
|
+
const sessionStartSource = resumedSessionData ? SessionStartSource.Resume : SessionStartSource.Startup;
|
|
46721
46738
|
const result = await config.getHookSystem()?.fireSessionStartEvent(sessionStartSource);
|
|
46722
46739
|
if (result) {
|
|
46723
46740
|
if (result.systemMessage) {
|
|
@@ -46753,7 +46770,7 @@ var AppContainer = (props) => {
|
|
|
46753
46770
|
);
|
|
46754
46771
|
const ideClient = await IdeClient.getInstance();
|
|
46755
46772
|
await ideClient.disconnect();
|
|
46756
|
-
await config?.getHookSystem()?.fireSessionEndEvent(
|
|
46773
|
+
await config?.getHookSystem()?.fireSessionEndEvent(SessionEndReason.Exit);
|
|
46757
46774
|
});
|
|
46758
46775
|
}, [config, resumedSessionData]);
|
|
46759
46776
|
(0, import_react123.useEffect)(
|
|
@@ -46771,11 +46788,11 @@ var AppContainer = (props) => {
|
|
|
46771
46788
|
resetTime: payload.resetTime
|
|
46772
46789
|
});
|
|
46773
46790
|
};
|
|
46774
|
-
coreEvents.on(
|
|
46775
|
-
coreEvents.on(
|
|
46791
|
+
coreEvents.on(CoreEvent.ModelChanged, handleModelChanged);
|
|
46792
|
+
coreEvents.on(CoreEvent.QuotaChanged, handleQuotaChanged);
|
|
46776
46793
|
return () => {
|
|
46777
|
-
coreEvents.off(
|
|
46778
|
-
coreEvents.off(
|
|
46794
|
+
coreEvents.off(CoreEvent.ModelChanged, handleModelChanged);
|
|
46795
|
+
coreEvents.off(CoreEvent.QuotaChanged, handleQuotaChanged);
|
|
46779
46796
|
};
|
|
46780
46797
|
}, [config]);
|
|
46781
46798
|
(0, import_react123.useEffect)(() => {
|
|
@@ -46788,16 +46805,16 @@ var AppContainer = (props) => {
|
|
|
46788
46805
|
const handleAgentsDiscovered = (payload) => {
|
|
46789
46806
|
setNewAgents(payload.agents);
|
|
46790
46807
|
};
|
|
46791
|
-
coreEvents.on(
|
|
46792
|
-
coreEvents.on(
|
|
46793
|
-
coreEvents.on(
|
|
46808
|
+
coreEvents.on(CoreEvent.SettingsChanged, handleSettingsChanged);
|
|
46809
|
+
coreEvents.on(CoreEvent.AdminSettingsChanged, handleAdminSettingsChanged);
|
|
46810
|
+
coreEvents.on(CoreEvent.AgentsDiscovered, handleAgentsDiscovered);
|
|
46794
46811
|
return () => {
|
|
46795
|
-
coreEvents.off(
|
|
46812
|
+
coreEvents.off(CoreEvent.SettingsChanged, handleSettingsChanged);
|
|
46796
46813
|
coreEvents.off(
|
|
46797
|
-
|
|
46814
|
+
CoreEvent.AdminSettingsChanged,
|
|
46798
46815
|
handleAdminSettingsChanged
|
|
46799
46816
|
);
|
|
46800
|
-
coreEvents.off(
|
|
46817
|
+
coreEvents.off(CoreEvent.AgentsDiscovered, handleAgentsDiscovered);
|
|
46801
46818
|
};
|
|
46802
46819
|
}, [settings]);
|
|
46803
46820
|
const { consoleMessages, clearConsoleMessages: clearConsoleMessagesState } = useConsoleMessages();
|
|
@@ -46863,11 +46880,11 @@ var AppContainer = (props) => {
|
|
|
46863
46880
|
exitEditorDialog
|
|
46864
46881
|
} = useEditorSettings(settings, setEditorError, historyManager.addItem);
|
|
46865
46882
|
(0, import_react123.useEffect)(() => {
|
|
46866
|
-
coreEvents.on(
|
|
46867
|
-
coreEvents.on(
|
|
46883
|
+
coreEvents.on(CoreEvent.ExternalEditorClosed, handleEditorClose);
|
|
46884
|
+
coreEvents.on(CoreEvent.RequestEditorSelection, openEditorDialog);
|
|
46868
46885
|
return () => {
|
|
46869
|
-
coreEvents.off(
|
|
46870
|
-
coreEvents.off(
|
|
46886
|
+
coreEvents.off(CoreEvent.ExternalEditorClosed, handleEditorClose);
|
|
46887
|
+
coreEvents.off(CoreEvent.RequestEditorSelection, openEditorDialog);
|
|
46871
46888
|
};
|
|
46872
46889
|
}, [handleEditorClose, openEditorDialog]);
|
|
46873
46890
|
(0, import_react123.useEffect)(() => {
|
|
@@ -46963,7 +46980,7 @@ var AppContainer = (props) => {
|
|
|
46963
46980
|
async (authType, scope) => {
|
|
46964
46981
|
if (authType) {
|
|
46965
46982
|
const previousAuthType = config.getContentGeneratorConfig()?.authType ?? "unknown";
|
|
46966
|
-
if (authType ===
|
|
46983
|
+
if (authType === AuthType.LOGIN_WITH_GOOGLE) {
|
|
46967
46984
|
setAuthContext({ requiresRestart: true });
|
|
46968
46985
|
} else {
|
|
46969
46986
|
setAuthContext({});
|
|
@@ -46991,7 +47008,7 @@ var AppContainer = (props) => {
|
|
|
46991
47008
|
);
|
|
46992
47009
|
return;
|
|
46993
47010
|
}
|
|
46994
|
-
if (authType ===
|
|
47011
|
+
if (authType === AuthType.LOGIN_WITH_GOOGLE && config.isBrowserLaunchSuppressed()) {
|
|
46995
47012
|
writeToStdout(`
|
|
46996
47013
|
----------------------------------------------------------------
|
|
46997
47014
|
Logging in with Google... Restarting Gemini CLI to continue.
|
|
@@ -47016,7 +47033,7 @@ Logging in with Google... Restarting Gemini CLI to continue.
|
|
|
47016
47033
|
}
|
|
47017
47034
|
await saveApiKey(apiKey);
|
|
47018
47035
|
await reloadApiKey();
|
|
47019
|
-
await config.refreshAuth(
|
|
47036
|
+
await config.refreshAuth(AuthType.USE_GEMINI);
|
|
47020
47037
|
setAuthState("authenticated" /* Authenticated */);
|
|
47021
47038
|
} catch (e) {
|
|
47022
47039
|
onAuthError(
|
|
@@ -47041,7 +47058,7 @@ Logging in with Google... Restarting Gemini CLI to continue.
|
|
|
47041
47058
|
`Authentication is enforced to be ${settings.merged.security.auth.enforcedType}, but you are currently using ${settings.merged.security.auth.selectedType}.`
|
|
47042
47059
|
);
|
|
47043
47060
|
} else if (settings.merged.security.auth.selectedType && !settings.merged.security.auth.useExternal) {
|
|
47044
|
-
if (settings.merged.security.auth.selectedType ===
|
|
47061
|
+
if (settings.merged.security.auth.selectedType === AuthType.USE_GEMINI) {
|
|
47045
47062
|
return;
|
|
47046
47063
|
}
|
|
47047
47064
|
const error = validateAuthMethod(
|
|
@@ -47160,9 +47177,9 @@ Logging in with Google... Restarting Gemini CLI to continue.
|
|
|
47160
47177
|
}
|
|
47161
47178
|
});
|
|
47162
47179
|
};
|
|
47163
|
-
coreEvents.on(
|
|
47180
|
+
coreEvents.on(CoreEvent.ConsentRequest, handleConsentRequest);
|
|
47164
47181
|
return () => {
|
|
47165
|
-
coreEvents.off(
|
|
47182
|
+
coreEvents.off(CoreEvent.ConsentRequest, handleConsentRequest);
|
|
47166
47183
|
};
|
|
47167
47184
|
}, []);
|
|
47168
47185
|
const performMemoryRefresh = (0, import_react123.useCallback)(async () => {
|
|
@@ -47749,7 +47766,7 @@ ${queuedText}` : queuedText;
|
|
|
47749
47766
|
if (keyMatchers["app.showErrorDetails" /* SHOW_ERROR_DETAILS */](key)) {
|
|
47750
47767
|
if (settings.merged.general.devtools) {
|
|
47751
47768
|
void (async () => {
|
|
47752
|
-
const { toggleDevToolsPanel } = await import("./devtoolsService-
|
|
47769
|
+
const { toggleDevToolsPanel } = await import("./devtoolsService-XMVPJFZ7.js");
|
|
47753
47770
|
await toggleDevToolsPanel(
|
|
47754
47771
|
config,
|
|
47755
47772
|
showErrorDetails,
|
|
@@ -47950,10 +47967,10 @@ ${queuedText}` : queuedText;
|
|
|
47950
47967
|
);
|
|
47951
47968
|
}
|
|
47952
47969
|
};
|
|
47953
|
-
coreEvents.on(
|
|
47970
|
+
coreEvents.on(CoreEvent.UserFeedback, handleUserFeedback);
|
|
47954
47971
|
coreEvents.drainBacklogs();
|
|
47955
47972
|
return () => {
|
|
47956
|
-
coreEvents.off(
|
|
47973
|
+
coreEvents.off(CoreEvent.UserFeedback, handleUserFeedback);
|
|
47957
47974
|
};
|
|
47958
47975
|
}, [historyManager]);
|
|
47959
47976
|
const filteredConsoleMessages = (0, import_react123.useMemo)(() => {
|
|
@@ -48043,9 +48060,9 @@ ${queuedText}` : queuedText;
|
|
|
48043
48060
|
const handleMemoryChanged = (result) => {
|
|
48044
48061
|
setGeminiMdFileCount(result.fileCount);
|
|
48045
48062
|
};
|
|
48046
|
-
coreEvents.on(
|
|
48063
|
+
coreEvents.on(CoreEvent.MemoryChanged, handleMemoryChanged);
|
|
48047
48064
|
return () => {
|
|
48048
|
-
coreEvents.off(
|
|
48065
|
+
coreEvents.off(CoreEvent.MemoryChanged, handleMemoryChanged);
|
|
48049
48066
|
};
|
|
48050
48067
|
}, []);
|
|
48051
48068
|
(0, import_react123.useEffect)(() => {
|