@google/gemini-cli 0.63.0-nightly.20260929.gfe6350238 → 0.63.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-D5PWWG7J.js → chunk-2V7FO5QV.js} +17 -14
- package/bundle/{chunk-MZZCBSEG.js → chunk-4M3FMNYW.js} +1 -1
- package/bundle/{chunk-ZZX34ZSC.js → chunk-63XA5K4A.js} +2 -2
- package/bundle/{chunk-2CWWUJ6L.js → chunk-6NM3GGUQ.js} +3 -3
- package/bundle/{chunk-3DZUGKXM.js → chunk-AM7DMDAW.js} +2 -2
- package/bundle/{chunk-XQAX2S72.js → chunk-ED56GFWH.js} +7 -7
- package/bundle/{chunk-FKRRUV32.js → chunk-ER445ATE.js} +1 -1
- package/bundle/{chunk-IAERXNI3.js → chunk-G4LSSABK.js} +1 -1
- package/bundle/{chunk-JWDJCBM5.js → chunk-HFRGWL72.js} +1 -1
- package/bundle/{chunk-VXHX5F3S.js → chunk-IVQKNOQE.js} +14809 -7826
- package/bundle/{chunk-KNHHXARR.js → chunk-JEJU2SSS.js} +1 -1
- package/bundle/{chunk-HRWA24MZ.js → chunk-OT76K4ZH.js} +3 -3
- package/bundle/{chunk-LD6UITWV.js → chunk-PBTA3JQ7.js} +1 -1
- package/bundle/{chunk-LHLQX2PG.js → chunk-POA4QAXA.js} +1 -1
- package/bundle/{chunk-3HRSVYTB.js → chunk-QFT2HRLF.js} +8 -9
- package/bundle/{chunk-SWV7ZVKH.js → chunk-RWBXO4OP.js} +17 -14
- package/bundle/{chunk-LKUDEIDP.js → chunk-SXGHDMQJ.js} +3 -3
- package/bundle/{chunk-VNZAVVNG.js → chunk-T6JVRMWQ.js} +5 -7
- package/bundle/{chunk-VD7SEMKX.js → chunk-U7XUX2JM.js} +1 -1
- package/bundle/{chunk-JECE262D.js → chunk-WDXWXGEI.js} +1 -1
- package/bundle/{chunk-C6UCL757.js → chunk-WFNHZELD.js} +58 -71
- package/bundle/{chunk-OR7RMH2H.js → chunk-WVIEQIJL.js} +1 -1
- package/bundle/{chunk-N2UNFTPP.js → chunk-XVUCVIMX.js} +2 -2
- package/bundle/{chunk-BFGTH5UC.js → chunk-Z6ZYLUTY.js} +7 -7
- package/bundle/{cleanup-6BMNXRVK.js → cleanup-3X3LXGSD.js} +2 -2
- package/bundle/{cleanup-EGCQDHCG.js → cleanup-5SERLJ6F.js} +2 -2
- package/bundle/{cleanup-WWBXF54B.js → cleanup-I3EZCS7H.js} +2 -2
- package/bundle/{core-TO2WCWVS.js → core-AELQHLEH.js} +1 -1
- package/bundle/{dist-EVVKUMWU.js → core-DQ33KNDF.js} +1 -1
- package/bundle/{devtoolsService-CD4BXQCU.js → devtoolsService-J7U7KJF3.js} +2 -2
- package/bundle/{devtoolsService-HLTYHXUC.js → devtoolsService-K5JNOPRE.js} +2 -2
- package/bundle/{devtoolsService-KKKGHFGU.js → devtoolsService-ZWL6J2QQ.js} +3 -4
- package/bundle/{dist-FPQFVRXW.js → dist-TZPQ7QYY.js} +1 -1
- package/bundle/{gemini-G4M56PGH.js → gemini-6YZTUGIX.js} +14 -14
- package/bundle/{gemini-D67CLDN3.js → gemini-O7LOMBXL.js} +14 -14
- package/bundle/{gemini-XYSZEME4.js → gemini-TIPFO7CW.js} +198 -214
- package/bundle/gemini.js +7 -7
- package/bundle/{interactiveCli-LQ34I3IK.js → interactiveCli-I2CP4PIR.js} +8 -8
- package/bundle/{interactiveCli-5NAM6QNF.js → interactiveCli-I5OVF5KN.js} +8 -8
- package/bundle/{interactiveCli-DFBCP7YU.js → interactiveCli-MDJW5F3B.js} +292 -311
- package/bundle/{liteRtServerManager-DJ5BH4NI.js → liteRtServerManager-IDOOSG4Q.js} +4 -4
- package/bundle/{liteRtServerManager-DPX4VZQK.js → liteRtServerManager-LCAVI6PR.js} +4 -4
- package/bundle/{liteRtServerManager-FZHISVS5.js → liteRtServerManager-VF5GHIIE.js} +4 -4
- package/bundle/{oauth2-provider-XJKOJRHQ.js → oauth2-provider-CSFBMKNT.js} +1 -1
- package/bundle/{oauth2-provider-M3NSZVV6.js → oauth2-provider-LVULCANS.js} +1 -1
- package/bundle/{oauth2-provider-YGR7H7R6.js → oauth2-provider-X4VQX6TA.js} +72 -38
- package/bundle/{start-C5JP5VOP.js → start-P3SVMDEG.js} +6 -6
- package/bundle/{start-DW7QL3JX.js → start-QCD2SBKP.js} +6 -6
- package/bundle/{start-L7BD6NSX.js → start-TCWFLMYQ.js} +6 -6
- package/package.json +1 -1
- package/bundle/chunk-4CCACYHM.js +0 -17446
- package/bundle/chunk-JEV44LLO.js +0 -154
- package/bundle/chunk-KQGP4BDM.js +0 -512
- package/bundle/chunk-MQKYUKCB.js +0 -118
- package/bundle/chunk-PPMXIVFB.js +0 -102951
- package/bundle/chunk-T44PFUON.js +0 -425
- package/bundle/chunk-WW6NERPJ.js +0 -400532
- package/bundle/chunk-YZ4YJMJW.js +0 -1571
- package/bundle/cleanup-XVPMDKAM.js +0 -32
- package/bundle/devtoolsService-O2VAV2XX.js +0 -4359
- package/bundle/dist-LKEXVAFT.js +0 -2250
- package/bundle/gemini-MZC4D7WM.js +0 -17863
- package/bundle/interactiveCli-UWZ7QXHW.js +0 -34915
- package/bundle/liteRtServerManager-QB4LEL42.js +0 -65
- package/bundle/oauth2-provider-Z5IRKTFU.js +0 -235
- package/bundle/start-ZH2DHESZ.js +0 -18
|
@@ -171,10 +171,10 @@ import {
|
|
|
171
171
|
widestLineFromStyledChars,
|
|
172
172
|
wordBreakStyledChars,
|
|
173
173
|
wrapStyledChars
|
|
174
|
-
} from "./chunk-
|
|
174
|
+
} from "./chunk-WFNHZELD.js";
|
|
175
175
|
import {
|
|
176
176
|
require_source
|
|
177
|
-
} from "./chunk-
|
|
177
|
+
} from "./chunk-JEJU2SSS.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-T6JVRMWQ.js";
|
|
231
231
|
import {
|
|
232
232
|
handleAutoUpdate,
|
|
233
233
|
isDevelopment,
|
|
234
234
|
relaunchApp,
|
|
235
235
|
setUpdateHandler
|
|
236
|
-
} from "./chunk-
|
|
236
|
+
} from "./chunk-XVUCVIMX.js";
|
|
237
237
|
import {
|
|
238
238
|
isTodoList,
|
|
239
239
|
mapCoreStatusToDisplayStatus,
|
|
240
240
|
require_react
|
|
241
|
-
} from "./chunk-
|
|
241
|
+
} from "./chunk-QFT2HRLF.js";
|
|
242
242
|
import {
|
|
243
243
|
registerCleanup,
|
|
244
244
|
removeCleanup,
|
|
245
245
|
runExitCleanup,
|
|
246
246
|
setupTtyCheck
|
|
247
|
-
} from "./chunk-
|
|
247
|
+
} from "./chunk-POA4QAXA.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-2V7FO5QV.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 {
|
|
@@ -14616,7 +14597,7 @@ function AuthDialog({
|
|
|
14616
14597
|
await clearCachedCredentialFile();
|
|
14617
14598
|
}
|
|
14618
14599
|
settings.setValue(scope, "security.auth.selectedType", authType);
|
|
14619
|
-
if (authType ===
|
|
14600
|
+
if (authType === "oauth-personal" /* LOGIN_WITH_GOOGLE */ && config.isBrowserLaunchSuppressed()) {
|
|
14620
14601
|
setExiting(true);
|
|
14621
14602
|
setTimeout(() => {
|
|
14622
14603
|
void relaunchApp({ overrideAuthType: authType }).catch((err) => {
|
|
@@ -14626,7 +14607,7 @@ function AuthDialog({
|
|
|
14626
14607
|
}, 100);
|
|
14627
14608
|
return;
|
|
14628
14609
|
}
|
|
14629
|
-
if (authType ===
|
|
14610
|
+
if (authType === "gemini-api-key" /* USE_GEMINI */) {
|
|
14630
14611
|
setAuthState("awaiting_api_key_input" /* AwaitingApiKeyInput */);
|
|
14631
14612
|
return;
|
|
14632
14613
|
}
|
|
@@ -15433,11 +15414,11 @@ var PrivacyNoticeText = ({
|
|
|
15433
15414
|
}) => {
|
|
15434
15415
|
const authType = config.getContentGeneratorConfig()?.authType;
|
|
15435
15416
|
switch (authType) {
|
|
15436
|
-
case
|
|
15417
|
+
case "gemini-api-key" /* USE_GEMINI */:
|
|
15437
15418
|
return /* @__PURE__ */ (0, import_jsx_runtime82.jsx)(GeminiPrivacyNotice, { onExit });
|
|
15438
|
-
case
|
|
15419
|
+
case "vertex-ai" /* USE_VERTEX_AI */:
|
|
15439
15420
|
return /* @__PURE__ */ (0, import_jsx_runtime82.jsx)(CloudPaidPrivacyNotice, { onExit });
|
|
15440
|
-
case
|
|
15421
|
+
case "oauth-personal" /* LOGIN_WITH_GOOGLE */:
|
|
15441
15422
|
default:
|
|
15442
15423
|
return /* @__PURE__ */ (0, import_jsx_runtime82.jsx)(CloudFreePrivacyNotice, { config, onExit });
|
|
15443
15424
|
}
|
|
@@ -15497,7 +15478,7 @@ function ProQuotaDialog({
|
|
|
15497
15478
|
value: "retry_always",
|
|
15498
15479
|
key: "retry_always"
|
|
15499
15480
|
},
|
|
15500
|
-
...authType ===
|
|
15481
|
+
...authType === "oauth-personal" /* LOGIN_WITH_GOOGLE */ && !isUltra ? [
|
|
15501
15482
|
{
|
|
15502
15483
|
label: "Upgrade for higher limits",
|
|
15503
15484
|
value: "upgrade",
|
|
@@ -16664,7 +16645,7 @@ function ModelDialog({ onClose }) {
|
|
|
16664
16645
|
const useLatestFlash = config?.hasLatestFlashGAAccess?.() ?? false;
|
|
16665
16646
|
const useLatestFlashLite = config?.hasLatestFlashLiteGAAccess?.() ?? false;
|
|
16666
16647
|
const selectedAuthType = settings.merged.security.auth.selectedType;
|
|
16667
|
-
const useCustomToolModel = useGemini31 && selectedAuthType ===
|
|
16648
|
+
const useCustomToolModel = useGemini31 && selectedAuthType === "gemini-api-key" /* USE_GEMINI */;
|
|
16668
16649
|
const manualModelSelected = (0, import_react53.useMemo)(() => {
|
|
16669
16650
|
if (config?.getExperimentalDynamicModelConfiguration?.() === true && config.getModelConfigService) {
|
|
16670
16651
|
const def = config.getModelConfigService().getModelDefinition(preferredModel);
|
|
@@ -17992,10 +17973,10 @@ function initializeConsoleStore() {
|
|
|
17992
17973
|
globalConsoleMessages = [];
|
|
17993
17974
|
globalErrorCount = 0;
|
|
17994
17975
|
notifyListeners();
|
|
17995
|
-
coreEvents.off(
|
|
17996
|
-
coreEvents.off(
|
|
17997
|
-
coreEvents.on(
|
|
17998
|
-
coreEvents.on(
|
|
17976
|
+
coreEvents.off("console-log" /* ConsoleLog */, handleConsoleLog);
|
|
17977
|
+
coreEvents.off("output" /* Output */, handleOutput);
|
|
17978
|
+
coreEvents.on("console-log" /* ConsoleLog */, handleConsoleLog);
|
|
17979
|
+
coreEvents.on("output" /* Output */, handleOutput);
|
|
17999
17980
|
}
|
|
18000
17981
|
function notifyListeners() {
|
|
18001
17982
|
for (const listener of listeners) {
|
|
@@ -20132,7 +20113,7 @@ function usePromptCompletion({
|
|
|
20132
20113
|
{ model: "prompt-completion" },
|
|
20133
20114
|
contents,
|
|
20134
20115
|
signal,
|
|
20135
|
-
|
|
20116
|
+
"utility_autocomplete" /* UTILITY_AUTOCOMPLETE */
|
|
20136
20117
|
);
|
|
20137
20118
|
if (signal.aborted) {
|
|
20138
20119
|
return;
|
|
@@ -22204,9 +22185,9 @@ var InputPrompt = ({
|
|
|
22204
22185
|
onSuggestionsVisibilityChange(shouldShowSuggestions);
|
|
22205
22186
|
}
|
|
22206
22187
|
}, [shouldShowSuggestions, onSuggestionsVisibilityChange]);
|
|
22207
|
-
const showAutoAcceptStyling = !shellModeActive && approvalMode ===
|
|
22208
|
-
const showYoloStyling = !shellModeActive && approvalMode ===
|
|
22209
|
-
const showPlanStyling = !shellModeActive && approvalMode ===
|
|
22188
|
+
const showAutoAcceptStyling = !shellModeActive && approvalMode === "autoEdit" /* AUTO_EDIT */;
|
|
22189
|
+
const showYoloStyling = !shellModeActive && approvalMode === "yolo" /* YOLO */;
|
|
22190
|
+
const showPlanStyling = !shellModeActive && approvalMode === "plan" /* PLAN */;
|
|
22210
22191
|
let statusColor;
|
|
22211
22192
|
let statusText = "";
|
|
22212
22193
|
if (shellModeActive) {
|
|
@@ -23040,22 +23021,22 @@ var ApprovalModeIndicator = ({
|
|
|
23040
23021
|
const cycleHint = formatCommand("app.cycleApprovalMode" /* CYCLE_APPROVAL_MODE */);
|
|
23041
23022
|
const yoloHint = formatCommand("app.toggleYolo" /* TOGGLE_YOLO */);
|
|
23042
23023
|
switch (approvalMode) {
|
|
23043
|
-
case
|
|
23024
|
+
case "autoEdit" /* AUTO_EDIT */:
|
|
23044
23025
|
textColor = theme.status.warning;
|
|
23045
23026
|
textContent = "auto-accept edits";
|
|
23046
23027
|
subText = allowPlanMode ? `${cycleHint} to plan` : `${cycleHint} to manual`;
|
|
23047
23028
|
break;
|
|
23048
|
-
case
|
|
23029
|
+
case "plan" /* PLAN */:
|
|
23049
23030
|
textColor = theme.status.success;
|
|
23050
23031
|
textContent = "plan";
|
|
23051
23032
|
subText = `${cycleHint} to manual`;
|
|
23052
23033
|
break;
|
|
23053
|
-
case
|
|
23034
|
+
case "yolo" /* YOLO */:
|
|
23054
23035
|
textColor = theme.status.error;
|
|
23055
23036
|
textContent = "YOLO";
|
|
23056
23037
|
subText = yoloHint;
|
|
23057
23038
|
break;
|
|
23058
|
-
case
|
|
23039
|
+
case "default" /* DEFAULT */:
|
|
23059
23040
|
default:
|
|
23060
23041
|
textColor = theme.text.accent;
|
|
23061
23042
|
textContent = "";
|
|
@@ -23103,7 +23084,7 @@ var useComposerStatus = () => {
|
|
|
23103
23084
|
(item) => item.type === "tool_group"
|
|
23104
23085
|
).some(
|
|
23105
23086
|
(item) => item.tools.some(
|
|
23106
|
-
(tool) => tool.status ===
|
|
23087
|
+
(tool) => tool.status === "awaiting_approval" /* AwaitingApproval */
|
|
23107
23088
|
)
|
|
23108
23089
|
),
|
|
23109
23090
|
[uiState.pendingHistoryItems]
|
|
@@ -23118,13 +23099,13 @@ var useComposerStatus = () => {
|
|
|
23118
23099
|
const hideMinimalModeHintWhileBusy = !uiState.cleanUiDetailsVisible && (showLoadingIndicator || uiState.activeHooks.length > 0);
|
|
23119
23100
|
if (hideMinimalModeHintWhileBusy) return null;
|
|
23120
23101
|
switch (showApprovalModeIndicator) {
|
|
23121
|
-
case
|
|
23102
|
+
case "yolo" /* YOLO */:
|
|
23122
23103
|
return { text: "YOLO", color: theme.status.error };
|
|
23123
|
-
case
|
|
23104
|
+
case "plan" /* PLAN */:
|
|
23124
23105
|
return { text: "plan", color: theme.status.success };
|
|
23125
|
-
case
|
|
23106
|
+
case "autoEdit" /* AUTO_EDIT */:
|
|
23126
23107
|
return { text: "auto edit", color: theme.status.warning };
|
|
23127
|
-
case
|
|
23108
|
+
case "default" /* DEFAULT */:
|
|
23128
23109
|
default:
|
|
23129
23110
|
return null;
|
|
23130
23111
|
}
|
|
@@ -23485,7 +23466,7 @@ var ConfigInitDisplay = ({
|
|
|
23485
23466
|
let connected = 0;
|
|
23486
23467
|
const connecting = [];
|
|
23487
23468
|
for (const [name, client] of clients.entries()) {
|
|
23488
|
-
if (client.getStatus() ===
|
|
23469
|
+
if (client.getStatus() === "connected" /* CONNECTED */) {
|
|
23489
23470
|
connected++;
|
|
23490
23471
|
} else {
|
|
23491
23472
|
connecting.push(name);
|
|
@@ -23507,9 +23488,9 @@ var ConfigInitDisplay = ({
|
|
|
23507
23488
|
);
|
|
23508
23489
|
}
|
|
23509
23490
|
};
|
|
23510
|
-
coreEvents.on(
|
|
23491
|
+
coreEvents.on("mcp-client-update" /* McpClientUpdate */, onChange);
|
|
23511
23492
|
return () => {
|
|
23512
|
-
coreEvents.off(
|
|
23493
|
+
coreEvents.off("mcp-client-update" /* McpClientUpdate */, onChange);
|
|
23513
23494
|
};
|
|
23514
23495
|
}, [initialMessage]);
|
|
23515
23496
|
return /* @__PURE__ */ (0, import_jsx_runtime122.jsx)(Box_default, { marginTop: 1, children: /* @__PURE__ */ (0, import_jsx_runtime122.jsxs)(Text, { children: [
|
|
@@ -24226,7 +24207,7 @@ var useExecutionLifecycle = (addItemToHistory, setPendingHistoryItem, onExec, on
|
|
|
24226
24207
|
callId,
|
|
24227
24208
|
name: SHELL_COMMAND_NAME,
|
|
24228
24209
|
description: rawQuery,
|
|
24229
|
-
status:
|
|
24210
|
+
status: "executing" /* Executing */,
|
|
24230
24211
|
isClientInitiated: true,
|
|
24231
24212
|
resultDisplay: "",
|
|
24232
24213
|
confirmationDetails: void 0
|
|
@@ -24367,7 +24348,7 @@ __code=$?; pwd > ${escapedPwdFilePath}; exit $__code`;
|
|
|
24367
24348
|
mainContent = result.output.trim() || "(Command produced no output)";
|
|
24368
24349
|
}
|
|
24369
24350
|
let finalOutput = result.ansiOutput && result.ansiOutput.length > 0 ? result.ansiOutput : mainContent;
|
|
24370
|
-
let finalStatus =
|
|
24351
|
+
let finalStatus = "success" /* Success */;
|
|
24371
24352
|
const prependToAnsiOutput = (output, text) => {
|
|
24372
24353
|
const newLines = text.split("\n").map((line) => [
|
|
24373
24354
|
{
|
|
@@ -24386,20 +24367,20 @@ __code=$?; pwd > ${escapedPwdFilePath}; exit $__code`;
|
|
|
24386
24367
|
};
|
|
24387
24368
|
let prefix = "";
|
|
24388
24369
|
if (result.error) {
|
|
24389
|
-
finalStatus =
|
|
24370
|
+
finalStatus = "error" /* Error */;
|
|
24390
24371
|
prefix = result.error.message;
|
|
24391
24372
|
} else if (result.aborted) {
|
|
24392
|
-
finalStatus =
|
|
24373
|
+
finalStatus = "cancelled" /* Cancelled */;
|
|
24393
24374
|
prefix = "Command was cancelled.";
|
|
24394
24375
|
} else if (result.backgrounded) {
|
|
24395
|
-
finalStatus =
|
|
24376
|
+
finalStatus = "success" /* Success */;
|
|
24396
24377
|
finalOutput = `Command moved to background (PID: ${result.pid}). Output hidden. Press Ctrl+B to view.`;
|
|
24397
24378
|
mainContent = finalOutput;
|
|
24398
24379
|
} else if (result.signal) {
|
|
24399
|
-
finalStatus =
|
|
24380
|
+
finalStatus = "error" /* Error */;
|
|
24400
24381
|
prefix = `Command terminated by signal: ${result.signal}.`;
|
|
24401
24382
|
} else if (result.exitCode !== 0) {
|
|
24402
|
-
finalStatus =
|
|
24383
|
+
finalStatus = "error" /* Error */;
|
|
24403
24384
|
prefix = `Command exited with code ${result.exitCode}.`;
|
|
24404
24385
|
}
|
|
24405
24386
|
if (prefix) {
|
|
@@ -24425,7 +24406,7 @@ ${mainContent}`;
|
|
|
24425
24406
|
status: finalStatus,
|
|
24426
24407
|
resultDisplay: finalOutput
|
|
24427
24408
|
};
|
|
24428
|
-
if (finalStatus !==
|
|
24409
|
+
if (finalStatus !== "cancelled" /* Cancelled */) {
|
|
24429
24410
|
addItemToHistory(
|
|
24430
24411
|
{
|
|
24431
24412
|
type: "tool_group",
|
|
@@ -25435,13 +25416,13 @@ function useQuotaAndFallback({
|
|
|
25435
25416
|
error.retryDelayMs ? `Access resets at ${getResetTimeMessage(error.retryDelayMs)}.` : null,
|
|
25436
25417
|
`/stats model for usage details`,
|
|
25437
25418
|
`/model to switch models.`,
|
|
25438
|
-
contentGeneratorConfig?.authType ===
|
|
25419
|
+
contentGeneratorConfig?.authType === "oauth-personal" /* LOGIN_WITH_GOOGLE */ ? `/auth to switch to API key.` : null
|
|
25439
25420
|
].filter(Boolean);
|
|
25440
25421
|
message = messageLines.join("\n");
|
|
25441
25422
|
}
|
|
25442
25423
|
} else if (error instanceof ModelNotFoundError) {
|
|
25443
25424
|
isModelNotFoundError = true;
|
|
25444
|
-
if (contentGeneratorConfig?.authType ===
|
|
25425
|
+
if (contentGeneratorConfig?.authType === "vertex-ai" /* USE_VERTEX_AI */ && VALID_GEMINI_MODELS.has(failedModel)) {
|
|
25445
25426
|
const location = process.env["GOOGLE_CLOUD_LOCATION"] || "your configured region";
|
|
25446
25427
|
const messageLines = [
|
|
25447
25428
|
`Model "${failedModel}" is not available in region "${location}".`,
|
|
@@ -25635,7 +25616,7 @@ var useEditorSettings = (loadedSettings, setEditorError, addItem) => {
|
|
|
25635
25616
|
);
|
|
25636
25617
|
setEditorError(null);
|
|
25637
25618
|
setIsEditorDialogOpen(false);
|
|
25638
|
-
coreEvents.emit(
|
|
25619
|
+
coreEvents.emit("editor-selected" /* EditorSelected */, { editor: editorType });
|
|
25639
25620
|
} catch (error) {
|
|
25640
25621
|
setEditorError(`Failed to set editor preference: ${error}`);
|
|
25641
25622
|
}
|
|
@@ -25644,7 +25625,7 @@ var useEditorSettings = (loadedSettings, setEditorError, addItem) => {
|
|
|
25644
25625
|
);
|
|
25645
25626
|
const exitEditorDialog = (0, import_react89.useCallback)(() => {
|
|
25646
25627
|
setIsEditorDialogOpen(false);
|
|
25647
|
-
coreEvents.emit(
|
|
25628
|
+
coreEvents.emit("editor-selected" /* EditorSelected */, { editor: void 0 });
|
|
25648
25629
|
}, []);
|
|
25649
25630
|
return {
|
|
25650
25631
|
isEditorDialogOpen,
|
|
@@ -26021,7 +26002,7 @@ var useSlashCommandProcessor = (config, settings, addItem, clearItems, loadHisto
|
|
|
26021
26002
|
canonicalPath: resolvedCommandPath
|
|
26022
26003
|
} = parseSlashCommand(trimmed, commands);
|
|
26023
26004
|
if (!commandToExecute) {
|
|
26024
|
-
const isMcpLoading = config?.getMcpClientManager()?.getDiscoveryState() ===
|
|
26005
|
+
const isMcpLoading = config?.getMcpClientManager()?.getDiscoveryState() === "in_progress" /* IN_PROGRESS */;
|
|
26025
26006
|
if (isMcpLoading) {
|
|
26026
26007
|
setIsProcessing(true);
|
|
26027
26008
|
if (addToHistory) {
|
|
@@ -26201,7 +26182,7 @@ var useSlashCommandProcessor = (config, settings, addItem, clearItems, loadHisto
|
|
|
26201
26182
|
onConfirm: async (resolvedOutcome) => {
|
|
26202
26183
|
resolve3({
|
|
26203
26184
|
outcome: resolvedOutcome,
|
|
26204
|
-
approvedCommands: resolvedOutcome ===
|
|
26185
|
+
approvedCommands: resolvedOutcome === "cancel" /* Cancel */ ? [] : result.commandsToConfirm
|
|
26205
26186
|
});
|
|
26206
26187
|
}
|
|
26207
26188
|
};
|
|
@@ -26209,7 +26190,7 @@ var useSlashCommandProcessor = (config, settings, addItem, clearItems, loadHisto
|
|
|
26209
26190
|
callId,
|
|
26210
26191
|
name: "Expansion",
|
|
26211
26192
|
description: "Command expansion needs shell access",
|
|
26212
|
-
status:
|
|
26193
|
+
status: "awaiting_approval" /* AwaitingApproval */,
|
|
26213
26194
|
isClientInitiated: true,
|
|
26214
26195
|
resultDisplay: void 0,
|
|
26215
26196
|
confirmationDetails
|
|
@@ -26220,7 +26201,7 @@ var useSlashCommandProcessor = (config, settings, addItem, clearItems, loadHisto
|
|
|
26220
26201
|
});
|
|
26221
26202
|
});
|
|
26222
26203
|
setPendingItem(null);
|
|
26223
|
-
if (outcome ===
|
|
26204
|
+
if (outcome === "cancel" /* Cancel */ || !approvedCommands || approvedCommands.length === 0) {
|
|
26224
26205
|
addItem(
|
|
26225
26206
|
{
|
|
26226
26207
|
type: "info" /* INFO */,
|
|
@@ -26230,7 +26211,7 @@ var useSlashCommandProcessor = (config, settings, addItem, clearItems, loadHisto
|
|
|
26230
26211
|
);
|
|
26231
26212
|
return { type: "handled" };
|
|
26232
26213
|
}
|
|
26233
|
-
if (outcome ===
|
|
26214
|
+
if (outcome === "proceed_always" /* ProceedAlways */) {
|
|
26234
26215
|
setSessionShellAllowlist(
|
|
26235
26216
|
(prev) => /* @__PURE__ */ new Set([...prev, ...approvedCommands])
|
|
26236
26217
|
);
|
|
@@ -26706,7 +26687,7 @@ function mapToDisplay(toolOrTools, options = {}) {
|
|
|
26706
26687
|
let description;
|
|
26707
26688
|
let renderOutputAsMarkdown = false;
|
|
26708
26689
|
const displayName = call.tool?.displayName ?? call.request.name;
|
|
26709
|
-
if (call.status ===
|
|
26690
|
+
if (call.status === "error" /* Error */) {
|
|
26710
26691
|
description = JSON.stringify(call.request.args);
|
|
26711
26692
|
} else {
|
|
26712
26693
|
description = call.invocation.getDescription();
|
|
@@ -26729,27 +26710,27 @@ function mapToDisplay(toolOrTools, options = {}) {
|
|
|
26729
26710
|
let progress = void 0;
|
|
26730
26711
|
let progressTotal = void 0;
|
|
26731
26712
|
switch (call.status) {
|
|
26732
|
-
case
|
|
26713
|
+
case "success" /* Success */:
|
|
26733
26714
|
resultDisplay = call.response.resultDisplay;
|
|
26734
26715
|
outputFile = call.response.outputFile;
|
|
26735
26716
|
break;
|
|
26736
|
-
case
|
|
26737
|
-
case
|
|
26717
|
+
case "error" /* Error */:
|
|
26718
|
+
case "cancelled" /* Cancelled */:
|
|
26738
26719
|
resultDisplay = call.response.resultDisplay;
|
|
26739
26720
|
break;
|
|
26740
|
-
case
|
|
26721
|
+
case "awaiting_approval" /* AwaitingApproval */:
|
|
26741
26722
|
correlationId = call.correlationId;
|
|
26742
26723
|
confirmationDetails = call.confirmationDetails;
|
|
26743
26724
|
break;
|
|
26744
|
-
case
|
|
26725
|
+
case "executing" /* Executing */:
|
|
26745
26726
|
resultDisplay = call.liveOutput;
|
|
26746
26727
|
ptyId = call.pid;
|
|
26747
26728
|
progressMessage = call.progressMessage;
|
|
26748
26729
|
progress = call.progress;
|
|
26749
26730
|
progressTotal = call.progressTotal;
|
|
26750
26731
|
break;
|
|
26751
|
-
case
|
|
26752
|
-
case
|
|
26732
|
+
case "scheduled" /* Scheduled */:
|
|
26733
|
+
case "validating" /* Validating */:
|
|
26753
26734
|
break;
|
|
26754
26735
|
default: {
|
|
26755
26736
|
const exhaustiveCheck = call;
|
|
@@ -26820,7 +26801,7 @@ function useToolScheduler(onComplete, config, getPreferredEditor) {
|
|
|
26820
26801
|
const handler = (event) => {
|
|
26821
26802
|
const isRoot = event.schedulerId === ROOT_SCHEDULER_ID;
|
|
26822
26803
|
const hasExecuting = event.toolCalls.some(
|
|
26823
|
-
(tc) => tc.status ===
|
|
26804
|
+
(tc) => tc.status === "executing" /* Executing */ || (tc.status === "success" /* Success */ || tc.status === "error" /* Error */) && "tailToolCallRequest" in tc && tc.tailToolCallRequest != null
|
|
26824
26805
|
);
|
|
26825
26806
|
if (hasExecuting) {
|
|
26826
26807
|
setLastToolOutputTime(Date.now());
|
|
@@ -26829,7 +26810,7 @@ function useToolScheduler(onComplete, config, getPreferredEditor) {
|
|
|
26829
26810
|
const prevCalls = prev[event.schedulerId] ?? [];
|
|
26830
26811
|
const prevCallIds = new Set(prevCalls.map((tc) => tc.request.callId));
|
|
26831
26812
|
const filteredToolCalls = isRoot ? event.toolCalls : event.toolCalls.filter(
|
|
26832
|
-
(tc) => tc.status ===
|
|
26813
|
+
(tc) => tc.status === "awaiting_approval" /* AwaitingApproval */ || prevCallIds.has(tc.request.callId)
|
|
26833
26814
|
);
|
|
26834
26815
|
if (!isRoot && filteredToolCalls.length === 0 && prevCalls.length === 0) {
|
|
26835
26816
|
return prev;
|
|
@@ -26841,9 +26822,9 @@ function useToolScheduler(onComplete, config, getPreferredEditor) {
|
|
|
26841
26822
|
};
|
|
26842
26823
|
});
|
|
26843
26824
|
};
|
|
26844
|
-
messageBus.subscribe(
|
|
26825
|
+
messageBus.subscribe("tool-calls-update" /* TOOL_CALLS_UPDATE */, handler);
|
|
26845
26826
|
return () => {
|
|
26846
|
-
messageBus.unsubscribe(
|
|
26827
|
+
messageBus.unsubscribe("tool-calls-update" /* TOOL_CALLS_UPDATE */, handler);
|
|
26847
26828
|
};
|
|
26848
26829
|
}, [messageBus, internalAdaptToolCalls]);
|
|
26849
26830
|
(0, import_react96.useEffect)(() => {
|
|
@@ -26865,9 +26846,9 @@ function useToolScheduler(onComplete, config, getPreferredEditor) {
|
|
|
26865
26846
|
};
|
|
26866
26847
|
});
|
|
26867
26848
|
};
|
|
26868
|
-
messageBus.subscribe(
|
|
26849
|
+
messageBus.subscribe("subagent-activity" /* SUBAGENT_ACTIVITY */, handler);
|
|
26869
26850
|
return () => {
|
|
26870
|
-
messageBus.unsubscribe(
|
|
26851
|
+
messageBus.unsubscribe("subagent-activity" /* SUBAGENT_ACTIVITY */, handler);
|
|
26871
26852
|
};
|
|
26872
26853
|
}, [messageBus]);
|
|
26873
26854
|
const schedule = (0, import_react96.useCallback)(
|
|
@@ -26966,8 +26947,8 @@ function adaptToolCalls(coreCalls, prevTracked) {
|
|
|
26966
26947
|
const prev = prevMap.get(coreCall.request.callId);
|
|
26967
26948
|
const responseSubmittedToGemini = prev?.responseSubmittedToGemini ?? false;
|
|
26968
26949
|
let status = coreCall.status;
|
|
26969
|
-
if ((status ===
|
|
26970
|
-
status =
|
|
26950
|
+
if ((status === "success" /* Success */ || status === "error" /* Error */) && "tailToolCallRequest" in coreCall && coreCall.tailToolCallRequest != null) {
|
|
26951
|
+
status = "executing" /* Executing */;
|
|
26971
26952
|
}
|
|
26972
26953
|
return {
|
|
26973
26954
|
...coreCall,
|
|
@@ -26999,7 +26980,7 @@ function getBackgroundedToolInfo(toolCall) {
|
|
|
26999
26980
|
};
|
|
27000
26981
|
}
|
|
27001
26982
|
function isBackgroundableExecutingToolCall(toolCall) {
|
|
27002
|
-
return toolCall.status ===
|
|
26983
|
+
return toolCall.status === "executing" /* Executing */ && typeof toolCall.pid === "number";
|
|
27003
26984
|
}
|
|
27004
26985
|
function showCitations(settings) {
|
|
27005
26986
|
const enabled = settings.merged.ui.showCitations;
|
|
@@ -27009,14 +26990,14 @@ function showCitations(settings) {
|
|
|
27009
26990
|
return true;
|
|
27010
26991
|
}
|
|
27011
26992
|
function calculateStreamingState(isResponding, toolCalls) {
|
|
27012
|
-
if (toolCalls.some((tc) => tc.status ===
|
|
26993
|
+
if (toolCalls.some((tc) => tc.status === "awaiting_approval" /* AwaitingApproval */)) {
|
|
27013
26994
|
return "waiting_for_confirmation" /* WaitingForConfirmation */;
|
|
27014
26995
|
}
|
|
27015
26996
|
const isAnyToolActive = toolCalls.some((tc) => {
|
|
27016
|
-
if (tc.status ===
|
|
26997
|
+
if (tc.status === "executing" /* Executing */ || tc.status === "scheduled" /* Scheduled */ || tc.status === "validating" /* Validating */) {
|
|
27017
26998
|
return true;
|
|
27018
26999
|
}
|
|
27019
|
-
if (tc.status ===
|
|
27000
|
+
if (tc.status === "success" /* Success */ || tc.status === "error" /* Error */ || tc.status === "cancelled" /* Cancelled */) {
|
|
27020
27001
|
return !tc.responseSubmittedToGemini;
|
|
27021
27002
|
}
|
|
27022
27003
|
return false;
|
|
@@ -27063,9 +27044,9 @@ var useGeminiStream = (geminiClient, history, addItem, config, settings, onDebug
|
|
|
27063
27044
|
}
|
|
27064
27045
|
setRetryStatus(payload);
|
|
27065
27046
|
};
|
|
27066
|
-
coreEvents.on(
|
|
27047
|
+
coreEvents.on("retry-attempt" /* RetryAttempt */, handleRetryAttempt);
|
|
27067
27048
|
return () => {
|
|
27068
|
-
coreEvents.off(
|
|
27049
|
+
coreEvents.off("retry-attempt" /* RetryAttempt */, handleRetryAttempt);
|
|
27069
27050
|
};
|
|
27070
27051
|
}, [isRespondingRef]);
|
|
27071
27052
|
const [
|
|
@@ -27198,12 +27179,12 @@ var useGeminiStream = (geminiClient, history, addItem, config, settings, onDebug
|
|
|
27198
27179
|
const tc = toolCalls[i];
|
|
27199
27180
|
if (pushedToolCallIdsRef.current.has(tc.request.callId)) continue;
|
|
27200
27181
|
if (tc.status === "success" || tc.status === "error" || tc.status === "cancelled") {
|
|
27201
|
-
const isAgent = tc.tool?.kind ===
|
|
27182
|
+
const isAgent = tc.tool?.kind === "agent" /* Agent */;
|
|
27202
27183
|
if (isAgent) {
|
|
27203
27184
|
let contigAgentsComplete = true;
|
|
27204
27185
|
for (let j = i + 1; j < toolCalls.length; j++) {
|
|
27205
27186
|
const nextTc = toolCalls[j];
|
|
27206
|
-
if (nextTc.tool?.kind ===
|
|
27187
|
+
if (nextTc.tool?.kind === "agent" /* Agent */) {
|
|
27207
27188
|
if (nextTc.status !== "success" && nextTc.status !== "error" && nextTc.status !== "cancelled") {
|
|
27208
27189
|
contigAgentsComplete = false;
|
|
27209
27190
|
break;
|
|
@@ -27229,7 +27210,7 @@ var useGeminiStream = (geminiClient, history, addItem, config, settings, onDebug
|
|
|
27229
27210
|
let currentGroup = [];
|
|
27230
27211
|
for (const tc of toolsToPush) {
|
|
27231
27212
|
newPushed.add(tc.request.callId);
|
|
27232
|
-
if (tc.tool?.kind ===
|
|
27213
|
+
if (tc.tool?.kind === "agent" /* Agent */) {
|
|
27233
27214
|
currentGroup.push(tc);
|
|
27234
27215
|
} else {
|
|
27235
27216
|
if (currentGroup.length > 0) {
|
|
@@ -27382,7 +27363,7 @@ var useGeminiStream = (geminiClient, history, addItem, config, settings, onDebug
|
|
|
27382
27363
|
prevActiveShellPtyIdRef.current = activeShellPtyId;
|
|
27383
27364
|
}, [activeShellPtyId, addItem, setIsResponding]);
|
|
27384
27365
|
(0, import_react97.useEffect)(() => {
|
|
27385
|
-
if (config.getApprovalMode() ===
|
|
27366
|
+
if (config.getApprovalMode() === "yolo" /* YOLO */ && streamingState === "idle" /* Idle */) {
|
|
27386
27367
|
const lastUserMessageIndex = history.findLastIndex(
|
|
27387
27368
|
(item) => item.type === "user" /* USER */
|
|
27388
27369
|
);
|
|
@@ -27450,7 +27431,7 @@ var useGeminiStream = (geminiClient, history, addItem, config, settings, onDebug
|
|
|
27450
27431
|
return;
|
|
27451
27432
|
}
|
|
27452
27433
|
const hasActiveTools = toolCalls.some(
|
|
27453
|
-
(tc) => tc.status ===
|
|
27434
|
+
(tc) => tc.status === "executing" /* Executing */ || tc.status === "scheduled" /* Scheduled */ || tc.status === "validating" /* Validating */
|
|
27454
27435
|
);
|
|
27455
27436
|
if (streamingState === "idle" /* Idle */ && !isRespondingRef.current && !hasActiveTools) {
|
|
27456
27437
|
if (clearBuffer) {
|
|
@@ -27477,7 +27458,7 @@ var useGeminiStream = (geminiClient, history, addItem, config, settings, onDebug
|
|
|
27477
27458
|
if (tool.name === SHELL_COMMAND_NAME) {
|
|
27478
27459
|
return {
|
|
27479
27460
|
...tool,
|
|
27480
|
-
status:
|
|
27461
|
+
status: "cancelled" /* Cancelled */,
|
|
27481
27462
|
resultDisplay: tool.resultDisplay
|
|
27482
27463
|
};
|
|
27483
27464
|
}
|
|
@@ -27542,7 +27523,7 @@ var useGeminiStream = (geminiClient, history, addItem, config, settings, onDebug
|
|
|
27542
27523
|
let localQueryToSendToGemini = null;
|
|
27543
27524
|
if (typeof query === "string") {
|
|
27544
27525
|
const trimmedQuery = query.trim();
|
|
27545
|
-
await logger?.logMessage(
|
|
27526
|
+
await logger?.logMessage("user" /* USER */, trimmedQuery);
|
|
27546
27527
|
if (!shellModeActive) {
|
|
27547
27528
|
const slashCommandResult = isSlashCommand(trimmedQuery) ? await handleSlashCommand(trimmedQuery) : false;
|
|
27548
27529
|
if (slashCommandResult) {
|
|
@@ -27698,7 +27679,7 @@ var useGeminiStream = (geminiClient, history, addItem, config, settings, onDebug
|
|
|
27698
27679
|
if (pendingHistoryItemRef.current) {
|
|
27699
27680
|
if (pendingHistoryItemRef.current.type === "tool_group") {
|
|
27700
27681
|
const updatedTools = pendingHistoryItemRef.current.tools.map(
|
|
27701
|
-
(tool) => tool.status ===
|
|
27682
|
+
(tool) => tool.status === "validating" /* Validating */ || tool.status === "scheduled" /* Scheduled */ || tool.status === "awaiting_approval" /* AwaitingApproval */ || tool.status === "executing" /* Executing */ ? { ...tool, status: "cancelled" /* Cancelled */ } : tool
|
|
27702
27683
|
);
|
|
27703
27684
|
const pendingItem = {
|
|
27704
27685
|
...pendingHistoryItemRef.current,
|
|
@@ -27990,15 +27971,15 @@ var useGeminiStream = (geminiClient, history, addItem, config, settings, onDebug
|
|
|
27990
27971
|
let geminiMessageBuffer = "";
|
|
27991
27972
|
const toolCallRequests = [];
|
|
27992
27973
|
for await (const event of stream) {
|
|
27993
|
-
if (event.type !==
|
|
27974
|
+
if (event.type !== "thought" /* Thought */ && thoughtRef.current !== null) {
|
|
27994
27975
|
setThought(null);
|
|
27995
27976
|
}
|
|
27996
27977
|
switch (event.type) {
|
|
27997
|
-
case
|
|
27978
|
+
case "thought" /* Thought */:
|
|
27998
27979
|
setLastGeminiActivityTime(Date.now());
|
|
27999
27980
|
handleThoughtEvent(event.value, userMessageTimestamp);
|
|
28000
27981
|
break;
|
|
28001
|
-
case
|
|
27982
|
+
case "content" /* Content */:
|
|
28002
27983
|
setLastGeminiActivityTime(Date.now());
|
|
28003
27984
|
geminiMessageBuffer = handleContentEvent(
|
|
28004
27985
|
event.value,
|
|
@@ -28006,16 +27987,16 @@ var useGeminiStream = (geminiClient, history, addItem, config, settings, onDebug
|
|
|
28006
27987
|
userMessageTimestamp
|
|
28007
27988
|
);
|
|
28008
27989
|
break;
|
|
28009
|
-
case
|
|
27990
|
+
case "tool_call_request" /* ToolCallRequest */:
|
|
28010
27991
|
toolCallRequests.push(event.value);
|
|
28011
27992
|
break;
|
|
28012
|
-
case
|
|
27993
|
+
case "user_cancelled" /* UserCancelled */:
|
|
28013
27994
|
handleUserCancelledEvent(userMessageTimestamp);
|
|
28014
27995
|
break;
|
|
28015
|
-
case
|
|
27996
|
+
case "error" /* Error */:
|
|
28016
27997
|
handleErrorEvent(event.value, userMessageTimestamp);
|
|
28017
27998
|
break;
|
|
28018
|
-
case
|
|
27999
|
+
case "agent_execution_stopped" /* AgentExecutionStopped */:
|
|
28019
28000
|
handleAgentExecutionStoppedEvent(
|
|
28020
28001
|
event.value.reason,
|
|
28021
28002
|
userMessageTimestamp,
|
|
@@ -28023,7 +28004,7 @@ var useGeminiStream = (geminiClient, history, addItem, config, settings, onDebug
|
|
|
28023
28004
|
event.value.contextCleared
|
|
28024
28005
|
);
|
|
28025
28006
|
break;
|
|
28026
|
-
case
|
|
28007
|
+
case "agent_execution_blocked" /* AgentExecutionBlocked */:
|
|
28027
28008
|
handleAgentExecutionBlockedEvent(
|
|
28028
28009
|
event.value.reason,
|
|
28029
28010
|
userMessageTimestamp,
|
|
@@ -28031,36 +28012,36 @@ var useGeminiStream = (geminiClient, history, addItem, config, settings, onDebug
|
|
|
28031
28012
|
event.value.contextCleared
|
|
28032
28013
|
);
|
|
28033
28014
|
break;
|
|
28034
|
-
case
|
|
28015
|
+
case "chat_compressed" /* ChatCompressed */:
|
|
28035
28016
|
handleChatCompressionEvent(event.value, userMessageTimestamp);
|
|
28036
28017
|
break;
|
|
28037
|
-
case
|
|
28038
|
-
case
|
|
28018
|
+
case "tool_call_confirmation" /* ToolCallConfirmation */:
|
|
28019
|
+
case "tool_call_response" /* ToolCallResponse */:
|
|
28039
28020
|
break;
|
|
28040
|
-
case
|
|
28021
|
+
case "max_session_turns" /* MaxSessionTurns */:
|
|
28041
28022
|
handleMaxSessionTurnsEvent();
|
|
28042
28023
|
break;
|
|
28043
|
-
case
|
|
28024
|
+
case "context_window_will_overflow" /* ContextWindowWillOverflow */:
|
|
28044
28025
|
handleContextWindowWillOverflowEvent(
|
|
28045
28026
|
event.value.estimatedRequestTokenCount,
|
|
28046
28027
|
event.value.remainingTokenCount
|
|
28047
28028
|
);
|
|
28048
28029
|
break;
|
|
28049
|
-
case
|
|
28030
|
+
case "finished" /* Finished */:
|
|
28050
28031
|
handleFinishedEvent(event, userMessageTimestamp);
|
|
28051
28032
|
break;
|
|
28052
|
-
case
|
|
28033
|
+
case "citation" /* Citation */:
|
|
28053
28034
|
handleCitationEvent(event.value, userMessageTimestamp);
|
|
28054
28035
|
break;
|
|
28055
|
-
case
|
|
28036
|
+
case "model_info" /* ModelInfo */:
|
|
28056
28037
|
handleChatModelEvent(event.value, userMessageTimestamp);
|
|
28057
28038
|
break;
|
|
28058
|
-
case
|
|
28039
|
+
case "loop_detected" /* LoopDetected */:
|
|
28059
28040
|
loopDetectedRef.current = true;
|
|
28060
28041
|
break;
|
|
28061
|
-
case
|
|
28042
|
+
case "retry" /* Retry */:
|
|
28062
28043
|
break;
|
|
28063
|
-
case
|
|
28044
|
+
case "invalid_stream" /* InvalidStream */:
|
|
28064
28045
|
handleInvalidStreamEvent(event.value, userMessageTimestamp);
|
|
28065
28046
|
break;
|
|
28066
28047
|
default: {
|
|
@@ -28114,7 +28095,7 @@ var useGeminiStream = (geminiClient, history, addItem, config, settings, onDebug
|
|
|
28114
28095
|
const submitQuery = (0, import_react97.useCallback)(
|
|
28115
28096
|
async (query, options, prompt_id) => runInDevTraceSpan(
|
|
28116
28097
|
{
|
|
28117
|
-
operation: options?.isContinuation ?
|
|
28098
|
+
operation: options?.isContinuation ? "system_prompt" /* SystemPrompt */ : "user_prompt" /* UserPrompt */,
|
|
28118
28099
|
sessionId: config.getSessionId()
|
|
28119
28100
|
},
|
|
28120
28101
|
async ({ metadata: spanMetadata }) => {
|
|
@@ -28281,7 +28262,7 @@ var useGeminiStream = (geminiClient, history, addItem, config, settings, onDebug
|
|
|
28281
28262
|
submitQueryRef.current = submitQuery;
|
|
28282
28263
|
const handleApprovalModeChange = (0, import_react97.useCallback)(
|
|
28283
28264
|
async (newApprovalMode) => {
|
|
28284
|
-
if (previousApprovalModeRef.current ===
|
|
28265
|
+
if (previousApprovalModeRef.current === "plan" /* PLAN */ && newApprovalMode !== "plan" /* PLAN */ && streamingState === "idle" /* Idle */) {
|
|
28285
28266
|
if (geminiClient) {
|
|
28286
28267
|
try {
|
|
28287
28268
|
await geminiClient.addHistory({
|
|
@@ -28304,11 +28285,11 @@ var useGeminiStream = (geminiClient, history, addItem, config, settings, onDebug
|
|
|
28304
28285
|
}
|
|
28305
28286
|
}
|
|
28306
28287
|
previousApprovalModeRef.current = newApprovalMode;
|
|
28307
|
-
if (newApprovalMode ===
|
|
28288
|
+
if (newApprovalMode === "yolo" /* YOLO */ || newApprovalMode === "autoEdit" /* AUTO_EDIT */) {
|
|
28308
28289
|
let awaitingApprovalCalls = toolCalls.filter(
|
|
28309
28290
|
(call) => call.status === "awaiting_approval" && !call.request.forcedAsk
|
|
28310
28291
|
);
|
|
28311
|
-
if (newApprovalMode ===
|
|
28292
|
+
if (newApprovalMode === "autoEdit" /* AUTO_EDIT */) {
|
|
28312
28293
|
awaitingApprovalCalls = awaitingApprovalCalls.filter((call) => {
|
|
28313
28294
|
if (EDIT_TOOL_NAMES.has(call.request.name)) {
|
|
28314
28295
|
return true;
|
|
@@ -28324,11 +28305,11 @@ var useGeminiStream = (geminiClient, history, addItem, config, settings, onDebug
|
|
|
28324
28305
|
if (call.correlationId) {
|
|
28325
28306
|
try {
|
|
28326
28307
|
await config.getMessageBus().publish({
|
|
28327
|
-
type:
|
|
28308
|
+
type: "tool-confirmation-response" /* TOOL_CONFIRMATION_RESPONSE */,
|
|
28328
28309
|
correlationId: call.correlationId,
|
|
28329
28310
|
confirmed: true,
|
|
28330
28311
|
requiresUserConfirmation: false,
|
|
28331
|
-
outcome:
|
|
28312
|
+
outcome: "proceed_once" /* ProceedOnce */
|
|
28332
28313
|
});
|
|
28333
28314
|
} catch (error) {
|
|
28334
28315
|
debugLogger.warn(
|
|
@@ -28419,14 +28400,14 @@ var useGeminiStream = (geminiClient, history, addItem, config, settings, onDebug
|
|
|
28419
28400
|
);
|
|
28420
28401
|
if (isLowErrorVerbosity) {
|
|
28421
28402
|
suppressedToolErrorCountRef.current += geminiTools.filter(
|
|
28422
|
-
(tc) => tc.status ===
|
|
28403
|
+
(tc) => tc.status === "error" /* Error */
|
|
28423
28404
|
).length;
|
|
28424
28405
|
}
|
|
28425
28406
|
if (geminiTools.length === 0) {
|
|
28426
28407
|
return;
|
|
28427
28408
|
}
|
|
28428
28409
|
const stopExecutionTool = geminiTools.find(
|
|
28429
|
-
(tc) => tc.response.errorType ===
|
|
28410
|
+
(tc) => tc.response.errorType === "stop_execution" /* STOP_EXECUTION */
|
|
28430
28411
|
);
|
|
28431
28412
|
if (stopExecutionTool && stopExecutionTool.response.error) {
|
|
28432
28413
|
maybeAddSuppressedToolErrorNote();
|
|
@@ -28446,9 +28427,9 @@ var useGeminiStream = (geminiClient, history, addItem, config, settings, onDebug
|
|
|
28446
28427
|
(tc) => !isTopicTool2(tc.request.name)
|
|
28447
28428
|
);
|
|
28448
28429
|
const allDeclinableToolsCancelled = declinableTools.length > 0 && declinableTools.every(
|
|
28449
|
-
(tc) => tc.status ===
|
|
28430
|
+
(tc) => tc.status === "cancelled" /* Cancelled */
|
|
28450
28431
|
);
|
|
28451
|
-
const allToolsCancelled = geminiTools.length > 0 && geminiTools.every((tc) => tc.status ===
|
|
28432
|
+
const allToolsCancelled = geminiTools.length > 0 && geminiTools.every((tc) => tc.status === "cancelled" /* Cancelled */);
|
|
28452
28433
|
if (allDeclinableToolsCancelled || allToolsCancelled) {
|
|
28453
28434
|
if (!turnCancelledRef.current) {
|
|
28454
28435
|
addItem({
|
|
@@ -28534,7 +28515,7 @@ var useGeminiStream = (geminiClient, history, addItem, config, settings, onDebug
|
|
|
28534
28515
|
return;
|
|
28535
28516
|
}
|
|
28536
28517
|
const restorableToolCalls = toolCalls.filter(
|
|
28537
|
-
(toolCall) => EDIT_TOOL_NAMES.has(toolCall.request.name) && toolCall.status ===
|
|
28518
|
+
(toolCall) => EDIT_TOOL_NAMES.has(toolCall.request.name) && toolCall.status === "awaiting_approval" /* AwaitingApproval */
|
|
28538
28519
|
);
|
|
28539
28520
|
if (restorableToolCalls.length > 0) {
|
|
28540
28521
|
if (!gitService) {
|
|
@@ -28757,14 +28738,14 @@ var useAgentStream = ({
|
|
|
28757
28738
|
const displayName = legacyState?.displayName ?? event.name;
|
|
28758
28739
|
const isOutputMarkdown = legacyState?.isOutputMarkdown ?? false;
|
|
28759
28740
|
const desc = legacyState?.description ?? "";
|
|
28760
|
-
const fallbackKind =
|
|
28741
|
+
const fallbackKind = "other" /* Other */;
|
|
28761
28742
|
const newCall = {
|
|
28762
28743
|
callId: event.requestId,
|
|
28763
28744
|
name: displayName,
|
|
28764
28745
|
originalRequestName: event.name,
|
|
28765
28746
|
description: desc,
|
|
28766
28747
|
display: event.display,
|
|
28767
|
-
status:
|
|
28748
|
+
status: "scheduled" /* Scheduled */,
|
|
28768
28749
|
isClientInitiated: false,
|
|
28769
28750
|
renderOutputAsMarkdown: isOutputMarkdown,
|
|
28770
28751
|
kind: legacyState?.kind ?? fallbackKind,
|
|
@@ -28782,10 +28763,10 @@ var useAgentStream = ({
|
|
|
28782
28763
|
const evtStatus = legacyState?.status;
|
|
28783
28764
|
let status = tc.status;
|
|
28784
28765
|
if (evtStatus === "executing")
|
|
28785
|
-
status =
|
|
28786
|
-
else if (evtStatus === "error") status =
|
|
28766
|
+
status = "executing" /* Executing */;
|
|
28767
|
+
else if (evtStatus === "error") status = "error" /* Error */;
|
|
28787
28768
|
else if (evtStatus === "success")
|
|
28788
|
-
status =
|
|
28769
|
+
status = "success" /* Success */;
|
|
28789
28770
|
const display = event.display?.result;
|
|
28790
28771
|
const liveOutput = displayContentToString(display) ?? tc.resultDisplay;
|
|
28791
28772
|
const progressMessage = legacyState?.progressMessage ?? tc.progressMessage;
|
|
@@ -28818,7 +28799,7 @@ var useAgentStream = ({
|
|
|
28818
28799
|
const resultDisplay = displayContentToString(display) ?? tc.resultDisplay;
|
|
28819
28800
|
return {
|
|
28820
28801
|
...tc,
|
|
28821
|
-
status: event.isError ?
|
|
28802
|
+
status: event.isError ? "error" /* Error */ : "success" /* Success */,
|
|
28822
28803
|
display: event.display ? { ...tc.display, ...event.display } : tc.display,
|
|
28823
28804
|
resultDisplay,
|
|
28824
28805
|
outputFile
|
|
@@ -28884,7 +28865,7 @@ var useAgentStream = ({
|
|
|
28884
28865
|
if (!options?.isContinuation) {
|
|
28885
28866
|
if (typeof query === "string") {
|
|
28886
28867
|
addItem({ type: "user" /* USER */, text: query }, timestamp);
|
|
28887
|
-
void logger?.logMessage(
|
|
28868
|
+
void logger?.logMessage("user" /* USER */, query);
|
|
28888
28869
|
}
|
|
28889
28870
|
startNewPrompt();
|
|
28890
28871
|
}
|
|
@@ -30412,9 +30393,9 @@ var useFolderTrust = (settings, onTrustChange, addItem) => {
|
|
|
30412
30393
|
const handleFolderTrustSelect = (0, import_react103.useCallback)(
|
|
30413
30394
|
async (choice) => {
|
|
30414
30395
|
const trustLevelMap = {
|
|
30415
|
-
["trust_folder" /* TRUST_FOLDER */]:
|
|
30416
|
-
["trust_parent" /* TRUST_PARENT */]:
|
|
30417
|
-
["do_not_trust" /* DO_NOT_TRUST */]:
|
|
30396
|
+
["trust_folder" /* TRUST_FOLDER */]: "TRUST_FOLDER" /* TRUST_FOLDER */,
|
|
30397
|
+
["trust_parent" /* TRUST_PARENT */]: "TRUST_PARENT" /* TRUST_PARENT */,
|
|
30398
|
+
["do_not_trust" /* DO_NOT_TRUST */]: "DO_NOT_TRUST" /* DO_NOT_TRUST */
|
|
30418
30399
|
};
|
|
30419
30400
|
const trustLevel = trustLevelMap[choice];
|
|
30420
30401
|
if (!trustLevel) return;
|
|
@@ -30433,7 +30414,7 @@ var useFolderTrust = (settings, onTrustChange, addItem) => {
|
|
|
30433
30414
|
}, 100);
|
|
30434
30415
|
return;
|
|
30435
30416
|
}
|
|
30436
|
-
const currentIsTrusted = trustLevel ===
|
|
30417
|
+
const currentIsTrusted = trustLevel === "TRUST_FOLDER" /* TRUST_FOLDER */ || trustLevel === "TRUST_PARENT" /* TRUST_PARENT */;
|
|
30437
30418
|
onTrustChange(currentIsTrusted);
|
|
30438
30419
|
setIsTrusted(currentIsTrusted);
|
|
30439
30420
|
const wasTrusted = isTrusted ?? false;
|
|
@@ -31441,7 +31422,7 @@ function useMessageQueue({
|
|
|
31441
31422
|
var import_react105 = __toESM(require_react(), 1);
|
|
31442
31423
|
function useMcpStatus(config) {
|
|
31443
31424
|
const [discoveryState, setDiscoveryState] = (0, import_react105.useState)(
|
|
31444
|
-
() => config.getMcpClientManager()?.getDiscoveryState() ??
|
|
31425
|
+
() => config.getMcpClientManager()?.getDiscoveryState() ?? "not_started" /* NOT_STARTED */
|
|
31445
31426
|
);
|
|
31446
31427
|
const [mcpServerCount, setMcpServerCount] = (0, import_react105.useState)(
|
|
31447
31428
|
() => config.getMcpClientManager()?.getMcpServerCount() ?? 0
|
|
@@ -31454,12 +31435,12 @@ function useMcpStatus(config) {
|
|
|
31454
31435
|
setMcpServerCount(manager.getMcpServerCount());
|
|
31455
31436
|
}
|
|
31456
31437
|
};
|
|
31457
|
-
coreEvents.on(
|
|
31438
|
+
coreEvents.on("mcp-client-update" /* McpClientUpdate */, onChange);
|
|
31458
31439
|
return () => {
|
|
31459
|
-
coreEvents.off(
|
|
31440
|
+
coreEvents.off("mcp-client-update" /* McpClientUpdate */, onChange);
|
|
31460
31441
|
};
|
|
31461
31442
|
}, [config]);
|
|
31462
|
-
const isMcpReady = discoveryState ===
|
|
31443
|
+
const isMcpReady = discoveryState === "completed" /* COMPLETED */ || discoveryState === "not_started" /* NOT_STARTED */ && mcpServerCount === 0;
|
|
31463
31444
|
return {
|
|
31464
31445
|
discoveryState,
|
|
31465
31446
|
mcpServerCount,
|
|
@@ -31486,7 +31467,7 @@ function useApprovalModeIndicator({
|
|
|
31486
31467
|
(key) => {
|
|
31487
31468
|
let nextApprovalMode;
|
|
31488
31469
|
if (keyMatchers["app.toggleYolo" /* TOGGLE_YOLO */](key)) {
|
|
31489
|
-
if (config.isYoloModeDisabled() && config.getApprovalMode() !==
|
|
31470
|
+
if (config.isYoloModeDisabled() && config.getApprovalMode() !== "yolo" /* YOLO */) {
|
|
31490
31471
|
if (addItem) {
|
|
31491
31472
|
let text = "You cannot enter YOLO mode since it is disabled in your settings.";
|
|
31492
31473
|
const adminSettings = config.getRemoteAdminSettings();
|
|
@@ -31504,21 +31485,21 @@ function useApprovalModeIndicator({
|
|
|
31504
31485
|
}
|
|
31505
31486
|
return;
|
|
31506
31487
|
}
|
|
31507
|
-
nextApprovalMode = config.getApprovalMode() ===
|
|
31488
|
+
nextApprovalMode = config.getApprovalMode() === "yolo" /* YOLO */ ? "default" /* DEFAULT */ : "yolo" /* YOLO */;
|
|
31508
31489
|
} else if (keyMatchers["app.cycleApprovalMode" /* CYCLE_APPROVAL_MODE */](key)) {
|
|
31509
31490
|
const currentMode = config.getApprovalMode();
|
|
31510
31491
|
switch (currentMode) {
|
|
31511
|
-
case
|
|
31512
|
-
nextApprovalMode =
|
|
31492
|
+
case "default" /* DEFAULT */:
|
|
31493
|
+
nextApprovalMode = "autoEdit" /* AUTO_EDIT */;
|
|
31513
31494
|
break;
|
|
31514
|
-
case
|
|
31515
|
-
nextApprovalMode = allowPlanMode ?
|
|
31495
|
+
case "autoEdit" /* AUTO_EDIT */:
|
|
31496
|
+
nextApprovalMode = allowPlanMode ? "plan" /* PLAN */ : "default" /* DEFAULT */;
|
|
31516
31497
|
break;
|
|
31517
|
-
case
|
|
31518
|
-
nextApprovalMode =
|
|
31498
|
+
case "plan" /* PLAN */:
|
|
31499
|
+
nextApprovalMode = "default" /* DEFAULT */;
|
|
31519
31500
|
break;
|
|
31520
|
-
case
|
|
31521
|
-
nextApprovalMode =
|
|
31501
|
+
case "yolo" /* YOLO */:
|
|
31502
|
+
nextApprovalMode = "autoEdit" /* AUTO_EDIT */;
|
|
31522
31503
|
break;
|
|
31523
31504
|
default:
|
|
31524
31505
|
}
|
|
@@ -31928,11 +31909,11 @@ var useHookDisplayState = () => {
|
|
|
31928
31909
|
removeHook();
|
|
31929
31910
|
}
|
|
31930
31911
|
};
|
|
31931
|
-
coreEvents.on(
|
|
31932
|
-
coreEvents.on(
|
|
31912
|
+
coreEvents.on("hook-start" /* HookStart */, handleHookStart);
|
|
31913
|
+
coreEvents.on("hook-end" /* HookEnd */, handleHookEnd);
|
|
31933
31914
|
return () => {
|
|
31934
|
-
coreEvents.off(
|
|
31935
|
-
coreEvents.off(
|
|
31915
|
+
coreEvents.off("hook-start" /* HookStart */, handleHookStart);
|
|
31916
|
+
coreEvents.off("hook-end" /* HookEnd */, handleHookEnd);
|
|
31936
31917
|
activeTimeouts.forEach(clearTimeout);
|
|
31937
31918
|
activeTimeouts.clear();
|
|
31938
31919
|
};
|
|
@@ -32771,7 +32752,7 @@ var AppContainer = (props) => {
|
|
|
32771
32752
|
setConfigInitialized(true);
|
|
32772
32753
|
startupProfiler.flush(config);
|
|
32773
32754
|
startAutoMemoryIfEnabled(config);
|
|
32774
|
-
const sessionStartSource = resumedSessionData ?
|
|
32755
|
+
const sessionStartSource = resumedSessionData ? "resume" /* Resume */ : "startup" /* Startup */;
|
|
32775
32756
|
const result = await config.getHookSystem()?.fireSessionStartEvent(sessionStartSource);
|
|
32776
32757
|
if (result) {
|
|
32777
32758
|
const additionalContext = result.getAdditionalContext();
|
|
@@ -32798,7 +32779,7 @@ var AppContainer = (props) => {
|
|
|
32798
32779
|
);
|
|
32799
32780
|
const ideClient = await IdeClient.getInstance();
|
|
32800
32781
|
await ideClient.disconnect();
|
|
32801
|
-
await config?.getHookSystem()?.fireSessionEndEvent(
|
|
32782
|
+
await config?.getHookSystem()?.fireSessionEndEvent("exit" /* Exit */);
|
|
32802
32783
|
};
|
|
32803
32784
|
registerCleanup(cleanupFn);
|
|
32804
32785
|
return () => {
|
|
@@ -32823,11 +32804,11 @@ var AppContainer = (props) => {
|
|
|
32823
32804
|
resetTime: payload.resetTime
|
|
32824
32805
|
});
|
|
32825
32806
|
};
|
|
32826
|
-
coreEvents.on(
|
|
32827
|
-
coreEvents.on(
|
|
32807
|
+
coreEvents.on("model-changed" /* ModelChanged */, handleModelChanged);
|
|
32808
|
+
coreEvents.on("quota-changed" /* QuotaChanged */, handleQuotaChanged);
|
|
32828
32809
|
return () => {
|
|
32829
|
-
coreEvents.off(
|
|
32830
|
-
coreEvents.off(
|
|
32810
|
+
coreEvents.off("model-changed" /* ModelChanged */, handleModelChanged);
|
|
32811
|
+
coreEvents.off("quota-changed" /* QuotaChanged */, handleQuotaChanged);
|
|
32831
32812
|
};
|
|
32832
32813
|
}, [config]);
|
|
32833
32814
|
(0, import_react119.useEffect)(() => {
|
|
@@ -32840,16 +32821,16 @@ var AppContainer = (props) => {
|
|
|
32840
32821
|
const handleAgentsDiscovered = (payload) => {
|
|
32841
32822
|
setNewAgents(payload.agents);
|
|
32842
32823
|
};
|
|
32843
|
-
coreEvents.on(
|
|
32844
|
-
coreEvents.on(
|
|
32845
|
-
coreEvents.on(
|
|
32824
|
+
coreEvents.on("settings-changed" /* SettingsChanged */, handleSettingsChanged);
|
|
32825
|
+
coreEvents.on("admin-settings-changed" /* AdminSettingsChanged */, handleAdminSettingsChanged);
|
|
32826
|
+
coreEvents.on("agents-discovered" /* AgentsDiscovered */, handleAgentsDiscovered);
|
|
32846
32827
|
return () => {
|
|
32847
|
-
coreEvents.off(
|
|
32828
|
+
coreEvents.off("settings-changed" /* SettingsChanged */, handleSettingsChanged);
|
|
32848
32829
|
coreEvents.off(
|
|
32849
|
-
|
|
32830
|
+
"admin-settings-changed" /* AdminSettingsChanged */,
|
|
32850
32831
|
handleAdminSettingsChanged
|
|
32851
32832
|
);
|
|
32852
|
-
coreEvents.off(
|
|
32833
|
+
coreEvents.off("agents-discovered" /* AgentsDiscovered */, handleAgentsDiscovered);
|
|
32853
32834
|
};
|
|
32854
32835
|
}, [settings]);
|
|
32855
32836
|
const { errorCount, clearErrorCount } = useErrorCount();
|
|
@@ -32916,11 +32897,11 @@ var AppContainer = (props) => {
|
|
|
32916
32897
|
exitEditorDialog
|
|
32917
32898
|
} = useEditorSettings(settings, setEditorError, historyManager.addItem);
|
|
32918
32899
|
(0, import_react119.useEffect)(() => {
|
|
32919
|
-
coreEvents.on(
|
|
32920
|
-
coreEvents.on(
|
|
32900
|
+
coreEvents.on("external-editor-closed" /* ExternalEditorClosed */, handleEditorClose);
|
|
32901
|
+
coreEvents.on("request-editor-selection" /* RequestEditorSelection */, openEditorDialog);
|
|
32921
32902
|
return () => {
|
|
32922
|
-
coreEvents.off(
|
|
32923
|
-
coreEvents.off(
|
|
32903
|
+
coreEvents.off("external-editor-closed" /* ExternalEditorClosed */, handleEditorClose);
|
|
32904
|
+
coreEvents.off("request-editor-selection" /* RequestEditorSelection */, openEditorDialog);
|
|
32924
32905
|
};
|
|
32925
32906
|
}, [handleEditorClose, openEditorDialog]);
|
|
32926
32907
|
(0, import_react119.useEffect)(() => {
|
|
@@ -32988,7 +32969,7 @@ var AppContainer = (props) => {
|
|
|
32988
32969
|
errorVerbosity: settings.merged.ui.errorVerbosity
|
|
32989
32970
|
});
|
|
32990
32971
|
const isAuthDialogOpen = authState === "updating" /* Updating */;
|
|
32991
|
-
const isAuthenticating = authState === "unauthenticated" /* Unauthenticated */ && settings.merged.security.auth.selectedType !==
|
|
32972
|
+
const isAuthenticating = authState === "unauthenticated" /* Unauthenticated */ && settings.merged.security.auth.selectedType !== "gemini-api-key" /* USE_GEMINI */;
|
|
32992
32973
|
const isGeminiClientInitialized = config.getGeminiClient()?.isInitialized();
|
|
32993
32974
|
const { loadHistoryForResume, isResuming } = useSessionResume({
|
|
32994
32975
|
config,
|
|
@@ -33016,7 +32997,7 @@ var AppContainer = (props) => {
|
|
|
33016
32997
|
async (authType, scope) => {
|
|
33017
32998
|
if (authType) {
|
|
33018
32999
|
const previousAuthType = config.getContentGeneratorConfig()?.authType ?? "unknown";
|
|
33019
|
-
if (authType ===
|
|
33000
|
+
if (authType === "oauth-personal" /* LOGIN_WITH_GOOGLE */) {
|
|
33020
33001
|
setAuthContext({ requiresRestart: true });
|
|
33021
33002
|
} else {
|
|
33022
33003
|
setAuthContext({});
|
|
@@ -33044,7 +33025,7 @@ var AppContainer = (props) => {
|
|
|
33044
33025
|
);
|
|
33045
33026
|
return;
|
|
33046
33027
|
}
|
|
33047
|
-
if (authType ===
|
|
33028
|
+
if (authType === "oauth-personal" /* LOGIN_WITH_GOOGLE */ && config.isBrowserLaunchSuppressed()) {
|
|
33048
33029
|
writeToStdout(`
|
|
33049
33030
|
----------------------------------------------------------------
|
|
33050
33031
|
Logging in with Google... Restarting Gemini CLI to continue.
|
|
@@ -33067,7 +33048,7 @@ Logging in with Google... Restarting Gemini CLI to continue.
|
|
|
33067
33048
|
}
|
|
33068
33049
|
await saveApiKey(apiKey);
|
|
33069
33050
|
await reloadApiKey();
|
|
33070
|
-
await config.refreshAuth(
|
|
33051
|
+
await config.refreshAuth("gemini-api-key" /* USE_GEMINI */);
|
|
33071
33052
|
setAuthState("authenticated" /* Authenticated */);
|
|
33072
33053
|
} catch (e) {
|
|
33073
33054
|
onAuthError(
|
|
@@ -33092,7 +33073,7 @@ Logging in with Google... Restarting Gemini CLI to continue.
|
|
|
33092
33073
|
`Authentication is enforced to be ${settings.merged.security.auth.enforcedType}, but you are currently using ${settings.merged.security.auth.selectedType}.`
|
|
33093
33074
|
);
|
|
33094
33075
|
} else if (settings.merged.security.auth.selectedType && !settings.merged.security.auth.useExternal) {
|
|
33095
|
-
if (settings.merged.security.auth.selectedType ===
|
|
33076
|
+
if (settings.merged.security.auth.selectedType === "gemini-api-key" /* USE_GEMINI */) {
|
|
33096
33077
|
return;
|
|
33097
33078
|
}
|
|
33098
33079
|
const authMethod = settings.merged.security.auth.selectedType;
|
|
@@ -33228,9 +33209,9 @@ Logging in with Google... Restarting Gemini CLI to continue.
|
|
|
33228
33209
|
}
|
|
33229
33210
|
});
|
|
33230
33211
|
};
|
|
33231
|
-
coreEvents.on(
|
|
33212
|
+
coreEvents.on("consent-request" /* ConsentRequest */, handleConsentRequest);
|
|
33232
33213
|
return () => {
|
|
33233
|
-
coreEvents.off(
|
|
33214
|
+
coreEvents.off("consent-request" /* ConsentRequest */, handleConsentRequest);
|
|
33234
33215
|
};
|
|
33235
33216
|
}, []);
|
|
33236
33217
|
const performMemoryRefresh = (0, import_react119.useCallback)(async () => {
|
|
@@ -33888,7 +33869,7 @@ ${queuedText}` : queuedText;
|
|
|
33888
33869
|
if (keyMatchers["app.showErrorDetails" /* SHOW_ERROR_DETAILS */](key)) {
|
|
33889
33870
|
if (settings.merged.general.devtools) {
|
|
33890
33871
|
void (async () => {
|
|
33891
|
-
const { toggleDevToolsPanel } = await import("./devtoolsService-
|
|
33872
|
+
const { toggleDevToolsPanel } = await import("./devtoolsService-ZWL6J2QQ.js");
|
|
33892
33873
|
await toggleDevToolsPanel(
|
|
33893
33874
|
config,
|
|
33894
33875
|
showErrorDetails,
|
|
@@ -34106,17 +34087,17 @@ ${queuedText}` : queuedText;
|
|
|
34106
34087
|
Date.now()
|
|
34107
34088
|
);
|
|
34108
34089
|
};
|
|
34109
|
-
coreEvents.on(
|
|
34110
|
-
coreEvents.on(
|
|
34090
|
+
coreEvents.on("user-feedback" /* UserFeedback */, handleUserFeedback);
|
|
34091
|
+
coreEvents.on("hook-system-message" /* HookSystemMessage */, handleHookSystemMessage);
|
|
34111
34092
|
coreEvents.drainBacklogs();
|
|
34112
34093
|
return () => {
|
|
34113
|
-
coreEvents.off(
|
|
34114
|
-
coreEvents.off(
|
|
34094
|
+
coreEvents.off("user-feedback" /* UserFeedback */, handleUserFeedback);
|
|
34095
|
+
coreEvents.off("hook-system-message" /* HookSystemMessage */, handleHookSystemMessage);
|
|
34115
34096
|
};
|
|
34116
34097
|
}, [historyManager]);
|
|
34117
34098
|
const nightly = props.version.includes("nightly");
|
|
34118
34099
|
const isAwaitingLoginRestart = authState === "awaiting_login_restart" /* AwaitingLoginRestart */;
|
|
34119
|
-
const loginRestartMessage = settings.merged.security.auth.selectedType ===
|
|
34100
|
+
const loginRestartMessage = settings.merged.security.auth.selectedType === "vertex-ai" /* USE_VERTEX_AI */ ? "Authenticating to Vertex AI in Cloud Shell requires a restart to apply project settings." : void 0;
|
|
34120
34101
|
const dialogsVisible = shouldShowIdePrompt || isFolderTrustDialogOpen || isPolicyUpdateDialogOpen || adminSettingsChanged || !!commandConfirmationRequest || !!authConsentRequest || !!permissionConfirmationRequest || !!customDialog || confirmUpdateExtensionRequests.length > 0 || !!loopDetectionConfirmationRequest || isThemeDialogOpen || isSettingsDialogOpen || isModelDialogOpen || isVoiceModelDialogOpen || isAgentConfigDialogOpen || isPermissionsDialogOpen || isAuthenticating || isAuthDialogOpen || isEditorDialogOpen || showPrivacyNotice || showIdeRestartPrompt || !!proQuotaRequest || !!validationRequest || !!overageMenuRequest || !!emptyWalletRequest || isSessionBrowserOpen || authState === "awaiting_api_key_input" /* AwaitingApiKeyInput */ || isAwaitingLoginRestart || !!newAgents;
|
|
34121
34102
|
const hasPendingToolConfirmation = (0, import_react119.useMemo)(
|
|
34122
34103
|
() => isToolAwaitingConfirmation(pendingHistoryItems),
|
|
@@ -34222,9 +34203,9 @@ ${queuedText}` : queuedText;
|
|
|
34222
34203
|
const handleMemoryChanged = (result) => {
|
|
34223
34204
|
setGeminiMdFileCount(result.fileCount);
|
|
34224
34205
|
};
|
|
34225
|
-
coreEvents.on(
|
|
34206
|
+
coreEvents.on("memory-changed" /* MemoryChanged */, handleMemoryChanged);
|
|
34226
34207
|
return () => {
|
|
34227
|
-
coreEvents.off(
|
|
34208
|
+
coreEvents.off("memory-changed" /* MemoryChanged */, handleMemoryChanged);
|
|
34228
34209
|
};
|
|
34229
34210
|
}, []);
|
|
34230
34211
|
(0, import_react119.useEffect)(() => {
|