@google/gemini-cli 0.40.0-preview.5 → 0.40.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/bundle/{chunk-FVKIOUK2.js → chunk-3F3SMPJP.js} +6 -6
- package/bundle/{chunk-PSFOLETP.js → chunk-3OSQ5US4.js} +4 -4
- package/bundle/{chunk-RZLEHIPO.js → chunk-BSQN7W2F.js} +1 -1
- package/bundle/{chunk-LZ3EBZC7.js → chunk-DYY5TRG5.js} +1 -1
- package/bundle/{chunk-2ZVZANM2.js → chunk-EITHKKXC.js} +2 -2
- package/bundle/{chunk-4QJ7BLYU.js → chunk-FRSESBS3.js} +11904 -6382
- package/bundle/{chunk-JMNFQX6P.js → chunk-G6ODSHKI.js} +1 -1
- package/bundle/{chunk-OFQ5ZK6W.js → chunk-HMR2JSPA.js} +1 -1
- package/bundle/{chunk-UOPSSTRT.js → chunk-J76QO4KN.js} +6 -6
- package/bundle/{chunk-M67MTWAA.js → chunk-MBLCGSJW.js} +1 -1
- package/bundle/{chunk-BXEIZYPT.js → chunk-ML7VG4QG.js} +2 -2
- package/bundle/{chunk-HGZ3O2PQ.js → chunk-O7SPQTAS.js} +2 -2
- package/bundle/{chunk-PPI7V737.js → chunk-OE2ZUR66.js} +12 -14
- package/bundle/{chunk-S2RMF5OF.js → chunk-OEIRJHU4.js} +53 -66
- package/bundle/{chunk-PUYH6WLU.js → chunk-P7LA6IIC.js} +1 -1
- package/bundle/{chunk-WKLZQYVS.js → chunk-RUHTTGS7.js} +3 -3
- package/bundle/{chunk-JEEOZX7K.js → chunk-SZYCJREE.js} +4 -4
- package/bundle/{chunk-KH7Y2E2B.js → chunk-URTDU3HF.js} +1 -1
- package/bundle/{cleanup-LU6VH5LF.js → cleanup-6MKBWA6V.js} +2 -2
- package/bundle/{cleanup-7NMCYTRU.js → cleanup-AJ7G3WEE.js} +2 -2
- package/bundle/{cleanup-CC4DZYSL.js → cleanup-SOJQVOTG.js} +3 -3
- package/bundle/{core-J5EG27YJ.js → core-KELRGMHQ.js} +1 -1
- package/bundle/{dist-BDCT3HTY.js → core-O5TD6NYP.js} +2 -2
- package/bundle/{devtoolsService-L4UM23JP.js → devtoolsService-AR5HWQA7.js} +2 -2
- package/bundle/{devtoolsService-DVFBLZLE.js → devtoolsService-CCXHJEUM.js} +2 -2
- package/bundle/{devtoolsService-F5VVJOGU.js → devtoolsService-GQF7V6FB.js} +4 -5
- package/bundle/{dist-3PE52RNR.js → dist-LZ5ASNAL.js} +1 -1
- package/bundle/{gemini-43M45BZJ.js → gemini-LSLMD4HG.js} +12 -12
- package/bundle/{gemini-A2RKH6S6.js → gemini-TKPXJBGX.js} +175 -191
- package/bundle/{gemini-TUKIRRHO.js → gemini-YJTI2WQP.js} +12 -12
- package/bundle/gemini.js +3 -3
- package/bundle/{interactiveCli-UEQVG6ZN.js → interactiveCli-5YSP2IQI.js} +6 -6
- package/bundle/{interactiveCli-5KEHC4M6.js → interactiveCli-I56L63GE.js} +272 -290
- package/bundle/{interactiveCli-3ZFYCJ5T.js → interactiveCli-O3UYJUNT.js} +6 -6
- package/bundle/{liteRtServerManager-G54ML27L.js → liteRtServerManager-6INPACOA.js} +3 -3
- package/bundle/{liteRtServerManager-YKGSBN3S.js → liteRtServerManager-CIC7DD4U.js} +3 -3
- package/bundle/{liteRtServerManager-OMCP3UEP.js → liteRtServerManager-XI56E5P3.js} +4 -4
- package/bundle/node_modules/@google/gemini-cli-devtools/package.json +1 -1
- package/bundle/{oauth2-provider-R3XULSB6.js → oauth2-provider-HDKVDC2Q.js} +1 -1
- package/bundle/{oauth2-provider-2Q7SY72N.js → oauth2-provider-HUMYTY6K.js} +1 -1
- package/bundle/{oauth2-provider-LO4KVOIV.js → oauth2-provider-VGGNG5XI.js} +73 -39
- package/bundle/{start-M46TTTBT.js → start-25VD33TV.js} +5 -5
- package/bundle/{start-G4HKE6RC.js → start-U4YQCY2A.js} +6 -6
- package/bundle/{start-O5R43BH5.js → start-VHURPYN7.js} +5 -5
- package/package.json +1 -1
- package/bundle/chunk-CTIVBV4R.js +0 -17505
- package/bundle/chunk-JTHK45BC.js +0 -118
- package/bundle/chunk-KAUTKFXF.js +0 -80012
- package/bundle/chunk-O5W5VNIB.js +0 -156
- package/bundle/chunk-WZUAJ737.js +0 -1571
- package/bundle/chunk-YQJLBMKU.js +0 -351149
- package/bundle/cleanup-QDR2CCLD.js +0 -33
- package/bundle/devtoolsService-LAXMLGUQ.js +0 -852
- package/bundle/dist-SXIB7Y3D.js +0 -2046
- package/bundle/gemini-5JHX3PCD.js +0 -16087
- package/bundle/interactiveCli-SQE667CT.js +0 -34448
- package/bundle/liteRtServerManager-ROQMRMW3.js +0 -65
- package/bundle/oauth2-provider-PTW7EGZX.js +0 -237
- package/bundle/start-VMKLEM5K.js +0 -18
|
@@ -154,13 +154,13 @@ import {
|
|
|
154
154
|
widestLineFromStyledChars,
|
|
155
155
|
wordBreakStyledChars,
|
|
156
156
|
wrapStyledChars
|
|
157
|
-
} from "./chunk-
|
|
157
|
+
} from "./chunk-J76QO4KN.js";
|
|
158
158
|
import {
|
|
159
159
|
appEvents
|
|
160
160
|
} from "./chunk-5PS3AYFU.js";
|
|
161
161
|
import {
|
|
162
162
|
require_source
|
|
163
|
-
} from "./chunk-
|
|
163
|
+
} from "./chunk-P7LA6IIC.js";
|
|
164
164
|
import {
|
|
165
165
|
ACTIVE_SHELL_MAX_LINES,
|
|
166
166
|
COMPACT_TOOL_SUBVIEW_MAX_LINES,
|
|
@@ -213,20 +213,18 @@ import {
|
|
|
213
213
|
stringWidth,
|
|
214
214
|
stripUnsafeCharacters,
|
|
215
215
|
toCodePoints
|
|
216
|
-
} from "./chunk-
|
|
216
|
+
} from "./chunk-OE2ZUR66.js";
|
|
217
217
|
import {
|
|
218
218
|
registerCleanup,
|
|
219
219
|
removeCleanup,
|
|
220
220
|
runExitCleanup,
|
|
221
221
|
setupTtyCheck
|
|
222
|
-
} from "./chunk-
|
|
222
|
+
} from "./chunk-BSQN7W2F.js";
|
|
223
223
|
import {
|
|
224
224
|
ApiKeyUpdatedEvent,
|
|
225
225
|
AsyncFzf,
|
|
226
226
|
AuthType,
|
|
227
|
-
CompressionStatus,
|
|
228
227
|
ConversationFinishedEvent,
|
|
229
|
-
CoreToolCallStatus,
|
|
230
228
|
CreditPurchaseClickEvent,
|
|
231
229
|
EDITOR_DISPLAY_NAMES,
|
|
232
230
|
EmptyWalletMenuShownEvent,
|
|
@@ -236,16 +234,11 @@ import {
|
|
|
236
234
|
FileSearchFactory,
|
|
237
235
|
FolderTrustDiscoveryService,
|
|
238
236
|
G1_UTM_CAMPAIGNS,
|
|
239
|
-
GeminiCliOperation,
|
|
240
|
-
GeminiEventType,
|
|
241
237
|
GitService,
|
|
242
238
|
IdeClient,
|
|
243
239
|
LegacyAgentProtocol,
|
|
244
240
|
LlmRole,
|
|
245
241
|
Logger,
|
|
246
|
-
MCPDiscoveryState,
|
|
247
|
-
MCPServerStatus,
|
|
248
|
-
MessageSenderType,
|
|
249
242
|
ModelNotFoundError,
|
|
250
243
|
ModelSlashCommandEvent,
|
|
251
244
|
OverageMenuShownEvent,
|
|
@@ -254,17 +247,13 @@ import {
|
|
|
254
247
|
ProjectIdRequiredError,
|
|
255
248
|
ROOT_SCHEDULER_ID,
|
|
256
249
|
Scheduler,
|
|
257
|
-
SessionEndReason,
|
|
258
|
-
SessionStartSource,
|
|
259
250
|
ShellExecutionService,
|
|
260
251
|
SlashCommandStatus,
|
|
261
252
|
TerminalQuotaError,
|
|
262
|
-
TrustLevel,
|
|
263
253
|
UserAccountManager,
|
|
264
254
|
UserPromptEvent,
|
|
265
255
|
UserTierId,
|
|
266
256
|
ValidationRequiredError,
|
|
267
|
-
WarningPriority,
|
|
268
257
|
addMCPStatusChangeListener,
|
|
269
258
|
allowEditorTypeInSandbox,
|
|
270
259
|
belongsInConfirmationQueue,
|
|
@@ -347,13 +336,11 @@ import {
|
|
|
347
336
|
validatePlanContent,
|
|
348
337
|
validatePlanPath,
|
|
349
338
|
writeToStdout
|
|
350
|
-
} from "./chunk-
|
|
339
|
+
} from "./chunk-FRSESBS3.js";
|
|
351
340
|
import {
|
|
352
341
|
ACTIVATE_SKILL_TOOL_NAME,
|
|
353
342
|
AGENT_TOOL_NAME,
|
|
354
|
-
ApprovalMode,
|
|
355
343
|
ChangeAuthRequestedError,
|
|
356
|
-
CoreEvent,
|
|
357
344
|
DEFAULT_GEMINI_FLASH_LITE_MODEL,
|
|
358
345
|
DEFAULT_GEMINI_FLASH_MODEL,
|
|
359
346
|
DEFAULT_GEMINI_MODEL,
|
|
@@ -364,16 +351,13 @@ import {
|
|
|
364
351
|
GEMINI_DIR,
|
|
365
352
|
GLOB_DISPLAY_NAME,
|
|
366
353
|
GREP_DISPLAY_NAME,
|
|
367
|
-
Kind,
|
|
368
354
|
LS_DISPLAY_NAME,
|
|
369
|
-
MessageBusType,
|
|
370
355
|
PREVIEW_GEMINI_3_1_CUSTOM_TOOLS_MODEL,
|
|
371
356
|
PREVIEW_GEMINI_3_1_FLASH_LITE_MODEL,
|
|
372
357
|
PREVIEW_GEMINI_3_1_MODEL,
|
|
373
358
|
PREVIEW_GEMINI_FLASH_MODEL,
|
|
374
359
|
PREVIEW_GEMINI_MODEL,
|
|
375
360
|
PREVIEW_GEMINI_MODEL_AUTO,
|
|
376
|
-
QuestionType,
|
|
377
361
|
READ_FILE_DISPLAY_NAME,
|
|
378
362
|
READ_MANY_FILES_DISPLAY_NAME,
|
|
379
363
|
SHELL_TOOL_NAME,
|
|
@@ -381,8 +365,6 @@ import {
|
|
|
381
365
|
TOPIC_PARAM_STRATEGIC_INTENT,
|
|
382
366
|
TOPIC_PARAM_SUMMARY,
|
|
383
367
|
TOPIC_PARAM_TITLE,
|
|
384
|
-
ToolConfirmationOutcome,
|
|
385
|
-
ToolErrorType,
|
|
386
368
|
UPDATE_TOPIC_DISPLAY_NAME,
|
|
387
369
|
UPDATE_TOPIC_TOOL_NAME,
|
|
388
370
|
UnauthorizedError,
|
|
@@ -412,7 +394,7 @@ import {
|
|
|
412
394
|
safeJsonToMarkdown,
|
|
413
395
|
shortenPath,
|
|
414
396
|
tildeifyPath
|
|
415
|
-
} from "./chunk-
|
|
397
|
+
} from "./chunk-UHHRGNIO.js";
|
|
416
398
|
import "./chunk-664ZODQF.js";
|
|
417
399
|
import "./chunk-RJTRUG2J.js";
|
|
418
400
|
import "./chunk-IUUIT4SU.js";
|
|
@@ -5742,7 +5724,7 @@ function calculateShellMaxLines(options) {
|
|
|
5742
5724
|
if (isAlternateBuffer && isThisShellFocused2 && !constrainHeight) {
|
|
5743
5725
|
return maxLinesBasedOnHeight;
|
|
5744
5726
|
}
|
|
5745
|
-
const isExecuting = status ===
|
|
5727
|
+
const isExecuting = status === "executing" /* Executing */;
|
|
5746
5728
|
const shellMaxLinesLimit = isExecuting ? ACTIVE_SHELL_MAX_LINES - SHELL_CONTENT_OVERHEAD : COMPLETED_SHELL_MAX_LINES - SHELL_CONTENT_OVERHEAD;
|
|
5747
5729
|
return Math.min(maxLinesBasedOnHeight, shellMaxLinesLimit);
|
|
5748
5730
|
}
|
|
@@ -5775,10 +5757,10 @@ function isShellTool(name) {
|
|
|
5775
5757
|
return name === SHELL_COMMAND_NAME || name === SHELL_NAME || name === SHELL_TOOL_NAME;
|
|
5776
5758
|
}
|
|
5777
5759
|
function isThisShellFocusable(name, status, config) {
|
|
5778
|
-
return !!(isShellTool(name) && status ===
|
|
5760
|
+
return !!(isShellTool(name) && status === "executing" /* Executing */ && config?.getEnableInteractiveShell());
|
|
5779
5761
|
}
|
|
5780
5762
|
function isThisShellFocused(name, status, ptyId, activeShellPtyId, embeddedShellFocused) {
|
|
5781
|
-
return !!(isShellTool(name) && status ===
|
|
5763
|
+
return !!(isShellTool(name) && status === "executing" /* Executing */ && ptyId === activeShellPtyId && embeddedShellFocused);
|
|
5782
5764
|
}
|
|
5783
5765
|
function useFocusHint(isThisShellFocusable2, isThisShellFocused2, resultDisplay) {
|
|
5784
5766
|
const [userHasFocused, setUserHasFocused] = (0, import_react16.useState)(false);
|
|
@@ -6376,7 +6358,7 @@ var ToolMessage = ({
|
|
|
6376
6358
|
paddingX: 1,
|
|
6377
6359
|
flexDirection: "column",
|
|
6378
6360
|
children: [
|
|
6379
|
-
status ===
|
|
6361
|
+
status === "executing" /* Executing */ && progress !== void 0 && /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(
|
|
6380
6362
|
McpProgressIndicator,
|
|
6381
6363
|
{
|
|
6382
6364
|
progress,
|
|
@@ -6393,8 +6375,8 @@ var ToolMessage = ({
|
|
|
6393
6375
|
terminalWidth,
|
|
6394
6376
|
renderOutputAsMarkdown,
|
|
6395
6377
|
hasFocus: isThisShellFocused2,
|
|
6396
|
-
maxLines: kind ===
|
|
6397
|
-
overflowDirection: kind ===
|
|
6378
|
+
maxLines: kind === "agent" /* Agent */ && availableTerminalHeight !== void 0 ? SUBAGENT_MAX_LINES : void 0,
|
|
6379
|
+
overflowDirection: kind === "agent" /* Agent */ ? "bottom" : "top"
|
|
6398
6380
|
}
|
|
6399
6381
|
),
|
|
6400
6382
|
isThisShellFocused2 && config && /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(Box_default, { paddingLeft: STATUS_INDICATOR_WIDTH, marginTop: 1, children: /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(
|
|
@@ -6727,7 +6709,7 @@ function getInitialTrustState(settings, cwd5, isCurrentWorkspace) {
|
|
|
6727
6709
|
settings.merged,
|
|
6728
6710
|
process3.cwd()
|
|
6729
6711
|
);
|
|
6730
|
-
const isInheritedTrust = isTrusted && (!explicitTrustLevel || explicitTrustLevel ===
|
|
6712
|
+
const isInheritedTrust = isTrusted && (!explicitTrustLevel || explicitTrustLevel === "DO_NOT_TRUST" /* DO_NOT_TRUST */);
|
|
6731
6713
|
return {
|
|
6732
6714
|
currentTrustLevel: explicitTrustLevel,
|
|
6733
6715
|
isInheritedTrustFromParent: !!(source === "file" && isInheritedTrust),
|
|
@@ -6772,7 +6754,7 @@ var usePermissionsModifyTrust = (onExit, addItem, targetDirectory) => {
|
|
|
6772
6754
|
process3.cwd(),
|
|
6773
6755
|
newConfig
|
|
6774
6756
|
);
|
|
6775
|
-
if (trustLevel ===
|
|
6757
|
+
if (trustLevel === "DO_NOT_TRUST" /* DO_NOT_TRUST */ && isTrusted) {
|
|
6776
6758
|
let message = "Note: This folder is still trusted because the connected IDE workspace is trusted.";
|
|
6777
6759
|
if (source === "file") {
|
|
6778
6760
|
message = "Note: This folder is still trusted because a parent folder is trusted.";
|
|
@@ -6846,18 +6828,18 @@ function PermissionsModifyTrustDialog({
|
|
|
6846
6828
|
const TRUST_LEVEL_ITEMS = [
|
|
6847
6829
|
{
|
|
6848
6830
|
label: `Trust this folder (${dirName})`,
|
|
6849
|
-
value:
|
|
6850
|
-
key:
|
|
6831
|
+
value: "TRUST_FOLDER" /* TRUST_FOLDER */,
|
|
6832
|
+
key: "TRUST_FOLDER" /* TRUST_FOLDER */
|
|
6851
6833
|
},
|
|
6852
6834
|
{
|
|
6853
6835
|
label: `Trust parent folder (${parentFolder})`,
|
|
6854
|
-
value:
|
|
6855
|
-
key:
|
|
6836
|
+
value: "TRUST_PARENT" /* TRUST_PARENT */,
|
|
6837
|
+
key: "TRUST_PARENT" /* TRUST_PARENT */
|
|
6856
6838
|
},
|
|
6857
6839
|
{
|
|
6858
6840
|
label: "Don't trust",
|
|
6859
|
-
value:
|
|
6860
|
-
key:
|
|
6841
|
+
value: "DO_NOT_TRUST" /* DO_NOT_TRUST */,
|
|
6842
|
+
key: "DO_NOT_TRUST" /* DO_NOT_TRUST */
|
|
6861
6843
|
}
|
|
6862
6844
|
];
|
|
6863
6845
|
const {
|
|
@@ -7094,7 +7076,7 @@ var ShellToolMessage = ({
|
|
|
7094
7076
|
maxLinesLimit: maxLines
|
|
7095
7077
|
});
|
|
7096
7078
|
import_react23.default.useEffect(() => {
|
|
7097
|
-
const isExecuting = status ===
|
|
7079
|
+
const isExecuting = status === "executing" /* Executing */;
|
|
7098
7080
|
if (isExecuting && ptyId) {
|
|
7099
7081
|
try {
|
|
7100
7082
|
const childWidth = terminalWidth - 4;
|
|
@@ -7280,14 +7262,14 @@ var ToolActionsProvider = (props) => {
|
|
|
7280
7262
|
}
|
|
7281
7263
|
const details = tool.confirmationDetails;
|
|
7282
7264
|
if (details?.type === "edit" && isDiffingEnabled && "filePath" in details) {
|
|
7283
|
-
const cliOutcome = outcome ===
|
|
7265
|
+
const cliOutcome = outcome === "cancel" /* Cancel */ ? "rejected" : "accepted";
|
|
7284
7266
|
await ideClient?.resolveDiffFromCli(details.filePath, cliOutcome);
|
|
7285
7267
|
}
|
|
7286
7268
|
if (tool.correlationId) {
|
|
7287
7269
|
await config.getMessageBus().publish({
|
|
7288
|
-
type:
|
|
7270
|
+
type: "tool-confirmation-response" /* TOOL_CONFIRMATION_RESPONSE */,
|
|
7289
7271
|
correlationId: tool.correlationId,
|
|
7290
|
-
confirmed: outcome !==
|
|
7272
|
+
confirmed: outcome !== "cancel" /* Cancel */,
|
|
7291
7273
|
requiresUserConfirmation: false,
|
|
7292
7274
|
outcome,
|
|
7293
7275
|
payload
|
|
@@ -7306,7 +7288,7 @@ var ToolActionsProvider = (props) => {
|
|
|
7306
7288
|
);
|
|
7307
7289
|
const cancel = (0, import_react24.useCallback)(
|
|
7308
7290
|
async (callId) => {
|
|
7309
|
-
await confirm(callId,
|
|
7291
|
+
await confirm(callId, "cancel" /* Cancel */);
|
|
7310
7292
|
},
|
|
7311
7293
|
[confirm]
|
|
7312
7294
|
);
|
|
@@ -7593,22 +7575,22 @@ var hasPayload = (res) => {
|
|
|
7593
7575
|
function getFileOpData(diff, status, resultDisplay, terminalWidth, availableTerminalHeight, isClickable) {
|
|
7594
7576
|
const added = (diff.diffStat?.model_added_lines ?? 0) + (diff.diffStat?.user_added_lines ?? 0);
|
|
7595
7577
|
const removed = (diff.diffStat?.model_removed_lines ?? 0) + (diff.diffStat?.user_removed_lines ?? 0);
|
|
7596
|
-
const isAcceptedOrConfirming = status ===
|
|
7578
|
+
const isAcceptedOrConfirming = status === "success" /* Success */ || status === "executing" /* Executing */ || status === "awaiting_approval" /* AwaitingApproval */;
|
|
7597
7579
|
const addColor = isAcceptedOrConfirming ? theme.status.success : theme.text.secondary;
|
|
7598
7580
|
const removeColor = isAcceptedOrConfirming ? theme.status.error : theme.text.secondary;
|
|
7599
7581
|
const showDiffStat = !!diff.diffStat;
|
|
7600
7582
|
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 }) });
|
|
7601
7583
|
let resultSummary = "";
|
|
7602
7584
|
let resultColor = theme.text.secondary;
|
|
7603
|
-
if (status ===
|
|
7585
|
+
if (status === "awaiting_approval" /* AwaitingApproval */) {
|
|
7604
7586
|
resultSummary = "Confirming";
|
|
7605
|
-
} else if (status ===
|
|
7587
|
+
} else if (status === "success" /* Success */ || status === "executing" /* Executing */) {
|
|
7606
7588
|
resultSummary = "Accepted";
|
|
7607
7589
|
resultColor = theme.text.accent;
|
|
7608
|
-
} else if (status ===
|
|
7590
|
+
} else if (status === "cancelled" /* Cancelled */) {
|
|
7609
7591
|
resultSummary = "Rejected";
|
|
7610
7592
|
resultColor = theme.status.error;
|
|
7611
|
-
} else if (status ===
|
|
7593
|
+
} else if (status === "error" /* Error */) {
|
|
7612
7594
|
resultSummary = typeof resultDisplay === "string" ? resultDisplay : "Failed";
|
|
7613
7595
|
resultColor = theme.status.error;
|
|
7614
7596
|
}
|
|
@@ -7639,7 +7621,7 @@ function getFileOpData(diff, status, resultDisplay, terminalWidth, availableTerm
|
|
|
7639
7621
|
filename: diff.fileName,
|
|
7640
7622
|
terminalWidth: terminalWidth - PAYLOAD_MARGIN_LEFT,
|
|
7641
7623
|
availableTerminalHeight,
|
|
7642
|
-
disableColor: status ===
|
|
7624
|
+
disableColor: status === "cancelled" /* Cancelled */
|
|
7643
7625
|
}
|
|
7644
7626
|
);
|
|
7645
7627
|
return { description, summary, payload };
|
|
@@ -7767,10 +7749,10 @@ var DenseToolMessage = (props) => {
|
|
|
7767
7749
|
if (isGrepResult(resultDisplay)) {
|
|
7768
7750
|
return getGenericSuccessData(resultDisplay, originalDescription);
|
|
7769
7751
|
}
|
|
7770
|
-
if (status ===
|
|
7752
|
+
if (status === "success" /* Success */ && resultDisplay) {
|
|
7771
7753
|
return getGenericSuccessData(resultDisplay, originalDescription);
|
|
7772
7754
|
}
|
|
7773
|
-
if (status ===
|
|
7755
|
+
if (status === "error" /* Error */) {
|
|
7774
7756
|
const text = typeof resultDisplay === "string" ? resultDisplay.replace(/\n/g, " ") : "Failed";
|
|
7775
7757
|
const errorSummary = /* @__PURE__ */ (0, import_jsx_runtime30.jsxs)(Text, { color: theme.status.error, wrap: "truncate-end", children: [
|
|
7776
7758
|
"\u2192 ",
|
|
@@ -7811,7 +7793,7 @@ var DenseToolMessage = (props) => {
|
|
|
7811
7793
|
language: fileExtension,
|
|
7812
7794
|
maxWidth: terminalWidth - PAYLOAD_MARGIN_LEFT,
|
|
7813
7795
|
settings,
|
|
7814
|
-
disableColor: status ===
|
|
7796
|
+
disableColor: status === "cancelled" /* Cancelled */,
|
|
7815
7797
|
returnLines: true
|
|
7816
7798
|
});
|
|
7817
7799
|
} else {
|
|
@@ -7819,7 +7801,7 @@ var DenseToolMessage = (props) => {
|
|
|
7819
7801
|
parsedLines,
|
|
7820
7802
|
filename: diff.fileName,
|
|
7821
7803
|
terminalWidth: terminalWidth - PAYLOAD_MARGIN_LEFT,
|
|
7822
|
-
disableColor: status ===
|
|
7804
|
+
disableColor: status === "cancelled" /* Cancelled */
|
|
7823
7805
|
});
|
|
7824
7806
|
}
|
|
7825
7807
|
}, [diff, isExpanded, isAlternateBuffer, terminalWidth, settings, status]);
|
|
@@ -7949,7 +7931,7 @@ function isToolExecuting(pendingHistoryItems) {
|
|
|
7949
7931
|
return pendingHistoryItems.some((item) => {
|
|
7950
7932
|
if (item && item.type === "tool_group") {
|
|
7951
7933
|
return item.tools.some(
|
|
7952
|
-
(tool) =>
|
|
7934
|
+
(tool) => "executing" /* Executing */ === tool.status
|
|
7953
7935
|
);
|
|
7954
7936
|
}
|
|
7955
7937
|
return false;
|
|
@@ -7958,7 +7940,7 @@ function isToolExecuting(pendingHistoryItems) {
|
|
|
7958
7940
|
function isToolAwaitingConfirmation(pendingHistoryItems) {
|
|
7959
7941
|
return pendingHistoryItems.filter((item) => item.type === "tool_group").some(
|
|
7960
7942
|
(item) => item.tools.some(
|
|
7961
|
-
(tool) =>
|
|
7943
|
+
(tool) => "awaiting_approval" /* AwaitingApproval */ === tool.status
|
|
7962
7944
|
)
|
|
7963
7945
|
);
|
|
7964
7946
|
}
|
|
@@ -7981,14 +7963,14 @@ function getToolGroupBorderAppearance(item, activeShellPtyId, embeddedShellFocus
|
|
|
7981
7963
|
if (isTrackedToolCall(t)) {
|
|
7982
7964
|
return t.status !== "success" && t.status !== "error" && t.status !== "cancelled";
|
|
7983
7965
|
} else {
|
|
7984
|
-
return t.status !==
|
|
7966
|
+
return t.status !== "success" /* Success */ && t.status !== "error" /* Error */ && t.status !== "cancelled" /* Cancelled */;
|
|
7985
7967
|
}
|
|
7986
7968
|
});
|
|
7987
7969
|
const isEmbeddedShellFocused = toolsToInspect.some((t) => {
|
|
7988
7970
|
if (isTrackedToolCall(t)) {
|
|
7989
7971
|
return isShellTool(t.request.name) && t.status === "executing" && t.pid === activeShellPtyId && !!embeddedShellFocused;
|
|
7990
7972
|
} else {
|
|
7991
|
-
return isShellTool(t.name) && t.status ===
|
|
7973
|
+
return isShellTool(t.name) && t.status === "executing" /* Executing */ && t.ptyId === activeShellPtyId && !!embeddedShellFocused;
|
|
7992
7974
|
}
|
|
7993
7975
|
});
|
|
7994
7976
|
const isShellCommand = toolsToInspect.some((t) => {
|
|
@@ -8087,7 +8069,7 @@ var ToolGroupMessage = ({
|
|
|
8087
8069
|
const groupedTools = (0, import_react28.useMemo)(() => {
|
|
8088
8070
|
const groups = [];
|
|
8089
8071
|
for (const tool of visibleToolCalls) {
|
|
8090
|
-
if (tool.kind ===
|
|
8072
|
+
if (tool.kind === "agent" /* Agent */) {
|
|
8091
8073
|
const lastGroup = groups[groups.length - 1];
|
|
8092
8074
|
if (Array.isArray(lastGroup)) {
|
|
8093
8075
|
lastGroup.push(tool);
|
|
@@ -8141,7 +8123,7 @@ var ToolGroupMessage = ({
|
|
|
8141
8123
|
}, [groupedTools, isCompactModeEnabled, borderTopOverride]);
|
|
8142
8124
|
let countToolCallsWithResults = 0;
|
|
8143
8125
|
for (const tool of visibleToolCalls) {
|
|
8144
|
-
if (tool.kind !==
|
|
8126
|
+
if (tool.kind !== "agent" /* Agent */) {
|
|
8145
8127
|
if (isCompactTool(tool, isCompactModeEnabled)) {
|
|
8146
8128
|
if (hasDensePayload(tool)) {
|
|
8147
8129
|
countToolCallsWithResults++;
|
|
@@ -8337,18 +8319,18 @@ function CompressionMessage({
|
|
|
8337
8319
|
return "Compressing chat history";
|
|
8338
8320
|
}
|
|
8339
8321
|
switch (compressionStatus) {
|
|
8340
|
-
case
|
|
8322
|
+
case 1 /* COMPRESSED */:
|
|
8341
8323
|
return `Chat history compressed from ${originalTokens} to ${newTokens} tokens.`;
|
|
8342
|
-
case
|
|
8324
|
+
case 2 /* COMPRESSION_FAILED_INFLATED_TOKEN_COUNT */:
|
|
8343
8325
|
if (originalTokens < 5e4) {
|
|
8344
8326
|
return "Compression was not beneficial for this history size.";
|
|
8345
8327
|
}
|
|
8346
8328
|
return "Chat history compression did not reduce size. This may indicate issues with the compression prompt.";
|
|
8347
|
-
case
|
|
8329
|
+
case 3 /* COMPRESSION_FAILED_TOKEN_COUNT_ERROR */:
|
|
8348
8330
|
return "Could not compress chat history due to a token counting error.";
|
|
8349
|
-
case
|
|
8331
|
+
case 4 /* COMPRESSION_FAILED_EMPTY_SUMMARY */:
|
|
8350
8332
|
return "Chat history compression failed: the model returned an empty summary.";
|
|
8351
|
-
case
|
|
8333
|
+
case 5 /* NOOP */:
|
|
8352
8334
|
return "Nothing to compress.";
|
|
8353
8335
|
default:
|
|
8354
8336
|
return "";
|
|
@@ -8762,8 +8744,8 @@ var ModelUsageTable = ({ models }) => {
|
|
|
8762
8744
|
);
|
|
8763
8745
|
roleEntries.sort(([a], [b]) => {
|
|
8764
8746
|
if (a === b) return 0;
|
|
8765
|
-
if (a ===
|
|
8766
|
-
if (b ===
|
|
8747
|
+
if (a === "main" /* MAIN */) return -1;
|
|
8748
|
+
if (b === "main" /* MAIN */) return 1;
|
|
8767
8749
|
return a.localeCompare(b);
|
|
8768
8750
|
});
|
|
8769
8751
|
roleEntries.forEach(([role, roleMetrics]) => {
|
|
@@ -9094,8 +9076,8 @@ var ModelStatsDisplay = ({
|
|
|
9094
9076
|
return validRoles.includes(role);
|
|
9095
9077
|
}).sort((a, b) => {
|
|
9096
9078
|
if (a === b) return 0;
|
|
9097
|
-
if (a ===
|
|
9098
|
-
if (b ===
|
|
9079
|
+
if (a === "main" /* MAIN */) return -1;
|
|
9080
|
+
if (b === "main" /* MAIN */) return 1;
|
|
9099
9081
|
return a.localeCompare(b);
|
|
9100
9082
|
});
|
|
9101
9083
|
const createRow = (metric, getValue, options = {}) => {
|
|
@@ -9885,7 +9867,7 @@ var McpStatus = ({
|
|
|
9885
9867
|
);
|
|
9886
9868
|
const originalStatus = serverStatus(serverName);
|
|
9887
9869
|
const hasCachedItems = serverTools.length > 0 || serverPrompts.length > 0 || serverResources.length > 0;
|
|
9888
|
-
const status = originalStatus ===
|
|
9870
|
+
const status = originalStatus === "disconnected" /* DISCONNECTED */ && hasCachedItems ? "connected" /* CONNECTED */ : originalStatus;
|
|
9889
9871
|
let statusIndicator = "";
|
|
9890
9872
|
let statusText = "";
|
|
9891
9873
|
let statusColor = theme.text.primary;
|
|
@@ -9897,17 +9879,17 @@ var McpStatus = ({
|
|
|
9897
9879
|
statusColor = theme.text.secondary;
|
|
9898
9880
|
} else {
|
|
9899
9881
|
switch (status) {
|
|
9900
|
-
case
|
|
9882
|
+
case "connected" /* CONNECTED */:
|
|
9901
9883
|
statusIndicator = "\u{1F7E2}";
|
|
9902
9884
|
statusText = "Ready";
|
|
9903
9885
|
statusColor = theme.status.success;
|
|
9904
9886
|
break;
|
|
9905
|
-
case
|
|
9887
|
+
case "connecting" /* CONNECTING */:
|
|
9906
9888
|
statusIndicator = "\u{1F504}";
|
|
9907
9889
|
statusText = "Starting... (first startup may take longer)";
|
|
9908
9890
|
statusColor = theme.status.warning;
|
|
9909
9891
|
break;
|
|
9910
|
-
case
|
|
9892
|
+
case "disconnected" /* DISCONNECTED */:
|
|
9911
9893
|
default:
|
|
9912
9894
|
statusIndicator = "\u{1F534}";
|
|
9913
9895
|
statusText = "Disconnected";
|
|
@@ -9955,12 +9937,12 @@ var McpStatus = ({
|
|
|
9955
9937
|
/* @__PURE__ */ (0, import_jsx_runtime50.jsxs)(Text, { children: [
|
|
9956
9938
|
" - ",
|
|
9957
9939
|
statusText,
|
|
9958
|
-
status ===
|
|
9940
|
+
status === "connected" /* CONNECTED */ && parts.length > 0 && ` (${parts.join(", ")})`
|
|
9959
9941
|
] }),
|
|
9960
9942
|
authStatusNode
|
|
9961
9943
|
] }),
|
|
9962
|
-
status ===
|
|
9963
|
-
status ===
|
|
9944
|
+
status === "connecting" /* CONNECTING */ && /* @__PURE__ */ (0, import_jsx_runtime50.jsx)(Text, { children: " (tools and prompts will appear when ready)" }),
|
|
9945
|
+
status === "disconnected" /* DISCONNECTED */ && toolCount > 0 && /* @__PURE__ */ (0, import_jsx_runtime50.jsxs)(Text, { children: [
|
|
9964
9946
|
" (",
|
|
9965
9947
|
toolCount,
|
|
9966
9948
|
" tools cached)"
|
|
@@ -10512,7 +10494,7 @@ var Notifications = () => {
|
|
|
10512
10494
|
if (dismissed) return [];
|
|
10513
10495
|
const counts = persistentState.get("startupWarningCounts") || {};
|
|
10514
10496
|
return startupWarnings.filter((w) => {
|
|
10515
|
-
if (w.priority ===
|
|
10497
|
+
if (w.priority === "low" /* Low */) {
|
|
10516
10498
|
const count = counts[w.id] || 0;
|
|
10517
10499
|
return count < MAX_STARTUP_WARNING_SHOW_COUNT;
|
|
10518
10500
|
}
|
|
@@ -10525,7 +10507,7 @@ var Notifications = () => {
|
|
|
10525
10507
|
const counts = { ...persistentState.get("startupWarningCounts") || {} };
|
|
10526
10508
|
let changed = false;
|
|
10527
10509
|
visibleWarnings.forEach((w) => {
|
|
10528
|
-
if (w.priority ===
|
|
10510
|
+
if (w.priority === "low" /* Low */) {
|
|
10529
10511
|
counts[w.id] = (counts[w.id] || 0) + 1;
|
|
10530
10512
|
changed = true;
|
|
10531
10513
|
}
|
|
@@ -10632,7 +10614,7 @@ var UserIdentity = ({ config }) => {
|
|
|
10632
10614
|
}
|
|
10633
10615
|
return /* @__PURE__ */ (0, import_jsx_runtime60.jsxs)(Box_default, { flexDirection: "column", children: [
|
|
10634
10616
|
/* @__PURE__ */ (0, import_jsx_runtime60.jsxs)(Box_default, { children: [
|
|
10635
|
-
/* @__PURE__ */ (0, import_jsx_runtime60.jsx)(Text, { color: theme.text.primary, wrap: "truncate-end", children: authType ===
|
|
10617
|
+
/* @__PURE__ */ (0, import_jsx_runtime60.jsx)(Text, { color: theme.text.primary, wrap: "truncate-end", children: authType === "oauth-personal" /* LOGIN_WITH_GOOGLE */ ? /* @__PURE__ */ (0, import_jsx_runtime60.jsxs)(Text, { children: [
|
|
10636
10618
|
/* @__PURE__ */ (0, import_jsx_runtime60.jsxs)(Text, { bold: true, children: [
|
|
10637
10619
|
"Signed in with Google",
|
|
10638
10620
|
email ? ":" : ""
|
|
@@ -10866,7 +10848,7 @@ var import_react39 = __toESM(require_react(), 1);
|
|
|
10866
10848
|
function getConfirmingToolState(pendingHistoryItems) {
|
|
10867
10849
|
const allPendingTools = getAllToolCalls(pendingHistoryItems);
|
|
10868
10850
|
const confirmingTools = allPendingTools.filter(
|
|
10869
|
-
(tool) => tool.status ===
|
|
10851
|
+
(tool) => tool.status === "awaiting_approval" /* AwaitingApproval */
|
|
10870
10852
|
);
|
|
10871
10853
|
if (confirmingTools.length === 0) {
|
|
10872
10854
|
return null;
|
|
@@ -12176,7 +12158,7 @@ var ExitPlanModeDialog = ({
|
|
|
12176
12158
|
{
|
|
12177
12159
|
questions: [
|
|
12178
12160
|
{
|
|
12179
|
-
type:
|
|
12161
|
+
type: "choice" /* CHOICE */,
|
|
12180
12162
|
header: "Approval",
|
|
12181
12163
|
question: planContent,
|
|
12182
12164
|
options: [
|
|
@@ -12197,9 +12179,9 @@ var ExitPlanModeDialog = ({
|
|
|
12197
12179
|
onSubmit: (answers) => {
|
|
12198
12180
|
const answer = answers["0"];
|
|
12199
12181
|
if (answer === "Yes, automatically accept edits" /* Auto */) {
|
|
12200
|
-
onApprove(
|
|
12182
|
+
onApprove("autoEdit" /* AUTO_EDIT */);
|
|
12201
12183
|
} else if (answer === "Yes, manually accept edits" /* Manual */) {
|
|
12202
|
-
onApprove(
|
|
12184
|
+
onApprove("default" /* DEFAULT */);
|
|
12203
12185
|
} else if (answer) {
|
|
12204
12186
|
onFeedback(answer);
|
|
12205
12187
|
}
|
|
@@ -12410,7 +12392,7 @@ ${deceptiveUrlWarnings.map(
|
|
|
12410
12392
|
);
|
|
12411
12393
|
(0, import_react44.useEffect)(() => {
|
|
12412
12394
|
if (isCancelling) {
|
|
12413
|
-
handleConfirm(
|
|
12395
|
+
handleConfirm("cancel" /* Cancel */);
|
|
12414
12396
|
}
|
|
12415
12397
|
}, [isCancelling, handleConfirm]);
|
|
12416
12398
|
const handleSelect = (0, import_react44.useCallback)(
|
|
@@ -12423,19 +12405,19 @@ ${deceptiveUrlWarnings.map(
|
|
|
12423
12405
|
if (!confirmationDetails.isModifying) {
|
|
12424
12406
|
options2.push({
|
|
12425
12407
|
label: "Allow once",
|
|
12426
|
-
value:
|
|
12408
|
+
value: "proceed_once" /* ProceedOnce */,
|
|
12427
12409
|
key: "Allow once"
|
|
12428
12410
|
});
|
|
12429
12411
|
if (isTrustedFolder) {
|
|
12430
12412
|
options2.push({
|
|
12431
12413
|
label: "Allow for this session",
|
|
12432
|
-
value:
|
|
12414
|
+
value: "proceed_always" /* ProceedAlways */,
|
|
12433
12415
|
key: "Allow for this session"
|
|
12434
12416
|
});
|
|
12435
12417
|
if (allowPermanentApproval) {
|
|
12436
12418
|
options2.push({
|
|
12437
12419
|
label: "Allow for this file in all future sessions",
|
|
12438
|
-
value:
|
|
12420
|
+
value: "proceed_always_and_save" /* ProceedAlwaysAndSave */,
|
|
12439
12421
|
key: "Allow for this file in all future sessions"
|
|
12440
12422
|
});
|
|
12441
12423
|
}
|
|
@@ -12443,119 +12425,119 @@ ${deceptiveUrlWarnings.map(
|
|
|
12443
12425
|
if (!config.getIdeMode() || !isDiffingEnabled) {
|
|
12444
12426
|
options2.push({
|
|
12445
12427
|
label: "Modify with external editor",
|
|
12446
|
-
value:
|
|
12428
|
+
value: "modify_with_editor" /* ModifyWithEditor */,
|
|
12447
12429
|
key: "Modify with external editor"
|
|
12448
12430
|
});
|
|
12449
12431
|
}
|
|
12450
12432
|
options2.push({
|
|
12451
12433
|
label: "No, suggest changes (esc)",
|
|
12452
|
-
value:
|
|
12434
|
+
value: "cancel" /* Cancel */,
|
|
12453
12435
|
key: "No, suggest changes (esc)"
|
|
12454
12436
|
});
|
|
12455
12437
|
}
|
|
12456
12438
|
} else if (confirmationDetails.type === "sandbox_expansion") {
|
|
12457
12439
|
options2.push({
|
|
12458
12440
|
label: "Allow once",
|
|
12459
|
-
value:
|
|
12441
|
+
value: "proceed_once" /* ProceedOnce */,
|
|
12460
12442
|
key: "Allow once"
|
|
12461
12443
|
});
|
|
12462
12444
|
if (isTrustedFolder) {
|
|
12463
12445
|
options2.push({
|
|
12464
12446
|
label: "Allow for this session",
|
|
12465
|
-
value:
|
|
12447
|
+
value: "proceed_always" /* ProceedAlways */,
|
|
12466
12448
|
key: "Allow for this session"
|
|
12467
12449
|
});
|
|
12468
12450
|
if (allowPermanentApproval) {
|
|
12469
12451
|
options2.push({
|
|
12470
12452
|
label: "Allow for all future sessions",
|
|
12471
|
-
value:
|
|
12453
|
+
value: "proceed_always_and_save" /* ProceedAlwaysAndSave */,
|
|
12472
12454
|
key: "Allow for all future sessions"
|
|
12473
12455
|
});
|
|
12474
12456
|
}
|
|
12475
12457
|
}
|
|
12476
12458
|
options2.push({
|
|
12477
12459
|
label: "No, suggest changes (esc)",
|
|
12478
|
-
value:
|
|
12460
|
+
value: "cancel" /* Cancel */,
|
|
12479
12461
|
key: "No, suggest changes (esc)"
|
|
12480
12462
|
});
|
|
12481
12463
|
} else if (confirmationDetails.type === "exec") {
|
|
12482
12464
|
options2.push({
|
|
12483
12465
|
label: "Allow once",
|
|
12484
|
-
value:
|
|
12466
|
+
value: "proceed_once" /* ProceedOnce */,
|
|
12485
12467
|
key: "Allow once"
|
|
12486
12468
|
});
|
|
12487
12469
|
if (isTrustedFolder) {
|
|
12488
12470
|
options2.push({
|
|
12489
12471
|
label: `Allow for this session`,
|
|
12490
|
-
value:
|
|
12472
|
+
value: "proceed_always" /* ProceedAlways */,
|
|
12491
12473
|
key: `Allow for this session`
|
|
12492
12474
|
});
|
|
12493
12475
|
if (allowPermanentApproval) {
|
|
12494
12476
|
options2.push({
|
|
12495
12477
|
label: `Allow this command for all future sessions`,
|
|
12496
|
-
value:
|
|
12478
|
+
value: "proceed_always_and_save" /* ProceedAlwaysAndSave */,
|
|
12497
12479
|
key: `Allow for all future sessions`
|
|
12498
12480
|
});
|
|
12499
12481
|
}
|
|
12500
12482
|
}
|
|
12501
12483
|
options2.push({
|
|
12502
12484
|
label: "No, suggest changes (esc)",
|
|
12503
|
-
value:
|
|
12485
|
+
value: "cancel" /* Cancel */,
|
|
12504
12486
|
key: "No, suggest changes (esc)"
|
|
12505
12487
|
});
|
|
12506
12488
|
} else if (confirmationDetails.type === "info") {
|
|
12507
12489
|
options2.push({
|
|
12508
12490
|
label: "Allow once",
|
|
12509
|
-
value:
|
|
12491
|
+
value: "proceed_once" /* ProceedOnce */,
|
|
12510
12492
|
key: "Allow once"
|
|
12511
12493
|
});
|
|
12512
12494
|
if (isTrustedFolder) {
|
|
12513
12495
|
options2.push({
|
|
12514
12496
|
label: "Allow for this session",
|
|
12515
|
-
value:
|
|
12497
|
+
value: "proceed_always" /* ProceedAlways */,
|
|
12516
12498
|
key: "Allow for this session"
|
|
12517
12499
|
});
|
|
12518
12500
|
if (allowPermanentApproval) {
|
|
12519
12501
|
options2.push({
|
|
12520
12502
|
label: "Allow for all future sessions",
|
|
12521
|
-
value:
|
|
12503
|
+
value: "proceed_always_and_save" /* ProceedAlwaysAndSave */,
|
|
12522
12504
|
key: "Allow for all future sessions"
|
|
12523
12505
|
});
|
|
12524
12506
|
}
|
|
12525
12507
|
}
|
|
12526
12508
|
options2.push({
|
|
12527
12509
|
label: "No, suggest changes (esc)",
|
|
12528
|
-
value:
|
|
12510
|
+
value: "cancel" /* Cancel */,
|
|
12529
12511
|
key: "No, suggest changes (esc)"
|
|
12530
12512
|
});
|
|
12531
12513
|
} else if (confirmationDetails.type === "mcp") {
|
|
12532
12514
|
options2.push({
|
|
12533
12515
|
label: "Allow once",
|
|
12534
|
-
value:
|
|
12516
|
+
value: "proceed_once" /* ProceedOnce */,
|
|
12535
12517
|
key: "Allow once"
|
|
12536
12518
|
});
|
|
12537
12519
|
if (isTrustedFolder) {
|
|
12538
12520
|
options2.push({
|
|
12539
12521
|
label: "Allow tool for this session",
|
|
12540
|
-
value:
|
|
12522
|
+
value: "proceed_always_tool" /* ProceedAlwaysTool */,
|
|
12541
12523
|
key: "Allow tool for this session"
|
|
12542
12524
|
});
|
|
12543
12525
|
options2.push({
|
|
12544
12526
|
label: "Allow all server tools for this session",
|
|
12545
|
-
value:
|
|
12527
|
+
value: "proceed_always_server" /* ProceedAlwaysServer */,
|
|
12546
12528
|
key: "Allow all server tools for this session"
|
|
12547
12529
|
});
|
|
12548
12530
|
if (allowPermanentApproval) {
|
|
12549
12531
|
options2.push({
|
|
12550
12532
|
label: "Allow tool for all future sessions",
|
|
12551
|
-
value:
|
|
12533
|
+
value: "proceed_always_and_save" /* ProceedAlwaysAndSave */,
|
|
12552
12534
|
key: "Allow tool for all future sessions"
|
|
12553
12535
|
});
|
|
12554
12536
|
}
|
|
12555
12537
|
}
|
|
12556
12538
|
options2.push({
|
|
12557
12539
|
label: "No, suggest changes (esc)",
|
|
12558
|
-
value:
|
|
12540
|
+
value: "cancel" /* Cancel */,
|
|
12559
12541
|
key: "No, suggest changes (esc)"
|
|
12560
12542
|
});
|
|
12561
12543
|
}
|
|
@@ -12594,7 +12576,7 @@ ${deceptiveUrlWarnings.map(
|
|
|
12594
12576
|
const containsRedirection = commandsToDisplay.some(
|
|
12595
12577
|
(cmd) => hasRedirection(cmd)
|
|
12596
12578
|
);
|
|
12597
|
-
const isAutoEdit = config.getApprovalMode() ===
|
|
12579
|
+
const isAutoEdit = config.getApprovalMode() === "yolo" /* YOLO */ || config.getApprovalMode() === "autoEdit" /* AUTO_EDIT */;
|
|
12598
12580
|
if (containsRedirection && !isAutoEdit) {
|
|
12599
12581
|
extraInfoLines = 1;
|
|
12600
12582
|
}
|
|
@@ -12620,7 +12602,7 @@ ${deceptiveUrlWarnings.map(
|
|
|
12620
12602
|
const isSafeToPersist = confirmationDetails.type === "info" || confirmationDetails.type === "edit" || confirmationDetails.type === "mcp";
|
|
12621
12603
|
if (isSafeToPersist && settings.merged.security.autoAddToPolicyByDefault) {
|
|
12622
12604
|
const alwaysAndSaveIndex = options2.findIndex(
|
|
12623
|
-
(o) => o.value ===
|
|
12605
|
+
(o) => o.value === "proceed_always_and_save" /* ProceedAlwaysAndSave */
|
|
12624
12606
|
);
|
|
12625
12607
|
if (alwaysAndSaveIndex !== -1) {
|
|
12626
12608
|
initialIndex2 = alwaysAndSaveIndex;
|
|
@@ -12637,10 +12619,10 @@ ${deceptiveUrlWarnings.map(
|
|
|
12637
12619
|
{
|
|
12638
12620
|
questions: confirmationDetails.questions,
|
|
12639
12621
|
onSubmit: (answers) => {
|
|
12640
|
-
handleConfirm(
|
|
12622
|
+
handleConfirm("proceed_once" /* ProceedOnce */, { answers });
|
|
12641
12623
|
},
|
|
12642
12624
|
onCancel: () => {
|
|
12643
|
-
handleConfirm(
|
|
12625
|
+
handleConfirm("cancel" /* Cancel */);
|
|
12644
12626
|
},
|
|
12645
12627
|
width: terminalWidth,
|
|
12646
12628
|
availableHeight: bodyHeight
|
|
@@ -12661,19 +12643,19 @@ ${deceptiveUrlWarnings.map(
|
|
|
12661
12643
|
planPath: confirmationDetails.planPath,
|
|
12662
12644
|
getPreferredEditor,
|
|
12663
12645
|
onApprove: (approvalMode) => {
|
|
12664
|
-
handleConfirm(
|
|
12646
|
+
handleConfirm("proceed_once" /* ProceedOnce */, {
|
|
12665
12647
|
approved: true,
|
|
12666
12648
|
approvalMode
|
|
12667
12649
|
});
|
|
12668
12650
|
},
|
|
12669
12651
|
onFeedback: (feedback) => {
|
|
12670
|
-
handleConfirm(
|
|
12652
|
+
handleConfirm("proceed_once" /* ProceedOnce */, {
|
|
12671
12653
|
approved: false,
|
|
12672
12654
|
feedback
|
|
12673
12655
|
});
|
|
12674
12656
|
},
|
|
12675
12657
|
onCancel: () => {
|
|
12676
|
-
handleConfirm(
|
|
12658
|
+
handleConfirm("cancel" /* Cancel */);
|
|
12677
12659
|
},
|
|
12678
12660
|
width: terminalWidth,
|
|
12679
12661
|
availableHeight: bodyHeight
|
|
@@ -12783,7 +12765,7 @@ ${deceptiveUrlWarnings.map(
|
|
|
12783
12765
|
const containsRedirection = commandsToDisplay.some(
|
|
12784
12766
|
(cmd) => hasRedirection(cmd)
|
|
12785
12767
|
);
|
|
12786
|
-
const isAutoEdit = config.getApprovalMode() ===
|
|
12768
|
+
const isAutoEdit = config.getApprovalMode() === "yolo" /* YOLO */ || config.getApprovalMode() === "autoEdit" /* AUTO_EDIT */;
|
|
12787
12769
|
let warnings = null;
|
|
12788
12770
|
if (containsRedirection && !isAutoEdit) {
|
|
12789
12771
|
const tipText = `To auto-accept, press ${formatCommand("app.cycleApprovalMode" /* CYCLE_APPROVAL_MODE */)}`;
|
|
@@ -12946,7 +12928,7 @@ ${deceptiveUrlWarnings.map(
|
|
|
12946
12928
|
const bodyOverflowDirection = confirmationDetails.type === "mcp" && isMcpToolDetailsExpanded ? "bottom" : "top";
|
|
12947
12929
|
const renderRadioItem = (0, import_react44.useCallback)(
|
|
12948
12930
|
(item, { titleColor }) => {
|
|
12949
|
-
if (item.value ===
|
|
12931
|
+
if (item.value === "proceed_always_and_save" /* ProceedAlwaysAndSave */) {
|
|
12950
12932
|
return /* @__PURE__ */ (0, import_jsx_runtime67.jsxs)(Text, { color: titleColor, wrap: "truncate", children: [
|
|
12951
12933
|
item.label,
|
|
12952
12934
|
" ",
|
|
@@ -14945,7 +14927,7 @@ function validateAuthMethodWithSettings(authType, settings) {
|
|
|
14945
14927
|
if (settings.merged.security.auth.useExternal) {
|
|
14946
14928
|
return null;
|
|
14947
14929
|
}
|
|
14948
|
-
if (authType ===
|
|
14930
|
+
if (authType === "gemini-api-key" /* USE_GEMINI */) {
|
|
14949
14931
|
return null;
|
|
14950
14932
|
}
|
|
14951
14933
|
return validateAuthMethod(authType);
|
|
@@ -14997,7 +14979,7 @@ var useAuthCommand = (settings, config, initialAuthError = null, initialAccountS
|
|
|
14997
14979
|
}
|
|
14998
14980
|
return;
|
|
14999
14981
|
}
|
|
15000
|
-
if (authType ===
|
|
14982
|
+
if (authType === "gemini-api-key" /* USE_GEMINI */) {
|
|
15001
14983
|
const key = await reloadApiKey();
|
|
15002
14984
|
if (!key) {
|
|
15003
14985
|
setAuthState("awaiting_api_key_input" /* AwaitingApiKeyInput */);
|
|
@@ -15072,31 +15054,31 @@ function AuthDialog({
|
|
|
15072
15054
|
let items = [
|
|
15073
15055
|
{
|
|
15074
15056
|
label: "Sign in with Google",
|
|
15075
|
-
value:
|
|
15076
|
-
key:
|
|
15057
|
+
value: "oauth-personal" /* LOGIN_WITH_GOOGLE */,
|
|
15058
|
+
key: "oauth-personal" /* LOGIN_WITH_GOOGLE */
|
|
15077
15059
|
},
|
|
15078
15060
|
...process.env["CLOUD_SHELL"] === "true" ? [
|
|
15079
15061
|
{
|
|
15080
15062
|
label: "Use Cloud Shell user credentials",
|
|
15081
|
-
value:
|
|
15082
|
-
key:
|
|
15063
|
+
value: "compute-default-credentials" /* COMPUTE_ADC */,
|
|
15064
|
+
key: "compute-default-credentials" /* COMPUTE_ADC */
|
|
15083
15065
|
}
|
|
15084
15066
|
] : process.env["GEMINI_CLI_USE_COMPUTE_ADC"] === "true" ? [
|
|
15085
15067
|
{
|
|
15086
15068
|
label: "Use metadata server application default credentials",
|
|
15087
|
-
value:
|
|
15088
|
-
key:
|
|
15069
|
+
value: "compute-default-credentials" /* COMPUTE_ADC */,
|
|
15070
|
+
key: "compute-default-credentials" /* COMPUTE_ADC */
|
|
15089
15071
|
}
|
|
15090
15072
|
] : [],
|
|
15091
15073
|
{
|
|
15092
15074
|
label: "Use Gemini API Key",
|
|
15093
|
-
value:
|
|
15094
|
-
key:
|
|
15075
|
+
value: "gemini-api-key" /* USE_GEMINI */,
|
|
15076
|
+
key: "gemini-api-key" /* USE_GEMINI */
|
|
15095
15077
|
},
|
|
15096
15078
|
{
|
|
15097
15079
|
label: "Vertex AI",
|
|
15098
|
-
value:
|
|
15099
|
-
key:
|
|
15080
|
+
value: "vertex-ai" /* USE_VERTEX_AI */,
|
|
15081
|
+
key: "vertex-ai" /* USE_VERTEX_AI */
|
|
15100
15082
|
}
|
|
15101
15083
|
];
|
|
15102
15084
|
if (settings.merged.security.auth.enforcedType) {
|
|
@@ -15118,9 +15100,9 @@ function AuthDialog({
|
|
|
15118
15100
|
return item.value === defaultAuthType;
|
|
15119
15101
|
}
|
|
15120
15102
|
if (process.env["GEMINI_API_KEY"]) {
|
|
15121
|
-
return item.value ===
|
|
15103
|
+
return item.value === "gemini-api-key" /* USE_GEMINI */;
|
|
15122
15104
|
}
|
|
15123
|
-
return item.value ===
|
|
15105
|
+
return item.value === "oauth-personal" /* LOGIN_WITH_GOOGLE */;
|
|
15124
15106
|
});
|
|
15125
15107
|
if (settings.merged.security.auth.enforcedType) {
|
|
15126
15108
|
initialAuthIndex = 0;
|
|
@@ -15131,19 +15113,19 @@ function AuthDialog({
|
|
|
15131
15113
|
return;
|
|
15132
15114
|
}
|
|
15133
15115
|
if (authType) {
|
|
15134
|
-
if (authType ===
|
|
15116
|
+
if (authType === "oauth-personal" /* LOGIN_WITH_GOOGLE */) {
|
|
15135
15117
|
setAuthContext({ requiresRestart: true });
|
|
15136
15118
|
} else {
|
|
15137
15119
|
setAuthContext({});
|
|
15138
15120
|
}
|
|
15139
15121
|
await clearCachedCredentialFile();
|
|
15140
15122
|
settings.setValue(scope, "security.auth.selectedType", authType);
|
|
15141
|
-
if (authType ===
|
|
15123
|
+
if (authType === "oauth-personal" /* LOGIN_WITH_GOOGLE */ && config.isBrowserLaunchSuppressed()) {
|
|
15142
15124
|
setExiting(true);
|
|
15143
15125
|
setTimeout(relaunchApp, 100);
|
|
15144
15126
|
return;
|
|
15145
15127
|
}
|
|
15146
|
-
if (authType ===
|
|
15128
|
+
if (authType === "gemini-api-key" /* USE_GEMINI */) {
|
|
15147
15129
|
setAuthState("awaiting_api_key_input" /* AwaitingApiKeyInput */);
|
|
15148
15130
|
return;
|
|
15149
15131
|
}
|
|
@@ -15893,11 +15875,11 @@ var PrivacyNoticeText = ({
|
|
|
15893
15875
|
}) => {
|
|
15894
15876
|
const authType = config.getContentGeneratorConfig()?.authType;
|
|
15895
15877
|
switch (authType) {
|
|
15896
|
-
case
|
|
15878
|
+
case "gemini-api-key" /* USE_GEMINI */:
|
|
15897
15879
|
return /* @__PURE__ */ (0, import_jsx_runtime85.jsx)(GeminiPrivacyNotice, { onExit });
|
|
15898
|
-
case
|
|
15880
|
+
case "vertex-ai" /* USE_VERTEX_AI */:
|
|
15899
15881
|
return /* @__PURE__ */ (0, import_jsx_runtime85.jsx)(CloudPaidPrivacyNotice, { onExit });
|
|
15900
|
-
case
|
|
15882
|
+
case "oauth-personal" /* LOGIN_WITH_GOOGLE */:
|
|
15901
15883
|
default:
|
|
15902
15884
|
return /* @__PURE__ */ (0, import_jsx_runtime85.jsx)(CloudFreePrivacyNotice, { config, onExit });
|
|
15903
15885
|
}
|
|
@@ -15938,7 +15920,7 @@ function ProQuotaDialog({
|
|
|
15938
15920
|
value: "retry_always",
|
|
15939
15921
|
key: "retry_always"
|
|
15940
15922
|
},
|
|
15941
|
-
...authType ===
|
|
15923
|
+
...authType === "oauth-personal" /* LOGIN_WITH_GOOGLE */ && !isUltra ? [
|
|
15942
15924
|
{
|
|
15943
15925
|
label: "Upgrade for higher limits",
|
|
15944
15926
|
value: "upgrade",
|
|
@@ -17091,7 +17073,7 @@ function ModelDialog({ onClose }) {
|
|
|
17091
17073
|
const useGemini31 = config?.getGemini31LaunchedSync?.() ?? false;
|
|
17092
17074
|
const useGemini31FlashLite = config?.getGemini31FlashLiteLaunchedSync?.() ?? false;
|
|
17093
17075
|
const selectedAuthType = settings.merged.security.auth.selectedType;
|
|
17094
|
-
const useCustomToolModel = useGemini31 && selectedAuthType ===
|
|
17076
|
+
const useCustomToolModel = useGemini31 && selectedAuthType === "gemini-api-key" /* USE_GEMINI */;
|
|
17095
17077
|
const manualModelSelected = (0, import_react62.useMemo)(() => {
|
|
17096
17078
|
if (config?.getExperimentalDynamicModelConfiguration?.() === true && config.getModelConfigService) {
|
|
17097
17079
|
const def = config.getModelConfigService().getModelDefinition(preferredModel);
|
|
@@ -18143,10 +18125,10 @@ function initializeConsoleStore() {
|
|
|
18143
18125
|
globalConsoleMessages = [];
|
|
18144
18126
|
globalErrorCount = 0;
|
|
18145
18127
|
notifyListeners();
|
|
18146
|
-
coreEvents.off(
|
|
18147
|
-
coreEvents.off(
|
|
18148
|
-
coreEvents.on(
|
|
18149
|
-
coreEvents.on(
|
|
18128
|
+
coreEvents.off("console-log" /* ConsoleLog */, handleConsoleLog);
|
|
18129
|
+
coreEvents.off("output" /* Output */, handleOutput);
|
|
18130
|
+
coreEvents.on("console-log" /* ConsoleLog */, handleConsoleLog);
|
|
18131
|
+
coreEvents.on("output" /* Output */, handleOutput);
|
|
18150
18132
|
}
|
|
18151
18133
|
function notifyListeners() {
|
|
18152
18134
|
for (const listener of listeners) {
|
|
@@ -20244,7 +20226,7 @@ function usePromptCompletion({
|
|
|
20244
20226
|
{ model: "prompt-completion" },
|
|
20245
20227
|
contents,
|
|
20246
20228
|
signal,
|
|
20247
|
-
|
|
20229
|
+
"utility_autocomplete" /* UTILITY_AUTOCOMPLETE */
|
|
20248
20230
|
);
|
|
20249
20231
|
if (signal.aborted) {
|
|
20250
20232
|
return;
|
|
@@ -21971,9 +21953,9 @@ var InputPrompt = ({
|
|
|
21971
21953
|
onSuggestionsVisibilityChange(shouldShowSuggestions);
|
|
21972
21954
|
}
|
|
21973
21955
|
}, [shouldShowSuggestions, onSuggestionsVisibilityChange]);
|
|
21974
|
-
const showAutoAcceptStyling = !shellModeActive && approvalMode ===
|
|
21975
|
-
const showYoloStyling = !shellModeActive && approvalMode ===
|
|
21976
|
-
const showPlanStyling = !shellModeActive && approvalMode ===
|
|
21956
|
+
const showAutoAcceptStyling = !shellModeActive && approvalMode === "autoEdit" /* AUTO_EDIT */;
|
|
21957
|
+
const showYoloStyling = !shellModeActive && approvalMode === "yolo" /* YOLO */;
|
|
21958
|
+
const showPlanStyling = !shellModeActive && approvalMode === "plan" /* PLAN */;
|
|
21977
21959
|
let statusColor;
|
|
21978
21960
|
let statusText = "";
|
|
21979
21961
|
if (shellModeActive) {
|
|
@@ -22805,22 +22787,22 @@ var ApprovalModeIndicator = ({
|
|
|
22805
22787
|
const cycleHint = formatCommand("app.cycleApprovalMode" /* CYCLE_APPROVAL_MODE */);
|
|
22806
22788
|
const yoloHint = formatCommand("app.toggleYolo" /* TOGGLE_YOLO */);
|
|
22807
22789
|
switch (approvalMode) {
|
|
22808
|
-
case
|
|
22790
|
+
case "autoEdit" /* AUTO_EDIT */:
|
|
22809
22791
|
textColor = theme.status.warning;
|
|
22810
22792
|
textContent = "auto-accept edits";
|
|
22811
22793
|
subText = allowPlanMode ? `${cycleHint} to plan` : `${cycleHint} to manual`;
|
|
22812
22794
|
break;
|
|
22813
|
-
case
|
|
22795
|
+
case "plan" /* PLAN */:
|
|
22814
22796
|
textColor = theme.status.success;
|
|
22815
22797
|
textContent = "plan";
|
|
22816
22798
|
subText = `${cycleHint} to manual`;
|
|
22817
22799
|
break;
|
|
22818
|
-
case
|
|
22800
|
+
case "yolo" /* YOLO */:
|
|
22819
22801
|
textColor = theme.status.error;
|
|
22820
22802
|
textContent = "YOLO";
|
|
22821
22803
|
subText = yoloHint;
|
|
22822
22804
|
break;
|
|
22823
|
-
case
|
|
22805
|
+
case "default" /* DEFAULT */:
|
|
22824
22806
|
default:
|
|
22825
22807
|
textColor = theme.text.accent;
|
|
22826
22808
|
textContent = "";
|
|
@@ -22868,7 +22850,7 @@ var useComposerStatus = () => {
|
|
|
22868
22850
|
(item) => item.type === "tool_group"
|
|
22869
22851
|
).some(
|
|
22870
22852
|
(item) => item.tools.some(
|
|
22871
|
-
(tool) => tool.status ===
|
|
22853
|
+
(tool) => tool.status === "awaiting_approval" /* AwaitingApproval */
|
|
22872
22854
|
)
|
|
22873
22855
|
),
|
|
22874
22856
|
[uiState.pendingHistoryItems]
|
|
@@ -22883,13 +22865,13 @@ var useComposerStatus = () => {
|
|
|
22883
22865
|
const hideMinimalModeHintWhileBusy = !uiState.cleanUiDetailsVisible && (showLoadingIndicator || uiState.activeHooks.length > 0);
|
|
22884
22866
|
if (hideMinimalModeHintWhileBusy) return null;
|
|
22885
22867
|
switch (showApprovalModeIndicator) {
|
|
22886
|
-
case
|
|
22868
|
+
case "yolo" /* YOLO */:
|
|
22887
22869
|
return { text: "YOLO", color: theme.status.error };
|
|
22888
|
-
case
|
|
22870
|
+
case "plan" /* PLAN */:
|
|
22889
22871
|
return { text: "plan", color: theme.status.success };
|
|
22890
|
-
case
|
|
22872
|
+
case "autoEdit" /* AUTO_EDIT */:
|
|
22891
22873
|
return { text: "auto edit", color: theme.status.warning };
|
|
22892
|
-
case
|
|
22874
|
+
case "default" /* DEFAULT */:
|
|
22893
22875
|
default:
|
|
22894
22876
|
return null;
|
|
22895
22877
|
}
|
|
@@ -23243,7 +23225,7 @@ var ConfigInitDisplay = ({
|
|
|
23243
23225
|
let connected = 0;
|
|
23244
23226
|
const connecting = [];
|
|
23245
23227
|
for (const [name, client] of clients.entries()) {
|
|
23246
|
-
if (client.getStatus() ===
|
|
23228
|
+
if (client.getStatus() === "connected" /* CONNECTED */) {
|
|
23247
23229
|
connected++;
|
|
23248
23230
|
} else {
|
|
23249
23231
|
connecting.push(name);
|
|
@@ -23265,9 +23247,9 @@ var ConfigInitDisplay = ({
|
|
|
23265
23247
|
);
|
|
23266
23248
|
}
|
|
23267
23249
|
};
|
|
23268
|
-
coreEvents.on(
|
|
23250
|
+
coreEvents.on("mcp-client-update" /* McpClientUpdate */, onChange);
|
|
23269
23251
|
return () => {
|
|
23270
|
-
coreEvents.off(
|
|
23252
|
+
coreEvents.off("mcp-client-update" /* McpClientUpdate */, onChange);
|
|
23271
23253
|
};
|
|
23272
23254
|
}, [initialMessage]);
|
|
23273
23255
|
return /* @__PURE__ */ (0, import_jsx_runtime122.jsx)(Box_default, { marginTop: 1, children: /* @__PURE__ */ (0, import_jsx_runtime122.jsxs)(Text, { children: [
|
|
@@ -23982,7 +23964,7 @@ var useExecutionLifecycle = (addItemToHistory, setPendingHistoryItem, onExec, on
|
|
|
23982
23964
|
callId,
|
|
23983
23965
|
name: SHELL_COMMAND_NAME,
|
|
23984
23966
|
description: rawQuery,
|
|
23985
|
-
status:
|
|
23967
|
+
status: "executing" /* Executing */,
|
|
23986
23968
|
isClientInitiated: true,
|
|
23987
23969
|
resultDisplay: "",
|
|
23988
23970
|
confirmationDetails: void 0
|
|
@@ -24123,7 +24105,7 @@ __code=$?; pwd > ${escapedPwdFilePath}; exit $__code`;
|
|
|
24123
24105
|
mainContent = result.output.trim() || "(Command produced no output)";
|
|
24124
24106
|
}
|
|
24125
24107
|
let finalOutput = result.ansiOutput && result.ansiOutput.length > 0 ? result.ansiOutput : mainContent;
|
|
24126
|
-
let finalStatus =
|
|
24108
|
+
let finalStatus = "success" /* Success */;
|
|
24127
24109
|
const prependToAnsiOutput = (output, text) => {
|
|
24128
24110
|
const newLines = text.split("\n").map((line) => [
|
|
24129
24111
|
{
|
|
@@ -24142,20 +24124,20 @@ __code=$?; pwd > ${escapedPwdFilePath}; exit $__code`;
|
|
|
24142
24124
|
};
|
|
24143
24125
|
let prefix = "";
|
|
24144
24126
|
if (result.error) {
|
|
24145
|
-
finalStatus =
|
|
24127
|
+
finalStatus = "error" /* Error */;
|
|
24146
24128
|
prefix = result.error.message;
|
|
24147
24129
|
} else if (result.aborted) {
|
|
24148
|
-
finalStatus =
|
|
24130
|
+
finalStatus = "cancelled" /* Cancelled */;
|
|
24149
24131
|
prefix = "Command was cancelled.";
|
|
24150
24132
|
} else if (result.backgrounded) {
|
|
24151
|
-
finalStatus =
|
|
24133
|
+
finalStatus = "success" /* Success */;
|
|
24152
24134
|
finalOutput = `Command moved to background (PID: ${result.pid}). Output hidden. Press Ctrl+B to view.`;
|
|
24153
24135
|
mainContent = finalOutput;
|
|
24154
24136
|
} else if (result.signal) {
|
|
24155
|
-
finalStatus =
|
|
24137
|
+
finalStatus = "error" /* Error */;
|
|
24156
24138
|
prefix = `Command terminated by signal: ${result.signal}.`;
|
|
24157
24139
|
} else if (result.exitCode !== 0) {
|
|
24158
|
-
finalStatus =
|
|
24140
|
+
finalStatus = "error" /* Error */;
|
|
24159
24141
|
prefix = `Command exited with code ${result.exitCode}.`;
|
|
24160
24142
|
}
|
|
24161
24143
|
if (prefix) {
|
|
@@ -24181,7 +24163,7 @@ ${mainContent}`;
|
|
|
24181
24163
|
status: finalStatus,
|
|
24182
24164
|
resultDisplay: finalOutput
|
|
24183
24165
|
};
|
|
24184
|
-
if (finalStatus !==
|
|
24166
|
+
if (finalStatus !== "cancelled" /* Cancelled */) {
|
|
24185
24167
|
addItemToHistory(
|
|
24186
24168
|
{
|
|
24187
24169
|
type: "tool_group",
|
|
@@ -25171,7 +25153,7 @@ function useQuotaAndFallback({
|
|
|
25171
25153
|
error.retryDelayMs ? `Access resets at ${getResetTimeMessage(error.retryDelayMs)}.` : null,
|
|
25172
25154
|
`/stats model for usage details`,
|
|
25173
25155
|
`/model to switch models.`,
|
|
25174
|
-
contentGeneratorConfig?.authType ===
|
|
25156
|
+
contentGeneratorConfig?.authType === "oauth-personal" /* LOGIN_WITH_GOOGLE */ ? `/auth to switch to API key.` : null
|
|
25175
25157
|
].filter(Boolean);
|
|
25176
25158
|
message = messageLines.join("\n");
|
|
25177
25159
|
} else if (error instanceof ModelNotFoundError) {
|
|
@@ -25359,7 +25341,7 @@ var useEditorSettings = (loadedSettings, setEditorError, addItem) => {
|
|
|
25359
25341
|
);
|
|
25360
25342
|
setEditorError(null);
|
|
25361
25343
|
setIsEditorDialogOpen(false);
|
|
25362
|
-
coreEvents.emit(
|
|
25344
|
+
coreEvents.emit("editor-selected" /* EditorSelected */, { editor: editorType });
|
|
25363
25345
|
} catch (error) {
|
|
25364
25346
|
setEditorError(`Failed to set editor preference: ${error}`);
|
|
25365
25347
|
}
|
|
@@ -25368,7 +25350,7 @@ var useEditorSettings = (loadedSettings, setEditorError, addItem) => {
|
|
|
25368
25350
|
);
|
|
25369
25351
|
const exitEditorDialog = (0, import_react95.useCallback)(() => {
|
|
25370
25352
|
setIsEditorDialogOpen(false);
|
|
25371
|
-
coreEvents.emit(
|
|
25353
|
+
coreEvents.emit("editor-selected" /* EditorSelected */, { editor: void 0 });
|
|
25372
25354
|
}, []);
|
|
25373
25355
|
return {
|
|
25374
25356
|
isEditorDialogOpen,
|
|
@@ -25727,7 +25709,7 @@ var useSlashCommandProcessor = (config, settings, addItem, clearItems, loadHisto
|
|
|
25727
25709
|
canonicalPath: resolvedCommandPath
|
|
25728
25710
|
} = parseSlashCommand(trimmed, commands);
|
|
25729
25711
|
if (!commandToExecute) {
|
|
25730
|
-
const isMcpLoading = config?.getMcpClientManager()?.getDiscoveryState() ===
|
|
25712
|
+
const isMcpLoading = config?.getMcpClientManager()?.getDiscoveryState() === "in_progress" /* IN_PROGRESS */;
|
|
25731
25713
|
if (isMcpLoading) {
|
|
25732
25714
|
setIsProcessing(true);
|
|
25733
25715
|
if (addToHistory) {
|
|
@@ -25895,7 +25877,7 @@ var useSlashCommandProcessor = (config, settings, addItem, clearItems, loadHisto
|
|
|
25895
25877
|
onConfirm: async (resolvedOutcome) => {
|
|
25896
25878
|
resolve3({
|
|
25897
25879
|
outcome: resolvedOutcome,
|
|
25898
|
-
approvedCommands: resolvedOutcome ===
|
|
25880
|
+
approvedCommands: resolvedOutcome === "cancel" /* Cancel */ ? [] : result.commandsToConfirm
|
|
25899
25881
|
});
|
|
25900
25882
|
}
|
|
25901
25883
|
};
|
|
@@ -25903,7 +25885,7 @@ var useSlashCommandProcessor = (config, settings, addItem, clearItems, loadHisto
|
|
|
25903
25885
|
callId,
|
|
25904
25886
|
name: "Expansion",
|
|
25905
25887
|
description: "Command expansion needs shell access",
|
|
25906
|
-
status:
|
|
25888
|
+
status: "awaiting_approval" /* AwaitingApproval */,
|
|
25907
25889
|
isClientInitiated: true,
|
|
25908
25890
|
resultDisplay: void 0,
|
|
25909
25891
|
confirmationDetails
|
|
@@ -25914,7 +25896,7 @@ var useSlashCommandProcessor = (config, settings, addItem, clearItems, loadHisto
|
|
|
25914
25896
|
});
|
|
25915
25897
|
});
|
|
25916
25898
|
setPendingItem(null);
|
|
25917
|
-
if (outcome ===
|
|
25899
|
+
if (outcome === "cancel" /* Cancel */ || !approvedCommands || approvedCommands.length === 0) {
|
|
25918
25900
|
addItem(
|
|
25919
25901
|
{
|
|
25920
25902
|
type: "info" /* INFO */,
|
|
@@ -25924,7 +25906,7 @@ var useSlashCommandProcessor = (config, settings, addItem, clearItems, loadHisto
|
|
|
25924
25906
|
);
|
|
25925
25907
|
return { type: "handled" };
|
|
25926
25908
|
}
|
|
25927
|
-
if (outcome ===
|
|
25909
|
+
if (outcome === "proceed_always" /* ProceedAlways */) {
|
|
25928
25910
|
setSessionShellAllowlist(
|
|
25929
25911
|
(prev) => /* @__PURE__ */ new Set([...prev, ...approvedCommands])
|
|
25930
25912
|
);
|
|
@@ -26400,7 +26382,7 @@ function mapToDisplay(toolOrTools, options = {}) {
|
|
|
26400
26382
|
let description;
|
|
26401
26383
|
let renderOutputAsMarkdown = false;
|
|
26402
26384
|
const displayName = call.tool?.displayName ?? call.request.name;
|
|
26403
|
-
if (call.status ===
|
|
26385
|
+
if (call.status === "error" /* Error */) {
|
|
26404
26386
|
description = JSON.stringify(call.request.args);
|
|
26405
26387
|
} else {
|
|
26406
26388
|
description = call.invocation.getDescription();
|
|
@@ -26423,27 +26405,27 @@ function mapToDisplay(toolOrTools, options = {}) {
|
|
|
26423
26405
|
let progress = void 0;
|
|
26424
26406
|
let progressTotal = void 0;
|
|
26425
26407
|
switch (call.status) {
|
|
26426
|
-
case
|
|
26408
|
+
case "success" /* Success */:
|
|
26427
26409
|
resultDisplay = call.response.resultDisplay;
|
|
26428
26410
|
outputFile = call.response.outputFile;
|
|
26429
26411
|
break;
|
|
26430
|
-
case
|
|
26431
|
-
case
|
|
26412
|
+
case "error" /* Error */:
|
|
26413
|
+
case "cancelled" /* Cancelled */:
|
|
26432
26414
|
resultDisplay = call.response.resultDisplay;
|
|
26433
26415
|
break;
|
|
26434
|
-
case
|
|
26416
|
+
case "awaiting_approval" /* AwaitingApproval */:
|
|
26435
26417
|
correlationId = call.correlationId;
|
|
26436
26418
|
confirmationDetails = call.confirmationDetails;
|
|
26437
26419
|
break;
|
|
26438
|
-
case
|
|
26420
|
+
case "executing" /* Executing */:
|
|
26439
26421
|
resultDisplay = call.liveOutput;
|
|
26440
26422
|
ptyId = call.pid;
|
|
26441
26423
|
progressMessage = call.progressMessage;
|
|
26442
26424
|
progress = call.progress;
|
|
26443
26425
|
progressTotal = call.progressTotal;
|
|
26444
26426
|
break;
|
|
26445
|
-
case
|
|
26446
|
-
case
|
|
26427
|
+
case "scheduled" /* Scheduled */:
|
|
26428
|
+
case "validating" /* Validating */:
|
|
26447
26429
|
break;
|
|
26448
26430
|
default: {
|
|
26449
26431
|
const exhaustiveCheck = call;
|
|
@@ -26514,7 +26496,7 @@ function useToolScheduler(onComplete, config, getPreferredEditor) {
|
|
|
26514
26496
|
const handler = (event) => {
|
|
26515
26497
|
const isRoot = event.schedulerId === ROOT_SCHEDULER_ID;
|
|
26516
26498
|
const hasExecuting = event.toolCalls.some(
|
|
26517
|
-
(tc) => tc.status ===
|
|
26499
|
+
(tc) => tc.status === "executing" /* Executing */ || (tc.status === "success" /* Success */ || tc.status === "error" /* Error */) && "tailToolCallRequest" in tc && tc.tailToolCallRequest != null
|
|
26518
26500
|
);
|
|
26519
26501
|
if (hasExecuting) {
|
|
26520
26502
|
setLastToolOutputTime(Date.now());
|
|
@@ -26523,7 +26505,7 @@ function useToolScheduler(onComplete, config, getPreferredEditor) {
|
|
|
26523
26505
|
const prevCalls = prev[event.schedulerId] ?? [];
|
|
26524
26506
|
const prevCallIds = new Set(prevCalls.map((tc) => tc.request.callId));
|
|
26525
26507
|
const filteredToolCalls = isRoot ? event.toolCalls : event.toolCalls.filter(
|
|
26526
|
-
(tc) => tc.status ===
|
|
26508
|
+
(tc) => tc.status === "awaiting_approval" /* AwaitingApproval */ || prevCallIds.has(tc.request.callId)
|
|
26527
26509
|
);
|
|
26528
26510
|
if (!isRoot && filteredToolCalls.length === 0 && prevCalls.length === 0) {
|
|
26529
26511
|
return prev;
|
|
@@ -26535,9 +26517,9 @@ function useToolScheduler(onComplete, config, getPreferredEditor) {
|
|
|
26535
26517
|
};
|
|
26536
26518
|
});
|
|
26537
26519
|
};
|
|
26538
|
-
messageBus.subscribe(
|
|
26520
|
+
messageBus.subscribe("tool-calls-update" /* TOOL_CALLS_UPDATE */, handler);
|
|
26539
26521
|
return () => {
|
|
26540
|
-
messageBus.unsubscribe(
|
|
26522
|
+
messageBus.unsubscribe("tool-calls-update" /* TOOL_CALLS_UPDATE */, handler);
|
|
26541
26523
|
};
|
|
26542
26524
|
}, [messageBus, internalAdaptToolCalls]);
|
|
26543
26525
|
(0, import_react101.useEffect)(() => {
|
|
@@ -26559,9 +26541,9 @@ function useToolScheduler(onComplete, config, getPreferredEditor) {
|
|
|
26559
26541
|
};
|
|
26560
26542
|
});
|
|
26561
26543
|
};
|
|
26562
|
-
messageBus.subscribe(
|
|
26544
|
+
messageBus.subscribe("subagent-activity" /* SUBAGENT_ACTIVITY */, handler);
|
|
26563
26545
|
return () => {
|
|
26564
|
-
messageBus.unsubscribe(
|
|
26546
|
+
messageBus.unsubscribe("subagent-activity" /* SUBAGENT_ACTIVITY */, handler);
|
|
26565
26547
|
};
|
|
26566
26548
|
}, [messageBus]);
|
|
26567
26549
|
const schedule = (0, import_react101.useCallback)(
|
|
@@ -26660,8 +26642,8 @@ function adaptToolCalls(coreCalls, prevTracked) {
|
|
|
26660
26642
|
const prev = prevMap.get(coreCall.request.callId);
|
|
26661
26643
|
const responseSubmittedToGemini = prev?.responseSubmittedToGemini ?? false;
|
|
26662
26644
|
let status = coreCall.status;
|
|
26663
|
-
if ((status ===
|
|
26664
|
-
status =
|
|
26645
|
+
if ((status === "success" /* Success */ || status === "error" /* Error */) && "tailToolCallRequest" in coreCall && coreCall.tailToolCallRequest != null) {
|
|
26646
|
+
status = "executing" /* Executing */;
|
|
26665
26647
|
}
|
|
26666
26648
|
return {
|
|
26667
26649
|
...coreCall,
|
|
@@ -26693,7 +26675,7 @@ function getBackgroundedToolInfo(toolCall) {
|
|
|
26693
26675
|
};
|
|
26694
26676
|
}
|
|
26695
26677
|
function isBackgroundableExecutingToolCall(toolCall) {
|
|
26696
|
-
return toolCall.status ===
|
|
26678
|
+
return toolCall.status === "executing" /* Executing */ && typeof toolCall.pid === "number";
|
|
26697
26679
|
}
|
|
26698
26680
|
function showCitations(settings) {
|
|
26699
26681
|
const enabled = settings.merged.ui.showCitations;
|
|
@@ -26703,14 +26685,14 @@ function showCitations(settings) {
|
|
|
26703
26685
|
return true;
|
|
26704
26686
|
}
|
|
26705
26687
|
function calculateStreamingState(isResponding, toolCalls) {
|
|
26706
|
-
if (toolCalls.some((tc) => tc.status ===
|
|
26688
|
+
if (toolCalls.some((tc) => tc.status === "awaiting_approval" /* AwaitingApproval */)) {
|
|
26707
26689
|
return "waiting_for_confirmation" /* WaitingForConfirmation */;
|
|
26708
26690
|
}
|
|
26709
26691
|
const isAnyToolActive = toolCalls.some((tc) => {
|
|
26710
|
-
if (tc.status ===
|
|
26692
|
+
if (tc.status === "executing" /* Executing */ || tc.status === "scheduled" /* Scheduled */ || tc.status === "validating" /* Validating */) {
|
|
26711
26693
|
return true;
|
|
26712
26694
|
}
|
|
26713
|
-
if (tc.status ===
|
|
26695
|
+
if (tc.status === "success" /* Success */ || tc.status === "error" /* Error */ || tc.status === "cancelled" /* Cancelled */) {
|
|
26714
26696
|
return !tc.responseSubmittedToGemini;
|
|
26715
26697
|
}
|
|
26716
26698
|
return false;
|
|
@@ -26757,9 +26739,9 @@ var useGeminiStream = (geminiClient, history, addItem, config, settings, onDebug
|
|
|
26757
26739
|
}
|
|
26758
26740
|
setRetryStatus(payload);
|
|
26759
26741
|
};
|
|
26760
|
-
coreEvents.on(
|
|
26742
|
+
coreEvents.on("retry-attempt" /* RetryAttempt */, handleRetryAttempt);
|
|
26761
26743
|
return () => {
|
|
26762
|
-
coreEvents.off(
|
|
26744
|
+
coreEvents.off("retry-attempt" /* RetryAttempt */, handleRetryAttempt);
|
|
26763
26745
|
};
|
|
26764
26746
|
}, [isRespondingRef]);
|
|
26765
26747
|
const [
|
|
@@ -26892,12 +26874,12 @@ var useGeminiStream = (geminiClient, history, addItem, config, settings, onDebug
|
|
|
26892
26874
|
const tc = toolCalls[i];
|
|
26893
26875
|
if (pushedToolCallIdsRef.current.has(tc.request.callId)) continue;
|
|
26894
26876
|
if (tc.status === "success" || tc.status === "error" || tc.status === "cancelled") {
|
|
26895
|
-
const isAgent = tc.tool?.kind ===
|
|
26877
|
+
const isAgent = tc.tool?.kind === "agent" /* Agent */;
|
|
26896
26878
|
if (isAgent) {
|
|
26897
26879
|
let contigAgentsComplete = true;
|
|
26898
26880
|
for (let j = i + 1; j < toolCalls.length; j++) {
|
|
26899
26881
|
const nextTc = toolCalls[j];
|
|
26900
|
-
if (nextTc.tool?.kind ===
|
|
26882
|
+
if (nextTc.tool?.kind === "agent" /* Agent */) {
|
|
26901
26883
|
if (nextTc.status !== "success" && nextTc.status !== "error" && nextTc.status !== "cancelled") {
|
|
26902
26884
|
contigAgentsComplete = false;
|
|
26903
26885
|
break;
|
|
@@ -26923,7 +26905,7 @@ var useGeminiStream = (geminiClient, history, addItem, config, settings, onDebug
|
|
|
26923
26905
|
let currentGroup = [];
|
|
26924
26906
|
for (const tc of toolsToPush) {
|
|
26925
26907
|
newPushed.add(tc.request.callId);
|
|
26926
|
-
if (tc.tool?.kind ===
|
|
26908
|
+
if (tc.tool?.kind === "agent" /* Agent */) {
|
|
26927
26909
|
currentGroup.push(tc);
|
|
26928
26910
|
} else {
|
|
26929
26911
|
if (currentGroup.length > 0) {
|
|
@@ -27073,7 +27055,7 @@ var useGeminiStream = (geminiClient, history, addItem, config, settings, onDebug
|
|
|
27073
27055
|
prevActiveShellPtyIdRef.current = activeShellPtyId;
|
|
27074
27056
|
}, [activeShellPtyId, addItem, setIsResponding]);
|
|
27075
27057
|
(0, import_react102.useEffect)(() => {
|
|
27076
|
-
if (config.getApprovalMode() ===
|
|
27058
|
+
if (config.getApprovalMode() === "yolo" /* YOLO */ && streamingState === "idle" /* Idle */) {
|
|
27077
27059
|
const lastUserMessageIndex = history.findLastIndex(
|
|
27078
27060
|
(item) => item.type === "user" /* USER */
|
|
27079
27061
|
);
|
|
@@ -27159,7 +27141,7 @@ var useGeminiStream = (geminiClient, history, addItem, config, settings, onDebug
|
|
|
27159
27141
|
if (tool.name === SHELL_COMMAND_NAME) {
|
|
27160
27142
|
return {
|
|
27161
27143
|
...tool,
|
|
27162
|
-
status:
|
|
27144
|
+
status: "cancelled" /* Cancelled */,
|
|
27163
27145
|
resultDisplay: tool.resultDisplay
|
|
27164
27146
|
};
|
|
27165
27147
|
}
|
|
@@ -27215,7 +27197,7 @@ var useGeminiStream = (geminiClient, history, addItem, config, settings, onDebug
|
|
|
27215
27197
|
let localQueryToSendToGemini = null;
|
|
27216
27198
|
if (typeof query === "string") {
|
|
27217
27199
|
const trimmedQuery = query.trim();
|
|
27218
|
-
await logger?.logMessage(
|
|
27200
|
+
await logger?.logMessage("user" /* USER */, trimmedQuery);
|
|
27219
27201
|
if (!shellModeActive) {
|
|
27220
27202
|
const slashCommandResult = isSlashCommand(trimmedQuery) ? await handleSlashCommand(trimmedQuery) : false;
|
|
27221
27203
|
if (slashCommandResult) {
|
|
@@ -27371,7 +27353,7 @@ var useGeminiStream = (geminiClient, history, addItem, config, settings, onDebug
|
|
|
27371
27353
|
if (pendingHistoryItemRef.current) {
|
|
27372
27354
|
if (pendingHistoryItemRef.current.type === "tool_group") {
|
|
27373
27355
|
const updatedTools = pendingHistoryItemRef.current.tools.map(
|
|
27374
|
-
(tool) => tool.status ===
|
|
27356
|
+
(tool) => tool.status === "validating" /* Validating */ || tool.status === "scheduled" /* Scheduled */ || tool.status === "awaiting_approval" /* AwaitingApproval */ || tool.status === "executing" /* Executing */ ? { ...tool, status: "cancelled" /* Cancelled */ } : tool
|
|
27375
27357
|
);
|
|
27376
27358
|
const pendingItem = {
|
|
27377
27359
|
...pendingHistoryItemRef.current,
|
|
@@ -27617,15 +27599,15 @@ var useGeminiStream = (geminiClient, history, addItem, config, settings, onDebug
|
|
|
27617
27599
|
let geminiMessageBuffer = "";
|
|
27618
27600
|
const toolCallRequests = [];
|
|
27619
27601
|
for await (const event of stream) {
|
|
27620
|
-
if (event.type !==
|
|
27602
|
+
if (event.type !== "thought" /* Thought */ && thoughtRef.current !== null) {
|
|
27621
27603
|
setThought(null);
|
|
27622
27604
|
}
|
|
27623
27605
|
switch (event.type) {
|
|
27624
|
-
case
|
|
27606
|
+
case "thought" /* Thought */:
|
|
27625
27607
|
setLastGeminiActivityTime(Date.now());
|
|
27626
27608
|
handleThoughtEvent(event.value, userMessageTimestamp);
|
|
27627
27609
|
break;
|
|
27628
|
-
case
|
|
27610
|
+
case "content" /* Content */:
|
|
27629
27611
|
setLastGeminiActivityTime(Date.now());
|
|
27630
27612
|
geminiMessageBuffer = handleContentEvent(
|
|
27631
27613
|
event.value,
|
|
@@ -27633,16 +27615,16 @@ var useGeminiStream = (geminiClient, history, addItem, config, settings, onDebug
|
|
|
27633
27615
|
userMessageTimestamp
|
|
27634
27616
|
);
|
|
27635
27617
|
break;
|
|
27636
|
-
case
|
|
27618
|
+
case "tool_call_request" /* ToolCallRequest */:
|
|
27637
27619
|
toolCallRequests.push(event.value);
|
|
27638
27620
|
break;
|
|
27639
|
-
case
|
|
27621
|
+
case "user_cancelled" /* UserCancelled */:
|
|
27640
27622
|
handleUserCancelledEvent(userMessageTimestamp);
|
|
27641
27623
|
break;
|
|
27642
|
-
case
|
|
27624
|
+
case "error" /* Error */:
|
|
27643
27625
|
handleErrorEvent(event.value, userMessageTimestamp);
|
|
27644
27626
|
break;
|
|
27645
|
-
case
|
|
27627
|
+
case "agent_execution_stopped" /* AgentExecutionStopped */:
|
|
27646
27628
|
handleAgentExecutionStoppedEvent(
|
|
27647
27629
|
event.value.reason,
|
|
27648
27630
|
userMessageTimestamp,
|
|
@@ -27650,7 +27632,7 @@ var useGeminiStream = (geminiClient, history, addItem, config, settings, onDebug
|
|
|
27650
27632
|
event.value.contextCleared
|
|
27651
27633
|
);
|
|
27652
27634
|
break;
|
|
27653
|
-
case
|
|
27635
|
+
case "agent_execution_blocked" /* AgentExecutionBlocked */:
|
|
27654
27636
|
handleAgentExecutionBlockedEvent(
|
|
27655
27637
|
event.value.reason,
|
|
27656
27638
|
userMessageTimestamp,
|
|
@@ -27658,35 +27640,35 @@ var useGeminiStream = (geminiClient, history, addItem, config, settings, onDebug
|
|
|
27658
27640
|
event.value.contextCleared
|
|
27659
27641
|
);
|
|
27660
27642
|
break;
|
|
27661
|
-
case
|
|
27643
|
+
case "chat_compressed" /* ChatCompressed */:
|
|
27662
27644
|
handleChatCompressionEvent(event.value, userMessageTimestamp);
|
|
27663
27645
|
break;
|
|
27664
|
-
case
|
|
27665
|
-
case
|
|
27646
|
+
case "tool_call_confirmation" /* ToolCallConfirmation */:
|
|
27647
|
+
case "tool_call_response" /* ToolCallResponse */:
|
|
27666
27648
|
break;
|
|
27667
|
-
case
|
|
27649
|
+
case "max_session_turns" /* MaxSessionTurns */:
|
|
27668
27650
|
handleMaxSessionTurnsEvent();
|
|
27669
27651
|
break;
|
|
27670
|
-
case
|
|
27652
|
+
case "context_window_will_overflow" /* ContextWindowWillOverflow */:
|
|
27671
27653
|
handleContextWindowWillOverflowEvent(
|
|
27672
27654
|
event.value.estimatedRequestTokenCount,
|
|
27673
27655
|
event.value.remainingTokenCount
|
|
27674
27656
|
);
|
|
27675
27657
|
break;
|
|
27676
|
-
case
|
|
27658
|
+
case "finished" /* Finished */:
|
|
27677
27659
|
handleFinishedEvent(event, userMessageTimestamp);
|
|
27678
27660
|
break;
|
|
27679
|
-
case
|
|
27661
|
+
case "citation" /* Citation */:
|
|
27680
27662
|
handleCitationEvent(event.value, userMessageTimestamp);
|
|
27681
27663
|
break;
|
|
27682
|
-
case
|
|
27664
|
+
case "model_info" /* ModelInfo */:
|
|
27683
27665
|
handleChatModelEvent(event.value, userMessageTimestamp);
|
|
27684
27666
|
break;
|
|
27685
|
-
case
|
|
27667
|
+
case "loop_detected" /* LoopDetected */:
|
|
27686
27668
|
loopDetectedRef.current = true;
|
|
27687
27669
|
break;
|
|
27688
|
-
case
|
|
27689
|
-
case
|
|
27670
|
+
case "retry" /* Retry */:
|
|
27671
|
+
case "invalid_stream" /* InvalidStream */:
|
|
27690
27672
|
break;
|
|
27691
27673
|
default: {
|
|
27692
27674
|
const unreachable = event;
|
|
@@ -27727,7 +27709,7 @@ var useGeminiStream = (geminiClient, history, addItem, config, settings, onDebug
|
|
|
27727
27709
|
const submitQuery = (0, import_react102.useCallback)(
|
|
27728
27710
|
async (query, options, prompt_id) => runInDevTraceSpan(
|
|
27729
27711
|
{
|
|
27730
|
-
operation: options?.isContinuation ?
|
|
27712
|
+
operation: options?.isContinuation ? "system_prompt" /* SystemPrompt */ : "user_prompt" /* UserPrompt */,
|
|
27731
27713
|
sessionId: config.getSessionId()
|
|
27732
27714
|
},
|
|
27733
27715
|
async ({ metadata: spanMetadata }) => {
|
|
@@ -27888,7 +27870,7 @@ var useGeminiStream = (geminiClient, history, addItem, config, settings, onDebug
|
|
|
27888
27870
|
);
|
|
27889
27871
|
const handleApprovalModeChange = (0, import_react102.useCallback)(
|
|
27890
27872
|
async (newApprovalMode) => {
|
|
27891
|
-
if (previousApprovalModeRef.current ===
|
|
27873
|
+
if (previousApprovalModeRef.current === "plan" /* PLAN */ && newApprovalMode !== "plan" /* PLAN */ && streamingState === "idle" /* Idle */) {
|
|
27892
27874
|
if (geminiClient) {
|
|
27893
27875
|
try {
|
|
27894
27876
|
await geminiClient.addHistory({
|
|
@@ -27911,11 +27893,11 @@ var useGeminiStream = (geminiClient, history, addItem, config, settings, onDebug
|
|
|
27911
27893
|
}
|
|
27912
27894
|
}
|
|
27913
27895
|
previousApprovalModeRef.current = newApprovalMode;
|
|
27914
|
-
if (newApprovalMode ===
|
|
27896
|
+
if (newApprovalMode === "yolo" /* YOLO */ || newApprovalMode === "autoEdit" /* AUTO_EDIT */) {
|
|
27915
27897
|
let awaitingApprovalCalls = toolCalls.filter(
|
|
27916
27898
|
(call) => call.status === "awaiting_approval" && !call.request.forcedAsk
|
|
27917
27899
|
);
|
|
27918
|
-
if (newApprovalMode ===
|
|
27900
|
+
if (newApprovalMode === "autoEdit" /* AUTO_EDIT */) {
|
|
27919
27901
|
awaitingApprovalCalls = awaitingApprovalCalls.filter(
|
|
27920
27902
|
(call) => EDIT_TOOL_NAMES.has(call.request.name)
|
|
27921
27903
|
);
|
|
@@ -27924,11 +27906,11 @@ var useGeminiStream = (geminiClient, history, addItem, config, settings, onDebug
|
|
|
27924
27906
|
if (call.correlationId) {
|
|
27925
27907
|
try {
|
|
27926
27908
|
await config.getMessageBus().publish({
|
|
27927
|
-
type:
|
|
27909
|
+
type: "tool-confirmation-response" /* TOOL_CONFIRMATION_RESPONSE */,
|
|
27928
27910
|
correlationId: call.correlationId,
|
|
27929
27911
|
confirmed: true,
|
|
27930
27912
|
requiresUserConfirmation: false,
|
|
27931
|
-
outcome:
|
|
27913
|
+
outcome: "proceed_once" /* ProceedOnce */
|
|
27932
27914
|
});
|
|
27933
27915
|
} catch (error) {
|
|
27934
27916
|
debugLogger.warn(
|
|
@@ -28006,14 +27988,14 @@ var useGeminiStream = (geminiClient, history, addItem, config, settings, onDebug
|
|
|
28006
27988
|
);
|
|
28007
27989
|
if (isLowErrorVerbosity) {
|
|
28008
27990
|
suppressedToolErrorCountRef.current += geminiTools.filter(
|
|
28009
|
-
(tc) => tc.status ===
|
|
27991
|
+
(tc) => tc.status === "error" /* Error */
|
|
28010
27992
|
).length;
|
|
28011
27993
|
}
|
|
28012
27994
|
if (geminiTools.length === 0) {
|
|
28013
27995
|
return;
|
|
28014
27996
|
}
|
|
28015
27997
|
const stopExecutionTool = geminiTools.find(
|
|
28016
|
-
(tc) => tc.response.errorType ===
|
|
27998
|
+
(tc) => tc.response.errorType === "stop_execution" /* STOP_EXECUTION */
|
|
28017
27999
|
);
|
|
28018
28000
|
if (stopExecutionTool && stopExecutionTool.response.error) {
|
|
28019
28001
|
maybeAddSuppressedToolErrorNote();
|
|
@@ -28033,9 +28015,9 @@ var useGeminiStream = (geminiClient, history, addItem, config, settings, onDebug
|
|
|
28033
28015
|
(tc) => !isTopicTool2(tc.request.name)
|
|
28034
28016
|
);
|
|
28035
28017
|
const allDeclinableToolsCancelled = declinableTools.length > 0 && declinableTools.every(
|
|
28036
|
-
(tc) => tc.status ===
|
|
28018
|
+
(tc) => tc.status === "cancelled" /* Cancelled */
|
|
28037
28019
|
);
|
|
28038
|
-
const allToolsCancelled = geminiTools.length > 0 && geminiTools.every((tc) => tc.status ===
|
|
28020
|
+
const allToolsCancelled = geminiTools.length > 0 && geminiTools.every((tc) => tc.status === "cancelled" /* Cancelled */);
|
|
28039
28021
|
if (allDeclinableToolsCancelled || allToolsCancelled) {
|
|
28040
28022
|
if (!turnCancelledRef.current) {
|
|
28041
28023
|
addItem({
|
|
@@ -28116,7 +28098,7 @@ var useGeminiStream = (geminiClient, history, addItem, config, settings, onDebug
|
|
|
28116
28098
|
return;
|
|
28117
28099
|
}
|
|
28118
28100
|
const restorableToolCalls = toolCalls.filter(
|
|
28119
|
-
(toolCall) => EDIT_TOOL_NAMES.has(toolCall.request.name) && toolCall.status ===
|
|
28101
|
+
(toolCall) => EDIT_TOOL_NAMES.has(toolCall.request.name) && toolCall.status === "awaiting_approval" /* AwaitingApproval */
|
|
28120
28102
|
);
|
|
28121
28103
|
if (restorableToolCalls.length > 0) {
|
|
28122
28104
|
if (!gitService) {
|
|
@@ -28335,14 +28317,14 @@ var useAgentStream = ({
|
|
|
28335
28317
|
const displayName = legacyState?.displayName ?? event.name;
|
|
28336
28318
|
const isOutputMarkdown = legacyState?.isOutputMarkdown ?? false;
|
|
28337
28319
|
const desc = legacyState?.description ?? "";
|
|
28338
|
-
const fallbackKind =
|
|
28320
|
+
const fallbackKind = "other" /* Other */;
|
|
28339
28321
|
const newCall = {
|
|
28340
28322
|
callId: event.requestId,
|
|
28341
28323
|
name: displayName,
|
|
28342
28324
|
originalRequestName: event.name,
|
|
28343
28325
|
description: desc,
|
|
28344
28326
|
display: event.display,
|
|
28345
|
-
status:
|
|
28327
|
+
status: "scheduled" /* Scheduled */,
|
|
28346
28328
|
isClientInitiated: false,
|
|
28347
28329
|
renderOutputAsMarkdown: isOutputMarkdown,
|
|
28348
28330
|
kind: legacyState?.kind ?? fallbackKind,
|
|
@@ -28360,10 +28342,10 @@ var useAgentStream = ({
|
|
|
28360
28342
|
const evtStatus = legacyState?.status;
|
|
28361
28343
|
let status = tc.status;
|
|
28362
28344
|
if (evtStatus === "executing")
|
|
28363
|
-
status =
|
|
28364
|
-
else if (evtStatus === "error") status =
|
|
28345
|
+
status = "executing" /* Executing */;
|
|
28346
|
+
else if (evtStatus === "error") status = "error" /* Error */;
|
|
28365
28347
|
else if (evtStatus === "success")
|
|
28366
|
-
status =
|
|
28348
|
+
status = "success" /* Success */;
|
|
28367
28349
|
const display = event.display?.result;
|
|
28368
28350
|
const liveOutput = displayContentToString(display) ?? tc.resultDisplay;
|
|
28369
28351
|
const progressMessage = legacyState?.progressMessage ?? tc.progressMessage;
|
|
@@ -28396,7 +28378,7 @@ var useAgentStream = ({
|
|
|
28396
28378
|
const resultDisplay = displayContentToString(display) ?? tc.resultDisplay;
|
|
28397
28379
|
return {
|
|
28398
28380
|
...tc,
|
|
28399
|
-
status: event.isError ?
|
|
28381
|
+
status: event.isError ? "error" /* Error */ : "success" /* Success */,
|
|
28400
28382
|
display: event.display ? { ...tc.display, ...event.display } : tc.display,
|
|
28401
28383
|
resultDisplay,
|
|
28402
28384
|
outputFile
|
|
@@ -28448,7 +28430,7 @@ var useAgentStream = ({
|
|
|
28448
28430
|
if (!options?.isContinuation) {
|
|
28449
28431
|
if (typeof query === "string") {
|
|
28450
28432
|
addItem({ type: "user" /* USER */, text: query }, timestamp);
|
|
28451
|
-
void logger?.logMessage(
|
|
28433
|
+
void logger?.logMessage("user" /* USER */, query);
|
|
28452
28434
|
}
|
|
28453
28435
|
startNewPrompt();
|
|
28454
28436
|
}
|
|
@@ -29949,9 +29931,9 @@ var useFolderTrust = (settings, onTrustChange, addItem) => {
|
|
|
29949
29931
|
const handleFolderTrustSelect = (0, import_react108.useCallback)(
|
|
29950
29932
|
async (choice) => {
|
|
29951
29933
|
const trustLevelMap = {
|
|
29952
|
-
["trust_folder" /* TRUST_FOLDER */]:
|
|
29953
|
-
["trust_parent" /* TRUST_PARENT */]:
|
|
29954
|
-
["do_not_trust" /* DO_NOT_TRUST */]:
|
|
29934
|
+
["trust_folder" /* TRUST_FOLDER */]: "TRUST_FOLDER" /* TRUST_FOLDER */,
|
|
29935
|
+
["trust_parent" /* TRUST_PARENT */]: "TRUST_PARENT" /* TRUST_PARENT */,
|
|
29936
|
+
["do_not_trust" /* DO_NOT_TRUST */]: "DO_NOT_TRUST" /* DO_NOT_TRUST */
|
|
29955
29937
|
};
|
|
29956
29938
|
const trustLevel = trustLevelMap[choice];
|
|
29957
29939
|
if (!trustLevel) return;
|
|
@@ -29970,7 +29952,7 @@ var useFolderTrust = (settings, onTrustChange, addItem) => {
|
|
|
29970
29952
|
}, 100);
|
|
29971
29953
|
return;
|
|
29972
29954
|
}
|
|
29973
|
-
const currentIsTrusted = trustLevel ===
|
|
29955
|
+
const currentIsTrusted = trustLevel === "TRUST_FOLDER" /* TRUST_FOLDER */ || trustLevel === "TRUST_PARENT" /* TRUST_PARENT */;
|
|
29974
29956
|
onTrustChange(currentIsTrusted);
|
|
29975
29957
|
setIsTrusted(currentIsTrusted);
|
|
29976
29958
|
const wasTrusted = isTrusted ?? false;
|
|
@@ -30968,7 +30950,7 @@ function useMessageQueue({
|
|
|
30968
30950
|
var import_react110 = __toESM(require_react(), 1);
|
|
30969
30951
|
function useMcpStatus(config) {
|
|
30970
30952
|
const [discoveryState, setDiscoveryState] = (0, import_react110.useState)(
|
|
30971
|
-
() => config.getMcpClientManager()?.getDiscoveryState() ??
|
|
30953
|
+
() => config.getMcpClientManager()?.getDiscoveryState() ?? "not_started" /* NOT_STARTED */
|
|
30972
30954
|
);
|
|
30973
30955
|
const [mcpServerCount, setMcpServerCount] = (0, import_react110.useState)(
|
|
30974
30956
|
() => config.getMcpClientManager()?.getMcpServerCount() ?? 0
|
|
@@ -30981,12 +30963,12 @@ function useMcpStatus(config) {
|
|
|
30981
30963
|
setMcpServerCount(manager.getMcpServerCount());
|
|
30982
30964
|
}
|
|
30983
30965
|
};
|
|
30984
|
-
coreEvents.on(
|
|
30966
|
+
coreEvents.on("mcp-client-update" /* McpClientUpdate */, onChange);
|
|
30985
30967
|
return () => {
|
|
30986
|
-
coreEvents.off(
|
|
30968
|
+
coreEvents.off("mcp-client-update" /* McpClientUpdate */, onChange);
|
|
30987
30969
|
};
|
|
30988
30970
|
}, [config]);
|
|
30989
|
-
const isMcpReady = discoveryState ===
|
|
30971
|
+
const isMcpReady = discoveryState === "completed" /* COMPLETED */ || discoveryState === "not_started" /* NOT_STARTED */ && mcpServerCount === 0;
|
|
30990
30972
|
return {
|
|
30991
30973
|
discoveryState,
|
|
30992
30974
|
mcpServerCount,
|
|
@@ -31013,7 +30995,7 @@ function useApprovalModeIndicator({
|
|
|
31013
30995
|
(key) => {
|
|
31014
30996
|
let nextApprovalMode;
|
|
31015
30997
|
if (keyMatchers["app.toggleYolo" /* TOGGLE_YOLO */](key)) {
|
|
31016
|
-
if (config.isYoloModeDisabled() && config.getApprovalMode() !==
|
|
30998
|
+
if (config.isYoloModeDisabled() && config.getApprovalMode() !== "yolo" /* YOLO */) {
|
|
31017
30999
|
if (addItem) {
|
|
31018
31000
|
let text = "You cannot enter YOLO mode since it is disabled in your settings.";
|
|
31019
31001
|
const adminSettings = config.getRemoteAdminSettings();
|
|
@@ -31031,21 +31013,21 @@ function useApprovalModeIndicator({
|
|
|
31031
31013
|
}
|
|
31032
31014
|
return;
|
|
31033
31015
|
}
|
|
31034
|
-
nextApprovalMode = config.getApprovalMode() ===
|
|
31016
|
+
nextApprovalMode = config.getApprovalMode() === "yolo" /* YOLO */ ? "default" /* DEFAULT */ : "yolo" /* YOLO */;
|
|
31035
31017
|
} else if (keyMatchers["app.cycleApprovalMode" /* CYCLE_APPROVAL_MODE */](key)) {
|
|
31036
31018
|
const currentMode = config.getApprovalMode();
|
|
31037
31019
|
switch (currentMode) {
|
|
31038
|
-
case
|
|
31039
|
-
nextApprovalMode =
|
|
31020
|
+
case "default" /* DEFAULT */:
|
|
31021
|
+
nextApprovalMode = "autoEdit" /* AUTO_EDIT */;
|
|
31040
31022
|
break;
|
|
31041
|
-
case
|
|
31042
|
-
nextApprovalMode = allowPlanMode ?
|
|
31023
|
+
case "autoEdit" /* AUTO_EDIT */:
|
|
31024
|
+
nextApprovalMode = allowPlanMode ? "plan" /* PLAN */ : "default" /* DEFAULT */;
|
|
31043
31025
|
break;
|
|
31044
|
-
case
|
|
31045
|
-
nextApprovalMode =
|
|
31026
|
+
case "plan" /* PLAN */:
|
|
31027
|
+
nextApprovalMode = "default" /* DEFAULT */;
|
|
31046
31028
|
break;
|
|
31047
|
-
case
|
|
31048
|
-
nextApprovalMode =
|
|
31029
|
+
case "yolo" /* YOLO */:
|
|
31030
|
+
nextApprovalMode = "autoEdit" /* AUTO_EDIT */;
|
|
31049
31031
|
break;
|
|
31050
31032
|
default:
|
|
31051
31033
|
}
|
|
@@ -31438,11 +31420,11 @@ var useHookDisplayState = () => {
|
|
|
31438
31420
|
removeHook();
|
|
31439
31421
|
}
|
|
31440
31422
|
};
|
|
31441
|
-
coreEvents.on(
|
|
31442
|
-
coreEvents.on(
|
|
31423
|
+
coreEvents.on("hook-start" /* HookStart */, handleHookStart);
|
|
31424
|
+
coreEvents.on("hook-end" /* HookEnd */, handleHookEnd);
|
|
31443
31425
|
return () => {
|
|
31444
|
-
coreEvents.off(
|
|
31445
|
-
coreEvents.off(
|
|
31426
|
+
coreEvents.off("hook-start" /* HookStart */, handleHookStart);
|
|
31427
|
+
coreEvents.off("hook-end" /* HookEnd */, handleHookEnd);
|
|
31446
31428
|
activeTimeouts.forEach(clearTimeout);
|
|
31447
31429
|
activeTimeouts.clear();
|
|
31448
31430
|
};
|
|
@@ -32331,7 +32313,7 @@ var AppContainer = (props) => {
|
|
|
32331
32313
|
setConfigInitialized(true);
|
|
32332
32314
|
startupProfiler.flush(config);
|
|
32333
32315
|
startAutoMemoryIfEnabled(config);
|
|
32334
|
-
const sessionStartSource = resumedSessionData ?
|
|
32316
|
+
const sessionStartSource = resumedSessionData ? "resume" /* Resume */ : "startup" /* Startup */;
|
|
32335
32317
|
const result = await config.getHookSystem()?.fireSessionStartEvent(sessionStartSource);
|
|
32336
32318
|
if (result) {
|
|
32337
32319
|
if (result.systemMessage) {
|
|
@@ -32367,7 +32349,7 @@ var AppContainer = (props) => {
|
|
|
32367
32349
|
);
|
|
32368
32350
|
const ideClient = await IdeClient.getInstance();
|
|
32369
32351
|
await ideClient.disconnect();
|
|
32370
|
-
await config?.getHookSystem()?.fireSessionEndEvent(
|
|
32352
|
+
await config?.getHookSystem()?.fireSessionEndEvent("exit" /* Exit */);
|
|
32371
32353
|
};
|
|
32372
32354
|
registerCleanup(cleanupFn);
|
|
32373
32355
|
return () => {
|
|
@@ -32392,11 +32374,11 @@ var AppContainer = (props) => {
|
|
|
32392
32374
|
resetTime: payload.resetTime
|
|
32393
32375
|
});
|
|
32394
32376
|
};
|
|
32395
|
-
coreEvents.on(
|
|
32396
|
-
coreEvents.on(
|
|
32377
|
+
coreEvents.on("model-changed" /* ModelChanged */, handleModelChanged);
|
|
32378
|
+
coreEvents.on("quota-changed" /* QuotaChanged */, handleQuotaChanged);
|
|
32397
32379
|
return () => {
|
|
32398
|
-
coreEvents.off(
|
|
32399
|
-
coreEvents.off(
|
|
32380
|
+
coreEvents.off("model-changed" /* ModelChanged */, handleModelChanged);
|
|
32381
|
+
coreEvents.off("quota-changed" /* QuotaChanged */, handleQuotaChanged);
|
|
32400
32382
|
};
|
|
32401
32383
|
}, [config]);
|
|
32402
32384
|
(0, import_react124.useEffect)(() => {
|
|
@@ -32409,16 +32391,16 @@ var AppContainer = (props) => {
|
|
|
32409
32391
|
const handleAgentsDiscovered = (payload) => {
|
|
32410
32392
|
setNewAgents(payload.agents);
|
|
32411
32393
|
};
|
|
32412
|
-
coreEvents.on(
|
|
32413
|
-
coreEvents.on(
|
|
32414
|
-
coreEvents.on(
|
|
32394
|
+
coreEvents.on("settings-changed" /* SettingsChanged */, handleSettingsChanged);
|
|
32395
|
+
coreEvents.on("admin-settings-changed" /* AdminSettingsChanged */, handleAdminSettingsChanged);
|
|
32396
|
+
coreEvents.on("agents-discovered" /* AgentsDiscovered */, handleAgentsDiscovered);
|
|
32415
32397
|
return () => {
|
|
32416
|
-
coreEvents.off(
|
|
32398
|
+
coreEvents.off("settings-changed" /* SettingsChanged */, handleSettingsChanged);
|
|
32417
32399
|
coreEvents.off(
|
|
32418
|
-
|
|
32400
|
+
"admin-settings-changed" /* AdminSettingsChanged */,
|
|
32419
32401
|
handleAdminSettingsChanged
|
|
32420
32402
|
);
|
|
32421
|
-
coreEvents.off(
|
|
32403
|
+
coreEvents.off("agents-discovered" /* AgentsDiscovered */, handleAgentsDiscovered);
|
|
32422
32404
|
};
|
|
32423
32405
|
}, [settings]);
|
|
32424
32406
|
const { errorCount, clearErrorCount } = useErrorCount();
|
|
@@ -32484,11 +32466,11 @@ var AppContainer = (props) => {
|
|
|
32484
32466
|
exitEditorDialog
|
|
32485
32467
|
} = useEditorSettings(settings, setEditorError, historyManager.addItem);
|
|
32486
32468
|
(0, import_react124.useEffect)(() => {
|
|
32487
|
-
coreEvents.on(
|
|
32488
|
-
coreEvents.on(
|
|
32469
|
+
coreEvents.on("external-editor-closed" /* ExternalEditorClosed */, handleEditorClose);
|
|
32470
|
+
coreEvents.on("request-editor-selection" /* RequestEditorSelection */, openEditorDialog);
|
|
32489
32471
|
return () => {
|
|
32490
|
-
coreEvents.off(
|
|
32491
|
-
coreEvents.off(
|
|
32472
|
+
coreEvents.off("external-editor-closed" /* ExternalEditorClosed */, handleEditorClose);
|
|
32473
|
+
coreEvents.off("request-editor-selection" /* RequestEditorSelection */, openEditorDialog);
|
|
32492
32474
|
};
|
|
32493
32475
|
}, [handleEditorClose, openEditorDialog]);
|
|
32494
32476
|
(0, import_react124.useEffect)(() => {
|
|
@@ -32556,7 +32538,7 @@ var AppContainer = (props) => {
|
|
|
32556
32538
|
errorVerbosity: settings.merged.ui.errorVerbosity
|
|
32557
32539
|
});
|
|
32558
32540
|
const isAuthDialogOpen = authState === "updating" /* Updating */;
|
|
32559
|
-
const isAuthenticating = authState === "unauthenticated" /* Unauthenticated */ && settings.merged.security.auth.selectedType !==
|
|
32541
|
+
const isAuthenticating = authState === "unauthenticated" /* Unauthenticated */ && settings.merged.security.auth.selectedType !== "gemini-api-key" /* USE_GEMINI */;
|
|
32560
32542
|
const isGeminiClientInitialized = config.getGeminiClient()?.isInitialized();
|
|
32561
32543
|
const { loadHistoryForResume, isResuming } = useSessionResume({
|
|
32562
32544
|
config,
|
|
@@ -32584,7 +32566,7 @@ var AppContainer = (props) => {
|
|
|
32584
32566
|
async (authType, scope) => {
|
|
32585
32567
|
if (authType) {
|
|
32586
32568
|
const previousAuthType = config.getContentGeneratorConfig()?.authType ?? "unknown";
|
|
32587
|
-
if (authType ===
|
|
32569
|
+
if (authType === "oauth-personal" /* LOGIN_WITH_GOOGLE */) {
|
|
32588
32570
|
setAuthContext({ requiresRestart: true });
|
|
32589
32571
|
} else {
|
|
32590
32572
|
setAuthContext({});
|
|
@@ -32612,7 +32594,7 @@ var AppContainer = (props) => {
|
|
|
32612
32594
|
);
|
|
32613
32595
|
return;
|
|
32614
32596
|
}
|
|
32615
|
-
if (authType ===
|
|
32597
|
+
if (authType === "oauth-personal" /* LOGIN_WITH_GOOGLE */ && config.isBrowserLaunchSuppressed()) {
|
|
32616
32598
|
writeToStdout(`
|
|
32617
32599
|
----------------------------------------------------------------
|
|
32618
32600
|
Logging in with Google... Restarting Gemini CLI to continue.
|
|
@@ -32637,7 +32619,7 @@ Logging in with Google... Restarting Gemini CLI to continue.
|
|
|
32637
32619
|
}
|
|
32638
32620
|
await saveApiKey(apiKey);
|
|
32639
32621
|
await reloadApiKey();
|
|
32640
|
-
await config.refreshAuth(
|
|
32622
|
+
await config.refreshAuth("gemini-api-key" /* USE_GEMINI */);
|
|
32641
32623
|
setAuthState("authenticated" /* Authenticated */);
|
|
32642
32624
|
} catch (e) {
|
|
32643
32625
|
onAuthError(
|
|
@@ -32662,7 +32644,7 @@ Logging in with Google... Restarting Gemini CLI to continue.
|
|
|
32662
32644
|
`Authentication is enforced to be ${settings.merged.security.auth.enforcedType}, but you are currently using ${settings.merged.security.auth.selectedType}.`
|
|
32663
32645
|
);
|
|
32664
32646
|
} else if (settings.merged.security.auth.selectedType && !settings.merged.security.auth.useExternal) {
|
|
32665
|
-
if (settings.merged.security.auth.selectedType ===
|
|
32647
|
+
if (settings.merged.security.auth.selectedType === "gemini-api-key" /* USE_GEMINI */) {
|
|
32666
32648
|
return;
|
|
32667
32649
|
}
|
|
32668
32650
|
const error = validateAuthMethod(
|
|
@@ -32783,9 +32765,9 @@ Logging in with Google... Restarting Gemini CLI to continue.
|
|
|
32783
32765
|
}
|
|
32784
32766
|
});
|
|
32785
32767
|
};
|
|
32786
|
-
coreEvents.on(
|
|
32768
|
+
coreEvents.on("consent-request" /* ConsentRequest */, handleConsentRequest);
|
|
32787
32769
|
return () => {
|
|
32788
|
-
coreEvents.off(
|
|
32770
|
+
coreEvents.off("consent-request" /* ConsentRequest */, handleConsentRequest);
|
|
32789
32771
|
};
|
|
32790
32772
|
}, []);
|
|
32791
32773
|
const performMemoryRefresh = (0, import_react124.useCallback)(async () => {
|
|
@@ -33458,7 +33440,7 @@ ${queuedText}` : queuedText;
|
|
|
33458
33440
|
if (keyMatchers["app.showErrorDetails" /* SHOW_ERROR_DETAILS */](key)) {
|
|
33459
33441
|
if (settings.merged.general.devtools) {
|
|
33460
33442
|
void (async () => {
|
|
33461
|
-
const { toggleDevToolsPanel } = await import("./devtoolsService-
|
|
33443
|
+
const { toggleDevToolsPanel } = await import("./devtoolsService-GQF7V6FB.js");
|
|
33462
33444
|
await toggleDevToolsPanel(
|
|
33463
33445
|
config,
|
|
33464
33446
|
showErrorDetails,
|
|
@@ -33676,12 +33658,12 @@ ${queuedText}` : queuedText;
|
|
|
33676
33658
|
Date.now()
|
|
33677
33659
|
);
|
|
33678
33660
|
};
|
|
33679
|
-
coreEvents.on(
|
|
33680
|
-
coreEvents.on(
|
|
33661
|
+
coreEvents.on("user-feedback" /* UserFeedback */, handleUserFeedback);
|
|
33662
|
+
coreEvents.on("hook-system-message" /* HookSystemMessage */, handleHookSystemMessage);
|
|
33681
33663
|
coreEvents.drainBacklogs();
|
|
33682
33664
|
return () => {
|
|
33683
|
-
coreEvents.off(
|
|
33684
|
-
coreEvents.off(
|
|
33665
|
+
coreEvents.off("user-feedback" /* UserFeedback */, handleUserFeedback);
|
|
33666
|
+
coreEvents.off("hook-system-message" /* HookSystemMessage */, handleHookSystemMessage);
|
|
33685
33667
|
};
|
|
33686
33668
|
}, [historyManager]);
|
|
33687
33669
|
const nightly = props.version.includes("nightly");
|
|
@@ -33784,9 +33766,9 @@ ${queuedText}` : queuedText;
|
|
|
33784
33766
|
const handleMemoryChanged = (result) => {
|
|
33785
33767
|
setGeminiMdFileCount(result.fileCount);
|
|
33786
33768
|
};
|
|
33787
|
-
coreEvents.on(
|
|
33769
|
+
coreEvents.on("memory-changed" /* MemoryChanged */, handleMemoryChanged);
|
|
33788
33770
|
return () => {
|
|
33789
|
-
coreEvents.off(
|
|
33771
|
+
coreEvents.off("memory-changed" /* MemoryChanged */, handleMemoryChanged);
|
|
33790
33772
|
};
|
|
33791
33773
|
}, []);
|
|
33792
33774
|
(0, import_react124.useEffect)(() => {
|