@google/gemini-cli 0.62.0-nightly.20260925.gbedef96ef → 0.62.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-M4DUGOFW.js → chunk-2DHAEQE2.js} +90 -467
- package/bundle/{chunk-4JZM4J6T.js → chunk-2XM6DOWE.js} +2 -2
- package/bundle/{chunk-COHD3EAC.js → chunk-3VMO3WD7.js} +1 -1
- package/bundle/{chunk-TFNEL7HO.js → chunk-4GWDIIAP.js} +3 -3
- package/bundle/{chunk-LUG3MZLD.js → chunk-6DKHPDQ5.js} +1 -1
- package/bundle/{chunk-TYD74VXO.js → chunk-72GZSNV7.js} +14774 -8191
- package/bundle/{chunk-HBDPUOQW.js → chunk-7ETVC4KO.js} +1 -1
- package/bundle/{chunk-YIGDOMHJ.js → chunk-DML6Y2ZP.js} +2 -2
- package/bundle/{chunk-UFG6C5KE.js → chunk-DP2XO3WB.js} +1 -1
- package/bundle/{chunk-TNMENZTI.js → chunk-E2SRID3J.js} +1 -1
- package/bundle/{chunk-YZ6TLILF.js → chunk-F6RVU2CO.js} +1 -1
- package/bundle/{chunk-RETG7Z2C.js → chunk-GCL7X4WZ.js} +2 -2
- package/bundle/{chunk-QE6SEL5N.js → chunk-I47WLEEQ.js} +11 -45
- package/bundle/{chunk-AKMRRSMV.js → chunk-KCP45VUB.js} +1 -1
- package/bundle/{chunk-OF7DGARD.js → chunk-L5NOFB6M.js} +1 -1
- package/bundle/{chunk-H3SOW6BD.js → chunk-MLY4WQFO.js} +90 -421
- package/bundle/{chunk-MMWXIMUF.js → chunk-MNVEFU25.js} +3 -3
- package/bundle/{chunk-TKA3MSVK.js → chunk-OXDVMGJ3.js} +3 -3
- package/bundle/{chunk-GN6LRBHR.js → chunk-RWN52KQV.js} +5 -8
- package/bundle/{chunk-M5SV3LCW.js → chunk-T4GE6V5B.js} +8 -9
- package/bundle/{chunk-NZIIZAV3.js → chunk-TYBBTU4O.js} +1 -1
- package/bundle/{chunk-DOFIJ3YI.js → chunk-V43EQ7B6.js} +11 -45
- package/bundle/{chunk-R2TEKWUG.js → chunk-YOPBONYF.js} +1 -1
- package/bundle/{chunk-A3VAHJM3.js → chunk-ZRKGL4ZL.js} +62 -109
- package/bundle/{cleanup-HE7KYQAJ.js → cleanup-B2NP6ZJB.js} +2 -2
- package/bundle/{cleanup-INM5W2O2.js → cleanup-GJFEQLCV.js} +2 -2
- package/bundle/{cleanup-XSZILZES.js → cleanup-NYOWMRTL.js} +2 -2
- package/bundle/{core-PLITVDXB.js → core-4NPF436I.js} +1 -7
- package/bundle/{dist-5EPN333M.js → core-BXNHRQQE.js} +1 -7
- package/bundle/{devtoolsService-BUSRWWOS.js → devtoolsService-2TDRPBCW.js} +2 -2
- package/bundle/{devtoolsService-4D2QFII3.js → devtoolsService-47DUPCKM.js} +2 -2
- package/bundle/{devtoolsService-P7HLE6U4.js → devtoolsService-BIYZH2ME.js} +3 -4
- package/bundle/{dist-EBAUDX6K.js → dist-6S53KFXU.js} +1 -7
- package/bundle/docs/changelogs/index.md +0 -16
- package/bundle/docs/changelogs/latest.md +55 -34
- package/bundle/docs/changelogs/preview.md +3 -7
- package/bundle/{gemini-LJOD63ZZ.js → gemini-CGCV5XPN.js} +14 -14
- package/bundle/{gemini-E77OMSLO.js → gemini-J6X2T2ZI.js} +14 -14
- package/bundle/{gemini-III4I2TY.js → gemini-ZBM332DO.js} +198 -214
- package/bundle/gemini.js +7 -7
- package/bundle/{interactiveCli-GCRH54ZM.js → interactiveCli-HUDGOV74.js} +14 -31
- package/bundle/{interactiveCli-BJCS4WF5.js → interactiveCli-IDDEAOD5.js} +14 -31
- package/bundle/{interactiveCli-A3LNKRJV.js → interactiveCli-R4EMLFLM.js} +298 -334
- package/bundle/{liteRtServerManager-34QJA5UR.js → liteRtServerManager-A4B5FMXL.js} +4 -4
- package/bundle/{liteRtServerManager-PJMI7L5V.js → liteRtServerManager-QE27SHMQ.js} +4 -4
- package/bundle/{liteRtServerManager-TPFCEVH7.js → liteRtServerManager-WXCXUPDQ.js} +4 -4
- package/bundle/{oauth2-provider-HIFZ2YSU.js → oauth2-provider-3F6FOWLR.js} +1 -1
- package/bundle/{oauth2-provider-4IJXZY2A.js → oauth2-provider-43ANEHLB.js} +1 -1
- package/bundle/{oauth2-provider-65ESWRXC.js → oauth2-provider-MWRLM45J.js} +72 -38
- package/bundle/{start-6ET4IGUD.js → start-SQ2SPNQL.js} +6 -6
- package/bundle/{start-HKFTMESR.js → start-W7O4IWQ7.js} +6 -6
- package/bundle/{start-IYXWZL5M.js → start-ZMLXZ4VX.js} +6 -6
- package/package.json +1 -1
- package/bundle/chunk-BZNLCS4I.js +0 -398
- package/bundle/chunk-FW6KQPO4.js +0 -102951
- package/bundle/chunk-HM4SUAV7.js +0 -17368
- package/bundle/chunk-QPGOBA6C.js +0 -118
- package/bundle/chunk-X4QSELXY.js +0 -400361
- package/bundle/chunk-X63LZNK3.js +0 -1571
- package/bundle/chunk-YNCGLYYB.js +0 -154
- package/bundle/chunk-YUTWSGVZ.js +0 -512
- package/bundle/cleanup-ZZ2TESXC.js +0 -32
- package/bundle/devtoolsService-YD7ORPBB.js +0 -4359
- package/bundle/dist-SYCD6I6K.js +0 -2244
- package/bundle/gemini-46IOIZQR.js +0 -17863
- package/bundle/interactiveCli-XDQJSJNE.js +0 -34907
- package/bundle/liteRtServerManager-YPMJZLFF.js +0 -65
- package/bundle/oauth2-provider-KTV4RAAH.js +0 -235
- package/bundle/start-TIGZXUOM.js +0 -18
|
@@ -171,10 +171,10 @@ import {
|
|
|
171
171
|
widestLineFromStyledChars,
|
|
172
172
|
wordBreakStyledChars,
|
|
173
173
|
wrapStyledChars
|
|
174
|
-
} from "./chunk-
|
|
174
|
+
} from "./chunk-I47WLEEQ.js";
|
|
175
175
|
import {
|
|
176
176
|
require_source
|
|
177
|
-
} from "./chunk-
|
|
177
|
+
} from "./chunk-6DKHPDQ5.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-KCP45VUB.js";
|
|
231
231
|
import {
|
|
232
232
|
handleAutoUpdate,
|
|
233
233
|
isDevelopment,
|
|
234
234
|
relaunchApp,
|
|
235
235
|
setUpdateHandler
|
|
236
|
-
} from "./chunk-
|
|
236
|
+
} from "./chunk-2XM6DOWE.js";
|
|
237
237
|
import {
|
|
238
238
|
isTodoList,
|
|
239
239
|
mapCoreStatusToDisplayStatus,
|
|
240
240
|
require_react
|
|
241
|
-
} from "./chunk-
|
|
241
|
+
} from "./chunk-F6RVU2CO.js";
|
|
242
242
|
import {
|
|
243
243
|
registerCleanup,
|
|
244
244
|
removeCleanup,
|
|
245
245
|
runExitCleanup,
|
|
246
246
|
setupTtyCheck
|
|
247
|
-
} from "./chunk-
|
|
247
|
+
} from "./chunk-E2SRID3J.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-2DHAEQE2.js";
|
|
453
434
|
import "./chunk-664ZODQF.js";
|
|
454
435
|
import "./chunk-IUUIT4SU.js";
|
|
455
436
|
import "./chunk-L6PII3GR.js";
|
|
@@ -5076,7 +5057,7 @@ function calculateShellMaxLines(options) {
|
|
|
5076
5057
|
if (isAlternateBuffer && isThisShellFocused2 && !constrainHeight) {
|
|
5077
5058
|
return maxLinesBasedOnHeight;
|
|
5078
5059
|
}
|
|
5079
|
-
const isExecuting = status ===
|
|
5060
|
+
const isExecuting = status === "executing" /* Executing */;
|
|
5080
5061
|
const shellMaxLinesLimit = isExecuting ? ACTIVE_SHELL_MAX_LINES - SHELL_CONTENT_OVERHEAD : COMPLETED_SHELL_MAX_LINES - SHELL_CONTENT_OVERHEAD;
|
|
5081
5062
|
return Math.min(maxLinesBasedOnHeight, shellMaxLinesLimit);
|
|
5082
5063
|
}
|
|
@@ -5112,13 +5093,13 @@ var formatToolArgs = (args) => {
|
|
|
5112
5093
|
var SubagentProgressDisplay = ({ progress, terminalWidth, historyOverrides }) => {
|
|
5113
5094
|
let headerText;
|
|
5114
5095
|
let headerColor = theme.text.secondary;
|
|
5115
|
-
if (progress.state ===
|
|
5096
|
+
if (progress.state === "cancelled" /* CANCELLED */) {
|
|
5116
5097
|
headerText = `Subagent ${progress.agentName} was cancelled.`;
|
|
5117
5098
|
headerColor = theme.status.warning;
|
|
5118
|
-
} else if (progress.state ===
|
|
5099
|
+
} else if (progress.state === "error" /* ERROR */) {
|
|
5119
5100
|
headerText = `Subagent ${progress.agentName} failed.`;
|
|
5120
5101
|
headerColor = theme.status.error;
|
|
5121
|
-
} else if (progress.state ===
|
|
5102
|
+
} else if (progress.state === "completed" /* COMPLETED */) {
|
|
5122
5103
|
headerText = `Subagent ${progress.agentName} completed.`;
|
|
5123
5104
|
headerColor = theme.status.success;
|
|
5124
5105
|
} else {
|
|
@@ -5138,7 +5119,7 @@ var SubagentProgressDisplay = ({ progress, terminalWidth, historyOverrides }) =>
|
|
|
5138
5119
|
/* @__PURE__ */ (0, import_jsx_runtime14.jsx)(Box_default, { flexGrow: 1, children: /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(Text, { color, children: item.content }) })
|
|
5139
5120
|
] }, item.id);
|
|
5140
5121
|
} else if (item.type === "tool_call") {
|
|
5141
|
-
const statusSymbol = item.status ===
|
|
5122
|
+
const statusSymbol = item.status === "running" /* RUNNING */ ? /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(build_default, { type: "dots" }) : item.status === "completed" /* COMPLETED */ ? /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(Text, { color: theme.status.success, children: TOOL_STATUS.SUCCESS }) : item.status === "cancelled" /* CANCELLED */ ? /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(Text, { color: theme.status.warning, bold: true, children: TOOL_STATUS.CANCELED }) : /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(Text, { color: theme.status.error, children: TOOL_STATUS.ERROR });
|
|
5142
5123
|
const formattedArgs = item.description || formatToolArgs(item.args);
|
|
5143
5124
|
const displayArgs = formattedArgs.length > 60 ? formattedArgs.slice(0, 60) + "..." : formattedArgs;
|
|
5144
5125
|
return /* @__PURE__ */ (0, import_jsx_runtime14.jsxs)(Box_default, { flexDirection: "row", children: [
|
|
@@ -5149,7 +5130,7 @@ var SubagentProgressDisplay = ({ progress, terminalWidth, historyOverrides }) =>
|
|
|
5149
5130
|
{
|
|
5150
5131
|
bold: true,
|
|
5151
5132
|
color: theme.text.primary,
|
|
5152
|
-
strikethrough: item.status ===
|
|
5133
|
+
strikethrough: item.status === "cancelled" /* CANCELLED */,
|
|
5153
5134
|
children: item.displayName || item.content
|
|
5154
5135
|
}
|
|
5155
5136
|
),
|
|
@@ -5158,7 +5139,7 @@ var SubagentProgressDisplay = ({ progress, terminalWidth, historyOverrides }) =>
|
|
|
5158
5139
|
{
|
|
5159
5140
|
color: theme.text.secondary,
|
|
5160
5141
|
wrap: "truncate",
|
|
5161
|
-
strikethrough: item.status ===
|
|
5142
|
+
strikethrough: item.status === "cancelled" /* CANCELLED */,
|
|
5162
5143
|
children: displayArgs
|
|
5163
5144
|
}
|
|
5164
5145
|
) })
|
|
@@ -5178,7 +5159,7 @@ var SubagentProgressDisplay = ({ progress, terminalWidth, historyOverrides }) =>
|
|
|
5178
5159
|
MarkdownDisplay,
|
|
5179
5160
|
{
|
|
5180
5161
|
text: safeJsonToMarkdown(progress.result),
|
|
5181
|
-
isPending: progress.state !==
|
|
5162
|
+
isPending: progress.state !== "completed" /* COMPLETED */,
|
|
5182
5163
|
terminalWidth
|
|
5183
5164
|
}
|
|
5184
5165
|
)
|
|
@@ -5533,14 +5514,14 @@ var ToolActionsProvider = (props) => {
|
|
|
5533
5514
|
}
|
|
5534
5515
|
const details = tool.confirmationDetails;
|
|
5535
5516
|
if (details?.type === "edit" && isDiffingEnabled && "filePath" in details) {
|
|
5536
|
-
const cliOutcome = outcome ===
|
|
5517
|
+
const cliOutcome = outcome === "cancel" /* Cancel */ ? "rejected" : "accepted";
|
|
5537
5518
|
await ideClient?.resolveDiffFromCli(details.filePath, cliOutcome);
|
|
5538
5519
|
}
|
|
5539
5520
|
if (tool.correlationId) {
|
|
5540
5521
|
await config.getMessageBus().publish({
|
|
5541
|
-
type:
|
|
5522
|
+
type: "tool-confirmation-response" /* TOOL_CONFIRMATION_RESPONSE */,
|
|
5542
5523
|
correlationId: tool.correlationId,
|
|
5543
|
-
confirmed: outcome !==
|
|
5524
|
+
confirmed: outcome !== "cancel" /* Cancel */,
|
|
5544
5525
|
requiresUserConfirmation: false,
|
|
5545
5526
|
outcome,
|
|
5546
5527
|
payload
|
|
@@ -5559,7 +5540,7 @@ var ToolActionsProvider = (props) => {
|
|
|
5559
5540
|
);
|
|
5560
5541
|
const cancel = (0, import_react10.useCallback)(
|
|
5561
5542
|
async (callId) => {
|
|
5562
|
-
await confirm(callId,
|
|
5543
|
+
await confirm(callId, "cancel" /* Cancel */);
|
|
5563
5544
|
},
|
|
5564
5545
|
[confirm]
|
|
5565
5546
|
);
|
|
@@ -5680,7 +5661,7 @@ var ToolMessage = ({
|
|
|
5680
5661
|
paddingX: 1,
|
|
5681
5662
|
flexDirection: "column",
|
|
5682
5663
|
children: [
|
|
5683
|
-
status ===
|
|
5664
|
+
status === "executing" /* Executing */ && progress !== void 0 && /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(
|
|
5684
5665
|
McpProgressIndicator,
|
|
5685
5666
|
{
|
|
5686
5667
|
progress,
|
|
@@ -5697,8 +5678,8 @@ var ToolMessage = ({
|
|
|
5697
5678
|
terminalWidth: safeTerminalWidth,
|
|
5698
5679
|
renderOutputAsMarkdown,
|
|
5699
5680
|
hasFocus: isThisShellFocused2,
|
|
5700
|
-
maxLines: kind ===
|
|
5701
|
-
overflowDirection: kind ===
|
|
5681
|
+
maxLines: kind === "agent" /* Agent */ && availableTerminalHeight !== void 0 ? SUBAGENT_MAX_LINES : void 0,
|
|
5682
|
+
overflowDirection: kind === "agent" /* Agent */ ? "bottom" : "top"
|
|
5702
5683
|
}
|
|
5703
5684
|
),
|
|
5704
5685
|
isThisShellFocused2 && config && /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(Box_default, { paddingLeft: STATUS_INDICATOR_WIDTH, marginTop: 1, children: /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(
|
|
@@ -6014,7 +5995,7 @@ function getInitialTrustState(settings, cwd5, isCurrentWorkspace) {
|
|
|
6014
5995
|
settings.merged,
|
|
6015
5996
|
process3.cwd()
|
|
6016
5997
|
);
|
|
6017
|
-
const isInheritedTrust = isTrusted && (!explicitTrustLevel || explicitTrustLevel ===
|
|
5998
|
+
const isInheritedTrust = isTrusted && (!explicitTrustLevel || explicitTrustLevel === "DO_NOT_TRUST" /* DO_NOT_TRUST */);
|
|
6018
5999
|
return {
|
|
6019
6000
|
currentTrustLevel: explicitTrustLevel,
|
|
6020
6001
|
isInheritedTrustFromParent: !!(source === "file" && isInheritedTrust),
|
|
@@ -6059,7 +6040,7 @@ var usePermissionsModifyTrust = (onExit, addItem, targetDirectory) => {
|
|
|
6059
6040
|
process3.cwd(),
|
|
6060
6041
|
newConfig
|
|
6061
6042
|
);
|
|
6062
|
-
if (trustLevel ===
|
|
6043
|
+
if (trustLevel === "DO_NOT_TRUST" /* DO_NOT_TRUST */ && isTrusted) {
|
|
6063
6044
|
let message = "Note: This folder is still trusted because the connected IDE workspace is trusted.";
|
|
6064
6045
|
if (source === "file") {
|
|
6065
6046
|
message = "Note: This folder is still trusted because a parent folder is trusted.";
|
|
@@ -6133,18 +6114,18 @@ function PermissionsModifyTrustDialog({
|
|
|
6133
6114
|
const TRUST_LEVEL_ITEMS = [
|
|
6134
6115
|
{
|
|
6135
6116
|
label: `Trust this folder (${dirName})`,
|
|
6136
|
-
value:
|
|
6137
|
-
key:
|
|
6117
|
+
value: "TRUST_FOLDER" /* TRUST_FOLDER */,
|
|
6118
|
+
key: "TRUST_FOLDER" /* TRUST_FOLDER */
|
|
6138
6119
|
},
|
|
6139
6120
|
{
|
|
6140
6121
|
label: `Trust parent folder (${parentFolder})`,
|
|
6141
|
-
value:
|
|
6142
|
-
key:
|
|
6122
|
+
value: "TRUST_PARENT" /* TRUST_PARENT */,
|
|
6123
|
+
key: "TRUST_PARENT" /* TRUST_PARENT */
|
|
6143
6124
|
},
|
|
6144
6125
|
{
|
|
6145
6126
|
label: "Don't trust",
|
|
6146
|
-
value:
|
|
6147
|
-
key:
|
|
6127
|
+
value: "DO_NOT_TRUST" /* DO_NOT_TRUST */,
|
|
6128
|
+
key: "DO_NOT_TRUST" /* DO_NOT_TRUST */
|
|
6148
6129
|
}
|
|
6149
6130
|
];
|
|
6150
6131
|
const {
|
|
@@ -6385,7 +6366,7 @@ var ShellToolMessage = ({
|
|
|
6385
6366
|
maxLinesLimit: maxLines
|
|
6386
6367
|
});
|
|
6387
6368
|
import_react15.default.useEffect(() => {
|
|
6388
|
-
const isExecuting = status ===
|
|
6369
|
+
const isExecuting = status === "executing" /* Executing */;
|
|
6389
6370
|
if (isExecuting && ptyId) {
|
|
6390
6371
|
try {
|
|
6391
6372
|
const childWidth = safeTerminalWidth - 4;
|
|
@@ -6599,13 +6580,13 @@ var SubagentGroupDisplay = ({
|
|
|
6599
6580
|
const singleAgent = toolCalls[0].resultDisplay;
|
|
6600
6581
|
if (isSubagentProgress(singleAgent)) {
|
|
6601
6582
|
switch (singleAgent.state) {
|
|
6602
|
-
case
|
|
6583
|
+
case "completed" /* COMPLETED */:
|
|
6603
6584
|
headerText = "Agent Completed";
|
|
6604
6585
|
break;
|
|
6605
|
-
case
|
|
6586
|
+
case "cancelled" /* CANCELLED */:
|
|
6606
6587
|
headerText = "Agent Cancelled";
|
|
6607
6588
|
break;
|
|
6608
|
-
case
|
|
6589
|
+
case "error" /* ERROR */:
|
|
6609
6590
|
headerText = "Agent Error";
|
|
6610
6591
|
break;
|
|
6611
6592
|
default:
|
|
@@ -6621,8 +6602,8 @@ var SubagentGroupDisplay = ({
|
|
|
6621
6602
|
for (const tc of toolCalls) {
|
|
6622
6603
|
const progress = tc.resultDisplay;
|
|
6623
6604
|
if (isSubagentProgress(progress)) {
|
|
6624
|
-
if (progress.state ===
|
|
6625
|
-
else if (progress.state ===
|
|
6605
|
+
if (progress.state === "completed" /* COMPLETED */) completedCount++;
|
|
6606
|
+
else if (progress.state === "running" /* RUNNING */) runningCount++;
|
|
6626
6607
|
} else {
|
|
6627
6608
|
runningCount++;
|
|
6628
6609
|
}
|
|
@@ -6701,7 +6682,7 @@ var SubagentGroupDisplay = ({
|
|
|
6701
6682
|
if (!isExpanded) {
|
|
6702
6683
|
let content = "Starting...";
|
|
6703
6684
|
let formattedArgs;
|
|
6704
|
-
if (progress.state ===
|
|
6685
|
+
if (progress.state === "completed" /* COMPLETED */) {
|
|
6705
6686
|
if (progress.terminateReason && progress.terminateReason !== "GOAL") {
|
|
6706
6687
|
content = `Finished Early (${progress.terminateReason})`;
|
|
6707
6688
|
} else {
|
|
@@ -6715,17 +6696,17 @@ var SubagentGroupDisplay = ({
|
|
|
6715
6696
|
formattedArgs = formatToolArgs(lastActivity.args);
|
|
6716
6697
|
}
|
|
6717
6698
|
}
|
|
6718
|
-
const displayArgs = progress.state ===
|
|
6699
|
+
const displayArgs = progress.state === "completed" /* COMPLETED */ ? "" : formattedArgs;
|
|
6719
6700
|
const renderStatusIcon = () => {
|
|
6720
|
-
const state = progress.state ??
|
|
6701
|
+
const state = progress.state ?? "running" /* RUNNING */;
|
|
6721
6702
|
switch (state) {
|
|
6722
|
-
case
|
|
6703
|
+
case "running" /* RUNNING */:
|
|
6723
6704
|
return /* @__PURE__ */ (0, import_jsx_runtime24.jsx)(Text, { color: theme.text.primary, children: "!" });
|
|
6724
|
-
case
|
|
6705
|
+
case "completed" /* COMPLETED */:
|
|
6725
6706
|
return /* @__PURE__ */ (0, import_jsx_runtime24.jsx)(Text, { color: theme.status.success, children: "\u2713" });
|
|
6726
|
-
case
|
|
6707
|
+
case "cancelled" /* CANCELLED */:
|
|
6727
6708
|
return /* @__PURE__ */ (0, import_jsx_runtime24.jsx)(Text, { color: theme.status.warning, children: "\u2139" });
|
|
6728
|
-
case
|
|
6709
|
+
case "error" /* ERROR */:
|
|
6729
6710
|
return /* @__PURE__ */ (0, import_jsx_runtime24.jsx)(Text, { color: theme.status.error, children: "\u2717" });
|
|
6730
6711
|
default:
|
|
6731
6712
|
return checkExhaustive(state);
|
|
@@ -6778,22 +6759,22 @@ var hasPayload = (res) => {
|
|
|
6778
6759
|
function getFileOpData(diff, status, resultDisplay, terminalWidth, availableTerminalHeight, isClickable) {
|
|
6779
6760
|
const added = (diff.diffStat?.model_added_lines ?? 0) + (diff.diffStat?.user_added_lines ?? 0);
|
|
6780
6761
|
const removed = (diff.diffStat?.model_removed_lines ?? 0) + (diff.diffStat?.user_removed_lines ?? 0);
|
|
6781
|
-
const isAcceptedOrConfirming = status ===
|
|
6762
|
+
const isAcceptedOrConfirming = status === "success" /* Success */ || status === "executing" /* Executing */ || status === "awaiting_approval" /* AwaitingApproval */;
|
|
6782
6763
|
const addColor = isAcceptedOrConfirming ? theme.status.success : theme.text.secondary;
|
|
6783
6764
|
const removeColor = isAcceptedOrConfirming ? theme.status.error : theme.text.secondary;
|
|
6784
6765
|
const showDiffStat = !!diff.diffStat;
|
|
6785
6766
|
const description = /* @__PURE__ */ (0, import_jsx_runtime25.jsx)(Box_default, { flexDirection: "row", children: /* @__PURE__ */ (0, import_jsx_runtime25.jsx)(Text, { color: theme.text.secondary, wrap: "truncate-end", children: diff.fileName }) });
|
|
6786
6767
|
let resultSummary = "";
|
|
6787
6768
|
let resultColor = theme.text.secondary;
|
|
6788
|
-
if (status ===
|
|
6769
|
+
if (status === "awaiting_approval" /* AwaitingApproval */) {
|
|
6789
6770
|
resultSummary = "Confirming";
|
|
6790
|
-
} else if (status ===
|
|
6771
|
+
} else if (status === "success" /* Success */ || status === "executing" /* Executing */) {
|
|
6791
6772
|
resultSummary = "Accepted";
|
|
6792
6773
|
resultColor = theme.text.accent;
|
|
6793
|
-
} else if (status ===
|
|
6774
|
+
} else if (status === "cancelled" /* Cancelled */) {
|
|
6794
6775
|
resultSummary = "Rejected";
|
|
6795
6776
|
resultColor = theme.status.error;
|
|
6796
|
-
} else if (status ===
|
|
6777
|
+
} else if (status === "error" /* Error */) {
|
|
6797
6778
|
resultSummary = typeof resultDisplay === "string" ? resultDisplay : "Failed";
|
|
6798
6779
|
resultColor = theme.status.error;
|
|
6799
6780
|
}
|
|
@@ -6824,7 +6805,7 @@ function getFileOpData(diff, status, resultDisplay, terminalWidth, availableTerm
|
|
|
6824
6805
|
filename: diff.fileName,
|
|
6825
6806
|
terminalWidth: Math.max(0, (terminalWidth || 0) - PAYLOAD_MARGIN_LEFT),
|
|
6826
6807
|
availableTerminalHeight,
|
|
6827
|
-
disableColor: status ===
|
|
6808
|
+
disableColor: status === "cancelled" /* Cancelled */
|
|
6828
6809
|
}
|
|
6829
6810
|
);
|
|
6830
6811
|
return { description, summary, payload };
|
|
@@ -6952,10 +6933,10 @@ var DenseToolMessage = (props) => {
|
|
|
6952
6933
|
if (isGrepResult(resultDisplay)) {
|
|
6953
6934
|
return getGenericSuccessData(resultDisplay, originalDescription);
|
|
6954
6935
|
}
|
|
6955
|
-
if (status ===
|
|
6936
|
+
if (status === "success" /* Success */ && resultDisplay) {
|
|
6956
6937
|
return getGenericSuccessData(resultDisplay, originalDescription);
|
|
6957
6938
|
}
|
|
6958
|
-
if (status ===
|
|
6939
|
+
if (status === "error" /* Error */) {
|
|
6959
6940
|
const text = typeof resultDisplay === "string" ? resultDisplay.replace(/\n/g, " ") : "Failed";
|
|
6960
6941
|
const errorSummary = /* @__PURE__ */ (0, import_jsx_runtime25.jsxs)(Text, { color: theme.status.error, wrap: "truncate-end", children: [
|
|
6961
6942
|
"\u2192 ",
|
|
@@ -6996,7 +6977,7 @@ var DenseToolMessage = (props) => {
|
|
|
6996
6977
|
language: fileExtension,
|
|
6997
6978
|
maxWidth: Math.max(0, (terminalWidth || 0) - PAYLOAD_MARGIN_LEFT),
|
|
6998
6979
|
settings,
|
|
6999
|
-
disableColor: status ===
|
|
6980
|
+
disableColor: status === "cancelled" /* Cancelled */,
|
|
7000
6981
|
returnLines: true
|
|
7001
6982
|
});
|
|
7002
6983
|
} else {
|
|
@@ -7004,7 +6985,7 @@ var DenseToolMessage = (props) => {
|
|
|
7004
6985
|
parsedLines,
|
|
7005
6986
|
filename: diff.fileName,
|
|
7006
6987
|
terminalWidth: Math.max(0, (terminalWidth || 0) - PAYLOAD_MARGIN_LEFT),
|
|
7007
|
-
disableColor: status ===
|
|
6988
|
+
disableColor: status === "cancelled" /* Cancelled */
|
|
7008
6989
|
});
|
|
7009
6990
|
}
|
|
7010
6991
|
}, [diff, isExpanded, isAlternateBuffer, terminalWidth, settings, status]);
|
|
@@ -7141,7 +7122,7 @@ function isToolExecuting(pendingHistoryItems) {
|
|
|
7141
7122
|
return pendingHistoryItems.some((item) => {
|
|
7142
7123
|
if (item && item.type === "tool_group") {
|
|
7143
7124
|
return item.tools.some(
|
|
7144
|
-
(tool) =>
|
|
7125
|
+
(tool) => "executing" /* Executing */ === tool.status
|
|
7145
7126
|
);
|
|
7146
7127
|
}
|
|
7147
7128
|
return false;
|
|
@@ -7150,7 +7131,7 @@ function isToolExecuting(pendingHistoryItems) {
|
|
|
7150
7131
|
function isToolAwaitingConfirmation(pendingHistoryItems) {
|
|
7151
7132
|
return pendingHistoryItems.filter((item) => item.type === "tool_group").some(
|
|
7152
7133
|
(item) => item.tools.some(
|
|
7153
|
-
(tool) =>
|
|
7134
|
+
(tool) => "awaiting_approval" /* AwaitingApproval */ === tool.status
|
|
7154
7135
|
)
|
|
7155
7136
|
);
|
|
7156
7137
|
}
|
|
@@ -7238,7 +7219,7 @@ var ToolGroupMessage = ({
|
|
|
7238
7219
|
const groupedTools = (0, import_react19.useMemo)(() => {
|
|
7239
7220
|
const groups = [];
|
|
7240
7221
|
for (const tool of visibleToolCalls) {
|
|
7241
|
-
if (tool.kind ===
|
|
7222
|
+
if (tool.kind === "agent" /* Agent */) {
|
|
7242
7223
|
const lastGroup = groups[groups.length - 1];
|
|
7243
7224
|
if (Array.isArray(lastGroup)) {
|
|
7244
7225
|
lastGroup.push(tool);
|
|
@@ -7293,7 +7274,7 @@ var ToolGroupMessage = ({
|
|
|
7293
7274
|
}, [groupedTools, isCompactModeEnabled, borderTopOverride]);
|
|
7294
7275
|
let countToolCallsWithResults = 0;
|
|
7295
7276
|
for (const tool of visibleToolCalls) {
|
|
7296
|
-
if (tool.kind !==
|
|
7277
|
+
if (tool.kind !== "agent" /* Agent */) {
|
|
7297
7278
|
if (isCompactTool(tool, isCompactModeEnabled)) {
|
|
7298
7279
|
if (hasDensePayload(tool)) {
|
|
7299
7280
|
countToolCallsWithResults++;
|
|
@@ -7484,7 +7465,7 @@ var ToolGroupDisplay = ({
|
|
|
7484
7465
|
}
|
|
7485
7466
|
const { tools, borderColor, borderDimColor, borderTop, borderBottom } = item;
|
|
7486
7467
|
const visibleTools = tools.filter(
|
|
7487
|
-
(t) => t.status !==
|
|
7468
|
+
(t) => t.status !== "awaiting_approval" /* AwaitingApproval */
|
|
7488
7469
|
);
|
|
7489
7470
|
const noticeTools = visibleTools.filter((t) => t.format === "notice");
|
|
7490
7471
|
const otherTools = visibleTools.filter(
|
|
@@ -7686,18 +7667,18 @@ function CompressionMessage({
|
|
|
7686
7667
|
return "Compressing chat history";
|
|
7687
7668
|
}
|
|
7688
7669
|
switch (compressionStatus) {
|
|
7689
|
-
case
|
|
7670
|
+
case 1 /* COMPRESSED */:
|
|
7690
7671
|
return `Chat history compressed from ${originalTokens} to ${newTokens} tokens.`;
|
|
7691
|
-
case
|
|
7672
|
+
case 2 /* COMPRESSION_FAILED_INFLATED_TOKEN_COUNT */:
|
|
7692
7673
|
if (originalTokens < 5e4) {
|
|
7693
7674
|
return "Compression was not beneficial for this history size.";
|
|
7694
7675
|
}
|
|
7695
7676
|
return "Chat history compression did not reduce size. This may indicate issues with the compression prompt.";
|
|
7696
|
-
case
|
|
7677
|
+
case 3 /* COMPRESSION_FAILED_TOKEN_COUNT_ERROR */:
|
|
7697
7678
|
return "Could not compress chat history due to a token counting error.";
|
|
7698
|
-
case
|
|
7679
|
+
case 4 /* COMPRESSION_FAILED_EMPTY_SUMMARY */:
|
|
7699
7680
|
return "Chat history compression failed: the model returned an empty summary.";
|
|
7700
|
-
case
|
|
7681
|
+
case 5 /* NOOP */:
|
|
7701
7682
|
return "Nothing to compress.";
|
|
7702
7683
|
default:
|
|
7703
7684
|
return "";
|
|
@@ -8135,8 +8116,8 @@ var ModelUsageTable = ({ models }) => {
|
|
|
8135
8116
|
);
|
|
8136
8117
|
roleEntries.sort(([a], [b]) => {
|
|
8137
8118
|
if (a === b) return 0;
|
|
8138
|
-
if (a ===
|
|
8139
|
-
if (b ===
|
|
8119
|
+
if (a === "main" /* MAIN */) return -1;
|
|
8120
|
+
if (b === "main" /* MAIN */) return 1;
|
|
8140
8121
|
return a.localeCompare(b);
|
|
8141
8122
|
});
|
|
8142
8123
|
roleEntries.forEach(([role, roleMetrics]) => {
|
|
@@ -8467,8 +8448,8 @@ var ModelStatsDisplay = ({
|
|
|
8467
8448
|
return validRoles.includes(role);
|
|
8468
8449
|
}).sort((a, b) => {
|
|
8469
8450
|
if (a === b) return 0;
|
|
8470
|
-
if (a ===
|
|
8471
|
-
if (b ===
|
|
8451
|
+
if (a === "main" /* MAIN */) return -1;
|
|
8452
|
+
if (b === "main" /* MAIN */) return 1;
|
|
8472
8453
|
return a.localeCompare(b);
|
|
8473
8454
|
});
|
|
8474
8455
|
const createRow = (metric, getValue, options = {}) => {
|
|
@@ -9259,7 +9240,7 @@ var McpStatus = ({
|
|
|
9259
9240
|
);
|
|
9260
9241
|
const originalStatus = serverStatus(serverName);
|
|
9261
9242
|
const hasCachedItems = serverTools.length > 0 || serverPrompts.length > 0 || serverResources.length > 0;
|
|
9262
|
-
const status = originalStatus ===
|
|
9243
|
+
const status = originalStatus === "disconnected" /* DISCONNECTED */ && hasCachedItems ? "connected" /* CONNECTED */ : originalStatus;
|
|
9263
9244
|
let statusIndicator = "";
|
|
9264
9245
|
let statusText = "";
|
|
9265
9246
|
let statusColor = theme.text.primary;
|
|
@@ -9271,17 +9252,17 @@ var McpStatus = ({
|
|
|
9271
9252
|
statusColor = theme.text.secondary;
|
|
9272
9253
|
} else {
|
|
9273
9254
|
switch (status) {
|
|
9274
|
-
case
|
|
9255
|
+
case "connected" /* CONNECTED */:
|
|
9275
9256
|
statusIndicator = "\u{1F7E2}";
|
|
9276
9257
|
statusText = "Ready";
|
|
9277
9258
|
statusColor = theme.status.success;
|
|
9278
9259
|
break;
|
|
9279
|
-
case
|
|
9260
|
+
case "connecting" /* CONNECTING */:
|
|
9280
9261
|
statusIndicator = "\u{1F504}";
|
|
9281
9262
|
statusText = "Starting... (first startup may take longer)";
|
|
9282
9263
|
statusColor = theme.status.warning;
|
|
9283
9264
|
break;
|
|
9284
|
-
case
|
|
9265
|
+
case "disconnected" /* DISCONNECTED */:
|
|
9285
9266
|
default:
|
|
9286
9267
|
statusIndicator = "\u{1F534}";
|
|
9287
9268
|
statusText = "Disconnected";
|
|
@@ -9329,12 +9310,12 @@ var McpStatus = ({
|
|
|
9329
9310
|
/* @__PURE__ */ (0, import_jsx_runtime47.jsxs)(Text, { children: [
|
|
9330
9311
|
" - ",
|
|
9331
9312
|
statusText,
|
|
9332
|
-
status ===
|
|
9313
|
+
status === "connected" /* CONNECTED */ && parts.length > 0 && ` (${parts.join(", ")})`
|
|
9333
9314
|
] }),
|
|
9334
9315
|
authStatusNode
|
|
9335
9316
|
] }),
|
|
9336
|
-
status ===
|
|
9337
|
-
status ===
|
|
9317
|
+
status === "connecting" /* CONNECTING */ && /* @__PURE__ */ (0, import_jsx_runtime47.jsx)(Text, { children: " (tools and prompts will appear when ready)" }),
|
|
9318
|
+
status === "disconnected" /* DISCONNECTED */ && toolCount > 0 && /* @__PURE__ */ (0, import_jsx_runtime47.jsxs)(Text, { children: [
|
|
9338
9319
|
" (",
|
|
9339
9320
|
toolCount,
|
|
9340
9321
|
" tools cached)"
|
|
@@ -9895,7 +9876,7 @@ var Notifications = () => {
|
|
|
9895
9876
|
if (dismissed) return [];
|
|
9896
9877
|
const counts = persistentState.get("startupWarningCounts") || {};
|
|
9897
9878
|
return startupWarnings.filter((w) => {
|
|
9898
|
-
if (w.priority ===
|
|
9879
|
+
if (w.priority === "low" /* Low */) {
|
|
9899
9880
|
const count = counts[w.id] || 0;
|
|
9900
9881
|
return count < MAX_STARTUP_WARNING_SHOW_COUNT;
|
|
9901
9882
|
}
|
|
@@ -9908,7 +9889,7 @@ var Notifications = () => {
|
|
|
9908
9889
|
const counts = { ...persistentState.get("startupWarningCounts") || {} };
|
|
9909
9890
|
let changed = false;
|
|
9910
9891
|
visibleWarnings.forEach((w) => {
|
|
9911
|
-
if (w.priority ===
|
|
9892
|
+
if (w.priority === "low" /* Low */) {
|
|
9912
9893
|
counts[w.id] = (counts[w.id] || 0) + 1;
|
|
9913
9894
|
changed = true;
|
|
9914
9895
|
}
|
|
@@ -10015,7 +9996,7 @@ var UserIdentity = ({ config }) => {
|
|
|
10015
9996
|
}
|
|
10016
9997
|
return /* @__PURE__ */ (0, import_jsx_runtime57.jsxs)(Box_default, { flexDirection: "column", children: [
|
|
10017
9998
|
/* @__PURE__ */ (0, import_jsx_runtime57.jsxs)(Box_default, { children: [
|
|
10018
|
-
/* @__PURE__ */ (0, import_jsx_runtime57.jsx)(Text, { color: theme.text.primary, wrap: "truncate-end", children: authType ===
|
|
9999
|
+
/* @__PURE__ */ (0, import_jsx_runtime57.jsx)(Text, { color: theme.text.primary, wrap: "truncate-end", children: authType === "oauth-personal" /* LOGIN_WITH_GOOGLE */ ? /* @__PURE__ */ (0, import_jsx_runtime57.jsxs)(Text, { children: [
|
|
10019
10000
|
/* @__PURE__ */ (0, import_jsx_runtime57.jsxs)(Text, { bold: true, children: [
|
|
10020
10001
|
"Signed in with Google",
|
|
10021
10002
|
email ? ":" : ""
|
|
@@ -10258,7 +10239,7 @@ var import_react30 = __toESM(require_react(), 1);
|
|
|
10258
10239
|
function getConfirmingToolState(pendingHistoryItems) {
|
|
10259
10240
|
const allPendingTools = getAllToolCalls(pendingHistoryItems);
|
|
10260
10241
|
const confirmingTools = allPendingTools.filter(
|
|
10261
|
-
(tool) => tool.status ===
|
|
10242
|
+
(tool) => tool.status === "awaiting_approval" /* AwaitingApproval */
|
|
10262
10243
|
);
|
|
10263
10244
|
if (confirmingTools.length === 0) {
|
|
10264
10245
|
return null;
|
|
@@ -11567,7 +11548,7 @@ var ExitPlanModeDialog = ({
|
|
|
11567
11548
|
{
|
|
11568
11549
|
questions: [
|
|
11569
11550
|
{
|
|
11570
|
-
type:
|
|
11551
|
+
type: "choice" /* CHOICE */,
|
|
11571
11552
|
header: "Approval",
|
|
11572
11553
|
question: planContent,
|
|
11573
11554
|
options: [
|
|
@@ -11588,9 +11569,9 @@ var ExitPlanModeDialog = ({
|
|
|
11588
11569
|
onSubmit: (answers) => {
|
|
11589
11570
|
const answer = answers["0"];
|
|
11590
11571
|
if (answer === "Yes, automatically accept edits" /* Auto */) {
|
|
11591
|
-
onApprove(
|
|
11572
|
+
onApprove("autoEdit" /* AUTO_EDIT */);
|
|
11592
11573
|
} else if (answer === "Yes, manually accept edits" /* Manual */) {
|
|
11593
|
-
onApprove(
|
|
11574
|
+
onApprove("default" /* DEFAULT */);
|
|
11594
11575
|
} else if (answer) {
|
|
11595
11576
|
onFeedback(answer);
|
|
11596
11577
|
}
|
|
@@ -11802,7 +11783,7 @@ ${deceptiveUrlWarnings.map(
|
|
|
11802
11783
|
);
|
|
11803
11784
|
(0, import_react35.useEffect)(() => {
|
|
11804
11785
|
if (isCancelling) {
|
|
11805
|
-
handleConfirm(
|
|
11786
|
+
handleConfirm("cancel" /* Cancel */);
|
|
11806
11787
|
}
|
|
11807
11788
|
}, [isCancelling, handleConfirm]);
|
|
11808
11789
|
const handleSelect = (0, import_react35.useCallback)(
|
|
@@ -11815,19 +11796,19 @@ ${deceptiveUrlWarnings.map(
|
|
|
11815
11796
|
if (!confirmationDetails.isModifying) {
|
|
11816
11797
|
options2.push({
|
|
11817
11798
|
label: "Allow once",
|
|
11818
|
-
value:
|
|
11799
|
+
value: "proceed_once" /* ProceedOnce */,
|
|
11819
11800
|
key: "Allow once"
|
|
11820
11801
|
});
|
|
11821
11802
|
if (isTrustedFolder && !confirmationDetails.isBuildFile) {
|
|
11822
11803
|
options2.push({
|
|
11823
11804
|
label: "Allow for this session",
|
|
11824
|
-
value:
|
|
11805
|
+
value: "proceed_always" /* ProceedAlways */,
|
|
11825
11806
|
key: "Allow for this session"
|
|
11826
11807
|
});
|
|
11827
11808
|
if (allowPermanentApproval) {
|
|
11828
11809
|
options2.push({
|
|
11829
11810
|
label: "Allow for this file in all future sessions",
|
|
11830
|
-
value:
|
|
11811
|
+
value: "proceed_always_and_save" /* ProceedAlwaysAndSave */,
|
|
11831
11812
|
key: "Allow for this file in all future sessions"
|
|
11832
11813
|
});
|
|
11833
11814
|
}
|
|
@@ -11835,45 +11816,45 @@ ${deceptiveUrlWarnings.map(
|
|
|
11835
11816
|
if (!config.getIdeMode() || !isDiffingEnabled) {
|
|
11836
11817
|
options2.push({
|
|
11837
11818
|
label: "Modify with external editor",
|
|
11838
|
-
value:
|
|
11819
|
+
value: "modify_with_editor" /* ModifyWithEditor */,
|
|
11839
11820
|
key: "Modify with external editor"
|
|
11840
11821
|
});
|
|
11841
11822
|
}
|
|
11842
11823
|
options2.push({
|
|
11843
11824
|
label: "No, suggest changes (esc)",
|
|
11844
|
-
value:
|
|
11825
|
+
value: "cancel" /* Cancel */,
|
|
11845
11826
|
key: "No, suggest changes (esc)"
|
|
11846
11827
|
});
|
|
11847
11828
|
}
|
|
11848
11829
|
} else if (confirmationDetails.type === "sandbox_expansion") {
|
|
11849
11830
|
options2.push({
|
|
11850
11831
|
label: "Allow once",
|
|
11851
|
-
value:
|
|
11832
|
+
value: "proceed_once" /* ProceedOnce */,
|
|
11852
11833
|
key: "Allow once"
|
|
11853
11834
|
});
|
|
11854
11835
|
if (isTrustedFolder) {
|
|
11855
11836
|
options2.push({
|
|
11856
11837
|
label: "Allow for this session",
|
|
11857
|
-
value:
|
|
11838
|
+
value: "proceed_always" /* ProceedAlways */,
|
|
11858
11839
|
key: "Allow for this session"
|
|
11859
11840
|
});
|
|
11860
11841
|
if (allowPermanentApproval) {
|
|
11861
11842
|
options2.push({
|
|
11862
11843
|
label: "Allow for all future sessions",
|
|
11863
|
-
value:
|
|
11844
|
+
value: "proceed_always_and_save" /* ProceedAlwaysAndSave */,
|
|
11864
11845
|
key: "Allow for all future sessions"
|
|
11865
11846
|
});
|
|
11866
11847
|
}
|
|
11867
11848
|
}
|
|
11868
11849
|
options2.push({
|
|
11869
11850
|
label: "No, suggest changes (esc)",
|
|
11870
|
-
value:
|
|
11851
|
+
value: "cancel" /* Cancel */,
|
|
11871
11852
|
key: "No, suggest changes (esc)"
|
|
11872
11853
|
});
|
|
11873
11854
|
} else if (confirmationDetails.type === "exec") {
|
|
11874
11855
|
options2.push({
|
|
11875
11856
|
label: "Allow once",
|
|
11876
|
-
value:
|
|
11857
|
+
value: "proceed_once" /* ProceedOnce */,
|
|
11877
11858
|
key: "Allow once"
|
|
11878
11859
|
});
|
|
11879
11860
|
const hasUntrustedFlags = confirmationDetails.untrustedFlags && confirmationDetails.untrustedFlags.length > 0;
|
|
@@ -11881,75 +11862,75 @@ ${deceptiveUrlWarnings.map(
|
|
|
11881
11862
|
if (isTrustedFolder && !hasUntrustedFlags && !hasModifiedBuildFiles) {
|
|
11882
11863
|
options2.push({
|
|
11883
11864
|
label: `Allow for this session`,
|
|
11884
|
-
value:
|
|
11865
|
+
value: "proceed_always" /* ProceedAlways */,
|
|
11885
11866
|
key: `Allow for this session`
|
|
11886
11867
|
});
|
|
11887
11868
|
if (allowPermanentApproval) {
|
|
11888
11869
|
options2.push({
|
|
11889
11870
|
label: `Allow this command for all future sessions`,
|
|
11890
|
-
value:
|
|
11871
|
+
value: "proceed_always_and_save" /* ProceedAlwaysAndSave */,
|
|
11891
11872
|
key: `Allow for all future sessions`
|
|
11892
11873
|
});
|
|
11893
11874
|
}
|
|
11894
11875
|
}
|
|
11895
11876
|
options2.push({
|
|
11896
11877
|
label: "No, suggest changes (esc)",
|
|
11897
|
-
value:
|
|
11878
|
+
value: "cancel" /* Cancel */,
|
|
11898
11879
|
key: "No, suggest changes (esc)"
|
|
11899
11880
|
});
|
|
11900
11881
|
} else if (confirmationDetails.type === "info") {
|
|
11901
11882
|
options2.push({
|
|
11902
11883
|
label: "Allow once",
|
|
11903
|
-
value:
|
|
11884
|
+
value: "proceed_once" /* ProceedOnce */,
|
|
11904
11885
|
key: "Allow once"
|
|
11905
11886
|
});
|
|
11906
11887
|
if (isTrustedFolder) {
|
|
11907
11888
|
options2.push({
|
|
11908
11889
|
label: "Allow for this session",
|
|
11909
|
-
value:
|
|
11890
|
+
value: "proceed_always" /* ProceedAlways */,
|
|
11910
11891
|
key: "Allow for this session"
|
|
11911
11892
|
});
|
|
11912
11893
|
if (allowPermanentApproval) {
|
|
11913
11894
|
options2.push({
|
|
11914
11895
|
label: "Allow for all future sessions",
|
|
11915
|
-
value:
|
|
11896
|
+
value: "proceed_always_and_save" /* ProceedAlwaysAndSave */,
|
|
11916
11897
|
key: "Allow for all future sessions"
|
|
11917
11898
|
});
|
|
11918
11899
|
}
|
|
11919
11900
|
}
|
|
11920
11901
|
options2.push({
|
|
11921
11902
|
label: "No, suggest changes (esc)",
|
|
11922
|
-
value:
|
|
11903
|
+
value: "cancel" /* Cancel */,
|
|
11923
11904
|
key: "No, suggest changes (esc)"
|
|
11924
11905
|
});
|
|
11925
11906
|
} else if (confirmationDetails.type === "mcp") {
|
|
11926
11907
|
options2.push({
|
|
11927
11908
|
label: "Allow once",
|
|
11928
|
-
value:
|
|
11909
|
+
value: "proceed_once" /* ProceedOnce */,
|
|
11929
11910
|
key: "Allow once"
|
|
11930
11911
|
});
|
|
11931
11912
|
if (isTrustedFolder) {
|
|
11932
11913
|
options2.push({
|
|
11933
11914
|
label: "Allow tool for this session",
|
|
11934
|
-
value:
|
|
11915
|
+
value: "proceed_always_tool" /* ProceedAlwaysTool */,
|
|
11935
11916
|
key: "Allow tool for this session"
|
|
11936
11917
|
});
|
|
11937
11918
|
options2.push({
|
|
11938
11919
|
label: "Allow all server tools for this session",
|
|
11939
|
-
value:
|
|
11920
|
+
value: "proceed_always_server" /* ProceedAlwaysServer */,
|
|
11940
11921
|
key: "Allow all server tools for this session"
|
|
11941
11922
|
});
|
|
11942
11923
|
if (allowPermanentApproval) {
|
|
11943
11924
|
options2.push({
|
|
11944
11925
|
label: "Allow tool for all future sessions",
|
|
11945
|
-
value:
|
|
11926
|
+
value: "proceed_always_and_save" /* ProceedAlwaysAndSave */,
|
|
11946
11927
|
key: "Allow tool for all future sessions"
|
|
11947
11928
|
});
|
|
11948
11929
|
}
|
|
11949
11930
|
}
|
|
11950
11931
|
options2.push({
|
|
11951
11932
|
label: "No, suggest changes (esc)",
|
|
11952
|
-
value:
|
|
11933
|
+
value: "cancel" /* Cancel */,
|
|
11953
11934
|
key: "No, suggest changes (esc)"
|
|
11954
11935
|
});
|
|
11955
11936
|
}
|
|
@@ -11990,7 +11971,7 @@ ${deceptiveUrlWarnings.map(
|
|
|
11990
11971
|
const containsRedirection = commandsToDisplay.some(
|
|
11991
11972
|
(cmd) => hasRedirection(cmd)
|
|
11992
11973
|
);
|
|
11993
|
-
const isAutoEdit = config.getApprovalMode() ===
|
|
11974
|
+
const isAutoEdit = config.getApprovalMode() === "yolo" /* YOLO */ || config.getApprovalMode() === "autoEdit" /* AUTO_EDIT */;
|
|
11994
11975
|
if (containsRedirection && !isAutoEdit) {
|
|
11995
11976
|
extraInfoLines = 1;
|
|
11996
11977
|
}
|
|
@@ -12017,7 +11998,7 @@ ${deceptiveUrlWarnings.map(
|
|
|
12017
11998
|
const isSafeToPersist = confirmationDetails.type === "info" || confirmationDetails.type === "edit" || confirmationDetails.type === "mcp";
|
|
12018
11999
|
if (isSafeToPersist && settings.merged.security.autoAddToPolicyByDefault) {
|
|
12019
12000
|
const alwaysAndSaveIndex = options2.findIndex(
|
|
12020
|
-
(o) => o.value ===
|
|
12001
|
+
(o) => o.value === "proceed_always_and_save" /* ProceedAlwaysAndSave */
|
|
12021
12002
|
);
|
|
12022
12003
|
if (alwaysAndSaveIndex !== -1) {
|
|
12023
12004
|
initialIndex2 = alwaysAndSaveIndex;
|
|
@@ -12066,10 +12047,10 @@ Ensure you trust all modifications made to build files before approving executio
|
|
|
12066
12047
|
{
|
|
12067
12048
|
questions: confirmationDetails.questions,
|
|
12068
12049
|
onSubmit: (answers) => {
|
|
12069
|
-
handleConfirm(
|
|
12050
|
+
handleConfirm("proceed_once" /* ProceedOnce */, { answers });
|
|
12070
12051
|
},
|
|
12071
12052
|
onCancel: () => {
|
|
12072
|
-
handleConfirm(
|
|
12053
|
+
handleConfirm("cancel" /* Cancel */);
|
|
12073
12054
|
},
|
|
12074
12055
|
width: safeTerminalWidth,
|
|
12075
12056
|
availableHeight: bodyHeight
|
|
@@ -12090,19 +12071,19 @@ Ensure you trust all modifications made to build files before approving executio
|
|
|
12090
12071
|
planPath: confirmationDetails.planPath,
|
|
12091
12072
|
getPreferredEditor,
|
|
12092
12073
|
onApprove: (approvalMode) => {
|
|
12093
|
-
handleConfirm(
|
|
12074
|
+
handleConfirm("proceed_once" /* ProceedOnce */, {
|
|
12094
12075
|
approved: true,
|
|
12095
12076
|
approvalMode
|
|
12096
12077
|
});
|
|
12097
12078
|
},
|
|
12098
12079
|
onFeedback: (feedback) => {
|
|
12099
|
-
handleConfirm(
|
|
12080
|
+
handleConfirm("proceed_once" /* ProceedOnce */, {
|
|
12100
12081
|
approved: false,
|
|
12101
12082
|
feedback
|
|
12102
12083
|
});
|
|
12103
12084
|
},
|
|
12104
12085
|
onCancel: () => {
|
|
12105
|
-
handleConfirm(
|
|
12086
|
+
handleConfirm("cancel" /* Cancel */);
|
|
12106
12087
|
},
|
|
12107
12088
|
width: safeTerminalWidth,
|
|
12108
12089
|
availableHeight: bodyHeight
|
|
@@ -12212,7 +12193,7 @@ Ensure you trust all modifications made to build files before approving executio
|
|
|
12212
12193
|
const containsRedirection = commandsToDisplay.some(
|
|
12213
12194
|
(cmd) => hasRedirection(cmd)
|
|
12214
12195
|
);
|
|
12215
|
-
const isAutoEdit = config.getApprovalMode() ===
|
|
12196
|
+
const isAutoEdit = config.getApprovalMode() === "yolo" /* YOLO */ || config.getApprovalMode() === "autoEdit" /* AUTO_EDIT */;
|
|
12216
12197
|
let warnings = null;
|
|
12217
12198
|
if (containsRedirection && !isAutoEdit) {
|
|
12218
12199
|
const tipText = `To auto-accept, press ${formatCommand("app.cycleApprovalMode" /* CYCLE_APPROVAL_MODE */)}`;
|
|
@@ -12371,7 +12352,7 @@ Ensure you trust all modifications made to build files before approving executio
|
|
|
12371
12352
|
const bodyOverflowDirection = confirmationDetails.type === "mcp" && isMcpToolDetailsExpanded ? "bottom" : "top";
|
|
12372
12353
|
const renderRadioItem = (0, import_react35.useCallback)(
|
|
12373
12354
|
(item, { titleColor }) => {
|
|
12374
|
-
if (item.value ===
|
|
12355
|
+
if (item.value === "proceed_always_and_save" /* ProceedAlwaysAndSave */) {
|
|
12375
12356
|
return /* @__PURE__ */ (0, import_jsx_runtime64.jsxs)(Text, { color: titleColor, wrap: "truncate", children: [
|
|
12376
12357
|
item.label,
|
|
12377
12358
|
" ",
|
|
@@ -14416,7 +14397,7 @@ async function validateAuthMethodWithSettings(authType, settings) {
|
|
|
14416
14397
|
if (settings.merged.security.auth.useExternal) {
|
|
14417
14398
|
return null;
|
|
14418
14399
|
}
|
|
14419
|
-
if (authType ===
|
|
14400
|
+
if (authType === "gemini-api-key" /* USE_GEMINI */) {
|
|
14420
14401
|
return null;
|
|
14421
14402
|
}
|
|
14422
14403
|
return validateAuthMethod(authType);
|
|
@@ -14468,7 +14449,7 @@ var useAuthCommand = (settings, config, initialAuthError = null, initialAccountS
|
|
|
14468
14449
|
}
|
|
14469
14450
|
return;
|
|
14470
14451
|
}
|
|
14471
|
-
if (authType ===
|
|
14452
|
+
if (authType === "gemini-api-key" /* USE_GEMINI */) {
|
|
14472
14453
|
const key = await reloadApiKey();
|
|
14473
14454
|
if (!key) {
|
|
14474
14455
|
setAuthState("awaiting_api_key_input" /* AwaitingApiKeyInput */);
|
|
@@ -14546,31 +14527,31 @@ function AuthDialog({
|
|
|
14546
14527
|
let items = [
|
|
14547
14528
|
{
|
|
14548
14529
|
label: "Sign in with Google",
|
|
14549
|
-
value:
|
|
14550
|
-
key:
|
|
14530
|
+
value: "oauth-personal" /* LOGIN_WITH_GOOGLE */,
|
|
14531
|
+
key: "oauth-personal" /* LOGIN_WITH_GOOGLE */
|
|
14551
14532
|
},
|
|
14552
14533
|
...process.env["CLOUD_SHELL"] === "true" ? [
|
|
14553
14534
|
{
|
|
14554
14535
|
label: "Use Cloud Shell user credentials",
|
|
14555
|
-
value:
|
|
14556
|
-
key:
|
|
14536
|
+
value: "compute-default-credentials" /* COMPUTE_ADC */,
|
|
14537
|
+
key: "compute-default-credentials" /* COMPUTE_ADC */
|
|
14557
14538
|
}
|
|
14558
14539
|
] : process.env["GEMINI_CLI_USE_COMPUTE_ADC"] === "true" ? [
|
|
14559
14540
|
{
|
|
14560
14541
|
label: "Use metadata server application default credentials",
|
|
14561
|
-
value:
|
|
14562
|
-
key:
|
|
14542
|
+
value: "compute-default-credentials" /* COMPUTE_ADC */,
|
|
14543
|
+
key: "compute-default-credentials" /* COMPUTE_ADC */
|
|
14563
14544
|
}
|
|
14564
14545
|
] : [],
|
|
14565
14546
|
{
|
|
14566
14547
|
label: "Use Gemini API Key",
|
|
14567
|
-
value:
|
|
14568
|
-
key:
|
|
14548
|
+
value: "gemini-api-key" /* USE_GEMINI */,
|
|
14549
|
+
key: "gemini-api-key" /* USE_GEMINI */
|
|
14569
14550
|
},
|
|
14570
14551
|
{
|
|
14571
14552
|
label: "Vertex AI",
|
|
14572
|
-
value:
|
|
14573
|
-
key:
|
|
14553
|
+
value: "vertex-ai" /* USE_VERTEX_AI */,
|
|
14554
|
+
key: "vertex-ai" /* USE_VERTEX_AI */
|
|
14574
14555
|
}
|
|
14575
14556
|
];
|
|
14576
14557
|
if (settings.merged.security.auth.enforcedType) {
|
|
@@ -14592,9 +14573,9 @@ function AuthDialog({
|
|
|
14592
14573
|
return item.value === defaultAuthType;
|
|
14593
14574
|
}
|
|
14594
14575
|
if (process.env["GEMINI_API_KEY"]) {
|
|
14595
|
-
return item.value ===
|
|
14576
|
+
return item.value === "gemini-api-key" /* USE_GEMINI */;
|
|
14596
14577
|
}
|
|
14597
|
-
return item.value ===
|
|
14578
|
+
return item.value === "oauth-personal" /* LOGIN_WITH_GOOGLE */;
|
|
14598
14579
|
});
|
|
14599
14580
|
if (settings.merged.security.auth.enforcedType) {
|
|
14600
14581
|
initialAuthIndex = 0;
|
|
@@ -14605,7 +14586,7 @@ function AuthDialog({
|
|
|
14605
14586
|
return;
|
|
14606
14587
|
}
|
|
14607
14588
|
if (authType) {
|
|
14608
|
-
const needsRestart = authType ===
|
|
14589
|
+
const needsRestart = authType === "oauth-personal" /* LOGIN_WITH_GOOGLE */ || authType === "vertex-ai" /* USE_VERTEX_AI */ && process.env["CLOUD_SHELL"] === "true";
|
|
14609
14590
|
if (needsRestart) {
|
|
14610
14591
|
setAuthContext({ requiresRestart: true });
|
|
14611
14592
|
} else {
|
|
@@ -14613,12 +14594,12 @@ function AuthDialog({
|
|
|
14613
14594
|
}
|
|
14614
14595
|
await clearCachedCredentialFile();
|
|
14615
14596
|
settings.setValue(scope, "security.auth.selectedType", authType);
|
|
14616
|
-
if (authType ===
|
|
14597
|
+
if (authType === "oauth-personal" /* LOGIN_WITH_GOOGLE */ && config.isBrowserLaunchSuppressed()) {
|
|
14617
14598
|
setExiting(true);
|
|
14618
14599
|
setTimeout(relaunchApp, 100);
|
|
14619
14600
|
return;
|
|
14620
14601
|
}
|
|
14621
|
-
if (authType ===
|
|
14602
|
+
if (authType === "gemini-api-key" /* USE_GEMINI */) {
|
|
14622
14603
|
setAuthState("awaiting_api_key_input" /* AwaitingApiKeyInput */);
|
|
14623
14604
|
return;
|
|
14624
14605
|
}
|
|
@@ -15425,11 +15406,11 @@ var PrivacyNoticeText = ({
|
|
|
15425
15406
|
}) => {
|
|
15426
15407
|
const authType = config.getContentGeneratorConfig()?.authType;
|
|
15427
15408
|
switch (authType) {
|
|
15428
|
-
case
|
|
15409
|
+
case "gemini-api-key" /* USE_GEMINI */:
|
|
15429
15410
|
return /* @__PURE__ */ (0, import_jsx_runtime82.jsx)(GeminiPrivacyNotice, { onExit });
|
|
15430
|
-
case
|
|
15411
|
+
case "vertex-ai" /* USE_VERTEX_AI */:
|
|
15431
15412
|
return /* @__PURE__ */ (0, import_jsx_runtime82.jsx)(CloudPaidPrivacyNotice, { onExit });
|
|
15432
|
-
case
|
|
15413
|
+
case "oauth-personal" /* LOGIN_WITH_GOOGLE */:
|
|
15433
15414
|
default:
|
|
15434
15415
|
return /* @__PURE__ */ (0, import_jsx_runtime82.jsx)(CloudFreePrivacyNotice, { config, onExit });
|
|
15435
15416
|
}
|
|
@@ -15489,7 +15470,7 @@ function ProQuotaDialog({
|
|
|
15489
15470
|
value: "retry_always",
|
|
15490
15471
|
key: "retry_always"
|
|
15491
15472
|
},
|
|
15492
|
-
...authType ===
|
|
15473
|
+
...authType === "oauth-personal" /* LOGIN_WITH_GOOGLE */ && !isUltra ? [
|
|
15493
15474
|
{
|
|
15494
15475
|
label: "Upgrade for higher limits",
|
|
15495
15476
|
value: "upgrade",
|
|
@@ -16656,7 +16637,7 @@ function ModelDialog({ onClose }) {
|
|
|
16656
16637
|
const useLatestFlash = config?.hasLatestFlashGAAccess?.() ?? false;
|
|
16657
16638
|
const useLatestFlashLite = config?.hasLatestFlashLiteGAAccess?.() ?? false;
|
|
16658
16639
|
const selectedAuthType = settings.merged.security.auth.selectedType;
|
|
16659
|
-
const useCustomToolModel = useGemini31 && selectedAuthType ===
|
|
16640
|
+
const useCustomToolModel = useGemini31 && selectedAuthType === "gemini-api-key" /* USE_GEMINI */;
|
|
16660
16641
|
const manualModelSelected = (0, import_react53.useMemo)(() => {
|
|
16661
16642
|
if (config?.getExperimentalDynamicModelConfiguration?.() === true && config.getModelConfigService) {
|
|
16662
16643
|
const def = config.getModelConfigService().getModelDefinition(preferredModel);
|
|
@@ -17984,10 +17965,10 @@ function initializeConsoleStore() {
|
|
|
17984
17965
|
globalConsoleMessages = [];
|
|
17985
17966
|
globalErrorCount = 0;
|
|
17986
17967
|
notifyListeners();
|
|
17987
|
-
coreEvents.off(
|
|
17988
|
-
coreEvents.off(
|
|
17989
|
-
coreEvents.on(
|
|
17990
|
-
coreEvents.on(
|
|
17968
|
+
coreEvents.off("console-log" /* ConsoleLog */, handleConsoleLog);
|
|
17969
|
+
coreEvents.off("output" /* Output */, handleOutput);
|
|
17970
|
+
coreEvents.on("console-log" /* ConsoleLog */, handleConsoleLog);
|
|
17971
|
+
coreEvents.on("output" /* Output */, handleOutput);
|
|
17991
17972
|
}
|
|
17992
17973
|
function notifyListeners() {
|
|
17993
17974
|
for (const listener of listeners) {
|
|
@@ -20124,7 +20105,7 @@ function usePromptCompletion({
|
|
|
20124
20105
|
{ model: "prompt-completion" },
|
|
20125
20106
|
contents,
|
|
20126
20107
|
signal,
|
|
20127
|
-
|
|
20108
|
+
"utility_autocomplete" /* UTILITY_AUTOCOMPLETE */
|
|
20128
20109
|
);
|
|
20129
20110
|
if (signal.aborted) {
|
|
20130
20111
|
return;
|
|
@@ -22196,9 +22177,9 @@ var InputPrompt = ({
|
|
|
22196
22177
|
onSuggestionsVisibilityChange(shouldShowSuggestions);
|
|
22197
22178
|
}
|
|
22198
22179
|
}, [shouldShowSuggestions, onSuggestionsVisibilityChange]);
|
|
22199
|
-
const showAutoAcceptStyling = !shellModeActive && approvalMode ===
|
|
22200
|
-
const showYoloStyling = !shellModeActive && approvalMode ===
|
|
22201
|
-
const showPlanStyling = !shellModeActive && approvalMode ===
|
|
22180
|
+
const showAutoAcceptStyling = !shellModeActive && approvalMode === "autoEdit" /* AUTO_EDIT */;
|
|
22181
|
+
const showYoloStyling = !shellModeActive && approvalMode === "yolo" /* YOLO */;
|
|
22182
|
+
const showPlanStyling = !shellModeActive && approvalMode === "plan" /* PLAN */;
|
|
22202
22183
|
let statusColor;
|
|
22203
22184
|
let statusText = "";
|
|
22204
22185
|
if (shellModeActive) {
|
|
@@ -22813,7 +22794,6 @@ var GeminiRespondingSpinner = ({
|
|
|
22813
22794
|
var import_jsx_runtime113 = __toESM(require_jsx_runtime(), 1);
|
|
22814
22795
|
var LoadingIndicator = ({
|
|
22815
22796
|
currentLoadingPhrase,
|
|
22816
|
-
statusPhrase,
|
|
22817
22797
|
wittyPhrase,
|
|
22818
22798
|
showWit = false,
|
|
22819
22799
|
elapsedTime,
|
|
@@ -22829,10 +22809,10 @@ var LoadingIndicator = ({
|
|
|
22829
22809
|
const streamingState = useStreamingContext();
|
|
22830
22810
|
const { columns: terminalWidth } = useTerminalSize();
|
|
22831
22811
|
const isNarrow = isNarrowWidth(terminalWidth);
|
|
22832
|
-
if (streamingState === "idle" /* Idle */ && !currentLoadingPhrase && !
|
|
22812
|
+
if (streamingState === "idle" /* Idle */ && !currentLoadingPhrase && !thought) {
|
|
22833
22813
|
return null;
|
|
22834
22814
|
}
|
|
22835
|
-
const primaryText =
|
|
22815
|
+
const primaryText = currentLoadingPhrase === INTERACTIVE_SHELL_WAITING_PHRASE ? currentLoadingPhrase : thought?.subject ? thoughtLabel ?? thought.subject : currentLoadingPhrase || (streamingState === "responding" /* Responding */ ? "Thinking..." : void 0);
|
|
22836
22816
|
const cancelAndTimerContent = showCancelAndTimer && streamingState === "responding" /* Responding */ ? `(esc to cancel, ${elapsedTime < 60 ? `${elapsedTime}s` : formatDuration(elapsedTime * 1e3)})` : null;
|
|
22837
22817
|
const wittyPhraseNode = !forceRealStatusOnly && showWit && wittyPhrase && primaryText === "Thinking..." ? /* @__PURE__ */ (0, import_jsx_runtime113.jsx)(Box_default, { marginLeft: 1, children: /* @__PURE__ */ (0, import_jsx_runtime113.jsx)(Text, { color: theme.text.secondary, dimColor: true, italic: true, children: wittyPhrase }) }) : null;
|
|
22838
22818
|
if (inline) {
|
|
@@ -23032,22 +23012,22 @@ var ApprovalModeIndicator = ({
|
|
|
23032
23012
|
const cycleHint = formatCommand("app.cycleApprovalMode" /* CYCLE_APPROVAL_MODE */);
|
|
23033
23013
|
const yoloHint = formatCommand("app.toggleYolo" /* TOGGLE_YOLO */);
|
|
23034
23014
|
switch (approvalMode) {
|
|
23035
|
-
case
|
|
23015
|
+
case "autoEdit" /* AUTO_EDIT */:
|
|
23036
23016
|
textColor = theme.status.warning;
|
|
23037
23017
|
textContent = "auto-accept edits";
|
|
23038
23018
|
subText = allowPlanMode ? `${cycleHint} to plan` : `${cycleHint} to manual`;
|
|
23039
23019
|
break;
|
|
23040
|
-
case
|
|
23020
|
+
case "plan" /* PLAN */:
|
|
23041
23021
|
textColor = theme.status.success;
|
|
23042
23022
|
textContent = "plan";
|
|
23043
23023
|
subText = `${cycleHint} to manual`;
|
|
23044
23024
|
break;
|
|
23045
|
-
case
|
|
23025
|
+
case "yolo" /* YOLO */:
|
|
23046
23026
|
textColor = theme.status.error;
|
|
23047
23027
|
textContent = "YOLO";
|
|
23048
23028
|
subText = yoloHint;
|
|
23049
23029
|
break;
|
|
23050
|
-
case
|
|
23030
|
+
case "default" /* DEFAULT */:
|
|
23051
23031
|
default:
|
|
23052
23032
|
textColor = theme.text.accent;
|
|
23053
23033
|
textContent = "";
|
|
@@ -23095,7 +23075,7 @@ var useComposerStatus = () => {
|
|
|
23095
23075
|
(item) => item.type === "tool_group"
|
|
23096
23076
|
).some(
|
|
23097
23077
|
(item) => item.tools.some(
|
|
23098
|
-
(tool) => tool.status ===
|
|
23078
|
+
(tool) => tool.status === "awaiting_approval" /* AwaitingApproval */
|
|
23099
23079
|
)
|
|
23100
23080
|
),
|
|
23101
23081
|
[uiState.pendingHistoryItems]
|
|
@@ -23110,13 +23090,13 @@ var useComposerStatus = () => {
|
|
|
23110
23090
|
const hideMinimalModeHintWhileBusy = !uiState.cleanUiDetailsVisible && (showLoadingIndicator || uiState.activeHooks.length > 0);
|
|
23111
23091
|
if (hideMinimalModeHintWhileBusy) return null;
|
|
23112
23092
|
switch (showApprovalModeIndicator) {
|
|
23113
|
-
case
|
|
23093
|
+
case "yolo" /* YOLO */:
|
|
23114
23094
|
return { text: "YOLO", color: theme.status.error };
|
|
23115
|
-
case
|
|
23095
|
+
case "plan" /* PLAN */:
|
|
23116
23096
|
return { text: "plan", color: theme.status.success };
|
|
23117
|
-
case
|
|
23097
|
+
case "autoEdit" /* AUTO_EDIT */:
|
|
23118
23098
|
return { text: "auto edit", color: theme.status.warning };
|
|
23119
|
-
case
|
|
23099
|
+
case "default" /* DEFAULT */:
|
|
23120
23100
|
default:
|
|
23121
23101
|
return null;
|
|
23122
23102
|
}
|
|
@@ -23169,7 +23149,6 @@ var StatusNode = ({
|
|
|
23169
23149
|
activeHooks,
|
|
23170
23150
|
showLoadingIndicator,
|
|
23171
23151
|
errorVerbosity,
|
|
23172
|
-
statusPhrase,
|
|
23173
23152
|
onResize
|
|
23174
23153
|
}) => {
|
|
23175
23154
|
const observerRef = (0, import_react77.useRef)(null);
|
|
@@ -23198,9 +23177,7 @@ var StatusNode = ({
|
|
|
23198
23177
|
},
|
|
23199
23178
|
[onResize]
|
|
23200
23179
|
);
|
|
23201
|
-
if (activeHooks.length === 0 && !showLoadingIndicator
|
|
23202
|
-
return null;
|
|
23203
|
-
}
|
|
23180
|
+
if (activeHooks.length === 0 && !showLoadingIndicator) return null;
|
|
23204
23181
|
let currentLoadingPhrase = void 0;
|
|
23205
23182
|
let currentThought = null;
|
|
23206
23183
|
if (activeHooks.length > 0) {
|
|
@@ -23232,7 +23209,6 @@ var StatusNode = ({
|
|
|
23232
23209
|
errorVerbosity,
|
|
23233
23210
|
thought: currentThought,
|
|
23234
23211
|
currentLoadingPhrase,
|
|
23235
|
-
statusPhrase,
|
|
23236
23212
|
elapsedTime,
|
|
23237
23213
|
forceRealStatusOnly: false,
|
|
23238
23214
|
wittyPhrase: currentWittyPhrase
|
|
@@ -23245,11 +23221,9 @@ var StatusRow = ({
|
|
|
23245
23221
|
terminalWidth,
|
|
23246
23222
|
hideContextSummary,
|
|
23247
23223
|
hideUiDetailsForSuggestions,
|
|
23248
|
-
hasPendingActionRequired
|
|
23249
|
-
statusPhrase: propStatusPhrase
|
|
23224
|
+
hasPendingActionRequired
|
|
23250
23225
|
}) => {
|
|
23251
23226
|
const uiState = useUIState();
|
|
23252
|
-
const statusPhrase = propStatusPhrase ?? uiState.statusPhrase;
|
|
23253
23227
|
const inputState = useInputState();
|
|
23254
23228
|
const settings = useSettings();
|
|
23255
23229
|
const {
|
|
@@ -23301,7 +23275,7 @@ var StatusRow = ({
|
|
|
23301
23275
|
const showTipLine = Boolean(
|
|
23302
23276
|
!hasPendingActionRequired && tipContentStr && !willCollideTip && !isNarrow
|
|
23303
23277
|
);
|
|
23304
|
-
const showRow1Minimal = showLoadingIndicator || uiState.activeHooks.length > 0 || showTipLine
|
|
23278
|
+
const showRow1Minimal = showLoadingIndicator || uiState.activeHooks.length > 0 || showTipLine;
|
|
23305
23279
|
const showRow2Minimal = Boolean(modeContentObj) && !hideUiDetailsForSuggestions || showMinimalContext;
|
|
23306
23280
|
const showRow1 = showUiDetails || showRow1Minimal;
|
|
23307
23281
|
const showRow2 = showUiDetails || showRow2Minimal;
|
|
@@ -23319,7 +23293,6 @@ var StatusRow = ({
|
|
|
23319
23293
|
activeHooks: uiState.activeHooks,
|
|
23320
23294
|
showLoadingIndicator,
|
|
23321
23295
|
errorVerbosity: settings.merged.ui.errorVerbosity,
|
|
23322
|
-
statusPhrase,
|
|
23323
23296
|
onResize: onStatusResize
|
|
23324
23297
|
}
|
|
23325
23298
|
);
|
|
@@ -23477,7 +23450,7 @@ var ConfigInitDisplay = ({
|
|
|
23477
23450
|
let connected = 0;
|
|
23478
23451
|
const connecting = [];
|
|
23479
23452
|
for (const [name, client] of clients.entries()) {
|
|
23480
|
-
if (client.getStatus() ===
|
|
23453
|
+
if (client.getStatus() === "connected" /* CONNECTED */) {
|
|
23481
23454
|
connected++;
|
|
23482
23455
|
} else {
|
|
23483
23456
|
connecting.push(name);
|
|
@@ -23499,9 +23472,9 @@ var ConfigInitDisplay = ({
|
|
|
23499
23472
|
);
|
|
23500
23473
|
}
|
|
23501
23474
|
};
|
|
23502
|
-
coreEvents.on(
|
|
23475
|
+
coreEvents.on("mcp-client-update" /* McpClientUpdate */, onChange);
|
|
23503
23476
|
return () => {
|
|
23504
|
-
coreEvents.off(
|
|
23477
|
+
coreEvents.off("mcp-client-update" /* McpClientUpdate */, onChange);
|
|
23505
23478
|
};
|
|
23506
23479
|
}, [initialMessage]);
|
|
23507
23480
|
return /* @__PURE__ */ (0, import_jsx_runtime122.jsx)(Box_default, { marginTop: 1, children: /* @__PURE__ */ (0, import_jsx_runtime122.jsxs)(Text, { children: [
|
|
@@ -24218,7 +24191,7 @@ var useExecutionLifecycle = (addItemToHistory, setPendingHistoryItem, onExec, on
|
|
|
24218
24191
|
callId,
|
|
24219
24192
|
name: SHELL_COMMAND_NAME,
|
|
24220
24193
|
description: rawQuery,
|
|
24221
|
-
status:
|
|
24194
|
+
status: "executing" /* Executing */,
|
|
24222
24195
|
isClientInitiated: true,
|
|
24223
24196
|
resultDisplay: "",
|
|
24224
24197
|
confirmationDetails: void 0
|
|
@@ -24359,7 +24332,7 @@ __code=$?; pwd > ${escapedPwdFilePath}; exit $__code`;
|
|
|
24359
24332
|
mainContent = result.output.trim() || "(Command produced no output)";
|
|
24360
24333
|
}
|
|
24361
24334
|
let finalOutput = result.ansiOutput && result.ansiOutput.length > 0 ? result.ansiOutput : mainContent;
|
|
24362
|
-
let finalStatus =
|
|
24335
|
+
let finalStatus = "success" /* Success */;
|
|
24363
24336
|
const prependToAnsiOutput = (output, text) => {
|
|
24364
24337
|
const newLines = text.split("\n").map((line) => [
|
|
24365
24338
|
{
|
|
@@ -24378,20 +24351,20 @@ __code=$?; pwd > ${escapedPwdFilePath}; exit $__code`;
|
|
|
24378
24351
|
};
|
|
24379
24352
|
let prefix = "";
|
|
24380
24353
|
if (result.error) {
|
|
24381
|
-
finalStatus =
|
|
24354
|
+
finalStatus = "error" /* Error */;
|
|
24382
24355
|
prefix = result.error.message;
|
|
24383
24356
|
} else if (result.aborted) {
|
|
24384
|
-
finalStatus =
|
|
24357
|
+
finalStatus = "cancelled" /* Cancelled */;
|
|
24385
24358
|
prefix = "Command was cancelled.";
|
|
24386
24359
|
} else if (result.backgrounded) {
|
|
24387
|
-
finalStatus =
|
|
24360
|
+
finalStatus = "success" /* Success */;
|
|
24388
24361
|
finalOutput = `Command moved to background (PID: ${result.pid}). Output hidden. Press Ctrl+B to view.`;
|
|
24389
24362
|
mainContent = finalOutput;
|
|
24390
24363
|
} else if (result.signal) {
|
|
24391
|
-
finalStatus =
|
|
24364
|
+
finalStatus = "error" /* Error */;
|
|
24392
24365
|
prefix = `Command terminated by signal: ${result.signal}.`;
|
|
24393
24366
|
} else if (result.exitCode !== 0) {
|
|
24394
|
-
finalStatus =
|
|
24367
|
+
finalStatus = "error" /* Error */;
|
|
24395
24368
|
prefix = `Command exited with code ${result.exitCode}.`;
|
|
24396
24369
|
}
|
|
24397
24370
|
if (prefix) {
|
|
@@ -24417,7 +24390,7 @@ ${mainContent}`;
|
|
|
24417
24390
|
status: finalStatus,
|
|
24418
24391
|
resultDisplay: finalOutput
|
|
24419
24392
|
};
|
|
24420
|
-
if (finalStatus !==
|
|
24393
|
+
if (finalStatus !== "cancelled" /* Cancelled */) {
|
|
24421
24394
|
addItemToHistory(
|
|
24422
24395
|
{
|
|
24423
24396
|
type: "tool_group",
|
|
@@ -25427,13 +25400,13 @@ function useQuotaAndFallback({
|
|
|
25427
25400
|
error.retryDelayMs ? `Access resets at ${getResetTimeMessage(error.retryDelayMs)}.` : null,
|
|
25428
25401
|
`/stats model for usage details`,
|
|
25429
25402
|
`/model to switch models.`,
|
|
25430
|
-
contentGeneratorConfig?.authType ===
|
|
25403
|
+
contentGeneratorConfig?.authType === "oauth-personal" /* LOGIN_WITH_GOOGLE */ ? `/auth to switch to API key.` : null
|
|
25431
25404
|
].filter(Boolean);
|
|
25432
25405
|
message = messageLines.join("\n");
|
|
25433
25406
|
}
|
|
25434
25407
|
} else if (error instanceof ModelNotFoundError) {
|
|
25435
25408
|
isModelNotFoundError = true;
|
|
25436
|
-
if (contentGeneratorConfig?.authType ===
|
|
25409
|
+
if (contentGeneratorConfig?.authType === "vertex-ai" /* USE_VERTEX_AI */ && VALID_GEMINI_MODELS.has(failedModel)) {
|
|
25437
25410
|
const location = process.env["GOOGLE_CLOUD_LOCATION"] || "your configured region";
|
|
25438
25411
|
const messageLines = [
|
|
25439
25412
|
`Model "${failedModel}" is not available in region "${location}".`,
|
|
@@ -25627,7 +25600,7 @@ var useEditorSettings = (loadedSettings, setEditorError, addItem) => {
|
|
|
25627
25600
|
);
|
|
25628
25601
|
setEditorError(null);
|
|
25629
25602
|
setIsEditorDialogOpen(false);
|
|
25630
|
-
coreEvents.emit(
|
|
25603
|
+
coreEvents.emit("editor-selected" /* EditorSelected */, { editor: editorType });
|
|
25631
25604
|
} catch (error) {
|
|
25632
25605
|
setEditorError(`Failed to set editor preference: ${error}`);
|
|
25633
25606
|
}
|
|
@@ -25636,7 +25609,7 @@ var useEditorSettings = (loadedSettings, setEditorError, addItem) => {
|
|
|
25636
25609
|
);
|
|
25637
25610
|
const exitEditorDialog = (0, import_react89.useCallback)(() => {
|
|
25638
25611
|
setIsEditorDialogOpen(false);
|
|
25639
|
-
coreEvents.emit(
|
|
25612
|
+
coreEvents.emit("editor-selected" /* EditorSelected */, { editor: void 0 });
|
|
25640
25613
|
}, []);
|
|
25641
25614
|
return {
|
|
25642
25615
|
isEditorDialogOpen,
|
|
@@ -26013,7 +25986,7 @@ var useSlashCommandProcessor = (config, settings, addItem, clearItems, loadHisto
|
|
|
26013
25986
|
canonicalPath: resolvedCommandPath
|
|
26014
25987
|
} = parseSlashCommand(trimmed, commands);
|
|
26015
25988
|
if (!commandToExecute) {
|
|
26016
|
-
const isMcpLoading = config?.getMcpClientManager()?.getDiscoveryState() ===
|
|
25989
|
+
const isMcpLoading = config?.getMcpClientManager()?.getDiscoveryState() === "in_progress" /* IN_PROGRESS */;
|
|
26017
25990
|
if (isMcpLoading) {
|
|
26018
25991
|
setIsProcessing(true);
|
|
26019
25992
|
if (addToHistory) {
|
|
@@ -26193,7 +26166,7 @@ var useSlashCommandProcessor = (config, settings, addItem, clearItems, loadHisto
|
|
|
26193
26166
|
onConfirm: async (resolvedOutcome) => {
|
|
26194
26167
|
resolve3({
|
|
26195
26168
|
outcome: resolvedOutcome,
|
|
26196
|
-
approvedCommands: resolvedOutcome ===
|
|
26169
|
+
approvedCommands: resolvedOutcome === "cancel" /* Cancel */ ? [] : result.commandsToConfirm
|
|
26197
26170
|
});
|
|
26198
26171
|
}
|
|
26199
26172
|
};
|
|
@@ -26201,7 +26174,7 @@ var useSlashCommandProcessor = (config, settings, addItem, clearItems, loadHisto
|
|
|
26201
26174
|
callId,
|
|
26202
26175
|
name: "Expansion",
|
|
26203
26176
|
description: "Command expansion needs shell access",
|
|
26204
|
-
status:
|
|
26177
|
+
status: "awaiting_approval" /* AwaitingApproval */,
|
|
26205
26178
|
isClientInitiated: true,
|
|
26206
26179
|
resultDisplay: void 0,
|
|
26207
26180
|
confirmationDetails
|
|
@@ -26212,7 +26185,7 @@ var useSlashCommandProcessor = (config, settings, addItem, clearItems, loadHisto
|
|
|
26212
26185
|
});
|
|
26213
26186
|
});
|
|
26214
26187
|
setPendingItem(null);
|
|
26215
|
-
if (outcome ===
|
|
26188
|
+
if (outcome === "cancel" /* Cancel */ || !approvedCommands || approvedCommands.length === 0) {
|
|
26216
26189
|
addItem(
|
|
26217
26190
|
{
|
|
26218
26191
|
type: "info" /* INFO */,
|
|
@@ -26222,7 +26195,7 @@ var useSlashCommandProcessor = (config, settings, addItem, clearItems, loadHisto
|
|
|
26222
26195
|
);
|
|
26223
26196
|
return { type: "handled" };
|
|
26224
26197
|
}
|
|
26225
|
-
if (outcome ===
|
|
26198
|
+
if (outcome === "proceed_always" /* ProceedAlways */) {
|
|
26226
26199
|
setSessionShellAllowlist(
|
|
26227
26200
|
(prev) => /* @__PURE__ */ new Set([...prev, ...approvedCommands])
|
|
26228
26201
|
);
|
|
@@ -26698,7 +26671,7 @@ function mapToDisplay(toolOrTools, options = {}) {
|
|
|
26698
26671
|
let description;
|
|
26699
26672
|
let renderOutputAsMarkdown = false;
|
|
26700
26673
|
const displayName = call.tool?.displayName ?? call.request.name;
|
|
26701
|
-
if (call.status ===
|
|
26674
|
+
if (call.status === "error" /* Error */) {
|
|
26702
26675
|
description = JSON.stringify(call.request.args);
|
|
26703
26676
|
} else {
|
|
26704
26677
|
description = call.invocation.getDescription();
|
|
@@ -26721,27 +26694,27 @@ function mapToDisplay(toolOrTools, options = {}) {
|
|
|
26721
26694
|
let progress = void 0;
|
|
26722
26695
|
let progressTotal = void 0;
|
|
26723
26696
|
switch (call.status) {
|
|
26724
|
-
case
|
|
26697
|
+
case "success" /* Success */:
|
|
26725
26698
|
resultDisplay = call.response.resultDisplay;
|
|
26726
26699
|
outputFile = call.response.outputFile;
|
|
26727
26700
|
break;
|
|
26728
|
-
case
|
|
26729
|
-
case
|
|
26701
|
+
case "error" /* Error */:
|
|
26702
|
+
case "cancelled" /* Cancelled */:
|
|
26730
26703
|
resultDisplay = call.response.resultDisplay;
|
|
26731
26704
|
break;
|
|
26732
|
-
case
|
|
26705
|
+
case "awaiting_approval" /* AwaitingApproval */:
|
|
26733
26706
|
correlationId = call.correlationId;
|
|
26734
26707
|
confirmationDetails = call.confirmationDetails;
|
|
26735
26708
|
break;
|
|
26736
|
-
case
|
|
26709
|
+
case "executing" /* Executing */:
|
|
26737
26710
|
resultDisplay = call.liveOutput;
|
|
26738
26711
|
ptyId = call.pid;
|
|
26739
26712
|
progressMessage = call.progressMessage;
|
|
26740
26713
|
progress = call.progress;
|
|
26741
26714
|
progressTotal = call.progressTotal;
|
|
26742
26715
|
break;
|
|
26743
|
-
case
|
|
26744
|
-
case
|
|
26716
|
+
case "scheduled" /* Scheduled */:
|
|
26717
|
+
case "validating" /* Validating */:
|
|
26745
26718
|
break;
|
|
26746
26719
|
default: {
|
|
26747
26720
|
const exhaustiveCheck = call;
|
|
@@ -26812,7 +26785,7 @@ function useToolScheduler(onComplete, config, getPreferredEditor) {
|
|
|
26812
26785
|
const handler = (event) => {
|
|
26813
26786
|
const isRoot = event.schedulerId === ROOT_SCHEDULER_ID;
|
|
26814
26787
|
const hasExecuting = event.toolCalls.some(
|
|
26815
|
-
(tc) => tc.status ===
|
|
26788
|
+
(tc) => tc.status === "executing" /* Executing */ || (tc.status === "success" /* Success */ || tc.status === "error" /* Error */) && "tailToolCallRequest" in tc && tc.tailToolCallRequest != null
|
|
26816
26789
|
);
|
|
26817
26790
|
if (hasExecuting) {
|
|
26818
26791
|
setLastToolOutputTime(Date.now());
|
|
@@ -26821,7 +26794,7 @@ function useToolScheduler(onComplete, config, getPreferredEditor) {
|
|
|
26821
26794
|
const prevCalls = prev[event.schedulerId] ?? [];
|
|
26822
26795
|
const prevCallIds = new Set(prevCalls.map((tc) => tc.request.callId));
|
|
26823
26796
|
const filteredToolCalls = isRoot ? event.toolCalls : event.toolCalls.filter(
|
|
26824
|
-
(tc) => tc.status ===
|
|
26797
|
+
(tc) => tc.status === "awaiting_approval" /* AwaitingApproval */ || prevCallIds.has(tc.request.callId)
|
|
26825
26798
|
);
|
|
26826
26799
|
if (!isRoot && filteredToolCalls.length === 0 && prevCalls.length === 0) {
|
|
26827
26800
|
return prev;
|
|
@@ -26833,9 +26806,9 @@ function useToolScheduler(onComplete, config, getPreferredEditor) {
|
|
|
26833
26806
|
};
|
|
26834
26807
|
});
|
|
26835
26808
|
};
|
|
26836
|
-
messageBus.subscribe(
|
|
26809
|
+
messageBus.subscribe("tool-calls-update" /* TOOL_CALLS_UPDATE */, handler);
|
|
26837
26810
|
return () => {
|
|
26838
|
-
messageBus.unsubscribe(
|
|
26811
|
+
messageBus.unsubscribe("tool-calls-update" /* TOOL_CALLS_UPDATE */, handler);
|
|
26839
26812
|
};
|
|
26840
26813
|
}, [messageBus, internalAdaptToolCalls]);
|
|
26841
26814
|
(0, import_react96.useEffect)(() => {
|
|
@@ -26857,9 +26830,9 @@ function useToolScheduler(onComplete, config, getPreferredEditor) {
|
|
|
26857
26830
|
};
|
|
26858
26831
|
});
|
|
26859
26832
|
};
|
|
26860
|
-
messageBus.subscribe(
|
|
26833
|
+
messageBus.subscribe("subagent-activity" /* SUBAGENT_ACTIVITY */, handler);
|
|
26861
26834
|
return () => {
|
|
26862
|
-
messageBus.unsubscribe(
|
|
26835
|
+
messageBus.unsubscribe("subagent-activity" /* SUBAGENT_ACTIVITY */, handler);
|
|
26863
26836
|
};
|
|
26864
26837
|
}, [messageBus]);
|
|
26865
26838
|
const schedule = (0, import_react96.useCallback)(
|
|
@@ -26958,8 +26931,8 @@ function adaptToolCalls(coreCalls, prevTracked) {
|
|
|
26958
26931
|
const prev = prevMap.get(coreCall.request.callId);
|
|
26959
26932
|
const responseSubmittedToGemini = prev?.responseSubmittedToGemini ?? false;
|
|
26960
26933
|
let status = coreCall.status;
|
|
26961
|
-
if ((status ===
|
|
26962
|
-
status =
|
|
26934
|
+
if ((status === "success" /* Success */ || status === "error" /* Error */) && "tailToolCallRequest" in coreCall && coreCall.tailToolCallRequest != null) {
|
|
26935
|
+
status = "executing" /* Executing */;
|
|
26963
26936
|
}
|
|
26964
26937
|
return {
|
|
26965
26938
|
...coreCall,
|
|
@@ -26991,7 +26964,7 @@ function getBackgroundedToolInfo(toolCall) {
|
|
|
26991
26964
|
};
|
|
26992
26965
|
}
|
|
26993
26966
|
function isBackgroundableExecutingToolCall(toolCall) {
|
|
26994
|
-
return toolCall.status ===
|
|
26967
|
+
return toolCall.status === "executing" /* Executing */ && typeof toolCall.pid === "number";
|
|
26995
26968
|
}
|
|
26996
26969
|
function showCitations(settings) {
|
|
26997
26970
|
const enabled = settings.merged.ui.showCitations;
|
|
@@ -27001,14 +26974,14 @@ function showCitations(settings) {
|
|
|
27001
26974
|
return true;
|
|
27002
26975
|
}
|
|
27003
26976
|
function calculateStreamingState(isResponding, toolCalls) {
|
|
27004
|
-
if (toolCalls.some((tc) => tc.status ===
|
|
26977
|
+
if (toolCalls.some((tc) => tc.status === "awaiting_approval" /* AwaitingApproval */)) {
|
|
27005
26978
|
return "waiting_for_confirmation" /* WaitingForConfirmation */;
|
|
27006
26979
|
}
|
|
27007
26980
|
const isAnyToolActive = toolCalls.some((tc) => {
|
|
27008
|
-
if (tc.status ===
|
|
26981
|
+
if (tc.status === "executing" /* Executing */ || tc.status === "scheduled" /* Scheduled */ || tc.status === "validating" /* Validating */) {
|
|
27009
26982
|
return true;
|
|
27010
26983
|
}
|
|
27011
|
-
if (tc.status ===
|
|
26984
|
+
if (tc.status === "success" /* Success */ || tc.status === "error" /* Error */ || tc.status === "cancelled" /* Cancelled */) {
|
|
27012
26985
|
return !tc.responseSubmittedToGemini;
|
|
27013
26986
|
}
|
|
27014
26987
|
return false;
|
|
@@ -27055,9 +27028,9 @@ var useGeminiStream = (geminiClient, history, addItem, config, settings, onDebug
|
|
|
27055
27028
|
}
|
|
27056
27029
|
setRetryStatus(payload);
|
|
27057
27030
|
};
|
|
27058
|
-
coreEvents.on(
|
|
27031
|
+
coreEvents.on("retry-attempt" /* RetryAttempt */, handleRetryAttempt);
|
|
27059
27032
|
return () => {
|
|
27060
|
-
coreEvents.off(
|
|
27033
|
+
coreEvents.off("retry-attempt" /* RetryAttempt */, handleRetryAttempt);
|
|
27061
27034
|
};
|
|
27062
27035
|
}, [isRespondingRef]);
|
|
27063
27036
|
const [
|
|
@@ -27190,12 +27163,12 @@ var useGeminiStream = (geminiClient, history, addItem, config, settings, onDebug
|
|
|
27190
27163
|
const tc = toolCalls[i];
|
|
27191
27164
|
if (pushedToolCallIdsRef.current.has(tc.request.callId)) continue;
|
|
27192
27165
|
if (tc.status === "success" || tc.status === "error" || tc.status === "cancelled") {
|
|
27193
|
-
const isAgent = tc.tool?.kind ===
|
|
27166
|
+
const isAgent = tc.tool?.kind === "agent" /* Agent */;
|
|
27194
27167
|
if (isAgent) {
|
|
27195
27168
|
let contigAgentsComplete = true;
|
|
27196
27169
|
for (let j = i + 1; j < toolCalls.length; j++) {
|
|
27197
27170
|
const nextTc = toolCalls[j];
|
|
27198
|
-
if (nextTc.tool?.kind ===
|
|
27171
|
+
if (nextTc.tool?.kind === "agent" /* Agent */) {
|
|
27199
27172
|
if (nextTc.status !== "success" && nextTc.status !== "error" && nextTc.status !== "cancelled") {
|
|
27200
27173
|
contigAgentsComplete = false;
|
|
27201
27174
|
break;
|
|
@@ -27221,7 +27194,7 @@ var useGeminiStream = (geminiClient, history, addItem, config, settings, onDebug
|
|
|
27221
27194
|
let currentGroup = [];
|
|
27222
27195
|
for (const tc of toolsToPush) {
|
|
27223
27196
|
newPushed.add(tc.request.callId);
|
|
27224
|
-
if (tc.tool?.kind ===
|
|
27197
|
+
if (tc.tool?.kind === "agent" /* Agent */) {
|
|
27225
27198
|
currentGroup.push(tc);
|
|
27226
27199
|
} else {
|
|
27227
27200
|
if (currentGroup.length > 0) {
|
|
@@ -27374,7 +27347,7 @@ var useGeminiStream = (geminiClient, history, addItem, config, settings, onDebug
|
|
|
27374
27347
|
prevActiveShellPtyIdRef.current = activeShellPtyId;
|
|
27375
27348
|
}, [activeShellPtyId, addItem, setIsResponding]);
|
|
27376
27349
|
(0, import_react97.useEffect)(() => {
|
|
27377
|
-
if (config.getApprovalMode() ===
|
|
27350
|
+
if (config.getApprovalMode() === "yolo" /* YOLO */ && streamingState === "idle" /* Idle */) {
|
|
27378
27351
|
const lastUserMessageIndex = history.findLastIndex(
|
|
27379
27352
|
(item) => item.type === "user" /* USER */
|
|
27380
27353
|
);
|
|
@@ -27442,7 +27415,7 @@ var useGeminiStream = (geminiClient, history, addItem, config, settings, onDebug
|
|
|
27442
27415
|
return;
|
|
27443
27416
|
}
|
|
27444
27417
|
const hasActiveTools = toolCalls.some(
|
|
27445
|
-
(tc) => tc.status ===
|
|
27418
|
+
(tc) => tc.status === "executing" /* Executing */ || tc.status === "scheduled" /* Scheduled */ || tc.status === "validating" /* Validating */
|
|
27446
27419
|
);
|
|
27447
27420
|
if (streamingState === "idle" /* Idle */ && !isRespondingRef.current && !hasActiveTools) {
|
|
27448
27421
|
if (clearBuffer) {
|
|
@@ -27469,7 +27442,7 @@ var useGeminiStream = (geminiClient, history, addItem, config, settings, onDebug
|
|
|
27469
27442
|
if (tool.name === SHELL_COMMAND_NAME) {
|
|
27470
27443
|
return {
|
|
27471
27444
|
...tool,
|
|
27472
|
-
status:
|
|
27445
|
+
status: "cancelled" /* Cancelled */,
|
|
27473
27446
|
resultDisplay: tool.resultDisplay
|
|
27474
27447
|
};
|
|
27475
27448
|
}
|
|
@@ -27534,7 +27507,7 @@ var useGeminiStream = (geminiClient, history, addItem, config, settings, onDebug
|
|
|
27534
27507
|
let localQueryToSendToGemini = null;
|
|
27535
27508
|
if (typeof query === "string") {
|
|
27536
27509
|
const trimmedQuery = query.trim();
|
|
27537
|
-
await logger?.logMessage(
|
|
27510
|
+
await logger?.logMessage("user" /* USER */, trimmedQuery);
|
|
27538
27511
|
if (!shellModeActive) {
|
|
27539
27512
|
const slashCommandResult = isSlashCommand(trimmedQuery) ? await handleSlashCommand(trimmedQuery) : false;
|
|
27540
27513
|
if (slashCommandResult) {
|
|
@@ -27690,7 +27663,7 @@ var useGeminiStream = (geminiClient, history, addItem, config, settings, onDebug
|
|
|
27690
27663
|
if (pendingHistoryItemRef.current) {
|
|
27691
27664
|
if (pendingHistoryItemRef.current.type === "tool_group") {
|
|
27692
27665
|
const updatedTools = pendingHistoryItemRef.current.tools.map(
|
|
27693
|
-
(tool) => tool.status ===
|
|
27666
|
+
(tool) => tool.status === "validating" /* Validating */ || tool.status === "scheduled" /* Scheduled */ || tool.status === "awaiting_approval" /* AwaitingApproval */ || tool.status === "executing" /* Executing */ ? { ...tool, status: "cancelled" /* Cancelled */ } : tool
|
|
27694
27667
|
);
|
|
27695
27668
|
const pendingItem = {
|
|
27696
27669
|
...pendingHistoryItemRef.current,
|
|
@@ -27982,15 +27955,15 @@ var useGeminiStream = (geminiClient, history, addItem, config, settings, onDebug
|
|
|
27982
27955
|
let geminiMessageBuffer = "";
|
|
27983
27956
|
const toolCallRequests = [];
|
|
27984
27957
|
for await (const event of stream) {
|
|
27985
|
-
if (event.type !==
|
|
27958
|
+
if (event.type !== "thought" /* Thought */ && thoughtRef.current !== null) {
|
|
27986
27959
|
setThought(null);
|
|
27987
27960
|
}
|
|
27988
27961
|
switch (event.type) {
|
|
27989
|
-
case
|
|
27962
|
+
case "thought" /* Thought */:
|
|
27990
27963
|
setLastGeminiActivityTime(Date.now());
|
|
27991
27964
|
handleThoughtEvent(event.value, userMessageTimestamp);
|
|
27992
27965
|
break;
|
|
27993
|
-
case
|
|
27966
|
+
case "content" /* Content */:
|
|
27994
27967
|
setLastGeminiActivityTime(Date.now());
|
|
27995
27968
|
geminiMessageBuffer = handleContentEvent(
|
|
27996
27969
|
event.value,
|
|
@@ -27998,16 +27971,16 @@ var useGeminiStream = (geminiClient, history, addItem, config, settings, onDebug
|
|
|
27998
27971
|
userMessageTimestamp
|
|
27999
27972
|
);
|
|
28000
27973
|
break;
|
|
28001
|
-
case
|
|
27974
|
+
case "tool_call_request" /* ToolCallRequest */:
|
|
28002
27975
|
toolCallRequests.push(event.value);
|
|
28003
27976
|
break;
|
|
28004
|
-
case
|
|
27977
|
+
case "user_cancelled" /* UserCancelled */:
|
|
28005
27978
|
handleUserCancelledEvent(userMessageTimestamp);
|
|
28006
27979
|
break;
|
|
28007
|
-
case
|
|
27980
|
+
case "error" /* Error */:
|
|
28008
27981
|
handleErrorEvent(event.value, userMessageTimestamp);
|
|
28009
27982
|
break;
|
|
28010
|
-
case
|
|
27983
|
+
case "agent_execution_stopped" /* AgentExecutionStopped */:
|
|
28011
27984
|
handleAgentExecutionStoppedEvent(
|
|
28012
27985
|
event.value.reason,
|
|
28013
27986
|
userMessageTimestamp,
|
|
@@ -28015,7 +27988,7 @@ var useGeminiStream = (geminiClient, history, addItem, config, settings, onDebug
|
|
|
28015
27988
|
event.value.contextCleared
|
|
28016
27989
|
);
|
|
28017
27990
|
break;
|
|
28018
|
-
case
|
|
27991
|
+
case "agent_execution_blocked" /* AgentExecutionBlocked */:
|
|
28019
27992
|
handleAgentExecutionBlockedEvent(
|
|
28020
27993
|
event.value.reason,
|
|
28021
27994
|
userMessageTimestamp,
|
|
@@ -28023,36 +27996,36 @@ var useGeminiStream = (geminiClient, history, addItem, config, settings, onDebug
|
|
|
28023
27996
|
event.value.contextCleared
|
|
28024
27997
|
);
|
|
28025
27998
|
break;
|
|
28026
|
-
case
|
|
27999
|
+
case "chat_compressed" /* ChatCompressed */:
|
|
28027
28000
|
handleChatCompressionEvent(event.value, userMessageTimestamp);
|
|
28028
28001
|
break;
|
|
28029
|
-
case
|
|
28030
|
-
case
|
|
28002
|
+
case "tool_call_confirmation" /* ToolCallConfirmation */:
|
|
28003
|
+
case "tool_call_response" /* ToolCallResponse */:
|
|
28031
28004
|
break;
|
|
28032
|
-
case
|
|
28005
|
+
case "max_session_turns" /* MaxSessionTurns */:
|
|
28033
28006
|
handleMaxSessionTurnsEvent();
|
|
28034
28007
|
break;
|
|
28035
|
-
case
|
|
28008
|
+
case "context_window_will_overflow" /* ContextWindowWillOverflow */:
|
|
28036
28009
|
handleContextWindowWillOverflowEvent(
|
|
28037
28010
|
event.value.estimatedRequestTokenCount,
|
|
28038
28011
|
event.value.remainingTokenCount
|
|
28039
28012
|
);
|
|
28040
28013
|
break;
|
|
28041
|
-
case
|
|
28014
|
+
case "finished" /* Finished */:
|
|
28042
28015
|
handleFinishedEvent(event, userMessageTimestamp);
|
|
28043
28016
|
break;
|
|
28044
|
-
case
|
|
28017
|
+
case "citation" /* Citation */:
|
|
28045
28018
|
handleCitationEvent(event.value, userMessageTimestamp);
|
|
28046
28019
|
break;
|
|
28047
|
-
case
|
|
28020
|
+
case "model_info" /* ModelInfo */:
|
|
28048
28021
|
handleChatModelEvent(event.value, userMessageTimestamp);
|
|
28049
28022
|
break;
|
|
28050
|
-
case
|
|
28023
|
+
case "loop_detected" /* LoopDetected */:
|
|
28051
28024
|
loopDetectedRef.current = true;
|
|
28052
28025
|
break;
|
|
28053
|
-
case
|
|
28026
|
+
case "retry" /* Retry */:
|
|
28054
28027
|
break;
|
|
28055
|
-
case
|
|
28028
|
+
case "invalid_stream" /* InvalidStream */:
|
|
28056
28029
|
handleInvalidStreamEvent(event.value, userMessageTimestamp);
|
|
28057
28030
|
break;
|
|
28058
28031
|
default: {
|
|
@@ -28106,7 +28079,7 @@ var useGeminiStream = (geminiClient, history, addItem, config, settings, onDebug
|
|
|
28106
28079
|
const submitQuery = (0, import_react97.useCallback)(
|
|
28107
28080
|
async (query, options, prompt_id) => runInDevTraceSpan(
|
|
28108
28081
|
{
|
|
28109
|
-
operation: options?.isContinuation ?
|
|
28082
|
+
operation: options?.isContinuation ? "system_prompt" /* SystemPrompt */ : "user_prompt" /* UserPrompt */,
|
|
28110
28083
|
sessionId: config.getSessionId()
|
|
28111
28084
|
},
|
|
28112
28085
|
async ({ metadata: spanMetadata }) => {
|
|
@@ -28273,7 +28246,7 @@ var useGeminiStream = (geminiClient, history, addItem, config, settings, onDebug
|
|
|
28273
28246
|
submitQueryRef.current = submitQuery;
|
|
28274
28247
|
const handleApprovalModeChange = (0, import_react97.useCallback)(
|
|
28275
28248
|
async (newApprovalMode) => {
|
|
28276
|
-
if (previousApprovalModeRef.current ===
|
|
28249
|
+
if (previousApprovalModeRef.current === "plan" /* PLAN */ && newApprovalMode !== "plan" /* PLAN */ && streamingState === "idle" /* Idle */) {
|
|
28277
28250
|
if (geminiClient) {
|
|
28278
28251
|
try {
|
|
28279
28252
|
await geminiClient.addHistory({
|
|
@@ -28296,11 +28269,11 @@ var useGeminiStream = (geminiClient, history, addItem, config, settings, onDebug
|
|
|
28296
28269
|
}
|
|
28297
28270
|
}
|
|
28298
28271
|
previousApprovalModeRef.current = newApprovalMode;
|
|
28299
|
-
if (newApprovalMode ===
|
|
28272
|
+
if (newApprovalMode === "yolo" /* YOLO */ || newApprovalMode === "autoEdit" /* AUTO_EDIT */) {
|
|
28300
28273
|
let awaitingApprovalCalls = toolCalls.filter(
|
|
28301
28274
|
(call) => call.status === "awaiting_approval" && !call.request.forcedAsk
|
|
28302
28275
|
);
|
|
28303
|
-
if (newApprovalMode ===
|
|
28276
|
+
if (newApprovalMode === "autoEdit" /* AUTO_EDIT */) {
|
|
28304
28277
|
awaitingApprovalCalls = awaitingApprovalCalls.filter((call) => {
|
|
28305
28278
|
if (EDIT_TOOL_NAMES.has(call.request.name)) {
|
|
28306
28279
|
return true;
|
|
@@ -28316,11 +28289,11 @@ var useGeminiStream = (geminiClient, history, addItem, config, settings, onDebug
|
|
|
28316
28289
|
if (call.correlationId) {
|
|
28317
28290
|
try {
|
|
28318
28291
|
await config.getMessageBus().publish({
|
|
28319
|
-
type:
|
|
28292
|
+
type: "tool-confirmation-response" /* TOOL_CONFIRMATION_RESPONSE */,
|
|
28320
28293
|
correlationId: call.correlationId,
|
|
28321
28294
|
confirmed: true,
|
|
28322
28295
|
requiresUserConfirmation: false,
|
|
28323
|
-
outcome:
|
|
28296
|
+
outcome: "proceed_once" /* ProceedOnce */
|
|
28324
28297
|
});
|
|
28325
28298
|
} catch (error) {
|
|
28326
28299
|
debugLogger.warn(
|
|
@@ -28411,14 +28384,14 @@ var useGeminiStream = (geminiClient, history, addItem, config, settings, onDebug
|
|
|
28411
28384
|
);
|
|
28412
28385
|
if (isLowErrorVerbosity) {
|
|
28413
28386
|
suppressedToolErrorCountRef.current += geminiTools.filter(
|
|
28414
|
-
(tc) => tc.status ===
|
|
28387
|
+
(tc) => tc.status === "error" /* Error */
|
|
28415
28388
|
).length;
|
|
28416
28389
|
}
|
|
28417
28390
|
if (geminiTools.length === 0) {
|
|
28418
28391
|
return;
|
|
28419
28392
|
}
|
|
28420
28393
|
const stopExecutionTool = geminiTools.find(
|
|
28421
|
-
(tc) => tc.response.errorType ===
|
|
28394
|
+
(tc) => tc.response.errorType === "stop_execution" /* STOP_EXECUTION */
|
|
28422
28395
|
);
|
|
28423
28396
|
if (stopExecutionTool && stopExecutionTool.response.error) {
|
|
28424
28397
|
maybeAddSuppressedToolErrorNote();
|
|
@@ -28438,9 +28411,9 @@ var useGeminiStream = (geminiClient, history, addItem, config, settings, onDebug
|
|
|
28438
28411
|
(tc) => !isTopicTool2(tc.request.name)
|
|
28439
28412
|
);
|
|
28440
28413
|
const allDeclinableToolsCancelled = declinableTools.length > 0 && declinableTools.every(
|
|
28441
|
-
(tc) => tc.status ===
|
|
28414
|
+
(tc) => tc.status === "cancelled" /* Cancelled */
|
|
28442
28415
|
);
|
|
28443
|
-
const allToolsCancelled = geminiTools.length > 0 && geminiTools.every((tc) => tc.status ===
|
|
28416
|
+
const allToolsCancelled = geminiTools.length > 0 && geminiTools.every((tc) => tc.status === "cancelled" /* Cancelled */);
|
|
28444
28417
|
if (allDeclinableToolsCancelled || allToolsCancelled) {
|
|
28445
28418
|
if (!turnCancelledRef.current) {
|
|
28446
28419
|
addItem({
|
|
@@ -28526,7 +28499,7 @@ var useGeminiStream = (geminiClient, history, addItem, config, settings, onDebug
|
|
|
28526
28499
|
return;
|
|
28527
28500
|
}
|
|
28528
28501
|
const restorableToolCalls = toolCalls.filter(
|
|
28529
|
-
(toolCall) => EDIT_TOOL_NAMES.has(toolCall.request.name) && toolCall.status ===
|
|
28502
|
+
(toolCall) => EDIT_TOOL_NAMES.has(toolCall.request.name) && toolCall.status === "awaiting_approval" /* AwaitingApproval */
|
|
28530
28503
|
);
|
|
28531
28504
|
if (restorableToolCalls.length > 0) {
|
|
28532
28505
|
if (!gitService) {
|
|
@@ -28749,14 +28722,14 @@ var useAgentStream = ({
|
|
|
28749
28722
|
const displayName = legacyState?.displayName ?? event.name;
|
|
28750
28723
|
const isOutputMarkdown = legacyState?.isOutputMarkdown ?? false;
|
|
28751
28724
|
const desc = legacyState?.description ?? "";
|
|
28752
|
-
const fallbackKind =
|
|
28725
|
+
const fallbackKind = "other" /* Other */;
|
|
28753
28726
|
const newCall = {
|
|
28754
28727
|
callId: event.requestId,
|
|
28755
28728
|
name: displayName,
|
|
28756
28729
|
originalRequestName: event.name,
|
|
28757
28730
|
description: desc,
|
|
28758
28731
|
display: event.display,
|
|
28759
|
-
status:
|
|
28732
|
+
status: "scheduled" /* Scheduled */,
|
|
28760
28733
|
isClientInitiated: false,
|
|
28761
28734
|
renderOutputAsMarkdown: isOutputMarkdown,
|
|
28762
28735
|
kind: legacyState?.kind ?? fallbackKind,
|
|
@@ -28774,10 +28747,10 @@ var useAgentStream = ({
|
|
|
28774
28747
|
const evtStatus = legacyState?.status;
|
|
28775
28748
|
let status = tc.status;
|
|
28776
28749
|
if (evtStatus === "executing")
|
|
28777
|
-
status =
|
|
28778
|
-
else if (evtStatus === "error") status =
|
|
28750
|
+
status = "executing" /* Executing */;
|
|
28751
|
+
else if (evtStatus === "error") status = "error" /* Error */;
|
|
28779
28752
|
else if (evtStatus === "success")
|
|
28780
|
-
status =
|
|
28753
|
+
status = "success" /* Success */;
|
|
28781
28754
|
const display = event.display?.result;
|
|
28782
28755
|
const liveOutput = displayContentToString(display) ?? tc.resultDisplay;
|
|
28783
28756
|
const progressMessage = legacyState?.progressMessage ?? tc.progressMessage;
|
|
@@ -28810,7 +28783,7 @@ var useAgentStream = ({
|
|
|
28810
28783
|
const resultDisplay = displayContentToString(display) ?? tc.resultDisplay;
|
|
28811
28784
|
return {
|
|
28812
28785
|
...tc,
|
|
28813
|
-
status: event.isError ?
|
|
28786
|
+
status: event.isError ? "error" /* Error */ : "success" /* Success */,
|
|
28814
28787
|
display: event.display ? { ...tc.display, ...event.display } : tc.display,
|
|
28815
28788
|
resultDisplay,
|
|
28816
28789
|
outputFile
|
|
@@ -28876,7 +28849,7 @@ var useAgentStream = ({
|
|
|
28876
28849
|
if (!options?.isContinuation) {
|
|
28877
28850
|
if (typeof query === "string") {
|
|
28878
28851
|
addItem({ type: "user" /* USER */, text: query }, timestamp);
|
|
28879
|
-
void logger?.logMessage(
|
|
28852
|
+
void logger?.logMessage("user" /* USER */, query);
|
|
28880
28853
|
}
|
|
28881
28854
|
startNewPrompt();
|
|
28882
28855
|
}
|
|
@@ -30302,7 +30275,6 @@ var useLoadingIndicator = ({
|
|
|
30302
30275
|
return {
|
|
30303
30276
|
elapsedTime: streamingState === "waiting_for_confirmation" /* WaitingForConfirmation */ ? retainedElapsedTime : elapsedTimeFromTimer,
|
|
30304
30277
|
currentLoadingPhrase: retryPhrase || currentTip || currentWittyPhrase,
|
|
30305
|
-
statusPhrase: retryPhrase ?? void 0,
|
|
30306
30278
|
currentTip,
|
|
30307
30279
|
currentWittyPhrase
|
|
30308
30280
|
};
|
|
@@ -30404,9 +30376,9 @@ var useFolderTrust = (settings, onTrustChange, addItem) => {
|
|
|
30404
30376
|
const handleFolderTrustSelect = (0, import_react103.useCallback)(
|
|
30405
30377
|
async (choice) => {
|
|
30406
30378
|
const trustLevelMap = {
|
|
30407
|
-
["trust_folder" /* TRUST_FOLDER */]:
|
|
30408
|
-
["trust_parent" /* TRUST_PARENT */]:
|
|
30409
|
-
["do_not_trust" /* DO_NOT_TRUST */]:
|
|
30379
|
+
["trust_folder" /* TRUST_FOLDER */]: "TRUST_FOLDER" /* TRUST_FOLDER */,
|
|
30380
|
+
["trust_parent" /* TRUST_PARENT */]: "TRUST_PARENT" /* TRUST_PARENT */,
|
|
30381
|
+
["do_not_trust" /* DO_NOT_TRUST */]: "DO_NOT_TRUST" /* DO_NOT_TRUST */
|
|
30410
30382
|
};
|
|
30411
30383
|
const trustLevel = trustLevelMap[choice];
|
|
30412
30384
|
if (!trustLevel) return;
|
|
@@ -30425,7 +30397,7 @@ var useFolderTrust = (settings, onTrustChange, addItem) => {
|
|
|
30425
30397
|
}, 100);
|
|
30426
30398
|
return;
|
|
30427
30399
|
}
|
|
30428
|
-
const currentIsTrusted = trustLevel ===
|
|
30400
|
+
const currentIsTrusted = trustLevel === "TRUST_FOLDER" /* TRUST_FOLDER */ || trustLevel === "TRUST_PARENT" /* TRUST_PARENT */;
|
|
30429
30401
|
onTrustChange(currentIsTrusted);
|
|
30430
30402
|
setIsTrusted(currentIsTrusted);
|
|
30431
30403
|
const wasTrusted = isTrusted ?? false;
|
|
@@ -31433,7 +31405,7 @@ function useMessageQueue({
|
|
|
31433
31405
|
var import_react105 = __toESM(require_react(), 1);
|
|
31434
31406
|
function useMcpStatus(config) {
|
|
31435
31407
|
const [discoveryState, setDiscoveryState] = (0, import_react105.useState)(
|
|
31436
|
-
() => config.getMcpClientManager()?.getDiscoveryState() ??
|
|
31408
|
+
() => config.getMcpClientManager()?.getDiscoveryState() ?? "not_started" /* NOT_STARTED */
|
|
31437
31409
|
);
|
|
31438
31410
|
const [mcpServerCount, setMcpServerCount] = (0, import_react105.useState)(
|
|
31439
31411
|
() => config.getMcpClientManager()?.getMcpServerCount() ?? 0
|
|
@@ -31446,12 +31418,12 @@ function useMcpStatus(config) {
|
|
|
31446
31418
|
setMcpServerCount(manager.getMcpServerCount());
|
|
31447
31419
|
}
|
|
31448
31420
|
};
|
|
31449
|
-
coreEvents.on(
|
|
31421
|
+
coreEvents.on("mcp-client-update" /* McpClientUpdate */, onChange);
|
|
31450
31422
|
return () => {
|
|
31451
|
-
coreEvents.off(
|
|
31423
|
+
coreEvents.off("mcp-client-update" /* McpClientUpdate */, onChange);
|
|
31452
31424
|
};
|
|
31453
31425
|
}, [config]);
|
|
31454
|
-
const isMcpReady = discoveryState ===
|
|
31426
|
+
const isMcpReady = discoveryState === "completed" /* COMPLETED */ || discoveryState === "not_started" /* NOT_STARTED */ && mcpServerCount === 0;
|
|
31455
31427
|
return {
|
|
31456
31428
|
discoveryState,
|
|
31457
31429
|
mcpServerCount,
|
|
@@ -31478,7 +31450,7 @@ function useApprovalModeIndicator({
|
|
|
31478
31450
|
(key) => {
|
|
31479
31451
|
let nextApprovalMode;
|
|
31480
31452
|
if (keyMatchers["app.toggleYolo" /* TOGGLE_YOLO */](key)) {
|
|
31481
|
-
if (config.isYoloModeDisabled() && config.getApprovalMode() !==
|
|
31453
|
+
if (config.isYoloModeDisabled() && config.getApprovalMode() !== "yolo" /* YOLO */) {
|
|
31482
31454
|
if (addItem) {
|
|
31483
31455
|
let text = "You cannot enter YOLO mode since it is disabled in your settings.";
|
|
31484
31456
|
const adminSettings = config.getRemoteAdminSettings();
|
|
@@ -31496,21 +31468,21 @@ function useApprovalModeIndicator({
|
|
|
31496
31468
|
}
|
|
31497
31469
|
return;
|
|
31498
31470
|
}
|
|
31499
|
-
nextApprovalMode = config.getApprovalMode() ===
|
|
31471
|
+
nextApprovalMode = config.getApprovalMode() === "yolo" /* YOLO */ ? "default" /* DEFAULT */ : "yolo" /* YOLO */;
|
|
31500
31472
|
} else if (keyMatchers["app.cycleApprovalMode" /* CYCLE_APPROVAL_MODE */](key)) {
|
|
31501
31473
|
const currentMode = config.getApprovalMode();
|
|
31502
31474
|
switch (currentMode) {
|
|
31503
|
-
case
|
|
31504
|
-
nextApprovalMode =
|
|
31475
|
+
case "default" /* DEFAULT */:
|
|
31476
|
+
nextApprovalMode = "autoEdit" /* AUTO_EDIT */;
|
|
31505
31477
|
break;
|
|
31506
|
-
case
|
|
31507
|
-
nextApprovalMode = allowPlanMode ?
|
|
31478
|
+
case "autoEdit" /* AUTO_EDIT */:
|
|
31479
|
+
nextApprovalMode = allowPlanMode ? "plan" /* PLAN */ : "default" /* DEFAULT */;
|
|
31508
31480
|
break;
|
|
31509
|
-
case
|
|
31510
|
-
nextApprovalMode =
|
|
31481
|
+
case "plan" /* PLAN */:
|
|
31482
|
+
nextApprovalMode = "default" /* DEFAULT */;
|
|
31511
31483
|
break;
|
|
31512
|
-
case
|
|
31513
|
-
nextApprovalMode =
|
|
31484
|
+
case "yolo" /* YOLO */:
|
|
31485
|
+
nextApprovalMode = "autoEdit" /* AUTO_EDIT */;
|
|
31514
31486
|
break;
|
|
31515
31487
|
default:
|
|
31516
31488
|
}
|
|
@@ -31920,11 +31892,11 @@ var useHookDisplayState = () => {
|
|
|
31920
31892
|
removeHook();
|
|
31921
31893
|
}
|
|
31922
31894
|
};
|
|
31923
|
-
coreEvents.on(
|
|
31924
|
-
coreEvents.on(
|
|
31895
|
+
coreEvents.on("hook-start" /* HookStart */, handleHookStart);
|
|
31896
|
+
coreEvents.on("hook-end" /* HookEnd */, handleHookEnd);
|
|
31925
31897
|
return () => {
|
|
31926
|
-
coreEvents.off(
|
|
31927
|
-
coreEvents.off(
|
|
31898
|
+
coreEvents.off("hook-start" /* HookStart */, handleHookStart);
|
|
31899
|
+
coreEvents.off("hook-end" /* HookEnd */, handleHookEnd);
|
|
31928
31900
|
activeTimeouts.forEach(clearTimeout);
|
|
31929
31901
|
activeTimeouts.clear();
|
|
31930
31902
|
};
|
|
@@ -32763,7 +32735,7 @@ var AppContainer = (props) => {
|
|
|
32763
32735
|
setConfigInitialized(true);
|
|
32764
32736
|
startupProfiler.flush(config);
|
|
32765
32737
|
startAutoMemoryIfEnabled(config);
|
|
32766
|
-
const sessionStartSource = resumedSessionData ?
|
|
32738
|
+
const sessionStartSource = resumedSessionData ? "resume" /* Resume */ : "startup" /* Startup */;
|
|
32767
32739
|
const result = await config.getHookSystem()?.fireSessionStartEvent(sessionStartSource);
|
|
32768
32740
|
if (result) {
|
|
32769
32741
|
const additionalContext = result.getAdditionalContext();
|
|
@@ -32790,7 +32762,7 @@ var AppContainer = (props) => {
|
|
|
32790
32762
|
);
|
|
32791
32763
|
const ideClient = await IdeClient.getInstance();
|
|
32792
32764
|
await ideClient.disconnect();
|
|
32793
|
-
await config?.getHookSystem()?.fireSessionEndEvent(
|
|
32765
|
+
await config?.getHookSystem()?.fireSessionEndEvent("exit" /* Exit */);
|
|
32794
32766
|
};
|
|
32795
32767
|
registerCleanup(cleanupFn);
|
|
32796
32768
|
return () => {
|
|
@@ -32815,11 +32787,11 @@ var AppContainer = (props) => {
|
|
|
32815
32787
|
resetTime: payload.resetTime
|
|
32816
32788
|
});
|
|
32817
32789
|
};
|
|
32818
|
-
coreEvents.on(
|
|
32819
|
-
coreEvents.on(
|
|
32790
|
+
coreEvents.on("model-changed" /* ModelChanged */, handleModelChanged);
|
|
32791
|
+
coreEvents.on("quota-changed" /* QuotaChanged */, handleQuotaChanged);
|
|
32820
32792
|
return () => {
|
|
32821
|
-
coreEvents.off(
|
|
32822
|
-
coreEvents.off(
|
|
32793
|
+
coreEvents.off("model-changed" /* ModelChanged */, handleModelChanged);
|
|
32794
|
+
coreEvents.off("quota-changed" /* QuotaChanged */, handleQuotaChanged);
|
|
32823
32795
|
};
|
|
32824
32796
|
}, [config]);
|
|
32825
32797
|
(0, import_react119.useEffect)(() => {
|
|
@@ -32832,16 +32804,16 @@ var AppContainer = (props) => {
|
|
|
32832
32804
|
const handleAgentsDiscovered = (payload) => {
|
|
32833
32805
|
setNewAgents(payload.agents);
|
|
32834
32806
|
};
|
|
32835
|
-
coreEvents.on(
|
|
32836
|
-
coreEvents.on(
|
|
32837
|
-
coreEvents.on(
|
|
32807
|
+
coreEvents.on("settings-changed" /* SettingsChanged */, handleSettingsChanged);
|
|
32808
|
+
coreEvents.on("admin-settings-changed" /* AdminSettingsChanged */, handleAdminSettingsChanged);
|
|
32809
|
+
coreEvents.on("agents-discovered" /* AgentsDiscovered */, handleAgentsDiscovered);
|
|
32838
32810
|
return () => {
|
|
32839
|
-
coreEvents.off(
|
|
32811
|
+
coreEvents.off("settings-changed" /* SettingsChanged */, handleSettingsChanged);
|
|
32840
32812
|
coreEvents.off(
|
|
32841
|
-
|
|
32813
|
+
"admin-settings-changed" /* AdminSettingsChanged */,
|
|
32842
32814
|
handleAdminSettingsChanged
|
|
32843
32815
|
);
|
|
32844
|
-
coreEvents.off(
|
|
32816
|
+
coreEvents.off("agents-discovered" /* AgentsDiscovered */, handleAgentsDiscovered);
|
|
32845
32817
|
};
|
|
32846
32818
|
}, [settings]);
|
|
32847
32819
|
const { errorCount, clearErrorCount } = useErrorCount();
|
|
@@ -32908,11 +32880,11 @@ var AppContainer = (props) => {
|
|
|
32908
32880
|
exitEditorDialog
|
|
32909
32881
|
} = useEditorSettings(settings, setEditorError, historyManager.addItem);
|
|
32910
32882
|
(0, import_react119.useEffect)(() => {
|
|
32911
|
-
coreEvents.on(
|
|
32912
|
-
coreEvents.on(
|
|
32883
|
+
coreEvents.on("external-editor-closed" /* ExternalEditorClosed */, handleEditorClose);
|
|
32884
|
+
coreEvents.on("request-editor-selection" /* RequestEditorSelection */, openEditorDialog);
|
|
32913
32885
|
return () => {
|
|
32914
|
-
coreEvents.off(
|
|
32915
|
-
coreEvents.off(
|
|
32886
|
+
coreEvents.off("external-editor-closed" /* ExternalEditorClosed */, handleEditorClose);
|
|
32887
|
+
coreEvents.off("request-editor-selection" /* RequestEditorSelection */, openEditorDialog);
|
|
32916
32888
|
};
|
|
32917
32889
|
}, [handleEditorClose, openEditorDialog]);
|
|
32918
32890
|
(0, import_react119.useEffect)(() => {
|
|
@@ -32980,7 +32952,7 @@ var AppContainer = (props) => {
|
|
|
32980
32952
|
errorVerbosity: settings.merged.ui.errorVerbosity
|
|
32981
32953
|
});
|
|
32982
32954
|
const isAuthDialogOpen = authState === "updating" /* Updating */;
|
|
32983
|
-
const isAuthenticating = authState === "unauthenticated" /* Unauthenticated */ && settings.merged.security.auth.selectedType !==
|
|
32955
|
+
const isAuthenticating = authState === "unauthenticated" /* Unauthenticated */ && settings.merged.security.auth.selectedType !== "gemini-api-key" /* USE_GEMINI */;
|
|
32984
32956
|
const isGeminiClientInitialized = config.getGeminiClient()?.isInitialized();
|
|
32985
32957
|
const { loadHistoryForResume, isResuming } = useSessionResume({
|
|
32986
32958
|
config,
|
|
@@ -33008,7 +32980,7 @@ var AppContainer = (props) => {
|
|
|
33008
32980
|
async (authType, scope) => {
|
|
33009
32981
|
if (authType) {
|
|
33010
32982
|
const previousAuthType = config.getContentGeneratorConfig()?.authType ?? "unknown";
|
|
33011
|
-
if (authType ===
|
|
32983
|
+
if (authType === "oauth-personal" /* LOGIN_WITH_GOOGLE */) {
|
|
33012
32984
|
setAuthContext({ requiresRestart: true });
|
|
33013
32985
|
} else {
|
|
33014
32986
|
setAuthContext({});
|
|
@@ -33036,7 +33008,7 @@ var AppContainer = (props) => {
|
|
|
33036
33008
|
);
|
|
33037
33009
|
return;
|
|
33038
33010
|
}
|
|
33039
|
-
if (authType ===
|
|
33011
|
+
if (authType === "oauth-personal" /* LOGIN_WITH_GOOGLE */ && config.isBrowserLaunchSuppressed()) {
|
|
33040
33012
|
writeToStdout(`
|
|
33041
33013
|
----------------------------------------------------------------
|
|
33042
33014
|
Logging in with Google... Restarting Gemini CLI to continue.
|
|
@@ -33059,7 +33031,7 @@ Logging in with Google... Restarting Gemini CLI to continue.
|
|
|
33059
33031
|
}
|
|
33060
33032
|
await saveApiKey(apiKey);
|
|
33061
33033
|
await reloadApiKey();
|
|
33062
|
-
await config.refreshAuth(
|
|
33034
|
+
await config.refreshAuth("gemini-api-key" /* USE_GEMINI */);
|
|
33063
33035
|
setAuthState("authenticated" /* Authenticated */);
|
|
33064
33036
|
} catch (e) {
|
|
33065
33037
|
onAuthError(
|
|
@@ -33084,7 +33056,7 @@ Logging in with Google... Restarting Gemini CLI to continue.
|
|
|
33084
33056
|
`Authentication is enforced to be ${settings.merged.security.auth.enforcedType}, but you are currently using ${settings.merged.security.auth.selectedType}.`
|
|
33085
33057
|
);
|
|
33086
33058
|
} else if (settings.merged.security.auth.selectedType && !settings.merged.security.auth.useExternal) {
|
|
33087
|
-
if (settings.merged.security.auth.selectedType ===
|
|
33059
|
+
if (settings.merged.security.auth.selectedType === "gemini-api-key" /* USE_GEMINI */) {
|
|
33088
33060
|
return;
|
|
33089
33061
|
}
|
|
33090
33062
|
const authMethod = settings.merged.security.auth.selectedType;
|
|
@@ -33220,9 +33192,9 @@ Logging in with Google... Restarting Gemini CLI to continue.
|
|
|
33220
33192
|
}
|
|
33221
33193
|
});
|
|
33222
33194
|
};
|
|
33223
|
-
coreEvents.on(
|
|
33195
|
+
coreEvents.on("consent-request" /* ConsentRequest */, handleConsentRequest);
|
|
33224
33196
|
return () => {
|
|
33225
|
-
coreEvents.off(
|
|
33197
|
+
coreEvents.off("consent-request" /* ConsentRequest */, handleConsentRequest);
|
|
33226
33198
|
};
|
|
33227
33199
|
}, []);
|
|
33228
33200
|
const performMemoryRefresh = (0, import_react119.useCallback)(async () => {
|
|
@@ -33880,7 +33852,7 @@ ${queuedText}` : queuedText;
|
|
|
33880
33852
|
if (keyMatchers["app.showErrorDetails" /* SHOW_ERROR_DETAILS */](key)) {
|
|
33881
33853
|
if (settings.merged.general.devtools) {
|
|
33882
33854
|
void (async () => {
|
|
33883
|
-
const { toggleDevToolsPanel } = await import("./devtoolsService-
|
|
33855
|
+
const { toggleDevToolsPanel } = await import("./devtoolsService-47DUPCKM.js");
|
|
33884
33856
|
await toggleDevToolsPanel(
|
|
33885
33857
|
config,
|
|
33886
33858
|
showErrorDetails,
|
|
@@ -34098,17 +34070,17 @@ ${queuedText}` : queuedText;
|
|
|
34098
34070
|
Date.now()
|
|
34099
34071
|
);
|
|
34100
34072
|
};
|
|
34101
|
-
coreEvents.on(
|
|
34102
|
-
coreEvents.on(
|
|
34073
|
+
coreEvents.on("user-feedback" /* UserFeedback */, handleUserFeedback);
|
|
34074
|
+
coreEvents.on("hook-system-message" /* HookSystemMessage */, handleHookSystemMessage);
|
|
34103
34075
|
coreEvents.drainBacklogs();
|
|
34104
34076
|
return () => {
|
|
34105
|
-
coreEvents.off(
|
|
34106
|
-
coreEvents.off(
|
|
34077
|
+
coreEvents.off("user-feedback" /* UserFeedback */, handleUserFeedback);
|
|
34078
|
+
coreEvents.off("hook-system-message" /* HookSystemMessage */, handleHookSystemMessage);
|
|
34107
34079
|
};
|
|
34108
34080
|
}, [historyManager]);
|
|
34109
34081
|
const nightly = props.version.includes("nightly");
|
|
34110
34082
|
const isAwaitingLoginRestart = authState === "awaiting_login_restart" /* AwaitingLoginRestart */;
|
|
34111
|
-
const loginRestartMessage = settings.merged.security.auth.selectedType ===
|
|
34083
|
+
const loginRestartMessage = settings.merged.security.auth.selectedType === "vertex-ai" /* USE_VERTEX_AI */ ? "Authenticating to Vertex AI in Cloud Shell requires a restart to apply project settings." : void 0;
|
|
34112
34084
|
const dialogsVisible = shouldShowIdePrompt || isFolderTrustDialogOpen || isPolicyUpdateDialogOpen || adminSettingsChanged || !!commandConfirmationRequest || !!authConsentRequest || !!permissionConfirmationRequest || !!customDialog || confirmUpdateExtensionRequests.length > 0 || !!loopDetectionConfirmationRequest || isThemeDialogOpen || isSettingsDialogOpen || isModelDialogOpen || isVoiceModelDialogOpen || isAgentConfigDialogOpen || isPermissionsDialogOpen || isAuthenticating || isAuthDialogOpen || isEditorDialogOpen || showPrivacyNotice || showIdeRestartPrompt || !!proQuotaRequest || !!validationRequest || !!overageMenuRequest || !!emptyWalletRequest || isSessionBrowserOpen || authState === "awaiting_api_key_input" /* AwaitingApiKeyInput */ || isAwaitingLoginRestart || !!newAgents;
|
|
34113
34085
|
const hasPendingToolConfirmation = (0, import_react119.useMemo)(
|
|
34114
34086
|
() => isToolAwaitingConfirmation(pendingHistoryItems),
|
|
@@ -34135,13 +34107,7 @@ ${queuedText}` : queuedText;
|
|
|
34135
34107
|
estimatedStatusLength = 35;
|
|
34136
34108
|
}
|
|
34137
34109
|
const maxLength = terminalWidth - estimatedStatusLength - 5;
|
|
34138
|
-
const {
|
|
34139
|
-
elapsedTime,
|
|
34140
|
-
currentLoadingPhrase,
|
|
34141
|
-
statusPhrase,
|
|
34142
|
-
currentTip,
|
|
34143
|
-
currentWittyPhrase
|
|
34144
|
-
} = useLoadingIndicator({
|
|
34110
|
+
const { elapsedTime, currentLoadingPhrase, currentTip, currentWittyPhrase } = useLoadingIndicator({
|
|
34145
34111
|
streamingState,
|
|
34146
34112
|
shouldShowFocusHint,
|
|
34147
34113
|
retryStatus,
|
|
@@ -34214,9 +34180,9 @@ ${queuedText}` : queuedText;
|
|
|
34214
34180
|
const handleMemoryChanged = (result) => {
|
|
34215
34181
|
setGeminiMdFileCount(result.fileCount);
|
|
34216
34182
|
};
|
|
34217
|
-
coreEvents.on(
|
|
34183
|
+
coreEvents.on("memory-changed" /* MemoryChanged */, handleMemoryChanged);
|
|
34218
34184
|
return () => {
|
|
34219
|
-
coreEvents.off(
|
|
34185
|
+
coreEvents.off("memory-changed" /* MemoryChanged */, handleMemoryChanged);
|
|
34220
34186
|
};
|
|
34221
34187
|
}, []);
|
|
34222
34188
|
(0, import_react119.useEffect)(() => {
|
|
@@ -34342,7 +34308,6 @@ ${queuedText}` : queuedText;
|
|
|
34342
34308
|
isFocused,
|
|
34343
34309
|
elapsedTime,
|
|
34344
34310
|
currentLoadingPhrase,
|
|
34345
|
-
statusPhrase,
|
|
34346
34311
|
currentTip,
|
|
34347
34312
|
currentWittyPhrase,
|
|
34348
34313
|
historyRemountKey,
|
|
@@ -34454,7 +34419,6 @@ ${queuedText}` : queuedText;
|
|
|
34454
34419
|
isFocused,
|
|
34455
34420
|
elapsedTime,
|
|
34456
34421
|
currentLoadingPhrase,
|
|
34457
|
-
statusPhrase,
|
|
34458
34422
|
currentTip,
|
|
34459
34423
|
currentWittyPhrase,
|
|
34460
34424
|
historyRemountKey,
|