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