@google/gemini-cli 0.64.0-nightly.20261005.gfb972b2f8 → 0.64.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-PO2VSL43.js → chunk-2NQXIWQK.js} +5 -7
- package/bundle/{chunk-JUHOHELL.js → chunk-6OFXOGEG.js} +14846 -7842
- package/bundle/{chunk-EIWQ2LQQ.js → chunk-EBP6K2WG.js} +7 -7
- package/bundle/{chunk-EELKDWQ4.js → chunk-EDVFNWRG.js} +1 -1
- package/bundle/{chunk-EB43SHKX.js → chunk-EDYPRCAA.js} +2 -2
- package/bundle/{chunk-AQYLEGXG.js → chunk-HN74ORTP.js} +1 -1
- package/bundle/{chunk-H7GSTRIW.js → chunk-KCCVXZ52.js} +58 -71
- package/bundle/{chunk-JQYJUNLF.js → chunk-MLSLNORV.js} +3 -3
- package/bundle/{chunk-27FWUQTG.js → chunk-NX7TO2DU.js} +1 -1
- package/bundle/{chunk-NFSPTLUK.js → chunk-SDWOC67Z.js} +1 -1
- package/bundle/{chunk-2TCGCQ3U.js → chunk-UBGF6JU5.js} +1 -1
- package/bundle/{chunk-NALEOBWX.js → chunk-VBVCLWLA.js} +2 -2
- package/bundle/{chunk-UBR6TWNB.js → chunk-VJYKQD5D.js} +3 -3
- package/bundle/{chunk-Q5GLE3YW.js → chunk-Y2HXXBXI.js} +8 -9
- package/bundle/{chunk-OLLYWO5Q.js → chunk-ZOHM7BPT.js} +1 -1
- package/bundle/{chunk-CUFMYKIC.js → chunk-ZQW7OGUO.js} +3 -3
- package/bundle/{cleanup-4TGCO5X2.js → cleanup-GGCB2LVD.js} +2 -2
- package/bundle/{cleanup-6PBH36B7.js → cleanup-JRDG3OTL.js} +2 -2
- package/bundle/{dist-EKBAHHIJ.js → core-6HRWFQZW.js} +1 -1
- package/bundle/{devtoolsService-U6FKQ6JD.js → devtoolsService-MF6JKRUV.js} +3 -4
- package/bundle/{devtoolsService-DH4C7EZB.js → devtoolsService-XZCKFZP5.js} +2 -2
- package/bundle/{dist-UAE7T55Q.js → dist-7L3BRW6V.js} +1 -1
- package/bundle/{gemini-E3VK7GSB.js → gemini-JPMMQ3KA.js} +14 -14
- package/bundle/{gemini-IYF3YHXZ.js → gemini-QOQNG5VY.js} +198 -214
- package/bundle/gemini.js +7 -7
- package/bundle/{interactiveCli-WHZXRGLN.js → interactiveCli-R3P4A3FC.js} +293 -312
- package/bundle/{interactiveCli-T3HF2HRX.js → interactiveCli-UDWGRVJL.js} +8 -8
- package/bundle/{liteRtServerManager-X6UOQ3MA.js → liteRtServerManager-OVPUSK2T.js} +4 -4
- package/bundle/{liteRtServerManager-YUF3UXMU.js → liteRtServerManager-RAV63AGE.js} +4 -4
- package/bundle/{oauth2-provider-D4J3TFC3.js → oauth2-provider-FVTRRJZR.js} +1 -1
- package/bundle/{oauth2-provider-F7QKNLGE.js → oauth2-provider-XFP63FGJ.js} +72 -38
- package/bundle/{start-TO2FZTHQ.js → start-5O7TBK5L.js} +6 -6
- package/bundle/{start-U3PILSF7.js → start-VQQ2Q5KT.js} +6 -6
- package/package.json +1 -1
- package/bundle/chunk-6ISJPGCD.js +0 -154
- package/bundle/chunk-6LCUTDX7.js +0 -401196
- package/bundle/chunk-NBEG6GFX.js +0 -118
- package/bundle/chunk-PGYGRESN.js +0 -425
- package/bundle/chunk-QSGRHC6M.js +0 -1571
- package/bundle/chunk-UMTL4SBM.js +0 -103121
- package/bundle/chunk-UP3637TZ.js +0 -512
- package/bundle/chunk-XZLCMV4F.js +0 -17507
- package/bundle/cleanup-HQ46NIAL.js +0 -32
- package/bundle/devtoolsService-YL2CULLT.js +0 -4359
- package/bundle/dist-BVPLCCBS.js +0 -2252
- package/bundle/gemini-53BFSQPR.js +0 -17934
- package/bundle/interactiveCli-OHZNMG4G.js +0 -34979
- package/bundle/liteRtServerManager-KKZLBYK6.js +0 -65
- package/bundle/oauth2-provider-4V3LC2C5.js +0 -235
- package/bundle/start-JVWQ2CSF.js +0 -18
|
@@ -171,10 +171,10 @@ import {
|
|
|
171
171
|
widestLineFromStyledChars,
|
|
172
172
|
wordBreakStyledChars,
|
|
173
173
|
wrapStyledChars
|
|
174
|
-
} from "./chunk-
|
|
174
|
+
} from "./chunk-KCCVXZ52.js";
|
|
175
175
|
import {
|
|
176
176
|
require_source
|
|
177
|
-
} from "./chunk-
|
|
177
|
+
} from "./chunk-EDVFNWRG.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-2NQXIWQK.js";
|
|
231
231
|
import {
|
|
232
232
|
handleAutoUpdate,
|
|
233
233
|
isDevelopment,
|
|
234
234
|
relaunchApp,
|
|
235
235
|
setUpdateHandler
|
|
236
|
-
} from "./chunk-
|
|
236
|
+
} from "./chunk-EDYPRCAA.js";
|
|
237
237
|
import {
|
|
238
238
|
isTodoList,
|
|
239
239
|
mapCoreStatusToDisplayStatus,
|
|
240
240
|
require_react
|
|
241
|
-
} from "./chunk-
|
|
241
|
+
} from "./chunk-Y2HXXBXI.js";
|
|
242
242
|
import {
|
|
243
243
|
registerCleanup,
|
|
244
244
|
removeCleanup,
|
|
245
245
|
runExitCleanup,
|
|
246
246
|
setupTtyCheck
|
|
247
|
-
} from "./chunk-
|
|
247
|
+
} from "./chunk-SDWOC67Z.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-6OFXOGEG.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;
|
|
@@ -11568,7 +11549,7 @@ var ExitPlanModeDialog = ({
|
|
|
11568
11549
|
{
|
|
11569
11550
|
questions: [
|
|
11570
11551
|
{
|
|
11571
|
-
type:
|
|
11552
|
+
type: "choice" /* CHOICE */,
|
|
11572
11553
|
header: "Approval",
|
|
11573
11554
|
question: planContent,
|
|
11574
11555
|
options: [
|
|
@@ -11589,9 +11570,9 @@ var ExitPlanModeDialog = ({
|
|
|
11589
11570
|
onSubmit: (answers) => {
|
|
11590
11571
|
const answer = answers["0"];
|
|
11591
11572
|
if (answer === "Yes, automatically accept edits" /* Auto */) {
|
|
11592
|
-
onApprove(
|
|
11573
|
+
onApprove("autoEdit" /* AUTO_EDIT */);
|
|
11593
11574
|
} else if (answer === "Yes, manually accept edits" /* Manual */) {
|
|
11594
|
-
onApprove(
|
|
11575
|
+
onApprove("default" /* DEFAULT */);
|
|
11595
11576
|
} else if (answer) {
|
|
11596
11577
|
onFeedback(answer);
|
|
11597
11578
|
}
|
|
@@ -11803,7 +11784,7 @@ ${deceptiveUrlWarnings.map(
|
|
|
11803
11784
|
);
|
|
11804
11785
|
(0, import_react35.useEffect)(() => {
|
|
11805
11786
|
if (isCancelling) {
|
|
11806
|
-
handleConfirm(
|
|
11787
|
+
handleConfirm("cancel" /* Cancel */);
|
|
11807
11788
|
}
|
|
11808
11789
|
}, [isCancelling, handleConfirm]);
|
|
11809
11790
|
const handleSelect = (0, import_react35.useCallback)(
|
|
@@ -11816,19 +11797,19 @@ ${deceptiveUrlWarnings.map(
|
|
|
11816
11797
|
if (!confirmationDetails.isModifying) {
|
|
11817
11798
|
options2.push({
|
|
11818
11799
|
label: "Allow once",
|
|
11819
|
-
value:
|
|
11800
|
+
value: "proceed_once" /* ProceedOnce */,
|
|
11820
11801
|
key: "Allow once"
|
|
11821
11802
|
});
|
|
11822
11803
|
if (isTrustedFolder && !confirmationDetails.isBuildFile) {
|
|
11823
11804
|
options2.push({
|
|
11824
11805
|
label: "Allow for this session",
|
|
11825
|
-
value:
|
|
11806
|
+
value: "proceed_always" /* ProceedAlways */,
|
|
11826
11807
|
key: "Allow for this session"
|
|
11827
11808
|
});
|
|
11828
11809
|
if (allowPermanentApproval) {
|
|
11829
11810
|
options2.push({
|
|
11830
11811
|
label: "Allow for this file in all future sessions",
|
|
11831
|
-
value:
|
|
11812
|
+
value: "proceed_always_and_save" /* ProceedAlwaysAndSave */,
|
|
11832
11813
|
key: "Allow for this file in all future sessions"
|
|
11833
11814
|
});
|
|
11834
11815
|
}
|
|
@@ -11836,45 +11817,45 @@ ${deceptiveUrlWarnings.map(
|
|
|
11836
11817
|
if (!config.getIdeMode() || !isDiffingEnabled) {
|
|
11837
11818
|
options2.push({
|
|
11838
11819
|
label: "Modify with external editor",
|
|
11839
|
-
value:
|
|
11820
|
+
value: "modify_with_editor" /* ModifyWithEditor */,
|
|
11840
11821
|
key: "Modify with external editor"
|
|
11841
11822
|
});
|
|
11842
11823
|
}
|
|
11843
11824
|
options2.push({
|
|
11844
11825
|
label: "No, suggest changes (esc)",
|
|
11845
|
-
value:
|
|
11826
|
+
value: "cancel" /* Cancel */,
|
|
11846
11827
|
key: "No, suggest changes (esc)"
|
|
11847
11828
|
});
|
|
11848
11829
|
}
|
|
11849
11830
|
} else if (confirmationDetails.type === "sandbox_expansion") {
|
|
11850
11831
|
options2.push({
|
|
11851
11832
|
label: "Allow once",
|
|
11852
|
-
value:
|
|
11833
|
+
value: "proceed_once" /* ProceedOnce */,
|
|
11853
11834
|
key: "Allow once"
|
|
11854
11835
|
});
|
|
11855
11836
|
if (isTrustedFolder) {
|
|
11856
11837
|
options2.push({
|
|
11857
11838
|
label: "Allow for this session",
|
|
11858
|
-
value:
|
|
11839
|
+
value: "proceed_always" /* ProceedAlways */,
|
|
11859
11840
|
key: "Allow for this session"
|
|
11860
11841
|
});
|
|
11861
11842
|
if (allowPermanentApproval) {
|
|
11862
11843
|
options2.push({
|
|
11863
11844
|
label: "Allow for all future sessions",
|
|
11864
|
-
value:
|
|
11845
|
+
value: "proceed_always_and_save" /* ProceedAlwaysAndSave */,
|
|
11865
11846
|
key: "Allow for all future sessions"
|
|
11866
11847
|
});
|
|
11867
11848
|
}
|
|
11868
11849
|
}
|
|
11869
11850
|
options2.push({
|
|
11870
11851
|
label: "No, suggest changes (esc)",
|
|
11871
|
-
value:
|
|
11852
|
+
value: "cancel" /* Cancel */,
|
|
11872
11853
|
key: "No, suggest changes (esc)"
|
|
11873
11854
|
});
|
|
11874
11855
|
} else if (confirmationDetails.type === "exec") {
|
|
11875
11856
|
options2.push({
|
|
11876
11857
|
label: "Allow once",
|
|
11877
|
-
value:
|
|
11858
|
+
value: "proceed_once" /* ProceedOnce */,
|
|
11878
11859
|
key: "Allow once"
|
|
11879
11860
|
});
|
|
11880
11861
|
const hasUntrustedFlags = confirmationDetails.untrustedFlags && confirmationDetails.untrustedFlags.length > 0;
|
|
@@ -11882,75 +11863,75 @@ ${deceptiveUrlWarnings.map(
|
|
|
11882
11863
|
if (isTrustedFolder && !hasUntrustedFlags && !hasModifiedBuildFiles) {
|
|
11883
11864
|
options2.push({
|
|
11884
11865
|
label: `Allow for this session`,
|
|
11885
|
-
value:
|
|
11866
|
+
value: "proceed_always" /* ProceedAlways */,
|
|
11886
11867
|
key: `Allow for this session`
|
|
11887
11868
|
});
|
|
11888
11869
|
if (allowPermanentApproval) {
|
|
11889
11870
|
options2.push({
|
|
11890
11871
|
label: `Allow this command for all future sessions`,
|
|
11891
|
-
value:
|
|
11872
|
+
value: "proceed_always_and_save" /* ProceedAlwaysAndSave */,
|
|
11892
11873
|
key: `Allow for all future sessions`
|
|
11893
11874
|
});
|
|
11894
11875
|
}
|
|
11895
11876
|
}
|
|
11896
11877
|
options2.push({
|
|
11897
11878
|
label: "No, suggest changes (esc)",
|
|
11898
|
-
value:
|
|
11879
|
+
value: "cancel" /* Cancel */,
|
|
11899
11880
|
key: "No, suggest changes (esc)"
|
|
11900
11881
|
});
|
|
11901
11882
|
} else if (confirmationDetails.type === "info") {
|
|
11902
11883
|
options2.push({
|
|
11903
11884
|
label: "Allow once",
|
|
11904
|
-
value:
|
|
11885
|
+
value: "proceed_once" /* ProceedOnce */,
|
|
11905
11886
|
key: "Allow once"
|
|
11906
11887
|
});
|
|
11907
11888
|
if (isTrustedFolder) {
|
|
11908
11889
|
options2.push({
|
|
11909
11890
|
label: "Allow for this session",
|
|
11910
|
-
value:
|
|
11891
|
+
value: "proceed_always" /* ProceedAlways */,
|
|
11911
11892
|
key: "Allow for this session"
|
|
11912
11893
|
});
|
|
11913
11894
|
if (allowPermanentApproval) {
|
|
11914
11895
|
options2.push({
|
|
11915
11896
|
label: "Allow for all future sessions",
|
|
11916
|
-
value:
|
|
11897
|
+
value: "proceed_always_and_save" /* ProceedAlwaysAndSave */,
|
|
11917
11898
|
key: "Allow for all future sessions"
|
|
11918
11899
|
});
|
|
11919
11900
|
}
|
|
11920
11901
|
}
|
|
11921
11902
|
options2.push({
|
|
11922
11903
|
label: "No, suggest changes (esc)",
|
|
11923
|
-
value:
|
|
11904
|
+
value: "cancel" /* Cancel */,
|
|
11924
11905
|
key: "No, suggest changes (esc)"
|
|
11925
11906
|
});
|
|
11926
11907
|
} else if (confirmationDetails.type === "mcp") {
|
|
11927
11908
|
options2.push({
|
|
11928
11909
|
label: "Allow once",
|
|
11929
|
-
value:
|
|
11910
|
+
value: "proceed_once" /* ProceedOnce */,
|
|
11930
11911
|
key: "Allow once"
|
|
11931
11912
|
});
|
|
11932
11913
|
if (isTrustedFolder) {
|
|
11933
11914
|
options2.push({
|
|
11934
11915
|
label: "Allow tool for this session",
|
|
11935
|
-
value:
|
|
11916
|
+
value: "proceed_always_tool" /* ProceedAlwaysTool */,
|
|
11936
11917
|
key: "Allow tool for this session"
|
|
11937
11918
|
});
|
|
11938
11919
|
options2.push({
|
|
11939
11920
|
label: "Allow all server tools for this session",
|
|
11940
|
-
value:
|
|
11921
|
+
value: "proceed_always_server" /* ProceedAlwaysServer */,
|
|
11941
11922
|
key: "Allow all server tools for this session"
|
|
11942
11923
|
});
|
|
11943
11924
|
if (allowPermanentApproval) {
|
|
11944
11925
|
options2.push({
|
|
11945
11926
|
label: "Allow tool for all future sessions",
|
|
11946
|
-
value:
|
|
11927
|
+
value: "proceed_always_and_save" /* ProceedAlwaysAndSave */,
|
|
11947
11928
|
key: "Allow tool for all future sessions"
|
|
11948
11929
|
});
|
|
11949
11930
|
}
|
|
11950
11931
|
}
|
|
11951
11932
|
options2.push({
|
|
11952
11933
|
label: "No, suggest changes (esc)",
|
|
11953
|
-
value:
|
|
11934
|
+
value: "cancel" /* Cancel */,
|
|
11954
11935
|
key: "No, suggest changes (esc)"
|
|
11955
11936
|
});
|
|
11956
11937
|
}
|
|
@@ -11991,7 +11972,7 @@ ${deceptiveUrlWarnings.map(
|
|
|
11991
11972
|
const containsRedirection = commandsToDisplay.some(
|
|
11992
11973
|
(cmd) => hasRedirection(cmd)
|
|
11993
11974
|
);
|
|
11994
|
-
const isAutoEdit = config.getApprovalMode() ===
|
|
11975
|
+
const isAutoEdit = config.getApprovalMode() === "yolo" /* YOLO */ || config.getApprovalMode() === "autoEdit" /* AUTO_EDIT */;
|
|
11995
11976
|
if (containsRedirection && !isAutoEdit) {
|
|
11996
11977
|
extraInfoLines = 1;
|
|
11997
11978
|
}
|
|
@@ -12018,7 +11999,7 @@ ${deceptiveUrlWarnings.map(
|
|
|
12018
11999
|
const isSafeToPersist = confirmationDetails.type === "info" || confirmationDetails.type === "edit" || confirmationDetails.type === "mcp";
|
|
12019
12000
|
if (isSafeToPersist && settings.merged.security.autoAddToPolicyByDefault) {
|
|
12020
12001
|
const alwaysAndSaveIndex = options2.findIndex(
|
|
12021
|
-
(o) => o.value ===
|
|
12002
|
+
(o) => o.value === "proceed_always_and_save" /* ProceedAlwaysAndSave */
|
|
12022
12003
|
);
|
|
12023
12004
|
if (alwaysAndSaveIndex !== -1) {
|
|
12024
12005
|
initialIndex2 = alwaysAndSaveIndex;
|
|
@@ -12067,10 +12048,10 @@ Ensure you trust all modifications made to build files before approving executio
|
|
|
12067
12048
|
{
|
|
12068
12049
|
questions: confirmationDetails.questions,
|
|
12069
12050
|
onSubmit: (answers) => {
|
|
12070
|
-
handleConfirm(
|
|
12051
|
+
handleConfirm("proceed_once" /* ProceedOnce */, { answers });
|
|
12071
12052
|
},
|
|
12072
12053
|
onCancel: () => {
|
|
12073
|
-
handleConfirm(
|
|
12054
|
+
handleConfirm("cancel" /* Cancel */);
|
|
12074
12055
|
},
|
|
12075
12056
|
width: safeTerminalWidth,
|
|
12076
12057
|
availableHeight: bodyHeight
|
|
@@ -12091,19 +12072,19 @@ Ensure you trust all modifications made to build files before approving executio
|
|
|
12091
12072
|
planPath: confirmationDetails.planPath,
|
|
12092
12073
|
getPreferredEditor,
|
|
12093
12074
|
onApprove: (approvalMode) => {
|
|
12094
|
-
handleConfirm(
|
|
12075
|
+
handleConfirm("proceed_once" /* ProceedOnce */, {
|
|
12095
12076
|
approved: true,
|
|
12096
12077
|
approvalMode
|
|
12097
12078
|
});
|
|
12098
12079
|
},
|
|
12099
12080
|
onFeedback: (feedback) => {
|
|
12100
|
-
handleConfirm(
|
|
12081
|
+
handleConfirm("proceed_once" /* ProceedOnce */, {
|
|
12101
12082
|
approved: false,
|
|
12102
12083
|
feedback
|
|
12103
12084
|
});
|
|
12104
12085
|
},
|
|
12105
12086
|
onCancel: () => {
|
|
12106
|
-
handleConfirm(
|
|
12087
|
+
handleConfirm("cancel" /* Cancel */);
|
|
12107
12088
|
},
|
|
12108
12089
|
width: safeTerminalWidth,
|
|
12109
12090
|
availableHeight: bodyHeight
|
|
@@ -12213,7 +12194,7 @@ Ensure you trust all modifications made to build files before approving executio
|
|
|
12213
12194
|
const containsRedirection = commandsToDisplay.some(
|
|
12214
12195
|
(cmd) => hasRedirection(cmd)
|
|
12215
12196
|
);
|
|
12216
|
-
const isAutoEdit = config.getApprovalMode() ===
|
|
12197
|
+
const isAutoEdit = config.getApprovalMode() === "yolo" /* YOLO */ || config.getApprovalMode() === "autoEdit" /* AUTO_EDIT */;
|
|
12217
12198
|
let warnings = null;
|
|
12218
12199
|
if (containsRedirection && !isAutoEdit) {
|
|
12219
12200
|
const tipText = `To auto-accept, press ${formatCommand("app.cycleApprovalMode" /* CYCLE_APPROVAL_MODE */)}`;
|
|
@@ -12372,7 +12353,7 @@ Ensure you trust all modifications made to build files before approving executio
|
|
|
12372
12353
|
const bodyOverflowDirection = confirmationDetails.type === "mcp" && isMcpToolDetailsExpanded ? "bottom" : "top";
|
|
12373
12354
|
const renderRadioItem = (0, import_react35.useCallback)(
|
|
12374
12355
|
(item, { titleColor }) => {
|
|
12375
|
-
if (item.value ===
|
|
12356
|
+
if (item.value === "proceed_always_and_save" /* ProceedAlwaysAndSave */) {
|
|
12376
12357
|
return /* @__PURE__ */ (0, import_jsx_runtime64.jsxs)(Text, { color: titleColor, wrap: "truncate", children: [
|
|
12377
12358
|
item.label,
|
|
12378
12359
|
" ",
|
|
@@ -12761,7 +12742,7 @@ var MainContent = () => {
|
|
|
12761
12742
|
const hasConfirmationQueue = Boolean(
|
|
12762
12743
|
showConfirmationQueue && confirmingTool
|
|
12763
12744
|
);
|
|
12764
|
-
const isVisiblePendingItem = (item) => item.type !== "tool_group" || item.tools.some((t) => t.status !==
|
|
12745
|
+
const isVisiblePendingItem = (item) => item.type !== "tool_group" || item.tools.some((t) => t.status !== "awaiting_approval" /* AwaitingApproval */);
|
|
12765
12746
|
const visiblePendingCount = pendingHistoryItems.filter(isVisiblePendingItem).length;
|
|
12766
12747
|
const shouldPartitionHeight = !isAlternateBufferOrTerminalBuffer && hasConfirmationQueue && visiblePendingCount > 0;
|
|
12767
12748
|
const pendingCount = Math.max(1, visiblePendingCount);
|
|
@@ -14465,7 +14446,7 @@ async function validateAuthMethodWithSettings(authType, settings) {
|
|
|
14465
14446
|
if (settings.merged.security.auth.useExternal) {
|
|
14466
14447
|
return null;
|
|
14467
14448
|
}
|
|
14468
|
-
if (authType ===
|
|
14449
|
+
if (authType === "gemini-api-key" /* USE_GEMINI */) {
|
|
14469
14450
|
return null;
|
|
14470
14451
|
}
|
|
14471
14452
|
return validateAuthMethod(authType);
|
|
@@ -14517,7 +14498,7 @@ var useAuthCommand = (settings, config, initialAuthError = null, initialAccountS
|
|
|
14517
14498
|
}
|
|
14518
14499
|
return;
|
|
14519
14500
|
}
|
|
14520
|
-
if (authType ===
|
|
14501
|
+
if (authType === "gemini-api-key" /* USE_GEMINI */) {
|
|
14521
14502
|
const key = await reloadApiKey();
|
|
14522
14503
|
if (!key) {
|
|
14523
14504
|
setAuthState("awaiting_api_key_input" /* AwaitingApiKeyInput */);
|
|
@@ -14595,31 +14576,31 @@ function AuthDialog({
|
|
|
14595
14576
|
let items = [
|
|
14596
14577
|
{
|
|
14597
14578
|
label: "Sign in with Google",
|
|
14598
|
-
value:
|
|
14599
|
-
key:
|
|
14579
|
+
value: "oauth-personal" /* LOGIN_WITH_GOOGLE */,
|
|
14580
|
+
key: "oauth-personal" /* LOGIN_WITH_GOOGLE */
|
|
14600
14581
|
},
|
|
14601
14582
|
...process.env["CLOUD_SHELL"] === "true" ? [
|
|
14602
14583
|
{
|
|
14603
14584
|
label: "Use Cloud Shell user credentials",
|
|
14604
|
-
value:
|
|
14605
|
-
key:
|
|
14585
|
+
value: "compute-default-credentials" /* COMPUTE_ADC */,
|
|
14586
|
+
key: "compute-default-credentials" /* COMPUTE_ADC */
|
|
14606
14587
|
}
|
|
14607
14588
|
] : process.env["GEMINI_CLI_USE_COMPUTE_ADC"] === "true" ? [
|
|
14608
14589
|
{
|
|
14609
14590
|
label: "Use metadata server application default credentials",
|
|
14610
|
-
value:
|
|
14611
|
-
key:
|
|
14591
|
+
value: "compute-default-credentials" /* COMPUTE_ADC */,
|
|
14592
|
+
key: "compute-default-credentials" /* COMPUTE_ADC */
|
|
14612
14593
|
}
|
|
14613
14594
|
] : [],
|
|
14614
14595
|
{
|
|
14615
14596
|
label: "Use Gemini API Key",
|
|
14616
|
-
value:
|
|
14617
|
-
key:
|
|
14597
|
+
value: "gemini-api-key" /* USE_GEMINI */,
|
|
14598
|
+
key: "gemini-api-key" /* USE_GEMINI */
|
|
14618
14599
|
},
|
|
14619
14600
|
{
|
|
14620
14601
|
label: "Vertex AI",
|
|
14621
|
-
value:
|
|
14622
|
-
key:
|
|
14602
|
+
value: "vertex-ai" /* USE_VERTEX_AI */,
|
|
14603
|
+
key: "vertex-ai" /* USE_VERTEX_AI */
|
|
14623
14604
|
}
|
|
14624
14605
|
];
|
|
14625
14606
|
if (settings.merged.security.auth.enforcedType) {
|
|
@@ -14641,9 +14622,9 @@ function AuthDialog({
|
|
|
14641
14622
|
return item.value === defaultAuthType;
|
|
14642
14623
|
}
|
|
14643
14624
|
if (process.env["GEMINI_API_KEY"]) {
|
|
14644
|
-
return item.value ===
|
|
14625
|
+
return item.value === "gemini-api-key" /* USE_GEMINI */;
|
|
14645
14626
|
}
|
|
14646
|
-
return item.value ===
|
|
14627
|
+
return item.value === "oauth-personal" /* LOGIN_WITH_GOOGLE */;
|
|
14647
14628
|
});
|
|
14648
14629
|
if (settings.merged.security.auth.enforcedType) {
|
|
14649
14630
|
initialAuthIndex = 0;
|
|
@@ -14654,7 +14635,7 @@ function AuthDialog({
|
|
|
14654
14635
|
return;
|
|
14655
14636
|
}
|
|
14656
14637
|
if (authType) {
|
|
14657
|
-
const needsRestart = authType ===
|
|
14638
|
+
const needsRestart = authType === "oauth-personal" /* LOGIN_WITH_GOOGLE */ || authType === "vertex-ai" /* USE_VERTEX_AI */ && process.env["CLOUD_SHELL"] === "true";
|
|
14658
14639
|
if (needsRestart) {
|
|
14659
14640
|
setAuthContext({ requiresRestart: true });
|
|
14660
14641
|
} else {
|
|
@@ -14665,7 +14646,7 @@ function AuthDialog({
|
|
|
14665
14646
|
await clearCachedCredentialFile();
|
|
14666
14647
|
}
|
|
14667
14648
|
settings.setValue(scope, "security.auth.selectedType", authType);
|
|
14668
|
-
if (authType ===
|
|
14649
|
+
if (authType === "oauth-personal" /* LOGIN_WITH_GOOGLE */ && config.isBrowserLaunchSuppressed()) {
|
|
14669
14650
|
setExiting(true);
|
|
14670
14651
|
setTimeout(() => {
|
|
14671
14652
|
void relaunchApp({ overrideAuthType: authType }).catch((err) => {
|
|
@@ -14675,7 +14656,7 @@ function AuthDialog({
|
|
|
14675
14656
|
}, 100);
|
|
14676
14657
|
return;
|
|
14677
14658
|
}
|
|
14678
|
-
if (authType ===
|
|
14659
|
+
if (authType === "gemini-api-key" /* USE_GEMINI */) {
|
|
14679
14660
|
setAuthState("awaiting_api_key_input" /* AwaitingApiKeyInput */);
|
|
14680
14661
|
return;
|
|
14681
14662
|
}
|
|
@@ -15482,11 +15463,11 @@ var PrivacyNoticeText = ({
|
|
|
15482
15463
|
}) => {
|
|
15483
15464
|
const authType = config.getContentGeneratorConfig()?.authType;
|
|
15484
15465
|
switch (authType) {
|
|
15485
|
-
case
|
|
15466
|
+
case "gemini-api-key" /* USE_GEMINI */:
|
|
15486
15467
|
return /* @__PURE__ */ (0, import_jsx_runtime82.jsx)(GeminiPrivacyNotice, { onExit });
|
|
15487
|
-
case
|
|
15468
|
+
case "vertex-ai" /* USE_VERTEX_AI */:
|
|
15488
15469
|
return /* @__PURE__ */ (0, import_jsx_runtime82.jsx)(CloudPaidPrivacyNotice, { onExit });
|
|
15489
|
-
case
|
|
15470
|
+
case "oauth-personal" /* LOGIN_WITH_GOOGLE */:
|
|
15490
15471
|
default:
|
|
15491
15472
|
return /* @__PURE__ */ (0, import_jsx_runtime82.jsx)(CloudFreePrivacyNotice, { config, onExit });
|
|
15492
15473
|
}
|
|
@@ -15546,7 +15527,7 @@ function ProQuotaDialog({
|
|
|
15546
15527
|
value: "retry_always",
|
|
15547
15528
|
key: "retry_always"
|
|
15548
15529
|
},
|
|
15549
|
-
...authType ===
|
|
15530
|
+
...authType === "oauth-personal" /* LOGIN_WITH_GOOGLE */ && !isUltra ? [
|
|
15550
15531
|
{
|
|
15551
15532
|
label: "Upgrade for higher limits",
|
|
15552
15533
|
value: "upgrade",
|
|
@@ -16713,7 +16694,7 @@ function ModelDialog({ onClose }) {
|
|
|
16713
16694
|
const useLatestFlash = config?.hasLatestFlashGAAccess?.() ?? false;
|
|
16714
16695
|
const useLatestFlashLite = config?.hasLatestFlashLiteGAAccess?.() ?? false;
|
|
16715
16696
|
const selectedAuthType = settings.merged.security.auth.selectedType;
|
|
16716
|
-
const useCustomToolModel = useGemini31 && selectedAuthType ===
|
|
16697
|
+
const useCustomToolModel = useGemini31 && selectedAuthType === "gemini-api-key" /* USE_GEMINI */;
|
|
16717
16698
|
const manualModelSelected = (0, import_react53.useMemo)(() => {
|
|
16718
16699
|
if (config?.getExperimentalDynamicModelConfiguration?.() === true && config.getModelConfigService) {
|
|
16719
16700
|
const def = config.getModelConfigService().getModelDefinition(preferredModel);
|
|
@@ -18041,10 +18022,10 @@ function initializeConsoleStore() {
|
|
|
18041
18022
|
globalConsoleMessages = [];
|
|
18042
18023
|
globalErrorCount = 0;
|
|
18043
18024
|
notifyListeners();
|
|
18044
|
-
coreEvents.off(
|
|
18045
|
-
coreEvents.off(
|
|
18046
|
-
coreEvents.on(
|
|
18047
|
-
coreEvents.on(
|
|
18025
|
+
coreEvents.off("console-log" /* ConsoleLog */, handleConsoleLog);
|
|
18026
|
+
coreEvents.off("output" /* Output */, handleOutput);
|
|
18027
|
+
coreEvents.on("console-log" /* ConsoleLog */, handleConsoleLog);
|
|
18028
|
+
coreEvents.on("output" /* Output */, handleOutput);
|
|
18048
18029
|
}
|
|
18049
18030
|
function notifyListeners() {
|
|
18050
18031
|
for (const listener of listeners) {
|
|
@@ -20181,7 +20162,7 @@ function usePromptCompletion({
|
|
|
20181
20162
|
{ model: "prompt-completion" },
|
|
20182
20163
|
contents,
|
|
20183
20164
|
signal,
|
|
20184
|
-
|
|
20165
|
+
"utility_autocomplete" /* UTILITY_AUTOCOMPLETE */
|
|
20185
20166
|
);
|
|
20186
20167
|
if (signal.aborted) {
|
|
20187
20168
|
return;
|
|
@@ -22260,9 +22241,9 @@ var InputPrompt = ({
|
|
|
22260
22241
|
onSuggestionsVisibilityChange(shouldShowSuggestions);
|
|
22261
22242
|
}
|
|
22262
22243
|
}, [shouldShowSuggestions, onSuggestionsVisibilityChange]);
|
|
22263
|
-
const showAutoAcceptStyling = !shellModeActive && approvalMode ===
|
|
22264
|
-
const showYoloStyling = !shellModeActive && approvalMode ===
|
|
22265
|
-
const showPlanStyling = !shellModeActive && approvalMode ===
|
|
22244
|
+
const showAutoAcceptStyling = !shellModeActive && approvalMode === "autoEdit" /* AUTO_EDIT */;
|
|
22245
|
+
const showYoloStyling = !shellModeActive && approvalMode === "yolo" /* YOLO */;
|
|
22246
|
+
const showPlanStyling = !shellModeActive && approvalMode === "plan" /* PLAN */;
|
|
22266
22247
|
let statusColor;
|
|
22267
22248
|
let statusText = "";
|
|
22268
22249
|
if (shellModeActive) {
|
|
@@ -23096,22 +23077,22 @@ var ApprovalModeIndicator = ({
|
|
|
23096
23077
|
const cycleHint = formatCommand("app.cycleApprovalMode" /* CYCLE_APPROVAL_MODE */);
|
|
23097
23078
|
const yoloHint = formatCommand("app.toggleYolo" /* TOGGLE_YOLO */);
|
|
23098
23079
|
switch (approvalMode) {
|
|
23099
|
-
case
|
|
23080
|
+
case "autoEdit" /* AUTO_EDIT */:
|
|
23100
23081
|
textColor = theme.status.warning;
|
|
23101
23082
|
textContent = "auto-accept edits";
|
|
23102
23083
|
subText = allowPlanMode ? `${cycleHint} to plan` : `${cycleHint} to manual`;
|
|
23103
23084
|
break;
|
|
23104
|
-
case
|
|
23085
|
+
case "plan" /* PLAN */:
|
|
23105
23086
|
textColor = theme.status.success;
|
|
23106
23087
|
textContent = "plan";
|
|
23107
23088
|
subText = `${cycleHint} to manual`;
|
|
23108
23089
|
break;
|
|
23109
|
-
case
|
|
23090
|
+
case "yolo" /* YOLO */:
|
|
23110
23091
|
textColor = theme.status.error;
|
|
23111
23092
|
textContent = "YOLO";
|
|
23112
23093
|
subText = yoloHint;
|
|
23113
23094
|
break;
|
|
23114
|
-
case
|
|
23095
|
+
case "default" /* DEFAULT */:
|
|
23115
23096
|
default:
|
|
23116
23097
|
textColor = theme.text.accent;
|
|
23117
23098
|
textContent = "";
|
|
@@ -23159,7 +23140,7 @@ var useComposerStatus = () => {
|
|
|
23159
23140
|
(item) => item.type === "tool_group"
|
|
23160
23141
|
).some(
|
|
23161
23142
|
(item) => item.tools.some(
|
|
23162
|
-
(tool) => tool.status ===
|
|
23143
|
+
(tool) => tool.status === "awaiting_approval" /* AwaitingApproval */
|
|
23163
23144
|
)
|
|
23164
23145
|
),
|
|
23165
23146
|
[uiState.pendingHistoryItems]
|
|
@@ -23174,13 +23155,13 @@ var useComposerStatus = () => {
|
|
|
23174
23155
|
const hideMinimalModeHintWhileBusy = !uiState.cleanUiDetailsVisible && (showLoadingIndicator || uiState.activeHooks.length > 0);
|
|
23175
23156
|
if (hideMinimalModeHintWhileBusy) return null;
|
|
23176
23157
|
switch (showApprovalModeIndicator) {
|
|
23177
|
-
case
|
|
23158
|
+
case "yolo" /* YOLO */:
|
|
23178
23159
|
return { text: "YOLO", color: theme.status.error };
|
|
23179
|
-
case
|
|
23160
|
+
case "plan" /* PLAN */:
|
|
23180
23161
|
return { text: "plan", color: theme.status.success };
|
|
23181
|
-
case
|
|
23162
|
+
case "autoEdit" /* AUTO_EDIT */:
|
|
23182
23163
|
return { text: "auto edit", color: theme.status.warning };
|
|
23183
|
-
case
|
|
23164
|
+
case "default" /* DEFAULT */:
|
|
23184
23165
|
default:
|
|
23185
23166
|
return null;
|
|
23186
23167
|
}
|
|
@@ -23542,7 +23523,7 @@ var ConfigInitDisplay = ({
|
|
|
23542
23523
|
let connected = 0;
|
|
23543
23524
|
const connecting = [];
|
|
23544
23525
|
for (const [name, client] of clients.entries()) {
|
|
23545
|
-
if (client.getStatus() ===
|
|
23526
|
+
if (client.getStatus() === "connected" /* CONNECTED */) {
|
|
23546
23527
|
connected++;
|
|
23547
23528
|
} else {
|
|
23548
23529
|
connecting.push(name);
|
|
@@ -23564,9 +23545,9 @@ var ConfigInitDisplay = ({
|
|
|
23564
23545
|
);
|
|
23565
23546
|
}
|
|
23566
23547
|
};
|
|
23567
|
-
coreEvents.on(
|
|
23548
|
+
coreEvents.on("mcp-client-update" /* McpClientUpdate */, onChange);
|
|
23568
23549
|
return () => {
|
|
23569
|
-
coreEvents.off(
|
|
23550
|
+
coreEvents.off("mcp-client-update" /* McpClientUpdate */, onChange);
|
|
23570
23551
|
};
|
|
23571
23552
|
}, [initialMessage]);
|
|
23572
23553
|
return /* @__PURE__ */ (0, import_jsx_runtime122.jsx)(Box_default, { marginTop: 1, children: /* @__PURE__ */ (0, import_jsx_runtime122.jsxs)(Text, { children: [
|
|
@@ -24287,7 +24268,7 @@ var useExecutionLifecycle = (addItemToHistory, setPendingHistoryItem, onExec, on
|
|
|
24287
24268
|
callId,
|
|
24288
24269
|
name: SHELL_COMMAND_NAME,
|
|
24289
24270
|
description: rawQuery,
|
|
24290
|
-
status:
|
|
24271
|
+
status: "executing" /* Executing */,
|
|
24291
24272
|
isClientInitiated: true,
|
|
24292
24273
|
resultDisplay: "",
|
|
24293
24274
|
confirmationDetails: void 0
|
|
@@ -24428,7 +24409,7 @@ __code=$?; pwd > ${escapedPwdFilePath}; exit $__code`;
|
|
|
24428
24409
|
mainContent = result.output.trim() || "(Command produced no output)";
|
|
24429
24410
|
}
|
|
24430
24411
|
let finalOutput = result.ansiOutput && result.ansiOutput.length > 0 ? result.ansiOutput : mainContent;
|
|
24431
|
-
let finalStatus =
|
|
24412
|
+
let finalStatus = "success" /* Success */;
|
|
24432
24413
|
const prependToAnsiOutput = (output, text) => {
|
|
24433
24414
|
const newLines = text.split("\n").map((line) => [
|
|
24434
24415
|
{
|
|
@@ -24447,20 +24428,20 @@ __code=$?; pwd > ${escapedPwdFilePath}; exit $__code`;
|
|
|
24447
24428
|
};
|
|
24448
24429
|
let prefix = "";
|
|
24449
24430
|
if (result.error) {
|
|
24450
|
-
finalStatus =
|
|
24431
|
+
finalStatus = "error" /* Error */;
|
|
24451
24432
|
prefix = result.error.message;
|
|
24452
24433
|
} else if (result.aborted) {
|
|
24453
|
-
finalStatus =
|
|
24434
|
+
finalStatus = "cancelled" /* Cancelled */;
|
|
24454
24435
|
prefix = "Command was cancelled.";
|
|
24455
24436
|
} else if (result.backgrounded) {
|
|
24456
|
-
finalStatus =
|
|
24437
|
+
finalStatus = "success" /* Success */;
|
|
24457
24438
|
finalOutput = `Command moved to background (PID: ${result.pid}). Output hidden. Press Ctrl+B to view.`;
|
|
24458
24439
|
mainContent = finalOutput;
|
|
24459
24440
|
} else if (result.signal) {
|
|
24460
|
-
finalStatus =
|
|
24441
|
+
finalStatus = "error" /* Error */;
|
|
24461
24442
|
prefix = `Command terminated by signal: ${result.signal}.`;
|
|
24462
24443
|
} else if (result.exitCode !== 0) {
|
|
24463
|
-
finalStatus =
|
|
24444
|
+
finalStatus = "error" /* Error */;
|
|
24464
24445
|
prefix = `Command exited with code ${result.exitCode}.`;
|
|
24465
24446
|
}
|
|
24466
24447
|
if (prefix) {
|
|
@@ -24486,7 +24467,7 @@ ${mainContent}`;
|
|
|
24486
24467
|
status: finalStatus,
|
|
24487
24468
|
resultDisplay: finalOutput
|
|
24488
24469
|
};
|
|
24489
|
-
if (finalStatus !==
|
|
24470
|
+
if (finalStatus !== "cancelled" /* Cancelled */) {
|
|
24490
24471
|
addItemToHistory(
|
|
24491
24472
|
{
|
|
24492
24473
|
type: "tool_group",
|
|
@@ -25496,13 +25477,13 @@ function useQuotaAndFallback({
|
|
|
25496
25477
|
error.retryDelayMs ? `Access resets at ${getResetTimeMessage(error.retryDelayMs)}.` : null,
|
|
25497
25478
|
`/stats model for usage details`,
|
|
25498
25479
|
`/model to switch models.`,
|
|
25499
|
-
contentGeneratorConfig?.authType ===
|
|
25480
|
+
contentGeneratorConfig?.authType === "oauth-personal" /* LOGIN_WITH_GOOGLE */ ? `/auth to switch to API key.` : null
|
|
25500
25481
|
].filter(Boolean);
|
|
25501
25482
|
message = messageLines.join("\n");
|
|
25502
25483
|
}
|
|
25503
25484
|
} else if (error instanceof ModelNotFoundError) {
|
|
25504
25485
|
isModelNotFoundError = true;
|
|
25505
|
-
if (contentGeneratorConfig?.authType ===
|
|
25486
|
+
if (contentGeneratorConfig?.authType === "vertex-ai" /* USE_VERTEX_AI */ && VALID_GEMINI_MODELS.has(failedModel)) {
|
|
25506
25487
|
const location = process.env["GOOGLE_CLOUD_LOCATION"] || "your configured region";
|
|
25507
25488
|
const messageLines = [
|
|
25508
25489
|
`Model "${failedModel}" is not available in region "${location}".`,
|
|
@@ -25696,7 +25677,7 @@ var useEditorSettings = (loadedSettings, setEditorError, addItem) => {
|
|
|
25696
25677
|
);
|
|
25697
25678
|
setEditorError(null);
|
|
25698
25679
|
setIsEditorDialogOpen(false);
|
|
25699
|
-
coreEvents.emit(
|
|
25680
|
+
coreEvents.emit("editor-selected" /* EditorSelected */, { editor: editorType });
|
|
25700
25681
|
} catch (error) {
|
|
25701
25682
|
setEditorError(`Failed to set editor preference: ${error}`);
|
|
25702
25683
|
}
|
|
@@ -25705,7 +25686,7 @@ var useEditorSettings = (loadedSettings, setEditorError, addItem) => {
|
|
|
25705
25686
|
);
|
|
25706
25687
|
const exitEditorDialog = (0, import_react89.useCallback)(() => {
|
|
25707
25688
|
setIsEditorDialogOpen(false);
|
|
25708
|
-
coreEvents.emit(
|
|
25689
|
+
coreEvents.emit("editor-selected" /* EditorSelected */, { editor: void 0 });
|
|
25709
25690
|
}, []);
|
|
25710
25691
|
return {
|
|
25711
25692
|
isEditorDialogOpen,
|
|
@@ -26082,7 +26063,7 @@ var useSlashCommandProcessor = (config, settings, addItem, clearItems, loadHisto
|
|
|
26082
26063
|
canonicalPath: resolvedCommandPath
|
|
26083
26064
|
} = parseSlashCommand(trimmed, commands);
|
|
26084
26065
|
if (!commandToExecute) {
|
|
26085
|
-
const isMcpLoading = config?.getMcpClientManager()?.getDiscoveryState() ===
|
|
26066
|
+
const isMcpLoading = config?.getMcpClientManager()?.getDiscoveryState() === "in_progress" /* IN_PROGRESS */;
|
|
26086
26067
|
if (isMcpLoading) {
|
|
26087
26068
|
setIsProcessing(true);
|
|
26088
26069
|
if (addToHistory) {
|
|
@@ -26262,7 +26243,7 @@ var useSlashCommandProcessor = (config, settings, addItem, clearItems, loadHisto
|
|
|
26262
26243
|
onConfirm: async (resolvedOutcome) => {
|
|
26263
26244
|
resolve3({
|
|
26264
26245
|
outcome: resolvedOutcome,
|
|
26265
|
-
approvedCommands: resolvedOutcome ===
|
|
26246
|
+
approvedCommands: resolvedOutcome === "cancel" /* Cancel */ ? [] : result.commandsToConfirm
|
|
26266
26247
|
});
|
|
26267
26248
|
}
|
|
26268
26249
|
};
|
|
@@ -26270,7 +26251,7 @@ var useSlashCommandProcessor = (config, settings, addItem, clearItems, loadHisto
|
|
|
26270
26251
|
callId,
|
|
26271
26252
|
name: "Expansion",
|
|
26272
26253
|
description: "Command expansion needs shell access",
|
|
26273
|
-
status:
|
|
26254
|
+
status: "awaiting_approval" /* AwaitingApproval */,
|
|
26274
26255
|
isClientInitiated: true,
|
|
26275
26256
|
resultDisplay: void 0,
|
|
26276
26257
|
confirmationDetails
|
|
@@ -26281,7 +26262,7 @@ var useSlashCommandProcessor = (config, settings, addItem, clearItems, loadHisto
|
|
|
26281
26262
|
});
|
|
26282
26263
|
});
|
|
26283
26264
|
setPendingItem(null);
|
|
26284
|
-
if (outcome ===
|
|
26265
|
+
if (outcome === "cancel" /* Cancel */ || !approvedCommands || approvedCommands.length === 0) {
|
|
26285
26266
|
addItem(
|
|
26286
26267
|
{
|
|
26287
26268
|
type: "info" /* INFO */,
|
|
@@ -26291,7 +26272,7 @@ var useSlashCommandProcessor = (config, settings, addItem, clearItems, loadHisto
|
|
|
26291
26272
|
);
|
|
26292
26273
|
return { type: "handled" };
|
|
26293
26274
|
}
|
|
26294
|
-
if (outcome ===
|
|
26275
|
+
if (outcome === "proceed_always" /* ProceedAlways */) {
|
|
26295
26276
|
setSessionShellAllowlist(
|
|
26296
26277
|
(prev) => /* @__PURE__ */ new Set([...prev, ...approvedCommands])
|
|
26297
26278
|
);
|
|
@@ -26767,7 +26748,7 @@ function mapToDisplay(toolOrTools, options = {}) {
|
|
|
26767
26748
|
let description;
|
|
26768
26749
|
let renderOutputAsMarkdown = false;
|
|
26769
26750
|
const displayName = call.tool?.displayName ?? call.request.name;
|
|
26770
|
-
if (call.status ===
|
|
26751
|
+
if (call.status === "error" /* Error */) {
|
|
26771
26752
|
description = JSON.stringify(call.request.args);
|
|
26772
26753
|
} else {
|
|
26773
26754
|
description = call.invocation.getDescription();
|
|
@@ -26790,27 +26771,27 @@ function mapToDisplay(toolOrTools, options = {}) {
|
|
|
26790
26771
|
let progress = void 0;
|
|
26791
26772
|
let progressTotal = void 0;
|
|
26792
26773
|
switch (call.status) {
|
|
26793
|
-
case
|
|
26774
|
+
case "success" /* Success */:
|
|
26794
26775
|
resultDisplay = call.response.resultDisplay;
|
|
26795
26776
|
outputFile = call.response.outputFile;
|
|
26796
26777
|
break;
|
|
26797
|
-
case
|
|
26798
|
-
case
|
|
26778
|
+
case "error" /* Error */:
|
|
26779
|
+
case "cancelled" /* Cancelled */:
|
|
26799
26780
|
resultDisplay = call.response.resultDisplay;
|
|
26800
26781
|
break;
|
|
26801
|
-
case
|
|
26782
|
+
case "awaiting_approval" /* AwaitingApproval */:
|
|
26802
26783
|
correlationId = call.correlationId;
|
|
26803
26784
|
confirmationDetails = call.confirmationDetails;
|
|
26804
26785
|
break;
|
|
26805
|
-
case
|
|
26786
|
+
case "executing" /* Executing */:
|
|
26806
26787
|
resultDisplay = call.liveOutput;
|
|
26807
26788
|
ptyId = call.pid;
|
|
26808
26789
|
progressMessage = call.progressMessage;
|
|
26809
26790
|
progress = call.progress;
|
|
26810
26791
|
progressTotal = call.progressTotal;
|
|
26811
26792
|
break;
|
|
26812
|
-
case
|
|
26813
|
-
case
|
|
26793
|
+
case "scheduled" /* Scheduled */:
|
|
26794
|
+
case "validating" /* Validating */:
|
|
26814
26795
|
break;
|
|
26815
26796
|
default: {
|
|
26816
26797
|
const exhaustiveCheck = call;
|
|
@@ -26881,7 +26862,7 @@ function useToolScheduler(onComplete, config, getPreferredEditor) {
|
|
|
26881
26862
|
const handler = (event) => {
|
|
26882
26863
|
const isRoot = event.schedulerId === ROOT_SCHEDULER_ID;
|
|
26883
26864
|
const hasExecuting = event.toolCalls.some(
|
|
26884
|
-
(tc) => tc.status ===
|
|
26865
|
+
(tc) => tc.status === "executing" /* Executing */ || (tc.status === "success" /* Success */ || tc.status === "error" /* Error */) && "tailToolCallRequest" in tc && tc.tailToolCallRequest != null
|
|
26885
26866
|
);
|
|
26886
26867
|
if (hasExecuting) {
|
|
26887
26868
|
setLastToolOutputTime(Date.now());
|
|
@@ -26890,7 +26871,7 @@ function useToolScheduler(onComplete, config, getPreferredEditor) {
|
|
|
26890
26871
|
const prevCalls = prev[event.schedulerId] ?? [];
|
|
26891
26872
|
const prevCallIds = new Set(prevCalls.map((tc) => tc.request.callId));
|
|
26892
26873
|
const filteredToolCalls = isRoot ? event.toolCalls : event.toolCalls.filter(
|
|
26893
|
-
(tc) => tc.status ===
|
|
26874
|
+
(tc) => tc.status === "awaiting_approval" /* AwaitingApproval */ || prevCallIds.has(tc.request.callId)
|
|
26894
26875
|
);
|
|
26895
26876
|
if (!isRoot && filteredToolCalls.length === 0 && prevCalls.length === 0) {
|
|
26896
26877
|
return prev;
|
|
@@ -26902,9 +26883,9 @@ function useToolScheduler(onComplete, config, getPreferredEditor) {
|
|
|
26902
26883
|
};
|
|
26903
26884
|
});
|
|
26904
26885
|
};
|
|
26905
|
-
messageBus.subscribe(
|
|
26886
|
+
messageBus.subscribe("tool-calls-update" /* TOOL_CALLS_UPDATE */, handler);
|
|
26906
26887
|
return () => {
|
|
26907
|
-
messageBus.unsubscribe(
|
|
26888
|
+
messageBus.unsubscribe("tool-calls-update" /* TOOL_CALLS_UPDATE */, handler);
|
|
26908
26889
|
};
|
|
26909
26890
|
}, [messageBus, internalAdaptToolCalls]);
|
|
26910
26891
|
(0, import_react96.useEffect)(() => {
|
|
@@ -26926,9 +26907,9 @@ function useToolScheduler(onComplete, config, getPreferredEditor) {
|
|
|
26926
26907
|
};
|
|
26927
26908
|
});
|
|
26928
26909
|
};
|
|
26929
|
-
messageBus.subscribe(
|
|
26910
|
+
messageBus.subscribe("subagent-activity" /* SUBAGENT_ACTIVITY */, handler);
|
|
26930
26911
|
return () => {
|
|
26931
|
-
messageBus.unsubscribe(
|
|
26912
|
+
messageBus.unsubscribe("subagent-activity" /* SUBAGENT_ACTIVITY */, handler);
|
|
26932
26913
|
};
|
|
26933
26914
|
}, [messageBus]);
|
|
26934
26915
|
const schedule = (0, import_react96.useCallback)(
|
|
@@ -27027,8 +27008,8 @@ function adaptToolCalls(coreCalls, prevTracked) {
|
|
|
27027
27008
|
const prev = prevMap.get(coreCall.request.callId);
|
|
27028
27009
|
const responseSubmittedToGemini = prev?.responseSubmittedToGemini ?? false;
|
|
27029
27010
|
let status = coreCall.status;
|
|
27030
|
-
if ((status ===
|
|
27031
|
-
status =
|
|
27011
|
+
if ((status === "success" /* Success */ || status === "error" /* Error */) && "tailToolCallRequest" in coreCall && coreCall.tailToolCallRequest != null) {
|
|
27012
|
+
status = "executing" /* Executing */;
|
|
27032
27013
|
}
|
|
27033
27014
|
return {
|
|
27034
27015
|
...coreCall,
|
|
@@ -27060,7 +27041,7 @@ function getBackgroundedToolInfo(toolCall) {
|
|
|
27060
27041
|
};
|
|
27061
27042
|
}
|
|
27062
27043
|
function isBackgroundableExecutingToolCall(toolCall) {
|
|
27063
|
-
return toolCall.status ===
|
|
27044
|
+
return toolCall.status === "executing" /* Executing */ && typeof toolCall.pid === "number";
|
|
27064
27045
|
}
|
|
27065
27046
|
function showCitations(settings) {
|
|
27066
27047
|
const enabled = settings.merged.ui.showCitations;
|
|
@@ -27070,14 +27051,14 @@ function showCitations(settings) {
|
|
|
27070
27051
|
return true;
|
|
27071
27052
|
}
|
|
27072
27053
|
function calculateStreamingState(isResponding, toolCalls) {
|
|
27073
|
-
if (toolCalls.some((tc) => tc.status ===
|
|
27054
|
+
if (toolCalls.some((tc) => tc.status === "awaiting_approval" /* AwaitingApproval */)) {
|
|
27074
27055
|
return "waiting_for_confirmation" /* WaitingForConfirmation */;
|
|
27075
27056
|
}
|
|
27076
27057
|
const isAnyToolActive = toolCalls.some((tc) => {
|
|
27077
|
-
if (tc.status ===
|
|
27058
|
+
if (tc.status === "executing" /* Executing */ || tc.status === "scheduled" /* Scheduled */ || tc.status === "validating" /* Validating */) {
|
|
27078
27059
|
return true;
|
|
27079
27060
|
}
|
|
27080
|
-
if (tc.status ===
|
|
27061
|
+
if (tc.status === "success" /* Success */ || tc.status === "error" /* Error */ || tc.status === "cancelled" /* Cancelled */) {
|
|
27081
27062
|
return !tc.responseSubmittedToGemini;
|
|
27082
27063
|
}
|
|
27083
27064
|
return false;
|
|
@@ -27124,9 +27105,9 @@ var useGeminiStream = (geminiClient, history, addItem, config, settings, onDebug
|
|
|
27124
27105
|
}
|
|
27125
27106
|
setRetryStatus(payload);
|
|
27126
27107
|
};
|
|
27127
|
-
coreEvents.on(
|
|
27108
|
+
coreEvents.on("retry-attempt" /* RetryAttempt */, handleRetryAttempt);
|
|
27128
27109
|
return () => {
|
|
27129
|
-
coreEvents.off(
|
|
27110
|
+
coreEvents.off("retry-attempt" /* RetryAttempt */, handleRetryAttempt);
|
|
27130
27111
|
};
|
|
27131
27112
|
}, [isRespondingRef]);
|
|
27132
27113
|
const [
|
|
@@ -27259,12 +27240,12 @@ var useGeminiStream = (geminiClient, history, addItem, config, settings, onDebug
|
|
|
27259
27240
|
const tc = toolCalls[i];
|
|
27260
27241
|
if (pushedToolCallIdsRef.current.has(tc.request.callId)) continue;
|
|
27261
27242
|
if (tc.status === "success" || tc.status === "error" || tc.status === "cancelled") {
|
|
27262
|
-
const isAgent = tc.tool?.kind ===
|
|
27243
|
+
const isAgent = tc.tool?.kind === "agent" /* Agent */;
|
|
27263
27244
|
if (isAgent) {
|
|
27264
27245
|
let contigAgentsComplete = true;
|
|
27265
27246
|
for (let j = i + 1; j < toolCalls.length; j++) {
|
|
27266
27247
|
const nextTc = toolCalls[j];
|
|
27267
|
-
if (nextTc.tool?.kind ===
|
|
27248
|
+
if (nextTc.tool?.kind === "agent" /* Agent */) {
|
|
27268
27249
|
if (nextTc.status !== "success" && nextTc.status !== "error" && nextTc.status !== "cancelled") {
|
|
27269
27250
|
contigAgentsComplete = false;
|
|
27270
27251
|
break;
|
|
@@ -27290,7 +27271,7 @@ var useGeminiStream = (geminiClient, history, addItem, config, settings, onDebug
|
|
|
27290
27271
|
let currentGroup = [];
|
|
27291
27272
|
for (const tc of toolsToPush) {
|
|
27292
27273
|
newPushed.add(tc.request.callId);
|
|
27293
|
-
if (tc.tool?.kind ===
|
|
27274
|
+
if (tc.tool?.kind === "agent" /* Agent */) {
|
|
27294
27275
|
currentGroup.push(tc);
|
|
27295
27276
|
} else {
|
|
27296
27277
|
if (currentGroup.length > 0) {
|
|
@@ -27443,7 +27424,7 @@ var useGeminiStream = (geminiClient, history, addItem, config, settings, onDebug
|
|
|
27443
27424
|
prevActiveShellPtyIdRef.current = activeShellPtyId;
|
|
27444
27425
|
}, [activeShellPtyId, addItem, setIsResponding]);
|
|
27445
27426
|
(0, import_react97.useEffect)(() => {
|
|
27446
|
-
if (config.getApprovalMode() ===
|
|
27427
|
+
if (config.getApprovalMode() === "yolo" /* YOLO */ && streamingState === "idle" /* Idle */) {
|
|
27447
27428
|
const lastUserMessageIndex = history.findLastIndex(
|
|
27448
27429
|
(item) => item.type === "user" /* USER */
|
|
27449
27430
|
);
|
|
@@ -27511,7 +27492,7 @@ var useGeminiStream = (geminiClient, history, addItem, config, settings, onDebug
|
|
|
27511
27492
|
return;
|
|
27512
27493
|
}
|
|
27513
27494
|
const hasActiveTools = toolCalls.some(
|
|
27514
|
-
(tc) => tc.status ===
|
|
27495
|
+
(tc) => tc.status === "executing" /* Executing */ || tc.status === "scheduled" /* Scheduled */ || tc.status === "validating" /* Validating */
|
|
27515
27496
|
);
|
|
27516
27497
|
if (streamingState === "idle" /* Idle */ && !isRespondingRef.current && !hasActiveTools) {
|
|
27517
27498
|
if (clearBuffer) {
|
|
@@ -27538,7 +27519,7 @@ var useGeminiStream = (geminiClient, history, addItem, config, settings, onDebug
|
|
|
27538
27519
|
if (tool.name === SHELL_COMMAND_NAME) {
|
|
27539
27520
|
return {
|
|
27540
27521
|
...tool,
|
|
27541
|
-
status:
|
|
27522
|
+
status: "cancelled" /* Cancelled */,
|
|
27542
27523
|
resultDisplay: tool.resultDisplay
|
|
27543
27524
|
};
|
|
27544
27525
|
}
|
|
@@ -27603,7 +27584,7 @@ var useGeminiStream = (geminiClient, history, addItem, config, settings, onDebug
|
|
|
27603
27584
|
let localQueryToSendToGemini = null;
|
|
27604
27585
|
if (typeof query === "string") {
|
|
27605
27586
|
const trimmedQuery = query.trim();
|
|
27606
|
-
await logger?.logMessage(
|
|
27587
|
+
await logger?.logMessage("user" /* USER */, trimmedQuery);
|
|
27607
27588
|
if (!shellModeActive) {
|
|
27608
27589
|
const slashCommandResult = isSlashCommand(trimmedQuery) ? await handleSlashCommand(trimmedQuery) : false;
|
|
27609
27590
|
if (slashCommandResult) {
|
|
@@ -27759,7 +27740,7 @@ var useGeminiStream = (geminiClient, history, addItem, config, settings, onDebug
|
|
|
27759
27740
|
if (pendingHistoryItemRef.current) {
|
|
27760
27741
|
if (pendingHistoryItemRef.current.type === "tool_group") {
|
|
27761
27742
|
const updatedTools = pendingHistoryItemRef.current.tools.map(
|
|
27762
|
-
(tool) => tool.status ===
|
|
27743
|
+
(tool) => tool.status === "validating" /* Validating */ || tool.status === "scheduled" /* Scheduled */ || tool.status === "awaiting_approval" /* AwaitingApproval */ || tool.status === "executing" /* Executing */ ? { ...tool, status: "cancelled" /* Cancelled */ } : tool
|
|
27763
27744
|
);
|
|
27764
27745
|
const pendingItem = {
|
|
27765
27746
|
...pendingHistoryItemRef.current,
|
|
@@ -28051,15 +28032,15 @@ var useGeminiStream = (geminiClient, history, addItem, config, settings, onDebug
|
|
|
28051
28032
|
let geminiMessageBuffer = "";
|
|
28052
28033
|
const toolCallRequests = [];
|
|
28053
28034
|
for await (const event of stream) {
|
|
28054
|
-
if (event.type !==
|
|
28035
|
+
if (event.type !== "thought" /* Thought */ && thoughtRef.current !== null) {
|
|
28055
28036
|
setThought(null);
|
|
28056
28037
|
}
|
|
28057
28038
|
switch (event.type) {
|
|
28058
|
-
case
|
|
28039
|
+
case "thought" /* Thought */:
|
|
28059
28040
|
setLastGeminiActivityTime(Date.now());
|
|
28060
28041
|
handleThoughtEvent(event.value, userMessageTimestamp);
|
|
28061
28042
|
break;
|
|
28062
|
-
case
|
|
28043
|
+
case "content" /* Content */:
|
|
28063
28044
|
setLastGeminiActivityTime(Date.now());
|
|
28064
28045
|
geminiMessageBuffer = handleContentEvent(
|
|
28065
28046
|
event.value,
|
|
@@ -28067,16 +28048,16 @@ var useGeminiStream = (geminiClient, history, addItem, config, settings, onDebug
|
|
|
28067
28048
|
userMessageTimestamp
|
|
28068
28049
|
);
|
|
28069
28050
|
break;
|
|
28070
|
-
case
|
|
28051
|
+
case "tool_call_request" /* ToolCallRequest */:
|
|
28071
28052
|
toolCallRequests.push(event.value);
|
|
28072
28053
|
break;
|
|
28073
|
-
case
|
|
28054
|
+
case "user_cancelled" /* UserCancelled */:
|
|
28074
28055
|
handleUserCancelledEvent(userMessageTimestamp);
|
|
28075
28056
|
break;
|
|
28076
|
-
case
|
|
28057
|
+
case "error" /* Error */:
|
|
28077
28058
|
handleErrorEvent(event.value, userMessageTimestamp);
|
|
28078
28059
|
break;
|
|
28079
|
-
case
|
|
28060
|
+
case "agent_execution_stopped" /* AgentExecutionStopped */:
|
|
28080
28061
|
handleAgentExecutionStoppedEvent(
|
|
28081
28062
|
event.value.reason,
|
|
28082
28063
|
userMessageTimestamp,
|
|
@@ -28084,7 +28065,7 @@ var useGeminiStream = (geminiClient, history, addItem, config, settings, onDebug
|
|
|
28084
28065
|
event.value.contextCleared
|
|
28085
28066
|
);
|
|
28086
28067
|
break;
|
|
28087
|
-
case
|
|
28068
|
+
case "agent_execution_blocked" /* AgentExecutionBlocked */:
|
|
28088
28069
|
handleAgentExecutionBlockedEvent(
|
|
28089
28070
|
event.value.reason,
|
|
28090
28071
|
userMessageTimestamp,
|
|
@@ -28092,36 +28073,36 @@ var useGeminiStream = (geminiClient, history, addItem, config, settings, onDebug
|
|
|
28092
28073
|
event.value.contextCleared
|
|
28093
28074
|
);
|
|
28094
28075
|
break;
|
|
28095
|
-
case
|
|
28076
|
+
case "chat_compressed" /* ChatCompressed */:
|
|
28096
28077
|
handleChatCompressionEvent(event.value, userMessageTimestamp);
|
|
28097
28078
|
break;
|
|
28098
|
-
case
|
|
28099
|
-
case
|
|
28079
|
+
case "tool_call_confirmation" /* ToolCallConfirmation */:
|
|
28080
|
+
case "tool_call_response" /* ToolCallResponse */:
|
|
28100
28081
|
break;
|
|
28101
|
-
case
|
|
28082
|
+
case "max_session_turns" /* MaxSessionTurns */:
|
|
28102
28083
|
handleMaxSessionTurnsEvent();
|
|
28103
28084
|
break;
|
|
28104
|
-
case
|
|
28085
|
+
case "context_window_will_overflow" /* ContextWindowWillOverflow */:
|
|
28105
28086
|
handleContextWindowWillOverflowEvent(
|
|
28106
28087
|
event.value.estimatedRequestTokenCount,
|
|
28107
28088
|
event.value.remainingTokenCount
|
|
28108
28089
|
);
|
|
28109
28090
|
break;
|
|
28110
|
-
case
|
|
28091
|
+
case "finished" /* Finished */:
|
|
28111
28092
|
handleFinishedEvent(event, userMessageTimestamp);
|
|
28112
28093
|
break;
|
|
28113
|
-
case
|
|
28094
|
+
case "citation" /* Citation */:
|
|
28114
28095
|
handleCitationEvent(event.value, userMessageTimestamp);
|
|
28115
28096
|
break;
|
|
28116
|
-
case
|
|
28097
|
+
case "model_info" /* ModelInfo */:
|
|
28117
28098
|
handleChatModelEvent(event.value, userMessageTimestamp);
|
|
28118
28099
|
break;
|
|
28119
|
-
case
|
|
28100
|
+
case "loop_detected" /* LoopDetected */:
|
|
28120
28101
|
loopDetectedRef.current = true;
|
|
28121
28102
|
break;
|
|
28122
|
-
case
|
|
28103
|
+
case "retry" /* Retry */:
|
|
28123
28104
|
break;
|
|
28124
|
-
case
|
|
28105
|
+
case "invalid_stream" /* InvalidStream */:
|
|
28125
28106
|
handleInvalidStreamEvent(event.value, userMessageTimestamp);
|
|
28126
28107
|
break;
|
|
28127
28108
|
default: {
|
|
@@ -28175,7 +28156,7 @@ var useGeminiStream = (geminiClient, history, addItem, config, settings, onDebug
|
|
|
28175
28156
|
const submitQuery = (0, import_react97.useCallback)(
|
|
28176
28157
|
async (query, options, prompt_id) => runInDevTraceSpan(
|
|
28177
28158
|
{
|
|
28178
|
-
operation: options?.isContinuation ?
|
|
28159
|
+
operation: options?.isContinuation ? "system_prompt" /* SystemPrompt */ : "user_prompt" /* UserPrompt */,
|
|
28179
28160
|
sessionId: config.getSessionId()
|
|
28180
28161
|
},
|
|
28181
28162
|
async ({ metadata: spanMetadata }) => {
|
|
@@ -28342,7 +28323,7 @@ var useGeminiStream = (geminiClient, history, addItem, config, settings, onDebug
|
|
|
28342
28323
|
submitQueryRef.current = submitQuery;
|
|
28343
28324
|
const handleApprovalModeChange = (0, import_react97.useCallback)(
|
|
28344
28325
|
async (newApprovalMode) => {
|
|
28345
|
-
if (previousApprovalModeRef.current ===
|
|
28326
|
+
if (previousApprovalModeRef.current === "plan" /* PLAN */ && newApprovalMode !== "plan" /* PLAN */ && streamingState === "idle" /* Idle */) {
|
|
28346
28327
|
if (geminiClient) {
|
|
28347
28328
|
try {
|
|
28348
28329
|
await geminiClient.addHistory({
|
|
@@ -28365,11 +28346,11 @@ var useGeminiStream = (geminiClient, history, addItem, config, settings, onDebug
|
|
|
28365
28346
|
}
|
|
28366
28347
|
}
|
|
28367
28348
|
previousApprovalModeRef.current = newApprovalMode;
|
|
28368
|
-
if (newApprovalMode ===
|
|
28349
|
+
if (newApprovalMode === "yolo" /* YOLO */ || newApprovalMode === "autoEdit" /* AUTO_EDIT */) {
|
|
28369
28350
|
let awaitingApprovalCalls = toolCalls.filter(
|
|
28370
28351
|
(call) => call.status === "awaiting_approval" && !call.request.forcedAsk
|
|
28371
28352
|
);
|
|
28372
|
-
if (newApprovalMode ===
|
|
28353
|
+
if (newApprovalMode === "autoEdit" /* AUTO_EDIT */) {
|
|
28373
28354
|
awaitingApprovalCalls = awaitingApprovalCalls.filter((call) => {
|
|
28374
28355
|
if (EDIT_TOOL_NAMES.has(call.request.name)) {
|
|
28375
28356
|
return true;
|
|
@@ -28385,11 +28366,11 @@ var useGeminiStream = (geminiClient, history, addItem, config, settings, onDebug
|
|
|
28385
28366
|
if (call.correlationId) {
|
|
28386
28367
|
try {
|
|
28387
28368
|
await config.getMessageBus().publish({
|
|
28388
|
-
type:
|
|
28369
|
+
type: "tool-confirmation-response" /* TOOL_CONFIRMATION_RESPONSE */,
|
|
28389
28370
|
correlationId: call.correlationId,
|
|
28390
28371
|
confirmed: true,
|
|
28391
28372
|
requiresUserConfirmation: false,
|
|
28392
|
-
outcome:
|
|
28373
|
+
outcome: "proceed_once" /* ProceedOnce */
|
|
28393
28374
|
});
|
|
28394
28375
|
} catch (error) {
|
|
28395
28376
|
debugLogger.warn(
|
|
@@ -28480,14 +28461,14 @@ var useGeminiStream = (geminiClient, history, addItem, config, settings, onDebug
|
|
|
28480
28461
|
);
|
|
28481
28462
|
if (isLowErrorVerbosity) {
|
|
28482
28463
|
suppressedToolErrorCountRef.current += geminiTools.filter(
|
|
28483
|
-
(tc) => tc.status ===
|
|
28464
|
+
(tc) => tc.status === "error" /* Error */
|
|
28484
28465
|
).length;
|
|
28485
28466
|
}
|
|
28486
28467
|
if (geminiTools.length === 0) {
|
|
28487
28468
|
return;
|
|
28488
28469
|
}
|
|
28489
28470
|
const stopExecutionTool = geminiTools.find(
|
|
28490
|
-
(tc) => tc.response.errorType ===
|
|
28471
|
+
(tc) => tc.response.errorType === "stop_execution" /* STOP_EXECUTION */
|
|
28491
28472
|
);
|
|
28492
28473
|
if (stopExecutionTool && stopExecutionTool.response.error) {
|
|
28493
28474
|
maybeAddSuppressedToolErrorNote();
|
|
@@ -28507,9 +28488,9 @@ var useGeminiStream = (geminiClient, history, addItem, config, settings, onDebug
|
|
|
28507
28488
|
(tc) => !isTopicTool2(tc.request.name)
|
|
28508
28489
|
);
|
|
28509
28490
|
const allDeclinableToolsCancelled = declinableTools.length > 0 && declinableTools.every(
|
|
28510
|
-
(tc) => tc.status ===
|
|
28491
|
+
(tc) => tc.status === "cancelled" /* Cancelled */
|
|
28511
28492
|
);
|
|
28512
|
-
const allToolsCancelled = geminiTools.length > 0 && geminiTools.every((tc) => tc.status ===
|
|
28493
|
+
const allToolsCancelled = geminiTools.length > 0 && geminiTools.every((tc) => tc.status === "cancelled" /* Cancelled */);
|
|
28513
28494
|
if (allDeclinableToolsCancelled || allToolsCancelled) {
|
|
28514
28495
|
if (!turnCancelledRef.current) {
|
|
28515
28496
|
addItem({
|
|
@@ -28595,7 +28576,7 @@ var useGeminiStream = (geminiClient, history, addItem, config, settings, onDebug
|
|
|
28595
28576
|
return;
|
|
28596
28577
|
}
|
|
28597
28578
|
const restorableToolCalls = toolCalls.filter(
|
|
28598
|
-
(toolCall) => EDIT_TOOL_NAMES.has(toolCall.request.name) && toolCall.status ===
|
|
28579
|
+
(toolCall) => EDIT_TOOL_NAMES.has(toolCall.request.name) && toolCall.status === "awaiting_approval" /* AwaitingApproval */
|
|
28599
28580
|
);
|
|
28600
28581
|
if (restorableToolCalls.length > 0) {
|
|
28601
28582
|
if (!gitService) {
|
|
@@ -28818,14 +28799,14 @@ var useAgentStream = ({
|
|
|
28818
28799
|
const displayName = legacyState?.displayName ?? event.name;
|
|
28819
28800
|
const isOutputMarkdown = legacyState?.isOutputMarkdown ?? false;
|
|
28820
28801
|
const desc = legacyState?.description ?? "";
|
|
28821
|
-
const fallbackKind =
|
|
28802
|
+
const fallbackKind = "other" /* Other */;
|
|
28822
28803
|
const newCall = {
|
|
28823
28804
|
callId: event.requestId,
|
|
28824
28805
|
name: displayName,
|
|
28825
28806
|
originalRequestName: event.name,
|
|
28826
28807
|
description: desc,
|
|
28827
28808
|
display: event.display,
|
|
28828
|
-
status:
|
|
28809
|
+
status: "scheduled" /* Scheduled */,
|
|
28829
28810
|
isClientInitiated: false,
|
|
28830
28811
|
renderOutputAsMarkdown: isOutputMarkdown,
|
|
28831
28812
|
kind: legacyState?.kind ?? fallbackKind,
|
|
@@ -28843,10 +28824,10 @@ var useAgentStream = ({
|
|
|
28843
28824
|
const evtStatus = legacyState?.status;
|
|
28844
28825
|
let status = tc.status;
|
|
28845
28826
|
if (evtStatus === "executing")
|
|
28846
|
-
status =
|
|
28847
|
-
else if (evtStatus === "error") status =
|
|
28827
|
+
status = "executing" /* Executing */;
|
|
28828
|
+
else if (evtStatus === "error") status = "error" /* Error */;
|
|
28848
28829
|
else if (evtStatus === "success")
|
|
28849
|
-
status =
|
|
28830
|
+
status = "success" /* Success */;
|
|
28850
28831
|
const display = event.display?.result;
|
|
28851
28832
|
const liveOutput = displayContentToString(display) ?? tc.resultDisplay;
|
|
28852
28833
|
const progressMessage = legacyState?.progressMessage ?? tc.progressMessage;
|
|
@@ -28879,7 +28860,7 @@ var useAgentStream = ({
|
|
|
28879
28860
|
const resultDisplay = displayContentToString(display) ?? tc.resultDisplay;
|
|
28880
28861
|
return {
|
|
28881
28862
|
...tc,
|
|
28882
|
-
status: event.isError ?
|
|
28863
|
+
status: event.isError ? "error" /* Error */ : "success" /* Success */,
|
|
28883
28864
|
display: event.display ? { ...tc.display, ...event.display } : tc.display,
|
|
28884
28865
|
resultDisplay,
|
|
28885
28866
|
outputFile
|
|
@@ -28945,7 +28926,7 @@ var useAgentStream = ({
|
|
|
28945
28926
|
if (!options?.isContinuation) {
|
|
28946
28927
|
if (typeof query === "string") {
|
|
28947
28928
|
addItem({ type: "user" /* USER */, text: query }, timestamp);
|
|
28948
|
-
void logger?.logMessage(
|
|
28929
|
+
void logger?.logMessage("user" /* USER */, query);
|
|
28949
28930
|
}
|
|
28950
28931
|
startNewPrompt();
|
|
28951
28932
|
}
|
|
@@ -30476,9 +30457,9 @@ var useFolderTrust = (settings, onTrustChange, addItem) => {
|
|
|
30476
30457
|
const handleFolderTrustSelect = (0, import_react103.useCallback)(
|
|
30477
30458
|
async (choice) => {
|
|
30478
30459
|
const trustLevelMap = {
|
|
30479
|
-
["trust_folder" /* TRUST_FOLDER */]:
|
|
30480
|
-
["trust_parent" /* TRUST_PARENT */]:
|
|
30481
|
-
["do_not_trust" /* DO_NOT_TRUST */]:
|
|
30460
|
+
["trust_folder" /* TRUST_FOLDER */]: "TRUST_FOLDER" /* TRUST_FOLDER */,
|
|
30461
|
+
["trust_parent" /* TRUST_PARENT */]: "TRUST_PARENT" /* TRUST_PARENT */,
|
|
30462
|
+
["do_not_trust" /* DO_NOT_TRUST */]: "DO_NOT_TRUST" /* DO_NOT_TRUST */
|
|
30482
30463
|
};
|
|
30483
30464
|
const trustLevel = trustLevelMap[choice];
|
|
30484
30465
|
if (!trustLevel) return;
|
|
@@ -30497,7 +30478,7 @@ var useFolderTrust = (settings, onTrustChange, addItem) => {
|
|
|
30497
30478
|
}, 100);
|
|
30498
30479
|
return;
|
|
30499
30480
|
}
|
|
30500
|
-
const currentIsTrusted = trustLevel ===
|
|
30481
|
+
const currentIsTrusted = trustLevel === "TRUST_FOLDER" /* TRUST_FOLDER */ || trustLevel === "TRUST_PARENT" /* TRUST_PARENT */;
|
|
30501
30482
|
onTrustChangeRef.current(currentIsTrusted);
|
|
30502
30483
|
setIsTrusted(currentIsTrusted);
|
|
30503
30484
|
const wasTrusted = isTrusted ?? false;
|
|
@@ -31505,7 +31486,7 @@ function useMessageQueue({
|
|
|
31505
31486
|
var import_react105 = __toESM(require_react(), 1);
|
|
31506
31487
|
function useMcpStatus(config) {
|
|
31507
31488
|
const [discoveryState, setDiscoveryState] = (0, import_react105.useState)(
|
|
31508
|
-
() => config.getMcpClientManager()?.getDiscoveryState() ??
|
|
31489
|
+
() => config.getMcpClientManager()?.getDiscoveryState() ?? "not_started" /* NOT_STARTED */
|
|
31509
31490
|
);
|
|
31510
31491
|
const [mcpServerCount, setMcpServerCount] = (0, import_react105.useState)(
|
|
31511
31492
|
() => config.getMcpClientManager()?.getMcpServerCount() ?? 0
|
|
@@ -31518,12 +31499,12 @@ function useMcpStatus(config) {
|
|
|
31518
31499
|
setMcpServerCount(manager.getMcpServerCount());
|
|
31519
31500
|
}
|
|
31520
31501
|
};
|
|
31521
|
-
coreEvents.on(
|
|
31502
|
+
coreEvents.on("mcp-client-update" /* McpClientUpdate */, onChange);
|
|
31522
31503
|
return () => {
|
|
31523
|
-
coreEvents.off(
|
|
31504
|
+
coreEvents.off("mcp-client-update" /* McpClientUpdate */, onChange);
|
|
31524
31505
|
};
|
|
31525
31506
|
}, [config]);
|
|
31526
|
-
const isMcpReady = discoveryState ===
|
|
31507
|
+
const isMcpReady = discoveryState === "completed" /* COMPLETED */ || discoveryState === "not_started" /* NOT_STARTED */ && mcpServerCount === 0;
|
|
31527
31508
|
return {
|
|
31528
31509
|
discoveryState,
|
|
31529
31510
|
mcpServerCount,
|
|
@@ -31550,7 +31531,7 @@ function useApprovalModeIndicator({
|
|
|
31550
31531
|
(key) => {
|
|
31551
31532
|
let nextApprovalMode;
|
|
31552
31533
|
if (keyMatchers["app.toggleYolo" /* TOGGLE_YOLO */](key)) {
|
|
31553
|
-
if (config.isYoloModeDisabled() && config.getApprovalMode() !==
|
|
31534
|
+
if (config.isYoloModeDisabled() && config.getApprovalMode() !== "yolo" /* YOLO */) {
|
|
31554
31535
|
if (addItem) {
|
|
31555
31536
|
let text = "You cannot enter YOLO mode since it is disabled in your settings.";
|
|
31556
31537
|
const adminSettings = config.getRemoteAdminSettings();
|
|
@@ -31568,21 +31549,21 @@ function useApprovalModeIndicator({
|
|
|
31568
31549
|
}
|
|
31569
31550
|
return;
|
|
31570
31551
|
}
|
|
31571
|
-
nextApprovalMode = config.getApprovalMode() ===
|
|
31552
|
+
nextApprovalMode = config.getApprovalMode() === "yolo" /* YOLO */ ? "default" /* DEFAULT */ : "yolo" /* YOLO */;
|
|
31572
31553
|
} else if (keyMatchers["app.cycleApprovalMode" /* CYCLE_APPROVAL_MODE */](key)) {
|
|
31573
31554
|
const currentMode = config.getApprovalMode();
|
|
31574
31555
|
switch (currentMode) {
|
|
31575
|
-
case
|
|
31576
|
-
nextApprovalMode =
|
|
31556
|
+
case "default" /* DEFAULT */:
|
|
31557
|
+
nextApprovalMode = "autoEdit" /* AUTO_EDIT */;
|
|
31577
31558
|
break;
|
|
31578
|
-
case
|
|
31579
|
-
nextApprovalMode = allowPlanMode ?
|
|
31559
|
+
case "autoEdit" /* AUTO_EDIT */:
|
|
31560
|
+
nextApprovalMode = allowPlanMode ? "plan" /* PLAN */ : "default" /* DEFAULT */;
|
|
31580
31561
|
break;
|
|
31581
|
-
case
|
|
31582
|
-
nextApprovalMode =
|
|
31562
|
+
case "plan" /* PLAN */:
|
|
31563
|
+
nextApprovalMode = "default" /* DEFAULT */;
|
|
31583
31564
|
break;
|
|
31584
|
-
case
|
|
31585
|
-
nextApprovalMode =
|
|
31565
|
+
case "yolo" /* YOLO */:
|
|
31566
|
+
nextApprovalMode = "autoEdit" /* AUTO_EDIT */;
|
|
31586
31567
|
break;
|
|
31587
31568
|
default:
|
|
31588
31569
|
}
|
|
@@ -31992,11 +31973,11 @@ var useHookDisplayState = () => {
|
|
|
31992
31973
|
removeHook();
|
|
31993
31974
|
}
|
|
31994
31975
|
};
|
|
31995
|
-
coreEvents.on(
|
|
31996
|
-
coreEvents.on(
|
|
31976
|
+
coreEvents.on("hook-start" /* HookStart */, handleHookStart);
|
|
31977
|
+
coreEvents.on("hook-end" /* HookEnd */, handleHookEnd);
|
|
31997
31978
|
return () => {
|
|
31998
|
-
coreEvents.off(
|
|
31999
|
-
coreEvents.off(
|
|
31979
|
+
coreEvents.off("hook-start" /* HookStart */, handleHookStart);
|
|
31980
|
+
coreEvents.off("hook-end" /* HookEnd */, handleHookEnd);
|
|
32000
31981
|
activeTimeouts.forEach(clearTimeout);
|
|
32001
31982
|
activeTimeouts.clear();
|
|
32002
31983
|
};
|
|
@@ -32835,7 +32816,7 @@ var AppContainer = (props) => {
|
|
|
32835
32816
|
setConfigInitialized(true);
|
|
32836
32817
|
startupProfiler.flush(config);
|
|
32837
32818
|
startAutoMemoryIfEnabled(config);
|
|
32838
|
-
const sessionStartSource = resumedSessionData ?
|
|
32819
|
+
const sessionStartSource = resumedSessionData ? "resume" /* Resume */ : "startup" /* Startup */;
|
|
32839
32820
|
const result = await config.getHookSystem()?.fireSessionStartEvent(sessionStartSource);
|
|
32840
32821
|
if (result) {
|
|
32841
32822
|
const additionalContext = result.getAdditionalContext();
|
|
@@ -32862,7 +32843,7 @@ var AppContainer = (props) => {
|
|
|
32862
32843
|
);
|
|
32863
32844
|
const ideClient = await IdeClient.getInstance();
|
|
32864
32845
|
await ideClient.disconnect();
|
|
32865
|
-
await config?.getHookSystem()?.fireSessionEndEvent(
|
|
32846
|
+
await config?.getHookSystem()?.fireSessionEndEvent("exit" /* Exit */);
|
|
32866
32847
|
};
|
|
32867
32848
|
registerCleanup(cleanupFn);
|
|
32868
32849
|
return () => {
|
|
@@ -32887,11 +32868,11 @@ var AppContainer = (props) => {
|
|
|
32887
32868
|
resetTime: payload.resetTime
|
|
32888
32869
|
});
|
|
32889
32870
|
};
|
|
32890
|
-
coreEvents.on(
|
|
32891
|
-
coreEvents.on(
|
|
32871
|
+
coreEvents.on("model-changed" /* ModelChanged */, handleModelChanged);
|
|
32872
|
+
coreEvents.on("quota-changed" /* QuotaChanged */, handleQuotaChanged);
|
|
32892
32873
|
return () => {
|
|
32893
|
-
coreEvents.off(
|
|
32894
|
-
coreEvents.off(
|
|
32874
|
+
coreEvents.off("model-changed" /* ModelChanged */, handleModelChanged);
|
|
32875
|
+
coreEvents.off("quota-changed" /* QuotaChanged */, handleQuotaChanged);
|
|
32895
32876
|
};
|
|
32896
32877
|
}, [config]);
|
|
32897
32878
|
(0, import_react119.useEffect)(() => {
|
|
@@ -32904,16 +32885,16 @@ var AppContainer = (props) => {
|
|
|
32904
32885
|
const handleAgentsDiscovered = (payload) => {
|
|
32905
32886
|
setNewAgents(payload.agents);
|
|
32906
32887
|
};
|
|
32907
|
-
coreEvents.on(
|
|
32908
|
-
coreEvents.on(
|
|
32909
|
-
coreEvents.on(
|
|
32888
|
+
coreEvents.on("settings-changed" /* SettingsChanged */, handleSettingsChanged);
|
|
32889
|
+
coreEvents.on("admin-settings-changed" /* AdminSettingsChanged */, handleAdminSettingsChanged);
|
|
32890
|
+
coreEvents.on("agents-discovered" /* AgentsDiscovered */, handleAgentsDiscovered);
|
|
32910
32891
|
return () => {
|
|
32911
|
-
coreEvents.off(
|
|
32892
|
+
coreEvents.off("settings-changed" /* SettingsChanged */, handleSettingsChanged);
|
|
32912
32893
|
coreEvents.off(
|
|
32913
|
-
|
|
32894
|
+
"admin-settings-changed" /* AdminSettingsChanged */,
|
|
32914
32895
|
handleAdminSettingsChanged
|
|
32915
32896
|
);
|
|
32916
|
-
coreEvents.off(
|
|
32897
|
+
coreEvents.off("agents-discovered" /* AgentsDiscovered */, handleAgentsDiscovered);
|
|
32917
32898
|
};
|
|
32918
32899
|
}, [settings]);
|
|
32919
32900
|
const { errorCount, clearErrorCount } = useErrorCount();
|
|
@@ -32980,11 +32961,11 @@ var AppContainer = (props) => {
|
|
|
32980
32961
|
exitEditorDialog
|
|
32981
32962
|
} = useEditorSettings(settings, setEditorError, historyManager.addItem);
|
|
32982
32963
|
(0, import_react119.useEffect)(() => {
|
|
32983
|
-
coreEvents.on(
|
|
32984
|
-
coreEvents.on(
|
|
32964
|
+
coreEvents.on("external-editor-closed" /* ExternalEditorClosed */, handleEditorClose);
|
|
32965
|
+
coreEvents.on("request-editor-selection" /* RequestEditorSelection */, openEditorDialog);
|
|
32985
32966
|
return () => {
|
|
32986
|
-
coreEvents.off(
|
|
32987
|
-
coreEvents.off(
|
|
32967
|
+
coreEvents.off("external-editor-closed" /* ExternalEditorClosed */, handleEditorClose);
|
|
32968
|
+
coreEvents.off("request-editor-selection" /* RequestEditorSelection */, openEditorDialog);
|
|
32988
32969
|
};
|
|
32989
32970
|
}, [handleEditorClose, openEditorDialog]);
|
|
32990
32971
|
(0, import_react119.useEffect)(() => {
|
|
@@ -33052,7 +33033,7 @@ var AppContainer = (props) => {
|
|
|
33052
33033
|
errorVerbosity: settings.merged.ui.errorVerbosity
|
|
33053
33034
|
});
|
|
33054
33035
|
const isAuthDialogOpen = authState === "updating" /* Updating */;
|
|
33055
|
-
const isAuthenticating = authState === "unauthenticated" /* Unauthenticated */ && settings.merged.security.auth.selectedType !==
|
|
33036
|
+
const isAuthenticating = authState === "unauthenticated" /* Unauthenticated */ && settings.merged.security.auth.selectedType !== "gemini-api-key" /* USE_GEMINI */;
|
|
33056
33037
|
const isGeminiClientInitialized = config.getGeminiClient()?.isInitialized();
|
|
33057
33038
|
const { loadHistoryForResume, isResuming } = useSessionResume({
|
|
33058
33039
|
config,
|
|
@@ -33080,7 +33061,7 @@ var AppContainer = (props) => {
|
|
|
33080
33061
|
async (authType, scope) => {
|
|
33081
33062
|
if (authType) {
|
|
33082
33063
|
const previousAuthType = config.getContentGeneratorConfig()?.authType ?? "unknown";
|
|
33083
|
-
if (authType ===
|
|
33064
|
+
if (authType === "oauth-personal" /* LOGIN_WITH_GOOGLE */) {
|
|
33084
33065
|
setAuthContext({ requiresRestart: true });
|
|
33085
33066
|
} else {
|
|
33086
33067
|
setAuthContext({});
|
|
@@ -33108,7 +33089,7 @@ var AppContainer = (props) => {
|
|
|
33108
33089
|
);
|
|
33109
33090
|
return;
|
|
33110
33091
|
}
|
|
33111
|
-
if (authType ===
|
|
33092
|
+
if (authType === "oauth-personal" /* LOGIN_WITH_GOOGLE */ && config.isBrowserLaunchSuppressed()) {
|
|
33112
33093
|
writeToStdout(`
|
|
33113
33094
|
----------------------------------------------------------------
|
|
33114
33095
|
Logging in with Google... Restarting Gemini CLI to continue.
|
|
@@ -33131,7 +33112,7 @@ Logging in with Google... Restarting Gemini CLI to continue.
|
|
|
33131
33112
|
}
|
|
33132
33113
|
await saveApiKey(apiKey);
|
|
33133
33114
|
await reloadApiKey();
|
|
33134
|
-
await config.refreshAuth(
|
|
33115
|
+
await config.refreshAuth("gemini-api-key" /* USE_GEMINI */);
|
|
33135
33116
|
setAuthState("authenticated" /* Authenticated */);
|
|
33136
33117
|
} catch (e) {
|
|
33137
33118
|
onAuthError(
|
|
@@ -33156,7 +33137,7 @@ Logging in with Google... Restarting Gemini CLI to continue.
|
|
|
33156
33137
|
`Authentication is enforced to be ${settings.merged.security.auth.enforcedType}, but you are currently using ${settings.merged.security.auth.selectedType}.`
|
|
33157
33138
|
);
|
|
33158
33139
|
} else if (settings.merged.security.auth.selectedType && !settings.merged.security.auth.useExternal) {
|
|
33159
|
-
if (settings.merged.security.auth.selectedType ===
|
|
33140
|
+
if (settings.merged.security.auth.selectedType === "gemini-api-key" /* USE_GEMINI */) {
|
|
33160
33141
|
return;
|
|
33161
33142
|
}
|
|
33162
33143
|
const authMethod = settings.merged.security.auth.selectedType;
|
|
@@ -33292,9 +33273,9 @@ Logging in with Google... Restarting Gemini CLI to continue.
|
|
|
33292
33273
|
}
|
|
33293
33274
|
});
|
|
33294
33275
|
};
|
|
33295
|
-
coreEvents.on(
|
|
33276
|
+
coreEvents.on("consent-request" /* ConsentRequest */, handleConsentRequest);
|
|
33296
33277
|
return () => {
|
|
33297
|
-
coreEvents.off(
|
|
33278
|
+
coreEvents.off("consent-request" /* ConsentRequest */, handleConsentRequest);
|
|
33298
33279
|
};
|
|
33299
33280
|
}, []);
|
|
33300
33281
|
const performMemoryRefresh = (0, import_react119.useCallback)(async () => {
|
|
@@ -33864,7 +33845,7 @@ ${queuedText}` : queuedText;
|
|
|
33864
33845
|
[handleSlashCommand, settings]
|
|
33865
33846
|
);
|
|
33866
33847
|
const isAwaitingLoginRestart = authState === "awaiting_login_restart" /* AwaitingLoginRestart */;
|
|
33867
|
-
const loginRestartMessage = settings.merged.security.auth.selectedType ===
|
|
33848
|
+
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;
|
|
33868
33849
|
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;
|
|
33869
33850
|
const handleGlobalKeypress = (0, import_react119.useCallback)(
|
|
33870
33851
|
(key) => {
|
|
@@ -33954,7 +33935,7 @@ ${queuedText}` : queuedText;
|
|
|
33954
33935
|
if (keyMatchers["app.showErrorDetails" /* SHOW_ERROR_DETAILS */](key)) {
|
|
33955
33936
|
if (settings.merged.general.devtools) {
|
|
33956
33937
|
void (async () => {
|
|
33957
|
-
const { toggleDevToolsPanel } = await import("./devtoolsService-
|
|
33938
|
+
const { toggleDevToolsPanel } = await import("./devtoolsService-MF6JKRUV.js");
|
|
33958
33939
|
await toggleDevToolsPanel(
|
|
33959
33940
|
config,
|
|
33960
33941
|
showErrorDetails,
|
|
@@ -34173,12 +34154,12 @@ ${queuedText}` : queuedText;
|
|
|
34173
34154
|
Date.now()
|
|
34174
34155
|
);
|
|
34175
34156
|
};
|
|
34176
|
-
coreEvents.on(
|
|
34177
|
-
coreEvents.on(
|
|
34157
|
+
coreEvents.on("user-feedback" /* UserFeedback */, handleUserFeedback);
|
|
34158
|
+
coreEvents.on("hook-system-message" /* HookSystemMessage */, handleHookSystemMessage);
|
|
34178
34159
|
coreEvents.drainBacklogs();
|
|
34179
34160
|
return () => {
|
|
34180
|
-
coreEvents.off(
|
|
34181
|
-
coreEvents.off(
|
|
34161
|
+
coreEvents.off("user-feedback" /* UserFeedback */, handleUserFeedback);
|
|
34162
|
+
coreEvents.off("hook-system-message" /* HookSystemMessage */, handleHookSystemMessage);
|
|
34182
34163
|
};
|
|
34183
34164
|
}, [historyManager]);
|
|
34184
34165
|
const nightly = props.version.includes("nightly");
|
|
@@ -34286,9 +34267,9 @@ ${queuedText}` : queuedText;
|
|
|
34286
34267
|
const handleMemoryChanged = (result) => {
|
|
34287
34268
|
setGeminiMdFileCount(result.fileCount);
|
|
34288
34269
|
};
|
|
34289
|
-
coreEvents.on(
|
|
34270
|
+
coreEvents.on("memory-changed" /* MemoryChanged */, handleMemoryChanged);
|
|
34290
34271
|
return () => {
|
|
34291
|
-
coreEvents.off(
|
|
34272
|
+
coreEvents.off("memory-changed" /* MemoryChanged */, handleMemoryChanged);
|
|
34292
34273
|
};
|
|
34293
34274
|
}, []);
|
|
34294
34275
|
(0, import_react119.useEffect)(() => {
|