@google/gemini-cli 0.63.0-nightly.20260928.g2fe7c2d3f → 0.63.0-preview.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/bundle/{chunk-QX7M3XMQ.js → chunk-2J6RC447.js} +3 -3
- package/bundle/{chunk-DEI3TS7C.js → chunk-2NCBQURB.js} +125 -47
- package/bundle/{chunk-C2KZGMGL.js → chunk-2P4ETAEG.js} +1 -1
- package/bundle/{chunk-QYTRARRL.js → chunk-5VYF5TVF.js} +30 -3
- package/bundle/{chunk-EATZTV2L.js → chunk-B2C7BQ4Z.js} +7 -7
- package/bundle/{chunk-2AXHER6I.js → chunk-BVDTRESW.js} +1 -1
- package/bundle/{chunk-I5ZBUXWS.js → chunk-CTL6DZSY.js} +1 -1
- package/bundle/{chunk-7ZCWMSGJ.js → chunk-EIMVJG2V.js} +1 -1
- package/bundle/{chunk-4SQTLFVK.js → chunk-EWEUWTBB.js} +58 -71
- package/bundle/{chunk-LNPKSDNP.js → chunk-GRSO6OI3.js} +7 -7
- package/bundle/{chunk-SJFSOFYJ.js → chunk-H4WLRV6U.js} +30 -3
- package/bundle/{chunk-ERMD62K5.js → chunk-HBZBBLAV.js} +14860 -7829
- package/bundle/{chunk-YZPLV23A.js → chunk-JEUVKR2X.js} +3 -3
- package/bundle/{chunk-KRI5JA76.js → chunk-KCB54UJ5.js} +73 -17
- package/bundle/{chunk-ZAM747AR.js → chunk-KPPDDNGJ.js} +1 -1
- package/bundle/{chunk-SZK5XAFL.js → chunk-NTWFJ2RF.js} +30 -3
- package/bundle/{chunk-B3EF23HT.js → chunk-NWSCUKK3.js} +70 -19
- package/bundle/{chunk-I7XQQVIO.js → chunk-R6Q6D3UA.js} +1 -1
- package/bundle/{chunk-RFR5KZGU.js → chunk-RC6VJ6FT.js} +126 -47
- package/bundle/{chunk-PGIM2K4Q.js → chunk-RXHIISMM.js} +1 -1
- package/bundle/{chunk-UOXIYBXB.js → chunk-SNGNFODQ.js} +1 -1
- package/bundle/{chunk-KSWUQTWU.js → chunk-UEOEM4H5.js} +3 -3
- package/bundle/{chunk-4PBNRKYJ.js → chunk-Z5RCAIV5.js} +129 -53
- package/bundle/{chunk-BRTA6WWG.js → chunk-ZDQYLJYN.js} +8 -9
- package/bundle/{cleanup-5PD3O5L7.js → cleanup-EX2L3L3E.js} +2 -2
- package/bundle/{cleanup-6IDD7Q3X.js → cleanup-IT7XR7KS.js} +2 -2
- package/bundle/{cleanup-7UL3PRLF.js → cleanup-WWLYKZIX.js} +2 -2
- package/bundle/{core-IIFMZU4H.js → core-D5D4MF5H.js} +3 -1
- package/bundle/{dist-5HHK4577.js → core-GAJB2LOX.js} +3 -1
- package/bundle/{devtoolsService-AK7UU2FI.js → devtoolsService-4YTFHHPN.js} +2 -2
- package/bundle/{devtoolsService-A7VWEFDQ.js → devtoolsService-S4ZTRGJL.js} +3 -4
- package/bundle/{devtoolsService-67KG4JD7.js → devtoolsService-TJPENQSW.js} +2 -2
- package/bundle/{dist-I74UZ4GA.js → dist-MTMOCTIW.js} +3 -1
- package/bundle/{gemini-OFIYPHV5.js → gemini-5T5BS7L7.js} +14 -14
- package/bundle/{gemini-PGIEQLQD.js → gemini-FHORRYHM.js} +13 -13
- package/bundle/{gemini-PLPMSDXJ.js → gemini-UQRS6TBE.js} +198 -214
- package/bundle/gemini.js +20 -11
- package/bundle/{interactiveCli-JLFFVRVY.js → interactiveCli-5YNYZTMK.js} +18 -10
- package/bundle/{interactiveCli-JF6LE6RN.js → interactiveCli-I5K7O5Z6.js} +18 -10
- package/bundle/{interactiveCli-OG4JE4CU.js → interactiveCli-WOM6QZHM.js} +302 -313
- package/bundle/{liteRtServerManager-4LVWWKUV.js → liteRtServerManager-3N5KI6YS.js} +4 -4
- package/bundle/{liteRtServerManager-DVDNFJNH.js → liteRtServerManager-EH2L2UVH.js} +4 -4
- package/bundle/{liteRtServerManager-G4WG2Q45.js → liteRtServerManager-ZLIHBLZP.js} +4 -4
- package/bundle/{oauth2-provider-KPLVYPVA.js → oauth2-provider-5GFYTXFU.js} +1 -1
- package/bundle/{oauth2-provider-IBKEWCFT.js → oauth2-provider-NGSH2JQK.js} +72 -38
- package/bundle/{oauth2-provider-CEQ4PAUC.js → oauth2-provider-TA2KRXWQ.js} +1 -1
- package/bundle/{start-2A3VVOAH.js → start-CWI6OP6N.js} +6 -6
- package/bundle/{start-6PINHVUA.js → start-M3IUNCYH.js} +6 -6
- package/bundle/{start-BZAGKSC2.js → start-MWDNIQUY.js} +6 -6
- package/package.json +1 -1
- package/bundle/chunk-5G7FE6LZ.js +0 -102951
- package/bundle/chunk-EORMOPQX.js +0 -17368
- package/bundle/chunk-EYGY6SJV.js +0 -512
- package/bundle/chunk-KCZCDPS2.js +0 -398
- package/bundle/chunk-PAIQESPE.js +0 -118
- package/bundle/chunk-TXWIPUPY.js +0 -400484
- package/bundle/chunk-VAGYZO4R.js +0 -1571
- package/bundle/chunk-VNGBTT2C.js +0 -154
- package/bundle/cleanup-UTIIPF3A.js +0 -32
- package/bundle/devtoolsService-REQSIEPU.js +0 -4359
- package/bundle/dist-QMOHSH2B.js +0 -2248
- package/bundle/gemini-I47O5YI2.js +0 -17863
- package/bundle/interactiveCli-CJEDKYUL.js +0 -34907
- package/bundle/liteRtServerManager-MZO6JMNV.js +0 -65
- package/bundle/oauth2-provider-UHJTSOLD.js +0 -235
- package/bundle/start-ZRUVAD7P.js +0 -18
|
@@ -171,10 +171,10 @@ import {
|
|
|
171
171
|
widestLineFromStyledChars,
|
|
172
172
|
wordBreakStyledChars,
|
|
173
173
|
wrapStyledChars
|
|
174
|
-
} from "./chunk-
|
|
174
|
+
} from "./chunk-EWEUWTBB.js";
|
|
175
175
|
import {
|
|
176
176
|
require_source
|
|
177
|
-
} from "./chunk-
|
|
177
|
+
} from "./chunk-SNGNFODQ.js";
|
|
178
178
|
import {
|
|
179
179
|
appEvents
|
|
180
180
|
} from "./chunk-5PS3AYFU.js";
|
|
@@ -227,37 +227,33 @@ import {
|
|
|
227
227
|
stripAnsi,
|
|
228
228
|
stripUnsafeCharacters,
|
|
229
229
|
toCodePoints
|
|
230
|
-
} from "./chunk-
|
|
230
|
+
} from "./chunk-RC6VJ6FT.js";
|
|
231
231
|
import {
|
|
232
232
|
handleAutoUpdate,
|
|
233
233
|
isDevelopment,
|
|
234
234
|
relaunchApp,
|
|
235
235
|
setUpdateHandler
|
|
236
|
-
} from "./chunk-
|
|
236
|
+
} from "./chunk-5VYF5TVF.js";
|
|
237
237
|
import {
|
|
238
238
|
isTodoList,
|
|
239
239
|
mapCoreStatusToDisplayStatus,
|
|
240
240
|
require_react
|
|
241
|
-
} from "./chunk-
|
|
241
|
+
} from "./chunk-ZDQYLJYN.js";
|
|
242
242
|
import {
|
|
243
243
|
registerCleanup,
|
|
244
244
|
removeCleanup,
|
|
245
245
|
runExitCleanup,
|
|
246
246
|
setupTtyCheck
|
|
247
|
-
} from "./chunk-
|
|
247
|
+
} from "./chunk-CTL6DZSY.js";
|
|
248
248
|
import {
|
|
249
249
|
ACTIVATE_SKILL_TOOL_NAME,
|
|
250
250
|
AGENT_TOOL_NAME,
|
|
251
251
|
ApiKeyUpdatedEvent,
|
|
252
|
-
ApprovalMode,
|
|
253
252
|
AsyncFzf,
|
|
254
253
|
AudioRecorder,
|
|
255
254
|
AuthType,
|
|
256
255
|
ChangeAuthRequestedError,
|
|
257
|
-
CompressionStatus,
|
|
258
256
|
ConversationFinishedEvent,
|
|
259
|
-
CoreEvent,
|
|
260
|
-
CoreToolCallStatus,
|
|
261
257
|
CreditPurchaseClickEvent,
|
|
262
258
|
DEFAULT_GEMINI_FLASH_LITE_MODEL,
|
|
263
259
|
DEFAULT_GEMINI_FLASH_MODEL,
|
|
@@ -279,20 +275,13 @@ import {
|
|
|
279
275
|
GEMMA_4_31B_IT_MODEL,
|
|
280
276
|
GLOB_DISPLAY_NAME,
|
|
281
277
|
GREP_DISPLAY_NAME,
|
|
282
|
-
GeminiCliOperation,
|
|
283
|
-
GeminiEventType,
|
|
284
278
|
GitService,
|
|
285
279
|
IdeClient,
|
|
286
|
-
Kind,
|
|
287
280
|
LS_DISPLAY_NAME,
|
|
288
281
|
LegacyAgentProtocol,
|
|
289
282
|
LlmRole,
|
|
290
283
|
Logger,
|
|
291
284
|
MAX_TOKENS_EXCEEDED_SUGGESTION,
|
|
292
|
-
MCPDiscoveryState,
|
|
293
|
-
MCPServerStatus,
|
|
294
|
-
MessageBusType,
|
|
295
|
-
MessageSenderType,
|
|
296
285
|
ModelNotFoundError,
|
|
297
286
|
ModelSlashCommandEvent,
|
|
298
287
|
OTHER_BLOCKED_MESSAGE,
|
|
@@ -305,7 +294,6 @@ import {
|
|
|
305
294
|
PREVIEW_GEMINI_MODEL,
|
|
306
295
|
PolicyIntegrityManager,
|
|
307
296
|
ProjectIdRequiredError,
|
|
308
|
-
QuestionType,
|
|
309
297
|
READ_FILE_DISPLAY_NAME,
|
|
310
298
|
READ_MANY_FILES_DISPLAY_NAME,
|
|
311
299
|
RECITATION_BLOCKED_MESSAGE,
|
|
@@ -314,22 +302,16 @@ import {
|
|
|
314
302
|
SAFETY_BLOCKED_MESSAGE,
|
|
315
303
|
SHELL_TOOL_NAME,
|
|
316
304
|
Scheduler,
|
|
317
|
-
SessionEndReason,
|
|
318
|
-
SessionStartSource,
|
|
319
305
|
ShellExecutionService,
|
|
320
306
|
SlashCommandStatus,
|
|
321
307
|
Storage,
|
|
322
|
-
SubagentState,
|
|
323
308
|
THINKING_ONLY_COMPRESS_SUGGESTION,
|
|
324
309
|
TOPIC_PARAM_STRATEGIC_INTENT,
|
|
325
310
|
TOPIC_PARAM_SUMMARY,
|
|
326
311
|
TOPIC_PARAM_TITLE,
|
|
327
312
|
TRUE_EMPTY_RESPONSE_MESSAGE,
|
|
328
313
|
TerminalQuotaError,
|
|
329
|
-
ToolConfirmationOutcome,
|
|
330
|
-
ToolErrorType,
|
|
331
314
|
TranscriptionFactory,
|
|
332
|
-
TrustLevel,
|
|
333
315
|
UPDATE_TOPIC_DISPLAY_NAME,
|
|
334
316
|
UPDATE_TOPIC_TOOL_NAME,
|
|
335
317
|
UnauthorizedError,
|
|
@@ -341,7 +323,6 @@ import {
|
|
|
341
323
|
WEB_FETCH_DISPLAY_NAME,
|
|
342
324
|
WEB_SEARCH_DISPLAY_NAME,
|
|
343
325
|
WRITE_FILE_DISPLAY_NAME,
|
|
344
|
-
WarningPriority,
|
|
345
326
|
WhisperModelManager,
|
|
346
327
|
addMCPStatusChangeListener,
|
|
347
328
|
allowEditorTypeInSandbox,
|
|
@@ -449,7 +430,7 @@ import {
|
|
|
449
430
|
validatePlanContent,
|
|
450
431
|
validatePlanPath,
|
|
451
432
|
writeToStdout
|
|
452
|
-
} from "./chunk-
|
|
433
|
+
} from "./chunk-KCB54UJ5.js";
|
|
453
434
|
import "./chunk-664ZODQF.js";
|
|
454
435
|
import "./chunk-IUUIT4SU.js";
|
|
455
436
|
import "./chunk-L6PII3GR.js";
|
|
@@ -5076,7 +5057,7 @@ function calculateShellMaxLines(options) {
|
|
|
5076
5057
|
if (isAlternateBuffer && isThisShellFocused2 && !constrainHeight) {
|
|
5077
5058
|
return maxLinesBasedOnHeight;
|
|
5078
5059
|
}
|
|
5079
|
-
const isExecuting = status ===
|
|
5060
|
+
const isExecuting = status === "executing" /* Executing */;
|
|
5080
5061
|
const shellMaxLinesLimit = isExecuting ? ACTIVE_SHELL_MAX_LINES - SHELL_CONTENT_OVERHEAD : COMPLETED_SHELL_MAX_LINES - SHELL_CONTENT_OVERHEAD;
|
|
5081
5062
|
return Math.min(maxLinesBasedOnHeight, shellMaxLinesLimit);
|
|
5082
5063
|
}
|
|
@@ -5112,13 +5093,13 @@ var formatToolArgs = (args) => {
|
|
|
5112
5093
|
var SubagentProgressDisplay = ({ progress, terminalWidth, historyOverrides }) => {
|
|
5113
5094
|
let headerText;
|
|
5114
5095
|
let headerColor = theme.text.secondary;
|
|
5115
|
-
if (progress.state ===
|
|
5096
|
+
if (progress.state === "cancelled" /* CANCELLED */) {
|
|
5116
5097
|
headerText = `Subagent ${progress.agentName} was cancelled.`;
|
|
5117
5098
|
headerColor = theme.status.warning;
|
|
5118
|
-
} else if (progress.state ===
|
|
5099
|
+
} else if (progress.state === "error" /* ERROR */) {
|
|
5119
5100
|
headerText = `Subagent ${progress.agentName} failed.`;
|
|
5120
5101
|
headerColor = theme.status.error;
|
|
5121
|
-
} else if (progress.state ===
|
|
5102
|
+
} else if (progress.state === "completed" /* COMPLETED */) {
|
|
5122
5103
|
headerText = `Subagent ${progress.agentName} completed.`;
|
|
5123
5104
|
headerColor = theme.status.success;
|
|
5124
5105
|
} else {
|
|
@@ -5138,7 +5119,7 @@ var SubagentProgressDisplay = ({ progress, terminalWidth, historyOverrides }) =>
|
|
|
5138
5119
|
/* @__PURE__ */ (0, import_jsx_runtime14.jsx)(Box_default, { flexGrow: 1, children: /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(Text, { color, children: item.content }) })
|
|
5139
5120
|
] }, item.id);
|
|
5140
5121
|
} else if (item.type === "tool_call") {
|
|
5141
|
-
const statusSymbol = item.status ===
|
|
5122
|
+
const statusSymbol = item.status === "running" /* RUNNING */ ? /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(build_default, { type: "dots" }) : item.status === "completed" /* COMPLETED */ ? /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(Text, { color: theme.status.success, children: TOOL_STATUS.SUCCESS }) : item.status === "cancelled" /* CANCELLED */ ? /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(Text, { color: theme.status.warning, bold: true, children: TOOL_STATUS.CANCELED }) : /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(Text, { color: theme.status.error, children: TOOL_STATUS.ERROR });
|
|
5142
5123
|
const formattedArgs = item.description || formatToolArgs(item.args);
|
|
5143
5124
|
const displayArgs = formattedArgs.length > 60 ? formattedArgs.slice(0, 60) + "..." : formattedArgs;
|
|
5144
5125
|
return /* @__PURE__ */ (0, import_jsx_runtime14.jsxs)(Box_default, { flexDirection: "row", children: [
|
|
@@ -5149,7 +5130,7 @@ var SubagentProgressDisplay = ({ progress, terminalWidth, historyOverrides }) =>
|
|
|
5149
5130
|
{
|
|
5150
5131
|
bold: true,
|
|
5151
5132
|
color: theme.text.primary,
|
|
5152
|
-
strikethrough: item.status ===
|
|
5133
|
+
strikethrough: item.status === "cancelled" /* CANCELLED */,
|
|
5153
5134
|
children: item.displayName || item.content
|
|
5154
5135
|
}
|
|
5155
5136
|
),
|
|
@@ -5158,7 +5139,7 @@ var SubagentProgressDisplay = ({ progress, terminalWidth, historyOverrides }) =>
|
|
|
5158
5139
|
{
|
|
5159
5140
|
color: theme.text.secondary,
|
|
5160
5141
|
wrap: "truncate",
|
|
5161
|
-
strikethrough: item.status ===
|
|
5142
|
+
strikethrough: item.status === "cancelled" /* CANCELLED */,
|
|
5162
5143
|
children: displayArgs
|
|
5163
5144
|
}
|
|
5164
5145
|
) })
|
|
@@ -5178,7 +5159,7 @@ var SubagentProgressDisplay = ({ progress, terminalWidth, historyOverrides }) =>
|
|
|
5178
5159
|
MarkdownDisplay,
|
|
5179
5160
|
{
|
|
5180
5161
|
text: safeJsonToMarkdown(progress.result),
|
|
5181
|
-
isPending: progress.state !==
|
|
5162
|
+
isPending: progress.state !== "completed" /* COMPLETED */,
|
|
5182
5163
|
terminalWidth
|
|
5183
5164
|
}
|
|
5184
5165
|
)
|
|
@@ -5533,14 +5514,14 @@ var ToolActionsProvider = (props) => {
|
|
|
5533
5514
|
}
|
|
5534
5515
|
const details = tool.confirmationDetails;
|
|
5535
5516
|
if (details?.type === "edit" && isDiffingEnabled && "filePath" in details) {
|
|
5536
|
-
const cliOutcome = outcome ===
|
|
5517
|
+
const cliOutcome = outcome === "cancel" /* Cancel */ ? "rejected" : "accepted";
|
|
5537
5518
|
await ideClient?.resolveDiffFromCli(details.filePath, cliOutcome);
|
|
5538
5519
|
}
|
|
5539
5520
|
if (tool.correlationId) {
|
|
5540
5521
|
await config.getMessageBus().publish({
|
|
5541
|
-
type:
|
|
5522
|
+
type: "tool-confirmation-response" /* TOOL_CONFIRMATION_RESPONSE */,
|
|
5542
5523
|
correlationId: tool.correlationId,
|
|
5543
|
-
confirmed: outcome !==
|
|
5524
|
+
confirmed: outcome !== "cancel" /* Cancel */,
|
|
5544
5525
|
requiresUserConfirmation: false,
|
|
5545
5526
|
outcome,
|
|
5546
5527
|
payload
|
|
@@ -5559,7 +5540,7 @@ var ToolActionsProvider = (props) => {
|
|
|
5559
5540
|
);
|
|
5560
5541
|
const cancel = (0, import_react10.useCallback)(
|
|
5561
5542
|
async (callId) => {
|
|
5562
|
-
await confirm(callId,
|
|
5543
|
+
await confirm(callId, "cancel" /* Cancel */);
|
|
5563
5544
|
},
|
|
5564
5545
|
[confirm]
|
|
5565
5546
|
);
|
|
@@ -5680,7 +5661,7 @@ var ToolMessage = ({
|
|
|
5680
5661
|
paddingX: 1,
|
|
5681
5662
|
flexDirection: "column",
|
|
5682
5663
|
children: [
|
|
5683
|
-
status ===
|
|
5664
|
+
status === "executing" /* Executing */ && progress !== void 0 && /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(
|
|
5684
5665
|
McpProgressIndicator,
|
|
5685
5666
|
{
|
|
5686
5667
|
progress,
|
|
@@ -5697,8 +5678,8 @@ var ToolMessage = ({
|
|
|
5697
5678
|
terminalWidth: safeTerminalWidth,
|
|
5698
5679
|
renderOutputAsMarkdown,
|
|
5699
5680
|
hasFocus: isThisShellFocused2,
|
|
5700
|
-
maxLines: kind ===
|
|
5701
|
-
overflowDirection: kind ===
|
|
5681
|
+
maxLines: kind === "agent" /* Agent */ && availableTerminalHeight !== void 0 ? SUBAGENT_MAX_LINES : void 0,
|
|
5682
|
+
overflowDirection: kind === "agent" /* Agent */ ? "bottom" : "top"
|
|
5702
5683
|
}
|
|
5703
5684
|
),
|
|
5704
5685
|
isThisShellFocused2 && config && /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(Box_default, { paddingLeft: STATUS_INDICATOR_WIDTH, marginTop: 1, children: /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(
|
|
@@ -6014,7 +5995,7 @@ function getInitialTrustState(settings, cwd5, isCurrentWorkspace) {
|
|
|
6014
5995
|
settings.merged,
|
|
6015
5996
|
process3.cwd()
|
|
6016
5997
|
);
|
|
6017
|
-
const isInheritedTrust = isTrusted && (!explicitTrustLevel || explicitTrustLevel ===
|
|
5998
|
+
const isInheritedTrust = isTrusted && (!explicitTrustLevel || explicitTrustLevel === "DO_NOT_TRUST" /* DO_NOT_TRUST */);
|
|
6018
5999
|
return {
|
|
6019
6000
|
currentTrustLevel: explicitTrustLevel,
|
|
6020
6001
|
isInheritedTrustFromParent: !!(source === "file" && isInheritedTrust),
|
|
@@ -6059,7 +6040,7 @@ var usePermissionsModifyTrust = (onExit, addItem, targetDirectory) => {
|
|
|
6059
6040
|
process3.cwd(),
|
|
6060
6041
|
newConfig
|
|
6061
6042
|
);
|
|
6062
|
-
if (trustLevel ===
|
|
6043
|
+
if (trustLevel === "DO_NOT_TRUST" /* DO_NOT_TRUST */ && isTrusted) {
|
|
6063
6044
|
let message = "Note: This folder is still trusted because the connected IDE workspace is trusted.";
|
|
6064
6045
|
if (source === "file") {
|
|
6065
6046
|
message = "Note: This folder is still trusted because a parent folder is trusted.";
|
|
@@ -6133,18 +6114,18 @@ function PermissionsModifyTrustDialog({
|
|
|
6133
6114
|
const TRUST_LEVEL_ITEMS = [
|
|
6134
6115
|
{
|
|
6135
6116
|
label: `Trust this folder (${dirName})`,
|
|
6136
|
-
value:
|
|
6137
|
-
key:
|
|
6117
|
+
value: "TRUST_FOLDER" /* TRUST_FOLDER */,
|
|
6118
|
+
key: "TRUST_FOLDER" /* TRUST_FOLDER */
|
|
6138
6119
|
},
|
|
6139
6120
|
{
|
|
6140
6121
|
label: `Trust parent folder (${parentFolder})`,
|
|
6141
|
-
value:
|
|
6142
|
-
key:
|
|
6122
|
+
value: "TRUST_PARENT" /* TRUST_PARENT */,
|
|
6123
|
+
key: "TRUST_PARENT" /* TRUST_PARENT */
|
|
6143
6124
|
},
|
|
6144
6125
|
{
|
|
6145
6126
|
label: "Don't trust",
|
|
6146
|
-
value:
|
|
6147
|
-
key:
|
|
6127
|
+
value: "DO_NOT_TRUST" /* DO_NOT_TRUST */,
|
|
6128
|
+
key: "DO_NOT_TRUST" /* DO_NOT_TRUST */
|
|
6148
6129
|
}
|
|
6149
6130
|
];
|
|
6150
6131
|
const {
|
|
@@ -6385,7 +6366,7 @@ var ShellToolMessage = ({
|
|
|
6385
6366
|
maxLinesLimit: maxLines
|
|
6386
6367
|
});
|
|
6387
6368
|
import_react15.default.useEffect(() => {
|
|
6388
|
-
const isExecuting = status ===
|
|
6369
|
+
const isExecuting = status === "executing" /* Executing */;
|
|
6389
6370
|
if (isExecuting && ptyId) {
|
|
6390
6371
|
try {
|
|
6391
6372
|
const childWidth = safeTerminalWidth - 4;
|
|
@@ -6599,13 +6580,13 @@ var SubagentGroupDisplay = ({
|
|
|
6599
6580
|
const singleAgent = toolCalls[0].resultDisplay;
|
|
6600
6581
|
if (isSubagentProgress(singleAgent)) {
|
|
6601
6582
|
switch (singleAgent.state) {
|
|
6602
|
-
case
|
|
6583
|
+
case "completed" /* COMPLETED */:
|
|
6603
6584
|
headerText = "Agent Completed";
|
|
6604
6585
|
break;
|
|
6605
|
-
case
|
|
6586
|
+
case "cancelled" /* CANCELLED */:
|
|
6606
6587
|
headerText = "Agent Cancelled";
|
|
6607
6588
|
break;
|
|
6608
|
-
case
|
|
6589
|
+
case "error" /* ERROR */:
|
|
6609
6590
|
headerText = "Agent Error";
|
|
6610
6591
|
break;
|
|
6611
6592
|
default:
|
|
@@ -6621,8 +6602,8 @@ var SubagentGroupDisplay = ({
|
|
|
6621
6602
|
for (const tc of toolCalls) {
|
|
6622
6603
|
const progress = tc.resultDisplay;
|
|
6623
6604
|
if (isSubagentProgress(progress)) {
|
|
6624
|
-
if (progress.state ===
|
|
6625
|
-
else if (progress.state ===
|
|
6605
|
+
if (progress.state === "completed" /* COMPLETED */) completedCount++;
|
|
6606
|
+
else if (progress.state === "running" /* RUNNING */) runningCount++;
|
|
6626
6607
|
} else {
|
|
6627
6608
|
runningCount++;
|
|
6628
6609
|
}
|
|
@@ -6701,7 +6682,7 @@ var SubagentGroupDisplay = ({
|
|
|
6701
6682
|
if (!isExpanded) {
|
|
6702
6683
|
let content = "Starting...";
|
|
6703
6684
|
let formattedArgs;
|
|
6704
|
-
if (progress.state ===
|
|
6685
|
+
if (progress.state === "completed" /* COMPLETED */) {
|
|
6705
6686
|
if (progress.terminateReason && progress.terminateReason !== "GOAL") {
|
|
6706
6687
|
content = `Finished Early (${progress.terminateReason})`;
|
|
6707
6688
|
} else {
|
|
@@ -6715,17 +6696,17 @@ var SubagentGroupDisplay = ({
|
|
|
6715
6696
|
formattedArgs = formatToolArgs(lastActivity.args);
|
|
6716
6697
|
}
|
|
6717
6698
|
}
|
|
6718
|
-
const displayArgs = progress.state ===
|
|
6699
|
+
const displayArgs = progress.state === "completed" /* COMPLETED */ ? "" : formattedArgs;
|
|
6719
6700
|
const renderStatusIcon = () => {
|
|
6720
|
-
const state = progress.state ??
|
|
6701
|
+
const state = progress.state ?? "running" /* RUNNING */;
|
|
6721
6702
|
switch (state) {
|
|
6722
|
-
case
|
|
6703
|
+
case "running" /* RUNNING */:
|
|
6723
6704
|
return /* @__PURE__ */ (0, import_jsx_runtime24.jsx)(Text, { color: theme.text.primary, children: "!" });
|
|
6724
|
-
case
|
|
6705
|
+
case "completed" /* COMPLETED */:
|
|
6725
6706
|
return /* @__PURE__ */ (0, import_jsx_runtime24.jsx)(Text, { color: theme.status.success, children: "\u2713" });
|
|
6726
|
-
case
|
|
6707
|
+
case "cancelled" /* CANCELLED */:
|
|
6727
6708
|
return /* @__PURE__ */ (0, import_jsx_runtime24.jsx)(Text, { color: theme.status.warning, children: "\u2139" });
|
|
6728
|
-
case
|
|
6709
|
+
case "error" /* ERROR */:
|
|
6729
6710
|
return /* @__PURE__ */ (0, import_jsx_runtime24.jsx)(Text, { color: theme.status.error, children: "\u2717" });
|
|
6730
6711
|
default:
|
|
6731
6712
|
return checkExhaustive(state);
|
|
@@ -6778,22 +6759,22 @@ var hasPayload = (res) => {
|
|
|
6778
6759
|
function getFileOpData(diff, status, resultDisplay, terminalWidth, availableTerminalHeight, isClickable) {
|
|
6779
6760
|
const added = (diff.diffStat?.model_added_lines ?? 0) + (diff.diffStat?.user_added_lines ?? 0);
|
|
6780
6761
|
const removed = (diff.diffStat?.model_removed_lines ?? 0) + (diff.diffStat?.user_removed_lines ?? 0);
|
|
6781
|
-
const isAcceptedOrConfirming = status ===
|
|
6762
|
+
const isAcceptedOrConfirming = status === "success" /* Success */ || status === "executing" /* Executing */ || status === "awaiting_approval" /* AwaitingApproval */;
|
|
6782
6763
|
const addColor = isAcceptedOrConfirming ? theme.status.success : theme.text.secondary;
|
|
6783
6764
|
const removeColor = isAcceptedOrConfirming ? theme.status.error : theme.text.secondary;
|
|
6784
6765
|
const showDiffStat = !!diff.diffStat;
|
|
6785
6766
|
const description = /* @__PURE__ */ (0, import_jsx_runtime25.jsx)(Box_default, { flexDirection: "row", children: /* @__PURE__ */ (0, import_jsx_runtime25.jsx)(Text, { color: theme.text.secondary, wrap: "truncate-end", children: diff.fileName }) });
|
|
6786
6767
|
let resultSummary = "";
|
|
6787
6768
|
let resultColor = theme.text.secondary;
|
|
6788
|
-
if (status ===
|
|
6769
|
+
if (status === "awaiting_approval" /* AwaitingApproval */) {
|
|
6789
6770
|
resultSummary = "Confirming";
|
|
6790
|
-
} else if (status ===
|
|
6771
|
+
} else if (status === "success" /* Success */ || status === "executing" /* Executing */) {
|
|
6791
6772
|
resultSummary = "Accepted";
|
|
6792
6773
|
resultColor = theme.text.accent;
|
|
6793
|
-
} else if (status ===
|
|
6774
|
+
} else if (status === "cancelled" /* Cancelled */) {
|
|
6794
6775
|
resultSummary = "Rejected";
|
|
6795
6776
|
resultColor = theme.status.error;
|
|
6796
|
-
} else if (status ===
|
|
6777
|
+
} else if (status === "error" /* Error */) {
|
|
6797
6778
|
resultSummary = typeof resultDisplay === "string" ? resultDisplay : "Failed";
|
|
6798
6779
|
resultColor = theme.status.error;
|
|
6799
6780
|
}
|
|
@@ -6824,7 +6805,7 @@ function getFileOpData(diff, status, resultDisplay, terminalWidth, availableTerm
|
|
|
6824
6805
|
filename: diff.fileName,
|
|
6825
6806
|
terminalWidth: Math.max(0, (terminalWidth || 0) - PAYLOAD_MARGIN_LEFT),
|
|
6826
6807
|
availableTerminalHeight,
|
|
6827
|
-
disableColor: status ===
|
|
6808
|
+
disableColor: status === "cancelled" /* Cancelled */
|
|
6828
6809
|
}
|
|
6829
6810
|
);
|
|
6830
6811
|
return { description, summary, payload };
|
|
@@ -6952,10 +6933,10 @@ var DenseToolMessage = (props) => {
|
|
|
6952
6933
|
if (isGrepResult(resultDisplay)) {
|
|
6953
6934
|
return getGenericSuccessData(resultDisplay, originalDescription);
|
|
6954
6935
|
}
|
|
6955
|
-
if (status ===
|
|
6936
|
+
if (status === "success" /* Success */ && resultDisplay) {
|
|
6956
6937
|
return getGenericSuccessData(resultDisplay, originalDescription);
|
|
6957
6938
|
}
|
|
6958
|
-
if (status ===
|
|
6939
|
+
if (status === "error" /* Error */) {
|
|
6959
6940
|
const text = typeof resultDisplay === "string" ? resultDisplay.replace(/\n/g, " ") : "Failed";
|
|
6960
6941
|
const errorSummary = /* @__PURE__ */ (0, import_jsx_runtime25.jsxs)(Text, { color: theme.status.error, wrap: "truncate-end", children: [
|
|
6961
6942
|
"\u2192 ",
|
|
@@ -6996,7 +6977,7 @@ var DenseToolMessage = (props) => {
|
|
|
6996
6977
|
language: fileExtension,
|
|
6997
6978
|
maxWidth: Math.max(0, (terminalWidth || 0) - PAYLOAD_MARGIN_LEFT),
|
|
6998
6979
|
settings,
|
|
6999
|
-
disableColor: status ===
|
|
6980
|
+
disableColor: status === "cancelled" /* Cancelled */,
|
|
7000
6981
|
returnLines: true
|
|
7001
6982
|
});
|
|
7002
6983
|
} else {
|
|
@@ -7004,7 +6985,7 @@ var DenseToolMessage = (props) => {
|
|
|
7004
6985
|
parsedLines,
|
|
7005
6986
|
filename: diff.fileName,
|
|
7006
6987
|
terminalWidth: Math.max(0, (terminalWidth || 0) - PAYLOAD_MARGIN_LEFT),
|
|
7007
|
-
disableColor: status ===
|
|
6988
|
+
disableColor: status === "cancelled" /* Cancelled */
|
|
7008
6989
|
});
|
|
7009
6990
|
}
|
|
7010
6991
|
}, [diff, isExpanded, isAlternateBuffer, terminalWidth, settings, status]);
|
|
@@ -7141,7 +7122,7 @@ function isToolExecuting(pendingHistoryItems) {
|
|
|
7141
7122
|
return pendingHistoryItems.some((item) => {
|
|
7142
7123
|
if (item && item.type === "tool_group") {
|
|
7143
7124
|
return item.tools.some(
|
|
7144
|
-
(tool) =>
|
|
7125
|
+
(tool) => "executing" /* Executing */ === tool.status
|
|
7145
7126
|
);
|
|
7146
7127
|
}
|
|
7147
7128
|
return false;
|
|
@@ -7150,7 +7131,7 @@ function isToolExecuting(pendingHistoryItems) {
|
|
|
7150
7131
|
function isToolAwaitingConfirmation(pendingHistoryItems) {
|
|
7151
7132
|
return pendingHistoryItems.filter((item) => item.type === "tool_group").some(
|
|
7152
7133
|
(item) => item.tools.some(
|
|
7153
|
-
(tool) =>
|
|
7134
|
+
(tool) => "awaiting_approval" /* AwaitingApproval */ === tool.status
|
|
7154
7135
|
)
|
|
7155
7136
|
);
|
|
7156
7137
|
}
|
|
@@ -7238,7 +7219,7 @@ var ToolGroupMessage = ({
|
|
|
7238
7219
|
const groupedTools = (0, import_react19.useMemo)(() => {
|
|
7239
7220
|
const groups = [];
|
|
7240
7221
|
for (const tool of visibleToolCalls) {
|
|
7241
|
-
if (tool.kind ===
|
|
7222
|
+
if (tool.kind === "agent" /* Agent */) {
|
|
7242
7223
|
const lastGroup = groups[groups.length - 1];
|
|
7243
7224
|
if (Array.isArray(lastGroup)) {
|
|
7244
7225
|
lastGroup.push(tool);
|
|
@@ -7293,7 +7274,7 @@ var ToolGroupMessage = ({
|
|
|
7293
7274
|
}, [groupedTools, isCompactModeEnabled, borderTopOverride]);
|
|
7294
7275
|
let countToolCallsWithResults = 0;
|
|
7295
7276
|
for (const tool of visibleToolCalls) {
|
|
7296
|
-
if (tool.kind !==
|
|
7277
|
+
if (tool.kind !== "agent" /* Agent */) {
|
|
7297
7278
|
if (isCompactTool(tool, isCompactModeEnabled)) {
|
|
7298
7279
|
if (hasDensePayload(tool)) {
|
|
7299
7280
|
countToolCallsWithResults++;
|
|
@@ -7484,7 +7465,7 @@ var ToolGroupDisplay = ({
|
|
|
7484
7465
|
}
|
|
7485
7466
|
const { tools, borderColor, borderDimColor, borderTop, borderBottom } = item;
|
|
7486
7467
|
const visibleTools = tools.filter(
|
|
7487
|
-
(t) => t.status !==
|
|
7468
|
+
(t) => t.status !== "awaiting_approval" /* AwaitingApproval */
|
|
7488
7469
|
);
|
|
7489
7470
|
const noticeTools = visibleTools.filter((t) => t.format === "notice");
|
|
7490
7471
|
const otherTools = visibleTools.filter(
|
|
@@ -7686,18 +7667,18 @@ function CompressionMessage({
|
|
|
7686
7667
|
return "Compressing chat history";
|
|
7687
7668
|
}
|
|
7688
7669
|
switch (compressionStatus) {
|
|
7689
|
-
case
|
|
7670
|
+
case 1 /* COMPRESSED */:
|
|
7690
7671
|
return `Chat history compressed from ${originalTokens} to ${newTokens} tokens.`;
|
|
7691
|
-
case
|
|
7672
|
+
case 2 /* COMPRESSION_FAILED_INFLATED_TOKEN_COUNT */:
|
|
7692
7673
|
if (originalTokens < 5e4) {
|
|
7693
7674
|
return "Compression was not beneficial for this history size.";
|
|
7694
7675
|
}
|
|
7695
7676
|
return "Chat history compression did not reduce size. This may indicate issues with the compression prompt.";
|
|
7696
|
-
case
|
|
7677
|
+
case 3 /* COMPRESSION_FAILED_TOKEN_COUNT_ERROR */:
|
|
7697
7678
|
return "Could not compress chat history due to a token counting error.";
|
|
7698
|
-
case
|
|
7679
|
+
case 4 /* COMPRESSION_FAILED_EMPTY_SUMMARY */:
|
|
7699
7680
|
return "Chat history compression failed: the model returned an empty summary.";
|
|
7700
|
-
case
|
|
7681
|
+
case 5 /* NOOP */:
|
|
7701
7682
|
return "Nothing to compress.";
|
|
7702
7683
|
default:
|
|
7703
7684
|
return "";
|
|
@@ -8135,8 +8116,8 @@ var ModelUsageTable = ({ models }) => {
|
|
|
8135
8116
|
);
|
|
8136
8117
|
roleEntries.sort(([a], [b]) => {
|
|
8137
8118
|
if (a === b) return 0;
|
|
8138
|
-
if (a ===
|
|
8139
|
-
if (b ===
|
|
8119
|
+
if (a === "main" /* MAIN */) return -1;
|
|
8120
|
+
if (b === "main" /* MAIN */) return 1;
|
|
8140
8121
|
return a.localeCompare(b);
|
|
8141
8122
|
});
|
|
8142
8123
|
roleEntries.forEach(([role, roleMetrics]) => {
|
|
@@ -8467,8 +8448,8 @@ var ModelStatsDisplay = ({
|
|
|
8467
8448
|
return validRoles.includes(role);
|
|
8468
8449
|
}).sort((a, b) => {
|
|
8469
8450
|
if (a === b) return 0;
|
|
8470
|
-
if (a ===
|
|
8471
|
-
if (b ===
|
|
8451
|
+
if (a === "main" /* MAIN */) return -1;
|
|
8452
|
+
if (b === "main" /* MAIN */) return 1;
|
|
8472
8453
|
return a.localeCompare(b);
|
|
8473
8454
|
});
|
|
8474
8455
|
const createRow = (metric, getValue, options = {}) => {
|
|
@@ -9259,7 +9240,7 @@ var McpStatus = ({
|
|
|
9259
9240
|
);
|
|
9260
9241
|
const originalStatus = serverStatus(serverName);
|
|
9261
9242
|
const hasCachedItems = serverTools.length > 0 || serverPrompts.length > 0 || serverResources.length > 0;
|
|
9262
|
-
const status = originalStatus ===
|
|
9243
|
+
const status = originalStatus === "disconnected" /* DISCONNECTED */ && hasCachedItems ? "connected" /* CONNECTED */ : originalStatus;
|
|
9263
9244
|
let statusIndicator = "";
|
|
9264
9245
|
let statusText = "";
|
|
9265
9246
|
let statusColor = theme.text.primary;
|
|
@@ -9271,17 +9252,17 @@ var McpStatus = ({
|
|
|
9271
9252
|
statusColor = theme.text.secondary;
|
|
9272
9253
|
} else {
|
|
9273
9254
|
switch (status) {
|
|
9274
|
-
case
|
|
9255
|
+
case "connected" /* CONNECTED */:
|
|
9275
9256
|
statusIndicator = "\u{1F7E2}";
|
|
9276
9257
|
statusText = "Ready";
|
|
9277
9258
|
statusColor = theme.status.success;
|
|
9278
9259
|
break;
|
|
9279
|
-
case
|
|
9260
|
+
case "connecting" /* CONNECTING */:
|
|
9280
9261
|
statusIndicator = "\u{1F504}";
|
|
9281
9262
|
statusText = "Starting... (first startup may take longer)";
|
|
9282
9263
|
statusColor = theme.status.warning;
|
|
9283
9264
|
break;
|
|
9284
|
-
case
|
|
9265
|
+
case "disconnected" /* DISCONNECTED */:
|
|
9285
9266
|
default:
|
|
9286
9267
|
statusIndicator = "\u{1F534}";
|
|
9287
9268
|
statusText = "Disconnected";
|
|
@@ -9329,12 +9310,12 @@ var McpStatus = ({
|
|
|
9329
9310
|
/* @__PURE__ */ (0, import_jsx_runtime47.jsxs)(Text, { children: [
|
|
9330
9311
|
" - ",
|
|
9331
9312
|
statusText,
|
|
9332
|
-
status ===
|
|
9313
|
+
status === "connected" /* CONNECTED */ && parts.length > 0 && ` (${parts.join(", ")})`
|
|
9333
9314
|
] }),
|
|
9334
9315
|
authStatusNode
|
|
9335
9316
|
] }),
|
|
9336
|
-
status ===
|
|
9337
|
-
status ===
|
|
9317
|
+
status === "connecting" /* CONNECTING */ && /* @__PURE__ */ (0, import_jsx_runtime47.jsx)(Text, { children: " (tools and prompts will appear when ready)" }),
|
|
9318
|
+
status === "disconnected" /* DISCONNECTED */ && toolCount > 0 && /* @__PURE__ */ (0, import_jsx_runtime47.jsxs)(Text, { children: [
|
|
9338
9319
|
" (",
|
|
9339
9320
|
toolCount,
|
|
9340
9321
|
" tools cached)"
|
|
@@ -9895,7 +9876,7 @@ var Notifications = () => {
|
|
|
9895
9876
|
if (dismissed) return [];
|
|
9896
9877
|
const counts = persistentState.get("startupWarningCounts") || {};
|
|
9897
9878
|
return startupWarnings.filter((w) => {
|
|
9898
|
-
if (w.priority ===
|
|
9879
|
+
if (w.priority === "low" /* Low */) {
|
|
9899
9880
|
const count = counts[w.id] || 0;
|
|
9900
9881
|
return count < MAX_STARTUP_WARNING_SHOW_COUNT;
|
|
9901
9882
|
}
|
|
@@ -9908,7 +9889,7 @@ var Notifications = () => {
|
|
|
9908
9889
|
const counts = { ...persistentState.get("startupWarningCounts") || {} };
|
|
9909
9890
|
let changed = false;
|
|
9910
9891
|
visibleWarnings.forEach((w) => {
|
|
9911
|
-
if (w.priority ===
|
|
9892
|
+
if (w.priority === "low" /* Low */) {
|
|
9912
9893
|
counts[w.id] = (counts[w.id] || 0) + 1;
|
|
9913
9894
|
changed = true;
|
|
9914
9895
|
}
|
|
@@ -10015,7 +9996,7 @@ var UserIdentity = ({ config }) => {
|
|
|
10015
9996
|
}
|
|
10016
9997
|
return /* @__PURE__ */ (0, import_jsx_runtime57.jsxs)(Box_default, { flexDirection: "column", children: [
|
|
10017
9998
|
/* @__PURE__ */ (0, import_jsx_runtime57.jsxs)(Box_default, { children: [
|
|
10018
|
-
/* @__PURE__ */ (0, import_jsx_runtime57.jsx)(Text, { color: theme.text.primary, wrap: "truncate-end", children: authType ===
|
|
9999
|
+
/* @__PURE__ */ (0, import_jsx_runtime57.jsx)(Text, { color: theme.text.primary, wrap: "truncate-end", children: authType === "oauth-personal" /* LOGIN_WITH_GOOGLE */ ? /* @__PURE__ */ (0, import_jsx_runtime57.jsxs)(Text, { children: [
|
|
10019
10000
|
/* @__PURE__ */ (0, import_jsx_runtime57.jsxs)(Text, { bold: true, children: [
|
|
10020
10001
|
"Signed in with Google",
|
|
10021
10002
|
email ? ":" : ""
|
|
@@ -10258,7 +10239,7 @@ var import_react30 = __toESM(require_react(), 1);
|
|
|
10258
10239
|
function getConfirmingToolState(pendingHistoryItems) {
|
|
10259
10240
|
const allPendingTools = getAllToolCalls(pendingHistoryItems);
|
|
10260
10241
|
const confirmingTools = allPendingTools.filter(
|
|
10261
|
-
(tool) => tool.status ===
|
|
10242
|
+
(tool) => tool.status === "awaiting_approval" /* AwaitingApproval */
|
|
10262
10243
|
);
|
|
10263
10244
|
if (confirmingTools.length === 0) {
|
|
10264
10245
|
return null;
|
|
@@ -11567,7 +11548,7 @@ var ExitPlanModeDialog = ({
|
|
|
11567
11548
|
{
|
|
11568
11549
|
questions: [
|
|
11569
11550
|
{
|
|
11570
|
-
type:
|
|
11551
|
+
type: "choice" /* CHOICE */,
|
|
11571
11552
|
header: "Approval",
|
|
11572
11553
|
question: planContent,
|
|
11573
11554
|
options: [
|
|
@@ -11588,9 +11569,9 @@ var ExitPlanModeDialog = ({
|
|
|
11588
11569
|
onSubmit: (answers) => {
|
|
11589
11570
|
const answer = answers["0"];
|
|
11590
11571
|
if (answer === "Yes, automatically accept edits" /* Auto */) {
|
|
11591
|
-
onApprove(
|
|
11572
|
+
onApprove("autoEdit" /* AUTO_EDIT */);
|
|
11592
11573
|
} else if (answer === "Yes, manually accept edits" /* Manual */) {
|
|
11593
|
-
onApprove(
|
|
11574
|
+
onApprove("default" /* DEFAULT */);
|
|
11594
11575
|
} else if (answer) {
|
|
11595
11576
|
onFeedback(answer);
|
|
11596
11577
|
}
|
|
@@ -11802,7 +11783,7 @@ ${deceptiveUrlWarnings.map(
|
|
|
11802
11783
|
);
|
|
11803
11784
|
(0, import_react35.useEffect)(() => {
|
|
11804
11785
|
if (isCancelling) {
|
|
11805
|
-
handleConfirm(
|
|
11786
|
+
handleConfirm("cancel" /* Cancel */);
|
|
11806
11787
|
}
|
|
11807
11788
|
}, [isCancelling, handleConfirm]);
|
|
11808
11789
|
const handleSelect = (0, import_react35.useCallback)(
|
|
@@ -11815,19 +11796,19 @@ ${deceptiveUrlWarnings.map(
|
|
|
11815
11796
|
if (!confirmationDetails.isModifying) {
|
|
11816
11797
|
options2.push({
|
|
11817
11798
|
label: "Allow once",
|
|
11818
|
-
value:
|
|
11799
|
+
value: "proceed_once" /* ProceedOnce */,
|
|
11819
11800
|
key: "Allow once"
|
|
11820
11801
|
});
|
|
11821
11802
|
if (isTrustedFolder && !confirmationDetails.isBuildFile) {
|
|
11822
11803
|
options2.push({
|
|
11823
11804
|
label: "Allow for this session",
|
|
11824
|
-
value:
|
|
11805
|
+
value: "proceed_always" /* ProceedAlways */,
|
|
11825
11806
|
key: "Allow for this session"
|
|
11826
11807
|
});
|
|
11827
11808
|
if (allowPermanentApproval) {
|
|
11828
11809
|
options2.push({
|
|
11829
11810
|
label: "Allow for this file in all future sessions",
|
|
11830
|
-
value:
|
|
11811
|
+
value: "proceed_always_and_save" /* ProceedAlwaysAndSave */,
|
|
11831
11812
|
key: "Allow for this file in all future sessions"
|
|
11832
11813
|
});
|
|
11833
11814
|
}
|
|
@@ -11835,45 +11816,45 @@ ${deceptiveUrlWarnings.map(
|
|
|
11835
11816
|
if (!config.getIdeMode() || !isDiffingEnabled) {
|
|
11836
11817
|
options2.push({
|
|
11837
11818
|
label: "Modify with external editor",
|
|
11838
|
-
value:
|
|
11819
|
+
value: "modify_with_editor" /* ModifyWithEditor */,
|
|
11839
11820
|
key: "Modify with external editor"
|
|
11840
11821
|
});
|
|
11841
11822
|
}
|
|
11842
11823
|
options2.push({
|
|
11843
11824
|
label: "No, suggest changes (esc)",
|
|
11844
|
-
value:
|
|
11825
|
+
value: "cancel" /* Cancel */,
|
|
11845
11826
|
key: "No, suggest changes (esc)"
|
|
11846
11827
|
});
|
|
11847
11828
|
}
|
|
11848
11829
|
} else if (confirmationDetails.type === "sandbox_expansion") {
|
|
11849
11830
|
options2.push({
|
|
11850
11831
|
label: "Allow once",
|
|
11851
|
-
value:
|
|
11832
|
+
value: "proceed_once" /* ProceedOnce */,
|
|
11852
11833
|
key: "Allow once"
|
|
11853
11834
|
});
|
|
11854
11835
|
if (isTrustedFolder) {
|
|
11855
11836
|
options2.push({
|
|
11856
11837
|
label: "Allow for this session",
|
|
11857
|
-
value:
|
|
11838
|
+
value: "proceed_always" /* ProceedAlways */,
|
|
11858
11839
|
key: "Allow for this session"
|
|
11859
11840
|
});
|
|
11860
11841
|
if (allowPermanentApproval) {
|
|
11861
11842
|
options2.push({
|
|
11862
11843
|
label: "Allow for all future sessions",
|
|
11863
|
-
value:
|
|
11844
|
+
value: "proceed_always_and_save" /* ProceedAlwaysAndSave */,
|
|
11864
11845
|
key: "Allow for all future sessions"
|
|
11865
11846
|
});
|
|
11866
11847
|
}
|
|
11867
11848
|
}
|
|
11868
11849
|
options2.push({
|
|
11869
11850
|
label: "No, suggest changes (esc)",
|
|
11870
|
-
value:
|
|
11851
|
+
value: "cancel" /* Cancel */,
|
|
11871
11852
|
key: "No, suggest changes (esc)"
|
|
11872
11853
|
});
|
|
11873
11854
|
} else if (confirmationDetails.type === "exec") {
|
|
11874
11855
|
options2.push({
|
|
11875
11856
|
label: "Allow once",
|
|
11876
|
-
value:
|
|
11857
|
+
value: "proceed_once" /* ProceedOnce */,
|
|
11877
11858
|
key: "Allow once"
|
|
11878
11859
|
});
|
|
11879
11860
|
const hasUntrustedFlags = confirmationDetails.untrustedFlags && confirmationDetails.untrustedFlags.length > 0;
|
|
@@ -11881,75 +11862,75 @@ ${deceptiveUrlWarnings.map(
|
|
|
11881
11862
|
if (isTrustedFolder && !hasUntrustedFlags && !hasModifiedBuildFiles) {
|
|
11882
11863
|
options2.push({
|
|
11883
11864
|
label: `Allow for this session`,
|
|
11884
|
-
value:
|
|
11865
|
+
value: "proceed_always" /* ProceedAlways */,
|
|
11885
11866
|
key: `Allow for this session`
|
|
11886
11867
|
});
|
|
11887
11868
|
if (allowPermanentApproval) {
|
|
11888
11869
|
options2.push({
|
|
11889
11870
|
label: `Allow this command for all future sessions`,
|
|
11890
|
-
value:
|
|
11871
|
+
value: "proceed_always_and_save" /* ProceedAlwaysAndSave */,
|
|
11891
11872
|
key: `Allow for all future sessions`
|
|
11892
11873
|
});
|
|
11893
11874
|
}
|
|
11894
11875
|
}
|
|
11895
11876
|
options2.push({
|
|
11896
11877
|
label: "No, suggest changes (esc)",
|
|
11897
|
-
value:
|
|
11878
|
+
value: "cancel" /* Cancel */,
|
|
11898
11879
|
key: "No, suggest changes (esc)"
|
|
11899
11880
|
});
|
|
11900
11881
|
} else if (confirmationDetails.type === "info") {
|
|
11901
11882
|
options2.push({
|
|
11902
11883
|
label: "Allow once",
|
|
11903
|
-
value:
|
|
11884
|
+
value: "proceed_once" /* ProceedOnce */,
|
|
11904
11885
|
key: "Allow once"
|
|
11905
11886
|
});
|
|
11906
11887
|
if (isTrustedFolder) {
|
|
11907
11888
|
options2.push({
|
|
11908
11889
|
label: "Allow for this session",
|
|
11909
|
-
value:
|
|
11890
|
+
value: "proceed_always" /* ProceedAlways */,
|
|
11910
11891
|
key: "Allow for this session"
|
|
11911
11892
|
});
|
|
11912
11893
|
if (allowPermanentApproval) {
|
|
11913
11894
|
options2.push({
|
|
11914
11895
|
label: "Allow for all future sessions",
|
|
11915
|
-
value:
|
|
11896
|
+
value: "proceed_always_and_save" /* ProceedAlwaysAndSave */,
|
|
11916
11897
|
key: "Allow for all future sessions"
|
|
11917
11898
|
});
|
|
11918
11899
|
}
|
|
11919
11900
|
}
|
|
11920
11901
|
options2.push({
|
|
11921
11902
|
label: "No, suggest changes (esc)",
|
|
11922
|
-
value:
|
|
11903
|
+
value: "cancel" /* Cancel */,
|
|
11923
11904
|
key: "No, suggest changes (esc)"
|
|
11924
11905
|
});
|
|
11925
11906
|
} else if (confirmationDetails.type === "mcp") {
|
|
11926
11907
|
options2.push({
|
|
11927
11908
|
label: "Allow once",
|
|
11928
|
-
value:
|
|
11909
|
+
value: "proceed_once" /* ProceedOnce */,
|
|
11929
11910
|
key: "Allow once"
|
|
11930
11911
|
});
|
|
11931
11912
|
if (isTrustedFolder) {
|
|
11932
11913
|
options2.push({
|
|
11933
11914
|
label: "Allow tool for this session",
|
|
11934
|
-
value:
|
|
11915
|
+
value: "proceed_always_tool" /* ProceedAlwaysTool */,
|
|
11935
11916
|
key: "Allow tool for this session"
|
|
11936
11917
|
});
|
|
11937
11918
|
options2.push({
|
|
11938
11919
|
label: "Allow all server tools for this session",
|
|
11939
|
-
value:
|
|
11920
|
+
value: "proceed_always_server" /* ProceedAlwaysServer */,
|
|
11940
11921
|
key: "Allow all server tools for this session"
|
|
11941
11922
|
});
|
|
11942
11923
|
if (allowPermanentApproval) {
|
|
11943
11924
|
options2.push({
|
|
11944
11925
|
label: "Allow tool for all future sessions",
|
|
11945
|
-
value:
|
|
11926
|
+
value: "proceed_always_and_save" /* ProceedAlwaysAndSave */,
|
|
11946
11927
|
key: "Allow tool for all future sessions"
|
|
11947
11928
|
});
|
|
11948
11929
|
}
|
|
11949
11930
|
}
|
|
11950
11931
|
options2.push({
|
|
11951
11932
|
label: "No, suggest changes (esc)",
|
|
11952
|
-
value:
|
|
11933
|
+
value: "cancel" /* Cancel */,
|
|
11953
11934
|
key: "No, suggest changes (esc)"
|
|
11954
11935
|
});
|
|
11955
11936
|
}
|
|
@@ -11990,7 +11971,7 @@ ${deceptiveUrlWarnings.map(
|
|
|
11990
11971
|
const containsRedirection = commandsToDisplay.some(
|
|
11991
11972
|
(cmd) => hasRedirection(cmd)
|
|
11992
11973
|
);
|
|
11993
|
-
const isAutoEdit = config.getApprovalMode() ===
|
|
11974
|
+
const isAutoEdit = config.getApprovalMode() === "yolo" /* YOLO */ || config.getApprovalMode() === "autoEdit" /* AUTO_EDIT */;
|
|
11994
11975
|
if (containsRedirection && !isAutoEdit) {
|
|
11995
11976
|
extraInfoLines = 1;
|
|
11996
11977
|
}
|
|
@@ -12017,7 +11998,7 @@ ${deceptiveUrlWarnings.map(
|
|
|
12017
11998
|
const isSafeToPersist = confirmationDetails.type === "info" || confirmationDetails.type === "edit" || confirmationDetails.type === "mcp";
|
|
12018
11999
|
if (isSafeToPersist && settings.merged.security.autoAddToPolicyByDefault) {
|
|
12019
12000
|
const alwaysAndSaveIndex = options2.findIndex(
|
|
12020
|
-
(o) => o.value ===
|
|
12001
|
+
(o) => o.value === "proceed_always_and_save" /* ProceedAlwaysAndSave */
|
|
12021
12002
|
);
|
|
12022
12003
|
if (alwaysAndSaveIndex !== -1) {
|
|
12023
12004
|
initialIndex2 = alwaysAndSaveIndex;
|
|
@@ -12066,10 +12047,10 @@ Ensure you trust all modifications made to build files before approving executio
|
|
|
12066
12047
|
{
|
|
12067
12048
|
questions: confirmationDetails.questions,
|
|
12068
12049
|
onSubmit: (answers) => {
|
|
12069
|
-
handleConfirm(
|
|
12050
|
+
handleConfirm("proceed_once" /* ProceedOnce */, { answers });
|
|
12070
12051
|
},
|
|
12071
12052
|
onCancel: () => {
|
|
12072
|
-
handleConfirm(
|
|
12053
|
+
handleConfirm("cancel" /* Cancel */);
|
|
12073
12054
|
},
|
|
12074
12055
|
width: safeTerminalWidth,
|
|
12075
12056
|
availableHeight: bodyHeight
|
|
@@ -12090,19 +12071,19 @@ Ensure you trust all modifications made to build files before approving executio
|
|
|
12090
12071
|
planPath: confirmationDetails.planPath,
|
|
12091
12072
|
getPreferredEditor,
|
|
12092
12073
|
onApprove: (approvalMode) => {
|
|
12093
|
-
handleConfirm(
|
|
12074
|
+
handleConfirm("proceed_once" /* ProceedOnce */, {
|
|
12094
12075
|
approved: true,
|
|
12095
12076
|
approvalMode
|
|
12096
12077
|
});
|
|
12097
12078
|
},
|
|
12098
12079
|
onFeedback: (feedback) => {
|
|
12099
|
-
handleConfirm(
|
|
12080
|
+
handleConfirm("proceed_once" /* ProceedOnce */, {
|
|
12100
12081
|
approved: false,
|
|
12101
12082
|
feedback
|
|
12102
12083
|
});
|
|
12103
12084
|
},
|
|
12104
12085
|
onCancel: () => {
|
|
12105
|
-
handleConfirm(
|
|
12086
|
+
handleConfirm("cancel" /* Cancel */);
|
|
12106
12087
|
},
|
|
12107
12088
|
width: safeTerminalWidth,
|
|
12108
12089
|
availableHeight: bodyHeight
|
|
@@ -12212,7 +12193,7 @@ Ensure you trust all modifications made to build files before approving executio
|
|
|
12212
12193
|
const containsRedirection = commandsToDisplay.some(
|
|
12213
12194
|
(cmd) => hasRedirection(cmd)
|
|
12214
12195
|
);
|
|
12215
|
-
const isAutoEdit = config.getApprovalMode() ===
|
|
12196
|
+
const isAutoEdit = config.getApprovalMode() === "yolo" /* YOLO */ || config.getApprovalMode() === "autoEdit" /* AUTO_EDIT */;
|
|
12216
12197
|
let warnings = null;
|
|
12217
12198
|
if (containsRedirection && !isAutoEdit) {
|
|
12218
12199
|
const tipText = `To auto-accept, press ${formatCommand("app.cycleApprovalMode" /* CYCLE_APPROVAL_MODE */)}`;
|
|
@@ -12371,7 +12352,7 @@ Ensure you trust all modifications made to build files before approving executio
|
|
|
12371
12352
|
const bodyOverflowDirection = confirmationDetails.type === "mcp" && isMcpToolDetailsExpanded ? "bottom" : "top";
|
|
12372
12353
|
const renderRadioItem = (0, import_react35.useCallback)(
|
|
12373
12354
|
(item, { titleColor }) => {
|
|
12374
|
-
if (item.value ===
|
|
12355
|
+
if (item.value === "proceed_always_and_save" /* ProceedAlwaysAndSave */) {
|
|
12375
12356
|
return /* @__PURE__ */ (0, import_jsx_runtime64.jsxs)(Text, { color: titleColor, wrap: "truncate", children: [
|
|
12376
12357
|
item.label,
|
|
12377
12358
|
" ",
|
|
@@ -14416,7 +14397,7 @@ async function validateAuthMethodWithSettings(authType, settings) {
|
|
|
14416
14397
|
if (settings.merged.security.auth.useExternal) {
|
|
14417
14398
|
return null;
|
|
14418
14399
|
}
|
|
14419
|
-
if (authType ===
|
|
14400
|
+
if (authType === "gemini-api-key" /* USE_GEMINI */) {
|
|
14420
14401
|
return null;
|
|
14421
14402
|
}
|
|
14422
14403
|
return validateAuthMethod(authType);
|
|
@@ -14468,7 +14449,7 @@ var useAuthCommand = (settings, config, initialAuthError = null, initialAccountS
|
|
|
14468
14449
|
}
|
|
14469
14450
|
return;
|
|
14470
14451
|
}
|
|
14471
|
-
if (authType ===
|
|
14452
|
+
if (authType === "gemini-api-key" /* USE_GEMINI */) {
|
|
14472
14453
|
const key = await reloadApiKey();
|
|
14473
14454
|
if (!key) {
|
|
14474
14455
|
setAuthState("awaiting_api_key_input" /* AwaitingApiKeyInput */);
|
|
@@ -14546,31 +14527,31 @@ function AuthDialog({
|
|
|
14546
14527
|
let items = [
|
|
14547
14528
|
{
|
|
14548
14529
|
label: "Sign in with Google",
|
|
14549
|
-
value:
|
|
14550
|
-
key:
|
|
14530
|
+
value: "oauth-personal" /* LOGIN_WITH_GOOGLE */,
|
|
14531
|
+
key: "oauth-personal" /* LOGIN_WITH_GOOGLE */
|
|
14551
14532
|
},
|
|
14552
14533
|
...process.env["CLOUD_SHELL"] === "true" ? [
|
|
14553
14534
|
{
|
|
14554
14535
|
label: "Use Cloud Shell user credentials",
|
|
14555
|
-
value:
|
|
14556
|
-
key:
|
|
14536
|
+
value: "compute-default-credentials" /* COMPUTE_ADC */,
|
|
14537
|
+
key: "compute-default-credentials" /* COMPUTE_ADC */
|
|
14557
14538
|
}
|
|
14558
14539
|
] : process.env["GEMINI_CLI_USE_COMPUTE_ADC"] === "true" ? [
|
|
14559
14540
|
{
|
|
14560
14541
|
label: "Use metadata server application default credentials",
|
|
14561
|
-
value:
|
|
14562
|
-
key:
|
|
14542
|
+
value: "compute-default-credentials" /* COMPUTE_ADC */,
|
|
14543
|
+
key: "compute-default-credentials" /* COMPUTE_ADC */
|
|
14563
14544
|
}
|
|
14564
14545
|
] : [],
|
|
14565
14546
|
{
|
|
14566
14547
|
label: "Use Gemini API Key",
|
|
14567
|
-
value:
|
|
14568
|
-
key:
|
|
14548
|
+
value: "gemini-api-key" /* USE_GEMINI */,
|
|
14549
|
+
key: "gemini-api-key" /* USE_GEMINI */
|
|
14569
14550
|
},
|
|
14570
14551
|
{
|
|
14571
14552
|
label: "Vertex AI",
|
|
14572
|
-
value:
|
|
14573
|
-
key:
|
|
14553
|
+
value: "vertex-ai" /* USE_VERTEX_AI */,
|
|
14554
|
+
key: "vertex-ai" /* USE_VERTEX_AI */
|
|
14574
14555
|
}
|
|
14575
14556
|
];
|
|
14576
14557
|
if (settings.merged.security.auth.enforcedType) {
|
|
@@ -14592,9 +14573,9 @@ function AuthDialog({
|
|
|
14592
14573
|
return item.value === defaultAuthType;
|
|
14593
14574
|
}
|
|
14594
14575
|
if (process.env["GEMINI_API_KEY"]) {
|
|
14595
|
-
return item.value ===
|
|
14576
|
+
return item.value === "gemini-api-key" /* USE_GEMINI */;
|
|
14596
14577
|
}
|
|
14597
|
-
return item.value ===
|
|
14578
|
+
return item.value === "oauth-personal" /* LOGIN_WITH_GOOGLE */;
|
|
14598
14579
|
});
|
|
14599
14580
|
if (settings.merged.security.auth.enforcedType) {
|
|
14600
14581
|
initialAuthIndex = 0;
|
|
@@ -14605,20 +14586,28 @@ function AuthDialog({
|
|
|
14605
14586
|
return;
|
|
14606
14587
|
}
|
|
14607
14588
|
if (authType) {
|
|
14608
|
-
const needsRestart = authType ===
|
|
14589
|
+
const needsRestart = authType === "oauth-personal" /* LOGIN_WITH_GOOGLE */ || authType === "vertex-ai" /* USE_VERTEX_AI */ && process.env["CLOUD_SHELL"] === "true";
|
|
14609
14590
|
if (needsRestart) {
|
|
14610
14591
|
setAuthContext({ requiresRestart: true });
|
|
14611
14592
|
} else {
|
|
14612
14593
|
setAuthContext({});
|
|
14613
14594
|
}
|
|
14614
|
-
|
|
14595
|
+
const currentAuthType = settings.merged.security?.auth?.selectedType;
|
|
14596
|
+
if (currentAuthType && currentAuthType !== authType) {
|
|
14597
|
+
await clearCachedCredentialFile();
|
|
14598
|
+
}
|
|
14615
14599
|
settings.setValue(scope, "security.auth.selectedType", authType);
|
|
14616
|
-
if (authType ===
|
|
14600
|
+
if (authType === "oauth-personal" /* LOGIN_WITH_GOOGLE */ && config.isBrowserLaunchSuppressed()) {
|
|
14617
14601
|
setExiting(true);
|
|
14618
|
-
setTimeout(
|
|
14602
|
+
setTimeout(() => {
|
|
14603
|
+
void relaunchApp({ overrideAuthType: authType }).catch((err) => {
|
|
14604
|
+
debugLogger.error("Failed to trigger supervisor relaunch:", err);
|
|
14605
|
+
process.exit(1);
|
|
14606
|
+
});
|
|
14607
|
+
}, 100);
|
|
14619
14608
|
return;
|
|
14620
14609
|
}
|
|
14621
|
-
if (authType ===
|
|
14610
|
+
if (authType === "gemini-api-key" /* USE_GEMINI */) {
|
|
14622
14611
|
setAuthState("awaiting_api_key_input" /* AwaitingApiKeyInput */);
|
|
14623
14612
|
return;
|
|
14624
14613
|
}
|
|
@@ -15425,11 +15414,11 @@ var PrivacyNoticeText = ({
|
|
|
15425
15414
|
}) => {
|
|
15426
15415
|
const authType = config.getContentGeneratorConfig()?.authType;
|
|
15427
15416
|
switch (authType) {
|
|
15428
|
-
case
|
|
15417
|
+
case "gemini-api-key" /* USE_GEMINI */:
|
|
15429
15418
|
return /* @__PURE__ */ (0, import_jsx_runtime82.jsx)(GeminiPrivacyNotice, { onExit });
|
|
15430
|
-
case
|
|
15419
|
+
case "vertex-ai" /* USE_VERTEX_AI */:
|
|
15431
15420
|
return /* @__PURE__ */ (0, import_jsx_runtime82.jsx)(CloudPaidPrivacyNotice, { onExit });
|
|
15432
|
-
case
|
|
15421
|
+
case "oauth-personal" /* LOGIN_WITH_GOOGLE */:
|
|
15433
15422
|
default:
|
|
15434
15423
|
return /* @__PURE__ */ (0, import_jsx_runtime82.jsx)(CloudFreePrivacyNotice, { config, onExit });
|
|
15435
15424
|
}
|
|
@@ -15489,7 +15478,7 @@ function ProQuotaDialog({
|
|
|
15489
15478
|
value: "retry_always",
|
|
15490
15479
|
key: "retry_always"
|
|
15491
15480
|
},
|
|
15492
|
-
...authType ===
|
|
15481
|
+
...authType === "oauth-personal" /* LOGIN_WITH_GOOGLE */ && !isUltra ? [
|
|
15493
15482
|
{
|
|
15494
15483
|
label: "Upgrade for higher limits",
|
|
15495
15484
|
value: "upgrade",
|
|
@@ -16656,7 +16645,7 @@ function ModelDialog({ onClose }) {
|
|
|
16656
16645
|
const useLatestFlash = config?.hasLatestFlashGAAccess?.() ?? false;
|
|
16657
16646
|
const useLatestFlashLite = config?.hasLatestFlashLiteGAAccess?.() ?? false;
|
|
16658
16647
|
const selectedAuthType = settings.merged.security.auth.selectedType;
|
|
16659
|
-
const useCustomToolModel = useGemini31 && selectedAuthType ===
|
|
16648
|
+
const useCustomToolModel = useGemini31 && selectedAuthType === "gemini-api-key" /* USE_GEMINI */;
|
|
16660
16649
|
const manualModelSelected = (0, import_react53.useMemo)(() => {
|
|
16661
16650
|
if (config?.getExperimentalDynamicModelConfiguration?.() === true && config.getModelConfigService) {
|
|
16662
16651
|
const def = config.getModelConfigService().getModelDefinition(preferredModel);
|
|
@@ -17984,10 +17973,10 @@ function initializeConsoleStore() {
|
|
|
17984
17973
|
globalConsoleMessages = [];
|
|
17985
17974
|
globalErrorCount = 0;
|
|
17986
17975
|
notifyListeners();
|
|
17987
|
-
coreEvents.off(
|
|
17988
|
-
coreEvents.off(
|
|
17989
|
-
coreEvents.on(
|
|
17990
|
-
coreEvents.on(
|
|
17976
|
+
coreEvents.off("console-log" /* ConsoleLog */, handleConsoleLog);
|
|
17977
|
+
coreEvents.off("output" /* Output */, handleOutput);
|
|
17978
|
+
coreEvents.on("console-log" /* ConsoleLog */, handleConsoleLog);
|
|
17979
|
+
coreEvents.on("output" /* Output */, handleOutput);
|
|
17991
17980
|
}
|
|
17992
17981
|
function notifyListeners() {
|
|
17993
17982
|
for (const listener of listeners) {
|
|
@@ -20124,7 +20113,7 @@ function usePromptCompletion({
|
|
|
20124
20113
|
{ model: "prompt-completion" },
|
|
20125
20114
|
contents,
|
|
20126
20115
|
signal,
|
|
20127
|
-
|
|
20116
|
+
"utility_autocomplete" /* UTILITY_AUTOCOMPLETE */
|
|
20128
20117
|
);
|
|
20129
20118
|
if (signal.aborted) {
|
|
20130
20119
|
return;
|
|
@@ -22196,9 +22185,9 @@ var InputPrompt = ({
|
|
|
22196
22185
|
onSuggestionsVisibilityChange(shouldShowSuggestions);
|
|
22197
22186
|
}
|
|
22198
22187
|
}, [shouldShowSuggestions, onSuggestionsVisibilityChange]);
|
|
22199
|
-
const showAutoAcceptStyling = !shellModeActive && approvalMode ===
|
|
22200
|
-
const showYoloStyling = !shellModeActive && approvalMode ===
|
|
22201
|
-
const showPlanStyling = !shellModeActive && approvalMode ===
|
|
22188
|
+
const showAutoAcceptStyling = !shellModeActive && approvalMode === "autoEdit" /* AUTO_EDIT */;
|
|
22189
|
+
const showYoloStyling = !shellModeActive && approvalMode === "yolo" /* YOLO */;
|
|
22190
|
+
const showPlanStyling = !shellModeActive && approvalMode === "plan" /* PLAN */;
|
|
22202
22191
|
let statusColor;
|
|
22203
22192
|
let statusText = "";
|
|
22204
22193
|
if (shellModeActive) {
|
|
@@ -23032,22 +23021,22 @@ var ApprovalModeIndicator = ({
|
|
|
23032
23021
|
const cycleHint = formatCommand("app.cycleApprovalMode" /* CYCLE_APPROVAL_MODE */);
|
|
23033
23022
|
const yoloHint = formatCommand("app.toggleYolo" /* TOGGLE_YOLO */);
|
|
23034
23023
|
switch (approvalMode) {
|
|
23035
|
-
case
|
|
23024
|
+
case "autoEdit" /* AUTO_EDIT */:
|
|
23036
23025
|
textColor = theme.status.warning;
|
|
23037
23026
|
textContent = "auto-accept edits";
|
|
23038
23027
|
subText = allowPlanMode ? `${cycleHint} to plan` : `${cycleHint} to manual`;
|
|
23039
23028
|
break;
|
|
23040
|
-
case
|
|
23029
|
+
case "plan" /* PLAN */:
|
|
23041
23030
|
textColor = theme.status.success;
|
|
23042
23031
|
textContent = "plan";
|
|
23043
23032
|
subText = `${cycleHint} to manual`;
|
|
23044
23033
|
break;
|
|
23045
|
-
case
|
|
23034
|
+
case "yolo" /* YOLO */:
|
|
23046
23035
|
textColor = theme.status.error;
|
|
23047
23036
|
textContent = "YOLO";
|
|
23048
23037
|
subText = yoloHint;
|
|
23049
23038
|
break;
|
|
23050
|
-
case
|
|
23039
|
+
case "default" /* DEFAULT */:
|
|
23051
23040
|
default:
|
|
23052
23041
|
textColor = theme.text.accent;
|
|
23053
23042
|
textContent = "";
|
|
@@ -23095,7 +23084,7 @@ var useComposerStatus = () => {
|
|
|
23095
23084
|
(item) => item.type === "tool_group"
|
|
23096
23085
|
).some(
|
|
23097
23086
|
(item) => item.tools.some(
|
|
23098
|
-
(tool) => tool.status ===
|
|
23087
|
+
(tool) => tool.status === "awaiting_approval" /* AwaitingApproval */
|
|
23099
23088
|
)
|
|
23100
23089
|
),
|
|
23101
23090
|
[uiState.pendingHistoryItems]
|
|
@@ -23110,13 +23099,13 @@ var useComposerStatus = () => {
|
|
|
23110
23099
|
const hideMinimalModeHintWhileBusy = !uiState.cleanUiDetailsVisible && (showLoadingIndicator || uiState.activeHooks.length > 0);
|
|
23111
23100
|
if (hideMinimalModeHintWhileBusy) return null;
|
|
23112
23101
|
switch (showApprovalModeIndicator) {
|
|
23113
|
-
case
|
|
23102
|
+
case "yolo" /* YOLO */:
|
|
23114
23103
|
return { text: "YOLO", color: theme.status.error };
|
|
23115
|
-
case
|
|
23104
|
+
case "plan" /* PLAN */:
|
|
23116
23105
|
return { text: "plan", color: theme.status.success };
|
|
23117
|
-
case
|
|
23106
|
+
case "autoEdit" /* AUTO_EDIT */:
|
|
23118
23107
|
return { text: "auto edit", color: theme.status.warning };
|
|
23119
|
-
case
|
|
23108
|
+
case "default" /* DEFAULT */:
|
|
23120
23109
|
default:
|
|
23121
23110
|
return null;
|
|
23122
23111
|
}
|
|
@@ -23477,7 +23466,7 @@ var ConfigInitDisplay = ({
|
|
|
23477
23466
|
let connected = 0;
|
|
23478
23467
|
const connecting = [];
|
|
23479
23468
|
for (const [name, client] of clients.entries()) {
|
|
23480
|
-
if (client.getStatus() ===
|
|
23469
|
+
if (client.getStatus() === "connected" /* CONNECTED */) {
|
|
23481
23470
|
connected++;
|
|
23482
23471
|
} else {
|
|
23483
23472
|
connecting.push(name);
|
|
@@ -23499,9 +23488,9 @@ var ConfigInitDisplay = ({
|
|
|
23499
23488
|
);
|
|
23500
23489
|
}
|
|
23501
23490
|
};
|
|
23502
|
-
coreEvents.on(
|
|
23491
|
+
coreEvents.on("mcp-client-update" /* McpClientUpdate */, onChange);
|
|
23503
23492
|
return () => {
|
|
23504
|
-
coreEvents.off(
|
|
23493
|
+
coreEvents.off("mcp-client-update" /* McpClientUpdate */, onChange);
|
|
23505
23494
|
};
|
|
23506
23495
|
}, [initialMessage]);
|
|
23507
23496
|
return /* @__PURE__ */ (0, import_jsx_runtime122.jsx)(Box_default, { marginTop: 1, children: /* @__PURE__ */ (0, import_jsx_runtime122.jsxs)(Text, { children: [
|
|
@@ -24218,7 +24207,7 @@ var useExecutionLifecycle = (addItemToHistory, setPendingHistoryItem, onExec, on
|
|
|
24218
24207
|
callId,
|
|
24219
24208
|
name: SHELL_COMMAND_NAME,
|
|
24220
24209
|
description: rawQuery,
|
|
24221
|
-
status:
|
|
24210
|
+
status: "executing" /* Executing */,
|
|
24222
24211
|
isClientInitiated: true,
|
|
24223
24212
|
resultDisplay: "",
|
|
24224
24213
|
confirmationDetails: void 0
|
|
@@ -24359,7 +24348,7 @@ __code=$?; pwd > ${escapedPwdFilePath}; exit $__code`;
|
|
|
24359
24348
|
mainContent = result.output.trim() || "(Command produced no output)";
|
|
24360
24349
|
}
|
|
24361
24350
|
let finalOutput = result.ansiOutput && result.ansiOutput.length > 0 ? result.ansiOutput : mainContent;
|
|
24362
|
-
let finalStatus =
|
|
24351
|
+
let finalStatus = "success" /* Success */;
|
|
24363
24352
|
const prependToAnsiOutput = (output, text) => {
|
|
24364
24353
|
const newLines = text.split("\n").map((line) => [
|
|
24365
24354
|
{
|
|
@@ -24378,20 +24367,20 @@ __code=$?; pwd > ${escapedPwdFilePath}; exit $__code`;
|
|
|
24378
24367
|
};
|
|
24379
24368
|
let prefix = "";
|
|
24380
24369
|
if (result.error) {
|
|
24381
|
-
finalStatus =
|
|
24370
|
+
finalStatus = "error" /* Error */;
|
|
24382
24371
|
prefix = result.error.message;
|
|
24383
24372
|
} else if (result.aborted) {
|
|
24384
|
-
finalStatus =
|
|
24373
|
+
finalStatus = "cancelled" /* Cancelled */;
|
|
24385
24374
|
prefix = "Command was cancelled.";
|
|
24386
24375
|
} else if (result.backgrounded) {
|
|
24387
|
-
finalStatus =
|
|
24376
|
+
finalStatus = "success" /* Success */;
|
|
24388
24377
|
finalOutput = `Command moved to background (PID: ${result.pid}). Output hidden. Press Ctrl+B to view.`;
|
|
24389
24378
|
mainContent = finalOutput;
|
|
24390
24379
|
} else if (result.signal) {
|
|
24391
|
-
finalStatus =
|
|
24380
|
+
finalStatus = "error" /* Error */;
|
|
24392
24381
|
prefix = `Command terminated by signal: ${result.signal}.`;
|
|
24393
24382
|
} else if (result.exitCode !== 0) {
|
|
24394
|
-
finalStatus =
|
|
24383
|
+
finalStatus = "error" /* Error */;
|
|
24395
24384
|
prefix = `Command exited with code ${result.exitCode}.`;
|
|
24396
24385
|
}
|
|
24397
24386
|
if (prefix) {
|
|
@@ -24417,7 +24406,7 @@ ${mainContent}`;
|
|
|
24417
24406
|
status: finalStatus,
|
|
24418
24407
|
resultDisplay: finalOutput
|
|
24419
24408
|
};
|
|
24420
|
-
if (finalStatus !==
|
|
24409
|
+
if (finalStatus !== "cancelled" /* Cancelled */) {
|
|
24421
24410
|
addItemToHistory(
|
|
24422
24411
|
{
|
|
24423
24412
|
type: "tool_group",
|
|
@@ -25427,13 +25416,13 @@ function useQuotaAndFallback({
|
|
|
25427
25416
|
error.retryDelayMs ? `Access resets at ${getResetTimeMessage(error.retryDelayMs)}.` : null,
|
|
25428
25417
|
`/stats model for usage details`,
|
|
25429
25418
|
`/model to switch models.`,
|
|
25430
|
-
contentGeneratorConfig?.authType ===
|
|
25419
|
+
contentGeneratorConfig?.authType === "oauth-personal" /* LOGIN_WITH_GOOGLE */ ? `/auth to switch to API key.` : null
|
|
25431
25420
|
].filter(Boolean);
|
|
25432
25421
|
message = messageLines.join("\n");
|
|
25433
25422
|
}
|
|
25434
25423
|
} else if (error instanceof ModelNotFoundError) {
|
|
25435
25424
|
isModelNotFoundError = true;
|
|
25436
|
-
if (contentGeneratorConfig?.authType ===
|
|
25425
|
+
if (contentGeneratorConfig?.authType === "vertex-ai" /* USE_VERTEX_AI */ && VALID_GEMINI_MODELS.has(failedModel)) {
|
|
25437
25426
|
const location = process.env["GOOGLE_CLOUD_LOCATION"] || "your configured region";
|
|
25438
25427
|
const messageLines = [
|
|
25439
25428
|
`Model "${failedModel}" is not available in region "${location}".`,
|
|
@@ -25627,7 +25616,7 @@ var useEditorSettings = (loadedSettings, setEditorError, addItem) => {
|
|
|
25627
25616
|
);
|
|
25628
25617
|
setEditorError(null);
|
|
25629
25618
|
setIsEditorDialogOpen(false);
|
|
25630
|
-
coreEvents.emit(
|
|
25619
|
+
coreEvents.emit("editor-selected" /* EditorSelected */, { editor: editorType });
|
|
25631
25620
|
} catch (error) {
|
|
25632
25621
|
setEditorError(`Failed to set editor preference: ${error}`);
|
|
25633
25622
|
}
|
|
@@ -25636,7 +25625,7 @@ var useEditorSettings = (loadedSettings, setEditorError, addItem) => {
|
|
|
25636
25625
|
);
|
|
25637
25626
|
const exitEditorDialog = (0, import_react89.useCallback)(() => {
|
|
25638
25627
|
setIsEditorDialogOpen(false);
|
|
25639
|
-
coreEvents.emit(
|
|
25628
|
+
coreEvents.emit("editor-selected" /* EditorSelected */, { editor: void 0 });
|
|
25640
25629
|
}, []);
|
|
25641
25630
|
return {
|
|
25642
25631
|
isEditorDialogOpen,
|
|
@@ -26013,7 +26002,7 @@ var useSlashCommandProcessor = (config, settings, addItem, clearItems, loadHisto
|
|
|
26013
26002
|
canonicalPath: resolvedCommandPath
|
|
26014
26003
|
} = parseSlashCommand(trimmed, commands);
|
|
26015
26004
|
if (!commandToExecute) {
|
|
26016
|
-
const isMcpLoading = config?.getMcpClientManager()?.getDiscoveryState() ===
|
|
26005
|
+
const isMcpLoading = config?.getMcpClientManager()?.getDiscoveryState() === "in_progress" /* IN_PROGRESS */;
|
|
26017
26006
|
if (isMcpLoading) {
|
|
26018
26007
|
setIsProcessing(true);
|
|
26019
26008
|
if (addToHistory) {
|
|
@@ -26193,7 +26182,7 @@ var useSlashCommandProcessor = (config, settings, addItem, clearItems, loadHisto
|
|
|
26193
26182
|
onConfirm: async (resolvedOutcome) => {
|
|
26194
26183
|
resolve3({
|
|
26195
26184
|
outcome: resolvedOutcome,
|
|
26196
|
-
approvedCommands: resolvedOutcome ===
|
|
26185
|
+
approvedCommands: resolvedOutcome === "cancel" /* Cancel */ ? [] : result.commandsToConfirm
|
|
26197
26186
|
});
|
|
26198
26187
|
}
|
|
26199
26188
|
};
|
|
@@ -26201,7 +26190,7 @@ var useSlashCommandProcessor = (config, settings, addItem, clearItems, loadHisto
|
|
|
26201
26190
|
callId,
|
|
26202
26191
|
name: "Expansion",
|
|
26203
26192
|
description: "Command expansion needs shell access",
|
|
26204
|
-
status:
|
|
26193
|
+
status: "awaiting_approval" /* AwaitingApproval */,
|
|
26205
26194
|
isClientInitiated: true,
|
|
26206
26195
|
resultDisplay: void 0,
|
|
26207
26196
|
confirmationDetails
|
|
@@ -26212,7 +26201,7 @@ var useSlashCommandProcessor = (config, settings, addItem, clearItems, loadHisto
|
|
|
26212
26201
|
});
|
|
26213
26202
|
});
|
|
26214
26203
|
setPendingItem(null);
|
|
26215
|
-
if (outcome ===
|
|
26204
|
+
if (outcome === "cancel" /* Cancel */ || !approvedCommands || approvedCommands.length === 0) {
|
|
26216
26205
|
addItem(
|
|
26217
26206
|
{
|
|
26218
26207
|
type: "info" /* INFO */,
|
|
@@ -26222,7 +26211,7 @@ var useSlashCommandProcessor = (config, settings, addItem, clearItems, loadHisto
|
|
|
26222
26211
|
);
|
|
26223
26212
|
return { type: "handled" };
|
|
26224
26213
|
}
|
|
26225
|
-
if (outcome ===
|
|
26214
|
+
if (outcome === "proceed_always" /* ProceedAlways */) {
|
|
26226
26215
|
setSessionShellAllowlist(
|
|
26227
26216
|
(prev) => /* @__PURE__ */ new Set([...prev, ...approvedCommands])
|
|
26228
26217
|
);
|
|
@@ -26698,7 +26687,7 @@ function mapToDisplay(toolOrTools, options = {}) {
|
|
|
26698
26687
|
let description;
|
|
26699
26688
|
let renderOutputAsMarkdown = false;
|
|
26700
26689
|
const displayName = call.tool?.displayName ?? call.request.name;
|
|
26701
|
-
if (call.status ===
|
|
26690
|
+
if (call.status === "error" /* Error */) {
|
|
26702
26691
|
description = JSON.stringify(call.request.args);
|
|
26703
26692
|
} else {
|
|
26704
26693
|
description = call.invocation.getDescription();
|
|
@@ -26721,27 +26710,27 @@ function mapToDisplay(toolOrTools, options = {}) {
|
|
|
26721
26710
|
let progress = void 0;
|
|
26722
26711
|
let progressTotal = void 0;
|
|
26723
26712
|
switch (call.status) {
|
|
26724
|
-
case
|
|
26713
|
+
case "success" /* Success */:
|
|
26725
26714
|
resultDisplay = call.response.resultDisplay;
|
|
26726
26715
|
outputFile = call.response.outputFile;
|
|
26727
26716
|
break;
|
|
26728
|
-
case
|
|
26729
|
-
case
|
|
26717
|
+
case "error" /* Error */:
|
|
26718
|
+
case "cancelled" /* Cancelled */:
|
|
26730
26719
|
resultDisplay = call.response.resultDisplay;
|
|
26731
26720
|
break;
|
|
26732
|
-
case
|
|
26721
|
+
case "awaiting_approval" /* AwaitingApproval */:
|
|
26733
26722
|
correlationId = call.correlationId;
|
|
26734
26723
|
confirmationDetails = call.confirmationDetails;
|
|
26735
26724
|
break;
|
|
26736
|
-
case
|
|
26725
|
+
case "executing" /* Executing */:
|
|
26737
26726
|
resultDisplay = call.liveOutput;
|
|
26738
26727
|
ptyId = call.pid;
|
|
26739
26728
|
progressMessage = call.progressMessage;
|
|
26740
26729
|
progress = call.progress;
|
|
26741
26730
|
progressTotal = call.progressTotal;
|
|
26742
26731
|
break;
|
|
26743
|
-
case
|
|
26744
|
-
case
|
|
26732
|
+
case "scheduled" /* Scheduled */:
|
|
26733
|
+
case "validating" /* Validating */:
|
|
26745
26734
|
break;
|
|
26746
26735
|
default: {
|
|
26747
26736
|
const exhaustiveCheck = call;
|
|
@@ -26812,7 +26801,7 @@ function useToolScheduler(onComplete, config, getPreferredEditor) {
|
|
|
26812
26801
|
const handler = (event) => {
|
|
26813
26802
|
const isRoot = event.schedulerId === ROOT_SCHEDULER_ID;
|
|
26814
26803
|
const hasExecuting = event.toolCalls.some(
|
|
26815
|
-
(tc) => tc.status ===
|
|
26804
|
+
(tc) => tc.status === "executing" /* Executing */ || (tc.status === "success" /* Success */ || tc.status === "error" /* Error */) && "tailToolCallRequest" in tc && tc.tailToolCallRequest != null
|
|
26816
26805
|
);
|
|
26817
26806
|
if (hasExecuting) {
|
|
26818
26807
|
setLastToolOutputTime(Date.now());
|
|
@@ -26821,7 +26810,7 @@ function useToolScheduler(onComplete, config, getPreferredEditor) {
|
|
|
26821
26810
|
const prevCalls = prev[event.schedulerId] ?? [];
|
|
26822
26811
|
const prevCallIds = new Set(prevCalls.map((tc) => tc.request.callId));
|
|
26823
26812
|
const filteredToolCalls = isRoot ? event.toolCalls : event.toolCalls.filter(
|
|
26824
|
-
(tc) => tc.status ===
|
|
26813
|
+
(tc) => tc.status === "awaiting_approval" /* AwaitingApproval */ || prevCallIds.has(tc.request.callId)
|
|
26825
26814
|
);
|
|
26826
26815
|
if (!isRoot && filteredToolCalls.length === 0 && prevCalls.length === 0) {
|
|
26827
26816
|
return prev;
|
|
@@ -26833,9 +26822,9 @@ function useToolScheduler(onComplete, config, getPreferredEditor) {
|
|
|
26833
26822
|
};
|
|
26834
26823
|
});
|
|
26835
26824
|
};
|
|
26836
|
-
messageBus.subscribe(
|
|
26825
|
+
messageBus.subscribe("tool-calls-update" /* TOOL_CALLS_UPDATE */, handler);
|
|
26837
26826
|
return () => {
|
|
26838
|
-
messageBus.unsubscribe(
|
|
26827
|
+
messageBus.unsubscribe("tool-calls-update" /* TOOL_CALLS_UPDATE */, handler);
|
|
26839
26828
|
};
|
|
26840
26829
|
}, [messageBus, internalAdaptToolCalls]);
|
|
26841
26830
|
(0, import_react96.useEffect)(() => {
|
|
@@ -26857,9 +26846,9 @@ function useToolScheduler(onComplete, config, getPreferredEditor) {
|
|
|
26857
26846
|
};
|
|
26858
26847
|
});
|
|
26859
26848
|
};
|
|
26860
|
-
messageBus.subscribe(
|
|
26849
|
+
messageBus.subscribe("subagent-activity" /* SUBAGENT_ACTIVITY */, handler);
|
|
26861
26850
|
return () => {
|
|
26862
|
-
messageBus.unsubscribe(
|
|
26851
|
+
messageBus.unsubscribe("subagent-activity" /* SUBAGENT_ACTIVITY */, handler);
|
|
26863
26852
|
};
|
|
26864
26853
|
}, [messageBus]);
|
|
26865
26854
|
const schedule = (0, import_react96.useCallback)(
|
|
@@ -26958,8 +26947,8 @@ function adaptToolCalls(coreCalls, prevTracked) {
|
|
|
26958
26947
|
const prev = prevMap.get(coreCall.request.callId);
|
|
26959
26948
|
const responseSubmittedToGemini = prev?.responseSubmittedToGemini ?? false;
|
|
26960
26949
|
let status = coreCall.status;
|
|
26961
|
-
if ((status ===
|
|
26962
|
-
status =
|
|
26950
|
+
if ((status === "success" /* Success */ || status === "error" /* Error */) && "tailToolCallRequest" in coreCall && coreCall.tailToolCallRequest != null) {
|
|
26951
|
+
status = "executing" /* Executing */;
|
|
26963
26952
|
}
|
|
26964
26953
|
return {
|
|
26965
26954
|
...coreCall,
|
|
@@ -26991,7 +26980,7 @@ function getBackgroundedToolInfo(toolCall) {
|
|
|
26991
26980
|
};
|
|
26992
26981
|
}
|
|
26993
26982
|
function isBackgroundableExecutingToolCall(toolCall) {
|
|
26994
|
-
return toolCall.status ===
|
|
26983
|
+
return toolCall.status === "executing" /* Executing */ && typeof toolCall.pid === "number";
|
|
26995
26984
|
}
|
|
26996
26985
|
function showCitations(settings) {
|
|
26997
26986
|
const enabled = settings.merged.ui.showCitations;
|
|
@@ -27001,14 +26990,14 @@ function showCitations(settings) {
|
|
|
27001
26990
|
return true;
|
|
27002
26991
|
}
|
|
27003
26992
|
function calculateStreamingState(isResponding, toolCalls) {
|
|
27004
|
-
if (toolCalls.some((tc) => tc.status ===
|
|
26993
|
+
if (toolCalls.some((tc) => tc.status === "awaiting_approval" /* AwaitingApproval */)) {
|
|
27005
26994
|
return "waiting_for_confirmation" /* WaitingForConfirmation */;
|
|
27006
26995
|
}
|
|
27007
26996
|
const isAnyToolActive = toolCalls.some((tc) => {
|
|
27008
|
-
if (tc.status ===
|
|
26997
|
+
if (tc.status === "executing" /* Executing */ || tc.status === "scheduled" /* Scheduled */ || tc.status === "validating" /* Validating */) {
|
|
27009
26998
|
return true;
|
|
27010
26999
|
}
|
|
27011
|
-
if (tc.status ===
|
|
27000
|
+
if (tc.status === "success" /* Success */ || tc.status === "error" /* Error */ || tc.status === "cancelled" /* Cancelled */) {
|
|
27012
27001
|
return !tc.responseSubmittedToGemini;
|
|
27013
27002
|
}
|
|
27014
27003
|
return false;
|
|
@@ -27055,9 +27044,9 @@ var useGeminiStream = (geminiClient, history, addItem, config, settings, onDebug
|
|
|
27055
27044
|
}
|
|
27056
27045
|
setRetryStatus(payload);
|
|
27057
27046
|
};
|
|
27058
|
-
coreEvents.on(
|
|
27047
|
+
coreEvents.on("retry-attempt" /* RetryAttempt */, handleRetryAttempt);
|
|
27059
27048
|
return () => {
|
|
27060
|
-
coreEvents.off(
|
|
27049
|
+
coreEvents.off("retry-attempt" /* RetryAttempt */, handleRetryAttempt);
|
|
27061
27050
|
};
|
|
27062
27051
|
}, [isRespondingRef]);
|
|
27063
27052
|
const [
|
|
@@ -27190,12 +27179,12 @@ var useGeminiStream = (geminiClient, history, addItem, config, settings, onDebug
|
|
|
27190
27179
|
const tc = toolCalls[i];
|
|
27191
27180
|
if (pushedToolCallIdsRef.current.has(tc.request.callId)) continue;
|
|
27192
27181
|
if (tc.status === "success" || tc.status === "error" || tc.status === "cancelled") {
|
|
27193
|
-
const isAgent = tc.tool?.kind ===
|
|
27182
|
+
const isAgent = tc.tool?.kind === "agent" /* Agent */;
|
|
27194
27183
|
if (isAgent) {
|
|
27195
27184
|
let contigAgentsComplete = true;
|
|
27196
27185
|
for (let j = i + 1; j < toolCalls.length; j++) {
|
|
27197
27186
|
const nextTc = toolCalls[j];
|
|
27198
|
-
if (nextTc.tool?.kind ===
|
|
27187
|
+
if (nextTc.tool?.kind === "agent" /* Agent */) {
|
|
27199
27188
|
if (nextTc.status !== "success" && nextTc.status !== "error" && nextTc.status !== "cancelled") {
|
|
27200
27189
|
contigAgentsComplete = false;
|
|
27201
27190
|
break;
|
|
@@ -27221,7 +27210,7 @@ var useGeminiStream = (geminiClient, history, addItem, config, settings, onDebug
|
|
|
27221
27210
|
let currentGroup = [];
|
|
27222
27211
|
for (const tc of toolsToPush) {
|
|
27223
27212
|
newPushed.add(tc.request.callId);
|
|
27224
|
-
if (tc.tool?.kind ===
|
|
27213
|
+
if (tc.tool?.kind === "agent" /* Agent */) {
|
|
27225
27214
|
currentGroup.push(tc);
|
|
27226
27215
|
} else {
|
|
27227
27216
|
if (currentGroup.length > 0) {
|
|
@@ -27374,7 +27363,7 @@ var useGeminiStream = (geminiClient, history, addItem, config, settings, onDebug
|
|
|
27374
27363
|
prevActiveShellPtyIdRef.current = activeShellPtyId;
|
|
27375
27364
|
}, [activeShellPtyId, addItem, setIsResponding]);
|
|
27376
27365
|
(0, import_react97.useEffect)(() => {
|
|
27377
|
-
if (config.getApprovalMode() ===
|
|
27366
|
+
if (config.getApprovalMode() === "yolo" /* YOLO */ && streamingState === "idle" /* Idle */) {
|
|
27378
27367
|
const lastUserMessageIndex = history.findLastIndex(
|
|
27379
27368
|
(item) => item.type === "user" /* USER */
|
|
27380
27369
|
);
|
|
@@ -27442,7 +27431,7 @@ var useGeminiStream = (geminiClient, history, addItem, config, settings, onDebug
|
|
|
27442
27431
|
return;
|
|
27443
27432
|
}
|
|
27444
27433
|
const hasActiveTools = toolCalls.some(
|
|
27445
|
-
(tc) => tc.status ===
|
|
27434
|
+
(tc) => tc.status === "executing" /* Executing */ || tc.status === "scheduled" /* Scheduled */ || tc.status === "validating" /* Validating */
|
|
27446
27435
|
);
|
|
27447
27436
|
if (streamingState === "idle" /* Idle */ && !isRespondingRef.current && !hasActiveTools) {
|
|
27448
27437
|
if (clearBuffer) {
|
|
@@ -27469,7 +27458,7 @@ var useGeminiStream = (geminiClient, history, addItem, config, settings, onDebug
|
|
|
27469
27458
|
if (tool.name === SHELL_COMMAND_NAME) {
|
|
27470
27459
|
return {
|
|
27471
27460
|
...tool,
|
|
27472
|
-
status:
|
|
27461
|
+
status: "cancelled" /* Cancelled */,
|
|
27473
27462
|
resultDisplay: tool.resultDisplay
|
|
27474
27463
|
};
|
|
27475
27464
|
}
|
|
@@ -27534,7 +27523,7 @@ var useGeminiStream = (geminiClient, history, addItem, config, settings, onDebug
|
|
|
27534
27523
|
let localQueryToSendToGemini = null;
|
|
27535
27524
|
if (typeof query === "string") {
|
|
27536
27525
|
const trimmedQuery = query.trim();
|
|
27537
|
-
await logger?.logMessage(
|
|
27526
|
+
await logger?.logMessage("user" /* USER */, trimmedQuery);
|
|
27538
27527
|
if (!shellModeActive) {
|
|
27539
27528
|
const slashCommandResult = isSlashCommand(trimmedQuery) ? await handleSlashCommand(trimmedQuery) : false;
|
|
27540
27529
|
if (slashCommandResult) {
|
|
@@ -27690,7 +27679,7 @@ var useGeminiStream = (geminiClient, history, addItem, config, settings, onDebug
|
|
|
27690
27679
|
if (pendingHistoryItemRef.current) {
|
|
27691
27680
|
if (pendingHistoryItemRef.current.type === "tool_group") {
|
|
27692
27681
|
const updatedTools = pendingHistoryItemRef.current.tools.map(
|
|
27693
|
-
(tool) => tool.status ===
|
|
27682
|
+
(tool) => tool.status === "validating" /* Validating */ || tool.status === "scheduled" /* Scheduled */ || tool.status === "awaiting_approval" /* AwaitingApproval */ || tool.status === "executing" /* Executing */ ? { ...tool, status: "cancelled" /* Cancelled */ } : tool
|
|
27694
27683
|
);
|
|
27695
27684
|
const pendingItem = {
|
|
27696
27685
|
...pendingHistoryItemRef.current,
|
|
@@ -27982,15 +27971,15 @@ var useGeminiStream = (geminiClient, history, addItem, config, settings, onDebug
|
|
|
27982
27971
|
let geminiMessageBuffer = "";
|
|
27983
27972
|
const toolCallRequests = [];
|
|
27984
27973
|
for await (const event of stream) {
|
|
27985
|
-
if (event.type !==
|
|
27974
|
+
if (event.type !== "thought" /* Thought */ && thoughtRef.current !== null) {
|
|
27986
27975
|
setThought(null);
|
|
27987
27976
|
}
|
|
27988
27977
|
switch (event.type) {
|
|
27989
|
-
case
|
|
27978
|
+
case "thought" /* Thought */:
|
|
27990
27979
|
setLastGeminiActivityTime(Date.now());
|
|
27991
27980
|
handleThoughtEvent(event.value, userMessageTimestamp);
|
|
27992
27981
|
break;
|
|
27993
|
-
case
|
|
27982
|
+
case "content" /* Content */:
|
|
27994
27983
|
setLastGeminiActivityTime(Date.now());
|
|
27995
27984
|
geminiMessageBuffer = handleContentEvent(
|
|
27996
27985
|
event.value,
|
|
@@ -27998,16 +27987,16 @@ var useGeminiStream = (geminiClient, history, addItem, config, settings, onDebug
|
|
|
27998
27987
|
userMessageTimestamp
|
|
27999
27988
|
);
|
|
28000
27989
|
break;
|
|
28001
|
-
case
|
|
27990
|
+
case "tool_call_request" /* ToolCallRequest */:
|
|
28002
27991
|
toolCallRequests.push(event.value);
|
|
28003
27992
|
break;
|
|
28004
|
-
case
|
|
27993
|
+
case "user_cancelled" /* UserCancelled */:
|
|
28005
27994
|
handleUserCancelledEvent(userMessageTimestamp);
|
|
28006
27995
|
break;
|
|
28007
|
-
case
|
|
27996
|
+
case "error" /* Error */:
|
|
28008
27997
|
handleErrorEvent(event.value, userMessageTimestamp);
|
|
28009
27998
|
break;
|
|
28010
|
-
case
|
|
27999
|
+
case "agent_execution_stopped" /* AgentExecutionStopped */:
|
|
28011
28000
|
handleAgentExecutionStoppedEvent(
|
|
28012
28001
|
event.value.reason,
|
|
28013
28002
|
userMessageTimestamp,
|
|
@@ -28015,7 +28004,7 @@ var useGeminiStream = (geminiClient, history, addItem, config, settings, onDebug
|
|
|
28015
28004
|
event.value.contextCleared
|
|
28016
28005
|
);
|
|
28017
28006
|
break;
|
|
28018
|
-
case
|
|
28007
|
+
case "agent_execution_blocked" /* AgentExecutionBlocked */:
|
|
28019
28008
|
handleAgentExecutionBlockedEvent(
|
|
28020
28009
|
event.value.reason,
|
|
28021
28010
|
userMessageTimestamp,
|
|
@@ -28023,36 +28012,36 @@ var useGeminiStream = (geminiClient, history, addItem, config, settings, onDebug
|
|
|
28023
28012
|
event.value.contextCleared
|
|
28024
28013
|
);
|
|
28025
28014
|
break;
|
|
28026
|
-
case
|
|
28015
|
+
case "chat_compressed" /* ChatCompressed */:
|
|
28027
28016
|
handleChatCompressionEvent(event.value, userMessageTimestamp);
|
|
28028
28017
|
break;
|
|
28029
|
-
case
|
|
28030
|
-
case
|
|
28018
|
+
case "tool_call_confirmation" /* ToolCallConfirmation */:
|
|
28019
|
+
case "tool_call_response" /* ToolCallResponse */:
|
|
28031
28020
|
break;
|
|
28032
|
-
case
|
|
28021
|
+
case "max_session_turns" /* MaxSessionTurns */:
|
|
28033
28022
|
handleMaxSessionTurnsEvent();
|
|
28034
28023
|
break;
|
|
28035
|
-
case
|
|
28024
|
+
case "context_window_will_overflow" /* ContextWindowWillOverflow */:
|
|
28036
28025
|
handleContextWindowWillOverflowEvent(
|
|
28037
28026
|
event.value.estimatedRequestTokenCount,
|
|
28038
28027
|
event.value.remainingTokenCount
|
|
28039
28028
|
);
|
|
28040
28029
|
break;
|
|
28041
|
-
case
|
|
28030
|
+
case "finished" /* Finished */:
|
|
28042
28031
|
handleFinishedEvent(event, userMessageTimestamp);
|
|
28043
28032
|
break;
|
|
28044
|
-
case
|
|
28033
|
+
case "citation" /* Citation */:
|
|
28045
28034
|
handleCitationEvent(event.value, userMessageTimestamp);
|
|
28046
28035
|
break;
|
|
28047
|
-
case
|
|
28036
|
+
case "model_info" /* ModelInfo */:
|
|
28048
28037
|
handleChatModelEvent(event.value, userMessageTimestamp);
|
|
28049
28038
|
break;
|
|
28050
|
-
case
|
|
28039
|
+
case "loop_detected" /* LoopDetected */:
|
|
28051
28040
|
loopDetectedRef.current = true;
|
|
28052
28041
|
break;
|
|
28053
|
-
case
|
|
28042
|
+
case "retry" /* Retry */:
|
|
28054
28043
|
break;
|
|
28055
|
-
case
|
|
28044
|
+
case "invalid_stream" /* InvalidStream */:
|
|
28056
28045
|
handleInvalidStreamEvent(event.value, userMessageTimestamp);
|
|
28057
28046
|
break;
|
|
28058
28047
|
default: {
|
|
@@ -28106,7 +28095,7 @@ var useGeminiStream = (geminiClient, history, addItem, config, settings, onDebug
|
|
|
28106
28095
|
const submitQuery = (0, import_react97.useCallback)(
|
|
28107
28096
|
async (query, options, prompt_id) => runInDevTraceSpan(
|
|
28108
28097
|
{
|
|
28109
|
-
operation: options?.isContinuation ?
|
|
28098
|
+
operation: options?.isContinuation ? "system_prompt" /* SystemPrompt */ : "user_prompt" /* UserPrompt */,
|
|
28110
28099
|
sessionId: config.getSessionId()
|
|
28111
28100
|
},
|
|
28112
28101
|
async ({ metadata: spanMetadata }) => {
|
|
@@ -28273,7 +28262,7 @@ var useGeminiStream = (geminiClient, history, addItem, config, settings, onDebug
|
|
|
28273
28262
|
submitQueryRef.current = submitQuery;
|
|
28274
28263
|
const handleApprovalModeChange = (0, import_react97.useCallback)(
|
|
28275
28264
|
async (newApprovalMode) => {
|
|
28276
|
-
if (previousApprovalModeRef.current ===
|
|
28265
|
+
if (previousApprovalModeRef.current === "plan" /* PLAN */ && newApprovalMode !== "plan" /* PLAN */ && streamingState === "idle" /* Idle */) {
|
|
28277
28266
|
if (geminiClient) {
|
|
28278
28267
|
try {
|
|
28279
28268
|
await geminiClient.addHistory({
|
|
@@ -28296,11 +28285,11 @@ var useGeminiStream = (geminiClient, history, addItem, config, settings, onDebug
|
|
|
28296
28285
|
}
|
|
28297
28286
|
}
|
|
28298
28287
|
previousApprovalModeRef.current = newApprovalMode;
|
|
28299
|
-
if (newApprovalMode ===
|
|
28288
|
+
if (newApprovalMode === "yolo" /* YOLO */ || newApprovalMode === "autoEdit" /* AUTO_EDIT */) {
|
|
28300
28289
|
let awaitingApprovalCalls = toolCalls.filter(
|
|
28301
28290
|
(call) => call.status === "awaiting_approval" && !call.request.forcedAsk
|
|
28302
28291
|
);
|
|
28303
|
-
if (newApprovalMode ===
|
|
28292
|
+
if (newApprovalMode === "autoEdit" /* AUTO_EDIT */) {
|
|
28304
28293
|
awaitingApprovalCalls = awaitingApprovalCalls.filter((call) => {
|
|
28305
28294
|
if (EDIT_TOOL_NAMES.has(call.request.name)) {
|
|
28306
28295
|
return true;
|
|
@@ -28316,11 +28305,11 @@ var useGeminiStream = (geminiClient, history, addItem, config, settings, onDebug
|
|
|
28316
28305
|
if (call.correlationId) {
|
|
28317
28306
|
try {
|
|
28318
28307
|
await config.getMessageBus().publish({
|
|
28319
|
-
type:
|
|
28308
|
+
type: "tool-confirmation-response" /* TOOL_CONFIRMATION_RESPONSE */,
|
|
28320
28309
|
correlationId: call.correlationId,
|
|
28321
28310
|
confirmed: true,
|
|
28322
28311
|
requiresUserConfirmation: false,
|
|
28323
|
-
outcome:
|
|
28312
|
+
outcome: "proceed_once" /* ProceedOnce */
|
|
28324
28313
|
});
|
|
28325
28314
|
} catch (error) {
|
|
28326
28315
|
debugLogger.warn(
|
|
@@ -28411,14 +28400,14 @@ var useGeminiStream = (geminiClient, history, addItem, config, settings, onDebug
|
|
|
28411
28400
|
);
|
|
28412
28401
|
if (isLowErrorVerbosity) {
|
|
28413
28402
|
suppressedToolErrorCountRef.current += geminiTools.filter(
|
|
28414
|
-
(tc) => tc.status ===
|
|
28403
|
+
(tc) => tc.status === "error" /* Error */
|
|
28415
28404
|
).length;
|
|
28416
28405
|
}
|
|
28417
28406
|
if (geminiTools.length === 0) {
|
|
28418
28407
|
return;
|
|
28419
28408
|
}
|
|
28420
28409
|
const stopExecutionTool = geminiTools.find(
|
|
28421
|
-
(tc) => tc.response.errorType ===
|
|
28410
|
+
(tc) => tc.response.errorType === "stop_execution" /* STOP_EXECUTION */
|
|
28422
28411
|
);
|
|
28423
28412
|
if (stopExecutionTool && stopExecutionTool.response.error) {
|
|
28424
28413
|
maybeAddSuppressedToolErrorNote();
|
|
@@ -28438,9 +28427,9 @@ var useGeminiStream = (geminiClient, history, addItem, config, settings, onDebug
|
|
|
28438
28427
|
(tc) => !isTopicTool2(tc.request.name)
|
|
28439
28428
|
);
|
|
28440
28429
|
const allDeclinableToolsCancelled = declinableTools.length > 0 && declinableTools.every(
|
|
28441
|
-
(tc) => tc.status ===
|
|
28430
|
+
(tc) => tc.status === "cancelled" /* Cancelled */
|
|
28442
28431
|
);
|
|
28443
|
-
const allToolsCancelled = geminiTools.length > 0 && geminiTools.every((tc) => tc.status ===
|
|
28432
|
+
const allToolsCancelled = geminiTools.length > 0 && geminiTools.every((tc) => tc.status === "cancelled" /* Cancelled */);
|
|
28444
28433
|
if (allDeclinableToolsCancelled || allToolsCancelled) {
|
|
28445
28434
|
if (!turnCancelledRef.current) {
|
|
28446
28435
|
addItem({
|
|
@@ -28526,7 +28515,7 @@ var useGeminiStream = (geminiClient, history, addItem, config, settings, onDebug
|
|
|
28526
28515
|
return;
|
|
28527
28516
|
}
|
|
28528
28517
|
const restorableToolCalls = toolCalls.filter(
|
|
28529
|
-
(toolCall) => EDIT_TOOL_NAMES.has(toolCall.request.name) && toolCall.status ===
|
|
28518
|
+
(toolCall) => EDIT_TOOL_NAMES.has(toolCall.request.name) && toolCall.status === "awaiting_approval" /* AwaitingApproval */
|
|
28530
28519
|
);
|
|
28531
28520
|
if (restorableToolCalls.length > 0) {
|
|
28532
28521
|
if (!gitService) {
|
|
@@ -28749,14 +28738,14 @@ var useAgentStream = ({
|
|
|
28749
28738
|
const displayName = legacyState?.displayName ?? event.name;
|
|
28750
28739
|
const isOutputMarkdown = legacyState?.isOutputMarkdown ?? false;
|
|
28751
28740
|
const desc = legacyState?.description ?? "";
|
|
28752
|
-
const fallbackKind =
|
|
28741
|
+
const fallbackKind = "other" /* Other */;
|
|
28753
28742
|
const newCall = {
|
|
28754
28743
|
callId: event.requestId,
|
|
28755
28744
|
name: displayName,
|
|
28756
28745
|
originalRequestName: event.name,
|
|
28757
28746
|
description: desc,
|
|
28758
28747
|
display: event.display,
|
|
28759
|
-
status:
|
|
28748
|
+
status: "scheduled" /* Scheduled */,
|
|
28760
28749
|
isClientInitiated: false,
|
|
28761
28750
|
renderOutputAsMarkdown: isOutputMarkdown,
|
|
28762
28751
|
kind: legacyState?.kind ?? fallbackKind,
|
|
@@ -28774,10 +28763,10 @@ var useAgentStream = ({
|
|
|
28774
28763
|
const evtStatus = legacyState?.status;
|
|
28775
28764
|
let status = tc.status;
|
|
28776
28765
|
if (evtStatus === "executing")
|
|
28777
|
-
status =
|
|
28778
|
-
else if (evtStatus === "error") status =
|
|
28766
|
+
status = "executing" /* Executing */;
|
|
28767
|
+
else if (evtStatus === "error") status = "error" /* Error */;
|
|
28779
28768
|
else if (evtStatus === "success")
|
|
28780
|
-
status =
|
|
28769
|
+
status = "success" /* Success */;
|
|
28781
28770
|
const display = event.display?.result;
|
|
28782
28771
|
const liveOutput = displayContentToString(display) ?? tc.resultDisplay;
|
|
28783
28772
|
const progressMessage = legacyState?.progressMessage ?? tc.progressMessage;
|
|
@@ -28810,7 +28799,7 @@ var useAgentStream = ({
|
|
|
28810
28799
|
const resultDisplay = displayContentToString(display) ?? tc.resultDisplay;
|
|
28811
28800
|
return {
|
|
28812
28801
|
...tc,
|
|
28813
|
-
status: event.isError ?
|
|
28802
|
+
status: event.isError ? "error" /* Error */ : "success" /* Success */,
|
|
28814
28803
|
display: event.display ? { ...tc.display, ...event.display } : tc.display,
|
|
28815
28804
|
resultDisplay,
|
|
28816
28805
|
outputFile
|
|
@@ -28876,7 +28865,7 @@ var useAgentStream = ({
|
|
|
28876
28865
|
if (!options?.isContinuation) {
|
|
28877
28866
|
if (typeof query === "string") {
|
|
28878
28867
|
addItem({ type: "user" /* USER */, text: query }, timestamp);
|
|
28879
|
-
void logger?.logMessage(
|
|
28868
|
+
void logger?.logMessage("user" /* USER */, query);
|
|
28880
28869
|
}
|
|
28881
28870
|
startNewPrompt();
|
|
28882
28871
|
}
|
|
@@ -30404,9 +30393,9 @@ var useFolderTrust = (settings, onTrustChange, addItem) => {
|
|
|
30404
30393
|
const handleFolderTrustSelect = (0, import_react103.useCallback)(
|
|
30405
30394
|
async (choice) => {
|
|
30406
30395
|
const trustLevelMap = {
|
|
30407
|
-
["trust_folder" /* TRUST_FOLDER */]:
|
|
30408
|
-
["trust_parent" /* TRUST_PARENT */]:
|
|
30409
|
-
["do_not_trust" /* DO_NOT_TRUST */]:
|
|
30396
|
+
["trust_folder" /* TRUST_FOLDER */]: "TRUST_FOLDER" /* TRUST_FOLDER */,
|
|
30397
|
+
["trust_parent" /* TRUST_PARENT */]: "TRUST_PARENT" /* TRUST_PARENT */,
|
|
30398
|
+
["do_not_trust" /* DO_NOT_TRUST */]: "DO_NOT_TRUST" /* DO_NOT_TRUST */
|
|
30410
30399
|
};
|
|
30411
30400
|
const trustLevel = trustLevelMap[choice];
|
|
30412
30401
|
if (!trustLevel) return;
|
|
@@ -30425,7 +30414,7 @@ var useFolderTrust = (settings, onTrustChange, addItem) => {
|
|
|
30425
30414
|
}, 100);
|
|
30426
30415
|
return;
|
|
30427
30416
|
}
|
|
30428
|
-
const currentIsTrusted = trustLevel ===
|
|
30417
|
+
const currentIsTrusted = trustLevel === "TRUST_FOLDER" /* TRUST_FOLDER */ || trustLevel === "TRUST_PARENT" /* TRUST_PARENT */;
|
|
30429
30418
|
onTrustChange(currentIsTrusted);
|
|
30430
30419
|
setIsTrusted(currentIsTrusted);
|
|
30431
30420
|
const wasTrusted = isTrusted ?? false;
|
|
@@ -31433,7 +31422,7 @@ function useMessageQueue({
|
|
|
31433
31422
|
var import_react105 = __toESM(require_react(), 1);
|
|
31434
31423
|
function useMcpStatus(config) {
|
|
31435
31424
|
const [discoveryState, setDiscoveryState] = (0, import_react105.useState)(
|
|
31436
|
-
() => config.getMcpClientManager()?.getDiscoveryState() ??
|
|
31425
|
+
() => config.getMcpClientManager()?.getDiscoveryState() ?? "not_started" /* NOT_STARTED */
|
|
31437
31426
|
);
|
|
31438
31427
|
const [mcpServerCount, setMcpServerCount] = (0, import_react105.useState)(
|
|
31439
31428
|
() => config.getMcpClientManager()?.getMcpServerCount() ?? 0
|
|
@@ -31446,12 +31435,12 @@ function useMcpStatus(config) {
|
|
|
31446
31435
|
setMcpServerCount(manager.getMcpServerCount());
|
|
31447
31436
|
}
|
|
31448
31437
|
};
|
|
31449
|
-
coreEvents.on(
|
|
31438
|
+
coreEvents.on("mcp-client-update" /* McpClientUpdate */, onChange);
|
|
31450
31439
|
return () => {
|
|
31451
|
-
coreEvents.off(
|
|
31440
|
+
coreEvents.off("mcp-client-update" /* McpClientUpdate */, onChange);
|
|
31452
31441
|
};
|
|
31453
31442
|
}, [config]);
|
|
31454
|
-
const isMcpReady = discoveryState ===
|
|
31443
|
+
const isMcpReady = discoveryState === "completed" /* COMPLETED */ || discoveryState === "not_started" /* NOT_STARTED */ && mcpServerCount === 0;
|
|
31455
31444
|
return {
|
|
31456
31445
|
discoveryState,
|
|
31457
31446
|
mcpServerCount,
|
|
@@ -31478,7 +31467,7 @@ function useApprovalModeIndicator({
|
|
|
31478
31467
|
(key) => {
|
|
31479
31468
|
let nextApprovalMode;
|
|
31480
31469
|
if (keyMatchers["app.toggleYolo" /* TOGGLE_YOLO */](key)) {
|
|
31481
|
-
if (config.isYoloModeDisabled() && config.getApprovalMode() !==
|
|
31470
|
+
if (config.isYoloModeDisabled() && config.getApprovalMode() !== "yolo" /* YOLO */) {
|
|
31482
31471
|
if (addItem) {
|
|
31483
31472
|
let text = "You cannot enter YOLO mode since it is disabled in your settings.";
|
|
31484
31473
|
const adminSettings = config.getRemoteAdminSettings();
|
|
@@ -31496,21 +31485,21 @@ function useApprovalModeIndicator({
|
|
|
31496
31485
|
}
|
|
31497
31486
|
return;
|
|
31498
31487
|
}
|
|
31499
|
-
nextApprovalMode = config.getApprovalMode() ===
|
|
31488
|
+
nextApprovalMode = config.getApprovalMode() === "yolo" /* YOLO */ ? "default" /* DEFAULT */ : "yolo" /* YOLO */;
|
|
31500
31489
|
} else if (keyMatchers["app.cycleApprovalMode" /* CYCLE_APPROVAL_MODE */](key)) {
|
|
31501
31490
|
const currentMode = config.getApprovalMode();
|
|
31502
31491
|
switch (currentMode) {
|
|
31503
|
-
case
|
|
31504
|
-
nextApprovalMode =
|
|
31492
|
+
case "default" /* DEFAULT */:
|
|
31493
|
+
nextApprovalMode = "autoEdit" /* AUTO_EDIT */;
|
|
31505
31494
|
break;
|
|
31506
|
-
case
|
|
31507
|
-
nextApprovalMode = allowPlanMode ?
|
|
31495
|
+
case "autoEdit" /* AUTO_EDIT */:
|
|
31496
|
+
nextApprovalMode = allowPlanMode ? "plan" /* PLAN */ : "default" /* DEFAULT */;
|
|
31508
31497
|
break;
|
|
31509
|
-
case
|
|
31510
|
-
nextApprovalMode =
|
|
31498
|
+
case "plan" /* PLAN */:
|
|
31499
|
+
nextApprovalMode = "default" /* DEFAULT */;
|
|
31511
31500
|
break;
|
|
31512
|
-
case
|
|
31513
|
-
nextApprovalMode =
|
|
31501
|
+
case "yolo" /* YOLO */:
|
|
31502
|
+
nextApprovalMode = "autoEdit" /* AUTO_EDIT */;
|
|
31514
31503
|
break;
|
|
31515
31504
|
default:
|
|
31516
31505
|
}
|
|
@@ -31920,11 +31909,11 @@ var useHookDisplayState = () => {
|
|
|
31920
31909
|
removeHook();
|
|
31921
31910
|
}
|
|
31922
31911
|
};
|
|
31923
|
-
coreEvents.on(
|
|
31924
|
-
coreEvents.on(
|
|
31912
|
+
coreEvents.on("hook-start" /* HookStart */, handleHookStart);
|
|
31913
|
+
coreEvents.on("hook-end" /* HookEnd */, handleHookEnd);
|
|
31925
31914
|
return () => {
|
|
31926
|
-
coreEvents.off(
|
|
31927
|
-
coreEvents.off(
|
|
31915
|
+
coreEvents.off("hook-start" /* HookStart */, handleHookStart);
|
|
31916
|
+
coreEvents.off("hook-end" /* HookEnd */, handleHookEnd);
|
|
31928
31917
|
activeTimeouts.forEach(clearTimeout);
|
|
31929
31918
|
activeTimeouts.clear();
|
|
31930
31919
|
};
|
|
@@ -32763,7 +32752,7 @@ var AppContainer = (props) => {
|
|
|
32763
32752
|
setConfigInitialized(true);
|
|
32764
32753
|
startupProfiler.flush(config);
|
|
32765
32754
|
startAutoMemoryIfEnabled(config);
|
|
32766
|
-
const sessionStartSource = resumedSessionData ?
|
|
32755
|
+
const sessionStartSource = resumedSessionData ? "resume" /* Resume */ : "startup" /* Startup */;
|
|
32767
32756
|
const result = await config.getHookSystem()?.fireSessionStartEvent(sessionStartSource);
|
|
32768
32757
|
if (result) {
|
|
32769
32758
|
const additionalContext = result.getAdditionalContext();
|
|
@@ -32790,7 +32779,7 @@ var AppContainer = (props) => {
|
|
|
32790
32779
|
);
|
|
32791
32780
|
const ideClient = await IdeClient.getInstance();
|
|
32792
32781
|
await ideClient.disconnect();
|
|
32793
|
-
await config?.getHookSystem()?.fireSessionEndEvent(
|
|
32782
|
+
await config?.getHookSystem()?.fireSessionEndEvent("exit" /* Exit */);
|
|
32794
32783
|
};
|
|
32795
32784
|
registerCleanup(cleanupFn);
|
|
32796
32785
|
return () => {
|
|
@@ -32815,11 +32804,11 @@ var AppContainer = (props) => {
|
|
|
32815
32804
|
resetTime: payload.resetTime
|
|
32816
32805
|
});
|
|
32817
32806
|
};
|
|
32818
|
-
coreEvents.on(
|
|
32819
|
-
coreEvents.on(
|
|
32807
|
+
coreEvents.on("model-changed" /* ModelChanged */, handleModelChanged);
|
|
32808
|
+
coreEvents.on("quota-changed" /* QuotaChanged */, handleQuotaChanged);
|
|
32820
32809
|
return () => {
|
|
32821
|
-
coreEvents.off(
|
|
32822
|
-
coreEvents.off(
|
|
32810
|
+
coreEvents.off("model-changed" /* ModelChanged */, handleModelChanged);
|
|
32811
|
+
coreEvents.off("quota-changed" /* QuotaChanged */, handleQuotaChanged);
|
|
32823
32812
|
};
|
|
32824
32813
|
}, [config]);
|
|
32825
32814
|
(0, import_react119.useEffect)(() => {
|
|
@@ -32832,16 +32821,16 @@ var AppContainer = (props) => {
|
|
|
32832
32821
|
const handleAgentsDiscovered = (payload) => {
|
|
32833
32822
|
setNewAgents(payload.agents);
|
|
32834
32823
|
};
|
|
32835
|
-
coreEvents.on(
|
|
32836
|
-
coreEvents.on(
|
|
32837
|
-
coreEvents.on(
|
|
32824
|
+
coreEvents.on("settings-changed" /* SettingsChanged */, handleSettingsChanged);
|
|
32825
|
+
coreEvents.on("admin-settings-changed" /* AdminSettingsChanged */, handleAdminSettingsChanged);
|
|
32826
|
+
coreEvents.on("agents-discovered" /* AgentsDiscovered */, handleAgentsDiscovered);
|
|
32838
32827
|
return () => {
|
|
32839
|
-
coreEvents.off(
|
|
32828
|
+
coreEvents.off("settings-changed" /* SettingsChanged */, handleSettingsChanged);
|
|
32840
32829
|
coreEvents.off(
|
|
32841
|
-
|
|
32830
|
+
"admin-settings-changed" /* AdminSettingsChanged */,
|
|
32842
32831
|
handleAdminSettingsChanged
|
|
32843
32832
|
);
|
|
32844
|
-
coreEvents.off(
|
|
32833
|
+
coreEvents.off("agents-discovered" /* AgentsDiscovered */, handleAgentsDiscovered);
|
|
32845
32834
|
};
|
|
32846
32835
|
}, [settings]);
|
|
32847
32836
|
const { errorCount, clearErrorCount } = useErrorCount();
|
|
@@ -32908,11 +32897,11 @@ var AppContainer = (props) => {
|
|
|
32908
32897
|
exitEditorDialog
|
|
32909
32898
|
} = useEditorSettings(settings, setEditorError, historyManager.addItem);
|
|
32910
32899
|
(0, import_react119.useEffect)(() => {
|
|
32911
|
-
coreEvents.on(
|
|
32912
|
-
coreEvents.on(
|
|
32900
|
+
coreEvents.on("external-editor-closed" /* ExternalEditorClosed */, handleEditorClose);
|
|
32901
|
+
coreEvents.on("request-editor-selection" /* RequestEditorSelection */, openEditorDialog);
|
|
32913
32902
|
return () => {
|
|
32914
|
-
coreEvents.off(
|
|
32915
|
-
coreEvents.off(
|
|
32903
|
+
coreEvents.off("external-editor-closed" /* ExternalEditorClosed */, handleEditorClose);
|
|
32904
|
+
coreEvents.off("request-editor-selection" /* RequestEditorSelection */, openEditorDialog);
|
|
32916
32905
|
};
|
|
32917
32906
|
}, [handleEditorClose, openEditorDialog]);
|
|
32918
32907
|
(0, import_react119.useEffect)(() => {
|
|
@@ -32980,7 +32969,7 @@ var AppContainer = (props) => {
|
|
|
32980
32969
|
errorVerbosity: settings.merged.ui.errorVerbosity
|
|
32981
32970
|
});
|
|
32982
32971
|
const isAuthDialogOpen = authState === "updating" /* Updating */;
|
|
32983
|
-
const isAuthenticating = authState === "unauthenticated" /* Unauthenticated */ && settings.merged.security.auth.selectedType !==
|
|
32972
|
+
const isAuthenticating = authState === "unauthenticated" /* Unauthenticated */ && settings.merged.security.auth.selectedType !== "gemini-api-key" /* USE_GEMINI */;
|
|
32984
32973
|
const isGeminiClientInitialized = config.getGeminiClient()?.isInitialized();
|
|
32985
32974
|
const { loadHistoryForResume, isResuming } = useSessionResume({
|
|
32986
32975
|
config,
|
|
@@ -33008,7 +32997,7 @@ var AppContainer = (props) => {
|
|
|
33008
32997
|
async (authType, scope) => {
|
|
33009
32998
|
if (authType) {
|
|
33010
32999
|
const previousAuthType = config.getContentGeneratorConfig()?.authType ?? "unknown";
|
|
33011
|
-
if (authType ===
|
|
33000
|
+
if (authType === "oauth-personal" /* LOGIN_WITH_GOOGLE */) {
|
|
33012
33001
|
setAuthContext({ requiresRestart: true });
|
|
33013
33002
|
} else {
|
|
33014
33003
|
setAuthContext({});
|
|
@@ -33036,7 +33025,7 @@ var AppContainer = (props) => {
|
|
|
33036
33025
|
);
|
|
33037
33026
|
return;
|
|
33038
33027
|
}
|
|
33039
|
-
if (authType ===
|
|
33028
|
+
if (authType === "oauth-personal" /* LOGIN_WITH_GOOGLE */ && config.isBrowserLaunchSuppressed()) {
|
|
33040
33029
|
writeToStdout(`
|
|
33041
33030
|
----------------------------------------------------------------
|
|
33042
33031
|
Logging in with Google... Restarting Gemini CLI to continue.
|
|
@@ -33059,7 +33048,7 @@ Logging in with Google... Restarting Gemini CLI to continue.
|
|
|
33059
33048
|
}
|
|
33060
33049
|
await saveApiKey(apiKey);
|
|
33061
33050
|
await reloadApiKey();
|
|
33062
|
-
await config.refreshAuth(
|
|
33051
|
+
await config.refreshAuth("gemini-api-key" /* USE_GEMINI */);
|
|
33063
33052
|
setAuthState("authenticated" /* Authenticated */);
|
|
33064
33053
|
} catch (e) {
|
|
33065
33054
|
onAuthError(
|
|
@@ -33084,7 +33073,7 @@ Logging in with Google... Restarting Gemini CLI to continue.
|
|
|
33084
33073
|
`Authentication is enforced to be ${settings.merged.security.auth.enforcedType}, but you are currently using ${settings.merged.security.auth.selectedType}.`
|
|
33085
33074
|
);
|
|
33086
33075
|
} else if (settings.merged.security.auth.selectedType && !settings.merged.security.auth.useExternal) {
|
|
33087
|
-
if (settings.merged.security.auth.selectedType ===
|
|
33076
|
+
if (settings.merged.security.auth.selectedType === "gemini-api-key" /* USE_GEMINI */) {
|
|
33088
33077
|
return;
|
|
33089
33078
|
}
|
|
33090
33079
|
const authMethod = settings.merged.security.auth.selectedType;
|
|
@@ -33220,9 +33209,9 @@ Logging in with Google... Restarting Gemini CLI to continue.
|
|
|
33220
33209
|
}
|
|
33221
33210
|
});
|
|
33222
33211
|
};
|
|
33223
|
-
coreEvents.on(
|
|
33212
|
+
coreEvents.on("consent-request" /* ConsentRequest */, handleConsentRequest);
|
|
33224
33213
|
return () => {
|
|
33225
|
-
coreEvents.off(
|
|
33214
|
+
coreEvents.off("consent-request" /* ConsentRequest */, handleConsentRequest);
|
|
33226
33215
|
};
|
|
33227
33216
|
}, []);
|
|
33228
33217
|
const performMemoryRefresh = (0, import_react119.useCallback)(async () => {
|
|
@@ -33880,7 +33869,7 @@ ${queuedText}` : queuedText;
|
|
|
33880
33869
|
if (keyMatchers["app.showErrorDetails" /* SHOW_ERROR_DETAILS */](key)) {
|
|
33881
33870
|
if (settings.merged.general.devtools) {
|
|
33882
33871
|
void (async () => {
|
|
33883
|
-
const { toggleDevToolsPanel } = await import("./devtoolsService-
|
|
33872
|
+
const { toggleDevToolsPanel } = await import("./devtoolsService-S4ZTRGJL.js");
|
|
33884
33873
|
await toggleDevToolsPanel(
|
|
33885
33874
|
config,
|
|
33886
33875
|
showErrorDetails,
|
|
@@ -34098,17 +34087,17 @@ ${queuedText}` : queuedText;
|
|
|
34098
34087
|
Date.now()
|
|
34099
34088
|
);
|
|
34100
34089
|
};
|
|
34101
|
-
coreEvents.on(
|
|
34102
|
-
coreEvents.on(
|
|
34090
|
+
coreEvents.on("user-feedback" /* UserFeedback */, handleUserFeedback);
|
|
34091
|
+
coreEvents.on("hook-system-message" /* HookSystemMessage */, handleHookSystemMessage);
|
|
34103
34092
|
coreEvents.drainBacklogs();
|
|
34104
34093
|
return () => {
|
|
34105
|
-
coreEvents.off(
|
|
34106
|
-
coreEvents.off(
|
|
34094
|
+
coreEvents.off("user-feedback" /* UserFeedback */, handleUserFeedback);
|
|
34095
|
+
coreEvents.off("hook-system-message" /* HookSystemMessage */, handleHookSystemMessage);
|
|
34107
34096
|
};
|
|
34108
34097
|
}, [historyManager]);
|
|
34109
34098
|
const nightly = props.version.includes("nightly");
|
|
34110
34099
|
const isAwaitingLoginRestart = authState === "awaiting_login_restart" /* AwaitingLoginRestart */;
|
|
34111
|
-
const loginRestartMessage = settings.merged.security.auth.selectedType ===
|
|
34100
|
+
const loginRestartMessage = settings.merged.security.auth.selectedType === "vertex-ai" /* USE_VERTEX_AI */ ? "Authenticating to Vertex AI in Cloud Shell requires a restart to apply project settings." : void 0;
|
|
34112
34101
|
const dialogsVisible = shouldShowIdePrompt || isFolderTrustDialogOpen || isPolicyUpdateDialogOpen || adminSettingsChanged || !!commandConfirmationRequest || !!authConsentRequest || !!permissionConfirmationRequest || !!customDialog || confirmUpdateExtensionRequests.length > 0 || !!loopDetectionConfirmationRequest || isThemeDialogOpen || isSettingsDialogOpen || isModelDialogOpen || isVoiceModelDialogOpen || isAgentConfigDialogOpen || isPermissionsDialogOpen || isAuthenticating || isAuthDialogOpen || isEditorDialogOpen || showPrivacyNotice || showIdeRestartPrompt || !!proQuotaRequest || !!validationRequest || !!overageMenuRequest || !!emptyWalletRequest || isSessionBrowserOpen || authState === "awaiting_api_key_input" /* AwaitingApiKeyInput */ || isAwaitingLoginRestart || !!newAgents;
|
|
34113
34102
|
const hasPendingToolConfirmation = (0, import_react119.useMemo)(
|
|
34114
34103
|
() => isToolAwaitingConfirmation(pendingHistoryItems),
|
|
@@ -34214,9 +34203,9 @@ ${queuedText}` : queuedText;
|
|
|
34214
34203
|
const handleMemoryChanged = (result) => {
|
|
34215
34204
|
setGeminiMdFileCount(result.fileCount);
|
|
34216
34205
|
};
|
|
34217
|
-
coreEvents.on(
|
|
34206
|
+
coreEvents.on("memory-changed" /* MemoryChanged */, handleMemoryChanged);
|
|
34218
34207
|
return () => {
|
|
34219
|
-
coreEvents.off(
|
|
34208
|
+
coreEvents.off("memory-changed" /* MemoryChanged */, handleMemoryChanged);
|
|
34220
34209
|
};
|
|
34221
34210
|
}, []);
|
|
34222
34211
|
(0, import_react119.useEffect)(() => {
|