@google/gemini-cli 0.41.0-preview.0 → 0.41.0-preview.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/bundle/{chunk-NQUBPNAU.js → chunk-36LZQV4W.js} +6 -6
- package/bundle/{chunk-EOA2HX63.js → chunk-45OGXTFK.js} +2 -2
- package/bundle/{chunk-HR7I3HEY.js → chunk-5QI3ZXQB.js} +1 -1
- package/bundle/{chunk-WYBLOXVK.js → chunk-5Z2T77EB.js} +1 -1
- package/bundle/{chunk-WSDOIL74.js → chunk-6NFVEILC.js} +73 -38
- package/bundle/{chunk-MJJLAQ6U.js → chunk-C5CRFFTY.js} +1 -1
- package/bundle/{chunk-IEYJEBJX.js → chunk-DAEE6Y5T.js} +67 -54
- package/bundle/{chunk-JC6VKC3C.js → chunk-DCHOW6BK.js} +1 -1
- package/bundle/{chunk-FZCJQ7YB.js → chunk-DOHALVIP.js} +6 -6
- package/bundle/{chunk-PXLG652S.js → chunk-EQSLZT5Z.js} +95 -47
- package/bundle/chunk-FFVUMIL3.js +80034 -0
- package/bundle/{chunk-MVAX27IS.js → chunk-KCDF3RDO.js} +3 -3
- package/bundle/{chunk-YBG43HPA.js → chunk-KJ4M7JXR.js} +1 -1
- package/bundle/{chunk-X2LHBPEJ.js → chunk-NGB7ZVQL.js} +14 -12
- package/bundle/{chunk-42DYHGPE.js → chunk-QRSHDIRX.js} +1 -1
- package/bundle/{chunk-WROAWEH3.js → chunk-QY23ZEK3.js} +6728 -12460
- package/bundle/{chunk-BKZ2ONXI.js → chunk-R4LSW45D.js} +1 -1
- package/bundle/chunk-T5I4M6M4.js +118 -0
- package/bundle/{chunk-3ANRVMZF.js → chunk-TBBDQEFQ.js} +2 -2
- package/bundle/{chunk-LAT5YFL4.js → chunk-U6WUS35U.js} +2 -2
- package/bundle/chunk-VJ6K3S57.js +156 -0
- package/bundle/chunk-VLSVN2FJ.js +1571 -0
- package/bundle/chunk-VWYB6GSK.js +17656 -0
- package/bundle/chunk-XO6NKGWV.js +354496 -0
- package/bundle/{cleanup-KLFDN77S.js → cleanup-3COTQVPP.js} +2 -2
- package/bundle/{cleanup-UES5UWIG.js → cleanup-FIE6MCAE.js} +2 -2
- package/bundle/{cleanup-Z4RYESBA.js → cleanup-PREOBLFK.js} +3 -3
- package/bundle/cleanup-YY2EUT56.js +33 -0
- package/bundle/{core-Q32MZ3QF.js → core-GZOFEER4.js} +1 -1
- package/bundle/{devtoolsService-ZDMUH5GA.js → devtoolsService-DV36S632.js} +2 -2
- package/bundle/{devtoolsService-N3SEUDJ7.js → devtoolsService-JPBL5I7F.js} +5 -4
- package/bundle/devtoolsService-M4LZEBZD.js +857 -0
- package/bundle/{devtoolsService-P5BXPJX5.js → devtoolsService-QXOHXSMJ.js} +2 -2
- package/bundle/{dist-UL5N47TA.js → dist-HASTHPE3.js} +1 -1
- package/bundle/{core-3W43VO4W.js → dist-JVRDP7SO.js} +2 -2
- package/bundle/dist-NSJ6AA4L.js +2068 -0
- package/bundle/{gemini-K6LJN552.js → gemini-FTUVOUHP.js} +11 -11
- package/bundle/{gemini-PL45Y473.js → gemini-IGRTXHCM.js} +11 -11
- package/bundle/{gemini-DGVTFOIS.js → gemini-KIM7O55W.js} +191 -175
- package/bundle/gemini-SFFHSCEY.js +15988 -0
- package/bundle/gemini.js +3 -3
- package/bundle/{interactiveCli-O7Y36MPM.js → interactiveCli-7HPLINVC.js} +6 -6
- package/bundle/{interactiveCli-ZJGQKU2Z.js → interactiveCli-JOX7MFFH.js} +6 -6
- package/bundle/{interactiveCli-JL5IXH2I.js → interactiveCli-K4FIT7TA.js} +290 -272
- package/bundle/interactiveCli-LTPR447O.js +35052 -0
- package/bundle/{liteRtServerManager-QGTT3QOY.js → liteRtServerManager-BENLLSF2.js} +3 -3
- package/bundle/{liteRtServerManager-2LAXDWUG.js → liteRtServerManager-KDO6UAQ5.js} +4 -4
- package/bundle/liteRtServerManager-MQIQXXZQ.js +65 -0
- package/bundle/{liteRtServerManager-YCLQ2VZR.js → liteRtServerManager-VGYEHFUE.js} +3 -3
- package/bundle/node_modules/@google/gemini-cli-devtools/package.json +1 -1
- package/bundle/{oauth2-provider-ZUEDS4RO.js → oauth2-provider-EWMNT6D6.js} +1 -1
- package/bundle/{oauth2-provider-Q5QVFX4W.js → oauth2-provider-JPCBTTS2.js} +1 -1
- package/bundle/{oauth2-provider-RR3PO6KR.js → oauth2-provider-M3WV4GJM.js} +39 -73
- package/bundle/oauth2-provider-UVXCM7G3.js +237 -0
- package/bundle/{start-P6O7G2IY.js → start-4MSISK2E.js} +5 -5
- package/bundle/{start-6ZXD64J4.js → start-ATOE57Z4.js} +6 -6
- package/bundle/start-AVEON6UU.js +18 -0
- package/bundle/{start-V4W5V2EL.js → start-KBB2UTE5.js} +5 -5
- package/package.json +1 -1
|
@@ -152,13 +152,13 @@ import {
|
|
|
152
152
|
widestLineFromStyledChars,
|
|
153
153
|
wordBreakStyledChars,
|
|
154
154
|
wrapStyledChars
|
|
155
|
-
} from "./chunk-
|
|
155
|
+
} from "./chunk-36LZQV4W.js";
|
|
156
156
|
import {
|
|
157
157
|
appEvents
|
|
158
158
|
} from "./chunk-5PS3AYFU.js";
|
|
159
159
|
import {
|
|
160
160
|
require_source
|
|
161
|
-
} from "./chunk-
|
|
161
|
+
} from "./chunk-QRSHDIRX.js";
|
|
162
162
|
import {
|
|
163
163
|
ACTIVE_SHELL_MAX_LINES,
|
|
164
164
|
COMPACT_TOOL_SUBVIEW_MAX_LINES,
|
|
@@ -211,19 +211,21 @@ import {
|
|
|
211
211
|
stringWidth,
|
|
212
212
|
stripUnsafeCharacters,
|
|
213
213
|
toCodePoints
|
|
214
|
-
} from "./chunk-
|
|
214
|
+
} from "./chunk-VWYB6GSK.js";
|
|
215
215
|
import {
|
|
216
216
|
registerCleanup,
|
|
217
217
|
removeCleanup,
|
|
218
218
|
runExitCleanup,
|
|
219
219
|
setupTtyCheck
|
|
220
|
-
} from "./chunk-
|
|
220
|
+
} from "./chunk-VJ6K3S57.js";
|
|
221
221
|
import {
|
|
222
222
|
ApiKeyUpdatedEvent,
|
|
223
223
|
AsyncFzf,
|
|
224
224
|
AudioRecorder,
|
|
225
225
|
AuthType,
|
|
226
|
+
CompressionStatus,
|
|
226
227
|
ConversationFinishedEvent,
|
|
228
|
+
CoreToolCallStatus,
|
|
227
229
|
CreditPurchaseClickEvent,
|
|
228
230
|
EDITOR_DISPLAY_NAMES,
|
|
229
231
|
EmptyWalletMenuShownEvent,
|
|
@@ -233,11 +235,16 @@ import {
|
|
|
233
235
|
FileSearchFactory,
|
|
234
236
|
FolderTrustDiscoveryService,
|
|
235
237
|
G1_UTM_CAMPAIGNS,
|
|
238
|
+
GeminiCliOperation,
|
|
239
|
+
GeminiEventType,
|
|
236
240
|
GitService,
|
|
237
241
|
IdeClient,
|
|
238
242
|
LegacyAgentProtocol,
|
|
239
243
|
LlmRole,
|
|
240
244
|
Logger,
|
|
245
|
+
MCPDiscoveryState,
|
|
246
|
+
MCPServerStatus,
|
|
247
|
+
MessageSenderType,
|
|
241
248
|
ModelNotFoundError,
|
|
242
249
|
ModelSlashCommandEvent,
|
|
243
250
|
OverageMenuShownEvent,
|
|
@@ -246,14 +253,18 @@ import {
|
|
|
246
253
|
ProjectIdRequiredError,
|
|
247
254
|
ROOT_SCHEDULER_ID,
|
|
248
255
|
Scheduler,
|
|
256
|
+
SessionEndReason,
|
|
257
|
+
SessionStartSource,
|
|
249
258
|
ShellExecutionService,
|
|
250
259
|
SlashCommandStatus,
|
|
251
260
|
TerminalQuotaError,
|
|
252
261
|
TranscriptionFactory,
|
|
262
|
+
TrustLevel,
|
|
253
263
|
UserAccountManager,
|
|
254
264
|
UserPromptEvent,
|
|
255
265
|
UserTierId,
|
|
256
266
|
ValidationRequiredError,
|
|
267
|
+
WarningPriority,
|
|
257
268
|
WhisperModelManager,
|
|
258
269
|
addMCPStatusChangeListener,
|
|
259
270
|
allowEditorTypeInSandbox,
|
|
@@ -338,11 +349,13 @@ import {
|
|
|
338
349
|
validatePlanContent,
|
|
339
350
|
validatePlanPath,
|
|
340
351
|
writeToStdout
|
|
341
|
-
} from "./chunk-
|
|
352
|
+
} from "./chunk-QY23ZEK3.js";
|
|
342
353
|
import {
|
|
343
354
|
ACTIVATE_SKILL_TOOL_NAME,
|
|
344
355
|
AGENT_TOOL_NAME,
|
|
356
|
+
ApprovalMode,
|
|
345
357
|
ChangeAuthRequestedError,
|
|
358
|
+
CoreEvent,
|
|
346
359
|
DEFAULT_GEMINI_FLASH_LITE_MODEL,
|
|
347
360
|
DEFAULT_GEMINI_FLASH_MODEL,
|
|
348
361
|
DEFAULT_GEMINI_MODEL,
|
|
@@ -355,13 +368,16 @@ import {
|
|
|
355
368
|
GEMMA_4_31B_IT_MODEL,
|
|
356
369
|
GLOB_DISPLAY_NAME,
|
|
357
370
|
GREP_DISPLAY_NAME,
|
|
371
|
+
Kind,
|
|
358
372
|
LS_DISPLAY_NAME,
|
|
373
|
+
MessageBusType,
|
|
359
374
|
PREVIEW_GEMINI_3_1_CUSTOM_TOOLS_MODEL,
|
|
360
375
|
PREVIEW_GEMINI_3_1_FLASH_LITE_MODEL,
|
|
361
376
|
PREVIEW_GEMINI_3_1_MODEL,
|
|
362
377
|
PREVIEW_GEMINI_FLASH_MODEL,
|
|
363
378
|
PREVIEW_GEMINI_MODEL,
|
|
364
379
|
PREVIEW_GEMINI_MODEL_AUTO,
|
|
380
|
+
QuestionType,
|
|
365
381
|
READ_FILE_DISPLAY_NAME,
|
|
366
382
|
READ_MANY_FILES_DISPLAY_NAME,
|
|
367
383
|
SHELL_TOOL_NAME,
|
|
@@ -369,6 +385,8 @@ import {
|
|
|
369
385
|
TOPIC_PARAM_STRATEGIC_INTENT,
|
|
370
386
|
TOPIC_PARAM_SUMMARY,
|
|
371
387
|
TOPIC_PARAM_TITLE,
|
|
388
|
+
ToolConfirmationOutcome,
|
|
389
|
+
ToolErrorType,
|
|
372
390
|
UPDATE_TOPIC_DISPLAY_NAME,
|
|
373
391
|
UPDATE_TOPIC_TOOL_NAME,
|
|
374
392
|
UnauthorizedError,
|
|
@@ -398,7 +416,7 @@ import {
|
|
|
398
416
|
safeJsonToMarkdown,
|
|
399
417
|
shortenPath,
|
|
400
418
|
tildeifyPath
|
|
401
|
-
} from "./chunk-
|
|
419
|
+
} from "./chunk-SAJ72M2G.js";
|
|
402
420
|
import "./chunk-664ZODQF.js";
|
|
403
421
|
import "./chunk-RJTRUG2J.js";
|
|
404
422
|
import "./chunk-IUUIT4SU.js";
|
|
@@ -5737,7 +5755,7 @@ function calculateShellMaxLines(options) {
|
|
|
5737
5755
|
if (isAlternateBuffer && isThisShellFocused2 && !constrainHeight) {
|
|
5738
5756
|
return maxLinesBasedOnHeight;
|
|
5739
5757
|
}
|
|
5740
|
-
const isExecuting = status ===
|
|
5758
|
+
const isExecuting = status === CoreToolCallStatus.Executing;
|
|
5741
5759
|
const shellMaxLinesLimit = isExecuting ? ACTIVE_SHELL_MAX_LINES - SHELL_CONTENT_OVERHEAD : COMPLETED_SHELL_MAX_LINES - SHELL_CONTENT_OVERHEAD;
|
|
5742
5760
|
return Math.min(maxLinesBasedOnHeight, shellMaxLinesLimit);
|
|
5743
5761
|
}
|
|
@@ -5770,10 +5788,10 @@ function isShellTool(name) {
|
|
|
5770
5788
|
return name === SHELL_COMMAND_NAME || name === SHELL_NAME || name === SHELL_TOOL_NAME;
|
|
5771
5789
|
}
|
|
5772
5790
|
function isThisShellFocusable(name, status, config) {
|
|
5773
|
-
return !!(isShellTool(name) && status ===
|
|
5791
|
+
return !!(isShellTool(name) && status === CoreToolCallStatus.Executing && config?.getEnableInteractiveShell());
|
|
5774
5792
|
}
|
|
5775
5793
|
function isThisShellFocused(name, status, ptyId, activeShellPtyId, embeddedShellFocused) {
|
|
5776
|
-
return !!(isShellTool(name) && status ===
|
|
5794
|
+
return !!(isShellTool(name) && status === CoreToolCallStatus.Executing && ptyId === activeShellPtyId && embeddedShellFocused);
|
|
5777
5795
|
}
|
|
5778
5796
|
function useFocusHint(isThisShellFocusable2, isThisShellFocused2, resultDisplay) {
|
|
5779
5797
|
const [userHasFocused, setUserHasFocused] = (0, import_react16.useState)(false);
|
|
@@ -6371,7 +6389,7 @@ var ToolMessage = ({
|
|
|
6371
6389
|
paddingX: 1,
|
|
6372
6390
|
flexDirection: "column",
|
|
6373
6391
|
children: [
|
|
6374
|
-
status ===
|
|
6392
|
+
status === CoreToolCallStatus.Executing && progress !== void 0 && /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(
|
|
6375
6393
|
McpProgressIndicator,
|
|
6376
6394
|
{
|
|
6377
6395
|
progress,
|
|
@@ -6388,8 +6406,8 @@ var ToolMessage = ({
|
|
|
6388
6406
|
terminalWidth,
|
|
6389
6407
|
renderOutputAsMarkdown,
|
|
6390
6408
|
hasFocus: isThisShellFocused2,
|
|
6391
|
-
maxLines: kind ===
|
|
6392
|
-
overflowDirection: kind ===
|
|
6409
|
+
maxLines: kind === Kind.Agent && availableTerminalHeight !== void 0 ? SUBAGENT_MAX_LINES : void 0,
|
|
6410
|
+
overflowDirection: kind === Kind.Agent ? "bottom" : "top"
|
|
6393
6411
|
}
|
|
6394
6412
|
),
|
|
6395
6413
|
isThisShellFocused2 && config && /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(Box_default, { paddingLeft: STATUS_INDICATOR_WIDTH, marginTop: 1, children: /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(
|
|
@@ -6722,7 +6740,7 @@ function getInitialTrustState(settings, cwd5, isCurrentWorkspace) {
|
|
|
6722
6740
|
settings.merged,
|
|
6723
6741
|
process3.cwd()
|
|
6724
6742
|
);
|
|
6725
|
-
const isInheritedTrust = isTrusted && (!explicitTrustLevel || explicitTrustLevel ===
|
|
6743
|
+
const isInheritedTrust = isTrusted && (!explicitTrustLevel || explicitTrustLevel === TrustLevel.DO_NOT_TRUST);
|
|
6726
6744
|
return {
|
|
6727
6745
|
currentTrustLevel: explicitTrustLevel,
|
|
6728
6746
|
isInheritedTrustFromParent: !!(source === "file" && isInheritedTrust),
|
|
@@ -6767,7 +6785,7 @@ var usePermissionsModifyTrust = (onExit, addItem, targetDirectory) => {
|
|
|
6767
6785
|
process3.cwd(),
|
|
6768
6786
|
newConfig
|
|
6769
6787
|
);
|
|
6770
|
-
if (trustLevel ===
|
|
6788
|
+
if (trustLevel === TrustLevel.DO_NOT_TRUST && isTrusted) {
|
|
6771
6789
|
let message = "Note: This folder is still trusted because the connected IDE workspace is trusted.";
|
|
6772
6790
|
if (source === "file") {
|
|
6773
6791
|
message = "Note: This folder is still trusted because a parent folder is trusted.";
|
|
@@ -6841,18 +6859,18 @@ function PermissionsModifyTrustDialog({
|
|
|
6841
6859
|
const TRUST_LEVEL_ITEMS = [
|
|
6842
6860
|
{
|
|
6843
6861
|
label: `Trust this folder (${dirName})`,
|
|
6844
|
-
value:
|
|
6845
|
-
key:
|
|
6862
|
+
value: TrustLevel.TRUST_FOLDER,
|
|
6863
|
+
key: TrustLevel.TRUST_FOLDER
|
|
6846
6864
|
},
|
|
6847
6865
|
{
|
|
6848
6866
|
label: `Trust parent folder (${parentFolder})`,
|
|
6849
|
-
value:
|
|
6850
|
-
key:
|
|
6867
|
+
value: TrustLevel.TRUST_PARENT,
|
|
6868
|
+
key: TrustLevel.TRUST_PARENT
|
|
6851
6869
|
},
|
|
6852
6870
|
{
|
|
6853
6871
|
label: "Don't trust",
|
|
6854
|
-
value:
|
|
6855
|
-
key:
|
|
6872
|
+
value: TrustLevel.DO_NOT_TRUST,
|
|
6873
|
+
key: TrustLevel.DO_NOT_TRUST
|
|
6856
6874
|
}
|
|
6857
6875
|
];
|
|
6858
6876
|
const {
|
|
@@ -7089,7 +7107,7 @@ var ShellToolMessage = ({
|
|
|
7089
7107
|
maxLinesLimit: maxLines
|
|
7090
7108
|
});
|
|
7091
7109
|
import_react23.default.useEffect(() => {
|
|
7092
|
-
const isExecuting = status ===
|
|
7110
|
+
const isExecuting = status === CoreToolCallStatus.Executing;
|
|
7093
7111
|
if (isExecuting && ptyId) {
|
|
7094
7112
|
try {
|
|
7095
7113
|
const childWidth = terminalWidth - 4;
|
|
@@ -7275,14 +7293,14 @@ var ToolActionsProvider = (props) => {
|
|
|
7275
7293
|
}
|
|
7276
7294
|
const details = tool.confirmationDetails;
|
|
7277
7295
|
if (details?.type === "edit" && isDiffingEnabled && "filePath" in details) {
|
|
7278
|
-
const cliOutcome = outcome ===
|
|
7296
|
+
const cliOutcome = outcome === ToolConfirmationOutcome.Cancel ? "rejected" : "accepted";
|
|
7279
7297
|
await ideClient?.resolveDiffFromCli(details.filePath, cliOutcome);
|
|
7280
7298
|
}
|
|
7281
7299
|
if (tool.correlationId) {
|
|
7282
7300
|
await config.getMessageBus().publish({
|
|
7283
|
-
type:
|
|
7301
|
+
type: MessageBusType.TOOL_CONFIRMATION_RESPONSE,
|
|
7284
7302
|
correlationId: tool.correlationId,
|
|
7285
|
-
confirmed: outcome !==
|
|
7303
|
+
confirmed: outcome !== ToolConfirmationOutcome.Cancel,
|
|
7286
7304
|
requiresUserConfirmation: false,
|
|
7287
7305
|
outcome,
|
|
7288
7306
|
payload
|
|
@@ -7301,7 +7319,7 @@ var ToolActionsProvider = (props) => {
|
|
|
7301
7319
|
);
|
|
7302
7320
|
const cancel = (0, import_react24.useCallback)(
|
|
7303
7321
|
async (callId) => {
|
|
7304
|
-
await confirm(callId,
|
|
7322
|
+
await confirm(callId, ToolConfirmationOutcome.Cancel);
|
|
7305
7323
|
},
|
|
7306
7324
|
[confirm]
|
|
7307
7325
|
);
|
|
@@ -7588,22 +7606,22 @@ var hasPayload = (res) => {
|
|
|
7588
7606
|
function getFileOpData(diff, status, resultDisplay, terminalWidth, availableTerminalHeight, isClickable) {
|
|
7589
7607
|
const added = (diff.diffStat?.model_added_lines ?? 0) + (diff.diffStat?.user_added_lines ?? 0);
|
|
7590
7608
|
const removed = (diff.diffStat?.model_removed_lines ?? 0) + (diff.diffStat?.user_removed_lines ?? 0);
|
|
7591
|
-
const isAcceptedOrConfirming = status ===
|
|
7609
|
+
const isAcceptedOrConfirming = status === CoreToolCallStatus.Success || status === CoreToolCallStatus.Executing || status === CoreToolCallStatus.AwaitingApproval;
|
|
7592
7610
|
const addColor = isAcceptedOrConfirming ? theme.status.success : theme.text.secondary;
|
|
7593
7611
|
const removeColor = isAcceptedOrConfirming ? theme.status.error : theme.text.secondary;
|
|
7594
7612
|
const showDiffStat = !!diff.diffStat;
|
|
7595
7613
|
const description = /* @__PURE__ */ (0, import_jsx_runtime30.jsx)(Box_default, { flexDirection: "row", children: /* @__PURE__ */ (0, import_jsx_runtime30.jsx)(Text, { color: theme.text.secondary, wrap: "truncate-end", children: diff.fileName }) });
|
|
7596
7614
|
let resultSummary = "";
|
|
7597
7615
|
let resultColor = theme.text.secondary;
|
|
7598
|
-
if (status ===
|
|
7616
|
+
if (status === CoreToolCallStatus.AwaitingApproval) {
|
|
7599
7617
|
resultSummary = "Confirming";
|
|
7600
|
-
} else if (status ===
|
|
7618
|
+
} else if (status === CoreToolCallStatus.Success || status === CoreToolCallStatus.Executing) {
|
|
7601
7619
|
resultSummary = "Accepted";
|
|
7602
7620
|
resultColor = theme.text.accent;
|
|
7603
|
-
} else if (status ===
|
|
7621
|
+
} else if (status === CoreToolCallStatus.Cancelled) {
|
|
7604
7622
|
resultSummary = "Rejected";
|
|
7605
7623
|
resultColor = theme.status.error;
|
|
7606
|
-
} else if (status ===
|
|
7624
|
+
} else if (status === CoreToolCallStatus.Error) {
|
|
7607
7625
|
resultSummary = typeof resultDisplay === "string" ? resultDisplay : "Failed";
|
|
7608
7626
|
resultColor = theme.status.error;
|
|
7609
7627
|
}
|
|
@@ -7634,7 +7652,7 @@ function getFileOpData(diff, status, resultDisplay, terminalWidth, availableTerm
|
|
|
7634
7652
|
filename: diff.fileName,
|
|
7635
7653
|
terminalWidth: terminalWidth - PAYLOAD_MARGIN_LEFT,
|
|
7636
7654
|
availableTerminalHeight,
|
|
7637
|
-
disableColor: status ===
|
|
7655
|
+
disableColor: status === CoreToolCallStatus.Cancelled
|
|
7638
7656
|
}
|
|
7639
7657
|
);
|
|
7640
7658
|
return { description, summary, payload };
|
|
@@ -7762,10 +7780,10 @@ var DenseToolMessage = (props) => {
|
|
|
7762
7780
|
if (isGrepResult(resultDisplay)) {
|
|
7763
7781
|
return getGenericSuccessData(resultDisplay, originalDescription);
|
|
7764
7782
|
}
|
|
7765
|
-
if (status ===
|
|
7783
|
+
if (status === CoreToolCallStatus.Success && resultDisplay) {
|
|
7766
7784
|
return getGenericSuccessData(resultDisplay, originalDescription);
|
|
7767
7785
|
}
|
|
7768
|
-
if (status ===
|
|
7786
|
+
if (status === CoreToolCallStatus.Error) {
|
|
7769
7787
|
const text = typeof resultDisplay === "string" ? resultDisplay.replace(/\n/g, " ") : "Failed";
|
|
7770
7788
|
const errorSummary = /* @__PURE__ */ (0, import_jsx_runtime30.jsxs)(Text, { color: theme.status.error, wrap: "truncate-end", children: [
|
|
7771
7789
|
"\u2192 ",
|
|
@@ -7806,7 +7824,7 @@ var DenseToolMessage = (props) => {
|
|
|
7806
7824
|
language: fileExtension,
|
|
7807
7825
|
maxWidth: terminalWidth - PAYLOAD_MARGIN_LEFT,
|
|
7808
7826
|
settings,
|
|
7809
|
-
disableColor: status ===
|
|
7827
|
+
disableColor: status === CoreToolCallStatus.Cancelled,
|
|
7810
7828
|
returnLines: true
|
|
7811
7829
|
});
|
|
7812
7830
|
} else {
|
|
@@ -7814,7 +7832,7 @@ var DenseToolMessage = (props) => {
|
|
|
7814
7832
|
parsedLines,
|
|
7815
7833
|
filename: diff.fileName,
|
|
7816
7834
|
terminalWidth: terminalWidth - PAYLOAD_MARGIN_LEFT,
|
|
7817
|
-
disableColor: status ===
|
|
7835
|
+
disableColor: status === CoreToolCallStatus.Cancelled
|
|
7818
7836
|
});
|
|
7819
7837
|
}
|
|
7820
7838
|
}, [diff, isExpanded, isAlternateBuffer, terminalWidth, settings, status]);
|
|
@@ -7944,7 +7962,7 @@ function isToolExecuting(pendingHistoryItems) {
|
|
|
7944
7962
|
return pendingHistoryItems.some((item) => {
|
|
7945
7963
|
if (item && item.type === "tool_group") {
|
|
7946
7964
|
return item.tools.some(
|
|
7947
|
-
(tool) =>
|
|
7965
|
+
(tool) => CoreToolCallStatus.Executing === tool.status
|
|
7948
7966
|
);
|
|
7949
7967
|
}
|
|
7950
7968
|
return false;
|
|
@@ -7953,7 +7971,7 @@ function isToolExecuting(pendingHistoryItems) {
|
|
|
7953
7971
|
function isToolAwaitingConfirmation(pendingHistoryItems) {
|
|
7954
7972
|
return pendingHistoryItems.filter((item) => item.type === "tool_group").some(
|
|
7955
7973
|
(item) => item.tools.some(
|
|
7956
|
-
(tool) =>
|
|
7974
|
+
(tool) => CoreToolCallStatus.AwaitingApproval === tool.status
|
|
7957
7975
|
)
|
|
7958
7976
|
);
|
|
7959
7977
|
}
|
|
@@ -7976,14 +7994,14 @@ function getToolGroupBorderAppearance(item, activeShellPtyId, embeddedShellFocus
|
|
|
7976
7994
|
if (isTrackedToolCall(t)) {
|
|
7977
7995
|
return t.status !== "success" && t.status !== "error" && t.status !== "cancelled";
|
|
7978
7996
|
} else {
|
|
7979
|
-
return t.status !==
|
|
7997
|
+
return t.status !== CoreToolCallStatus.Success && t.status !== CoreToolCallStatus.Error && t.status !== CoreToolCallStatus.Cancelled;
|
|
7980
7998
|
}
|
|
7981
7999
|
});
|
|
7982
8000
|
const isEmbeddedShellFocused = toolsToInspect.some((t) => {
|
|
7983
8001
|
if (isTrackedToolCall(t)) {
|
|
7984
8002
|
return isShellTool(t.request.name) && t.status === "executing" && t.pid === activeShellPtyId && !!embeddedShellFocused;
|
|
7985
8003
|
} else {
|
|
7986
|
-
return isShellTool(t.name) && t.status ===
|
|
8004
|
+
return isShellTool(t.name) && t.status === CoreToolCallStatus.Executing && t.ptyId === activeShellPtyId && !!embeddedShellFocused;
|
|
7987
8005
|
}
|
|
7988
8006
|
});
|
|
7989
8007
|
const isShellCommand = toolsToInspect.some((t) => {
|
|
@@ -8082,7 +8100,7 @@ var ToolGroupMessage = ({
|
|
|
8082
8100
|
const groupedTools = (0, import_react28.useMemo)(() => {
|
|
8083
8101
|
const groups = [];
|
|
8084
8102
|
for (const tool of visibleToolCalls) {
|
|
8085
|
-
if (tool.kind ===
|
|
8103
|
+
if (tool.kind === Kind.Agent) {
|
|
8086
8104
|
const lastGroup = groups[groups.length - 1];
|
|
8087
8105
|
if (Array.isArray(lastGroup)) {
|
|
8088
8106
|
lastGroup.push(tool);
|
|
@@ -8136,7 +8154,7 @@ var ToolGroupMessage = ({
|
|
|
8136
8154
|
}, [groupedTools, isCompactModeEnabled, borderTopOverride]);
|
|
8137
8155
|
let countToolCallsWithResults = 0;
|
|
8138
8156
|
for (const tool of visibleToolCalls) {
|
|
8139
|
-
if (tool.kind !==
|
|
8157
|
+
if (tool.kind !== Kind.Agent) {
|
|
8140
8158
|
if (isCompactTool(tool, isCompactModeEnabled)) {
|
|
8141
8159
|
if (hasDensePayload(tool)) {
|
|
8142
8160
|
countToolCallsWithResults++;
|
|
@@ -8332,18 +8350,18 @@ function CompressionMessage({
|
|
|
8332
8350
|
return "Compressing chat history";
|
|
8333
8351
|
}
|
|
8334
8352
|
switch (compressionStatus) {
|
|
8335
|
-
case
|
|
8353
|
+
case CompressionStatus.COMPRESSED:
|
|
8336
8354
|
return `Chat history compressed from ${originalTokens} to ${newTokens} tokens.`;
|
|
8337
|
-
case
|
|
8355
|
+
case CompressionStatus.COMPRESSION_FAILED_INFLATED_TOKEN_COUNT:
|
|
8338
8356
|
if (originalTokens < 5e4) {
|
|
8339
8357
|
return "Compression was not beneficial for this history size.";
|
|
8340
8358
|
}
|
|
8341
8359
|
return "Chat history compression did not reduce size. This may indicate issues with the compression prompt.";
|
|
8342
|
-
case
|
|
8360
|
+
case CompressionStatus.COMPRESSION_FAILED_TOKEN_COUNT_ERROR:
|
|
8343
8361
|
return "Could not compress chat history due to a token counting error.";
|
|
8344
|
-
case
|
|
8362
|
+
case CompressionStatus.COMPRESSION_FAILED_EMPTY_SUMMARY:
|
|
8345
8363
|
return "Chat history compression failed: the model returned an empty summary.";
|
|
8346
|
-
case
|
|
8364
|
+
case CompressionStatus.NOOP:
|
|
8347
8365
|
return "Nothing to compress.";
|
|
8348
8366
|
default:
|
|
8349
8367
|
return "";
|
|
@@ -8757,8 +8775,8 @@ var ModelUsageTable = ({ models }) => {
|
|
|
8757
8775
|
);
|
|
8758
8776
|
roleEntries.sort(([a], [b]) => {
|
|
8759
8777
|
if (a === b) return 0;
|
|
8760
|
-
if (a ===
|
|
8761
|
-
if (b ===
|
|
8778
|
+
if (a === LlmRole.MAIN) return -1;
|
|
8779
|
+
if (b === LlmRole.MAIN) return 1;
|
|
8762
8780
|
return a.localeCompare(b);
|
|
8763
8781
|
});
|
|
8764
8782
|
roleEntries.forEach(([role, roleMetrics]) => {
|
|
@@ -9089,8 +9107,8 @@ var ModelStatsDisplay = ({
|
|
|
9089
9107
|
return validRoles.includes(role);
|
|
9090
9108
|
}).sort((a, b) => {
|
|
9091
9109
|
if (a === b) return 0;
|
|
9092
|
-
if (a ===
|
|
9093
|
-
if (b ===
|
|
9110
|
+
if (a === LlmRole.MAIN) return -1;
|
|
9111
|
+
if (b === LlmRole.MAIN) return 1;
|
|
9094
9112
|
return a.localeCompare(b);
|
|
9095
9113
|
});
|
|
9096
9114
|
const createRow = (metric, getValue, options = {}) => {
|
|
@@ -9880,7 +9898,7 @@ var McpStatus = ({
|
|
|
9880
9898
|
);
|
|
9881
9899
|
const originalStatus = serverStatus(serverName);
|
|
9882
9900
|
const hasCachedItems = serverTools.length > 0 || serverPrompts.length > 0 || serverResources.length > 0;
|
|
9883
|
-
const status = originalStatus ===
|
|
9901
|
+
const status = originalStatus === MCPServerStatus.DISCONNECTED && hasCachedItems ? MCPServerStatus.CONNECTED : originalStatus;
|
|
9884
9902
|
let statusIndicator = "";
|
|
9885
9903
|
let statusText = "";
|
|
9886
9904
|
let statusColor = theme.text.primary;
|
|
@@ -9892,17 +9910,17 @@ var McpStatus = ({
|
|
|
9892
9910
|
statusColor = theme.text.secondary;
|
|
9893
9911
|
} else {
|
|
9894
9912
|
switch (status) {
|
|
9895
|
-
case
|
|
9913
|
+
case MCPServerStatus.CONNECTED:
|
|
9896
9914
|
statusIndicator = "\u{1F7E2}";
|
|
9897
9915
|
statusText = "Ready";
|
|
9898
9916
|
statusColor = theme.status.success;
|
|
9899
9917
|
break;
|
|
9900
|
-
case
|
|
9918
|
+
case MCPServerStatus.CONNECTING:
|
|
9901
9919
|
statusIndicator = "\u{1F504}";
|
|
9902
9920
|
statusText = "Starting... (first startup may take longer)";
|
|
9903
9921
|
statusColor = theme.status.warning;
|
|
9904
9922
|
break;
|
|
9905
|
-
case
|
|
9923
|
+
case MCPServerStatus.DISCONNECTED:
|
|
9906
9924
|
default:
|
|
9907
9925
|
statusIndicator = "\u{1F534}";
|
|
9908
9926
|
statusText = "Disconnected";
|
|
@@ -9950,12 +9968,12 @@ var McpStatus = ({
|
|
|
9950
9968
|
/* @__PURE__ */ (0, import_jsx_runtime50.jsxs)(Text, { children: [
|
|
9951
9969
|
" - ",
|
|
9952
9970
|
statusText,
|
|
9953
|
-
status ===
|
|
9971
|
+
status === MCPServerStatus.CONNECTED && parts.length > 0 && ` (${parts.join(", ")})`
|
|
9954
9972
|
] }),
|
|
9955
9973
|
authStatusNode
|
|
9956
9974
|
] }),
|
|
9957
|
-
status ===
|
|
9958
|
-
status ===
|
|
9975
|
+
status === MCPServerStatus.CONNECTING && /* @__PURE__ */ (0, import_jsx_runtime50.jsx)(Text, { children: " (tools and prompts will appear when ready)" }),
|
|
9976
|
+
status === MCPServerStatus.DISCONNECTED && toolCount > 0 && /* @__PURE__ */ (0, import_jsx_runtime50.jsxs)(Text, { children: [
|
|
9959
9977
|
" (",
|
|
9960
9978
|
toolCount,
|
|
9961
9979
|
" tools cached)"
|
|
@@ -10508,7 +10526,7 @@ var Notifications = () => {
|
|
|
10508
10526
|
if (dismissed) return [];
|
|
10509
10527
|
const counts = persistentState.get("startupWarningCounts") || {};
|
|
10510
10528
|
return startupWarnings.filter((w) => {
|
|
10511
|
-
if (w.priority ===
|
|
10529
|
+
if (w.priority === WarningPriority.Low) {
|
|
10512
10530
|
const count = counts[w.id] || 0;
|
|
10513
10531
|
return count < MAX_STARTUP_WARNING_SHOW_COUNT;
|
|
10514
10532
|
}
|
|
@@ -10521,7 +10539,7 @@ var Notifications = () => {
|
|
|
10521
10539
|
const counts = { ...persistentState.get("startupWarningCounts") || {} };
|
|
10522
10540
|
let changed = false;
|
|
10523
10541
|
visibleWarnings.forEach((w) => {
|
|
10524
|
-
if (w.priority ===
|
|
10542
|
+
if (w.priority === WarningPriority.Low) {
|
|
10525
10543
|
counts[w.id] = (counts[w.id] || 0) + 1;
|
|
10526
10544
|
changed = true;
|
|
10527
10545
|
}
|
|
@@ -10628,7 +10646,7 @@ var UserIdentity = ({ config }) => {
|
|
|
10628
10646
|
}
|
|
10629
10647
|
return /* @__PURE__ */ (0, import_jsx_runtime60.jsxs)(Box_default, { flexDirection: "column", children: [
|
|
10630
10648
|
/* @__PURE__ */ (0, import_jsx_runtime60.jsxs)(Box_default, { children: [
|
|
10631
|
-
/* @__PURE__ */ (0, import_jsx_runtime60.jsx)(Text, { color: theme.text.primary, wrap: "truncate-end", children: authType ===
|
|
10649
|
+
/* @__PURE__ */ (0, import_jsx_runtime60.jsx)(Text, { color: theme.text.primary, wrap: "truncate-end", children: authType === AuthType.LOGIN_WITH_GOOGLE ? /* @__PURE__ */ (0, import_jsx_runtime60.jsxs)(Text, { children: [
|
|
10632
10650
|
/* @__PURE__ */ (0, import_jsx_runtime60.jsxs)(Text, { bold: true, children: [
|
|
10633
10651
|
"Signed in with Google",
|
|
10634
10652
|
email ? ":" : ""
|
|
@@ -10862,7 +10880,7 @@ var import_react39 = __toESM(require_react(), 1);
|
|
|
10862
10880
|
function getConfirmingToolState(pendingHistoryItems) {
|
|
10863
10881
|
const allPendingTools = getAllToolCalls(pendingHistoryItems);
|
|
10864
10882
|
const confirmingTools = allPendingTools.filter(
|
|
10865
|
-
(tool) => tool.status ===
|
|
10883
|
+
(tool) => tool.status === CoreToolCallStatus.AwaitingApproval
|
|
10866
10884
|
);
|
|
10867
10885
|
if (confirmingTools.length === 0) {
|
|
10868
10886
|
return null;
|
|
@@ -12172,7 +12190,7 @@ var ExitPlanModeDialog = ({
|
|
|
12172
12190
|
{
|
|
12173
12191
|
questions: [
|
|
12174
12192
|
{
|
|
12175
|
-
type:
|
|
12193
|
+
type: QuestionType.CHOICE,
|
|
12176
12194
|
header: "Approval",
|
|
12177
12195
|
question: planContent,
|
|
12178
12196
|
options: [
|
|
@@ -12193,9 +12211,9 @@ var ExitPlanModeDialog = ({
|
|
|
12193
12211
|
onSubmit: (answers) => {
|
|
12194
12212
|
const answer = answers["0"];
|
|
12195
12213
|
if (answer === "Yes, automatically accept edits" /* Auto */) {
|
|
12196
|
-
onApprove(
|
|
12214
|
+
onApprove(ApprovalMode.AUTO_EDIT);
|
|
12197
12215
|
} else if (answer === "Yes, manually accept edits" /* Manual */) {
|
|
12198
|
-
onApprove(
|
|
12216
|
+
onApprove(ApprovalMode.DEFAULT);
|
|
12199
12217
|
} else if (answer) {
|
|
12200
12218
|
onFeedback(answer);
|
|
12201
12219
|
}
|
|
@@ -12406,7 +12424,7 @@ ${deceptiveUrlWarnings.map(
|
|
|
12406
12424
|
);
|
|
12407
12425
|
(0, import_react44.useEffect)(() => {
|
|
12408
12426
|
if (isCancelling) {
|
|
12409
|
-
handleConfirm(
|
|
12427
|
+
handleConfirm(ToolConfirmationOutcome.Cancel);
|
|
12410
12428
|
}
|
|
12411
12429
|
}, [isCancelling, handleConfirm]);
|
|
12412
12430
|
const handleSelect = (0, import_react44.useCallback)(
|
|
@@ -12419,19 +12437,19 @@ ${deceptiveUrlWarnings.map(
|
|
|
12419
12437
|
if (!confirmationDetails.isModifying) {
|
|
12420
12438
|
options2.push({
|
|
12421
12439
|
label: "Allow once",
|
|
12422
|
-
value:
|
|
12440
|
+
value: ToolConfirmationOutcome.ProceedOnce,
|
|
12423
12441
|
key: "Allow once"
|
|
12424
12442
|
});
|
|
12425
12443
|
if (isTrustedFolder) {
|
|
12426
12444
|
options2.push({
|
|
12427
12445
|
label: "Allow for this session",
|
|
12428
|
-
value:
|
|
12446
|
+
value: ToolConfirmationOutcome.ProceedAlways,
|
|
12429
12447
|
key: "Allow for this session"
|
|
12430
12448
|
});
|
|
12431
12449
|
if (allowPermanentApproval) {
|
|
12432
12450
|
options2.push({
|
|
12433
12451
|
label: "Allow for this file in all future sessions",
|
|
12434
|
-
value:
|
|
12452
|
+
value: ToolConfirmationOutcome.ProceedAlwaysAndSave,
|
|
12435
12453
|
key: "Allow for this file in all future sessions"
|
|
12436
12454
|
});
|
|
12437
12455
|
}
|
|
@@ -12439,119 +12457,119 @@ ${deceptiveUrlWarnings.map(
|
|
|
12439
12457
|
if (!config.getIdeMode() || !isDiffingEnabled) {
|
|
12440
12458
|
options2.push({
|
|
12441
12459
|
label: "Modify with external editor",
|
|
12442
|
-
value:
|
|
12460
|
+
value: ToolConfirmationOutcome.ModifyWithEditor,
|
|
12443
12461
|
key: "Modify with external editor"
|
|
12444
12462
|
});
|
|
12445
12463
|
}
|
|
12446
12464
|
options2.push({
|
|
12447
12465
|
label: "No, suggest changes (esc)",
|
|
12448
|
-
value:
|
|
12466
|
+
value: ToolConfirmationOutcome.Cancel,
|
|
12449
12467
|
key: "No, suggest changes (esc)"
|
|
12450
12468
|
});
|
|
12451
12469
|
}
|
|
12452
12470
|
} else if (confirmationDetails.type === "sandbox_expansion") {
|
|
12453
12471
|
options2.push({
|
|
12454
12472
|
label: "Allow once",
|
|
12455
|
-
value:
|
|
12473
|
+
value: ToolConfirmationOutcome.ProceedOnce,
|
|
12456
12474
|
key: "Allow once"
|
|
12457
12475
|
});
|
|
12458
12476
|
if (isTrustedFolder) {
|
|
12459
12477
|
options2.push({
|
|
12460
12478
|
label: "Allow for this session",
|
|
12461
|
-
value:
|
|
12479
|
+
value: ToolConfirmationOutcome.ProceedAlways,
|
|
12462
12480
|
key: "Allow for this session"
|
|
12463
12481
|
});
|
|
12464
12482
|
if (allowPermanentApproval) {
|
|
12465
12483
|
options2.push({
|
|
12466
12484
|
label: "Allow for all future sessions",
|
|
12467
|
-
value:
|
|
12485
|
+
value: ToolConfirmationOutcome.ProceedAlwaysAndSave,
|
|
12468
12486
|
key: "Allow for all future sessions"
|
|
12469
12487
|
});
|
|
12470
12488
|
}
|
|
12471
12489
|
}
|
|
12472
12490
|
options2.push({
|
|
12473
12491
|
label: "No, suggest changes (esc)",
|
|
12474
|
-
value:
|
|
12492
|
+
value: ToolConfirmationOutcome.Cancel,
|
|
12475
12493
|
key: "No, suggest changes (esc)"
|
|
12476
12494
|
});
|
|
12477
12495
|
} else if (confirmationDetails.type === "exec") {
|
|
12478
12496
|
options2.push({
|
|
12479
12497
|
label: "Allow once",
|
|
12480
|
-
value:
|
|
12498
|
+
value: ToolConfirmationOutcome.ProceedOnce,
|
|
12481
12499
|
key: "Allow once"
|
|
12482
12500
|
});
|
|
12483
12501
|
if (isTrustedFolder) {
|
|
12484
12502
|
options2.push({
|
|
12485
12503
|
label: `Allow for this session`,
|
|
12486
|
-
value:
|
|
12504
|
+
value: ToolConfirmationOutcome.ProceedAlways,
|
|
12487
12505
|
key: `Allow for this session`
|
|
12488
12506
|
});
|
|
12489
12507
|
if (allowPermanentApproval) {
|
|
12490
12508
|
options2.push({
|
|
12491
12509
|
label: `Allow this command for all future sessions`,
|
|
12492
|
-
value:
|
|
12510
|
+
value: ToolConfirmationOutcome.ProceedAlwaysAndSave,
|
|
12493
12511
|
key: `Allow for all future sessions`
|
|
12494
12512
|
});
|
|
12495
12513
|
}
|
|
12496
12514
|
}
|
|
12497
12515
|
options2.push({
|
|
12498
12516
|
label: "No, suggest changes (esc)",
|
|
12499
|
-
value:
|
|
12517
|
+
value: ToolConfirmationOutcome.Cancel,
|
|
12500
12518
|
key: "No, suggest changes (esc)"
|
|
12501
12519
|
});
|
|
12502
12520
|
} else if (confirmationDetails.type === "info") {
|
|
12503
12521
|
options2.push({
|
|
12504
12522
|
label: "Allow once",
|
|
12505
|
-
value:
|
|
12523
|
+
value: ToolConfirmationOutcome.ProceedOnce,
|
|
12506
12524
|
key: "Allow once"
|
|
12507
12525
|
});
|
|
12508
12526
|
if (isTrustedFolder) {
|
|
12509
12527
|
options2.push({
|
|
12510
12528
|
label: "Allow for this session",
|
|
12511
|
-
value:
|
|
12529
|
+
value: ToolConfirmationOutcome.ProceedAlways,
|
|
12512
12530
|
key: "Allow for this session"
|
|
12513
12531
|
});
|
|
12514
12532
|
if (allowPermanentApproval) {
|
|
12515
12533
|
options2.push({
|
|
12516
12534
|
label: "Allow for all future sessions",
|
|
12517
|
-
value:
|
|
12535
|
+
value: ToolConfirmationOutcome.ProceedAlwaysAndSave,
|
|
12518
12536
|
key: "Allow for all future sessions"
|
|
12519
12537
|
});
|
|
12520
12538
|
}
|
|
12521
12539
|
}
|
|
12522
12540
|
options2.push({
|
|
12523
12541
|
label: "No, suggest changes (esc)",
|
|
12524
|
-
value:
|
|
12542
|
+
value: ToolConfirmationOutcome.Cancel,
|
|
12525
12543
|
key: "No, suggest changes (esc)"
|
|
12526
12544
|
});
|
|
12527
12545
|
} else if (confirmationDetails.type === "mcp") {
|
|
12528
12546
|
options2.push({
|
|
12529
12547
|
label: "Allow once",
|
|
12530
|
-
value:
|
|
12548
|
+
value: ToolConfirmationOutcome.ProceedOnce,
|
|
12531
12549
|
key: "Allow once"
|
|
12532
12550
|
});
|
|
12533
12551
|
if (isTrustedFolder) {
|
|
12534
12552
|
options2.push({
|
|
12535
12553
|
label: "Allow tool for this session",
|
|
12536
|
-
value:
|
|
12554
|
+
value: ToolConfirmationOutcome.ProceedAlwaysTool,
|
|
12537
12555
|
key: "Allow tool for this session"
|
|
12538
12556
|
});
|
|
12539
12557
|
options2.push({
|
|
12540
12558
|
label: "Allow all server tools for this session",
|
|
12541
|
-
value:
|
|
12559
|
+
value: ToolConfirmationOutcome.ProceedAlwaysServer,
|
|
12542
12560
|
key: "Allow all server tools for this session"
|
|
12543
12561
|
});
|
|
12544
12562
|
if (allowPermanentApproval) {
|
|
12545
12563
|
options2.push({
|
|
12546
12564
|
label: "Allow tool for all future sessions",
|
|
12547
|
-
value:
|
|
12565
|
+
value: ToolConfirmationOutcome.ProceedAlwaysAndSave,
|
|
12548
12566
|
key: "Allow tool for all future sessions"
|
|
12549
12567
|
});
|
|
12550
12568
|
}
|
|
12551
12569
|
}
|
|
12552
12570
|
options2.push({
|
|
12553
12571
|
label: "No, suggest changes (esc)",
|
|
12554
|
-
value:
|
|
12572
|
+
value: ToolConfirmationOutcome.Cancel,
|
|
12555
12573
|
key: "No, suggest changes (esc)"
|
|
12556
12574
|
});
|
|
12557
12575
|
}
|
|
@@ -12590,7 +12608,7 @@ ${deceptiveUrlWarnings.map(
|
|
|
12590
12608
|
const containsRedirection = commandsToDisplay.some(
|
|
12591
12609
|
(cmd) => hasRedirection(cmd)
|
|
12592
12610
|
);
|
|
12593
|
-
const isAutoEdit = config.getApprovalMode() ===
|
|
12611
|
+
const isAutoEdit = config.getApprovalMode() === ApprovalMode.YOLO || config.getApprovalMode() === ApprovalMode.AUTO_EDIT;
|
|
12594
12612
|
if (containsRedirection && !isAutoEdit) {
|
|
12595
12613
|
extraInfoLines = 1;
|
|
12596
12614
|
}
|
|
@@ -12616,7 +12634,7 @@ ${deceptiveUrlWarnings.map(
|
|
|
12616
12634
|
const isSafeToPersist = confirmationDetails.type === "info" || confirmationDetails.type === "edit" || confirmationDetails.type === "mcp";
|
|
12617
12635
|
if (isSafeToPersist && settings.merged.security.autoAddToPolicyByDefault) {
|
|
12618
12636
|
const alwaysAndSaveIndex = options2.findIndex(
|
|
12619
|
-
(o) => o.value ===
|
|
12637
|
+
(o) => o.value === ToolConfirmationOutcome.ProceedAlwaysAndSave
|
|
12620
12638
|
);
|
|
12621
12639
|
if (alwaysAndSaveIndex !== -1) {
|
|
12622
12640
|
initialIndex2 = alwaysAndSaveIndex;
|
|
@@ -12633,10 +12651,10 @@ ${deceptiveUrlWarnings.map(
|
|
|
12633
12651
|
{
|
|
12634
12652
|
questions: confirmationDetails.questions,
|
|
12635
12653
|
onSubmit: (answers) => {
|
|
12636
|
-
handleConfirm(
|
|
12654
|
+
handleConfirm(ToolConfirmationOutcome.ProceedOnce, { answers });
|
|
12637
12655
|
},
|
|
12638
12656
|
onCancel: () => {
|
|
12639
|
-
handleConfirm(
|
|
12657
|
+
handleConfirm(ToolConfirmationOutcome.Cancel);
|
|
12640
12658
|
},
|
|
12641
12659
|
width: terminalWidth,
|
|
12642
12660
|
availableHeight: bodyHeight
|
|
@@ -12657,19 +12675,19 @@ ${deceptiveUrlWarnings.map(
|
|
|
12657
12675
|
planPath: confirmationDetails.planPath,
|
|
12658
12676
|
getPreferredEditor,
|
|
12659
12677
|
onApprove: (approvalMode) => {
|
|
12660
|
-
handleConfirm(
|
|
12678
|
+
handleConfirm(ToolConfirmationOutcome.ProceedOnce, {
|
|
12661
12679
|
approved: true,
|
|
12662
12680
|
approvalMode
|
|
12663
12681
|
});
|
|
12664
12682
|
},
|
|
12665
12683
|
onFeedback: (feedback) => {
|
|
12666
|
-
handleConfirm(
|
|
12684
|
+
handleConfirm(ToolConfirmationOutcome.ProceedOnce, {
|
|
12667
12685
|
approved: false,
|
|
12668
12686
|
feedback
|
|
12669
12687
|
});
|
|
12670
12688
|
},
|
|
12671
12689
|
onCancel: () => {
|
|
12672
|
-
handleConfirm(
|
|
12690
|
+
handleConfirm(ToolConfirmationOutcome.Cancel);
|
|
12673
12691
|
},
|
|
12674
12692
|
width: terminalWidth,
|
|
12675
12693
|
availableHeight: bodyHeight
|
|
@@ -12779,7 +12797,7 @@ ${deceptiveUrlWarnings.map(
|
|
|
12779
12797
|
const containsRedirection = commandsToDisplay.some(
|
|
12780
12798
|
(cmd) => hasRedirection(cmd)
|
|
12781
12799
|
);
|
|
12782
|
-
const isAutoEdit = config.getApprovalMode() ===
|
|
12800
|
+
const isAutoEdit = config.getApprovalMode() === ApprovalMode.YOLO || config.getApprovalMode() === ApprovalMode.AUTO_EDIT;
|
|
12783
12801
|
let warnings = null;
|
|
12784
12802
|
if (containsRedirection && !isAutoEdit) {
|
|
12785
12803
|
const tipText = `To auto-accept, press ${formatCommand("app.cycleApprovalMode" /* CYCLE_APPROVAL_MODE */)}`;
|
|
@@ -12942,7 +12960,7 @@ ${deceptiveUrlWarnings.map(
|
|
|
12942
12960
|
const bodyOverflowDirection = confirmationDetails.type === "mcp" && isMcpToolDetailsExpanded ? "bottom" : "top";
|
|
12943
12961
|
const renderRadioItem = (0, import_react44.useCallback)(
|
|
12944
12962
|
(item, { titleColor }) => {
|
|
12945
|
-
if (item.value ===
|
|
12963
|
+
if (item.value === ToolConfirmationOutcome.ProceedAlwaysAndSave) {
|
|
12946
12964
|
return /* @__PURE__ */ (0, import_jsx_runtime67.jsxs)(Text, { color: titleColor, wrap: "truncate", children: [
|
|
12947
12965
|
item.label,
|
|
12948
12966
|
" ",
|
|
@@ -14941,7 +14959,7 @@ function validateAuthMethodWithSettings(authType, settings) {
|
|
|
14941
14959
|
if (settings.merged.security.auth.useExternal) {
|
|
14942
14960
|
return null;
|
|
14943
14961
|
}
|
|
14944
|
-
if (authType ===
|
|
14962
|
+
if (authType === AuthType.USE_GEMINI) {
|
|
14945
14963
|
return null;
|
|
14946
14964
|
}
|
|
14947
14965
|
return validateAuthMethod(authType);
|
|
@@ -14993,7 +15011,7 @@ var useAuthCommand = (settings, config, initialAuthError = null, initialAccountS
|
|
|
14993
15011
|
}
|
|
14994
15012
|
return;
|
|
14995
15013
|
}
|
|
14996
|
-
if (authType ===
|
|
15014
|
+
if (authType === AuthType.USE_GEMINI) {
|
|
14997
15015
|
const key = await reloadApiKey();
|
|
14998
15016
|
if (!key) {
|
|
14999
15017
|
setAuthState("awaiting_api_key_input" /* AwaitingApiKeyInput */);
|
|
@@ -15068,31 +15086,31 @@ function AuthDialog({
|
|
|
15068
15086
|
let items = [
|
|
15069
15087
|
{
|
|
15070
15088
|
label: "Sign in with Google",
|
|
15071
|
-
value:
|
|
15072
|
-
key:
|
|
15089
|
+
value: AuthType.LOGIN_WITH_GOOGLE,
|
|
15090
|
+
key: AuthType.LOGIN_WITH_GOOGLE
|
|
15073
15091
|
},
|
|
15074
15092
|
...process.env["CLOUD_SHELL"] === "true" ? [
|
|
15075
15093
|
{
|
|
15076
15094
|
label: "Use Cloud Shell user credentials",
|
|
15077
|
-
value:
|
|
15078
|
-
key:
|
|
15095
|
+
value: AuthType.COMPUTE_ADC,
|
|
15096
|
+
key: AuthType.COMPUTE_ADC
|
|
15079
15097
|
}
|
|
15080
15098
|
] : process.env["GEMINI_CLI_USE_COMPUTE_ADC"] === "true" ? [
|
|
15081
15099
|
{
|
|
15082
15100
|
label: "Use metadata server application default credentials",
|
|
15083
|
-
value:
|
|
15084
|
-
key:
|
|
15101
|
+
value: AuthType.COMPUTE_ADC,
|
|
15102
|
+
key: AuthType.COMPUTE_ADC
|
|
15085
15103
|
}
|
|
15086
15104
|
] : [],
|
|
15087
15105
|
{
|
|
15088
15106
|
label: "Use Gemini API Key",
|
|
15089
|
-
value:
|
|
15090
|
-
key:
|
|
15107
|
+
value: AuthType.USE_GEMINI,
|
|
15108
|
+
key: AuthType.USE_GEMINI
|
|
15091
15109
|
},
|
|
15092
15110
|
{
|
|
15093
15111
|
label: "Vertex AI",
|
|
15094
|
-
value:
|
|
15095
|
-
key:
|
|
15112
|
+
value: AuthType.USE_VERTEX_AI,
|
|
15113
|
+
key: AuthType.USE_VERTEX_AI
|
|
15096
15114
|
}
|
|
15097
15115
|
];
|
|
15098
15116
|
if (settings.merged.security.auth.enforcedType) {
|
|
@@ -15114,9 +15132,9 @@ function AuthDialog({
|
|
|
15114
15132
|
return item.value === defaultAuthType;
|
|
15115
15133
|
}
|
|
15116
15134
|
if (process.env["GEMINI_API_KEY"]) {
|
|
15117
|
-
return item.value ===
|
|
15135
|
+
return item.value === AuthType.USE_GEMINI;
|
|
15118
15136
|
}
|
|
15119
|
-
return item.value ===
|
|
15137
|
+
return item.value === AuthType.LOGIN_WITH_GOOGLE;
|
|
15120
15138
|
});
|
|
15121
15139
|
if (settings.merged.security.auth.enforcedType) {
|
|
15122
15140
|
initialAuthIndex = 0;
|
|
@@ -15127,19 +15145,19 @@ function AuthDialog({
|
|
|
15127
15145
|
return;
|
|
15128
15146
|
}
|
|
15129
15147
|
if (authType) {
|
|
15130
|
-
if (authType ===
|
|
15148
|
+
if (authType === AuthType.LOGIN_WITH_GOOGLE) {
|
|
15131
15149
|
setAuthContext({ requiresRestart: true });
|
|
15132
15150
|
} else {
|
|
15133
15151
|
setAuthContext({});
|
|
15134
15152
|
}
|
|
15135
15153
|
await clearCachedCredentialFile();
|
|
15136
15154
|
settings.setValue(scope, "security.auth.selectedType", authType);
|
|
15137
|
-
if (authType ===
|
|
15155
|
+
if (authType === AuthType.LOGIN_WITH_GOOGLE && config.isBrowserLaunchSuppressed()) {
|
|
15138
15156
|
setExiting(true);
|
|
15139
15157
|
setTimeout(relaunchApp, 100);
|
|
15140
15158
|
return;
|
|
15141
15159
|
}
|
|
15142
|
-
if (authType ===
|
|
15160
|
+
if (authType === AuthType.USE_GEMINI) {
|
|
15143
15161
|
setAuthState("awaiting_api_key_input" /* AwaitingApiKeyInput */);
|
|
15144
15162
|
return;
|
|
15145
15163
|
}
|
|
@@ -15889,11 +15907,11 @@ var PrivacyNoticeText = ({
|
|
|
15889
15907
|
}) => {
|
|
15890
15908
|
const authType = config.getContentGeneratorConfig()?.authType;
|
|
15891
15909
|
switch (authType) {
|
|
15892
|
-
case
|
|
15910
|
+
case AuthType.USE_GEMINI:
|
|
15893
15911
|
return /* @__PURE__ */ (0, import_jsx_runtime85.jsx)(GeminiPrivacyNotice, { onExit });
|
|
15894
|
-
case
|
|
15912
|
+
case AuthType.USE_VERTEX_AI:
|
|
15895
15913
|
return /* @__PURE__ */ (0, import_jsx_runtime85.jsx)(CloudPaidPrivacyNotice, { onExit });
|
|
15896
|
-
case
|
|
15914
|
+
case AuthType.LOGIN_WITH_GOOGLE:
|
|
15897
15915
|
default:
|
|
15898
15916
|
return /* @__PURE__ */ (0, import_jsx_runtime85.jsx)(CloudFreePrivacyNotice, { config, onExit });
|
|
15899
15917
|
}
|
|
@@ -15934,7 +15952,7 @@ function ProQuotaDialog({
|
|
|
15934
15952
|
value: "retry_always",
|
|
15935
15953
|
key: "retry_always"
|
|
15936
15954
|
},
|
|
15937
|
-
...authType ===
|
|
15955
|
+
...authType === AuthType.LOGIN_WITH_GOOGLE && !isUltra ? [
|
|
15938
15956
|
{
|
|
15939
15957
|
label: "Upgrade for higher limits",
|
|
15940
15958
|
value: "upgrade",
|
|
@@ -17087,7 +17105,7 @@ function ModelDialog({ onClose }) {
|
|
|
17087
17105
|
const useGemini31 = config?.getGemini31LaunchedSync?.() ?? false;
|
|
17088
17106
|
const useGemini31FlashLite = config?.getGemini31FlashLiteLaunchedSync?.() ?? false;
|
|
17089
17107
|
const selectedAuthType = settings.merged.security.auth.selectedType;
|
|
17090
|
-
const useCustomToolModel = useGemini31 && selectedAuthType ===
|
|
17108
|
+
const useCustomToolModel = useGemini31 && selectedAuthType === AuthType.USE_GEMINI;
|
|
17091
17109
|
const manualModelSelected = (0, import_react62.useMemo)(() => {
|
|
17092
17110
|
if (config?.getExperimentalDynamicModelConfiguration?.() === true && config.getModelConfigService) {
|
|
17093
17111
|
const def = config.getModelConfigService().getModelDefinition(preferredModel);
|
|
@@ -18339,10 +18357,10 @@ function initializeConsoleStore() {
|
|
|
18339
18357
|
globalConsoleMessages = [];
|
|
18340
18358
|
globalErrorCount = 0;
|
|
18341
18359
|
notifyListeners();
|
|
18342
|
-
coreEvents.off(
|
|
18343
|
-
coreEvents.off(
|
|
18344
|
-
coreEvents.on(
|
|
18345
|
-
coreEvents.on(
|
|
18360
|
+
coreEvents.off(CoreEvent.ConsoleLog, handleConsoleLog);
|
|
18361
|
+
coreEvents.off(CoreEvent.Output, handleOutput);
|
|
18362
|
+
coreEvents.on(CoreEvent.ConsoleLog, handleConsoleLog);
|
|
18363
|
+
coreEvents.on(CoreEvent.Output, handleOutput);
|
|
18346
18364
|
}
|
|
18347
18365
|
function notifyListeners() {
|
|
18348
18366
|
for (const listener of listeners) {
|
|
@@ -20443,7 +20461,7 @@ function usePromptCompletion({
|
|
|
20443
20461
|
{ model: "prompt-completion" },
|
|
20444
20462
|
contents,
|
|
20445
20463
|
signal,
|
|
20446
|
-
|
|
20464
|
+
LlmRole.UTILITY_AUTOCOMPLETE
|
|
20447
20465
|
);
|
|
20448
20466
|
if (signal.aborted) {
|
|
20449
20467
|
return;
|
|
@@ -22505,9 +22523,9 @@ var InputPrompt = ({
|
|
|
22505
22523
|
onSuggestionsVisibilityChange(shouldShowSuggestions);
|
|
22506
22524
|
}
|
|
22507
22525
|
}, [shouldShowSuggestions, onSuggestionsVisibilityChange]);
|
|
22508
|
-
const showAutoAcceptStyling = !shellModeActive && approvalMode ===
|
|
22509
|
-
const showYoloStyling = !shellModeActive && approvalMode ===
|
|
22510
|
-
const showPlanStyling = !shellModeActive && approvalMode ===
|
|
22526
|
+
const showAutoAcceptStyling = !shellModeActive && approvalMode === ApprovalMode.AUTO_EDIT;
|
|
22527
|
+
const showYoloStyling = !shellModeActive && approvalMode === ApprovalMode.YOLO;
|
|
22528
|
+
const showPlanStyling = !shellModeActive && approvalMode === ApprovalMode.PLAN;
|
|
22511
22529
|
let statusColor;
|
|
22512
22530
|
let statusText = "";
|
|
22513
22531
|
if (shellModeActive) {
|
|
@@ -23349,22 +23367,22 @@ var ApprovalModeIndicator = ({
|
|
|
23349
23367
|
const cycleHint = formatCommand("app.cycleApprovalMode" /* CYCLE_APPROVAL_MODE */);
|
|
23350
23368
|
const yoloHint = formatCommand("app.toggleYolo" /* TOGGLE_YOLO */);
|
|
23351
23369
|
switch (approvalMode) {
|
|
23352
|
-
case
|
|
23370
|
+
case ApprovalMode.AUTO_EDIT:
|
|
23353
23371
|
textColor = theme.status.warning;
|
|
23354
23372
|
textContent = "auto-accept edits";
|
|
23355
23373
|
subText = allowPlanMode ? `${cycleHint} to plan` : `${cycleHint} to manual`;
|
|
23356
23374
|
break;
|
|
23357
|
-
case
|
|
23375
|
+
case ApprovalMode.PLAN:
|
|
23358
23376
|
textColor = theme.status.success;
|
|
23359
23377
|
textContent = "plan";
|
|
23360
23378
|
subText = `${cycleHint} to manual`;
|
|
23361
23379
|
break;
|
|
23362
|
-
case
|
|
23380
|
+
case ApprovalMode.YOLO:
|
|
23363
23381
|
textColor = theme.status.error;
|
|
23364
23382
|
textContent = "YOLO";
|
|
23365
23383
|
subText = yoloHint;
|
|
23366
23384
|
break;
|
|
23367
|
-
case
|
|
23385
|
+
case ApprovalMode.DEFAULT:
|
|
23368
23386
|
default:
|
|
23369
23387
|
textColor = theme.text.accent;
|
|
23370
23388
|
textContent = "";
|
|
@@ -23412,7 +23430,7 @@ var useComposerStatus = () => {
|
|
|
23412
23430
|
(item) => item.type === "tool_group"
|
|
23413
23431
|
).some(
|
|
23414
23432
|
(item) => item.tools.some(
|
|
23415
|
-
(tool) => tool.status ===
|
|
23433
|
+
(tool) => tool.status === CoreToolCallStatus.AwaitingApproval
|
|
23416
23434
|
)
|
|
23417
23435
|
),
|
|
23418
23436
|
[uiState.pendingHistoryItems]
|
|
@@ -23427,13 +23445,13 @@ var useComposerStatus = () => {
|
|
|
23427
23445
|
const hideMinimalModeHintWhileBusy = !uiState.cleanUiDetailsVisible && (showLoadingIndicator || uiState.activeHooks.length > 0);
|
|
23428
23446
|
if (hideMinimalModeHintWhileBusy) return null;
|
|
23429
23447
|
switch (showApprovalModeIndicator) {
|
|
23430
|
-
case
|
|
23448
|
+
case ApprovalMode.YOLO:
|
|
23431
23449
|
return { text: "YOLO", color: theme.status.error };
|
|
23432
|
-
case
|
|
23450
|
+
case ApprovalMode.PLAN:
|
|
23433
23451
|
return { text: "plan", color: theme.status.success };
|
|
23434
|
-
case
|
|
23452
|
+
case ApprovalMode.AUTO_EDIT:
|
|
23435
23453
|
return { text: "auto edit", color: theme.status.warning };
|
|
23436
|
-
case
|
|
23454
|
+
case ApprovalMode.DEFAULT:
|
|
23437
23455
|
default:
|
|
23438
23456
|
return null;
|
|
23439
23457
|
}
|
|
@@ -23787,7 +23805,7 @@ var ConfigInitDisplay = ({
|
|
|
23787
23805
|
let connected = 0;
|
|
23788
23806
|
const connecting = [];
|
|
23789
23807
|
for (const [name, client] of clients.entries()) {
|
|
23790
|
-
if (client.getStatus() ===
|
|
23808
|
+
if (client.getStatus() === MCPServerStatus.CONNECTED) {
|
|
23791
23809
|
connected++;
|
|
23792
23810
|
} else {
|
|
23793
23811
|
connecting.push(name);
|
|
@@ -23809,9 +23827,9 @@ var ConfigInitDisplay = ({
|
|
|
23809
23827
|
);
|
|
23810
23828
|
}
|
|
23811
23829
|
};
|
|
23812
|
-
coreEvents.on(
|
|
23830
|
+
coreEvents.on(CoreEvent.McpClientUpdate, onChange);
|
|
23813
23831
|
return () => {
|
|
23814
|
-
coreEvents.off(
|
|
23832
|
+
coreEvents.off(CoreEvent.McpClientUpdate, onChange);
|
|
23815
23833
|
};
|
|
23816
23834
|
}, [initialMessage]);
|
|
23817
23835
|
return /* @__PURE__ */ (0, import_jsx_runtime123.jsx)(Box_default, { marginTop: 1, children: /* @__PURE__ */ (0, import_jsx_runtime123.jsxs)(Text, { children: [
|
|
@@ -24526,7 +24544,7 @@ var useExecutionLifecycle = (addItemToHistory, setPendingHistoryItem, onExec, on
|
|
|
24526
24544
|
callId,
|
|
24527
24545
|
name: SHELL_COMMAND_NAME,
|
|
24528
24546
|
description: rawQuery,
|
|
24529
|
-
status:
|
|
24547
|
+
status: CoreToolCallStatus.Executing,
|
|
24530
24548
|
isClientInitiated: true,
|
|
24531
24549
|
resultDisplay: "",
|
|
24532
24550
|
confirmationDetails: void 0
|
|
@@ -24667,7 +24685,7 @@ __code=$?; pwd > ${escapedPwdFilePath}; exit $__code`;
|
|
|
24667
24685
|
mainContent = result.output.trim() || "(Command produced no output)";
|
|
24668
24686
|
}
|
|
24669
24687
|
let finalOutput = result.ansiOutput && result.ansiOutput.length > 0 ? result.ansiOutput : mainContent;
|
|
24670
|
-
let finalStatus =
|
|
24688
|
+
let finalStatus = CoreToolCallStatus.Success;
|
|
24671
24689
|
const prependToAnsiOutput = (output, text) => {
|
|
24672
24690
|
const newLines = text.split("\n").map((line) => [
|
|
24673
24691
|
{
|
|
@@ -24686,20 +24704,20 @@ __code=$?; pwd > ${escapedPwdFilePath}; exit $__code`;
|
|
|
24686
24704
|
};
|
|
24687
24705
|
let prefix = "";
|
|
24688
24706
|
if (result.error) {
|
|
24689
|
-
finalStatus =
|
|
24707
|
+
finalStatus = CoreToolCallStatus.Error;
|
|
24690
24708
|
prefix = result.error.message;
|
|
24691
24709
|
} else if (result.aborted) {
|
|
24692
|
-
finalStatus =
|
|
24710
|
+
finalStatus = CoreToolCallStatus.Cancelled;
|
|
24693
24711
|
prefix = "Command was cancelled.";
|
|
24694
24712
|
} else if (result.backgrounded) {
|
|
24695
|
-
finalStatus =
|
|
24713
|
+
finalStatus = CoreToolCallStatus.Success;
|
|
24696
24714
|
finalOutput = `Command moved to background (PID: ${result.pid}). Output hidden. Press Ctrl+B to view.`;
|
|
24697
24715
|
mainContent = finalOutput;
|
|
24698
24716
|
} else if (result.signal) {
|
|
24699
|
-
finalStatus =
|
|
24717
|
+
finalStatus = CoreToolCallStatus.Error;
|
|
24700
24718
|
prefix = `Command terminated by signal: ${result.signal}.`;
|
|
24701
24719
|
} else if (result.exitCode !== 0) {
|
|
24702
|
-
finalStatus =
|
|
24720
|
+
finalStatus = CoreToolCallStatus.Error;
|
|
24703
24721
|
prefix = `Command exited with code ${result.exitCode}.`;
|
|
24704
24722
|
}
|
|
24705
24723
|
if (prefix) {
|
|
@@ -24725,7 +24743,7 @@ ${mainContent}`;
|
|
|
24725
24743
|
status: finalStatus,
|
|
24726
24744
|
resultDisplay: finalOutput
|
|
24727
24745
|
};
|
|
24728
|
-
if (finalStatus !==
|
|
24746
|
+
if (finalStatus !== CoreToolCallStatus.Cancelled) {
|
|
24729
24747
|
addItemToHistory(
|
|
24730
24748
|
{
|
|
24731
24749
|
type: "tool_group",
|
|
@@ -25715,7 +25733,7 @@ function useQuotaAndFallback({
|
|
|
25715
25733
|
error.retryDelayMs ? `Access resets at ${getResetTimeMessage(error.retryDelayMs)}.` : null,
|
|
25716
25734
|
`/stats model for usage details`,
|
|
25717
25735
|
`/model to switch models.`,
|
|
25718
|
-
contentGeneratorConfig?.authType ===
|
|
25736
|
+
contentGeneratorConfig?.authType === AuthType.LOGIN_WITH_GOOGLE ? `/auth to switch to API key.` : null
|
|
25719
25737
|
].filter(Boolean);
|
|
25720
25738
|
message = messageLines.join("\n");
|
|
25721
25739
|
} else if (error instanceof ModelNotFoundError) {
|
|
@@ -25903,7 +25921,7 @@ var useEditorSettings = (loadedSettings, setEditorError, addItem) => {
|
|
|
25903
25921
|
);
|
|
25904
25922
|
setEditorError(null);
|
|
25905
25923
|
setIsEditorDialogOpen(false);
|
|
25906
|
-
coreEvents.emit(
|
|
25924
|
+
coreEvents.emit(CoreEvent.EditorSelected, { editor: editorType });
|
|
25907
25925
|
} catch (error) {
|
|
25908
25926
|
setEditorError(`Failed to set editor preference: ${error}`);
|
|
25909
25927
|
}
|
|
@@ -25912,7 +25930,7 @@ var useEditorSettings = (loadedSettings, setEditorError, addItem) => {
|
|
|
25912
25930
|
);
|
|
25913
25931
|
const exitEditorDialog = (0, import_react97.useCallback)(() => {
|
|
25914
25932
|
setIsEditorDialogOpen(false);
|
|
25915
|
-
coreEvents.emit(
|
|
25933
|
+
coreEvents.emit(CoreEvent.EditorSelected, { editor: void 0 });
|
|
25916
25934
|
}, []);
|
|
25917
25935
|
return {
|
|
25918
25936
|
isEditorDialogOpen,
|
|
@@ -26289,7 +26307,7 @@ var useSlashCommandProcessor = (config, settings, addItem, clearItems, loadHisto
|
|
|
26289
26307
|
canonicalPath: resolvedCommandPath
|
|
26290
26308
|
} = parseSlashCommand(trimmed, commands);
|
|
26291
26309
|
if (!commandToExecute) {
|
|
26292
|
-
const isMcpLoading = config?.getMcpClientManager()?.getDiscoveryState() ===
|
|
26310
|
+
const isMcpLoading = config?.getMcpClientManager()?.getDiscoveryState() === MCPDiscoveryState.IN_PROGRESS;
|
|
26293
26311
|
if (isMcpLoading) {
|
|
26294
26312
|
setIsProcessing(true);
|
|
26295
26313
|
if (addToHistory) {
|
|
@@ -26460,7 +26478,7 @@ var useSlashCommandProcessor = (config, settings, addItem, clearItems, loadHisto
|
|
|
26460
26478
|
onConfirm: async (resolvedOutcome) => {
|
|
26461
26479
|
resolve3({
|
|
26462
26480
|
outcome: resolvedOutcome,
|
|
26463
|
-
approvedCommands: resolvedOutcome ===
|
|
26481
|
+
approvedCommands: resolvedOutcome === ToolConfirmationOutcome.Cancel ? [] : result.commandsToConfirm
|
|
26464
26482
|
});
|
|
26465
26483
|
}
|
|
26466
26484
|
};
|
|
@@ -26468,7 +26486,7 @@ var useSlashCommandProcessor = (config, settings, addItem, clearItems, loadHisto
|
|
|
26468
26486
|
callId,
|
|
26469
26487
|
name: "Expansion",
|
|
26470
26488
|
description: "Command expansion needs shell access",
|
|
26471
|
-
status:
|
|
26489
|
+
status: CoreToolCallStatus.AwaitingApproval,
|
|
26472
26490
|
isClientInitiated: true,
|
|
26473
26491
|
resultDisplay: void 0,
|
|
26474
26492
|
confirmationDetails
|
|
@@ -26479,7 +26497,7 @@ var useSlashCommandProcessor = (config, settings, addItem, clearItems, loadHisto
|
|
|
26479
26497
|
});
|
|
26480
26498
|
});
|
|
26481
26499
|
setPendingItem(null);
|
|
26482
|
-
if (outcome ===
|
|
26500
|
+
if (outcome === ToolConfirmationOutcome.Cancel || !approvedCommands || approvedCommands.length === 0) {
|
|
26483
26501
|
addItem(
|
|
26484
26502
|
{
|
|
26485
26503
|
type: "info" /* INFO */,
|
|
@@ -26489,7 +26507,7 @@ var useSlashCommandProcessor = (config, settings, addItem, clearItems, loadHisto
|
|
|
26489
26507
|
);
|
|
26490
26508
|
return { type: "handled" };
|
|
26491
26509
|
}
|
|
26492
|
-
if (outcome ===
|
|
26510
|
+
if (outcome === ToolConfirmationOutcome.ProceedAlways) {
|
|
26493
26511
|
setSessionShellAllowlist(
|
|
26494
26512
|
(prev) => /* @__PURE__ */ new Set([...prev, ...approvedCommands])
|
|
26495
26513
|
);
|
|
@@ -26965,7 +26983,7 @@ function mapToDisplay(toolOrTools, options = {}) {
|
|
|
26965
26983
|
let description;
|
|
26966
26984
|
let renderOutputAsMarkdown = false;
|
|
26967
26985
|
const displayName = call.tool?.displayName ?? call.request.name;
|
|
26968
|
-
if (call.status ===
|
|
26986
|
+
if (call.status === CoreToolCallStatus.Error) {
|
|
26969
26987
|
description = JSON.stringify(call.request.args);
|
|
26970
26988
|
} else {
|
|
26971
26989
|
description = call.invocation.getDescription();
|
|
@@ -26988,27 +27006,27 @@ function mapToDisplay(toolOrTools, options = {}) {
|
|
|
26988
27006
|
let progress = void 0;
|
|
26989
27007
|
let progressTotal = void 0;
|
|
26990
27008
|
switch (call.status) {
|
|
26991
|
-
case
|
|
27009
|
+
case CoreToolCallStatus.Success:
|
|
26992
27010
|
resultDisplay = call.response.resultDisplay;
|
|
26993
27011
|
outputFile = call.response.outputFile;
|
|
26994
27012
|
break;
|
|
26995
|
-
case
|
|
26996
|
-
case
|
|
27013
|
+
case CoreToolCallStatus.Error:
|
|
27014
|
+
case CoreToolCallStatus.Cancelled:
|
|
26997
27015
|
resultDisplay = call.response.resultDisplay;
|
|
26998
27016
|
break;
|
|
26999
|
-
case
|
|
27017
|
+
case CoreToolCallStatus.AwaitingApproval:
|
|
27000
27018
|
correlationId = call.correlationId;
|
|
27001
27019
|
confirmationDetails = call.confirmationDetails;
|
|
27002
27020
|
break;
|
|
27003
|
-
case
|
|
27021
|
+
case CoreToolCallStatus.Executing:
|
|
27004
27022
|
resultDisplay = call.liveOutput;
|
|
27005
27023
|
ptyId = call.pid;
|
|
27006
27024
|
progressMessage = call.progressMessage;
|
|
27007
27025
|
progress = call.progress;
|
|
27008
27026
|
progressTotal = call.progressTotal;
|
|
27009
27027
|
break;
|
|
27010
|
-
case
|
|
27011
|
-
case
|
|
27028
|
+
case CoreToolCallStatus.Scheduled:
|
|
27029
|
+
case CoreToolCallStatus.Validating:
|
|
27012
27030
|
break;
|
|
27013
27031
|
default: {
|
|
27014
27032
|
const exhaustiveCheck = call;
|
|
@@ -27079,7 +27097,7 @@ function useToolScheduler(onComplete, config, getPreferredEditor) {
|
|
|
27079
27097
|
const handler = (event) => {
|
|
27080
27098
|
const isRoot = event.schedulerId === ROOT_SCHEDULER_ID;
|
|
27081
27099
|
const hasExecuting = event.toolCalls.some(
|
|
27082
|
-
(tc) => tc.status ===
|
|
27100
|
+
(tc) => tc.status === CoreToolCallStatus.Executing || (tc.status === CoreToolCallStatus.Success || tc.status === CoreToolCallStatus.Error) && "tailToolCallRequest" in tc && tc.tailToolCallRequest != null
|
|
27083
27101
|
);
|
|
27084
27102
|
if (hasExecuting) {
|
|
27085
27103
|
setLastToolOutputTime(Date.now());
|
|
@@ -27088,7 +27106,7 @@ function useToolScheduler(onComplete, config, getPreferredEditor) {
|
|
|
27088
27106
|
const prevCalls = prev[event.schedulerId] ?? [];
|
|
27089
27107
|
const prevCallIds = new Set(prevCalls.map((tc) => tc.request.callId));
|
|
27090
27108
|
const filteredToolCalls = isRoot ? event.toolCalls : event.toolCalls.filter(
|
|
27091
|
-
(tc) => tc.status ===
|
|
27109
|
+
(tc) => tc.status === CoreToolCallStatus.AwaitingApproval || prevCallIds.has(tc.request.callId)
|
|
27092
27110
|
);
|
|
27093
27111
|
if (!isRoot && filteredToolCalls.length === 0 && prevCalls.length === 0) {
|
|
27094
27112
|
return prev;
|
|
@@ -27100,9 +27118,9 @@ function useToolScheduler(onComplete, config, getPreferredEditor) {
|
|
|
27100
27118
|
};
|
|
27101
27119
|
});
|
|
27102
27120
|
};
|
|
27103
|
-
messageBus.subscribe(
|
|
27121
|
+
messageBus.subscribe(MessageBusType.TOOL_CALLS_UPDATE, handler);
|
|
27104
27122
|
return () => {
|
|
27105
|
-
messageBus.unsubscribe(
|
|
27123
|
+
messageBus.unsubscribe(MessageBusType.TOOL_CALLS_UPDATE, handler);
|
|
27106
27124
|
};
|
|
27107
27125
|
}, [messageBus, internalAdaptToolCalls]);
|
|
27108
27126
|
(0, import_react104.useEffect)(() => {
|
|
@@ -27124,9 +27142,9 @@ function useToolScheduler(onComplete, config, getPreferredEditor) {
|
|
|
27124
27142
|
};
|
|
27125
27143
|
});
|
|
27126
27144
|
};
|
|
27127
|
-
messageBus.subscribe(
|
|
27145
|
+
messageBus.subscribe(MessageBusType.SUBAGENT_ACTIVITY, handler);
|
|
27128
27146
|
return () => {
|
|
27129
|
-
messageBus.unsubscribe(
|
|
27147
|
+
messageBus.unsubscribe(MessageBusType.SUBAGENT_ACTIVITY, handler);
|
|
27130
27148
|
};
|
|
27131
27149
|
}, [messageBus]);
|
|
27132
27150
|
const schedule = (0, import_react104.useCallback)(
|
|
@@ -27225,8 +27243,8 @@ function adaptToolCalls(coreCalls, prevTracked) {
|
|
|
27225
27243
|
const prev = prevMap.get(coreCall.request.callId);
|
|
27226
27244
|
const responseSubmittedToGemini = prev?.responseSubmittedToGemini ?? false;
|
|
27227
27245
|
let status = coreCall.status;
|
|
27228
|
-
if ((status ===
|
|
27229
|
-
status =
|
|
27246
|
+
if ((status === CoreToolCallStatus.Success || status === CoreToolCallStatus.Error) && "tailToolCallRequest" in coreCall && coreCall.tailToolCallRequest != null) {
|
|
27247
|
+
status = CoreToolCallStatus.Executing;
|
|
27230
27248
|
}
|
|
27231
27249
|
return {
|
|
27232
27250
|
...coreCall,
|
|
@@ -27258,7 +27276,7 @@ function getBackgroundedToolInfo(toolCall) {
|
|
|
27258
27276
|
};
|
|
27259
27277
|
}
|
|
27260
27278
|
function isBackgroundableExecutingToolCall(toolCall) {
|
|
27261
|
-
return toolCall.status ===
|
|
27279
|
+
return toolCall.status === CoreToolCallStatus.Executing && typeof toolCall.pid === "number";
|
|
27262
27280
|
}
|
|
27263
27281
|
function showCitations(settings) {
|
|
27264
27282
|
const enabled = settings.merged.ui.showCitations;
|
|
@@ -27268,14 +27286,14 @@ function showCitations(settings) {
|
|
|
27268
27286
|
return true;
|
|
27269
27287
|
}
|
|
27270
27288
|
function calculateStreamingState(isResponding, toolCalls) {
|
|
27271
|
-
if (toolCalls.some((tc) => tc.status ===
|
|
27289
|
+
if (toolCalls.some((tc) => tc.status === CoreToolCallStatus.AwaitingApproval)) {
|
|
27272
27290
|
return "waiting_for_confirmation" /* WaitingForConfirmation */;
|
|
27273
27291
|
}
|
|
27274
27292
|
const isAnyToolActive = toolCalls.some((tc) => {
|
|
27275
|
-
if (tc.status ===
|
|
27293
|
+
if (tc.status === CoreToolCallStatus.Executing || tc.status === CoreToolCallStatus.Scheduled || tc.status === CoreToolCallStatus.Validating) {
|
|
27276
27294
|
return true;
|
|
27277
27295
|
}
|
|
27278
|
-
if (tc.status ===
|
|
27296
|
+
if (tc.status === CoreToolCallStatus.Success || tc.status === CoreToolCallStatus.Error || tc.status === CoreToolCallStatus.Cancelled) {
|
|
27279
27297
|
return !tc.responseSubmittedToGemini;
|
|
27280
27298
|
}
|
|
27281
27299
|
return false;
|
|
@@ -27322,9 +27340,9 @@ var useGeminiStream = (geminiClient, history, addItem, config, settings, onDebug
|
|
|
27322
27340
|
}
|
|
27323
27341
|
setRetryStatus(payload);
|
|
27324
27342
|
};
|
|
27325
|
-
coreEvents.on(
|
|
27343
|
+
coreEvents.on(CoreEvent.RetryAttempt, handleRetryAttempt);
|
|
27326
27344
|
return () => {
|
|
27327
|
-
coreEvents.off(
|
|
27345
|
+
coreEvents.off(CoreEvent.RetryAttempt, handleRetryAttempt);
|
|
27328
27346
|
};
|
|
27329
27347
|
}, [isRespondingRef]);
|
|
27330
27348
|
const [
|
|
@@ -27457,12 +27475,12 @@ var useGeminiStream = (geminiClient, history, addItem, config, settings, onDebug
|
|
|
27457
27475
|
const tc = toolCalls[i];
|
|
27458
27476
|
if (pushedToolCallIdsRef.current.has(tc.request.callId)) continue;
|
|
27459
27477
|
if (tc.status === "success" || tc.status === "error" || tc.status === "cancelled") {
|
|
27460
|
-
const isAgent = tc.tool?.kind ===
|
|
27478
|
+
const isAgent = tc.tool?.kind === Kind.Agent;
|
|
27461
27479
|
if (isAgent) {
|
|
27462
27480
|
let contigAgentsComplete = true;
|
|
27463
27481
|
for (let j = i + 1; j < toolCalls.length; j++) {
|
|
27464
27482
|
const nextTc = toolCalls[j];
|
|
27465
|
-
if (nextTc.tool?.kind ===
|
|
27483
|
+
if (nextTc.tool?.kind === Kind.Agent) {
|
|
27466
27484
|
if (nextTc.status !== "success" && nextTc.status !== "error" && nextTc.status !== "cancelled") {
|
|
27467
27485
|
contigAgentsComplete = false;
|
|
27468
27486
|
break;
|
|
@@ -27488,7 +27506,7 @@ var useGeminiStream = (geminiClient, history, addItem, config, settings, onDebug
|
|
|
27488
27506
|
let currentGroup = [];
|
|
27489
27507
|
for (const tc of toolsToPush) {
|
|
27490
27508
|
newPushed.add(tc.request.callId);
|
|
27491
|
-
if (tc.tool?.kind ===
|
|
27509
|
+
if (tc.tool?.kind === Kind.Agent) {
|
|
27492
27510
|
currentGroup.push(tc);
|
|
27493
27511
|
} else {
|
|
27494
27512
|
if (currentGroup.length > 0) {
|
|
@@ -27638,7 +27656,7 @@ var useGeminiStream = (geminiClient, history, addItem, config, settings, onDebug
|
|
|
27638
27656
|
prevActiveShellPtyIdRef.current = activeShellPtyId;
|
|
27639
27657
|
}, [activeShellPtyId, addItem, setIsResponding]);
|
|
27640
27658
|
(0, import_react105.useEffect)(() => {
|
|
27641
|
-
if (config.getApprovalMode() ===
|
|
27659
|
+
if (config.getApprovalMode() === ApprovalMode.YOLO && streamingState === "idle" /* Idle */) {
|
|
27642
27660
|
const lastUserMessageIndex = history.findLastIndex(
|
|
27643
27661
|
(item) => item.type === "user" /* USER */
|
|
27644
27662
|
);
|
|
@@ -27724,7 +27742,7 @@ var useGeminiStream = (geminiClient, history, addItem, config, settings, onDebug
|
|
|
27724
27742
|
if (tool.name === SHELL_COMMAND_NAME) {
|
|
27725
27743
|
return {
|
|
27726
27744
|
...tool,
|
|
27727
|
-
status:
|
|
27745
|
+
status: CoreToolCallStatus.Cancelled,
|
|
27728
27746
|
resultDisplay: tool.resultDisplay
|
|
27729
27747
|
};
|
|
27730
27748
|
}
|
|
@@ -27780,7 +27798,7 @@ var useGeminiStream = (geminiClient, history, addItem, config, settings, onDebug
|
|
|
27780
27798
|
let localQueryToSendToGemini = null;
|
|
27781
27799
|
if (typeof query === "string") {
|
|
27782
27800
|
const trimmedQuery = query.trim();
|
|
27783
|
-
await logger?.logMessage(
|
|
27801
|
+
await logger?.logMessage(MessageSenderType.USER, trimmedQuery);
|
|
27784
27802
|
if (!shellModeActive) {
|
|
27785
27803
|
const slashCommandResult = isSlashCommand(trimmedQuery) ? await handleSlashCommand(trimmedQuery) : false;
|
|
27786
27804
|
if (slashCommandResult) {
|
|
@@ -27936,7 +27954,7 @@ var useGeminiStream = (geminiClient, history, addItem, config, settings, onDebug
|
|
|
27936
27954
|
if (pendingHistoryItemRef.current) {
|
|
27937
27955
|
if (pendingHistoryItemRef.current.type === "tool_group") {
|
|
27938
27956
|
const updatedTools = pendingHistoryItemRef.current.tools.map(
|
|
27939
|
-
(tool) => tool.status ===
|
|
27957
|
+
(tool) => tool.status === CoreToolCallStatus.Validating || tool.status === CoreToolCallStatus.Scheduled || tool.status === CoreToolCallStatus.AwaitingApproval || tool.status === CoreToolCallStatus.Executing ? { ...tool, status: CoreToolCallStatus.Cancelled } : tool
|
|
27940
27958
|
);
|
|
27941
27959
|
const pendingItem = {
|
|
27942
27960
|
...pendingHistoryItemRef.current,
|
|
@@ -28182,15 +28200,15 @@ var useGeminiStream = (geminiClient, history, addItem, config, settings, onDebug
|
|
|
28182
28200
|
let geminiMessageBuffer = "";
|
|
28183
28201
|
const toolCallRequests = [];
|
|
28184
28202
|
for await (const event of stream) {
|
|
28185
|
-
if (event.type !==
|
|
28203
|
+
if (event.type !== GeminiEventType.Thought && thoughtRef.current !== null) {
|
|
28186
28204
|
setThought(null);
|
|
28187
28205
|
}
|
|
28188
28206
|
switch (event.type) {
|
|
28189
|
-
case
|
|
28207
|
+
case GeminiEventType.Thought:
|
|
28190
28208
|
setLastGeminiActivityTime(Date.now());
|
|
28191
28209
|
handleThoughtEvent(event.value, userMessageTimestamp);
|
|
28192
28210
|
break;
|
|
28193
|
-
case
|
|
28211
|
+
case GeminiEventType.Content:
|
|
28194
28212
|
setLastGeminiActivityTime(Date.now());
|
|
28195
28213
|
geminiMessageBuffer = handleContentEvent(
|
|
28196
28214
|
event.value,
|
|
@@ -28198,16 +28216,16 @@ var useGeminiStream = (geminiClient, history, addItem, config, settings, onDebug
|
|
|
28198
28216
|
userMessageTimestamp
|
|
28199
28217
|
);
|
|
28200
28218
|
break;
|
|
28201
|
-
case
|
|
28219
|
+
case GeminiEventType.ToolCallRequest:
|
|
28202
28220
|
toolCallRequests.push(event.value);
|
|
28203
28221
|
break;
|
|
28204
|
-
case
|
|
28222
|
+
case GeminiEventType.UserCancelled:
|
|
28205
28223
|
handleUserCancelledEvent(userMessageTimestamp);
|
|
28206
28224
|
break;
|
|
28207
|
-
case
|
|
28225
|
+
case GeminiEventType.Error:
|
|
28208
28226
|
handleErrorEvent(event.value, userMessageTimestamp);
|
|
28209
28227
|
break;
|
|
28210
|
-
case
|
|
28228
|
+
case GeminiEventType.AgentExecutionStopped:
|
|
28211
28229
|
handleAgentExecutionStoppedEvent(
|
|
28212
28230
|
event.value.reason,
|
|
28213
28231
|
userMessageTimestamp,
|
|
@@ -28215,7 +28233,7 @@ var useGeminiStream = (geminiClient, history, addItem, config, settings, onDebug
|
|
|
28215
28233
|
event.value.contextCleared
|
|
28216
28234
|
);
|
|
28217
28235
|
break;
|
|
28218
|
-
case
|
|
28236
|
+
case GeminiEventType.AgentExecutionBlocked:
|
|
28219
28237
|
handleAgentExecutionBlockedEvent(
|
|
28220
28238
|
event.value.reason,
|
|
28221
28239
|
userMessageTimestamp,
|
|
@@ -28223,35 +28241,35 @@ var useGeminiStream = (geminiClient, history, addItem, config, settings, onDebug
|
|
|
28223
28241
|
event.value.contextCleared
|
|
28224
28242
|
);
|
|
28225
28243
|
break;
|
|
28226
|
-
case
|
|
28244
|
+
case GeminiEventType.ChatCompressed:
|
|
28227
28245
|
handleChatCompressionEvent(event.value, userMessageTimestamp);
|
|
28228
28246
|
break;
|
|
28229
|
-
case
|
|
28230
|
-
case
|
|
28247
|
+
case GeminiEventType.ToolCallConfirmation:
|
|
28248
|
+
case GeminiEventType.ToolCallResponse:
|
|
28231
28249
|
break;
|
|
28232
|
-
case
|
|
28250
|
+
case GeminiEventType.MaxSessionTurns:
|
|
28233
28251
|
handleMaxSessionTurnsEvent();
|
|
28234
28252
|
break;
|
|
28235
|
-
case
|
|
28253
|
+
case GeminiEventType.ContextWindowWillOverflow:
|
|
28236
28254
|
handleContextWindowWillOverflowEvent(
|
|
28237
28255
|
event.value.estimatedRequestTokenCount,
|
|
28238
28256
|
event.value.remainingTokenCount
|
|
28239
28257
|
);
|
|
28240
28258
|
break;
|
|
28241
|
-
case
|
|
28259
|
+
case GeminiEventType.Finished:
|
|
28242
28260
|
handleFinishedEvent(event, userMessageTimestamp);
|
|
28243
28261
|
break;
|
|
28244
|
-
case
|
|
28262
|
+
case GeminiEventType.Citation:
|
|
28245
28263
|
handleCitationEvent(event.value, userMessageTimestamp);
|
|
28246
28264
|
break;
|
|
28247
|
-
case
|
|
28265
|
+
case GeminiEventType.ModelInfo:
|
|
28248
28266
|
handleChatModelEvent(event.value, userMessageTimestamp);
|
|
28249
28267
|
break;
|
|
28250
|
-
case
|
|
28268
|
+
case GeminiEventType.LoopDetected:
|
|
28251
28269
|
loopDetectedRef.current = true;
|
|
28252
28270
|
break;
|
|
28253
|
-
case
|
|
28254
|
-
case
|
|
28271
|
+
case GeminiEventType.Retry:
|
|
28272
|
+
case GeminiEventType.InvalidStream:
|
|
28255
28273
|
break;
|
|
28256
28274
|
default: {
|
|
28257
28275
|
const unreachable = event;
|
|
@@ -28292,7 +28310,7 @@ var useGeminiStream = (geminiClient, history, addItem, config, settings, onDebug
|
|
|
28292
28310
|
const submitQuery = (0, import_react105.useCallback)(
|
|
28293
28311
|
async (query, options, prompt_id) => runInDevTraceSpan(
|
|
28294
28312
|
{
|
|
28295
|
-
operation: options?.isContinuation ?
|
|
28313
|
+
operation: options?.isContinuation ? GeminiCliOperation.SystemPrompt : GeminiCliOperation.UserPrompt,
|
|
28296
28314
|
sessionId: config.getSessionId()
|
|
28297
28315
|
},
|
|
28298
28316
|
async ({ metadata: spanMetadata }) => {
|
|
@@ -28453,7 +28471,7 @@ var useGeminiStream = (geminiClient, history, addItem, config, settings, onDebug
|
|
|
28453
28471
|
);
|
|
28454
28472
|
const handleApprovalModeChange = (0, import_react105.useCallback)(
|
|
28455
28473
|
async (newApprovalMode) => {
|
|
28456
|
-
if (previousApprovalModeRef.current ===
|
|
28474
|
+
if (previousApprovalModeRef.current === ApprovalMode.PLAN && newApprovalMode !== ApprovalMode.PLAN && streamingState === "idle" /* Idle */) {
|
|
28457
28475
|
if (geminiClient) {
|
|
28458
28476
|
try {
|
|
28459
28477
|
await geminiClient.addHistory({
|
|
@@ -28476,11 +28494,11 @@ var useGeminiStream = (geminiClient, history, addItem, config, settings, onDebug
|
|
|
28476
28494
|
}
|
|
28477
28495
|
}
|
|
28478
28496
|
previousApprovalModeRef.current = newApprovalMode;
|
|
28479
|
-
if (newApprovalMode ===
|
|
28497
|
+
if (newApprovalMode === ApprovalMode.YOLO || newApprovalMode === ApprovalMode.AUTO_EDIT) {
|
|
28480
28498
|
let awaitingApprovalCalls = toolCalls.filter(
|
|
28481
28499
|
(call) => call.status === "awaiting_approval" && !call.request.forcedAsk
|
|
28482
28500
|
);
|
|
28483
|
-
if (newApprovalMode ===
|
|
28501
|
+
if (newApprovalMode === ApprovalMode.AUTO_EDIT) {
|
|
28484
28502
|
awaitingApprovalCalls = awaitingApprovalCalls.filter(
|
|
28485
28503
|
(call) => EDIT_TOOL_NAMES.has(call.request.name)
|
|
28486
28504
|
);
|
|
@@ -28489,11 +28507,11 @@ var useGeminiStream = (geminiClient, history, addItem, config, settings, onDebug
|
|
|
28489
28507
|
if (call.correlationId) {
|
|
28490
28508
|
try {
|
|
28491
28509
|
await config.getMessageBus().publish({
|
|
28492
|
-
type:
|
|
28510
|
+
type: MessageBusType.TOOL_CONFIRMATION_RESPONSE,
|
|
28493
28511
|
correlationId: call.correlationId,
|
|
28494
28512
|
confirmed: true,
|
|
28495
28513
|
requiresUserConfirmation: false,
|
|
28496
|
-
outcome:
|
|
28514
|
+
outcome: ToolConfirmationOutcome.ProceedOnce
|
|
28497
28515
|
});
|
|
28498
28516
|
} catch (error) {
|
|
28499
28517
|
debugLogger.warn(
|
|
@@ -28571,14 +28589,14 @@ var useGeminiStream = (geminiClient, history, addItem, config, settings, onDebug
|
|
|
28571
28589
|
);
|
|
28572
28590
|
if (isLowErrorVerbosity) {
|
|
28573
28591
|
suppressedToolErrorCountRef.current += geminiTools.filter(
|
|
28574
|
-
(tc) => tc.status ===
|
|
28592
|
+
(tc) => tc.status === CoreToolCallStatus.Error
|
|
28575
28593
|
).length;
|
|
28576
28594
|
}
|
|
28577
28595
|
if (geminiTools.length === 0) {
|
|
28578
28596
|
return;
|
|
28579
28597
|
}
|
|
28580
28598
|
const stopExecutionTool = geminiTools.find(
|
|
28581
|
-
(tc) => tc.response.errorType ===
|
|
28599
|
+
(tc) => tc.response.errorType === ToolErrorType.STOP_EXECUTION
|
|
28582
28600
|
);
|
|
28583
28601
|
if (stopExecutionTool && stopExecutionTool.response.error) {
|
|
28584
28602
|
maybeAddSuppressedToolErrorNote();
|
|
@@ -28598,9 +28616,9 @@ var useGeminiStream = (geminiClient, history, addItem, config, settings, onDebug
|
|
|
28598
28616
|
(tc) => !isTopicTool2(tc.request.name)
|
|
28599
28617
|
);
|
|
28600
28618
|
const allDeclinableToolsCancelled = declinableTools.length > 0 && declinableTools.every(
|
|
28601
|
-
(tc) => tc.status ===
|
|
28619
|
+
(tc) => tc.status === CoreToolCallStatus.Cancelled
|
|
28602
28620
|
);
|
|
28603
|
-
const allToolsCancelled = geminiTools.length > 0 && geminiTools.every((tc) => tc.status ===
|
|
28621
|
+
const allToolsCancelled = geminiTools.length > 0 && geminiTools.every((tc) => tc.status === CoreToolCallStatus.Cancelled);
|
|
28604
28622
|
if (allDeclinableToolsCancelled || allToolsCancelled) {
|
|
28605
28623
|
if (!turnCancelledRef.current) {
|
|
28606
28624
|
addItem({
|
|
@@ -28681,7 +28699,7 @@ var useGeminiStream = (geminiClient, history, addItem, config, settings, onDebug
|
|
|
28681
28699
|
return;
|
|
28682
28700
|
}
|
|
28683
28701
|
const restorableToolCalls = toolCalls.filter(
|
|
28684
|
-
(toolCall) => EDIT_TOOL_NAMES.has(toolCall.request.name) && toolCall.status ===
|
|
28702
|
+
(toolCall) => EDIT_TOOL_NAMES.has(toolCall.request.name) && toolCall.status === CoreToolCallStatus.AwaitingApproval
|
|
28685
28703
|
);
|
|
28686
28704
|
if (restorableToolCalls.length > 0) {
|
|
28687
28705
|
if (!gitService) {
|
|
@@ -28900,14 +28918,14 @@ var useAgentStream = ({
|
|
|
28900
28918
|
const displayName = legacyState?.displayName ?? event.name;
|
|
28901
28919
|
const isOutputMarkdown = legacyState?.isOutputMarkdown ?? false;
|
|
28902
28920
|
const desc = legacyState?.description ?? "";
|
|
28903
|
-
const fallbackKind =
|
|
28921
|
+
const fallbackKind = Kind.Other;
|
|
28904
28922
|
const newCall = {
|
|
28905
28923
|
callId: event.requestId,
|
|
28906
28924
|
name: displayName,
|
|
28907
28925
|
originalRequestName: event.name,
|
|
28908
28926
|
description: desc,
|
|
28909
28927
|
display: event.display,
|
|
28910
|
-
status:
|
|
28928
|
+
status: CoreToolCallStatus.Scheduled,
|
|
28911
28929
|
isClientInitiated: false,
|
|
28912
28930
|
renderOutputAsMarkdown: isOutputMarkdown,
|
|
28913
28931
|
kind: legacyState?.kind ?? fallbackKind,
|
|
@@ -28925,10 +28943,10 @@ var useAgentStream = ({
|
|
|
28925
28943
|
const evtStatus = legacyState?.status;
|
|
28926
28944
|
let status = tc.status;
|
|
28927
28945
|
if (evtStatus === "executing")
|
|
28928
|
-
status =
|
|
28929
|
-
else if (evtStatus === "error") status =
|
|
28946
|
+
status = CoreToolCallStatus.Executing;
|
|
28947
|
+
else if (evtStatus === "error") status = CoreToolCallStatus.Error;
|
|
28930
28948
|
else if (evtStatus === "success")
|
|
28931
|
-
status =
|
|
28949
|
+
status = CoreToolCallStatus.Success;
|
|
28932
28950
|
const display = event.display?.result;
|
|
28933
28951
|
const liveOutput = displayContentToString(display) ?? tc.resultDisplay;
|
|
28934
28952
|
const progressMessage = legacyState?.progressMessage ?? tc.progressMessage;
|
|
@@ -28961,7 +28979,7 @@ var useAgentStream = ({
|
|
|
28961
28979
|
const resultDisplay = displayContentToString(display) ?? tc.resultDisplay;
|
|
28962
28980
|
return {
|
|
28963
28981
|
...tc,
|
|
28964
|
-
status: event.isError ?
|
|
28982
|
+
status: event.isError ? CoreToolCallStatus.Error : CoreToolCallStatus.Success,
|
|
28965
28983
|
display: event.display ? { ...tc.display, ...event.display } : tc.display,
|
|
28966
28984
|
resultDisplay,
|
|
28967
28985
|
outputFile
|
|
@@ -29013,7 +29031,7 @@ var useAgentStream = ({
|
|
|
29013
29031
|
if (!options?.isContinuation) {
|
|
29014
29032
|
if (typeof query === "string") {
|
|
29015
29033
|
addItem({ type: "user" /* USER */, text: query }, timestamp);
|
|
29016
|
-
void logger?.logMessage(
|
|
29034
|
+
void logger?.logMessage(MessageSenderType.USER, query);
|
|
29017
29035
|
}
|
|
29018
29036
|
startNewPrompt();
|
|
29019
29037
|
}
|
|
@@ -30514,9 +30532,9 @@ var useFolderTrust = (settings, onTrustChange, addItem) => {
|
|
|
30514
30532
|
const handleFolderTrustSelect = (0, import_react111.useCallback)(
|
|
30515
30533
|
async (choice) => {
|
|
30516
30534
|
const trustLevelMap = {
|
|
30517
|
-
["trust_folder" /* TRUST_FOLDER */]:
|
|
30518
|
-
["trust_parent" /* TRUST_PARENT */]:
|
|
30519
|
-
["do_not_trust" /* DO_NOT_TRUST */]:
|
|
30535
|
+
["trust_folder" /* TRUST_FOLDER */]: TrustLevel.TRUST_FOLDER,
|
|
30536
|
+
["trust_parent" /* TRUST_PARENT */]: TrustLevel.TRUST_PARENT,
|
|
30537
|
+
["do_not_trust" /* DO_NOT_TRUST */]: TrustLevel.DO_NOT_TRUST
|
|
30520
30538
|
};
|
|
30521
30539
|
const trustLevel = trustLevelMap[choice];
|
|
30522
30540
|
if (!trustLevel) return;
|
|
@@ -30535,7 +30553,7 @@ var useFolderTrust = (settings, onTrustChange, addItem) => {
|
|
|
30535
30553
|
}, 100);
|
|
30536
30554
|
return;
|
|
30537
30555
|
}
|
|
30538
|
-
const currentIsTrusted = trustLevel ===
|
|
30556
|
+
const currentIsTrusted = trustLevel === TrustLevel.TRUST_FOLDER || trustLevel === TrustLevel.TRUST_PARENT;
|
|
30539
30557
|
onTrustChange(currentIsTrusted);
|
|
30540
30558
|
setIsTrusted(currentIsTrusted);
|
|
30541
30559
|
const wasTrusted = isTrusted ?? false;
|
|
@@ -31533,7 +31551,7 @@ function useMessageQueue({
|
|
|
31533
31551
|
var import_react113 = __toESM(require_react(), 1);
|
|
31534
31552
|
function useMcpStatus(config) {
|
|
31535
31553
|
const [discoveryState, setDiscoveryState] = (0, import_react113.useState)(
|
|
31536
|
-
() => config.getMcpClientManager()?.getDiscoveryState() ??
|
|
31554
|
+
() => config.getMcpClientManager()?.getDiscoveryState() ?? MCPDiscoveryState.NOT_STARTED
|
|
31537
31555
|
);
|
|
31538
31556
|
const [mcpServerCount, setMcpServerCount] = (0, import_react113.useState)(
|
|
31539
31557
|
() => config.getMcpClientManager()?.getMcpServerCount() ?? 0
|
|
@@ -31546,12 +31564,12 @@ function useMcpStatus(config) {
|
|
|
31546
31564
|
setMcpServerCount(manager.getMcpServerCount());
|
|
31547
31565
|
}
|
|
31548
31566
|
};
|
|
31549
|
-
coreEvents.on(
|
|
31567
|
+
coreEvents.on(CoreEvent.McpClientUpdate, onChange);
|
|
31550
31568
|
return () => {
|
|
31551
|
-
coreEvents.off(
|
|
31569
|
+
coreEvents.off(CoreEvent.McpClientUpdate, onChange);
|
|
31552
31570
|
};
|
|
31553
31571
|
}, [config]);
|
|
31554
|
-
const isMcpReady = discoveryState ===
|
|
31572
|
+
const isMcpReady = discoveryState === MCPDiscoveryState.COMPLETED || discoveryState === MCPDiscoveryState.NOT_STARTED && mcpServerCount === 0;
|
|
31555
31573
|
return {
|
|
31556
31574
|
discoveryState,
|
|
31557
31575
|
mcpServerCount,
|
|
@@ -31578,7 +31596,7 @@ function useApprovalModeIndicator({
|
|
|
31578
31596
|
(key) => {
|
|
31579
31597
|
let nextApprovalMode;
|
|
31580
31598
|
if (keyMatchers["app.toggleYolo" /* TOGGLE_YOLO */](key)) {
|
|
31581
|
-
if (config.isYoloModeDisabled() && config.getApprovalMode() !==
|
|
31599
|
+
if (config.isYoloModeDisabled() && config.getApprovalMode() !== ApprovalMode.YOLO) {
|
|
31582
31600
|
if (addItem) {
|
|
31583
31601
|
let text = "You cannot enter YOLO mode since it is disabled in your settings.";
|
|
31584
31602
|
const adminSettings = config.getRemoteAdminSettings();
|
|
@@ -31596,21 +31614,21 @@ function useApprovalModeIndicator({
|
|
|
31596
31614
|
}
|
|
31597
31615
|
return;
|
|
31598
31616
|
}
|
|
31599
|
-
nextApprovalMode = config.getApprovalMode() ===
|
|
31617
|
+
nextApprovalMode = config.getApprovalMode() === ApprovalMode.YOLO ? ApprovalMode.DEFAULT : ApprovalMode.YOLO;
|
|
31600
31618
|
} else if (keyMatchers["app.cycleApprovalMode" /* CYCLE_APPROVAL_MODE */](key)) {
|
|
31601
31619
|
const currentMode = config.getApprovalMode();
|
|
31602
31620
|
switch (currentMode) {
|
|
31603
|
-
case
|
|
31604
|
-
nextApprovalMode =
|
|
31621
|
+
case ApprovalMode.DEFAULT:
|
|
31622
|
+
nextApprovalMode = ApprovalMode.AUTO_EDIT;
|
|
31605
31623
|
break;
|
|
31606
|
-
case
|
|
31607
|
-
nextApprovalMode = allowPlanMode ?
|
|
31624
|
+
case ApprovalMode.AUTO_EDIT:
|
|
31625
|
+
nextApprovalMode = allowPlanMode ? ApprovalMode.PLAN : ApprovalMode.DEFAULT;
|
|
31608
31626
|
break;
|
|
31609
|
-
case
|
|
31610
|
-
nextApprovalMode =
|
|
31627
|
+
case ApprovalMode.PLAN:
|
|
31628
|
+
nextApprovalMode = ApprovalMode.DEFAULT;
|
|
31611
31629
|
break;
|
|
31612
|
-
case
|
|
31613
|
-
nextApprovalMode =
|
|
31630
|
+
case ApprovalMode.YOLO:
|
|
31631
|
+
nextApprovalMode = ApprovalMode.AUTO_EDIT;
|
|
31614
31632
|
break;
|
|
31615
31633
|
default:
|
|
31616
31634
|
}
|
|
@@ -32003,11 +32021,11 @@ var useHookDisplayState = () => {
|
|
|
32003
32021
|
removeHook();
|
|
32004
32022
|
}
|
|
32005
32023
|
};
|
|
32006
|
-
coreEvents.on(
|
|
32007
|
-
coreEvents.on(
|
|
32024
|
+
coreEvents.on(CoreEvent.HookStart, handleHookStart);
|
|
32025
|
+
coreEvents.on(CoreEvent.HookEnd, handleHookEnd);
|
|
32008
32026
|
return () => {
|
|
32009
|
-
coreEvents.off(
|
|
32010
|
-
coreEvents.off(
|
|
32027
|
+
coreEvents.off(CoreEvent.HookStart, handleHookStart);
|
|
32028
|
+
coreEvents.off(CoreEvent.HookEnd, handleHookEnd);
|
|
32011
32029
|
activeTimeouts.forEach(clearTimeout);
|
|
32012
32030
|
activeTimeouts.clear();
|
|
32013
32031
|
};
|
|
@@ -32897,7 +32915,7 @@ var AppContainer = (props) => {
|
|
|
32897
32915
|
setConfigInitialized(true);
|
|
32898
32916
|
startupProfiler.flush(config);
|
|
32899
32917
|
startAutoMemoryIfEnabled(config);
|
|
32900
|
-
const sessionStartSource = resumedSessionData ?
|
|
32918
|
+
const sessionStartSource = resumedSessionData ? SessionStartSource.Resume : SessionStartSource.Startup;
|
|
32901
32919
|
const result = await config.getHookSystem()?.fireSessionStartEvent(sessionStartSource);
|
|
32902
32920
|
if (result) {
|
|
32903
32921
|
if (result.systemMessage) {
|
|
@@ -32933,7 +32951,7 @@ var AppContainer = (props) => {
|
|
|
32933
32951
|
);
|
|
32934
32952
|
const ideClient = await IdeClient.getInstance();
|
|
32935
32953
|
await ideClient.disconnect();
|
|
32936
|
-
await config?.getHookSystem()?.fireSessionEndEvent(
|
|
32954
|
+
await config?.getHookSystem()?.fireSessionEndEvent(SessionEndReason.Exit);
|
|
32937
32955
|
};
|
|
32938
32956
|
registerCleanup(cleanupFn);
|
|
32939
32957
|
return () => {
|
|
@@ -32958,11 +32976,11 @@ var AppContainer = (props) => {
|
|
|
32958
32976
|
resetTime: payload.resetTime
|
|
32959
32977
|
});
|
|
32960
32978
|
};
|
|
32961
|
-
coreEvents.on(
|
|
32962
|
-
coreEvents.on(
|
|
32979
|
+
coreEvents.on(CoreEvent.ModelChanged, handleModelChanged);
|
|
32980
|
+
coreEvents.on(CoreEvent.QuotaChanged, handleQuotaChanged);
|
|
32963
32981
|
return () => {
|
|
32964
|
-
coreEvents.off(
|
|
32965
|
-
coreEvents.off(
|
|
32982
|
+
coreEvents.off(CoreEvent.ModelChanged, handleModelChanged);
|
|
32983
|
+
coreEvents.off(CoreEvent.QuotaChanged, handleQuotaChanged);
|
|
32966
32984
|
};
|
|
32967
32985
|
}, [config]);
|
|
32968
32986
|
(0, import_react127.useEffect)(() => {
|
|
@@ -32975,16 +32993,16 @@ var AppContainer = (props) => {
|
|
|
32975
32993
|
const handleAgentsDiscovered = (payload) => {
|
|
32976
32994
|
setNewAgents(payload.agents);
|
|
32977
32995
|
};
|
|
32978
|
-
coreEvents.on(
|
|
32979
|
-
coreEvents.on(
|
|
32980
|
-
coreEvents.on(
|
|
32996
|
+
coreEvents.on(CoreEvent.SettingsChanged, handleSettingsChanged);
|
|
32997
|
+
coreEvents.on(CoreEvent.AdminSettingsChanged, handleAdminSettingsChanged);
|
|
32998
|
+
coreEvents.on(CoreEvent.AgentsDiscovered, handleAgentsDiscovered);
|
|
32981
32999
|
return () => {
|
|
32982
|
-
coreEvents.off(
|
|
33000
|
+
coreEvents.off(CoreEvent.SettingsChanged, handleSettingsChanged);
|
|
32983
33001
|
coreEvents.off(
|
|
32984
|
-
|
|
33002
|
+
CoreEvent.AdminSettingsChanged,
|
|
32985
33003
|
handleAdminSettingsChanged
|
|
32986
33004
|
);
|
|
32987
|
-
coreEvents.off(
|
|
33005
|
+
coreEvents.off(CoreEvent.AgentsDiscovered, handleAgentsDiscovered);
|
|
32988
33006
|
};
|
|
32989
33007
|
}, [settings]);
|
|
32990
33008
|
const { errorCount, clearErrorCount } = useErrorCount();
|
|
@@ -33050,11 +33068,11 @@ var AppContainer = (props) => {
|
|
|
33050
33068
|
exitEditorDialog
|
|
33051
33069
|
} = useEditorSettings(settings, setEditorError, historyManager.addItem);
|
|
33052
33070
|
(0, import_react127.useEffect)(() => {
|
|
33053
|
-
coreEvents.on(
|
|
33054
|
-
coreEvents.on(
|
|
33071
|
+
coreEvents.on(CoreEvent.ExternalEditorClosed, handleEditorClose);
|
|
33072
|
+
coreEvents.on(CoreEvent.RequestEditorSelection, openEditorDialog);
|
|
33055
33073
|
return () => {
|
|
33056
|
-
coreEvents.off(
|
|
33057
|
-
coreEvents.off(
|
|
33074
|
+
coreEvents.off(CoreEvent.ExternalEditorClosed, handleEditorClose);
|
|
33075
|
+
coreEvents.off(CoreEvent.RequestEditorSelection, openEditorDialog);
|
|
33058
33076
|
};
|
|
33059
33077
|
}, [handleEditorClose, openEditorDialog]);
|
|
33060
33078
|
(0, import_react127.useEffect)(() => {
|
|
@@ -33122,7 +33140,7 @@ var AppContainer = (props) => {
|
|
|
33122
33140
|
errorVerbosity: settings.merged.ui.errorVerbosity
|
|
33123
33141
|
});
|
|
33124
33142
|
const isAuthDialogOpen = authState === "updating" /* Updating */;
|
|
33125
|
-
const isAuthenticating = authState === "unauthenticated" /* Unauthenticated */ && settings.merged.security.auth.selectedType !==
|
|
33143
|
+
const isAuthenticating = authState === "unauthenticated" /* Unauthenticated */ && settings.merged.security.auth.selectedType !== AuthType.USE_GEMINI;
|
|
33126
33144
|
const isGeminiClientInitialized = config.getGeminiClient()?.isInitialized();
|
|
33127
33145
|
const { loadHistoryForResume, isResuming } = useSessionResume({
|
|
33128
33146
|
config,
|
|
@@ -33150,7 +33168,7 @@ var AppContainer = (props) => {
|
|
|
33150
33168
|
async (authType, scope) => {
|
|
33151
33169
|
if (authType) {
|
|
33152
33170
|
const previousAuthType = config.getContentGeneratorConfig()?.authType ?? "unknown";
|
|
33153
|
-
if (authType ===
|
|
33171
|
+
if (authType === AuthType.LOGIN_WITH_GOOGLE) {
|
|
33154
33172
|
setAuthContext({ requiresRestart: true });
|
|
33155
33173
|
} else {
|
|
33156
33174
|
setAuthContext({});
|
|
@@ -33178,7 +33196,7 @@ var AppContainer = (props) => {
|
|
|
33178
33196
|
);
|
|
33179
33197
|
return;
|
|
33180
33198
|
}
|
|
33181
|
-
if (authType ===
|
|
33199
|
+
if (authType === AuthType.LOGIN_WITH_GOOGLE && config.isBrowserLaunchSuppressed()) {
|
|
33182
33200
|
writeToStdout(`
|
|
33183
33201
|
----------------------------------------------------------------
|
|
33184
33202
|
Logging in with Google... Restarting Gemini CLI to continue.
|
|
@@ -33203,7 +33221,7 @@ Logging in with Google... Restarting Gemini CLI to continue.
|
|
|
33203
33221
|
}
|
|
33204
33222
|
await saveApiKey(apiKey);
|
|
33205
33223
|
await reloadApiKey();
|
|
33206
|
-
await config.refreshAuth(
|
|
33224
|
+
await config.refreshAuth(AuthType.USE_GEMINI);
|
|
33207
33225
|
setAuthState("authenticated" /* Authenticated */);
|
|
33208
33226
|
} catch (e) {
|
|
33209
33227
|
onAuthError(
|
|
@@ -33228,7 +33246,7 @@ Logging in with Google... Restarting Gemini CLI to continue.
|
|
|
33228
33246
|
`Authentication is enforced to be ${settings.merged.security.auth.enforcedType}, but you are currently using ${settings.merged.security.auth.selectedType}.`
|
|
33229
33247
|
);
|
|
33230
33248
|
} else if (settings.merged.security.auth.selectedType && !settings.merged.security.auth.useExternal) {
|
|
33231
|
-
if (settings.merged.security.auth.selectedType ===
|
|
33249
|
+
if (settings.merged.security.auth.selectedType === AuthType.USE_GEMINI) {
|
|
33232
33250
|
return;
|
|
33233
33251
|
}
|
|
33234
33252
|
const error = validateAuthMethod(
|
|
@@ -33357,9 +33375,9 @@ Logging in with Google... Restarting Gemini CLI to continue.
|
|
|
33357
33375
|
}
|
|
33358
33376
|
});
|
|
33359
33377
|
};
|
|
33360
|
-
coreEvents.on(
|
|
33378
|
+
coreEvents.on(CoreEvent.ConsentRequest, handleConsentRequest);
|
|
33361
33379
|
return () => {
|
|
33362
|
-
coreEvents.off(
|
|
33380
|
+
coreEvents.off(CoreEvent.ConsentRequest, handleConsentRequest);
|
|
33363
33381
|
};
|
|
33364
33382
|
}, []);
|
|
33365
33383
|
const performMemoryRefresh = (0, import_react127.useCallback)(async () => {
|
|
@@ -34032,7 +34050,7 @@ ${queuedText}` : queuedText;
|
|
|
34032
34050
|
if (keyMatchers["app.showErrorDetails" /* SHOW_ERROR_DETAILS */](key)) {
|
|
34033
34051
|
if (settings.merged.general.devtools) {
|
|
34034
34052
|
void (async () => {
|
|
34035
|
-
const { toggleDevToolsPanel } = await import("./devtoolsService-
|
|
34053
|
+
const { toggleDevToolsPanel } = await import("./devtoolsService-DV36S632.js");
|
|
34036
34054
|
await toggleDevToolsPanel(
|
|
34037
34055
|
config,
|
|
34038
34056
|
showErrorDetails,
|
|
@@ -34250,12 +34268,12 @@ ${queuedText}` : queuedText;
|
|
|
34250
34268
|
Date.now()
|
|
34251
34269
|
);
|
|
34252
34270
|
};
|
|
34253
|
-
coreEvents.on(
|
|
34254
|
-
coreEvents.on(
|
|
34271
|
+
coreEvents.on(CoreEvent.UserFeedback, handleUserFeedback);
|
|
34272
|
+
coreEvents.on(CoreEvent.HookSystemMessage, handleHookSystemMessage);
|
|
34255
34273
|
coreEvents.drainBacklogs();
|
|
34256
34274
|
return () => {
|
|
34257
|
-
coreEvents.off(
|
|
34258
|
-
coreEvents.off(
|
|
34275
|
+
coreEvents.off(CoreEvent.UserFeedback, handleUserFeedback);
|
|
34276
|
+
coreEvents.off(CoreEvent.HookSystemMessage, handleHookSystemMessage);
|
|
34259
34277
|
};
|
|
34260
34278
|
}, [historyManager]);
|
|
34261
34279
|
const nightly = props.version.includes("nightly");
|
|
@@ -34358,9 +34376,9 @@ ${queuedText}` : queuedText;
|
|
|
34358
34376
|
const handleMemoryChanged = (result) => {
|
|
34359
34377
|
setGeminiMdFileCount(result.fileCount);
|
|
34360
34378
|
};
|
|
34361
|
-
coreEvents.on(
|
|
34379
|
+
coreEvents.on(CoreEvent.MemoryChanged, handleMemoryChanged);
|
|
34362
34380
|
return () => {
|
|
34363
|
-
coreEvents.off(
|
|
34381
|
+
coreEvents.off(CoreEvent.MemoryChanged, handleMemoryChanged);
|
|
34364
34382
|
};
|
|
34365
34383
|
}, []);
|
|
34366
34384
|
(0, import_react127.useEffect)(() => {
|