@google/gemini-cli 0.49.0-nightly.20260625.gd845bc5d4 → 0.49.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-DQARXBEA.js → chunk-2KPOY3PT.js} +1 -1
- package/bundle/{chunk-GP3HT3XA.js → chunk-5D76V46E.js} +1 -1
- package/bundle/{chunk-W4CY6ZAV.js → chunk-6SAPFKW2.js} +7 -7
- package/bundle/{chunk-KZTYIR7T.js → chunk-DG2DMXNL.js} +4 -4
- package/bundle/{chunk-M3LLLH4Q.js → chunk-DUXXYDOU.js} +14099 -7557
- package/bundle/{chunk-VFEUUHDP.js → chunk-GD7RCEFJ.js} +1 -1
- package/bundle/{chunk-Z7VJ5D2F.js → chunk-HHBELWTD.js} +1 -1
- package/bundle/{chunk-2H7H7LHE.js → chunk-KUPS66EC.js} +1 -1
- package/bundle/{chunk-ZUVD4OMS.js → chunk-KVKWITLW.js} +1 -1
- package/bundle/{chunk-CZXPXLF4.js → chunk-LJT2N46V.js} +2 -2
- package/bundle/{chunk-KEKQ7HNE.js → chunk-MT2PHBHF.js} +54 -67
- package/bundle/{chunk-6WLO7RJO.js → chunk-O3DZHA75.js} +3 -3
- package/bundle/{chunk-N6JHSW2E.js → chunk-QJ52LUEZ.js} +1 -1
- package/bundle/{chunk-PGI5U4RD.js → chunk-RWFC7SH2.js} +8 -9
- package/bundle/{chunk-LZSQIPID.js → chunk-SWRFLYQS.js} +3 -3
- package/bundle/{chunk-D7ASGNGV.js → chunk-THSPF7UM.js} +7 -7
- package/bundle/{chunk-JNWGPSWO.js → chunk-UTCNY4YR.js} +1 -1
- package/bundle/{chunk-4ZKDF6RJ.js → chunk-UXLDTYS5.js} +1 -1
- package/bundle/{chunk-LHQTFC5V.js → chunk-V33X6KEX.js} +2 -2
- package/bundle/{chunk-IH4N7SHL.js → chunk-VLV2BYPM.js} +4 -4
- package/bundle/{chunk-5VDCISGZ.js → chunk-VSVATFSS.js} +2 -2
- package/bundle/{chunk-NSCBFJB5.js → chunk-WDIGNHW2.js} +5 -8
- package/bundle/{chunk-DVXL5G45.js → chunk-YAWAHLTJ.js} +1 -1
- package/bundle/{chunk-SM66ZQJE.js → chunk-YP5PXUYC.js} +3 -3
- package/bundle/{cleanup-7ZAS2HJC.js → cleanup-J3QILUCY.js} +2 -2
- package/bundle/{cleanup-OWDILGDO.js → cleanup-UIXA2GEB.js} +2 -2
- package/bundle/{cleanup-UAXXCVMU.js → cleanup-YMPS4FUE.js} +2 -2
- package/bundle/{core-U7XFRGTW.js → core-64JIIVRX.js} +1 -1
- package/bundle/{dist-5MIUEMAQ.js → core-ELQDFBG3.js} +1 -1
- package/bundle/{devtoolsService-5OSGJYDS.js → devtoolsService-HCHZ2F6P.js} +2 -2
- package/bundle/{devtoolsService-6LH5MZBL.js → devtoolsService-HSYIYY4G.js} +3 -4
- package/bundle/{devtoolsService-6HAVTQZ5.js → devtoolsService-YX6EFIXG.js} +2 -2
- package/bundle/{dist-B6J3QDWI.js → dist-CLCQE7YY.js} +1 -1
- package/bundle/{gemini-H6TAAPCA.js → gemini-APNDCIQH.js} +196 -212
- package/bundle/{gemini-6SJTD2W4.js → gemini-FSMCKCVD.js} +14 -14
- package/bundle/{gemini-3BRU2HQK.js → gemini-MHDYPMBW.js} +13 -13
- package/bundle/gemini.js +7 -7
- package/bundle/{interactiveCli-B6MSN4C4.js → interactiveCli-4GI574PD.js} +8 -8
- package/bundle/{interactiveCli-KOS354WR.js → interactiveCli-PM57R35K.js} +295 -314
- package/bundle/{interactiveCli-BS2D2SBI.js → interactiveCli-PR7HIXJT.js} +8 -8
- package/bundle/{liteRtServerManager-FWHYC4A3.js → liteRtServerManager-IXIJTRUX.js} +4 -4
- package/bundle/{liteRtServerManager-HIIW3S66.js → liteRtServerManager-SRAMJKDM.js} +4 -4
- package/bundle/{liteRtServerManager-M7B3AIIU.js → liteRtServerManager-TYKWESZG.js} +4 -4
- package/bundle/{oauth2-provider-RILC6FBL.js → oauth2-provider-4UAT62TZ.js} +1 -1
- package/bundle/{oauth2-provider-G7I2PMHS.js → oauth2-provider-I7ZHNJPU.js} +72 -38
- package/bundle/{oauth2-provider-EA2VTAQO.js → oauth2-provider-UU4JM5RG.js} +1 -1
- package/bundle/{start-AVLVGFFA.js → start-C5MXXCE7.js} +6 -6
- package/bundle/{start-CCQWWAKJ.js → start-RIHKQGGY.js} +6 -6
- package/bundle/{start-FI6MCT26.js → start-W4HQTHNO.js} +6 -6
- package/package.json +1 -1
- package/bundle/chunk-6VICSAQD.js +0 -154
- package/bundle/chunk-EB5KWRK7.js +0 -512
- package/bundle/chunk-IP2NI6CQ.js +0 -398
- package/bundle/chunk-M43EUC7R.js +0 -1571
- package/bundle/chunk-P3C2ZDOD.js +0 -102505
- package/bundle/chunk-SSMJN6LA.js +0 -387674
- package/bundle/chunk-TNS2COLB.js +0 -17332
- package/bundle/chunk-YNU56L7B.js +0 -118
- package/bundle/cleanup-VF75F443.js +0 -32
- package/bundle/devtoolsService-OV63XS6S.js +0 -4359
- package/bundle/dist-GPCVSENP.js +0 -2150
- package/bundle/gemini-R6VOKNQ4.js +0 -29270
- package/bundle/interactiveCli-HSHPW4IB.js +0 -34767
- package/bundle/liteRtServerManager-ZMLRN3HQ.js +0 -65
- package/bundle/oauth2-provider-KED65L5Q.js +0 -235
- package/bundle/start-OOI6CRQA.js +0 -18
|
@@ -157,13 +157,13 @@ import {
|
|
|
157
157
|
widestLineFromStyledChars,
|
|
158
158
|
wordBreakStyledChars,
|
|
159
159
|
wrapStyledChars
|
|
160
|
-
} from "./chunk-
|
|
160
|
+
} from "./chunk-MT2PHBHF.js";
|
|
161
161
|
import {
|
|
162
162
|
appEvents
|
|
163
163
|
} from "./chunk-5PS3AYFU.js";
|
|
164
164
|
import {
|
|
165
165
|
require_source
|
|
166
|
-
} from "./chunk-
|
|
166
|
+
} from "./chunk-UXLDTYS5.js";
|
|
167
167
|
import {
|
|
168
168
|
ACTIVE_SHELL_MAX_LINES,
|
|
169
169
|
COMPACT_TOOL_SUBVIEW_MAX_LINES,
|
|
@@ -214,37 +214,33 @@ import {
|
|
|
214
214
|
stripAnsi,
|
|
215
215
|
stripUnsafeCharacters,
|
|
216
216
|
toCodePoints
|
|
217
|
-
} from "./chunk-
|
|
217
|
+
} from "./chunk-GD7RCEFJ.js";
|
|
218
218
|
import {
|
|
219
219
|
handleAutoUpdate,
|
|
220
220
|
isDevelopment,
|
|
221
221
|
relaunchApp,
|
|
222
222
|
setUpdateHandler
|
|
223
|
-
} from "./chunk-
|
|
223
|
+
} from "./chunk-LJT2N46V.js";
|
|
224
224
|
import {
|
|
225
225
|
isTodoList,
|
|
226
226
|
mapCoreStatusToDisplayStatus,
|
|
227
227
|
require_react
|
|
228
|
-
} from "./chunk-
|
|
228
|
+
} from "./chunk-5D76V46E.js";
|
|
229
229
|
import {
|
|
230
230
|
registerCleanup,
|
|
231
231
|
removeCleanup,
|
|
232
232
|
runExitCleanup,
|
|
233
233
|
setupTtyCheck
|
|
234
|
-
} from "./chunk-
|
|
234
|
+
} from "./chunk-QJ52LUEZ.js";
|
|
235
235
|
import {
|
|
236
236
|
ACTIVATE_SKILL_TOOL_NAME,
|
|
237
237
|
AGENT_TOOL_NAME,
|
|
238
238
|
ApiKeyUpdatedEvent,
|
|
239
|
-
ApprovalMode,
|
|
240
239
|
AsyncFzf,
|
|
241
240
|
AudioRecorder,
|
|
242
241
|
AuthType,
|
|
243
242
|
ChangeAuthRequestedError,
|
|
244
|
-
CompressionStatus,
|
|
245
243
|
ConversationFinishedEvent,
|
|
246
|
-
CoreEvent,
|
|
247
|
-
CoreToolCallStatus,
|
|
248
244
|
CreditPurchaseClickEvent,
|
|
249
245
|
DEFAULT_GEMINI_FLASH_LITE_MODEL,
|
|
250
246
|
DEFAULT_GEMINI_FLASH_MODEL,
|
|
@@ -266,19 +262,12 @@ import {
|
|
|
266
262
|
GEMMA_4_31B_IT_MODEL,
|
|
267
263
|
GLOB_DISPLAY_NAME,
|
|
268
264
|
GREP_DISPLAY_NAME,
|
|
269
|
-
GeminiCliOperation,
|
|
270
|
-
GeminiEventType,
|
|
271
265
|
GitService,
|
|
272
266
|
IdeClient,
|
|
273
|
-
Kind,
|
|
274
267
|
LS_DISPLAY_NAME,
|
|
275
268
|
LegacyAgentProtocol,
|
|
276
269
|
LlmRole,
|
|
277
270
|
Logger,
|
|
278
|
-
MCPDiscoveryState,
|
|
279
|
-
MCPServerStatus,
|
|
280
|
-
MessageBusType,
|
|
281
|
-
MessageSenderType,
|
|
282
271
|
ModelNotFoundError,
|
|
283
272
|
ModelSlashCommandEvent,
|
|
284
273
|
OverageMenuShownEvent,
|
|
@@ -290,27 +279,20 @@ import {
|
|
|
290
279
|
PREVIEW_GEMINI_MODEL,
|
|
291
280
|
PolicyIntegrityManager,
|
|
292
281
|
ProjectIdRequiredError,
|
|
293
|
-
QuestionType,
|
|
294
282
|
READ_FILE_DISPLAY_NAME,
|
|
295
283
|
READ_MANY_FILES_DISPLAY_NAME,
|
|
296
284
|
RELEASE_CHANNEL_STABILITY,
|
|
297
285
|
ROOT_SCHEDULER_ID,
|
|
298
286
|
SHELL_TOOL_NAME,
|
|
299
287
|
Scheduler,
|
|
300
|
-
SessionEndReason,
|
|
301
|
-
SessionStartSource,
|
|
302
288
|
ShellExecutionService,
|
|
303
289
|
SlashCommandStatus,
|
|
304
290
|
Storage,
|
|
305
|
-
SubagentState,
|
|
306
291
|
TOPIC_PARAM_STRATEGIC_INTENT,
|
|
307
292
|
TOPIC_PARAM_SUMMARY,
|
|
308
293
|
TOPIC_PARAM_TITLE,
|
|
309
294
|
TerminalQuotaError,
|
|
310
|
-
ToolConfirmationOutcome,
|
|
311
|
-
ToolErrorType,
|
|
312
295
|
TranscriptionFactory,
|
|
313
|
-
TrustLevel,
|
|
314
296
|
UPDATE_TOPIC_DISPLAY_NAME,
|
|
315
297
|
UPDATE_TOPIC_TOOL_NAME,
|
|
316
298
|
UnauthorizedError,
|
|
@@ -322,7 +304,6 @@ import {
|
|
|
322
304
|
WEB_FETCH_DISPLAY_NAME,
|
|
323
305
|
WEB_SEARCH_DISPLAY_NAME,
|
|
324
306
|
WRITE_FILE_DISPLAY_NAME,
|
|
325
|
-
WarningPriority,
|
|
326
307
|
WhisperModelManager,
|
|
327
308
|
addMCPStatusChangeListener,
|
|
328
309
|
allowEditorTypeInSandbox,
|
|
@@ -431,7 +412,7 @@ import {
|
|
|
431
412
|
validatePlanContent,
|
|
432
413
|
validatePlanPath,
|
|
433
414
|
writeToStdout
|
|
434
|
-
} from "./chunk-
|
|
415
|
+
} from "./chunk-DUXXYDOU.js";
|
|
435
416
|
import "./chunk-664ZODQF.js";
|
|
436
417
|
import "./chunk-TUDYL3X4.js";
|
|
437
418
|
import "./chunk-IUUIT4SU.js";
|
|
@@ -5057,7 +5038,7 @@ function calculateShellMaxLines(options) {
|
|
|
5057
5038
|
if (isAlternateBuffer && isThisShellFocused2 && !constrainHeight) {
|
|
5058
5039
|
return maxLinesBasedOnHeight;
|
|
5059
5040
|
}
|
|
5060
|
-
const isExecuting = status ===
|
|
5041
|
+
const isExecuting = status === "executing" /* Executing */;
|
|
5061
5042
|
const shellMaxLinesLimit = isExecuting ? ACTIVE_SHELL_MAX_LINES - SHELL_CONTENT_OVERHEAD : COMPLETED_SHELL_MAX_LINES - SHELL_CONTENT_OVERHEAD;
|
|
5062
5043
|
return Math.min(maxLinesBasedOnHeight, shellMaxLinesLimit);
|
|
5063
5044
|
}
|
|
@@ -5091,10 +5072,10 @@ function isShellTool(name) {
|
|
|
5091
5072
|
return name === SHELL_COMMAND_NAME || name === SHELL_NAME || name === SHELL_TOOL_NAME || normalized === "shell";
|
|
5092
5073
|
}
|
|
5093
5074
|
function isThisShellFocusable(name, status, config) {
|
|
5094
|
-
return !!(isShellTool(name) && status ===
|
|
5075
|
+
return !!(isShellTool(name) && status === "executing" /* Executing */ && config?.getEnableInteractiveShell());
|
|
5095
5076
|
}
|
|
5096
5077
|
function isThisShellFocused(name, status, ptyId, activeShellPtyId, embeddedShellFocused) {
|
|
5097
|
-
return !!(isShellTool(name) && status ===
|
|
5078
|
+
return !!(isShellTool(name) && status === "executing" /* Executing */ && ptyId === activeShellPtyId && embeddedShellFocused);
|
|
5098
5079
|
}
|
|
5099
5080
|
function useFocusHint(isThisShellFocusable2, isThisShellFocused2, resultDisplay) {
|
|
5100
5081
|
const [userHasFocused, setUserHasFocused] = (0, import_react9.useState)(false);
|
|
@@ -5254,13 +5235,13 @@ var formatToolArgs = (args) => {
|
|
|
5254
5235
|
var SubagentProgressDisplay = ({ progress, terminalWidth, historyOverrides }) => {
|
|
5255
5236
|
let headerText;
|
|
5256
5237
|
let headerColor = theme.text.secondary;
|
|
5257
|
-
if (progress.state ===
|
|
5238
|
+
if (progress.state === "cancelled" /* CANCELLED */) {
|
|
5258
5239
|
headerText = `Subagent ${progress.agentName} was cancelled.`;
|
|
5259
5240
|
headerColor = theme.status.warning;
|
|
5260
|
-
} else if (progress.state ===
|
|
5241
|
+
} else if (progress.state === "error" /* ERROR */) {
|
|
5261
5242
|
headerText = `Subagent ${progress.agentName} failed.`;
|
|
5262
5243
|
headerColor = theme.status.error;
|
|
5263
|
-
} else if (progress.state ===
|
|
5244
|
+
} else if (progress.state === "completed" /* COMPLETED */) {
|
|
5264
5245
|
headerText = `Subagent ${progress.agentName} completed.`;
|
|
5265
5246
|
headerColor = theme.status.success;
|
|
5266
5247
|
} else {
|
|
@@ -5280,7 +5261,7 @@ var SubagentProgressDisplay = ({ progress, terminalWidth, historyOverrides }) =>
|
|
|
5280
5261
|
/* @__PURE__ */ (0, import_jsx_runtime15.jsx)(Box_default, { flexGrow: 1, children: /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(Text, { color, children: item.content }) })
|
|
5281
5262
|
] }, item.id);
|
|
5282
5263
|
} else if (item.type === "tool_call") {
|
|
5283
|
-
const statusSymbol = item.status ===
|
|
5264
|
+
const statusSymbol = item.status === "running" /* RUNNING */ ? /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(build_default, { type: "dots" }) : item.status === "completed" /* COMPLETED */ ? /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(Text, { color: theme.status.success, children: TOOL_STATUS.SUCCESS }) : item.status === "cancelled" /* CANCELLED */ ? /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(Text, { color: theme.status.warning, bold: true, children: TOOL_STATUS.CANCELED }) : /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(Text, { color: theme.status.error, children: TOOL_STATUS.ERROR });
|
|
5284
5265
|
const formattedArgs = item.description || formatToolArgs(item.args);
|
|
5285
5266
|
const displayArgs = formattedArgs.length > 60 ? formattedArgs.slice(0, 60) + "..." : formattedArgs;
|
|
5286
5267
|
return /* @__PURE__ */ (0, import_jsx_runtime15.jsxs)(Box_default, { flexDirection: "row", children: [
|
|
@@ -5291,7 +5272,7 @@ var SubagentProgressDisplay = ({ progress, terminalWidth, historyOverrides }) =>
|
|
|
5291
5272
|
{
|
|
5292
5273
|
bold: true,
|
|
5293
5274
|
color: theme.text.primary,
|
|
5294
|
-
strikethrough: item.status ===
|
|
5275
|
+
strikethrough: item.status === "cancelled" /* CANCELLED */,
|
|
5295
5276
|
children: item.displayName || item.content
|
|
5296
5277
|
}
|
|
5297
5278
|
),
|
|
@@ -5300,7 +5281,7 @@ var SubagentProgressDisplay = ({ progress, terminalWidth, historyOverrides }) =>
|
|
|
5300
5281
|
{
|
|
5301
5282
|
color: theme.text.secondary,
|
|
5302
5283
|
wrap: "truncate",
|
|
5303
|
-
strikethrough: item.status ===
|
|
5284
|
+
strikethrough: item.status === "cancelled" /* CANCELLED */,
|
|
5304
5285
|
children: displayArgs
|
|
5305
5286
|
}
|
|
5306
5287
|
) })
|
|
@@ -5320,7 +5301,7 @@ var SubagentProgressDisplay = ({ progress, terminalWidth, historyOverrides }) =>
|
|
|
5320
5301
|
MarkdownDisplay,
|
|
5321
5302
|
{
|
|
5322
5303
|
text: safeJsonToMarkdown(progress.result),
|
|
5323
|
-
isPending: progress.state !==
|
|
5304
|
+
isPending: progress.state !== "completed" /* COMPLETED */,
|
|
5324
5305
|
terminalWidth
|
|
5325
5306
|
}
|
|
5326
5307
|
)
|
|
@@ -5674,14 +5655,14 @@ var ToolActionsProvider = (props) => {
|
|
|
5674
5655
|
}
|
|
5675
5656
|
const details = tool.confirmationDetails;
|
|
5676
5657
|
if (details?.type === "edit" && isDiffingEnabled && "filePath" in details) {
|
|
5677
|
-
const cliOutcome = outcome ===
|
|
5658
|
+
const cliOutcome = outcome === "cancel" /* Cancel */ ? "rejected" : "accepted";
|
|
5678
5659
|
await ideClient?.resolveDiffFromCli(details.filePath, cliOutcome);
|
|
5679
5660
|
}
|
|
5680
5661
|
if (tool.correlationId) {
|
|
5681
5662
|
await config.getMessageBus().publish({
|
|
5682
|
-
type:
|
|
5663
|
+
type: "tool-confirmation-response" /* TOOL_CONFIRMATION_RESPONSE */,
|
|
5683
5664
|
correlationId: tool.correlationId,
|
|
5684
|
-
confirmed: outcome !==
|
|
5665
|
+
confirmed: outcome !== "cancel" /* Cancel */,
|
|
5685
5666
|
requiresUserConfirmation: false,
|
|
5686
5667
|
outcome,
|
|
5687
5668
|
payload
|
|
@@ -5700,7 +5681,7 @@ var ToolActionsProvider = (props) => {
|
|
|
5700
5681
|
);
|
|
5701
5682
|
const cancel = (0, import_react12.useCallback)(
|
|
5702
5683
|
async (callId) => {
|
|
5703
|
-
await confirm(callId,
|
|
5684
|
+
await confirm(callId, "cancel" /* Cancel */);
|
|
5704
5685
|
},
|
|
5705
5686
|
[confirm]
|
|
5706
5687
|
);
|
|
@@ -5819,7 +5800,7 @@ var ToolMessage = ({
|
|
|
5819
5800
|
paddingX: 1,
|
|
5820
5801
|
flexDirection: "column",
|
|
5821
5802
|
children: [
|
|
5822
|
-
status ===
|
|
5803
|
+
status === "executing" /* Executing */ && progress !== void 0 && /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(
|
|
5823
5804
|
McpProgressIndicator,
|
|
5824
5805
|
{
|
|
5825
5806
|
progress,
|
|
@@ -5836,8 +5817,8 @@ var ToolMessage = ({
|
|
|
5836
5817
|
terminalWidth,
|
|
5837
5818
|
renderOutputAsMarkdown,
|
|
5838
5819
|
hasFocus: isThisShellFocused2,
|
|
5839
|
-
maxLines: kind ===
|
|
5840
|
-
overflowDirection: kind ===
|
|
5820
|
+
maxLines: kind === "agent" /* Agent */ && availableTerminalHeight !== void 0 ? SUBAGENT_MAX_LINES : void 0,
|
|
5821
|
+
overflowDirection: kind === "agent" /* Agent */ ? "bottom" : "top"
|
|
5841
5822
|
}
|
|
5842
5823
|
),
|
|
5843
5824
|
isThisShellFocused2 && config && /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(Box_default, { paddingLeft: STATUS_INDICATOR_WIDTH, marginTop: 1, children: /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(
|
|
@@ -6153,7 +6134,7 @@ function getInitialTrustState(settings, cwd5, isCurrentWorkspace) {
|
|
|
6153
6134
|
settings.merged,
|
|
6154
6135
|
process3.cwd()
|
|
6155
6136
|
);
|
|
6156
|
-
const isInheritedTrust = isTrusted && (!explicitTrustLevel || explicitTrustLevel ===
|
|
6137
|
+
const isInheritedTrust = isTrusted && (!explicitTrustLevel || explicitTrustLevel === "DO_NOT_TRUST" /* DO_NOT_TRUST */);
|
|
6157
6138
|
return {
|
|
6158
6139
|
currentTrustLevel: explicitTrustLevel,
|
|
6159
6140
|
isInheritedTrustFromParent: !!(source === "file" && isInheritedTrust),
|
|
@@ -6198,7 +6179,7 @@ var usePermissionsModifyTrust = (onExit, addItem, targetDirectory) => {
|
|
|
6198
6179
|
process3.cwd(),
|
|
6199
6180
|
newConfig
|
|
6200
6181
|
);
|
|
6201
|
-
if (trustLevel ===
|
|
6182
|
+
if (trustLevel === "DO_NOT_TRUST" /* DO_NOT_TRUST */ && isTrusted) {
|
|
6202
6183
|
let message = "Note: This folder is still trusted because the connected IDE workspace is trusted.";
|
|
6203
6184
|
if (source === "file") {
|
|
6204
6185
|
message = "Note: This folder is still trusted because a parent folder is trusted.";
|
|
@@ -6272,18 +6253,18 @@ function PermissionsModifyTrustDialog({
|
|
|
6272
6253
|
const TRUST_LEVEL_ITEMS = [
|
|
6273
6254
|
{
|
|
6274
6255
|
label: `Trust this folder (${dirName})`,
|
|
6275
|
-
value:
|
|
6276
|
-
key:
|
|
6256
|
+
value: "TRUST_FOLDER" /* TRUST_FOLDER */,
|
|
6257
|
+
key: "TRUST_FOLDER" /* TRUST_FOLDER */
|
|
6277
6258
|
},
|
|
6278
6259
|
{
|
|
6279
6260
|
label: `Trust parent folder (${parentFolder})`,
|
|
6280
|
-
value:
|
|
6281
|
-
key:
|
|
6261
|
+
value: "TRUST_PARENT" /* TRUST_PARENT */,
|
|
6262
|
+
key: "TRUST_PARENT" /* TRUST_PARENT */
|
|
6282
6263
|
},
|
|
6283
6264
|
{
|
|
6284
6265
|
label: "Don't trust",
|
|
6285
|
-
value:
|
|
6286
|
-
key:
|
|
6266
|
+
value: "DO_NOT_TRUST" /* DO_NOT_TRUST */,
|
|
6267
|
+
key: "DO_NOT_TRUST" /* DO_NOT_TRUST */
|
|
6287
6268
|
}
|
|
6288
6269
|
];
|
|
6289
6270
|
const {
|
|
@@ -6523,7 +6504,7 @@ var ShellToolMessage = ({
|
|
|
6523
6504
|
maxLinesLimit: maxLines
|
|
6524
6505
|
});
|
|
6525
6506
|
import_react17.default.useEffect(() => {
|
|
6526
|
-
const isExecuting = status ===
|
|
6507
|
+
const isExecuting = status === "executing" /* Executing */;
|
|
6527
6508
|
if (isExecuting && ptyId) {
|
|
6528
6509
|
try {
|
|
6529
6510
|
const childWidth = terminalWidth - 4;
|
|
@@ -6736,13 +6717,13 @@ var SubagentGroupDisplay = ({
|
|
|
6736
6717
|
const singleAgent = toolCalls[0].resultDisplay;
|
|
6737
6718
|
if (isSubagentProgress(singleAgent)) {
|
|
6738
6719
|
switch (singleAgent.state) {
|
|
6739
|
-
case
|
|
6720
|
+
case "completed" /* COMPLETED */:
|
|
6740
6721
|
headerText = "Agent Completed";
|
|
6741
6722
|
break;
|
|
6742
|
-
case
|
|
6723
|
+
case "cancelled" /* CANCELLED */:
|
|
6743
6724
|
headerText = "Agent Cancelled";
|
|
6744
6725
|
break;
|
|
6745
|
-
case
|
|
6726
|
+
case "error" /* ERROR */:
|
|
6746
6727
|
headerText = "Agent Error";
|
|
6747
6728
|
break;
|
|
6748
6729
|
default:
|
|
@@ -6758,8 +6739,8 @@ var SubagentGroupDisplay = ({
|
|
|
6758
6739
|
for (const tc of toolCalls) {
|
|
6759
6740
|
const progress = tc.resultDisplay;
|
|
6760
6741
|
if (isSubagentProgress(progress)) {
|
|
6761
|
-
if (progress.state ===
|
|
6762
|
-
else if (progress.state ===
|
|
6742
|
+
if (progress.state === "completed" /* COMPLETED */) completedCount++;
|
|
6743
|
+
else if (progress.state === "running" /* RUNNING */) runningCount++;
|
|
6763
6744
|
} else {
|
|
6764
6745
|
runningCount++;
|
|
6765
6746
|
}
|
|
@@ -6838,7 +6819,7 @@ var SubagentGroupDisplay = ({
|
|
|
6838
6819
|
if (!isExpanded) {
|
|
6839
6820
|
let content = "Starting...";
|
|
6840
6821
|
let formattedArgs;
|
|
6841
|
-
if (progress.state ===
|
|
6822
|
+
if (progress.state === "completed" /* COMPLETED */) {
|
|
6842
6823
|
if (progress.terminateReason && progress.terminateReason !== "GOAL") {
|
|
6843
6824
|
content = `Finished Early (${progress.terminateReason})`;
|
|
6844
6825
|
} else {
|
|
@@ -6852,17 +6833,17 @@ var SubagentGroupDisplay = ({
|
|
|
6852
6833
|
formattedArgs = formatToolArgs(lastActivity.args);
|
|
6853
6834
|
}
|
|
6854
6835
|
}
|
|
6855
|
-
const displayArgs = progress.state ===
|
|
6836
|
+
const displayArgs = progress.state === "completed" /* COMPLETED */ ? "" : formattedArgs;
|
|
6856
6837
|
const renderStatusIcon = () => {
|
|
6857
|
-
const state = progress.state ??
|
|
6838
|
+
const state = progress.state ?? "running" /* RUNNING */;
|
|
6858
6839
|
switch (state) {
|
|
6859
|
-
case
|
|
6840
|
+
case "running" /* RUNNING */:
|
|
6860
6841
|
return /* @__PURE__ */ (0, import_jsx_runtime25.jsx)(Text, { color: theme.text.primary, children: "!" });
|
|
6861
|
-
case
|
|
6842
|
+
case "completed" /* COMPLETED */:
|
|
6862
6843
|
return /* @__PURE__ */ (0, import_jsx_runtime25.jsx)(Text, { color: theme.status.success, children: "\u2713" });
|
|
6863
|
-
case
|
|
6844
|
+
case "cancelled" /* CANCELLED */:
|
|
6864
6845
|
return /* @__PURE__ */ (0, import_jsx_runtime25.jsx)(Text, { color: theme.status.warning, children: "\u2139" });
|
|
6865
|
-
case
|
|
6846
|
+
case "error" /* ERROR */:
|
|
6866
6847
|
return /* @__PURE__ */ (0, import_jsx_runtime25.jsx)(Text, { color: theme.status.error, children: "\u2717" });
|
|
6867
6848
|
default:
|
|
6868
6849
|
return checkExhaustive(state);
|
|
@@ -6915,22 +6896,22 @@ var hasPayload = (res) => {
|
|
|
6915
6896
|
function getFileOpData(diff, status, resultDisplay, terminalWidth, availableTerminalHeight, isClickable) {
|
|
6916
6897
|
const added = (diff.diffStat?.model_added_lines ?? 0) + (diff.diffStat?.user_added_lines ?? 0);
|
|
6917
6898
|
const removed = (diff.diffStat?.model_removed_lines ?? 0) + (diff.diffStat?.user_removed_lines ?? 0);
|
|
6918
|
-
const isAcceptedOrConfirming = status ===
|
|
6899
|
+
const isAcceptedOrConfirming = status === "success" /* Success */ || status === "executing" /* Executing */ || status === "awaiting_approval" /* AwaitingApproval */;
|
|
6919
6900
|
const addColor = isAcceptedOrConfirming ? theme.status.success : theme.text.secondary;
|
|
6920
6901
|
const removeColor = isAcceptedOrConfirming ? theme.status.error : theme.text.secondary;
|
|
6921
6902
|
const showDiffStat = !!diff.diffStat;
|
|
6922
6903
|
const description = /* @__PURE__ */ (0, import_jsx_runtime26.jsx)(Box_default, { flexDirection: "row", children: /* @__PURE__ */ (0, import_jsx_runtime26.jsx)(Text, { color: theme.text.secondary, wrap: "truncate-end", children: diff.fileName }) });
|
|
6923
6904
|
let resultSummary = "";
|
|
6924
6905
|
let resultColor = theme.text.secondary;
|
|
6925
|
-
if (status ===
|
|
6906
|
+
if (status === "awaiting_approval" /* AwaitingApproval */) {
|
|
6926
6907
|
resultSummary = "Confirming";
|
|
6927
|
-
} else if (status ===
|
|
6908
|
+
} else if (status === "success" /* Success */ || status === "executing" /* Executing */) {
|
|
6928
6909
|
resultSummary = "Accepted";
|
|
6929
6910
|
resultColor = theme.text.accent;
|
|
6930
|
-
} else if (status ===
|
|
6911
|
+
} else if (status === "cancelled" /* Cancelled */) {
|
|
6931
6912
|
resultSummary = "Rejected";
|
|
6932
6913
|
resultColor = theme.status.error;
|
|
6933
|
-
} else if (status ===
|
|
6914
|
+
} else if (status === "error" /* Error */) {
|
|
6934
6915
|
resultSummary = typeof resultDisplay === "string" ? resultDisplay : "Failed";
|
|
6935
6916
|
resultColor = theme.status.error;
|
|
6936
6917
|
}
|
|
@@ -6961,7 +6942,7 @@ function getFileOpData(diff, status, resultDisplay, terminalWidth, availableTerm
|
|
|
6961
6942
|
filename: diff.fileName,
|
|
6962
6943
|
terminalWidth: terminalWidth - PAYLOAD_MARGIN_LEFT,
|
|
6963
6944
|
availableTerminalHeight,
|
|
6964
|
-
disableColor: status ===
|
|
6945
|
+
disableColor: status === "cancelled" /* Cancelled */
|
|
6965
6946
|
}
|
|
6966
6947
|
);
|
|
6967
6948
|
return { description, summary, payload };
|
|
@@ -7089,10 +7070,10 @@ var DenseToolMessage = (props) => {
|
|
|
7089
7070
|
if (isGrepResult(resultDisplay)) {
|
|
7090
7071
|
return getGenericSuccessData(resultDisplay, originalDescription);
|
|
7091
7072
|
}
|
|
7092
|
-
if (status ===
|
|
7073
|
+
if (status === "success" /* Success */ && resultDisplay) {
|
|
7093
7074
|
return getGenericSuccessData(resultDisplay, originalDescription);
|
|
7094
7075
|
}
|
|
7095
|
-
if (status ===
|
|
7076
|
+
if (status === "error" /* Error */) {
|
|
7096
7077
|
const text = typeof resultDisplay === "string" ? resultDisplay.replace(/\n/g, " ") : "Failed";
|
|
7097
7078
|
const errorSummary = /* @__PURE__ */ (0, import_jsx_runtime26.jsxs)(Text, { color: theme.status.error, wrap: "truncate-end", children: [
|
|
7098
7079
|
"\u2192 ",
|
|
@@ -7133,7 +7114,7 @@ var DenseToolMessage = (props) => {
|
|
|
7133
7114
|
language: fileExtension,
|
|
7134
7115
|
maxWidth: terminalWidth - PAYLOAD_MARGIN_LEFT,
|
|
7135
7116
|
settings,
|
|
7136
|
-
disableColor: status ===
|
|
7117
|
+
disableColor: status === "cancelled" /* Cancelled */,
|
|
7137
7118
|
returnLines: true
|
|
7138
7119
|
});
|
|
7139
7120
|
} else {
|
|
@@ -7141,7 +7122,7 @@ var DenseToolMessage = (props) => {
|
|
|
7141
7122
|
parsedLines,
|
|
7142
7123
|
filename: diff.fileName,
|
|
7143
7124
|
terminalWidth: terminalWidth - PAYLOAD_MARGIN_LEFT,
|
|
7144
|
-
disableColor: status ===
|
|
7125
|
+
disableColor: status === "cancelled" /* Cancelled */
|
|
7145
7126
|
});
|
|
7146
7127
|
}
|
|
7147
7128
|
}, [diff, isExpanded, isAlternateBuffer, terminalWidth, settings, status]);
|
|
@@ -7271,7 +7252,7 @@ function isToolExecuting(pendingHistoryItems) {
|
|
|
7271
7252
|
return pendingHistoryItems.some((item) => {
|
|
7272
7253
|
if (item && item.type === "tool_group") {
|
|
7273
7254
|
return item.tools.some(
|
|
7274
|
-
(tool) =>
|
|
7255
|
+
(tool) => "executing" /* Executing */ === tool.status
|
|
7275
7256
|
);
|
|
7276
7257
|
}
|
|
7277
7258
|
return false;
|
|
@@ -7280,7 +7261,7 @@ function isToolExecuting(pendingHistoryItems) {
|
|
|
7280
7261
|
function isToolAwaitingConfirmation(pendingHistoryItems) {
|
|
7281
7262
|
return pendingHistoryItems.filter((item) => item.type === "tool_group").some(
|
|
7282
7263
|
(item) => item.tools.some(
|
|
7283
|
-
(tool) =>
|
|
7264
|
+
(tool) => "awaiting_approval" /* AwaitingApproval */ === tool.status
|
|
7284
7265
|
)
|
|
7285
7266
|
);
|
|
7286
7267
|
}
|
|
@@ -7303,14 +7284,14 @@ function getToolGroupBorderAppearance(item, activeShellPtyId, embeddedShellFocus
|
|
|
7303
7284
|
if (isTrackedToolCall(t)) {
|
|
7304
7285
|
return t.status !== "success" && t.status !== "error" && t.status !== "cancelled";
|
|
7305
7286
|
} else {
|
|
7306
|
-
return t.status !==
|
|
7287
|
+
return t.status !== "success" /* Success */ && t.status !== "error" /* Error */ && t.status !== "cancelled" /* Cancelled */;
|
|
7307
7288
|
}
|
|
7308
7289
|
});
|
|
7309
7290
|
const isEmbeddedShellFocused = toolsToInspect.some((t) => {
|
|
7310
7291
|
if (isTrackedToolCall(t)) {
|
|
7311
7292
|
return isShellTool(t.request.name) && t.status === "executing" && t.pid === activeShellPtyId && !!embeddedShellFocused;
|
|
7312
7293
|
} else {
|
|
7313
|
-
return isShellTool(t.name) && t.status ===
|
|
7294
|
+
return isShellTool(t.name) && t.status === "executing" /* Executing */ && t.ptyId === activeShellPtyId && !!embeddedShellFocused;
|
|
7314
7295
|
}
|
|
7315
7296
|
});
|
|
7316
7297
|
const isShellCommand = toolsToInspect.some((t) => {
|
|
@@ -7409,7 +7390,7 @@ var ToolGroupMessage = ({
|
|
|
7409
7390
|
const groupedTools = (0, import_react21.useMemo)(() => {
|
|
7410
7391
|
const groups = [];
|
|
7411
7392
|
for (const tool of visibleToolCalls) {
|
|
7412
|
-
if (tool.kind ===
|
|
7393
|
+
if (tool.kind === "agent" /* Agent */) {
|
|
7413
7394
|
const lastGroup = groups[groups.length - 1];
|
|
7414
7395
|
if (Array.isArray(lastGroup)) {
|
|
7415
7396
|
lastGroup.push(tool);
|
|
@@ -7464,7 +7445,7 @@ var ToolGroupMessage = ({
|
|
|
7464
7445
|
}, [groupedTools, isCompactModeEnabled, borderTopOverride]);
|
|
7465
7446
|
let countToolCallsWithResults = 0;
|
|
7466
7447
|
for (const tool of visibleToolCalls) {
|
|
7467
|
-
if (tool.kind !==
|
|
7448
|
+
if (tool.kind !== "agent" /* Agent */) {
|
|
7468
7449
|
if (isCompactTool(tool, isCompactModeEnabled)) {
|
|
7469
7450
|
if (hasDensePayload(tool)) {
|
|
7470
7451
|
countToolCallsWithResults++;
|
|
@@ -7638,7 +7619,7 @@ var ToolGroupDisplay = ({
|
|
|
7638
7619
|
}
|
|
7639
7620
|
const { tools, borderColor, borderDimColor, borderTop, borderBottom } = item;
|
|
7640
7621
|
const visibleTools = tools.filter(
|
|
7641
|
-
(t) => t.status !==
|
|
7622
|
+
(t) => t.status !== "awaiting_approval" /* AwaitingApproval */
|
|
7642
7623
|
);
|
|
7643
7624
|
const noticeTools = visibleTools.filter((t) => t.format === "notice");
|
|
7644
7625
|
const otherTools = visibleTools.filter(
|
|
@@ -7840,18 +7821,18 @@ function CompressionMessage({
|
|
|
7840
7821
|
return "Compressing chat history";
|
|
7841
7822
|
}
|
|
7842
7823
|
switch (compressionStatus) {
|
|
7843
|
-
case
|
|
7824
|
+
case 1 /* COMPRESSED */:
|
|
7844
7825
|
return `Chat history compressed from ${originalTokens} to ${newTokens} tokens.`;
|
|
7845
|
-
case
|
|
7826
|
+
case 2 /* COMPRESSION_FAILED_INFLATED_TOKEN_COUNT */:
|
|
7846
7827
|
if (originalTokens < 5e4) {
|
|
7847
7828
|
return "Compression was not beneficial for this history size.";
|
|
7848
7829
|
}
|
|
7849
7830
|
return "Chat history compression did not reduce size. This may indicate issues with the compression prompt.";
|
|
7850
|
-
case
|
|
7831
|
+
case 3 /* COMPRESSION_FAILED_TOKEN_COUNT_ERROR */:
|
|
7851
7832
|
return "Could not compress chat history due to a token counting error.";
|
|
7852
|
-
case
|
|
7833
|
+
case 4 /* COMPRESSION_FAILED_EMPTY_SUMMARY */:
|
|
7853
7834
|
return "Chat history compression failed: the model returned an empty summary.";
|
|
7854
|
-
case
|
|
7835
|
+
case 5 /* NOOP */:
|
|
7855
7836
|
return "Nothing to compress.";
|
|
7856
7837
|
default:
|
|
7857
7838
|
return "";
|
|
@@ -8277,8 +8258,8 @@ var ModelUsageTable = ({ models }) => {
|
|
|
8277
8258
|
);
|
|
8278
8259
|
roleEntries.sort(([a], [b]) => {
|
|
8279
8260
|
if (a === b) return 0;
|
|
8280
|
-
if (a ===
|
|
8281
|
-
if (b ===
|
|
8261
|
+
if (a === "main" /* MAIN */) return -1;
|
|
8262
|
+
if (b === "main" /* MAIN */) return 1;
|
|
8282
8263
|
return a.localeCompare(b);
|
|
8283
8264
|
});
|
|
8284
8265
|
roleEntries.forEach(([role, roleMetrics]) => {
|
|
@@ -8609,8 +8590,8 @@ var ModelStatsDisplay = ({
|
|
|
8609
8590
|
return validRoles.includes(role);
|
|
8610
8591
|
}).sort((a, b) => {
|
|
8611
8592
|
if (a === b) return 0;
|
|
8612
|
-
if (a ===
|
|
8613
|
-
if (b ===
|
|
8593
|
+
if (a === "main" /* MAIN */) return -1;
|
|
8594
|
+
if (b === "main" /* MAIN */) return 1;
|
|
8614
8595
|
return a.localeCompare(b);
|
|
8615
8596
|
});
|
|
8616
8597
|
const createRow = (metric, getValue, options = {}) => {
|
|
@@ -9401,7 +9382,7 @@ var McpStatus = ({
|
|
|
9401
9382
|
);
|
|
9402
9383
|
const originalStatus = serverStatus(serverName);
|
|
9403
9384
|
const hasCachedItems = serverTools.length > 0 || serverPrompts.length > 0 || serverResources.length > 0;
|
|
9404
|
-
const status = originalStatus ===
|
|
9385
|
+
const status = originalStatus === "disconnected" /* DISCONNECTED */ && hasCachedItems ? "connected" /* CONNECTED */ : originalStatus;
|
|
9405
9386
|
let statusIndicator = "";
|
|
9406
9387
|
let statusText = "";
|
|
9407
9388
|
let statusColor = theme.text.primary;
|
|
@@ -9413,17 +9394,17 @@ var McpStatus = ({
|
|
|
9413
9394
|
statusColor = theme.text.secondary;
|
|
9414
9395
|
} else {
|
|
9415
9396
|
switch (status) {
|
|
9416
|
-
case
|
|
9397
|
+
case "connected" /* CONNECTED */:
|
|
9417
9398
|
statusIndicator = "\u{1F7E2}";
|
|
9418
9399
|
statusText = "Ready";
|
|
9419
9400
|
statusColor = theme.status.success;
|
|
9420
9401
|
break;
|
|
9421
|
-
case
|
|
9402
|
+
case "connecting" /* CONNECTING */:
|
|
9422
9403
|
statusIndicator = "\u{1F504}";
|
|
9423
9404
|
statusText = "Starting... (first startup may take longer)";
|
|
9424
9405
|
statusColor = theme.status.warning;
|
|
9425
9406
|
break;
|
|
9426
|
-
case
|
|
9407
|
+
case "disconnected" /* DISCONNECTED */:
|
|
9427
9408
|
default:
|
|
9428
9409
|
statusIndicator = "\u{1F534}";
|
|
9429
9410
|
statusText = "Disconnected";
|
|
@@ -9471,12 +9452,12 @@ var McpStatus = ({
|
|
|
9471
9452
|
/* @__PURE__ */ (0, import_jsx_runtime48.jsxs)(Text, { children: [
|
|
9472
9453
|
" - ",
|
|
9473
9454
|
statusText,
|
|
9474
|
-
status ===
|
|
9455
|
+
status === "connected" /* CONNECTED */ && parts.length > 0 && ` (${parts.join(", ")})`
|
|
9475
9456
|
] }),
|
|
9476
9457
|
authStatusNode
|
|
9477
9458
|
] }),
|
|
9478
|
-
status ===
|
|
9479
|
-
status ===
|
|
9459
|
+
status === "connecting" /* CONNECTING */ && /* @__PURE__ */ (0, import_jsx_runtime48.jsx)(Text, { children: " (tools and prompts will appear when ready)" }),
|
|
9460
|
+
status === "disconnected" /* DISCONNECTED */ && toolCount > 0 && /* @__PURE__ */ (0, import_jsx_runtime48.jsxs)(Text, { children: [
|
|
9480
9461
|
" (",
|
|
9481
9462
|
toolCount,
|
|
9482
9463
|
" tools cached)"
|
|
@@ -10037,7 +10018,7 @@ var Notifications = () => {
|
|
|
10037
10018
|
if (dismissed) return [];
|
|
10038
10019
|
const counts = persistentState.get("startupWarningCounts") || {};
|
|
10039
10020
|
return startupWarnings.filter((w) => {
|
|
10040
|
-
if (w.priority ===
|
|
10021
|
+
if (w.priority === "low" /* Low */) {
|
|
10041
10022
|
const count = counts[w.id] || 0;
|
|
10042
10023
|
return count < MAX_STARTUP_WARNING_SHOW_COUNT;
|
|
10043
10024
|
}
|
|
@@ -10050,7 +10031,7 @@ var Notifications = () => {
|
|
|
10050
10031
|
const counts = { ...persistentState.get("startupWarningCounts") || {} };
|
|
10051
10032
|
let changed = false;
|
|
10052
10033
|
visibleWarnings.forEach((w) => {
|
|
10053
|
-
if (w.priority ===
|
|
10034
|
+
if (w.priority === "low" /* Low */) {
|
|
10054
10035
|
counts[w.id] = (counts[w.id] || 0) + 1;
|
|
10055
10036
|
changed = true;
|
|
10056
10037
|
}
|
|
@@ -10157,7 +10138,7 @@ var UserIdentity = ({ config }) => {
|
|
|
10157
10138
|
}
|
|
10158
10139
|
return /* @__PURE__ */ (0, import_jsx_runtime58.jsxs)(Box_default, { flexDirection: "column", children: [
|
|
10159
10140
|
/* @__PURE__ */ (0, import_jsx_runtime58.jsxs)(Box_default, { children: [
|
|
10160
|
-
/* @__PURE__ */ (0, import_jsx_runtime58.jsx)(Text, { color: theme.text.primary, wrap: "truncate-end", children: authType ===
|
|
10141
|
+
/* @__PURE__ */ (0, import_jsx_runtime58.jsx)(Text, { color: theme.text.primary, wrap: "truncate-end", children: authType === "oauth-personal" /* LOGIN_WITH_GOOGLE */ ? /* @__PURE__ */ (0, import_jsx_runtime58.jsxs)(Text, { children: [
|
|
10161
10142
|
/* @__PURE__ */ (0, import_jsx_runtime58.jsxs)(Text, { bold: true, children: [
|
|
10162
10143
|
"Signed in with Google",
|
|
10163
10144
|
email ? ":" : ""
|
|
@@ -10400,7 +10381,7 @@ var import_react32 = __toESM(require_react(), 1);
|
|
|
10400
10381
|
function getConfirmingToolState(pendingHistoryItems) {
|
|
10401
10382
|
const allPendingTools = getAllToolCalls(pendingHistoryItems);
|
|
10402
10383
|
const confirmingTools = allPendingTools.filter(
|
|
10403
|
-
(tool) => tool.status ===
|
|
10384
|
+
(tool) => tool.status === "awaiting_approval" /* AwaitingApproval */
|
|
10404
10385
|
);
|
|
10405
10386
|
if (confirmingTools.length === 0) {
|
|
10406
10387
|
return null;
|
|
@@ -11708,7 +11689,7 @@ var ExitPlanModeDialog = ({
|
|
|
11708
11689
|
{
|
|
11709
11690
|
questions: [
|
|
11710
11691
|
{
|
|
11711
|
-
type:
|
|
11692
|
+
type: "choice" /* CHOICE */,
|
|
11712
11693
|
header: "Approval",
|
|
11713
11694
|
question: planContent,
|
|
11714
11695
|
options: [
|
|
@@ -11729,9 +11710,9 @@ var ExitPlanModeDialog = ({
|
|
|
11729
11710
|
onSubmit: (answers) => {
|
|
11730
11711
|
const answer = answers["0"];
|
|
11731
11712
|
if (answer === "Yes, automatically accept edits" /* Auto */) {
|
|
11732
|
-
onApprove(
|
|
11713
|
+
onApprove("autoEdit" /* AUTO_EDIT */);
|
|
11733
11714
|
} else if (answer === "Yes, manually accept edits" /* Manual */) {
|
|
11734
|
-
onApprove(
|
|
11715
|
+
onApprove("default" /* DEFAULT */);
|
|
11735
11716
|
} else if (answer) {
|
|
11736
11717
|
onFeedback(answer);
|
|
11737
11718
|
}
|
|
@@ -11942,7 +11923,7 @@ ${deceptiveUrlWarnings.map(
|
|
|
11942
11923
|
);
|
|
11943
11924
|
(0, import_react37.useEffect)(() => {
|
|
11944
11925
|
if (isCancelling) {
|
|
11945
|
-
handleConfirm(
|
|
11926
|
+
handleConfirm("cancel" /* Cancel */);
|
|
11946
11927
|
}
|
|
11947
11928
|
}, [isCancelling, handleConfirm]);
|
|
11948
11929
|
const handleSelect = (0, import_react37.useCallback)(
|
|
@@ -11955,19 +11936,19 @@ ${deceptiveUrlWarnings.map(
|
|
|
11955
11936
|
if (!confirmationDetails.isModifying) {
|
|
11956
11937
|
options2.push({
|
|
11957
11938
|
label: "Allow once",
|
|
11958
|
-
value:
|
|
11939
|
+
value: "proceed_once" /* ProceedOnce */,
|
|
11959
11940
|
key: "Allow once"
|
|
11960
11941
|
});
|
|
11961
11942
|
if (isTrustedFolder) {
|
|
11962
11943
|
options2.push({
|
|
11963
11944
|
label: "Allow for this session",
|
|
11964
|
-
value:
|
|
11945
|
+
value: "proceed_always" /* ProceedAlways */,
|
|
11965
11946
|
key: "Allow for this session"
|
|
11966
11947
|
});
|
|
11967
11948
|
if (allowPermanentApproval) {
|
|
11968
11949
|
options2.push({
|
|
11969
11950
|
label: "Allow for this file in all future sessions",
|
|
11970
|
-
value:
|
|
11951
|
+
value: "proceed_always_and_save" /* ProceedAlwaysAndSave */,
|
|
11971
11952
|
key: "Allow for this file in all future sessions"
|
|
11972
11953
|
});
|
|
11973
11954
|
}
|
|
@@ -11975,119 +11956,119 @@ ${deceptiveUrlWarnings.map(
|
|
|
11975
11956
|
if (!config.getIdeMode() || !isDiffingEnabled) {
|
|
11976
11957
|
options2.push({
|
|
11977
11958
|
label: "Modify with external editor",
|
|
11978
|
-
value:
|
|
11959
|
+
value: "modify_with_editor" /* ModifyWithEditor */,
|
|
11979
11960
|
key: "Modify with external editor"
|
|
11980
11961
|
});
|
|
11981
11962
|
}
|
|
11982
11963
|
options2.push({
|
|
11983
11964
|
label: "No, suggest changes (esc)",
|
|
11984
|
-
value:
|
|
11965
|
+
value: "cancel" /* Cancel */,
|
|
11985
11966
|
key: "No, suggest changes (esc)"
|
|
11986
11967
|
});
|
|
11987
11968
|
}
|
|
11988
11969
|
} else if (confirmationDetails.type === "sandbox_expansion") {
|
|
11989
11970
|
options2.push({
|
|
11990
11971
|
label: "Allow once",
|
|
11991
|
-
value:
|
|
11972
|
+
value: "proceed_once" /* ProceedOnce */,
|
|
11992
11973
|
key: "Allow once"
|
|
11993
11974
|
});
|
|
11994
11975
|
if (isTrustedFolder) {
|
|
11995
11976
|
options2.push({
|
|
11996
11977
|
label: "Allow for this session",
|
|
11997
|
-
value:
|
|
11978
|
+
value: "proceed_always" /* ProceedAlways */,
|
|
11998
11979
|
key: "Allow for this session"
|
|
11999
11980
|
});
|
|
12000
11981
|
if (allowPermanentApproval) {
|
|
12001
11982
|
options2.push({
|
|
12002
11983
|
label: "Allow for all future sessions",
|
|
12003
|
-
value:
|
|
11984
|
+
value: "proceed_always_and_save" /* ProceedAlwaysAndSave */,
|
|
12004
11985
|
key: "Allow for all future sessions"
|
|
12005
11986
|
});
|
|
12006
11987
|
}
|
|
12007
11988
|
}
|
|
12008
11989
|
options2.push({
|
|
12009
11990
|
label: "No, suggest changes (esc)",
|
|
12010
|
-
value:
|
|
11991
|
+
value: "cancel" /* Cancel */,
|
|
12011
11992
|
key: "No, suggest changes (esc)"
|
|
12012
11993
|
});
|
|
12013
11994
|
} else if (confirmationDetails.type === "exec") {
|
|
12014
11995
|
options2.push({
|
|
12015
11996
|
label: "Allow once",
|
|
12016
|
-
value:
|
|
11997
|
+
value: "proceed_once" /* ProceedOnce */,
|
|
12017
11998
|
key: "Allow once"
|
|
12018
11999
|
});
|
|
12019
12000
|
if (isTrustedFolder) {
|
|
12020
12001
|
options2.push({
|
|
12021
12002
|
label: `Allow for this session`,
|
|
12022
|
-
value:
|
|
12003
|
+
value: "proceed_always" /* ProceedAlways */,
|
|
12023
12004
|
key: `Allow for this session`
|
|
12024
12005
|
});
|
|
12025
12006
|
if (allowPermanentApproval) {
|
|
12026
12007
|
options2.push({
|
|
12027
12008
|
label: `Allow this command for all future sessions`,
|
|
12028
|
-
value:
|
|
12009
|
+
value: "proceed_always_and_save" /* ProceedAlwaysAndSave */,
|
|
12029
12010
|
key: `Allow for all future sessions`
|
|
12030
12011
|
});
|
|
12031
12012
|
}
|
|
12032
12013
|
}
|
|
12033
12014
|
options2.push({
|
|
12034
12015
|
label: "No, suggest changes (esc)",
|
|
12035
|
-
value:
|
|
12016
|
+
value: "cancel" /* Cancel */,
|
|
12036
12017
|
key: "No, suggest changes (esc)"
|
|
12037
12018
|
});
|
|
12038
12019
|
} else if (confirmationDetails.type === "info") {
|
|
12039
12020
|
options2.push({
|
|
12040
12021
|
label: "Allow once",
|
|
12041
|
-
value:
|
|
12022
|
+
value: "proceed_once" /* ProceedOnce */,
|
|
12042
12023
|
key: "Allow once"
|
|
12043
12024
|
});
|
|
12044
12025
|
if (isTrustedFolder) {
|
|
12045
12026
|
options2.push({
|
|
12046
12027
|
label: "Allow for this session",
|
|
12047
|
-
value:
|
|
12028
|
+
value: "proceed_always" /* ProceedAlways */,
|
|
12048
12029
|
key: "Allow for this session"
|
|
12049
12030
|
});
|
|
12050
12031
|
if (allowPermanentApproval) {
|
|
12051
12032
|
options2.push({
|
|
12052
12033
|
label: "Allow for all future sessions",
|
|
12053
|
-
value:
|
|
12034
|
+
value: "proceed_always_and_save" /* ProceedAlwaysAndSave */,
|
|
12054
12035
|
key: "Allow for all future sessions"
|
|
12055
12036
|
});
|
|
12056
12037
|
}
|
|
12057
12038
|
}
|
|
12058
12039
|
options2.push({
|
|
12059
12040
|
label: "No, suggest changes (esc)",
|
|
12060
|
-
value:
|
|
12041
|
+
value: "cancel" /* Cancel */,
|
|
12061
12042
|
key: "No, suggest changes (esc)"
|
|
12062
12043
|
});
|
|
12063
12044
|
} else if (confirmationDetails.type === "mcp") {
|
|
12064
12045
|
options2.push({
|
|
12065
12046
|
label: "Allow once",
|
|
12066
|
-
value:
|
|
12047
|
+
value: "proceed_once" /* ProceedOnce */,
|
|
12067
12048
|
key: "Allow once"
|
|
12068
12049
|
});
|
|
12069
12050
|
if (isTrustedFolder) {
|
|
12070
12051
|
options2.push({
|
|
12071
12052
|
label: "Allow tool for this session",
|
|
12072
|
-
value:
|
|
12053
|
+
value: "proceed_always_tool" /* ProceedAlwaysTool */,
|
|
12073
12054
|
key: "Allow tool for this session"
|
|
12074
12055
|
});
|
|
12075
12056
|
options2.push({
|
|
12076
12057
|
label: "Allow all server tools for this session",
|
|
12077
|
-
value:
|
|
12058
|
+
value: "proceed_always_server" /* ProceedAlwaysServer */,
|
|
12078
12059
|
key: "Allow all server tools for this session"
|
|
12079
12060
|
});
|
|
12080
12061
|
if (allowPermanentApproval) {
|
|
12081
12062
|
options2.push({
|
|
12082
12063
|
label: "Allow tool for all future sessions",
|
|
12083
|
-
value:
|
|
12064
|
+
value: "proceed_always_and_save" /* ProceedAlwaysAndSave */,
|
|
12084
12065
|
key: "Allow tool for all future sessions"
|
|
12085
12066
|
});
|
|
12086
12067
|
}
|
|
12087
12068
|
}
|
|
12088
12069
|
options2.push({
|
|
12089
12070
|
label: "No, suggest changes (esc)",
|
|
12090
|
-
value:
|
|
12071
|
+
value: "cancel" /* Cancel */,
|
|
12091
12072
|
key: "No, suggest changes (esc)"
|
|
12092
12073
|
});
|
|
12093
12074
|
}
|
|
@@ -12126,7 +12107,7 @@ ${deceptiveUrlWarnings.map(
|
|
|
12126
12107
|
const containsRedirection = commandsToDisplay.some(
|
|
12127
12108
|
(cmd) => hasRedirection(cmd)
|
|
12128
12109
|
);
|
|
12129
|
-
const isAutoEdit = config.getApprovalMode() ===
|
|
12110
|
+
const isAutoEdit = config.getApprovalMode() === "yolo" /* YOLO */ || config.getApprovalMode() === "autoEdit" /* AUTO_EDIT */;
|
|
12130
12111
|
if (containsRedirection && !isAutoEdit) {
|
|
12131
12112
|
extraInfoLines = 1;
|
|
12132
12113
|
}
|
|
@@ -12152,7 +12133,7 @@ ${deceptiveUrlWarnings.map(
|
|
|
12152
12133
|
const isSafeToPersist = confirmationDetails.type === "info" || confirmationDetails.type === "edit" || confirmationDetails.type === "mcp";
|
|
12153
12134
|
if (isSafeToPersist && settings.merged.security.autoAddToPolicyByDefault) {
|
|
12154
12135
|
const alwaysAndSaveIndex = options2.findIndex(
|
|
12155
|
-
(o) => o.value ===
|
|
12136
|
+
(o) => o.value === "proceed_always_and_save" /* ProceedAlwaysAndSave */
|
|
12156
12137
|
);
|
|
12157
12138
|
if (alwaysAndSaveIndex !== -1) {
|
|
12158
12139
|
initialIndex2 = alwaysAndSaveIndex;
|
|
@@ -12169,10 +12150,10 @@ ${deceptiveUrlWarnings.map(
|
|
|
12169
12150
|
{
|
|
12170
12151
|
questions: confirmationDetails.questions,
|
|
12171
12152
|
onSubmit: (answers) => {
|
|
12172
|
-
handleConfirm(
|
|
12153
|
+
handleConfirm("proceed_once" /* ProceedOnce */, { answers });
|
|
12173
12154
|
},
|
|
12174
12155
|
onCancel: () => {
|
|
12175
|
-
handleConfirm(
|
|
12156
|
+
handleConfirm("cancel" /* Cancel */);
|
|
12176
12157
|
},
|
|
12177
12158
|
width: terminalWidth,
|
|
12178
12159
|
availableHeight: bodyHeight
|
|
@@ -12193,19 +12174,19 @@ ${deceptiveUrlWarnings.map(
|
|
|
12193
12174
|
planPath: confirmationDetails.planPath,
|
|
12194
12175
|
getPreferredEditor,
|
|
12195
12176
|
onApprove: (approvalMode) => {
|
|
12196
|
-
handleConfirm(
|
|
12177
|
+
handleConfirm("proceed_once" /* ProceedOnce */, {
|
|
12197
12178
|
approved: true,
|
|
12198
12179
|
approvalMode
|
|
12199
12180
|
});
|
|
12200
12181
|
},
|
|
12201
12182
|
onFeedback: (feedback) => {
|
|
12202
|
-
handleConfirm(
|
|
12183
|
+
handleConfirm("proceed_once" /* ProceedOnce */, {
|
|
12203
12184
|
approved: false,
|
|
12204
12185
|
feedback
|
|
12205
12186
|
});
|
|
12206
12187
|
},
|
|
12207
12188
|
onCancel: () => {
|
|
12208
|
-
handleConfirm(
|
|
12189
|
+
handleConfirm("cancel" /* Cancel */);
|
|
12209
12190
|
},
|
|
12210
12191
|
width: terminalWidth,
|
|
12211
12192
|
availableHeight: bodyHeight
|
|
@@ -12314,7 +12295,7 @@ ${deceptiveUrlWarnings.map(
|
|
|
12314
12295
|
const containsRedirection = commandsToDisplay.some(
|
|
12315
12296
|
(cmd) => hasRedirection(cmd)
|
|
12316
12297
|
);
|
|
12317
|
-
const isAutoEdit = config.getApprovalMode() ===
|
|
12298
|
+
const isAutoEdit = config.getApprovalMode() === "yolo" /* YOLO */ || config.getApprovalMode() === "autoEdit" /* AUTO_EDIT */;
|
|
12318
12299
|
let warnings = null;
|
|
12319
12300
|
if (containsRedirection && !isAutoEdit) {
|
|
12320
12301
|
const tipText = `To auto-accept, press ${formatCommand("app.cycleApprovalMode" /* CYCLE_APPROVAL_MODE */)}`;
|
|
@@ -12473,7 +12454,7 @@ ${deceptiveUrlWarnings.map(
|
|
|
12473
12454
|
const bodyOverflowDirection = confirmationDetails.type === "mcp" && isMcpToolDetailsExpanded ? "bottom" : "top";
|
|
12474
12455
|
const renderRadioItem = (0, import_react37.useCallback)(
|
|
12475
12456
|
(item, { titleColor }) => {
|
|
12476
|
-
if (item.value ===
|
|
12457
|
+
if (item.value === "proceed_always_and_save" /* ProceedAlwaysAndSave */) {
|
|
12477
12458
|
return /* @__PURE__ */ (0, import_jsx_runtime65.jsxs)(Text, { color: titleColor, wrap: "truncate", children: [
|
|
12478
12459
|
item.label,
|
|
12479
12460
|
" ",
|
|
@@ -14503,7 +14484,7 @@ async function validateAuthMethodWithSettings(authType, settings) {
|
|
|
14503
14484
|
if (settings.merged.security.auth.useExternal) {
|
|
14504
14485
|
return null;
|
|
14505
14486
|
}
|
|
14506
|
-
if (authType ===
|
|
14487
|
+
if (authType === "gemini-api-key" /* USE_GEMINI */) {
|
|
14507
14488
|
return null;
|
|
14508
14489
|
}
|
|
14509
14490
|
return validateAuthMethod(authType);
|
|
@@ -14555,7 +14536,7 @@ var useAuthCommand = (settings, config, initialAuthError = null, initialAccountS
|
|
|
14555
14536
|
}
|
|
14556
14537
|
return;
|
|
14557
14538
|
}
|
|
14558
|
-
if (authType ===
|
|
14539
|
+
if (authType === "gemini-api-key" /* USE_GEMINI */) {
|
|
14559
14540
|
const key = await reloadApiKey();
|
|
14560
14541
|
if (!key) {
|
|
14561
14542
|
setAuthState("awaiting_api_key_input" /* AwaitingApiKeyInput */);
|
|
@@ -14633,31 +14614,31 @@ function AuthDialog({
|
|
|
14633
14614
|
let items = [
|
|
14634
14615
|
{
|
|
14635
14616
|
label: "Sign in with Google",
|
|
14636
|
-
value:
|
|
14637
|
-
key:
|
|
14617
|
+
value: "oauth-personal" /* LOGIN_WITH_GOOGLE */,
|
|
14618
|
+
key: "oauth-personal" /* LOGIN_WITH_GOOGLE */
|
|
14638
14619
|
},
|
|
14639
14620
|
...process.env["CLOUD_SHELL"] === "true" ? [
|
|
14640
14621
|
{
|
|
14641
14622
|
label: "Use Cloud Shell user credentials",
|
|
14642
|
-
value:
|
|
14643
|
-
key:
|
|
14623
|
+
value: "compute-default-credentials" /* COMPUTE_ADC */,
|
|
14624
|
+
key: "compute-default-credentials" /* COMPUTE_ADC */
|
|
14644
14625
|
}
|
|
14645
14626
|
] : process.env["GEMINI_CLI_USE_COMPUTE_ADC"] === "true" ? [
|
|
14646
14627
|
{
|
|
14647
14628
|
label: "Use metadata server application default credentials",
|
|
14648
|
-
value:
|
|
14649
|
-
key:
|
|
14629
|
+
value: "compute-default-credentials" /* COMPUTE_ADC */,
|
|
14630
|
+
key: "compute-default-credentials" /* COMPUTE_ADC */
|
|
14650
14631
|
}
|
|
14651
14632
|
] : [],
|
|
14652
14633
|
{
|
|
14653
14634
|
label: "Use Gemini API Key",
|
|
14654
|
-
value:
|
|
14655
|
-
key:
|
|
14635
|
+
value: "gemini-api-key" /* USE_GEMINI */,
|
|
14636
|
+
key: "gemini-api-key" /* USE_GEMINI */
|
|
14656
14637
|
},
|
|
14657
14638
|
{
|
|
14658
14639
|
label: "Vertex AI",
|
|
14659
|
-
value:
|
|
14660
|
-
key:
|
|
14640
|
+
value: "vertex-ai" /* USE_VERTEX_AI */,
|
|
14641
|
+
key: "vertex-ai" /* USE_VERTEX_AI */
|
|
14661
14642
|
}
|
|
14662
14643
|
];
|
|
14663
14644
|
if (settings.merged.security.auth.enforcedType) {
|
|
@@ -14679,9 +14660,9 @@ function AuthDialog({
|
|
|
14679
14660
|
return item.value === defaultAuthType;
|
|
14680
14661
|
}
|
|
14681
14662
|
if (process.env["GEMINI_API_KEY"]) {
|
|
14682
|
-
return item.value ===
|
|
14663
|
+
return item.value === "gemini-api-key" /* USE_GEMINI */;
|
|
14683
14664
|
}
|
|
14684
|
-
return item.value ===
|
|
14665
|
+
return item.value === "oauth-personal" /* LOGIN_WITH_GOOGLE */;
|
|
14685
14666
|
});
|
|
14686
14667
|
if (settings.merged.security.auth.enforcedType) {
|
|
14687
14668
|
initialAuthIndex = 0;
|
|
@@ -14692,7 +14673,7 @@ function AuthDialog({
|
|
|
14692
14673
|
return;
|
|
14693
14674
|
}
|
|
14694
14675
|
if (authType) {
|
|
14695
|
-
const needsRestart = authType ===
|
|
14676
|
+
const needsRestart = authType === "oauth-personal" /* LOGIN_WITH_GOOGLE */ || authType === "vertex-ai" /* USE_VERTEX_AI */ && process.env["CLOUD_SHELL"] === "true";
|
|
14696
14677
|
if (needsRestart) {
|
|
14697
14678
|
setAuthContext({ requiresRestart: true });
|
|
14698
14679
|
} else {
|
|
@@ -14700,12 +14681,12 @@ function AuthDialog({
|
|
|
14700
14681
|
}
|
|
14701
14682
|
await clearCachedCredentialFile();
|
|
14702
14683
|
settings.setValue(scope, "security.auth.selectedType", authType);
|
|
14703
|
-
if (authType ===
|
|
14684
|
+
if (authType === "oauth-personal" /* LOGIN_WITH_GOOGLE */ && config.isBrowserLaunchSuppressed()) {
|
|
14704
14685
|
setExiting(true);
|
|
14705
14686
|
setTimeout(relaunchApp, 100);
|
|
14706
14687
|
return;
|
|
14707
14688
|
}
|
|
14708
|
-
if (authType ===
|
|
14689
|
+
if (authType === "gemini-api-key" /* USE_GEMINI */) {
|
|
14709
14690
|
setAuthState("awaiting_api_key_input" /* AwaitingApiKeyInput */);
|
|
14710
14691
|
return;
|
|
14711
14692
|
}
|
|
@@ -15461,11 +15442,11 @@ var PrivacyNoticeText = ({
|
|
|
15461
15442
|
}) => {
|
|
15462
15443
|
const authType = config.getContentGeneratorConfig()?.authType;
|
|
15463
15444
|
switch (authType) {
|
|
15464
|
-
case
|
|
15445
|
+
case "gemini-api-key" /* USE_GEMINI */:
|
|
15465
15446
|
return /* @__PURE__ */ (0, import_jsx_runtime83.jsx)(GeminiPrivacyNotice, { onExit });
|
|
15466
|
-
case
|
|
15447
|
+
case "vertex-ai" /* USE_VERTEX_AI */:
|
|
15467
15448
|
return /* @__PURE__ */ (0, import_jsx_runtime83.jsx)(CloudPaidPrivacyNotice, { onExit });
|
|
15468
|
-
case
|
|
15449
|
+
case "oauth-personal" /* LOGIN_WITH_GOOGLE */:
|
|
15469
15450
|
default:
|
|
15470
15451
|
return /* @__PURE__ */ (0, import_jsx_runtime83.jsx)(CloudFreePrivacyNotice, { config, onExit });
|
|
15471
15452
|
}
|
|
@@ -15506,7 +15487,7 @@ function ProQuotaDialog({
|
|
|
15506
15487
|
value: "retry_always",
|
|
15507
15488
|
key: "retry_always"
|
|
15508
15489
|
},
|
|
15509
|
-
...authType ===
|
|
15490
|
+
...authType === "oauth-personal" /* LOGIN_WITH_GOOGLE */ && !isUltra ? [
|
|
15510
15491
|
{
|
|
15511
15492
|
label: "Upgrade for higher limits",
|
|
15512
15493
|
value: "upgrade",
|
|
@@ -16665,7 +16646,7 @@ function ModelDialog({ onClose }) {
|
|
|
16665
16646
|
const useGemini31 = config?.getGemini31LaunchedSync?.() ?? false;
|
|
16666
16647
|
const useGemini3_5Flash = config?.hasGemini35FlashGAAccess?.() ?? false;
|
|
16667
16648
|
const selectedAuthType = settings.merged.security.auth.selectedType;
|
|
16668
|
-
const useCustomToolModel = useGemini31 && selectedAuthType ===
|
|
16649
|
+
const useCustomToolModel = useGemini31 && selectedAuthType === "gemini-api-key" /* USE_GEMINI */;
|
|
16669
16650
|
const manualModelSelected = (0, import_react55.useMemo)(() => {
|
|
16670
16651
|
if (config?.getExperimentalDynamicModelConfiguration?.() === true && config.getModelConfigService) {
|
|
16671
16652
|
const def = config.getModelConfigService().getModelDefinition(preferredModel);
|
|
@@ -17988,10 +17969,10 @@ function initializeConsoleStore() {
|
|
|
17988
17969
|
globalConsoleMessages = [];
|
|
17989
17970
|
globalErrorCount = 0;
|
|
17990
17971
|
notifyListeners();
|
|
17991
|
-
coreEvents.off(
|
|
17992
|
-
coreEvents.off(
|
|
17993
|
-
coreEvents.on(
|
|
17994
|
-
coreEvents.on(
|
|
17972
|
+
coreEvents.off("console-log" /* ConsoleLog */, handleConsoleLog);
|
|
17973
|
+
coreEvents.off("output" /* Output */, handleOutput);
|
|
17974
|
+
coreEvents.on("console-log" /* ConsoleLog */, handleConsoleLog);
|
|
17975
|
+
coreEvents.on("output" /* Output */, handleOutput);
|
|
17995
17976
|
}
|
|
17996
17977
|
function notifyListeners() {
|
|
17997
17978
|
for (const listener of listeners) {
|
|
@@ -20128,7 +20109,7 @@ function usePromptCompletion({
|
|
|
20128
20109
|
{ model: "prompt-completion" },
|
|
20129
20110
|
contents,
|
|
20130
20111
|
signal,
|
|
20131
|
-
|
|
20112
|
+
"utility_autocomplete" /* UTILITY_AUTOCOMPLETE */
|
|
20132
20113
|
);
|
|
20133
20114
|
if (signal.aborted) {
|
|
20134
20115
|
return;
|
|
@@ -22206,9 +22187,9 @@ var InputPrompt = ({
|
|
|
22206
22187
|
onSuggestionsVisibilityChange(shouldShowSuggestions);
|
|
22207
22188
|
}
|
|
22208
22189
|
}, [shouldShowSuggestions, onSuggestionsVisibilityChange]);
|
|
22209
|
-
const showAutoAcceptStyling = !shellModeActive && approvalMode ===
|
|
22210
|
-
const showYoloStyling = !shellModeActive && approvalMode ===
|
|
22211
|
-
const showPlanStyling = !shellModeActive && approvalMode ===
|
|
22190
|
+
const showAutoAcceptStyling = !shellModeActive && approvalMode === "autoEdit" /* AUTO_EDIT */;
|
|
22191
|
+
const showYoloStyling = !shellModeActive && approvalMode === "yolo" /* YOLO */;
|
|
22192
|
+
const showPlanStyling = !shellModeActive && approvalMode === "plan" /* PLAN */;
|
|
22212
22193
|
let statusColor;
|
|
22213
22194
|
let statusText = "";
|
|
22214
22195
|
if (shellModeActive) {
|
|
@@ -23041,22 +23022,22 @@ var ApprovalModeIndicator = ({
|
|
|
23041
23022
|
const cycleHint = formatCommand("app.cycleApprovalMode" /* CYCLE_APPROVAL_MODE */);
|
|
23042
23023
|
const yoloHint = formatCommand("app.toggleYolo" /* TOGGLE_YOLO */);
|
|
23043
23024
|
switch (approvalMode) {
|
|
23044
|
-
case
|
|
23025
|
+
case "autoEdit" /* AUTO_EDIT */:
|
|
23045
23026
|
textColor = theme.status.warning;
|
|
23046
23027
|
textContent = "auto-accept edits";
|
|
23047
23028
|
subText = allowPlanMode ? `${cycleHint} to plan` : `${cycleHint} to manual`;
|
|
23048
23029
|
break;
|
|
23049
|
-
case
|
|
23030
|
+
case "plan" /* PLAN */:
|
|
23050
23031
|
textColor = theme.status.success;
|
|
23051
23032
|
textContent = "plan";
|
|
23052
23033
|
subText = `${cycleHint} to manual`;
|
|
23053
23034
|
break;
|
|
23054
|
-
case
|
|
23035
|
+
case "yolo" /* YOLO */:
|
|
23055
23036
|
textColor = theme.status.error;
|
|
23056
23037
|
textContent = "YOLO";
|
|
23057
23038
|
subText = yoloHint;
|
|
23058
23039
|
break;
|
|
23059
|
-
case
|
|
23040
|
+
case "default" /* DEFAULT */:
|
|
23060
23041
|
default:
|
|
23061
23042
|
textColor = theme.text.accent;
|
|
23062
23043
|
textContent = "";
|
|
@@ -23104,7 +23085,7 @@ var useComposerStatus = () => {
|
|
|
23104
23085
|
(item) => item.type === "tool_group"
|
|
23105
23086
|
).some(
|
|
23106
23087
|
(item) => item.tools.some(
|
|
23107
|
-
(tool) => tool.status ===
|
|
23088
|
+
(tool) => tool.status === "awaiting_approval" /* AwaitingApproval */
|
|
23108
23089
|
)
|
|
23109
23090
|
),
|
|
23110
23091
|
[uiState.pendingHistoryItems]
|
|
@@ -23119,13 +23100,13 @@ var useComposerStatus = () => {
|
|
|
23119
23100
|
const hideMinimalModeHintWhileBusy = !uiState.cleanUiDetailsVisible && (showLoadingIndicator || uiState.activeHooks.length > 0);
|
|
23120
23101
|
if (hideMinimalModeHintWhileBusy) return null;
|
|
23121
23102
|
switch (showApprovalModeIndicator) {
|
|
23122
|
-
case
|
|
23103
|
+
case "yolo" /* YOLO */:
|
|
23123
23104
|
return { text: "YOLO", color: theme.status.error };
|
|
23124
|
-
case
|
|
23105
|
+
case "plan" /* PLAN */:
|
|
23125
23106
|
return { text: "plan", color: theme.status.success };
|
|
23126
|
-
case
|
|
23107
|
+
case "autoEdit" /* AUTO_EDIT */:
|
|
23127
23108
|
return { text: "auto edit", color: theme.status.warning };
|
|
23128
|
-
case
|
|
23109
|
+
case "default" /* DEFAULT */:
|
|
23129
23110
|
default:
|
|
23130
23111
|
return null;
|
|
23131
23112
|
}
|
|
@@ -23479,7 +23460,7 @@ var ConfigInitDisplay = ({
|
|
|
23479
23460
|
let connected = 0;
|
|
23480
23461
|
const connecting = [];
|
|
23481
23462
|
for (const [name, client] of clients.entries()) {
|
|
23482
|
-
if (client.getStatus() ===
|
|
23463
|
+
if (client.getStatus() === "connected" /* CONNECTED */) {
|
|
23483
23464
|
connected++;
|
|
23484
23465
|
} else {
|
|
23485
23466
|
connecting.push(name);
|
|
@@ -23501,9 +23482,9 @@ var ConfigInitDisplay = ({
|
|
|
23501
23482
|
);
|
|
23502
23483
|
}
|
|
23503
23484
|
};
|
|
23504
|
-
coreEvents.on(
|
|
23485
|
+
coreEvents.on("mcp-client-update" /* McpClientUpdate */, onChange);
|
|
23505
23486
|
return () => {
|
|
23506
|
-
coreEvents.off(
|
|
23487
|
+
coreEvents.off("mcp-client-update" /* McpClientUpdate */, onChange);
|
|
23507
23488
|
};
|
|
23508
23489
|
}, [initialMessage]);
|
|
23509
23490
|
return /* @__PURE__ */ (0, import_jsx_runtime123.jsx)(Box_default, { marginTop: 1, children: /* @__PURE__ */ (0, import_jsx_runtime123.jsxs)(Text, { children: [
|
|
@@ -24220,7 +24201,7 @@ var useExecutionLifecycle = (addItemToHistory, setPendingHistoryItem, onExec, on
|
|
|
24220
24201
|
callId,
|
|
24221
24202
|
name: SHELL_COMMAND_NAME,
|
|
24222
24203
|
description: rawQuery,
|
|
24223
|
-
status:
|
|
24204
|
+
status: "executing" /* Executing */,
|
|
24224
24205
|
isClientInitiated: true,
|
|
24225
24206
|
resultDisplay: "",
|
|
24226
24207
|
confirmationDetails: void 0
|
|
@@ -24361,7 +24342,7 @@ __code=$?; pwd > ${escapedPwdFilePath}; exit $__code`;
|
|
|
24361
24342
|
mainContent = result.output.trim() || "(Command produced no output)";
|
|
24362
24343
|
}
|
|
24363
24344
|
let finalOutput = result.ansiOutput && result.ansiOutput.length > 0 ? result.ansiOutput : mainContent;
|
|
24364
|
-
let finalStatus =
|
|
24345
|
+
let finalStatus = "success" /* Success */;
|
|
24365
24346
|
const prependToAnsiOutput = (output, text) => {
|
|
24366
24347
|
const newLines = text.split("\n").map((line) => [
|
|
24367
24348
|
{
|
|
@@ -24380,20 +24361,20 @@ __code=$?; pwd > ${escapedPwdFilePath}; exit $__code`;
|
|
|
24380
24361
|
};
|
|
24381
24362
|
let prefix = "";
|
|
24382
24363
|
if (result.error) {
|
|
24383
|
-
finalStatus =
|
|
24364
|
+
finalStatus = "error" /* Error */;
|
|
24384
24365
|
prefix = result.error.message;
|
|
24385
24366
|
} else if (result.aborted) {
|
|
24386
|
-
finalStatus =
|
|
24367
|
+
finalStatus = "cancelled" /* Cancelled */;
|
|
24387
24368
|
prefix = "Command was cancelled.";
|
|
24388
24369
|
} else if (result.backgrounded) {
|
|
24389
|
-
finalStatus =
|
|
24370
|
+
finalStatus = "success" /* Success */;
|
|
24390
24371
|
finalOutput = `Command moved to background (PID: ${result.pid}). Output hidden. Press Ctrl+B to view.`;
|
|
24391
24372
|
mainContent = finalOutput;
|
|
24392
24373
|
} else if (result.signal) {
|
|
24393
|
-
finalStatus =
|
|
24374
|
+
finalStatus = "error" /* Error */;
|
|
24394
24375
|
prefix = `Command terminated by signal: ${result.signal}.`;
|
|
24395
24376
|
} else if (result.exitCode !== 0) {
|
|
24396
|
-
finalStatus =
|
|
24377
|
+
finalStatus = "error" /* Error */;
|
|
24397
24378
|
prefix = `Command exited with code ${result.exitCode}.`;
|
|
24398
24379
|
}
|
|
24399
24380
|
if (prefix) {
|
|
@@ -24419,7 +24400,7 @@ ${mainContent}`;
|
|
|
24419
24400
|
status: finalStatus,
|
|
24420
24401
|
resultDisplay: finalOutput
|
|
24421
24402
|
};
|
|
24422
|
-
if (finalStatus !==
|
|
24403
|
+
if (finalStatus !== "cancelled" /* Cancelled */) {
|
|
24423
24404
|
addItemToHistory(
|
|
24424
24405
|
{
|
|
24425
24406
|
type: "tool_group",
|
|
@@ -25409,7 +25390,7 @@ function useQuotaAndFallback({
|
|
|
25409
25390
|
error.retryDelayMs ? `Access resets at ${getResetTimeMessage(error.retryDelayMs)}.` : null,
|
|
25410
25391
|
`/stats model for usage details`,
|
|
25411
25392
|
`/model to switch models.`,
|
|
25412
|
-
contentGeneratorConfig?.authType ===
|
|
25393
|
+
contentGeneratorConfig?.authType === "oauth-personal" /* LOGIN_WITH_GOOGLE */ ? `/auth to switch to API key.` : null
|
|
25413
25394
|
].filter(Boolean);
|
|
25414
25395
|
message = messageLines.join("\n");
|
|
25415
25396
|
} else if (error instanceof ModelNotFoundError) {
|
|
@@ -25597,7 +25578,7 @@ var useEditorSettings = (loadedSettings, setEditorError, addItem) => {
|
|
|
25597
25578
|
);
|
|
25598
25579
|
setEditorError(null);
|
|
25599
25580
|
setIsEditorDialogOpen(false);
|
|
25600
|
-
coreEvents.emit(
|
|
25581
|
+
coreEvents.emit("editor-selected" /* EditorSelected */, { editor: editorType });
|
|
25601
25582
|
} catch (error) {
|
|
25602
25583
|
setEditorError(`Failed to set editor preference: ${error}`);
|
|
25603
25584
|
}
|
|
@@ -25606,7 +25587,7 @@ var useEditorSettings = (loadedSettings, setEditorError, addItem) => {
|
|
|
25606
25587
|
);
|
|
25607
25588
|
const exitEditorDialog = (0, import_react91.useCallback)(() => {
|
|
25608
25589
|
setIsEditorDialogOpen(false);
|
|
25609
|
-
coreEvents.emit(
|
|
25590
|
+
coreEvents.emit("editor-selected" /* EditorSelected */, { editor: void 0 });
|
|
25610
25591
|
}, []);
|
|
25611
25592
|
return {
|
|
25612
25593
|
isEditorDialogOpen,
|
|
@@ -25983,7 +25964,7 @@ var useSlashCommandProcessor = (config, settings, addItem, clearItems, loadHisto
|
|
|
25983
25964
|
canonicalPath: resolvedCommandPath
|
|
25984
25965
|
} = parseSlashCommand(trimmed, commands);
|
|
25985
25966
|
if (!commandToExecute) {
|
|
25986
|
-
const isMcpLoading = config?.getMcpClientManager()?.getDiscoveryState() ===
|
|
25967
|
+
const isMcpLoading = config?.getMcpClientManager()?.getDiscoveryState() === "in_progress" /* IN_PROGRESS */;
|
|
25987
25968
|
if (isMcpLoading) {
|
|
25988
25969
|
setIsProcessing(true);
|
|
25989
25970
|
if (addToHistory) {
|
|
@@ -26163,7 +26144,7 @@ var useSlashCommandProcessor = (config, settings, addItem, clearItems, loadHisto
|
|
|
26163
26144
|
onConfirm: async (resolvedOutcome) => {
|
|
26164
26145
|
resolve3({
|
|
26165
26146
|
outcome: resolvedOutcome,
|
|
26166
|
-
approvedCommands: resolvedOutcome ===
|
|
26147
|
+
approvedCommands: resolvedOutcome === "cancel" /* Cancel */ ? [] : result.commandsToConfirm
|
|
26167
26148
|
});
|
|
26168
26149
|
}
|
|
26169
26150
|
};
|
|
@@ -26171,7 +26152,7 @@ var useSlashCommandProcessor = (config, settings, addItem, clearItems, loadHisto
|
|
|
26171
26152
|
callId,
|
|
26172
26153
|
name: "Expansion",
|
|
26173
26154
|
description: "Command expansion needs shell access",
|
|
26174
|
-
status:
|
|
26155
|
+
status: "awaiting_approval" /* AwaitingApproval */,
|
|
26175
26156
|
isClientInitiated: true,
|
|
26176
26157
|
resultDisplay: void 0,
|
|
26177
26158
|
confirmationDetails
|
|
@@ -26182,7 +26163,7 @@ var useSlashCommandProcessor = (config, settings, addItem, clearItems, loadHisto
|
|
|
26182
26163
|
});
|
|
26183
26164
|
});
|
|
26184
26165
|
setPendingItem(null);
|
|
26185
|
-
if (outcome ===
|
|
26166
|
+
if (outcome === "cancel" /* Cancel */ || !approvedCommands || approvedCommands.length === 0) {
|
|
26186
26167
|
addItem(
|
|
26187
26168
|
{
|
|
26188
26169
|
type: "info" /* INFO */,
|
|
@@ -26192,7 +26173,7 @@ var useSlashCommandProcessor = (config, settings, addItem, clearItems, loadHisto
|
|
|
26192
26173
|
);
|
|
26193
26174
|
return { type: "handled" };
|
|
26194
26175
|
}
|
|
26195
|
-
if (outcome ===
|
|
26176
|
+
if (outcome === "proceed_always" /* ProceedAlways */) {
|
|
26196
26177
|
setSessionShellAllowlist(
|
|
26197
26178
|
(prev) => /* @__PURE__ */ new Set([...prev, ...approvedCommands])
|
|
26198
26179
|
);
|
|
@@ -26668,7 +26649,7 @@ function mapToDisplay(toolOrTools, options = {}) {
|
|
|
26668
26649
|
let description;
|
|
26669
26650
|
let renderOutputAsMarkdown = false;
|
|
26670
26651
|
const displayName = call.tool?.displayName ?? call.request.name;
|
|
26671
|
-
if (call.status ===
|
|
26652
|
+
if (call.status === "error" /* Error */) {
|
|
26672
26653
|
description = JSON.stringify(call.request.args);
|
|
26673
26654
|
} else {
|
|
26674
26655
|
description = call.invocation.getDescription();
|
|
@@ -26691,27 +26672,27 @@ function mapToDisplay(toolOrTools, options = {}) {
|
|
|
26691
26672
|
let progress = void 0;
|
|
26692
26673
|
let progressTotal = void 0;
|
|
26693
26674
|
switch (call.status) {
|
|
26694
|
-
case
|
|
26675
|
+
case "success" /* Success */:
|
|
26695
26676
|
resultDisplay = call.response.resultDisplay;
|
|
26696
26677
|
outputFile = call.response.outputFile;
|
|
26697
26678
|
break;
|
|
26698
|
-
case
|
|
26699
|
-
case
|
|
26679
|
+
case "error" /* Error */:
|
|
26680
|
+
case "cancelled" /* Cancelled */:
|
|
26700
26681
|
resultDisplay = call.response.resultDisplay;
|
|
26701
26682
|
break;
|
|
26702
|
-
case
|
|
26683
|
+
case "awaiting_approval" /* AwaitingApproval */:
|
|
26703
26684
|
correlationId = call.correlationId;
|
|
26704
26685
|
confirmationDetails = call.confirmationDetails;
|
|
26705
26686
|
break;
|
|
26706
|
-
case
|
|
26687
|
+
case "executing" /* Executing */:
|
|
26707
26688
|
resultDisplay = call.liveOutput;
|
|
26708
26689
|
ptyId = call.pid;
|
|
26709
26690
|
progressMessage = call.progressMessage;
|
|
26710
26691
|
progress = call.progress;
|
|
26711
26692
|
progressTotal = call.progressTotal;
|
|
26712
26693
|
break;
|
|
26713
|
-
case
|
|
26714
|
-
case
|
|
26694
|
+
case "scheduled" /* Scheduled */:
|
|
26695
|
+
case "validating" /* Validating */:
|
|
26715
26696
|
break;
|
|
26716
26697
|
default: {
|
|
26717
26698
|
const exhaustiveCheck = call;
|
|
@@ -26782,7 +26763,7 @@ function useToolScheduler(onComplete, config, getPreferredEditor) {
|
|
|
26782
26763
|
const handler = (event) => {
|
|
26783
26764
|
const isRoot = event.schedulerId === ROOT_SCHEDULER_ID;
|
|
26784
26765
|
const hasExecuting = event.toolCalls.some(
|
|
26785
|
-
(tc) => tc.status ===
|
|
26766
|
+
(tc) => tc.status === "executing" /* Executing */ || (tc.status === "success" /* Success */ || tc.status === "error" /* Error */) && "tailToolCallRequest" in tc && tc.tailToolCallRequest != null
|
|
26786
26767
|
);
|
|
26787
26768
|
if (hasExecuting) {
|
|
26788
26769
|
setLastToolOutputTime(Date.now());
|
|
@@ -26791,7 +26772,7 @@ function useToolScheduler(onComplete, config, getPreferredEditor) {
|
|
|
26791
26772
|
const prevCalls = prev[event.schedulerId] ?? [];
|
|
26792
26773
|
const prevCallIds = new Set(prevCalls.map((tc) => tc.request.callId));
|
|
26793
26774
|
const filteredToolCalls = isRoot ? event.toolCalls : event.toolCalls.filter(
|
|
26794
|
-
(tc) => tc.status ===
|
|
26775
|
+
(tc) => tc.status === "awaiting_approval" /* AwaitingApproval */ || prevCallIds.has(tc.request.callId)
|
|
26795
26776
|
);
|
|
26796
26777
|
if (!isRoot && filteredToolCalls.length === 0 && prevCalls.length === 0) {
|
|
26797
26778
|
return prev;
|
|
@@ -26803,9 +26784,9 @@ function useToolScheduler(onComplete, config, getPreferredEditor) {
|
|
|
26803
26784
|
};
|
|
26804
26785
|
});
|
|
26805
26786
|
};
|
|
26806
|
-
messageBus.subscribe(
|
|
26787
|
+
messageBus.subscribe("tool-calls-update" /* TOOL_CALLS_UPDATE */, handler);
|
|
26807
26788
|
return () => {
|
|
26808
|
-
messageBus.unsubscribe(
|
|
26789
|
+
messageBus.unsubscribe("tool-calls-update" /* TOOL_CALLS_UPDATE */, handler);
|
|
26809
26790
|
};
|
|
26810
26791
|
}, [messageBus, internalAdaptToolCalls]);
|
|
26811
26792
|
(0, import_react98.useEffect)(() => {
|
|
@@ -26827,9 +26808,9 @@ function useToolScheduler(onComplete, config, getPreferredEditor) {
|
|
|
26827
26808
|
};
|
|
26828
26809
|
});
|
|
26829
26810
|
};
|
|
26830
|
-
messageBus.subscribe(
|
|
26811
|
+
messageBus.subscribe("subagent-activity" /* SUBAGENT_ACTIVITY */, handler);
|
|
26831
26812
|
return () => {
|
|
26832
|
-
messageBus.unsubscribe(
|
|
26813
|
+
messageBus.unsubscribe("subagent-activity" /* SUBAGENT_ACTIVITY */, handler);
|
|
26833
26814
|
};
|
|
26834
26815
|
}, [messageBus]);
|
|
26835
26816
|
const schedule = (0, import_react98.useCallback)(
|
|
@@ -26928,8 +26909,8 @@ function adaptToolCalls(coreCalls, prevTracked) {
|
|
|
26928
26909
|
const prev = prevMap.get(coreCall.request.callId);
|
|
26929
26910
|
const responseSubmittedToGemini = prev?.responseSubmittedToGemini ?? false;
|
|
26930
26911
|
let status = coreCall.status;
|
|
26931
|
-
if ((status ===
|
|
26932
|
-
status =
|
|
26912
|
+
if ((status === "success" /* Success */ || status === "error" /* Error */) && "tailToolCallRequest" in coreCall && coreCall.tailToolCallRequest != null) {
|
|
26913
|
+
status = "executing" /* Executing */;
|
|
26933
26914
|
}
|
|
26934
26915
|
return {
|
|
26935
26916
|
...coreCall,
|
|
@@ -26961,7 +26942,7 @@ function getBackgroundedToolInfo(toolCall) {
|
|
|
26961
26942
|
};
|
|
26962
26943
|
}
|
|
26963
26944
|
function isBackgroundableExecutingToolCall(toolCall) {
|
|
26964
|
-
return toolCall.status ===
|
|
26945
|
+
return toolCall.status === "executing" /* Executing */ && typeof toolCall.pid === "number";
|
|
26965
26946
|
}
|
|
26966
26947
|
function showCitations(settings) {
|
|
26967
26948
|
const enabled = settings.merged.ui.showCitations;
|
|
@@ -26971,14 +26952,14 @@ function showCitations(settings) {
|
|
|
26971
26952
|
return true;
|
|
26972
26953
|
}
|
|
26973
26954
|
function calculateStreamingState(isResponding, toolCalls) {
|
|
26974
|
-
if (toolCalls.some((tc) => tc.status ===
|
|
26955
|
+
if (toolCalls.some((tc) => tc.status === "awaiting_approval" /* AwaitingApproval */)) {
|
|
26975
26956
|
return "waiting_for_confirmation" /* WaitingForConfirmation */;
|
|
26976
26957
|
}
|
|
26977
26958
|
const isAnyToolActive = toolCalls.some((tc) => {
|
|
26978
|
-
if (tc.status ===
|
|
26959
|
+
if (tc.status === "executing" /* Executing */ || tc.status === "scheduled" /* Scheduled */ || tc.status === "validating" /* Validating */) {
|
|
26979
26960
|
return true;
|
|
26980
26961
|
}
|
|
26981
|
-
if (tc.status ===
|
|
26962
|
+
if (tc.status === "success" /* Success */ || tc.status === "error" /* Error */ || tc.status === "cancelled" /* Cancelled */) {
|
|
26982
26963
|
return !tc.responseSubmittedToGemini;
|
|
26983
26964
|
}
|
|
26984
26965
|
return false;
|
|
@@ -27024,9 +27005,9 @@ var useGeminiStream = (geminiClient, history, addItem, config, settings, onDebug
|
|
|
27024
27005
|
}
|
|
27025
27006
|
setRetryStatus(payload);
|
|
27026
27007
|
};
|
|
27027
|
-
coreEvents.on(
|
|
27008
|
+
coreEvents.on("retry-attempt" /* RetryAttempt */, handleRetryAttempt);
|
|
27028
27009
|
return () => {
|
|
27029
|
-
coreEvents.off(
|
|
27010
|
+
coreEvents.off("retry-attempt" /* RetryAttempt */, handleRetryAttempt);
|
|
27030
27011
|
};
|
|
27031
27012
|
}, [isRespondingRef]);
|
|
27032
27013
|
const [
|
|
@@ -27159,12 +27140,12 @@ var useGeminiStream = (geminiClient, history, addItem, config, settings, onDebug
|
|
|
27159
27140
|
const tc = toolCalls[i];
|
|
27160
27141
|
if (pushedToolCallIdsRef.current.has(tc.request.callId)) continue;
|
|
27161
27142
|
if (tc.status === "success" || tc.status === "error" || tc.status === "cancelled") {
|
|
27162
|
-
const isAgent = tc.tool?.kind ===
|
|
27143
|
+
const isAgent = tc.tool?.kind === "agent" /* Agent */;
|
|
27163
27144
|
if (isAgent) {
|
|
27164
27145
|
let contigAgentsComplete = true;
|
|
27165
27146
|
for (let j = i + 1; j < toolCalls.length; j++) {
|
|
27166
27147
|
const nextTc = toolCalls[j];
|
|
27167
|
-
if (nextTc.tool?.kind ===
|
|
27148
|
+
if (nextTc.tool?.kind === "agent" /* Agent */) {
|
|
27168
27149
|
if (nextTc.status !== "success" && nextTc.status !== "error" && nextTc.status !== "cancelled") {
|
|
27169
27150
|
contigAgentsComplete = false;
|
|
27170
27151
|
break;
|
|
@@ -27190,7 +27171,7 @@ var useGeminiStream = (geminiClient, history, addItem, config, settings, onDebug
|
|
|
27190
27171
|
let currentGroup = [];
|
|
27191
27172
|
for (const tc of toolsToPush) {
|
|
27192
27173
|
newPushed.add(tc.request.callId);
|
|
27193
|
-
if (tc.tool?.kind ===
|
|
27174
|
+
if (tc.tool?.kind === "agent" /* Agent */) {
|
|
27194
27175
|
currentGroup.push(tc);
|
|
27195
27176
|
} else {
|
|
27196
27177
|
if (currentGroup.length > 0) {
|
|
@@ -27340,7 +27321,7 @@ var useGeminiStream = (geminiClient, history, addItem, config, settings, onDebug
|
|
|
27340
27321
|
prevActiveShellPtyIdRef.current = activeShellPtyId;
|
|
27341
27322
|
}, [activeShellPtyId, addItem, setIsResponding]);
|
|
27342
27323
|
(0, import_react99.useEffect)(() => {
|
|
27343
|
-
if (config.getApprovalMode() ===
|
|
27324
|
+
if (config.getApprovalMode() === "yolo" /* YOLO */ && streamingState === "idle" /* Idle */) {
|
|
27344
27325
|
const lastUserMessageIndex = history.findLastIndex(
|
|
27345
27326
|
(item) => item.type === "user" /* USER */
|
|
27346
27327
|
);
|
|
@@ -27408,7 +27389,7 @@ var useGeminiStream = (geminiClient, history, addItem, config, settings, onDebug
|
|
|
27408
27389
|
return;
|
|
27409
27390
|
}
|
|
27410
27391
|
const hasActiveTools = toolCalls.some(
|
|
27411
|
-
(tc) => tc.status ===
|
|
27392
|
+
(tc) => tc.status === "executing" /* Executing */ || tc.status === "scheduled" /* Scheduled */ || tc.status === "validating" /* Validating */
|
|
27412
27393
|
);
|
|
27413
27394
|
if (streamingState === "idle" /* Idle */ && !isRespondingRef.current && !hasActiveTools) {
|
|
27414
27395
|
if (clearBuffer) {
|
|
@@ -27435,7 +27416,7 @@ var useGeminiStream = (geminiClient, history, addItem, config, settings, onDebug
|
|
|
27435
27416
|
if (tool.name === SHELL_COMMAND_NAME) {
|
|
27436
27417
|
return {
|
|
27437
27418
|
...tool,
|
|
27438
|
-
status:
|
|
27419
|
+
status: "cancelled" /* Cancelled */,
|
|
27439
27420
|
resultDisplay: tool.resultDisplay
|
|
27440
27421
|
};
|
|
27441
27422
|
}
|
|
@@ -27500,7 +27481,7 @@ var useGeminiStream = (geminiClient, history, addItem, config, settings, onDebug
|
|
|
27500
27481
|
let localQueryToSendToGemini = null;
|
|
27501
27482
|
if (typeof query === "string") {
|
|
27502
27483
|
const trimmedQuery = query.trim();
|
|
27503
|
-
await logger?.logMessage(
|
|
27484
|
+
await logger?.logMessage("user" /* USER */, trimmedQuery);
|
|
27504
27485
|
if (!shellModeActive) {
|
|
27505
27486
|
const slashCommandResult = isSlashCommand(trimmedQuery) ? await handleSlashCommand(trimmedQuery) : false;
|
|
27506
27487
|
if (slashCommandResult) {
|
|
@@ -27656,7 +27637,7 @@ var useGeminiStream = (geminiClient, history, addItem, config, settings, onDebug
|
|
|
27656
27637
|
if (pendingHistoryItemRef.current) {
|
|
27657
27638
|
if (pendingHistoryItemRef.current.type === "tool_group") {
|
|
27658
27639
|
const updatedTools = pendingHistoryItemRef.current.tools.map(
|
|
27659
|
-
(tool) => tool.status ===
|
|
27640
|
+
(tool) => tool.status === "validating" /* Validating */ || tool.status === "scheduled" /* Scheduled */ || tool.status === "awaiting_approval" /* AwaitingApproval */ || tool.status === "executing" /* Executing */ ? { ...tool, status: "cancelled" /* Cancelled */ } : tool
|
|
27660
27641
|
);
|
|
27661
27642
|
const pendingItem = {
|
|
27662
27643
|
...pendingHistoryItemRef.current,
|
|
@@ -27902,15 +27883,15 @@ var useGeminiStream = (geminiClient, history, addItem, config, settings, onDebug
|
|
|
27902
27883
|
let geminiMessageBuffer = "";
|
|
27903
27884
|
const toolCallRequests = [];
|
|
27904
27885
|
for await (const event of stream) {
|
|
27905
|
-
if (event.type !==
|
|
27886
|
+
if (event.type !== "thought" /* Thought */ && thoughtRef.current !== null) {
|
|
27906
27887
|
setThought(null);
|
|
27907
27888
|
}
|
|
27908
27889
|
switch (event.type) {
|
|
27909
|
-
case
|
|
27890
|
+
case "thought" /* Thought */:
|
|
27910
27891
|
setLastGeminiActivityTime(Date.now());
|
|
27911
27892
|
handleThoughtEvent(event.value, userMessageTimestamp);
|
|
27912
27893
|
break;
|
|
27913
|
-
case
|
|
27894
|
+
case "content" /* Content */:
|
|
27914
27895
|
setLastGeminiActivityTime(Date.now());
|
|
27915
27896
|
geminiMessageBuffer = handleContentEvent(
|
|
27916
27897
|
event.value,
|
|
@@ -27918,16 +27899,16 @@ var useGeminiStream = (geminiClient, history, addItem, config, settings, onDebug
|
|
|
27918
27899
|
userMessageTimestamp
|
|
27919
27900
|
);
|
|
27920
27901
|
break;
|
|
27921
|
-
case
|
|
27902
|
+
case "tool_call_request" /* ToolCallRequest */:
|
|
27922
27903
|
toolCallRequests.push(event.value);
|
|
27923
27904
|
break;
|
|
27924
|
-
case
|
|
27905
|
+
case "user_cancelled" /* UserCancelled */:
|
|
27925
27906
|
handleUserCancelledEvent(userMessageTimestamp);
|
|
27926
27907
|
break;
|
|
27927
|
-
case
|
|
27908
|
+
case "error" /* Error */:
|
|
27928
27909
|
handleErrorEvent(event.value, userMessageTimestamp);
|
|
27929
27910
|
break;
|
|
27930
|
-
case
|
|
27911
|
+
case "agent_execution_stopped" /* AgentExecutionStopped */:
|
|
27931
27912
|
handleAgentExecutionStoppedEvent(
|
|
27932
27913
|
event.value.reason,
|
|
27933
27914
|
userMessageTimestamp,
|
|
@@ -27935,7 +27916,7 @@ var useGeminiStream = (geminiClient, history, addItem, config, settings, onDebug
|
|
|
27935
27916
|
event.value.contextCleared
|
|
27936
27917
|
);
|
|
27937
27918
|
break;
|
|
27938
|
-
case
|
|
27919
|
+
case "agent_execution_blocked" /* AgentExecutionBlocked */:
|
|
27939
27920
|
handleAgentExecutionBlockedEvent(
|
|
27940
27921
|
event.value.reason,
|
|
27941
27922
|
userMessageTimestamp,
|
|
@@ -27943,35 +27924,35 @@ var useGeminiStream = (geminiClient, history, addItem, config, settings, onDebug
|
|
|
27943
27924
|
event.value.contextCleared
|
|
27944
27925
|
);
|
|
27945
27926
|
break;
|
|
27946
|
-
case
|
|
27927
|
+
case "chat_compressed" /* ChatCompressed */:
|
|
27947
27928
|
handleChatCompressionEvent(event.value, userMessageTimestamp);
|
|
27948
27929
|
break;
|
|
27949
|
-
case
|
|
27950
|
-
case
|
|
27930
|
+
case "tool_call_confirmation" /* ToolCallConfirmation */:
|
|
27931
|
+
case "tool_call_response" /* ToolCallResponse */:
|
|
27951
27932
|
break;
|
|
27952
|
-
case
|
|
27933
|
+
case "max_session_turns" /* MaxSessionTurns */:
|
|
27953
27934
|
handleMaxSessionTurnsEvent();
|
|
27954
27935
|
break;
|
|
27955
|
-
case
|
|
27936
|
+
case "context_window_will_overflow" /* ContextWindowWillOverflow */:
|
|
27956
27937
|
handleContextWindowWillOverflowEvent(
|
|
27957
27938
|
event.value.estimatedRequestTokenCount,
|
|
27958
27939
|
event.value.remainingTokenCount
|
|
27959
27940
|
);
|
|
27960
27941
|
break;
|
|
27961
|
-
case
|
|
27942
|
+
case "finished" /* Finished */:
|
|
27962
27943
|
handleFinishedEvent(event, userMessageTimestamp);
|
|
27963
27944
|
break;
|
|
27964
|
-
case
|
|
27945
|
+
case "citation" /* Citation */:
|
|
27965
27946
|
handleCitationEvent(event.value, userMessageTimestamp);
|
|
27966
27947
|
break;
|
|
27967
|
-
case
|
|
27948
|
+
case "model_info" /* ModelInfo */:
|
|
27968
27949
|
handleChatModelEvent(event.value, userMessageTimestamp);
|
|
27969
27950
|
break;
|
|
27970
|
-
case
|
|
27951
|
+
case "loop_detected" /* LoopDetected */:
|
|
27971
27952
|
loopDetectedRef.current = true;
|
|
27972
27953
|
break;
|
|
27973
|
-
case
|
|
27974
|
-
case
|
|
27954
|
+
case "retry" /* Retry */:
|
|
27955
|
+
case "invalid_stream" /* InvalidStream */:
|
|
27975
27956
|
break;
|
|
27976
27957
|
default: {
|
|
27977
27958
|
const unreachable = event;
|
|
@@ -28012,7 +27993,7 @@ var useGeminiStream = (geminiClient, history, addItem, config, settings, onDebug
|
|
|
28012
27993
|
const submitQuery = (0, import_react99.useCallback)(
|
|
28013
27994
|
async (query, options, prompt_id) => runInDevTraceSpan(
|
|
28014
27995
|
{
|
|
28015
|
-
operation: options?.isContinuation ?
|
|
27996
|
+
operation: options?.isContinuation ? "system_prompt" /* SystemPrompt */ : "user_prompt" /* UserPrompt */,
|
|
28016
27997
|
sessionId: config.getSessionId()
|
|
28017
27998
|
},
|
|
28018
27999
|
async ({ metadata: spanMetadata }) => {
|
|
@@ -28172,7 +28153,7 @@ var useGeminiStream = (geminiClient, history, addItem, config, settings, onDebug
|
|
|
28172
28153
|
);
|
|
28173
28154
|
const handleApprovalModeChange = (0, import_react99.useCallback)(
|
|
28174
28155
|
async (newApprovalMode) => {
|
|
28175
|
-
if (previousApprovalModeRef.current ===
|
|
28156
|
+
if (previousApprovalModeRef.current === "plan" /* PLAN */ && newApprovalMode !== "plan" /* PLAN */ && streamingState === "idle" /* Idle */) {
|
|
28176
28157
|
if (geminiClient) {
|
|
28177
28158
|
try {
|
|
28178
28159
|
await geminiClient.addHistory({
|
|
@@ -28195,11 +28176,11 @@ var useGeminiStream = (geminiClient, history, addItem, config, settings, onDebug
|
|
|
28195
28176
|
}
|
|
28196
28177
|
}
|
|
28197
28178
|
previousApprovalModeRef.current = newApprovalMode;
|
|
28198
|
-
if (newApprovalMode ===
|
|
28179
|
+
if (newApprovalMode === "yolo" /* YOLO */ || newApprovalMode === "autoEdit" /* AUTO_EDIT */) {
|
|
28199
28180
|
let awaitingApprovalCalls = toolCalls.filter(
|
|
28200
28181
|
(call) => call.status === "awaiting_approval" && !call.request.forcedAsk
|
|
28201
28182
|
);
|
|
28202
|
-
if (newApprovalMode ===
|
|
28183
|
+
if (newApprovalMode === "autoEdit" /* AUTO_EDIT */) {
|
|
28203
28184
|
awaitingApprovalCalls = awaitingApprovalCalls.filter((call) => {
|
|
28204
28185
|
if (EDIT_TOOL_NAMES.has(call.request.name)) {
|
|
28205
28186
|
return true;
|
|
@@ -28215,11 +28196,11 @@ var useGeminiStream = (geminiClient, history, addItem, config, settings, onDebug
|
|
|
28215
28196
|
if (call.correlationId) {
|
|
28216
28197
|
try {
|
|
28217
28198
|
await config.getMessageBus().publish({
|
|
28218
|
-
type:
|
|
28199
|
+
type: "tool-confirmation-response" /* TOOL_CONFIRMATION_RESPONSE */,
|
|
28219
28200
|
correlationId: call.correlationId,
|
|
28220
28201
|
confirmed: true,
|
|
28221
28202
|
requiresUserConfirmation: false,
|
|
28222
|
-
outcome:
|
|
28203
|
+
outcome: "proceed_once" /* ProceedOnce */
|
|
28223
28204
|
});
|
|
28224
28205
|
} catch (error) {
|
|
28225
28206
|
debugLogger.warn(
|
|
@@ -28288,14 +28269,14 @@ var useGeminiStream = (geminiClient, history, addItem, config, settings, onDebug
|
|
|
28288
28269
|
);
|
|
28289
28270
|
if (isLowErrorVerbosity) {
|
|
28290
28271
|
suppressedToolErrorCountRef.current += geminiTools.filter(
|
|
28291
|
-
(tc) => tc.status ===
|
|
28272
|
+
(tc) => tc.status === "error" /* Error */
|
|
28292
28273
|
).length;
|
|
28293
28274
|
}
|
|
28294
28275
|
if (geminiTools.length === 0) {
|
|
28295
28276
|
return;
|
|
28296
28277
|
}
|
|
28297
28278
|
const stopExecutionTool = geminiTools.find(
|
|
28298
|
-
(tc) => tc.response.errorType ===
|
|
28279
|
+
(tc) => tc.response.errorType === "stop_execution" /* STOP_EXECUTION */
|
|
28299
28280
|
);
|
|
28300
28281
|
if (stopExecutionTool && stopExecutionTool.response.error) {
|
|
28301
28282
|
maybeAddSuppressedToolErrorNote();
|
|
@@ -28315,9 +28296,9 @@ var useGeminiStream = (geminiClient, history, addItem, config, settings, onDebug
|
|
|
28315
28296
|
(tc) => !isTopicTool2(tc.request.name)
|
|
28316
28297
|
);
|
|
28317
28298
|
const allDeclinableToolsCancelled = declinableTools.length > 0 && declinableTools.every(
|
|
28318
|
-
(tc) => tc.status ===
|
|
28299
|
+
(tc) => tc.status === "cancelled" /* Cancelled */
|
|
28319
28300
|
);
|
|
28320
|
-
const allToolsCancelled = geminiTools.length > 0 && geminiTools.every((tc) => tc.status ===
|
|
28301
|
+
const allToolsCancelled = geminiTools.length > 0 && geminiTools.every((tc) => tc.status === "cancelled" /* Cancelled */);
|
|
28321
28302
|
if (allDeclinableToolsCancelled || allToolsCancelled) {
|
|
28322
28303
|
if (!turnCancelledRef.current) {
|
|
28323
28304
|
addItem({
|
|
@@ -28397,7 +28378,7 @@ var useGeminiStream = (geminiClient, history, addItem, config, settings, onDebug
|
|
|
28397
28378
|
return;
|
|
28398
28379
|
}
|
|
28399
28380
|
const restorableToolCalls = toolCalls.filter(
|
|
28400
|
-
(toolCall) => EDIT_TOOL_NAMES.has(toolCall.request.name) && toolCall.status ===
|
|
28381
|
+
(toolCall) => EDIT_TOOL_NAMES.has(toolCall.request.name) && toolCall.status === "awaiting_approval" /* AwaitingApproval */
|
|
28401
28382
|
);
|
|
28402
28383
|
if (restorableToolCalls.length > 0) {
|
|
28403
28384
|
if (!gitService) {
|
|
@@ -28620,14 +28601,14 @@ var useAgentStream = ({
|
|
|
28620
28601
|
const displayName = legacyState?.displayName ?? event.name;
|
|
28621
28602
|
const isOutputMarkdown = legacyState?.isOutputMarkdown ?? false;
|
|
28622
28603
|
const desc = legacyState?.description ?? "";
|
|
28623
|
-
const fallbackKind =
|
|
28604
|
+
const fallbackKind = "other" /* Other */;
|
|
28624
28605
|
const newCall = {
|
|
28625
28606
|
callId: event.requestId,
|
|
28626
28607
|
name: displayName,
|
|
28627
28608
|
originalRequestName: event.name,
|
|
28628
28609
|
description: desc,
|
|
28629
28610
|
display: event.display,
|
|
28630
|
-
status:
|
|
28611
|
+
status: "scheduled" /* Scheduled */,
|
|
28631
28612
|
isClientInitiated: false,
|
|
28632
28613
|
renderOutputAsMarkdown: isOutputMarkdown,
|
|
28633
28614
|
kind: legacyState?.kind ?? fallbackKind,
|
|
@@ -28645,10 +28626,10 @@ var useAgentStream = ({
|
|
|
28645
28626
|
const evtStatus = legacyState?.status;
|
|
28646
28627
|
let status = tc.status;
|
|
28647
28628
|
if (evtStatus === "executing")
|
|
28648
|
-
status =
|
|
28649
|
-
else if (evtStatus === "error") status =
|
|
28629
|
+
status = "executing" /* Executing */;
|
|
28630
|
+
else if (evtStatus === "error") status = "error" /* Error */;
|
|
28650
28631
|
else if (evtStatus === "success")
|
|
28651
|
-
status =
|
|
28632
|
+
status = "success" /* Success */;
|
|
28652
28633
|
const display = event.display?.result;
|
|
28653
28634
|
const liveOutput = displayContentToString(display) ?? tc.resultDisplay;
|
|
28654
28635
|
const progressMessage = legacyState?.progressMessage ?? tc.progressMessage;
|
|
@@ -28681,7 +28662,7 @@ var useAgentStream = ({
|
|
|
28681
28662
|
const resultDisplay = displayContentToString(display) ?? tc.resultDisplay;
|
|
28682
28663
|
return {
|
|
28683
28664
|
...tc,
|
|
28684
|
-
status: event.isError ?
|
|
28665
|
+
status: event.isError ? "error" /* Error */ : "success" /* Success */,
|
|
28685
28666
|
display: event.display ? { ...tc.display, ...event.display } : tc.display,
|
|
28686
28667
|
resultDisplay,
|
|
28687
28668
|
outputFile
|
|
@@ -28747,7 +28728,7 @@ var useAgentStream = ({
|
|
|
28747
28728
|
if (!options?.isContinuation) {
|
|
28748
28729
|
if (typeof query === "string") {
|
|
28749
28730
|
addItem({ type: "user" /* USER */, text: query }, timestamp);
|
|
28750
|
-
void logger?.logMessage(
|
|
28731
|
+
void logger?.logMessage("user" /* USER */, query);
|
|
28751
28732
|
}
|
|
28752
28733
|
startNewPrompt();
|
|
28753
28734
|
}
|
|
@@ -30274,9 +30255,9 @@ var useFolderTrust = (settings, onTrustChange, addItem) => {
|
|
|
30274
30255
|
const handleFolderTrustSelect = (0, import_react105.useCallback)(
|
|
30275
30256
|
async (choice) => {
|
|
30276
30257
|
const trustLevelMap = {
|
|
30277
|
-
["trust_folder" /* TRUST_FOLDER */]:
|
|
30278
|
-
["trust_parent" /* TRUST_PARENT */]:
|
|
30279
|
-
["do_not_trust" /* DO_NOT_TRUST */]:
|
|
30258
|
+
["trust_folder" /* TRUST_FOLDER */]: "TRUST_FOLDER" /* TRUST_FOLDER */,
|
|
30259
|
+
["trust_parent" /* TRUST_PARENT */]: "TRUST_PARENT" /* TRUST_PARENT */,
|
|
30260
|
+
["do_not_trust" /* DO_NOT_TRUST */]: "DO_NOT_TRUST" /* DO_NOT_TRUST */
|
|
30280
30261
|
};
|
|
30281
30262
|
const trustLevel = trustLevelMap[choice];
|
|
30282
30263
|
if (!trustLevel) return;
|
|
@@ -30295,7 +30276,7 @@ var useFolderTrust = (settings, onTrustChange, addItem) => {
|
|
|
30295
30276
|
}, 100);
|
|
30296
30277
|
return;
|
|
30297
30278
|
}
|
|
30298
|
-
const currentIsTrusted = trustLevel ===
|
|
30279
|
+
const currentIsTrusted = trustLevel === "TRUST_FOLDER" /* TRUST_FOLDER */ || trustLevel === "TRUST_PARENT" /* TRUST_PARENT */;
|
|
30299
30280
|
onTrustChange(currentIsTrusted);
|
|
30300
30281
|
setIsTrusted(currentIsTrusted);
|
|
30301
30282
|
const wasTrusted = isTrusted ?? false;
|
|
@@ -31303,7 +31284,7 @@ function useMessageQueue({
|
|
|
31303
31284
|
var import_react107 = __toESM(require_react(), 1);
|
|
31304
31285
|
function useMcpStatus(config) {
|
|
31305
31286
|
const [discoveryState, setDiscoveryState] = (0, import_react107.useState)(
|
|
31306
|
-
() => config.getMcpClientManager()?.getDiscoveryState() ??
|
|
31287
|
+
() => config.getMcpClientManager()?.getDiscoveryState() ?? "not_started" /* NOT_STARTED */
|
|
31307
31288
|
);
|
|
31308
31289
|
const [mcpServerCount, setMcpServerCount] = (0, import_react107.useState)(
|
|
31309
31290
|
() => config.getMcpClientManager()?.getMcpServerCount() ?? 0
|
|
@@ -31316,12 +31297,12 @@ function useMcpStatus(config) {
|
|
|
31316
31297
|
setMcpServerCount(manager.getMcpServerCount());
|
|
31317
31298
|
}
|
|
31318
31299
|
};
|
|
31319
|
-
coreEvents.on(
|
|
31300
|
+
coreEvents.on("mcp-client-update" /* McpClientUpdate */, onChange);
|
|
31320
31301
|
return () => {
|
|
31321
|
-
coreEvents.off(
|
|
31302
|
+
coreEvents.off("mcp-client-update" /* McpClientUpdate */, onChange);
|
|
31322
31303
|
};
|
|
31323
31304
|
}, [config]);
|
|
31324
|
-
const isMcpReady = discoveryState ===
|
|
31305
|
+
const isMcpReady = discoveryState === "completed" /* COMPLETED */ || discoveryState === "not_started" /* NOT_STARTED */ && mcpServerCount === 0;
|
|
31325
31306
|
return {
|
|
31326
31307
|
discoveryState,
|
|
31327
31308
|
mcpServerCount,
|
|
@@ -31348,7 +31329,7 @@ function useApprovalModeIndicator({
|
|
|
31348
31329
|
(key) => {
|
|
31349
31330
|
let nextApprovalMode;
|
|
31350
31331
|
if (keyMatchers["app.toggleYolo" /* TOGGLE_YOLO */](key)) {
|
|
31351
|
-
if (config.isYoloModeDisabled() && config.getApprovalMode() !==
|
|
31332
|
+
if (config.isYoloModeDisabled() && config.getApprovalMode() !== "yolo" /* YOLO */) {
|
|
31352
31333
|
if (addItem) {
|
|
31353
31334
|
let text = "You cannot enter YOLO mode since it is disabled in your settings.";
|
|
31354
31335
|
const adminSettings = config.getRemoteAdminSettings();
|
|
@@ -31366,21 +31347,21 @@ function useApprovalModeIndicator({
|
|
|
31366
31347
|
}
|
|
31367
31348
|
return;
|
|
31368
31349
|
}
|
|
31369
|
-
nextApprovalMode = config.getApprovalMode() ===
|
|
31350
|
+
nextApprovalMode = config.getApprovalMode() === "yolo" /* YOLO */ ? "default" /* DEFAULT */ : "yolo" /* YOLO */;
|
|
31370
31351
|
} else if (keyMatchers["app.cycleApprovalMode" /* CYCLE_APPROVAL_MODE */](key)) {
|
|
31371
31352
|
const currentMode = config.getApprovalMode();
|
|
31372
31353
|
switch (currentMode) {
|
|
31373
|
-
case
|
|
31374
|
-
nextApprovalMode =
|
|
31354
|
+
case "default" /* DEFAULT */:
|
|
31355
|
+
nextApprovalMode = "autoEdit" /* AUTO_EDIT */;
|
|
31375
31356
|
break;
|
|
31376
|
-
case
|
|
31377
|
-
nextApprovalMode = allowPlanMode ?
|
|
31357
|
+
case "autoEdit" /* AUTO_EDIT */:
|
|
31358
|
+
nextApprovalMode = allowPlanMode ? "plan" /* PLAN */ : "default" /* DEFAULT */;
|
|
31378
31359
|
break;
|
|
31379
|
-
case
|
|
31380
|
-
nextApprovalMode =
|
|
31360
|
+
case "plan" /* PLAN */:
|
|
31361
|
+
nextApprovalMode = "default" /* DEFAULT */;
|
|
31381
31362
|
break;
|
|
31382
|
-
case
|
|
31383
|
-
nextApprovalMode =
|
|
31363
|
+
case "yolo" /* YOLO */:
|
|
31364
|
+
nextApprovalMode = "autoEdit" /* AUTO_EDIT */;
|
|
31384
31365
|
break;
|
|
31385
31366
|
default:
|
|
31386
31367
|
}
|
|
@@ -31790,11 +31771,11 @@ var useHookDisplayState = () => {
|
|
|
31790
31771
|
removeHook();
|
|
31791
31772
|
}
|
|
31792
31773
|
};
|
|
31793
|
-
coreEvents.on(
|
|
31794
|
-
coreEvents.on(
|
|
31774
|
+
coreEvents.on("hook-start" /* HookStart */, handleHookStart);
|
|
31775
|
+
coreEvents.on("hook-end" /* HookEnd */, handleHookEnd);
|
|
31795
31776
|
return () => {
|
|
31796
|
-
coreEvents.off(
|
|
31797
|
-
coreEvents.off(
|
|
31777
|
+
coreEvents.off("hook-start" /* HookStart */, handleHookStart);
|
|
31778
|
+
coreEvents.off("hook-end" /* HookEnd */, handleHookEnd);
|
|
31798
31779
|
activeTimeouts.forEach(clearTimeout);
|
|
31799
31780
|
activeTimeouts.clear();
|
|
31800
31781
|
};
|
|
@@ -32633,7 +32614,7 @@ var AppContainer = (props) => {
|
|
|
32633
32614
|
setConfigInitialized(true);
|
|
32634
32615
|
startupProfiler.flush(config);
|
|
32635
32616
|
startAutoMemoryIfEnabled(config);
|
|
32636
|
-
const sessionStartSource = resumedSessionData ?
|
|
32617
|
+
const sessionStartSource = resumedSessionData ? "resume" /* Resume */ : "startup" /* Startup */;
|
|
32637
32618
|
const result = await config.getHookSystem()?.fireSessionStartEvent(sessionStartSource);
|
|
32638
32619
|
if (result) {
|
|
32639
32620
|
const additionalContext = result.getAdditionalContext();
|
|
@@ -32660,7 +32641,7 @@ var AppContainer = (props) => {
|
|
|
32660
32641
|
);
|
|
32661
32642
|
const ideClient = await IdeClient.getInstance();
|
|
32662
32643
|
await ideClient.disconnect();
|
|
32663
|
-
await config?.getHookSystem()?.fireSessionEndEvent(
|
|
32644
|
+
await config?.getHookSystem()?.fireSessionEndEvent("exit" /* Exit */);
|
|
32664
32645
|
};
|
|
32665
32646
|
registerCleanup(cleanupFn);
|
|
32666
32647
|
return () => {
|
|
@@ -32685,11 +32666,11 @@ var AppContainer = (props) => {
|
|
|
32685
32666
|
resetTime: payload.resetTime
|
|
32686
32667
|
});
|
|
32687
32668
|
};
|
|
32688
|
-
coreEvents.on(
|
|
32689
|
-
coreEvents.on(
|
|
32669
|
+
coreEvents.on("model-changed" /* ModelChanged */, handleModelChanged);
|
|
32670
|
+
coreEvents.on("quota-changed" /* QuotaChanged */, handleQuotaChanged);
|
|
32690
32671
|
return () => {
|
|
32691
|
-
coreEvents.off(
|
|
32692
|
-
coreEvents.off(
|
|
32672
|
+
coreEvents.off("model-changed" /* ModelChanged */, handleModelChanged);
|
|
32673
|
+
coreEvents.off("quota-changed" /* QuotaChanged */, handleQuotaChanged);
|
|
32693
32674
|
};
|
|
32694
32675
|
}, [config]);
|
|
32695
32676
|
(0, import_react121.useEffect)(() => {
|
|
@@ -32702,16 +32683,16 @@ var AppContainer = (props) => {
|
|
|
32702
32683
|
const handleAgentsDiscovered = (payload) => {
|
|
32703
32684
|
setNewAgents(payload.agents);
|
|
32704
32685
|
};
|
|
32705
|
-
coreEvents.on(
|
|
32706
|
-
coreEvents.on(
|
|
32707
|
-
coreEvents.on(
|
|
32686
|
+
coreEvents.on("settings-changed" /* SettingsChanged */, handleSettingsChanged);
|
|
32687
|
+
coreEvents.on("admin-settings-changed" /* AdminSettingsChanged */, handleAdminSettingsChanged);
|
|
32688
|
+
coreEvents.on("agents-discovered" /* AgentsDiscovered */, handleAgentsDiscovered);
|
|
32708
32689
|
return () => {
|
|
32709
|
-
coreEvents.off(
|
|
32690
|
+
coreEvents.off("settings-changed" /* SettingsChanged */, handleSettingsChanged);
|
|
32710
32691
|
coreEvents.off(
|
|
32711
|
-
|
|
32692
|
+
"admin-settings-changed" /* AdminSettingsChanged */,
|
|
32712
32693
|
handleAdminSettingsChanged
|
|
32713
32694
|
);
|
|
32714
|
-
coreEvents.off(
|
|
32695
|
+
coreEvents.off("agents-discovered" /* AgentsDiscovered */, handleAgentsDiscovered);
|
|
32715
32696
|
};
|
|
32716
32697
|
}, [settings]);
|
|
32717
32698
|
const { errorCount, clearErrorCount } = useErrorCount();
|
|
@@ -32776,11 +32757,11 @@ var AppContainer = (props) => {
|
|
|
32776
32757
|
exitEditorDialog
|
|
32777
32758
|
} = useEditorSettings(settings, setEditorError, historyManager.addItem);
|
|
32778
32759
|
(0, import_react121.useEffect)(() => {
|
|
32779
|
-
coreEvents.on(
|
|
32780
|
-
coreEvents.on(
|
|
32760
|
+
coreEvents.on("external-editor-closed" /* ExternalEditorClosed */, handleEditorClose);
|
|
32761
|
+
coreEvents.on("request-editor-selection" /* RequestEditorSelection */, openEditorDialog);
|
|
32781
32762
|
return () => {
|
|
32782
|
-
coreEvents.off(
|
|
32783
|
-
coreEvents.off(
|
|
32763
|
+
coreEvents.off("external-editor-closed" /* ExternalEditorClosed */, handleEditorClose);
|
|
32764
|
+
coreEvents.off("request-editor-selection" /* RequestEditorSelection */, openEditorDialog);
|
|
32784
32765
|
};
|
|
32785
32766
|
}, [handleEditorClose, openEditorDialog]);
|
|
32786
32767
|
(0, import_react121.useEffect)(() => {
|
|
@@ -32848,7 +32829,7 @@ var AppContainer = (props) => {
|
|
|
32848
32829
|
errorVerbosity: settings.merged.ui.errorVerbosity
|
|
32849
32830
|
});
|
|
32850
32831
|
const isAuthDialogOpen = authState === "updating" /* Updating */;
|
|
32851
|
-
const isAuthenticating = authState === "unauthenticated" /* Unauthenticated */ && settings.merged.security.auth.selectedType !==
|
|
32832
|
+
const isAuthenticating = authState === "unauthenticated" /* Unauthenticated */ && settings.merged.security.auth.selectedType !== "gemini-api-key" /* USE_GEMINI */;
|
|
32852
32833
|
const isGeminiClientInitialized = config.getGeminiClient()?.isInitialized();
|
|
32853
32834
|
const { loadHistoryForResume, isResuming } = useSessionResume({
|
|
32854
32835
|
config,
|
|
@@ -32876,7 +32857,7 @@ var AppContainer = (props) => {
|
|
|
32876
32857
|
async (authType, scope) => {
|
|
32877
32858
|
if (authType) {
|
|
32878
32859
|
const previousAuthType = config.getContentGeneratorConfig()?.authType ?? "unknown";
|
|
32879
|
-
if (authType ===
|
|
32860
|
+
if (authType === "oauth-personal" /* LOGIN_WITH_GOOGLE */) {
|
|
32880
32861
|
setAuthContext({ requiresRestart: true });
|
|
32881
32862
|
} else {
|
|
32882
32863
|
setAuthContext({});
|
|
@@ -32904,7 +32885,7 @@ var AppContainer = (props) => {
|
|
|
32904
32885
|
);
|
|
32905
32886
|
return;
|
|
32906
32887
|
}
|
|
32907
|
-
if (authType ===
|
|
32888
|
+
if (authType === "oauth-personal" /* LOGIN_WITH_GOOGLE */ && config.isBrowserLaunchSuppressed()) {
|
|
32908
32889
|
writeToStdout(`
|
|
32909
32890
|
----------------------------------------------------------------
|
|
32910
32891
|
Logging in with Google... Restarting Gemini CLI to continue.
|
|
@@ -32927,7 +32908,7 @@ Logging in with Google... Restarting Gemini CLI to continue.
|
|
|
32927
32908
|
}
|
|
32928
32909
|
await saveApiKey(apiKey);
|
|
32929
32910
|
await reloadApiKey();
|
|
32930
|
-
await config.refreshAuth(
|
|
32911
|
+
await config.refreshAuth("gemini-api-key" /* USE_GEMINI */);
|
|
32931
32912
|
setAuthState("authenticated" /* Authenticated */);
|
|
32932
32913
|
} catch (e) {
|
|
32933
32914
|
onAuthError(
|
|
@@ -32952,7 +32933,7 @@ Logging in with Google... Restarting Gemini CLI to continue.
|
|
|
32952
32933
|
`Authentication is enforced to be ${settings.merged.security.auth.enforcedType}, but you are currently using ${settings.merged.security.auth.selectedType}.`
|
|
32953
32934
|
);
|
|
32954
32935
|
} else if (settings.merged.security.auth.selectedType && !settings.merged.security.auth.useExternal) {
|
|
32955
|
-
if (settings.merged.security.auth.selectedType ===
|
|
32936
|
+
if (settings.merged.security.auth.selectedType === "gemini-api-key" /* USE_GEMINI */) {
|
|
32956
32937
|
return;
|
|
32957
32938
|
}
|
|
32958
32939
|
const authMethod = settings.merged.security.auth.selectedType;
|
|
@@ -33088,9 +33069,9 @@ Logging in with Google... Restarting Gemini CLI to continue.
|
|
|
33088
33069
|
}
|
|
33089
33070
|
});
|
|
33090
33071
|
};
|
|
33091
|
-
coreEvents.on(
|
|
33072
|
+
coreEvents.on("consent-request" /* ConsentRequest */, handleConsentRequest);
|
|
33092
33073
|
return () => {
|
|
33093
|
-
coreEvents.off(
|
|
33074
|
+
coreEvents.off("consent-request" /* ConsentRequest */, handleConsentRequest);
|
|
33094
33075
|
};
|
|
33095
33076
|
}, []);
|
|
33096
33077
|
const performMemoryRefresh = (0, import_react121.useCallback)(async () => {
|
|
@@ -33748,7 +33729,7 @@ ${queuedText}` : queuedText;
|
|
|
33748
33729
|
if (keyMatchers["app.showErrorDetails" /* SHOW_ERROR_DETAILS */](key)) {
|
|
33749
33730
|
if (settings.merged.general.devtools) {
|
|
33750
33731
|
void (async () => {
|
|
33751
|
-
const { toggleDevToolsPanel } = await import("./devtoolsService-
|
|
33732
|
+
const { toggleDevToolsPanel } = await import("./devtoolsService-HSYIYY4G.js");
|
|
33752
33733
|
await toggleDevToolsPanel(
|
|
33753
33734
|
config,
|
|
33754
33735
|
showErrorDetails,
|
|
@@ -33966,17 +33947,17 @@ ${queuedText}` : queuedText;
|
|
|
33966
33947
|
Date.now()
|
|
33967
33948
|
);
|
|
33968
33949
|
};
|
|
33969
|
-
coreEvents.on(
|
|
33970
|
-
coreEvents.on(
|
|
33950
|
+
coreEvents.on("user-feedback" /* UserFeedback */, handleUserFeedback);
|
|
33951
|
+
coreEvents.on("hook-system-message" /* HookSystemMessage */, handleHookSystemMessage);
|
|
33971
33952
|
coreEvents.drainBacklogs();
|
|
33972
33953
|
return () => {
|
|
33973
|
-
coreEvents.off(
|
|
33974
|
-
coreEvents.off(
|
|
33954
|
+
coreEvents.off("user-feedback" /* UserFeedback */, handleUserFeedback);
|
|
33955
|
+
coreEvents.off("hook-system-message" /* HookSystemMessage */, handleHookSystemMessage);
|
|
33975
33956
|
};
|
|
33976
33957
|
}, [historyManager]);
|
|
33977
33958
|
const nightly = props.version.includes("nightly");
|
|
33978
33959
|
const isAwaitingLoginRestart = authState === "awaiting_login_restart" /* AwaitingLoginRestart */;
|
|
33979
|
-
const loginRestartMessage = settings.merged.security.auth.selectedType ===
|
|
33960
|
+
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;
|
|
33980
33961
|
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;
|
|
33981
33962
|
const hasPendingToolConfirmation = (0, import_react121.useMemo)(
|
|
33982
33963
|
() => isToolAwaitingConfirmation(pendingHistoryItems),
|
|
@@ -34076,9 +34057,9 @@ ${queuedText}` : queuedText;
|
|
|
34076
34057
|
const handleMemoryChanged = (result) => {
|
|
34077
34058
|
setGeminiMdFileCount(result.fileCount);
|
|
34078
34059
|
};
|
|
34079
|
-
coreEvents.on(
|
|
34060
|
+
coreEvents.on("memory-changed" /* MemoryChanged */, handleMemoryChanged);
|
|
34080
34061
|
return () => {
|
|
34081
|
-
coreEvents.off(
|
|
34062
|
+
coreEvents.off("memory-changed" /* MemoryChanged */, handleMemoryChanged);
|
|
34082
34063
|
};
|
|
34083
34064
|
}, []);
|
|
34084
34065
|
(0, import_react121.useEffect)(() => {
|