@google/gemini-cli 0.54.0-preview.1 → 0.54.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-525VQXSC.js → chunk-2MRUXBJ5.js} +7 -7
- package/bundle/{chunk-JIT42EQ2.js → chunk-43HYOV6F.js} +1 -1
- package/bundle/{chunk-DPIHBZAT.js → chunk-5SMD2SLQ.js} +2 -2
- package/bundle/{chunk-SBSLQYOV.js → chunk-BBNFLOXC.js} +1 -1
- package/bundle/{chunk-OGXJPYSG.js → chunk-F6IU45OZ.js} +4 -4
- package/bundle/{chunk-UZMDXL7Q.js → chunk-G7VQ6O6G.js} +1 -1
- package/bundle/{chunk-DIJ6I3G3.js → chunk-GOQJOV4P.js} +1 -1
- package/bundle/{chunk-TNVY3HW2.js → chunk-HS7THREL.js} +4 -4
- package/bundle/{chunk-FMTFTARW.js → chunk-IM5WJKYT.js} +1 -1
- package/bundle/{chunk-VA3G5QBP.js → chunk-JPCDQXHB.js} +1 -1
- package/bundle/{chunk-IYJYJHOC.js → chunk-LH73BY77.js} +7 -7
- package/bundle/{chunk-CULEIHKX.js → chunk-MOGTJC2T.js} +1 -1
- package/bundle/{chunk-SMLDN56O.js → chunk-MZBH35ZS.js} +1 -1
- package/bundle/{chunk-PEJMTAMT.js → chunk-NZ6P6XKP.js} +2 -2
- package/bundle/{chunk-D2EAX3ZX.js → chunk-OYZ2XVON.js} +3 -3
- package/bundle/{chunk-MSUXP6KY.js → chunk-RHINAWEP.js} +54 -67
- package/bundle/{chunk-FXXIWHGQ.js → chunk-SHZORH3T.js} +1 -1
- package/bundle/{chunk-Z62YA2V7.js → chunk-SQWRALPF.js} +1 -1
- package/bundle/{chunk-T6U6FIO7.js → chunk-TZAOURRV.js} +8 -9
- package/bundle/{chunk-RCBLHUUY.js → chunk-UTXCUPDT.js} +2 -2
- package/bundle/{chunk-K3SJRITH.js → chunk-UW4NSSB6.js} +3 -3
- package/bundle/{chunk-AFGG2RPD.js → chunk-VIQEWLM4.js} +5 -8
- package/bundle/{chunk-RDYXVWPW.js → chunk-WJKZRJIC.js} +3 -3
- package/bundle/{chunk-RO4LFQ22.js → chunk-YYWWE5GW.js} +14263 -7626
- package/bundle/{cleanup-HQV2IFKH.js → cleanup-5UYKVLIF.js} +2 -2
- package/bundle/{cleanup-L5VWLPP4.js → cleanup-6OO5MA6W.js} +2 -2
- package/bundle/{cleanup-XXP2E7MI.js → cleanup-ODOGWYRM.js} +2 -2
- package/bundle/{core-57QOTUGQ.js → core-JL633Z4N.js} +1 -1
- package/bundle/{dist-47AO7W6O.js → core-S5B3NEKC.js} +1 -1
- package/bundle/{devtoolsService-ZSEA3CMZ.js → devtoolsService-FUTPYP6V.js} +2 -2
- package/bundle/{devtoolsService-3CR2FLT6.js → devtoolsService-NZQZUVCI.js} +3 -4
- package/bundle/{devtoolsService-35UP55Q3.js → devtoolsService-YWNTGRUE.js} +2 -2
- package/bundle/{dist-H6O2HKLX.js → dist-DB6LWOKZ.js} +1 -1
- package/bundle/{gemini-LO7DND33.js → gemini-AQASGK5V.js} +14 -14
- package/bundle/{gemini-UCXGGSBW.js → gemini-D3BRVDVJ.js} +14 -14
- package/bundle/{gemini-IDZJKL5P.js → gemini-PPNY5YY6.js} +198 -214
- package/bundle/gemini.js +7 -7
- package/bundle/{interactiveCli-6R7JZJ2X.js → interactiveCli-CXCZMXKQ.js} +8 -8
- package/bundle/{interactiveCli-TRSGHNSO.js → interactiveCli-P7QQLIDS.js} +8 -8
- package/bundle/{interactiveCli-EHIAN3B3.js → interactiveCli-RU7LCVXL.js} +296 -315
- package/bundle/{liteRtServerManager-3VYWFFDR.js → liteRtServerManager-FIVLVXQJ.js} +4 -4
- package/bundle/{liteRtServerManager-E5CRSVVL.js → liteRtServerManager-ISKYY742.js} +4 -4
- package/bundle/{liteRtServerManager-VFS4GSUO.js → liteRtServerManager-MPPOFOTR.js} +4 -4
- package/bundle/{oauth2-provider-66YNXHST.js → oauth2-provider-DOIL6PEC.js} +1 -1
- package/bundle/{oauth2-provider-3UXFRSIK.js → oauth2-provider-G6DF4NEU.js} +1 -1
- package/bundle/{oauth2-provider-54DMURL5.js → oauth2-provider-XR5UQYQV.js} +72 -38
- package/bundle/{start-2X7CSHIJ.js → start-AJW7OVPU.js} +6 -6
- package/bundle/{start-JT4SJ6FO.js → start-S77W5RNK.js} +6 -6
- package/bundle/{start-LZJM7TIF.js → start-YWT3TSZW.js} +6 -6
- package/package.json +1 -1
- package/bundle/chunk-CVUISPMN.js +0 -398
- package/bundle/chunk-IO55T6DE.js +0 -118
- package/bundle/chunk-TTNCL6R2.js +0 -154
- package/bundle/chunk-UUIODUV3.js +0 -102505
- package/bundle/chunk-XE7YFMNO.js +0 -1571
- package/bundle/chunk-YDQPFZ2Y.js +0 -512
- package/bundle/chunk-ZHTU5ILJ.js +0 -397085
- package/bundle/chunk-ZPRVIRJI.js +0 -17332
- package/bundle/cleanup-ZVT5D3O6.js +0 -32
- package/bundle/devtoolsService-6ODDI2AX.js +0 -4359
- package/bundle/dist-OQCDYU7F.js +0 -2170
- package/bundle/gemini-HAONW54R.js +0 -16491
- package/bundle/interactiveCli-3ACLI4L7.js +0 -34906
- package/bundle/liteRtServerManager-XWQ4FJKY.js +0 -65
- package/bundle/oauth2-provider-JGXWLD5K.js +0 -235
- package/bundle/start-YHTESBGR.js +0 -18
|
@@ -157,10 +157,10 @@ import {
|
|
|
157
157
|
widestLineFromStyledChars,
|
|
158
158
|
wordBreakStyledChars,
|
|
159
159
|
wrapStyledChars
|
|
160
|
-
} from "./chunk-
|
|
160
|
+
} from "./chunk-LH73BY77.js";
|
|
161
161
|
import {
|
|
162
162
|
require_source
|
|
163
|
-
} from "./chunk-
|
|
163
|
+
} from "./chunk-MOGTJC2T.js";
|
|
164
164
|
import {
|
|
165
165
|
appEvents
|
|
166
166
|
} from "./chunk-5PS3AYFU.js";
|
|
@@ -214,37 +214,33 @@ import {
|
|
|
214
214
|
stripAnsi,
|
|
215
215
|
stripUnsafeCharacters,
|
|
216
216
|
toCodePoints
|
|
217
|
-
} from "./chunk-
|
|
217
|
+
} from "./chunk-JPCDQXHB.js";
|
|
218
218
|
import {
|
|
219
219
|
handleAutoUpdate,
|
|
220
220
|
isDevelopment,
|
|
221
221
|
relaunchApp,
|
|
222
222
|
setUpdateHandler
|
|
223
|
-
} from "./chunk-
|
|
223
|
+
} from "./chunk-NZ6P6XKP.js";
|
|
224
224
|
import {
|
|
225
225
|
isTodoList,
|
|
226
226
|
mapCoreStatusToDisplayStatus,
|
|
227
227
|
require_react
|
|
228
|
-
} from "./chunk-
|
|
228
|
+
} from "./chunk-TZAOURRV.js";
|
|
229
229
|
import {
|
|
230
230
|
registerCleanup,
|
|
231
231
|
removeCleanup,
|
|
232
232
|
runExitCleanup,
|
|
233
233
|
setupTtyCheck
|
|
234
|
-
} from "./chunk-
|
|
234
|
+
} from "./chunk-SHZORH3T.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,20 +262,13 @@ 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
271
|
MAX_TOKENS_EXCEEDED_SUGGESTION,
|
|
279
|
-
MCPDiscoveryState,
|
|
280
|
-
MCPServerStatus,
|
|
281
|
-
MessageBusType,
|
|
282
|
-
MessageSenderType,
|
|
283
272
|
ModelNotFoundError,
|
|
284
273
|
ModelSlashCommandEvent,
|
|
285
274
|
OTHER_BLOCKED_MESSAGE,
|
|
@@ -292,7 +281,6 @@ import {
|
|
|
292
281
|
PREVIEW_GEMINI_MODEL,
|
|
293
282
|
PolicyIntegrityManager,
|
|
294
283
|
ProjectIdRequiredError,
|
|
295
|
-
QuestionType,
|
|
296
284
|
READ_FILE_DISPLAY_NAME,
|
|
297
285
|
READ_MANY_FILES_DISPLAY_NAME,
|
|
298
286
|
RECITATION_BLOCKED_MESSAGE,
|
|
@@ -301,22 +289,16 @@ import {
|
|
|
301
289
|
SAFETY_BLOCKED_MESSAGE,
|
|
302
290
|
SHELL_TOOL_NAME,
|
|
303
291
|
Scheduler,
|
|
304
|
-
SessionEndReason,
|
|
305
|
-
SessionStartSource,
|
|
306
292
|
ShellExecutionService,
|
|
307
293
|
SlashCommandStatus,
|
|
308
294
|
Storage,
|
|
309
|
-
SubagentState,
|
|
310
295
|
THINKING_ONLY_COMPRESS_SUGGESTION,
|
|
311
296
|
TOPIC_PARAM_STRATEGIC_INTENT,
|
|
312
297
|
TOPIC_PARAM_SUMMARY,
|
|
313
298
|
TOPIC_PARAM_TITLE,
|
|
314
299
|
TRUE_EMPTY_RESPONSE_MESSAGE,
|
|
315
300
|
TerminalQuotaError,
|
|
316
|
-
ToolConfirmationOutcome,
|
|
317
|
-
ToolErrorType,
|
|
318
301
|
TranscriptionFactory,
|
|
319
|
-
TrustLevel,
|
|
320
302
|
UPDATE_TOPIC_DISPLAY_NAME,
|
|
321
303
|
UPDATE_TOPIC_TOOL_NAME,
|
|
322
304
|
UnauthorizedError,
|
|
@@ -328,7 +310,6 @@ import {
|
|
|
328
310
|
WEB_FETCH_DISPLAY_NAME,
|
|
329
311
|
WEB_SEARCH_DISPLAY_NAME,
|
|
330
312
|
WRITE_FILE_DISPLAY_NAME,
|
|
331
|
-
WarningPriority,
|
|
332
313
|
WhisperModelManager,
|
|
333
314
|
addMCPStatusChangeListener,
|
|
334
315
|
allowEditorTypeInSandbox,
|
|
@@ -437,7 +418,7 @@ import {
|
|
|
437
418
|
validatePlanContent,
|
|
438
419
|
validatePlanPath,
|
|
439
420
|
writeToStdout
|
|
440
|
-
} from "./chunk-
|
|
421
|
+
} from "./chunk-YYWWE5GW.js";
|
|
441
422
|
import "./chunk-664ZODQF.js";
|
|
442
423
|
import "./chunk-IUUIT4SU.js";
|
|
443
424
|
import "./chunk-TUDYL3X4.js";
|
|
@@ -5063,7 +5044,7 @@ function calculateShellMaxLines(options) {
|
|
|
5063
5044
|
if (isAlternateBuffer && isThisShellFocused2 && !constrainHeight) {
|
|
5064
5045
|
return maxLinesBasedOnHeight;
|
|
5065
5046
|
}
|
|
5066
|
-
const isExecuting = status ===
|
|
5047
|
+
const isExecuting = status === "executing" /* Executing */;
|
|
5067
5048
|
const shellMaxLinesLimit = isExecuting ? ACTIVE_SHELL_MAX_LINES - SHELL_CONTENT_OVERHEAD : COMPLETED_SHELL_MAX_LINES - SHELL_CONTENT_OVERHEAD;
|
|
5068
5049
|
return Math.min(maxLinesBasedOnHeight, shellMaxLinesLimit);
|
|
5069
5050
|
}
|
|
@@ -5097,10 +5078,10 @@ function isShellTool(name) {
|
|
|
5097
5078
|
return name === SHELL_COMMAND_NAME || name === SHELL_NAME || name === SHELL_TOOL_NAME || normalized === "shell";
|
|
5098
5079
|
}
|
|
5099
5080
|
function isThisShellFocusable(name, status, config) {
|
|
5100
|
-
return !!(isShellTool(name) && status ===
|
|
5081
|
+
return !!(isShellTool(name) && status === "executing" /* Executing */ && config?.getEnableInteractiveShell());
|
|
5101
5082
|
}
|
|
5102
5083
|
function isThisShellFocused(name, status, ptyId, activeShellPtyId, embeddedShellFocused) {
|
|
5103
|
-
return !!(isShellTool(name) && status ===
|
|
5084
|
+
return !!(isShellTool(name) && status === "executing" /* Executing */ && ptyId === activeShellPtyId && embeddedShellFocused);
|
|
5104
5085
|
}
|
|
5105
5086
|
function useFocusHint(isThisShellFocusable2, isThisShellFocused2, resultDisplay) {
|
|
5106
5087
|
const [userHasFocused, setUserHasFocused] = (0, import_react9.useState)(false);
|
|
@@ -5260,13 +5241,13 @@ var formatToolArgs = (args) => {
|
|
|
5260
5241
|
var SubagentProgressDisplay = ({ progress, terminalWidth, historyOverrides }) => {
|
|
5261
5242
|
let headerText;
|
|
5262
5243
|
let headerColor = theme.text.secondary;
|
|
5263
|
-
if (progress.state ===
|
|
5244
|
+
if (progress.state === "cancelled" /* CANCELLED */) {
|
|
5264
5245
|
headerText = `Subagent ${progress.agentName} was cancelled.`;
|
|
5265
5246
|
headerColor = theme.status.warning;
|
|
5266
|
-
} else if (progress.state ===
|
|
5247
|
+
} else if (progress.state === "error" /* ERROR */) {
|
|
5267
5248
|
headerText = `Subagent ${progress.agentName} failed.`;
|
|
5268
5249
|
headerColor = theme.status.error;
|
|
5269
|
-
} else if (progress.state ===
|
|
5250
|
+
} else if (progress.state === "completed" /* COMPLETED */) {
|
|
5270
5251
|
headerText = `Subagent ${progress.agentName} completed.`;
|
|
5271
5252
|
headerColor = theme.status.success;
|
|
5272
5253
|
} else {
|
|
@@ -5286,7 +5267,7 @@ var SubagentProgressDisplay = ({ progress, terminalWidth, historyOverrides }) =>
|
|
|
5286
5267
|
/* @__PURE__ */ (0, import_jsx_runtime15.jsx)(Box_default, { flexGrow: 1, children: /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(Text, { color, children: item.content }) })
|
|
5287
5268
|
] }, item.id);
|
|
5288
5269
|
} else if (item.type === "tool_call") {
|
|
5289
|
-
const statusSymbol = item.status ===
|
|
5270
|
+
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 });
|
|
5290
5271
|
const formattedArgs = item.description || formatToolArgs(item.args);
|
|
5291
5272
|
const displayArgs = formattedArgs.length > 60 ? formattedArgs.slice(0, 60) + "..." : formattedArgs;
|
|
5292
5273
|
return /* @__PURE__ */ (0, import_jsx_runtime15.jsxs)(Box_default, { flexDirection: "row", children: [
|
|
@@ -5297,7 +5278,7 @@ var SubagentProgressDisplay = ({ progress, terminalWidth, historyOverrides }) =>
|
|
|
5297
5278
|
{
|
|
5298
5279
|
bold: true,
|
|
5299
5280
|
color: theme.text.primary,
|
|
5300
|
-
strikethrough: item.status ===
|
|
5281
|
+
strikethrough: item.status === "cancelled" /* CANCELLED */,
|
|
5301
5282
|
children: item.displayName || item.content
|
|
5302
5283
|
}
|
|
5303
5284
|
),
|
|
@@ -5306,7 +5287,7 @@ var SubagentProgressDisplay = ({ progress, terminalWidth, historyOverrides }) =>
|
|
|
5306
5287
|
{
|
|
5307
5288
|
color: theme.text.secondary,
|
|
5308
5289
|
wrap: "truncate",
|
|
5309
|
-
strikethrough: item.status ===
|
|
5290
|
+
strikethrough: item.status === "cancelled" /* CANCELLED */,
|
|
5310
5291
|
children: displayArgs
|
|
5311
5292
|
}
|
|
5312
5293
|
) })
|
|
@@ -5326,7 +5307,7 @@ var SubagentProgressDisplay = ({ progress, terminalWidth, historyOverrides }) =>
|
|
|
5326
5307
|
MarkdownDisplay,
|
|
5327
5308
|
{
|
|
5328
5309
|
text: safeJsonToMarkdown(progress.result),
|
|
5329
|
-
isPending: progress.state !==
|
|
5310
|
+
isPending: progress.state !== "completed" /* COMPLETED */,
|
|
5330
5311
|
terminalWidth
|
|
5331
5312
|
}
|
|
5332
5313
|
)
|
|
@@ -5680,14 +5661,14 @@ var ToolActionsProvider = (props) => {
|
|
|
5680
5661
|
}
|
|
5681
5662
|
const details = tool.confirmationDetails;
|
|
5682
5663
|
if (details?.type === "edit" && isDiffingEnabled && "filePath" in details) {
|
|
5683
|
-
const cliOutcome = outcome ===
|
|
5664
|
+
const cliOutcome = outcome === "cancel" /* Cancel */ ? "rejected" : "accepted";
|
|
5684
5665
|
await ideClient?.resolveDiffFromCli(details.filePath, cliOutcome);
|
|
5685
5666
|
}
|
|
5686
5667
|
if (tool.correlationId) {
|
|
5687
5668
|
await config.getMessageBus().publish({
|
|
5688
|
-
type:
|
|
5669
|
+
type: "tool-confirmation-response" /* TOOL_CONFIRMATION_RESPONSE */,
|
|
5689
5670
|
correlationId: tool.correlationId,
|
|
5690
|
-
confirmed: outcome !==
|
|
5671
|
+
confirmed: outcome !== "cancel" /* Cancel */,
|
|
5691
5672
|
requiresUserConfirmation: false,
|
|
5692
5673
|
outcome,
|
|
5693
5674
|
payload
|
|
@@ -5706,7 +5687,7 @@ var ToolActionsProvider = (props) => {
|
|
|
5706
5687
|
);
|
|
5707
5688
|
const cancel = (0, import_react12.useCallback)(
|
|
5708
5689
|
async (callId) => {
|
|
5709
|
-
await confirm(callId,
|
|
5690
|
+
await confirm(callId, "cancel" /* Cancel */);
|
|
5710
5691
|
},
|
|
5711
5692
|
[confirm]
|
|
5712
5693
|
);
|
|
@@ -5825,7 +5806,7 @@ var ToolMessage = ({
|
|
|
5825
5806
|
paddingX: 1,
|
|
5826
5807
|
flexDirection: "column",
|
|
5827
5808
|
children: [
|
|
5828
|
-
status ===
|
|
5809
|
+
status === "executing" /* Executing */ && progress !== void 0 && /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(
|
|
5829
5810
|
McpProgressIndicator,
|
|
5830
5811
|
{
|
|
5831
5812
|
progress,
|
|
@@ -5842,8 +5823,8 @@ var ToolMessage = ({
|
|
|
5842
5823
|
terminalWidth,
|
|
5843
5824
|
renderOutputAsMarkdown,
|
|
5844
5825
|
hasFocus: isThisShellFocused2,
|
|
5845
|
-
maxLines: kind ===
|
|
5846
|
-
overflowDirection: kind ===
|
|
5826
|
+
maxLines: kind === "agent" /* Agent */ && availableTerminalHeight !== void 0 ? SUBAGENT_MAX_LINES : void 0,
|
|
5827
|
+
overflowDirection: kind === "agent" /* Agent */ ? "bottom" : "top"
|
|
5847
5828
|
}
|
|
5848
5829
|
),
|
|
5849
5830
|
isThisShellFocused2 && config && /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(Box_default, { paddingLeft: STATUS_INDICATOR_WIDTH, marginTop: 1, children: /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(
|
|
@@ -6159,7 +6140,7 @@ function getInitialTrustState(settings, cwd5, isCurrentWorkspace) {
|
|
|
6159
6140
|
settings.merged,
|
|
6160
6141
|
process3.cwd()
|
|
6161
6142
|
);
|
|
6162
|
-
const isInheritedTrust = isTrusted && (!explicitTrustLevel || explicitTrustLevel ===
|
|
6143
|
+
const isInheritedTrust = isTrusted && (!explicitTrustLevel || explicitTrustLevel === "DO_NOT_TRUST" /* DO_NOT_TRUST */);
|
|
6163
6144
|
return {
|
|
6164
6145
|
currentTrustLevel: explicitTrustLevel,
|
|
6165
6146
|
isInheritedTrustFromParent: !!(source === "file" && isInheritedTrust),
|
|
@@ -6204,7 +6185,7 @@ var usePermissionsModifyTrust = (onExit, addItem, targetDirectory) => {
|
|
|
6204
6185
|
process3.cwd(),
|
|
6205
6186
|
newConfig
|
|
6206
6187
|
);
|
|
6207
|
-
if (trustLevel ===
|
|
6188
|
+
if (trustLevel === "DO_NOT_TRUST" /* DO_NOT_TRUST */ && isTrusted) {
|
|
6208
6189
|
let message = "Note: This folder is still trusted because the connected IDE workspace is trusted.";
|
|
6209
6190
|
if (source === "file") {
|
|
6210
6191
|
message = "Note: This folder is still trusted because a parent folder is trusted.";
|
|
@@ -6278,18 +6259,18 @@ function PermissionsModifyTrustDialog({
|
|
|
6278
6259
|
const TRUST_LEVEL_ITEMS = [
|
|
6279
6260
|
{
|
|
6280
6261
|
label: `Trust this folder (${dirName})`,
|
|
6281
|
-
value:
|
|
6282
|
-
key:
|
|
6262
|
+
value: "TRUST_FOLDER" /* TRUST_FOLDER */,
|
|
6263
|
+
key: "TRUST_FOLDER" /* TRUST_FOLDER */
|
|
6283
6264
|
},
|
|
6284
6265
|
{
|
|
6285
6266
|
label: `Trust parent folder (${parentFolder})`,
|
|
6286
|
-
value:
|
|
6287
|
-
key:
|
|
6267
|
+
value: "TRUST_PARENT" /* TRUST_PARENT */,
|
|
6268
|
+
key: "TRUST_PARENT" /* TRUST_PARENT */
|
|
6288
6269
|
},
|
|
6289
6270
|
{
|
|
6290
6271
|
label: "Don't trust",
|
|
6291
|
-
value:
|
|
6292
|
-
key:
|
|
6272
|
+
value: "DO_NOT_TRUST" /* DO_NOT_TRUST */,
|
|
6273
|
+
key: "DO_NOT_TRUST" /* DO_NOT_TRUST */
|
|
6293
6274
|
}
|
|
6294
6275
|
];
|
|
6295
6276
|
const {
|
|
@@ -6529,7 +6510,7 @@ var ShellToolMessage = ({
|
|
|
6529
6510
|
maxLinesLimit: maxLines
|
|
6530
6511
|
});
|
|
6531
6512
|
import_react17.default.useEffect(() => {
|
|
6532
|
-
const isExecuting = status ===
|
|
6513
|
+
const isExecuting = status === "executing" /* Executing */;
|
|
6533
6514
|
if (isExecuting && ptyId) {
|
|
6534
6515
|
try {
|
|
6535
6516
|
const childWidth = terminalWidth - 4;
|
|
@@ -6742,13 +6723,13 @@ var SubagentGroupDisplay = ({
|
|
|
6742
6723
|
const singleAgent = toolCalls[0].resultDisplay;
|
|
6743
6724
|
if (isSubagentProgress(singleAgent)) {
|
|
6744
6725
|
switch (singleAgent.state) {
|
|
6745
|
-
case
|
|
6726
|
+
case "completed" /* COMPLETED */:
|
|
6746
6727
|
headerText = "Agent Completed";
|
|
6747
6728
|
break;
|
|
6748
|
-
case
|
|
6729
|
+
case "cancelled" /* CANCELLED */:
|
|
6749
6730
|
headerText = "Agent Cancelled";
|
|
6750
6731
|
break;
|
|
6751
|
-
case
|
|
6732
|
+
case "error" /* ERROR */:
|
|
6752
6733
|
headerText = "Agent Error";
|
|
6753
6734
|
break;
|
|
6754
6735
|
default:
|
|
@@ -6764,8 +6745,8 @@ var SubagentGroupDisplay = ({
|
|
|
6764
6745
|
for (const tc of toolCalls) {
|
|
6765
6746
|
const progress = tc.resultDisplay;
|
|
6766
6747
|
if (isSubagentProgress(progress)) {
|
|
6767
|
-
if (progress.state ===
|
|
6768
|
-
else if (progress.state ===
|
|
6748
|
+
if (progress.state === "completed" /* COMPLETED */) completedCount++;
|
|
6749
|
+
else if (progress.state === "running" /* RUNNING */) runningCount++;
|
|
6769
6750
|
} else {
|
|
6770
6751
|
runningCount++;
|
|
6771
6752
|
}
|
|
@@ -6844,7 +6825,7 @@ var SubagentGroupDisplay = ({
|
|
|
6844
6825
|
if (!isExpanded) {
|
|
6845
6826
|
let content = "Starting...";
|
|
6846
6827
|
let formattedArgs;
|
|
6847
|
-
if (progress.state ===
|
|
6828
|
+
if (progress.state === "completed" /* COMPLETED */) {
|
|
6848
6829
|
if (progress.terminateReason && progress.terminateReason !== "GOAL") {
|
|
6849
6830
|
content = `Finished Early (${progress.terminateReason})`;
|
|
6850
6831
|
} else {
|
|
@@ -6858,17 +6839,17 @@ var SubagentGroupDisplay = ({
|
|
|
6858
6839
|
formattedArgs = formatToolArgs(lastActivity.args);
|
|
6859
6840
|
}
|
|
6860
6841
|
}
|
|
6861
|
-
const displayArgs = progress.state ===
|
|
6842
|
+
const displayArgs = progress.state === "completed" /* COMPLETED */ ? "" : formattedArgs;
|
|
6862
6843
|
const renderStatusIcon = () => {
|
|
6863
|
-
const state = progress.state ??
|
|
6844
|
+
const state = progress.state ?? "running" /* RUNNING */;
|
|
6864
6845
|
switch (state) {
|
|
6865
|
-
case
|
|
6846
|
+
case "running" /* RUNNING */:
|
|
6866
6847
|
return /* @__PURE__ */ (0, import_jsx_runtime25.jsx)(Text, { color: theme.text.primary, children: "!" });
|
|
6867
|
-
case
|
|
6848
|
+
case "completed" /* COMPLETED */:
|
|
6868
6849
|
return /* @__PURE__ */ (0, import_jsx_runtime25.jsx)(Text, { color: theme.status.success, children: "\u2713" });
|
|
6869
|
-
case
|
|
6850
|
+
case "cancelled" /* CANCELLED */:
|
|
6870
6851
|
return /* @__PURE__ */ (0, import_jsx_runtime25.jsx)(Text, { color: theme.status.warning, children: "\u2139" });
|
|
6871
|
-
case
|
|
6852
|
+
case "error" /* ERROR */:
|
|
6872
6853
|
return /* @__PURE__ */ (0, import_jsx_runtime25.jsx)(Text, { color: theme.status.error, children: "\u2717" });
|
|
6873
6854
|
default:
|
|
6874
6855
|
return checkExhaustive(state);
|
|
@@ -6921,22 +6902,22 @@ var hasPayload = (res) => {
|
|
|
6921
6902
|
function getFileOpData(diff, status, resultDisplay, terminalWidth, availableTerminalHeight, isClickable) {
|
|
6922
6903
|
const added = (diff.diffStat?.model_added_lines ?? 0) + (diff.diffStat?.user_added_lines ?? 0);
|
|
6923
6904
|
const removed = (diff.diffStat?.model_removed_lines ?? 0) + (diff.diffStat?.user_removed_lines ?? 0);
|
|
6924
|
-
const isAcceptedOrConfirming = status ===
|
|
6905
|
+
const isAcceptedOrConfirming = status === "success" /* Success */ || status === "executing" /* Executing */ || status === "awaiting_approval" /* AwaitingApproval */;
|
|
6925
6906
|
const addColor = isAcceptedOrConfirming ? theme.status.success : theme.text.secondary;
|
|
6926
6907
|
const removeColor = isAcceptedOrConfirming ? theme.status.error : theme.text.secondary;
|
|
6927
6908
|
const showDiffStat = !!diff.diffStat;
|
|
6928
6909
|
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 }) });
|
|
6929
6910
|
let resultSummary = "";
|
|
6930
6911
|
let resultColor = theme.text.secondary;
|
|
6931
|
-
if (status ===
|
|
6912
|
+
if (status === "awaiting_approval" /* AwaitingApproval */) {
|
|
6932
6913
|
resultSummary = "Confirming";
|
|
6933
|
-
} else if (status ===
|
|
6914
|
+
} else if (status === "success" /* Success */ || status === "executing" /* Executing */) {
|
|
6934
6915
|
resultSummary = "Accepted";
|
|
6935
6916
|
resultColor = theme.text.accent;
|
|
6936
|
-
} else if (status ===
|
|
6917
|
+
} else if (status === "cancelled" /* Cancelled */) {
|
|
6937
6918
|
resultSummary = "Rejected";
|
|
6938
6919
|
resultColor = theme.status.error;
|
|
6939
|
-
} else if (status ===
|
|
6920
|
+
} else if (status === "error" /* Error */) {
|
|
6940
6921
|
resultSummary = typeof resultDisplay === "string" ? resultDisplay : "Failed";
|
|
6941
6922
|
resultColor = theme.status.error;
|
|
6942
6923
|
}
|
|
@@ -6967,7 +6948,7 @@ function getFileOpData(diff, status, resultDisplay, terminalWidth, availableTerm
|
|
|
6967
6948
|
filename: diff.fileName,
|
|
6968
6949
|
terminalWidth: terminalWidth - PAYLOAD_MARGIN_LEFT,
|
|
6969
6950
|
availableTerminalHeight,
|
|
6970
|
-
disableColor: status ===
|
|
6951
|
+
disableColor: status === "cancelled" /* Cancelled */
|
|
6971
6952
|
}
|
|
6972
6953
|
);
|
|
6973
6954
|
return { description, summary, payload };
|
|
@@ -7095,10 +7076,10 @@ var DenseToolMessage = (props) => {
|
|
|
7095
7076
|
if (isGrepResult(resultDisplay)) {
|
|
7096
7077
|
return getGenericSuccessData(resultDisplay, originalDescription);
|
|
7097
7078
|
}
|
|
7098
|
-
if (status ===
|
|
7079
|
+
if (status === "success" /* Success */ && resultDisplay) {
|
|
7099
7080
|
return getGenericSuccessData(resultDisplay, originalDescription);
|
|
7100
7081
|
}
|
|
7101
|
-
if (status ===
|
|
7082
|
+
if (status === "error" /* Error */) {
|
|
7102
7083
|
const text = typeof resultDisplay === "string" ? resultDisplay.replace(/\n/g, " ") : "Failed";
|
|
7103
7084
|
const errorSummary = /* @__PURE__ */ (0, import_jsx_runtime26.jsxs)(Text, { color: theme.status.error, wrap: "truncate-end", children: [
|
|
7104
7085
|
"\u2192 ",
|
|
@@ -7139,7 +7120,7 @@ var DenseToolMessage = (props) => {
|
|
|
7139
7120
|
language: fileExtension,
|
|
7140
7121
|
maxWidth: terminalWidth - PAYLOAD_MARGIN_LEFT,
|
|
7141
7122
|
settings,
|
|
7142
|
-
disableColor: status ===
|
|
7123
|
+
disableColor: status === "cancelled" /* Cancelled */,
|
|
7143
7124
|
returnLines: true
|
|
7144
7125
|
});
|
|
7145
7126
|
} else {
|
|
@@ -7147,7 +7128,7 @@ var DenseToolMessage = (props) => {
|
|
|
7147
7128
|
parsedLines,
|
|
7148
7129
|
filename: diff.fileName,
|
|
7149
7130
|
terminalWidth: terminalWidth - PAYLOAD_MARGIN_LEFT,
|
|
7150
|
-
disableColor: status ===
|
|
7131
|
+
disableColor: status === "cancelled" /* Cancelled */
|
|
7151
7132
|
});
|
|
7152
7133
|
}
|
|
7153
7134
|
}, [diff, isExpanded, isAlternateBuffer, terminalWidth, settings, status]);
|
|
@@ -7277,7 +7258,7 @@ function isToolExecuting(pendingHistoryItems) {
|
|
|
7277
7258
|
return pendingHistoryItems.some((item) => {
|
|
7278
7259
|
if (item && item.type === "tool_group") {
|
|
7279
7260
|
return item.tools.some(
|
|
7280
|
-
(tool) =>
|
|
7261
|
+
(tool) => "executing" /* Executing */ === tool.status
|
|
7281
7262
|
);
|
|
7282
7263
|
}
|
|
7283
7264
|
return false;
|
|
@@ -7286,7 +7267,7 @@ function isToolExecuting(pendingHistoryItems) {
|
|
|
7286
7267
|
function isToolAwaitingConfirmation(pendingHistoryItems) {
|
|
7287
7268
|
return pendingHistoryItems.filter((item) => item.type === "tool_group").some(
|
|
7288
7269
|
(item) => item.tools.some(
|
|
7289
|
-
(tool) =>
|
|
7270
|
+
(tool) => "awaiting_approval" /* AwaitingApproval */ === tool.status
|
|
7290
7271
|
)
|
|
7291
7272
|
);
|
|
7292
7273
|
}
|
|
@@ -7309,14 +7290,14 @@ function getToolGroupBorderAppearance(item, activeShellPtyId, embeddedShellFocus
|
|
|
7309
7290
|
if (isTrackedToolCall(t)) {
|
|
7310
7291
|
return t.status !== "success" && t.status !== "error" && t.status !== "cancelled";
|
|
7311
7292
|
} else {
|
|
7312
|
-
return t.status !==
|
|
7293
|
+
return t.status !== "success" /* Success */ && t.status !== "error" /* Error */ && t.status !== "cancelled" /* Cancelled */;
|
|
7313
7294
|
}
|
|
7314
7295
|
});
|
|
7315
7296
|
const isEmbeddedShellFocused = toolsToInspect.some((t) => {
|
|
7316
7297
|
if (isTrackedToolCall(t)) {
|
|
7317
7298
|
return isShellTool(t.request.name) && t.status === "executing" && t.pid === activeShellPtyId && !!embeddedShellFocused;
|
|
7318
7299
|
} else {
|
|
7319
|
-
return isShellTool(t.name) && t.status ===
|
|
7300
|
+
return isShellTool(t.name) && t.status === "executing" /* Executing */ && t.ptyId === activeShellPtyId && !!embeddedShellFocused;
|
|
7320
7301
|
}
|
|
7321
7302
|
});
|
|
7322
7303
|
const isShellCommand = toolsToInspect.some((t) => {
|
|
@@ -7415,7 +7396,7 @@ var ToolGroupMessage = ({
|
|
|
7415
7396
|
const groupedTools = (0, import_react21.useMemo)(() => {
|
|
7416
7397
|
const groups = [];
|
|
7417
7398
|
for (const tool of visibleToolCalls) {
|
|
7418
|
-
if (tool.kind ===
|
|
7399
|
+
if (tool.kind === "agent" /* Agent */) {
|
|
7419
7400
|
const lastGroup = groups[groups.length - 1];
|
|
7420
7401
|
if (Array.isArray(lastGroup)) {
|
|
7421
7402
|
lastGroup.push(tool);
|
|
@@ -7470,7 +7451,7 @@ var ToolGroupMessage = ({
|
|
|
7470
7451
|
}, [groupedTools, isCompactModeEnabled, borderTopOverride]);
|
|
7471
7452
|
let countToolCallsWithResults = 0;
|
|
7472
7453
|
for (const tool of visibleToolCalls) {
|
|
7473
|
-
if (tool.kind !==
|
|
7454
|
+
if (tool.kind !== "agent" /* Agent */) {
|
|
7474
7455
|
if (isCompactTool(tool, isCompactModeEnabled)) {
|
|
7475
7456
|
if (hasDensePayload(tool)) {
|
|
7476
7457
|
countToolCallsWithResults++;
|
|
@@ -7644,7 +7625,7 @@ var ToolGroupDisplay = ({
|
|
|
7644
7625
|
}
|
|
7645
7626
|
const { tools, borderColor, borderDimColor, borderTop, borderBottom } = item;
|
|
7646
7627
|
const visibleTools = tools.filter(
|
|
7647
|
-
(t) => t.status !==
|
|
7628
|
+
(t) => t.status !== "awaiting_approval" /* AwaitingApproval */
|
|
7648
7629
|
);
|
|
7649
7630
|
const noticeTools = visibleTools.filter((t) => t.format === "notice");
|
|
7650
7631
|
const otherTools = visibleTools.filter(
|
|
@@ -7846,18 +7827,18 @@ function CompressionMessage({
|
|
|
7846
7827
|
return "Compressing chat history";
|
|
7847
7828
|
}
|
|
7848
7829
|
switch (compressionStatus) {
|
|
7849
|
-
case
|
|
7830
|
+
case 1 /* COMPRESSED */:
|
|
7850
7831
|
return `Chat history compressed from ${originalTokens} to ${newTokens} tokens.`;
|
|
7851
|
-
case
|
|
7832
|
+
case 2 /* COMPRESSION_FAILED_INFLATED_TOKEN_COUNT */:
|
|
7852
7833
|
if (originalTokens < 5e4) {
|
|
7853
7834
|
return "Compression was not beneficial for this history size.";
|
|
7854
7835
|
}
|
|
7855
7836
|
return "Chat history compression did not reduce size. This may indicate issues with the compression prompt.";
|
|
7856
|
-
case
|
|
7837
|
+
case 3 /* COMPRESSION_FAILED_TOKEN_COUNT_ERROR */:
|
|
7857
7838
|
return "Could not compress chat history due to a token counting error.";
|
|
7858
|
-
case
|
|
7839
|
+
case 4 /* COMPRESSION_FAILED_EMPTY_SUMMARY */:
|
|
7859
7840
|
return "Chat history compression failed: the model returned an empty summary.";
|
|
7860
|
-
case
|
|
7841
|
+
case 5 /* NOOP */:
|
|
7861
7842
|
return "Nothing to compress.";
|
|
7862
7843
|
default:
|
|
7863
7844
|
return "";
|
|
@@ -8295,8 +8276,8 @@ var ModelUsageTable = ({ models }) => {
|
|
|
8295
8276
|
);
|
|
8296
8277
|
roleEntries.sort(([a], [b]) => {
|
|
8297
8278
|
if (a === b) return 0;
|
|
8298
|
-
if (a ===
|
|
8299
|
-
if (b ===
|
|
8279
|
+
if (a === "main" /* MAIN */) return -1;
|
|
8280
|
+
if (b === "main" /* MAIN */) return 1;
|
|
8300
8281
|
return a.localeCompare(b);
|
|
8301
8282
|
});
|
|
8302
8283
|
roleEntries.forEach(([role, roleMetrics]) => {
|
|
@@ -8627,8 +8608,8 @@ var ModelStatsDisplay = ({
|
|
|
8627
8608
|
return validRoles.includes(role);
|
|
8628
8609
|
}).sort((a, b) => {
|
|
8629
8610
|
if (a === b) return 0;
|
|
8630
|
-
if (a ===
|
|
8631
|
-
if (b ===
|
|
8611
|
+
if (a === "main" /* MAIN */) return -1;
|
|
8612
|
+
if (b === "main" /* MAIN */) return 1;
|
|
8632
8613
|
return a.localeCompare(b);
|
|
8633
8614
|
});
|
|
8634
8615
|
const createRow = (metric, getValue, options = {}) => {
|
|
@@ -9419,7 +9400,7 @@ var McpStatus = ({
|
|
|
9419
9400
|
);
|
|
9420
9401
|
const originalStatus = serverStatus(serverName);
|
|
9421
9402
|
const hasCachedItems = serverTools.length > 0 || serverPrompts.length > 0 || serverResources.length > 0;
|
|
9422
|
-
const status = originalStatus ===
|
|
9403
|
+
const status = originalStatus === "disconnected" /* DISCONNECTED */ && hasCachedItems ? "connected" /* CONNECTED */ : originalStatus;
|
|
9423
9404
|
let statusIndicator = "";
|
|
9424
9405
|
let statusText = "";
|
|
9425
9406
|
let statusColor = theme.text.primary;
|
|
@@ -9431,17 +9412,17 @@ var McpStatus = ({
|
|
|
9431
9412
|
statusColor = theme.text.secondary;
|
|
9432
9413
|
} else {
|
|
9433
9414
|
switch (status) {
|
|
9434
|
-
case
|
|
9415
|
+
case "connected" /* CONNECTED */:
|
|
9435
9416
|
statusIndicator = "\u{1F7E2}";
|
|
9436
9417
|
statusText = "Ready";
|
|
9437
9418
|
statusColor = theme.status.success;
|
|
9438
9419
|
break;
|
|
9439
|
-
case
|
|
9420
|
+
case "connecting" /* CONNECTING */:
|
|
9440
9421
|
statusIndicator = "\u{1F504}";
|
|
9441
9422
|
statusText = "Starting... (first startup may take longer)";
|
|
9442
9423
|
statusColor = theme.status.warning;
|
|
9443
9424
|
break;
|
|
9444
|
-
case
|
|
9425
|
+
case "disconnected" /* DISCONNECTED */:
|
|
9445
9426
|
default:
|
|
9446
9427
|
statusIndicator = "\u{1F534}";
|
|
9447
9428
|
statusText = "Disconnected";
|
|
@@ -9489,12 +9470,12 @@ var McpStatus = ({
|
|
|
9489
9470
|
/* @__PURE__ */ (0, import_jsx_runtime48.jsxs)(Text, { children: [
|
|
9490
9471
|
" - ",
|
|
9491
9472
|
statusText,
|
|
9492
|
-
status ===
|
|
9473
|
+
status === "connected" /* CONNECTED */ && parts.length > 0 && ` (${parts.join(", ")})`
|
|
9493
9474
|
] }),
|
|
9494
9475
|
authStatusNode
|
|
9495
9476
|
] }),
|
|
9496
|
-
status ===
|
|
9497
|
-
status ===
|
|
9477
|
+
status === "connecting" /* CONNECTING */ && /* @__PURE__ */ (0, import_jsx_runtime48.jsx)(Text, { children: " (tools and prompts will appear when ready)" }),
|
|
9478
|
+
status === "disconnected" /* DISCONNECTED */ && toolCount > 0 && /* @__PURE__ */ (0, import_jsx_runtime48.jsxs)(Text, { children: [
|
|
9498
9479
|
" (",
|
|
9499
9480
|
toolCount,
|
|
9500
9481
|
" tools cached)"
|
|
@@ -10055,7 +10036,7 @@ var Notifications = () => {
|
|
|
10055
10036
|
if (dismissed) return [];
|
|
10056
10037
|
const counts = persistentState.get("startupWarningCounts") || {};
|
|
10057
10038
|
return startupWarnings.filter((w) => {
|
|
10058
|
-
if (w.priority ===
|
|
10039
|
+
if (w.priority === "low" /* Low */) {
|
|
10059
10040
|
const count = counts[w.id] || 0;
|
|
10060
10041
|
return count < MAX_STARTUP_WARNING_SHOW_COUNT;
|
|
10061
10042
|
}
|
|
@@ -10068,7 +10049,7 @@ var Notifications = () => {
|
|
|
10068
10049
|
const counts = { ...persistentState.get("startupWarningCounts") || {} };
|
|
10069
10050
|
let changed = false;
|
|
10070
10051
|
visibleWarnings.forEach((w) => {
|
|
10071
|
-
if (w.priority ===
|
|
10052
|
+
if (w.priority === "low" /* Low */) {
|
|
10072
10053
|
counts[w.id] = (counts[w.id] || 0) + 1;
|
|
10073
10054
|
changed = true;
|
|
10074
10055
|
}
|
|
@@ -10175,7 +10156,7 @@ var UserIdentity = ({ config }) => {
|
|
|
10175
10156
|
}
|
|
10176
10157
|
return /* @__PURE__ */ (0, import_jsx_runtime58.jsxs)(Box_default, { flexDirection: "column", children: [
|
|
10177
10158
|
/* @__PURE__ */ (0, import_jsx_runtime58.jsxs)(Box_default, { children: [
|
|
10178
|
-
/* @__PURE__ */ (0, import_jsx_runtime58.jsx)(Text, { color: theme.text.primary, wrap: "truncate-end", children: authType ===
|
|
10159
|
+
/* @__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: [
|
|
10179
10160
|
/* @__PURE__ */ (0, import_jsx_runtime58.jsxs)(Text, { bold: true, children: [
|
|
10180
10161
|
"Signed in with Google",
|
|
10181
10162
|
email ? ":" : ""
|
|
@@ -10418,7 +10399,7 @@ var import_react32 = __toESM(require_react(), 1);
|
|
|
10418
10399
|
function getConfirmingToolState(pendingHistoryItems) {
|
|
10419
10400
|
const allPendingTools = getAllToolCalls(pendingHistoryItems);
|
|
10420
10401
|
const confirmingTools = allPendingTools.filter(
|
|
10421
|
-
(tool) => tool.status ===
|
|
10402
|
+
(tool) => tool.status === "awaiting_approval" /* AwaitingApproval */
|
|
10422
10403
|
);
|
|
10423
10404
|
if (confirmingTools.length === 0) {
|
|
10424
10405
|
return null;
|
|
@@ -11726,7 +11707,7 @@ var ExitPlanModeDialog = ({
|
|
|
11726
11707
|
{
|
|
11727
11708
|
questions: [
|
|
11728
11709
|
{
|
|
11729
|
-
type:
|
|
11710
|
+
type: "choice" /* CHOICE */,
|
|
11730
11711
|
header: "Approval",
|
|
11731
11712
|
question: planContent,
|
|
11732
11713
|
options: [
|
|
@@ -11747,9 +11728,9 @@ var ExitPlanModeDialog = ({
|
|
|
11747
11728
|
onSubmit: (answers) => {
|
|
11748
11729
|
const answer = answers["0"];
|
|
11749
11730
|
if (answer === "Yes, automatically accept edits" /* Auto */) {
|
|
11750
|
-
onApprove(
|
|
11731
|
+
onApprove("autoEdit" /* AUTO_EDIT */);
|
|
11751
11732
|
} else if (answer === "Yes, manually accept edits" /* Manual */) {
|
|
11752
|
-
onApprove(
|
|
11733
|
+
onApprove("default" /* DEFAULT */);
|
|
11753
11734
|
} else if (answer) {
|
|
11754
11735
|
onFeedback(answer);
|
|
11755
11736
|
}
|
|
@@ -11960,7 +11941,7 @@ ${deceptiveUrlWarnings.map(
|
|
|
11960
11941
|
);
|
|
11961
11942
|
(0, import_react37.useEffect)(() => {
|
|
11962
11943
|
if (isCancelling) {
|
|
11963
|
-
handleConfirm(
|
|
11944
|
+
handleConfirm("cancel" /* Cancel */);
|
|
11964
11945
|
}
|
|
11965
11946
|
}, [isCancelling, handleConfirm]);
|
|
11966
11947
|
const handleSelect = (0, import_react37.useCallback)(
|
|
@@ -11973,19 +11954,19 @@ ${deceptiveUrlWarnings.map(
|
|
|
11973
11954
|
if (!confirmationDetails.isModifying) {
|
|
11974
11955
|
options2.push({
|
|
11975
11956
|
label: "Allow once",
|
|
11976
|
-
value:
|
|
11957
|
+
value: "proceed_once" /* ProceedOnce */,
|
|
11977
11958
|
key: "Allow once"
|
|
11978
11959
|
});
|
|
11979
11960
|
if (isTrustedFolder) {
|
|
11980
11961
|
options2.push({
|
|
11981
11962
|
label: "Allow for this session",
|
|
11982
|
-
value:
|
|
11963
|
+
value: "proceed_always" /* ProceedAlways */,
|
|
11983
11964
|
key: "Allow for this session"
|
|
11984
11965
|
});
|
|
11985
11966
|
if (allowPermanentApproval) {
|
|
11986
11967
|
options2.push({
|
|
11987
11968
|
label: "Allow for this file in all future sessions",
|
|
11988
|
-
value:
|
|
11969
|
+
value: "proceed_always_and_save" /* ProceedAlwaysAndSave */,
|
|
11989
11970
|
key: "Allow for this file in all future sessions"
|
|
11990
11971
|
});
|
|
11991
11972
|
}
|
|
@@ -11993,119 +11974,119 @@ ${deceptiveUrlWarnings.map(
|
|
|
11993
11974
|
if (!config.getIdeMode() || !isDiffingEnabled) {
|
|
11994
11975
|
options2.push({
|
|
11995
11976
|
label: "Modify with external editor",
|
|
11996
|
-
value:
|
|
11977
|
+
value: "modify_with_editor" /* ModifyWithEditor */,
|
|
11997
11978
|
key: "Modify with external editor"
|
|
11998
11979
|
});
|
|
11999
11980
|
}
|
|
12000
11981
|
options2.push({
|
|
12001
11982
|
label: "No, suggest changes (esc)",
|
|
12002
|
-
value:
|
|
11983
|
+
value: "cancel" /* Cancel */,
|
|
12003
11984
|
key: "No, suggest changes (esc)"
|
|
12004
11985
|
});
|
|
12005
11986
|
}
|
|
12006
11987
|
} else if (confirmationDetails.type === "sandbox_expansion") {
|
|
12007
11988
|
options2.push({
|
|
12008
11989
|
label: "Allow once",
|
|
12009
|
-
value:
|
|
11990
|
+
value: "proceed_once" /* ProceedOnce */,
|
|
12010
11991
|
key: "Allow once"
|
|
12011
11992
|
});
|
|
12012
11993
|
if (isTrustedFolder) {
|
|
12013
11994
|
options2.push({
|
|
12014
11995
|
label: "Allow for this session",
|
|
12015
|
-
value:
|
|
11996
|
+
value: "proceed_always" /* ProceedAlways */,
|
|
12016
11997
|
key: "Allow for this session"
|
|
12017
11998
|
});
|
|
12018
11999
|
if (allowPermanentApproval) {
|
|
12019
12000
|
options2.push({
|
|
12020
12001
|
label: "Allow for all future sessions",
|
|
12021
|
-
value:
|
|
12002
|
+
value: "proceed_always_and_save" /* ProceedAlwaysAndSave */,
|
|
12022
12003
|
key: "Allow for all future sessions"
|
|
12023
12004
|
});
|
|
12024
12005
|
}
|
|
12025
12006
|
}
|
|
12026
12007
|
options2.push({
|
|
12027
12008
|
label: "No, suggest changes (esc)",
|
|
12028
|
-
value:
|
|
12009
|
+
value: "cancel" /* Cancel */,
|
|
12029
12010
|
key: "No, suggest changes (esc)"
|
|
12030
12011
|
});
|
|
12031
12012
|
} else if (confirmationDetails.type === "exec") {
|
|
12032
12013
|
options2.push({
|
|
12033
12014
|
label: "Allow once",
|
|
12034
|
-
value:
|
|
12015
|
+
value: "proceed_once" /* ProceedOnce */,
|
|
12035
12016
|
key: "Allow once"
|
|
12036
12017
|
});
|
|
12037
12018
|
if (isTrustedFolder) {
|
|
12038
12019
|
options2.push({
|
|
12039
12020
|
label: `Allow for this session`,
|
|
12040
|
-
value:
|
|
12021
|
+
value: "proceed_always" /* ProceedAlways */,
|
|
12041
12022
|
key: `Allow for this session`
|
|
12042
12023
|
});
|
|
12043
12024
|
if (allowPermanentApproval) {
|
|
12044
12025
|
options2.push({
|
|
12045
12026
|
label: `Allow this command for all future sessions`,
|
|
12046
|
-
value:
|
|
12027
|
+
value: "proceed_always_and_save" /* ProceedAlwaysAndSave */,
|
|
12047
12028
|
key: `Allow for all future sessions`
|
|
12048
12029
|
});
|
|
12049
12030
|
}
|
|
12050
12031
|
}
|
|
12051
12032
|
options2.push({
|
|
12052
12033
|
label: "No, suggest changes (esc)",
|
|
12053
|
-
value:
|
|
12034
|
+
value: "cancel" /* Cancel */,
|
|
12054
12035
|
key: "No, suggest changes (esc)"
|
|
12055
12036
|
});
|
|
12056
12037
|
} else if (confirmationDetails.type === "info") {
|
|
12057
12038
|
options2.push({
|
|
12058
12039
|
label: "Allow once",
|
|
12059
|
-
value:
|
|
12040
|
+
value: "proceed_once" /* ProceedOnce */,
|
|
12060
12041
|
key: "Allow once"
|
|
12061
12042
|
});
|
|
12062
12043
|
if (isTrustedFolder) {
|
|
12063
12044
|
options2.push({
|
|
12064
12045
|
label: "Allow for this session",
|
|
12065
|
-
value:
|
|
12046
|
+
value: "proceed_always" /* ProceedAlways */,
|
|
12066
12047
|
key: "Allow for this session"
|
|
12067
12048
|
});
|
|
12068
12049
|
if (allowPermanentApproval) {
|
|
12069
12050
|
options2.push({
|
|
12070
12051
|
label: "Allow for all future sessions",
|
|
12071
|
-
value:
|
|
12052
|
+
value: "proceed_always_and_save" /* ProceedAlwaysAndSave */,
|
|
12072
12053
|
key: "Allow for all future sessions"
|
|
12073
12054
|
});
|
|
12074
12055
|
}
|
|
12075
12056
|
}
|
|
12076
12057
|
options2.push({
|
|
12077
12058
|
label: "No, suggest changes (esc)",
|
|
12078
|
-
value:
|
|
12059
|
+
value: "cancel" /* Cancel */,
|
|
12079
12060
|
key: "No, suggest changes (esc)"
|
|
12080
12061
|
});
|
|
12081
12062
|
} else if (confirmationDetails.type === "mcp") {
|
|
12082
12063
|
options2.push({
|
|
12083
12064
|
label: "Allow once",
|
|
12084
|
-
value:
|
|
12065
|
+
value: "proceed_once" /* ProceedOnce */,
|
|
12085
12066
|
key: "Allow once"
|
|
12086
12067
|
});
|
|
12087
12068
|
if (isTrustedFolder) {
|
|
12088
12069
|
options2.push({
|
|
12089
12070
|
label: "Allow tool for this session",
|
|
12090
|
-
value:
|
|
12071
|
+
value: "proceed_always_tool" /* ProceedAlwaysTool */,
|
|
12091
12072
|
key: "Allow tool for this session"
|
|
12092
12073
|
});
|
|
12093
12074
|
options2.push({
|
|
12094
12075
|
label: "Allow all server tools for this session",
|
|
12095
|
-
value:
|
|
12076
|
+
value: "proceed_always_server" /* ProceedAlwaysServer */,
|
|
12096
12077
|
key: "Allow all server tools for this session"
|
|
12097
12078
|
});
|
|
12098
12079
|
if (allowPermanentApproval) {
|
|
12099
12080
|
options2.push({
|
|
12100
12081
|
label: "Allow tool for all future sessions",
|
|
12101
|
-
value:
|
|
12082
|
+
value: "proceed_always_and_save" /* ProceedAlwaysAndSave */,
|
|
12102
12083
|
key: "Allow tool for all future sessions"
|
|
12103
12084
|
});
|
|
12104
12085
|
}
|
|
12105
12086
|
}
|
|
12106
12087
|
options2.push({
|
|
12107
12088
|
label: "No, suggest changes (esc)",
|
|
12108
|
-
value:
|
|
12089
|
+
value: "cancel" /* Cancel */,
|
|
12109
12090
|
key: "No, suggest changes (esc)"
|
|
12110
12091
|
});
|
|
12111
12092
|
}
|
|
@@ -12144,7 +12125,7 @@ ${deceptiveUrlWarnings.map(
|
|
|
12144
12125
|
const containsRedirection = commandsToDisplay.some(
|
|
12145
12126
|
(cmd) => hasRedirection(cmd)
|
|
12146
12127
|
);
|
|
12147
|
-
const isAutoEdit = config.getApprovalMode() ===
|
|
12128
|
+
const isAutoEdit = config.getApprovalMode() === "yolo" /* YOLO */ || config.getApprovalMode() === "autoEdit" /* AUTO_EDIT */;
|
|
12148
12129
|
if (containsRedirection && !isAutoEdit) {
|
|
12149
12130
|
extraInfoLines = 1;
|
|
12150
12131
|
}
|
|
@@ -12170,7 +12151,7 @@ ${deceptiveUrlWarnings.map(
|
|
|
12170
12151
|
const isSafeToPersist = confirmationDetails.type === "info" || confirmationDetails.type === "edit" || confirmationDetails.type === "mcp";
|
|
12171
12152
|
if (isSafeToPersist && settings.merged.security.autoAddToPolicyByDefault) {
|
|
12172
12153
|
const alwaysAndSaveIndex = options2.findIndex(
|
|
12173
|
-
(o) => o.value ===
|
|
12154
|
+
(o) => o.value === "proceed_always_and_save" /* ProceedAlwaysAndSave */
|
|
12174
12155
|
);
|
|
12175
12156
|
if (alwaysAndSaveIndex !== -1) {
|
|
12176
12157
|
initialIndex2 = alwaysAndSaveIndex;
|
|
@@ -12187,10 +12168,10 @@ ${deceptiveUrlWarnings.map(
|
|
|
12187
12168
|
{
|
|
12188
12169
|
questions: confirmationDetails.questions,
|
|
12189
12170
|
onSubmit: (answers) => {
|
|
12190
|
-
handleConfirm(
|
|
12171
|
+
handleConfirm("proceed_once" /* ProceedOnce */, { answers });
|
|
12191
12172
|
},
|
|
12192
12173
|
onCancel: () => {
|
|
12193
|
-
handleConfirm(
|
|
12174
|
+
handleConfirm("cancel" /* Cancel */);
|
|
12194
12175
|
},
|
|
12195
12176
|
width: terminalWidth,
|
|
12196
12177
|
availableHeight: bodyHeight
|
|
@@ -12211,19 +12192,19 @@ ${deceptiveUrlWarnings.map(
|
|
|
12211
12192
|
planPath: confirmationDetails.planPath,
|
|
12212
12193
|
getPreferredEditor,
|
|
12213
12194
|
onApprove: (approvalMode) => {
|
|
12214
|
-
handleConfirm(
|
|
12195
|
+
handleConfirm("proceed_once" /* ProceedOnce */, {
|
|
12215
12196
|
approved: true,
|
|
12216
12197
|
approvalMode
|
|
12217
12198
|
});
|
|
12218
12199
|
},
|
|
12219
12200
|
onFeedback: (feedback) => {
|
|
12220
|
-
handleConfirm(
|
|
12201
|
+
handleConfirm("proceed_once" /* ProceedOnce */, {
|
|
12221
12202
|
approved: false,
|
|
12222
12203
|
feedback
|
|
12223
12204
|
});
|
|
12224
12205
|
},
|
|
12225
12206
|
onCancel: () => {
|
|
12226
|
-
handleConfirm(
|
|
12207
|
+
handleConfirm("cancel" /* Cancel */);
|
|
12227
12208
|
},
|
|
12228
12209
|
width: terminalWidth,
|
|
12229
12210
|
availableHeight: bodyHeight
|
|
@@ -12332,7 +12313,7 @@ ${deceptiveUrlWarnings.map(
|
|
|
12332
12313
|
const containsRedirection = commandsToDisplay.some(
|
|
12333
12314
|
(cmd) => hasRedirection(cmd)
|
|
12334
12315
|
);
|
|
12335
|
-
const isAutoEdit = config.getApprovalMode() ===
|
|
12316
|
+
const isAutoEdit = config.getApprovalMode() === "yolo" /* YOLO */ || config.getApprovalMode() === "autoEdit" /* AUTO_EDIT */;
|
|
12336
12317
|
let warnings = null;
|
|
12337
12318
|
if (containsRedirection && !isAutoEdit) {
|
|
12338
12319
|
const tipText = `To auto-accept, press ${formatCommand("app.cycleApprovalMode" /* CYCLE_APPROVAL_MODE */)}`;
|
|
@@ -12491,7 +12472,7 @@ ${deceptiveUrlWarnings.map(
|
|
|
12491
12472
|
const bodyOverflowDirection = confirmationDetails.type === "mcp" && isMcpToolDetailsExpanded ? "bottom" : "top";
|
|
12492
12473
|
const renderRadioItem = (0, import_react37.useCallback)(
|
|
12493
12474
|
(item, { titleColor }) => {
|
|
12494
|
-
if (item.value ===
|
|
12475
|
+
if (item.value === "proceed_always_and_save" /* ProceedAlwaysAndSave */) {
|
|
12495
12476
|
return /* @__PURE__ */ (0, import_jsx_runtime65.jsxs)(Text, { color: titleColor, wrap: "truncate", children: [
|
|
12496
12477
|
item.label,
|
|
12497
12478
|
" ",
|
|
@@ -14521,7 +14502,7 @@ async function validateAuthMethodWithSettings(authType, settings) {
|
|
|
14521
14502
|
if (settings.merged.security.auth.useExternal) {
|
|
14522
14503
|
return null;
|
|
14523
14504
|
}
|
|
14524
|
-
if (authType ===
|
|
14505
|
+
if (authType === "gemini-api-key" /* USE_GEMINI */) {
|
|
14525
14506
|
return null;
|
|
14526
14507
|
}
|
|
14527
14508
|
return validateAuthMethod(authType);
|
|
@@ -14573,7 +14554,7 @@ var useAuthCommand = (settings, config, initialAuthError = null, initialAccountS
|
|
|
14573
14554
|
}
|
|
14574
14555
|
return;
|
|
14575
14556
|
}
|
|
14576
|
-
if (authType ===
|
|
14557
|
+
if (authType === "gemini-api-key" /* USE_GEMINI */) {
|
|
14577
14558
|
const key = await reloadApiKey();
|
|
14578
14559
|
if (!key) {
|
|
14579
14560
|
setAuthState("awaiting_api_key_input" /* AwaitingApiKeyInput */);
|
|
@@ -14651,31 +14632,31 @@ function AuthDialog({
|
|
|
14651
14632
|
let items = [
|
|
14652
14633
|
{
|
|
14653
14634
|
label: "Sign in with Google",
|
|
14654
|
-
value:
|
|
14655
|
-
key:
|
|
14635
|
+
value: "oauth-personal" /* LOGIN_WITH_GOOGLE */,
|
|
14636
|
+
key: "oauth-personal" /* LOGIN_WITH_GOOGLE */
|
|
14656
14637
|
},
|
|
14657
14638
|
...process.env["CLOUD_SHELL"] === "true" ? [
|
|
14658
14639
|
{
|
|
14659
14640
|
label: "Use Cloud Shell user credentials",
|
|
14660
|
-
value:
|
|
14661
|
-
key:
|
|
14641
|
+
value: "compute-default-credentials" /* COMPUTE_ADC */,
|
|
14642
|
+
key: "compute-default-credentials" /* COMPUTE_ADC */
|
|
14662
14643
|
}
|
|
14663
14644
|
] : process.env["GEMINI_CLI_USE_COMPUTE_ADC"] === "true" ? [
|
|
14664
14645
|
{
|
|
14665
14646
|
label: "Use metadata server application default credentials",
|
|
14666
|
-
value:
|
|
14667
|
-
key:
|
|
14647
|
+
value: "compute-default-credentials" /* COMPUTE_ADC */,
|
|
14648
|
+
key: "compute-default-credentials" /* COMPUTE_ADC */
|
|
14668
14649
|
}
|
|
14669
14650
|
] : [],
|
|
14670
14651
|
{
|
|
14671
14652
|
label: "Use Gemini API Key",
|
|
14672
|
-
value:
|
|
14673
|
-
key:
|
|
14653
|
+
value: "gemini-api-key" /* USE_GEMINI */,
|
|
14654
|
+
key: "gemini-api-key" /* USE_GEMINI */
|
|
14674
14655
|
},
|
|
14675
14656
|
{
|
|
14676
14657
|
label: "Vertex AI",
|
|
14677
|
-
value:
|
|
14678
|
-
key:
|
|
14658
|
+
value: "vertex-ai" /* USE_VERTEX_AI */,
|
|
14659
|
+
key: "vertex-ai" /* USE_VERTEX_AI */
|
|
14679
14660
|
}
|
|
14680
14661
|
];
|
|
14681
14662
|
if (settings.merged.security.auth.enforcedType) {
|
|
@@ -14697,9 +14678,9 @@ function AuthDialog({
|
|
|
14697
14678
|
return item.value === defaultAuthType;
|
|
14698
14679
|
}
|
|
14699
14680
|
if (process.env["GEMINI_API_KEY"]) {
|
|
14700
|
-
return item.value ===
|
|
14681
|
+
return item.value === "gemini-api-key" /* USE_GEMINI */;
|
|
14701
14682
|
}
|
|
14702
|
-
return item.value ===
|
|
14683
|
+
return item.value === "oauth-personal" /* LOGIN_WITH_GOOGLE */;
|
|
14703
14684
|
});
|
|
14704
14685
|
if (settings.merged.security.auth.enforcedType) {
|
|
14705
14686
|
initialAuthIndex = 0;
|
|
@@ -14710,7 +14691,7 @@ function AuthDialog({
|
|
|
14710
14691
|
return;
|
|
14711
14692
|
}
|
|
14712
14693
|
if (authType) {
|
|
14713
|
-
const needsRestart = authType ===
|
|
14694
|
+
const needsRestart = authType === "oauth-personal" /* LOGIN_WITH_GOOGLE */ || authType === "vertex-ai" /* USE_VERTEX_AI */ && process.env["CLOUD_SHELL"] === "true";
|
|
14714
14695
|
if (needsRestart) {
|
|
14715
14696
|
setAuthContext({ requiresRestart: true });
|
|
14716
14697
|
} else {
|
|
@@ -14718,12 +14699,12 @@ function AuthDialog({
|
|
|
14718
14699
|
}
|
|
14719
14700
|
await clearCachedCredentialFile();
|
|
14720
14701
|
settings.setValue(scope, "security.auth.selectedType", authType);
|
|
14721
|
-
if (authType ===
|
|
14702
|
+
if (authType === "oauth-personal" /* LOGIN_WITH_GOOGLE */ && config.isBrowserLaunchSuppressed()) {
|
|
14722
14703
|
setExiting(true);
|
|
14723
14704
|
setTimeout(relaunchApp, 100);
|
|
14724
14705
|
return;
|
|
14725
14706
|
}
|
|
14726
|
-
if (authType ===
|
|
14707
|
+
if (authType === "gemini-api-key" /* USE_GEMINI */) {
|
|
14727
14708
|
setAuthState("awaiting_api_key_input" /* AwaitingApiKeyInput */);
|
|
14728
14709
|
return;
|
|
14729
14710
|
}
|
|
@@ -15519,11 +15500,11 @@ var PrivacyNoticeText = ({
|
|
|
15519
15500
|
}) => {
|
|
15520
15501
|
const authType = config.getContentGeneratorConfig()?.authType;
|
|
15521
15502
|
switch (authType) {
|
|
15522
|
-
case
|
|
15503
|
+
case "gemini-api-key" /* USE_GEMINI */:
|
|
15523
15504
|
return /* @__PURE__ */ (0, import_jsx_runtime83.jsx)(GeminiPrivacyNotice, { onExit });
|
|
15524
|
-
case
|
|
15505
|
+
case "vertex-ai" /* USE_VERTEX_AI */:
|
|
15525
15506
|
return /* @__PURE__ */ (0, import_jsx_runtime83.jsx)(CloudPaidPrivacyNotice, { onExit });
|
|
15526
|
-
case
|
|
15507
|
+
case "oauth-personal" /* LOGIN_WITH_GOOGLE */:
|
|
15527
15508
|
default:
|
|
15528
15509
|
return /* @__PURE__ */ (0, import_jsx_runtime83.jsx)(CloudFreePrivacyNotice, { config, onExit });
|
|
15529
15510
|
}
|
|
@@ -15564,7 +15545,7 @@ function ProQuotaDialog({
|
|
|
15564
15545
|
value: "retry_always",
|
|
15565
15546
|
key: "retry_always"
|
|
15566
15547
|
},
|
|
15567
|
-
...authType ===
|
|
15548
|
+
...authType === "oauth-personal" /* LOGIN_WITH_GOOGLE */ && !isUltra ? [
|
|
15568
15549
|
{
|
|
15569
15550
|
label: "Upgrade for higher limits",
|
|
15570
15551
|
value: "upgrade",
|
|
@@ -16723,7 +16704,7 @@ function ModelDialog({ onClose }) {
|
|
|
16723
16704
|
const useGemini31 = config?.getGemini31LaunchedSync?.() ?? false;
|
|
16724
16705
|
const useGemini3_5Flash = config?.hasGemini35FlashGAAccess?.() ?? false;
|
|
16725
16706
|
const selectedAuthType = settings.merged.security.auth.selectedType;
|
|
16726
|
-
const useCustomToolModel = useGemini31 && selectedAuthType ===
|
|
16707
|
+
const useCustomToolModel = useGemini31 && selectedAuthType === "gemini-api-key" /* USE_GEMINI */;
|
|
16727
16708
|
const manualModelSelected = (0, import_react55.useMemo)(() => {
|
|
16728
16709
|
if (config?.getExperimentalDynamicModelConfiguration?.() === true && config.getModelConfigService) {
|
|
16729
16710
|
const def = config.getModelConfigService().getModelDefinition(preferredModel);
|
|
@@ -18046,10 +18027,10 @@ function initializeConsoleStore() {
|
|
|
18046
18027
|
globalConsoleMessages = [];
|
|
18047
18028
|
globalErrorCount = 0;
|
|
18048
18029
|
notifyListeners();
|
|
18049
|
-
coreEvents.off(
|
|
18050
|
-
coreEvents.off(
|
|
18051
|
-
coreEvents.on(
|
|
18052
|
-
coreEvents.on(
|
|
18030
|
+
coreEvents.off("console-log" /* ConsoleLog */, handleConsoleLog);
|
|
18031
|
+
coreEvents.off("output" /* Output */, handleOutput);
|
|
18032
|
+
coreEvents.on("console-log" /* ConsoleLog */, handleConsoleLog);
|
|
18033
|
+
coreEvents.on("output" /* Output */, handleOutput);
|
|
18053
18034
|
}
|
|
18054
18035
|
function notifyListeners() {
|
|
18055
18036
|
for (const listener of listeners) {
|
|
@@ -20186,7 +20167,7 @@ function usePromptCompletion({
|
|
|
20186
20167
|
{ model: "prompt-completion" },
|
|
20187
20168
|
contents,
|
|
20188
20169
|
signal,
|
|
20189
|
-
|
|
20170
|
+
"utility_autocomplete" /* UTILITY_AUTOCOMPLETE */
|
|
20190
20171
|
);
|
|
20191
20172
|
if (signal.aborted) {
|
|
20192
20173
|
return;
|
|
@@ -22264,9 +22245,9 @@ var InputPrompt = ({
|
|
|
22264
22245
|
onSuggestionsVisibilityChange(shouldShowSuggestions);
|
|
22265
22246
|
}
|
|
22266
22247
|
}, [shouldShowSuggestions, onSuggestionsVisibilityChange]);
|
|
22267
|
-
const showAutoAcceptStyling = !shellModeActive && approvalMode ===
|
|
22268
|
-
const showYoloStyling = !shellModeActive && approvalMode ===
|
|
22269
|
-
const showPlanStyling = !shellModeActive && approvalMode ===
|
|
22248
|
+
const showAutoAcceptStyling = !shellModeActive && approvalMode === "autoEdit" /* AUTO_EDIT */;
|
|
22249
|
+
const showYoloStyling = !shellModeActive && approvalMode === "yolo" /* YOLO */;
|
|
22250
|
+
const showPlanStyling = !shellModeActive && approvalMode === "plan" /* PLAN */;
|
|
22270
22251
|
let statusColor;
|
|
22271
22252
|
let statusText = "";
|
|
22272
22253
|
if (shellModeActive) {
|
|
@@ -23099,22 +23080,22 @@ var ApprovalModeIndicator = ({
|
|
|
23099
23080
|
const cycleHint = formatCommand("app.cycleApprovalMode" /* CYCLE_APPROVAL_MODE */);
|
|
23100
23081
|
const yoloHint = formatCommand("app.toggleYolo" /* TOGGLE_YOLO */);
|
|
23101
23082
|
switch (approvalMode) {
|
|
23102
|
-
case
|
|
23083
|
+
case "autoEdit" /* AUTO_EDIT */:
|
|
23103
23084
|
textColor = theme.status.warning;
|
|
23104
23085
|
textContent = "auto-accept edits";
|
|
23105
23086
|
subText = allowPlanMode ? `${cycleHint} to plan` : `${cycleHint} to manual`;
|
|
23106
23087
|
break;
|
|
23107
|
-
case
|
|
23088
|
+
case "plan" /* PLAN */:
|
|
23108
23089
|
textColor = theme.status.success;
|
|
23109
23090
|
textContent = "plan";
|
|
23110
23091
|
subText = `${cycleHint} to manual`;
|
|
23111
23092
|
break;
|
|
23112
|
-
case
|
|
23093
|
+
case "yolo" /* YOLO */:
|
|
23113
23094
|
textColor = theme.status.error;
|
|
23114
23095
|
textContent = "YOLO";
|
|
23115
23096
|
subText = yoloHint;
|
|
23116
23097
|
break;
|
|
23117
|
-
case
|
|
23098
|
+
case "default" /* DEFAULT */:
|
|
23118
23099
|
default:
|
|
23119
23100
|
textColor = theme.text.accent;
|
|
23120
23101
|
textContent = "";
|
|
@@ -23162,7 +23143,7 @@ var useComposerStatus = () => {
|
|
|
23162
23143
|
(item) => item.type === "tool_group"
|
|
23163
23144
|
).some(
|
|
23164
23145
|
(item) => item.tools.some(
|
|
23165
|
-
(tool) => tool.status ===
|
|
23146
|
+
(tool) => tool.status === "awaiting_approval" /* AwaitingApproval */
|
|
23166
23147
|
)
|
|
23167
23148
|
),
|
|
23168
23149
|
[uiState.pendingHistoryItems]
|
|
@@ -23177,13 +23158,13 @@ var useComposerStatus = () => {
|
|
|
23177
23158
|
const hideMinimalModeHintWhileBusy = !uiState.cleanUiDetailsVisible && (showLoadingIndicator || uiState.activeHooks.length > 0);
|
|
23178
23159
|
if (hideMinimalModeHintWhileBusy) return null;
|
|
23179
23160
|
switch (showApprovalModeIndicator) {
|
|
23180
|
-
case
|
|
23161
|
+
case "yolo" /* YOLO */:
|
|
23181
23162
|
return { text: "YOLO", color: theme.status.error };
|
|
23182
|
-
case
|
|
23163
|
+
case "plan" /* PLAN */:
|
|
23183
23164
|
return { text: "plan", color: theme.status.success };
|
|
23184
|
-
case
|
|
23165
|
+
case "autoEdit" /* AUTO_EDIT */:
|
|
23185
23166
|
return { text: "auto edit", color: theme.status.warning };
|
|
23186
|
-
case
|
|
23167
|
+
case "default" /* DEFAULT */:
|
|
23187
23168
|
default:
|
|
23188
23169
|
return null;
|
|
23189
23170
|
}
|
|
@@ -23537,7 +23518,7 @@ var ConfigInitDisplay = ({
|
|
|
23537
23518
|
let connected = 0;
|
|
23538
23519
|
const connecting = [];
|
|
23539
23520
|
for (const [name, client] of clients.entries()) {
|
|
23540
|
-
if (client.getStatus() ===
|
|
23521
|
+
if (client.getStatus() === "connected" /* CONNECTED */) {
|
|
23541
23522
|
connected++;
|
|
23542
23523
|
} else {
|
|
23543
23524
|
connecting.push(name);
|
|
@@ -23559,9 +23540,9 @@ var ConfigInitDisplay = ({
|
|
|
23559
23540
|
);
|
|
23560
23541
|
}
|
|
23561
23542
|
};
|
|
23562
|
-
coreEvents.on(
|
|
23543
|
+
coreEvents.on("mcp-client-update" /* McpClientUpdate */, onChange);
|
|
23563
23544
|
return () => {
|
|
23564
|
-
coreEvents.off(
|
|
23545
|
+
coreEvents.off("mcp-client-update" /* McpClientUpdate */, onChange);
|
|
23565
23546
|
};
|
|
23566
23547
|
}, [initialMessage]);
|
|
23567
23548
|
return /* @__PURE__ */ (0, import_jsx_runtime123.jsx)(Box_default, { marginTop: 1, children: /* @__PURE__ */ (0, import_jsx_runtime123.jsxs)(Text, { children: [
|
|
@@ -24278,7 +24259,7 @@ var useExecutionLifecycle = (addItemToHistory, setPendingHistoryItem, onExec, on
|
|
|
24278
24259
|
callId,
|
|
24279
24260
|
name: SHELL_COMMAND_NAME,
|
|
24280
24261
|
description: rawQuery,
|
|
24281
|
-
status:
|
|
24262
|
+
status: "executing" /* Executing */,
|
|
24282
24263
|
isClientInitiated: true,
|
|
24283
24264
|
resultDisplay: "",
|
|
24284
24265
|
confirmationDetails: void 0
|
|
@@ -24419,7 +24400,7 @@ __code=$?; pwd > ${escapedPwdFilePath}; exit $__code`;
|
|
|
24419
24400
|
mainContent = result.output.trim() || "(Command produced no output)";
|
|
24420
24401
|
}
|
|
24421
24402
|
let finalOutput = result.ansiOutput && result.ansiOutput.length > 0 ? result.ansiOutput : mainContent;
|
|
24422
|
-
let finalStatus =
|
|
24403
|
+
let finalStatus = "success" /* Success */;
|
|
24423
24404
|
const prependToAnsiOutput = (output, text) => {
|
|
24424
24405
|
const newLines = text.split("\n").map((line) => [
|
|
24425
24406
|
{
|
|
@@ -24438,20 +24419,20 @@ __code=$?; pwd > ${escapedPwdFilePath}; exit $__code`;
|
|
|
24438
24419
|
};
|
|
24439
24420
|
let prefix = "";
|
|
24440
24421
|
if (result.error) {
|
|
24441
|
-
finalStatus =
|
|
24422
|
+
finalStatus = "error" /* Error */;
|
|
24442
24423
|
prefix = result.error.message;
|
|
24443
24424
|
} else if (result.aborted) {
|
|
24444
|
-
finalStatus =
|
|
24425
|
+
finalStatus = "cancelled" /* Cancelled */;
|
|
24445
24426
|
prefix = "Command was cancelled.";
|
|
24446
24427
|
} else if (result.backgrounded) {
|
|
24447
|
-
finalStatus =
|
|
24428
|
+
finalStatus = "success" /* Success */;
|
|
24448
24429
|
finalOutput = `Command moved to background (PID: ${result.pid}). Output hidden. Press Ctrl+B to view.`;
|
|
24449
24430
|
mainContent = finalOutput;
|
|
24450
24431
|
} else if (result.signal) {
|
|
24451
|
-
finalStatus =
|
|
24432
|
+
finalStatus = "error" /* Error */;
|
|
24452
24433
|
prefix = `Command terminated by signal: ${result.signal}.`;
|
|
24453
24434
|
} else if (result.exitCode !== 0) {
|
|
24454
|
-
finalStatus =
|
|
24435
|
+
finalStatus = "error" /* Error */;
|
|
24455
24436
|
prefix = `Command exited with code ${result.exitCode}.`;
|
|
24456
24437
|
}
|
|
24457
24438
|
if (prefix) {
|
|
@@ -24477,7 +24458,7 @@ ${mainContent}`;
|
|
|
24477
24458
|
status: finalStatus,
|
|
24478
24459
|
resultDisplay: finalOutput
|
|
24479
24460
|
};
|
|
24480
|
-
if (finalStatus !==
|
|
24461
|
+
if (finalStatus !== "cancelled" /* Cancelled */) {
|
|
24481
24462
|
addItemToHistory(
|
|
24482
24463
|
{
|
|
24483
24464
|
type: "tool_group",
|
|
@@ -25467,12 +25448,12 @@ function useQuotaAndFallback({
|
|
|
25467
25448
|
error.retryDelayMs ? `Access resets at ${getResetTimeMessage(error.retryDelayMs)}.` : null,
|
|
25468
25449
|
`/stats model for usage details`,
|
|
25469
25450
|
`/model to switch models.`,
|
|
25470
|
-
contentGeneratorConfig?.authType ===
|
|
25451
|
+
contentGeneratorConfig?.authType === "oauth-personal" /* LOGIN_WITH_GOOGLE */ ? `/auth to switch to API key.` : null
|
|
25471
25452
|
].filter(Boolean);
|
|
25472
25453
|
message = messageLines.join("\n");
|
|
25473
25454
|
} else if (error instanceof ModelNotFoundError) {
|
|
25474
25455
|
isModelNotFoundError = true;
|
|
25475
|
-
if (contentGeneratorConfig?.authType ===
|
|
25456
|
+
if (contentGeneratorConfig?.authType === "vertex-ai" /* USE_VERTEX_AI */ && VALID_GEMINI_MODELS.has(failedModel)) {
|
|
25476
25457
|
const location = process.env["GOOGLE_CLOUD_LOCATION"] || "your configured region";
|
|
25477
25458
|
const messageLines = [
|
|
25478
25459
|
`Model "${failedModel}" is not available in region "${location}".`,
|
|
@@ -25664,7 +25645,7 @@ var useEditorSettings = (loadedSettings, setEditorError, addItem) => {
|
|
|
25664
25645
|
);
|
|
25665
25646
|
setEditorError(null);
|
|
25666
25647
|
setIsEditorDialogOpen(false);
|
|
25667
|
-
coreEvents.emit(
|
|
25648
|
+
coreEvents.emit("editor-selected" /* EditorSelected */, { editor: editorType });
|
|
25668
25649
|
} catch (error) {
|
|
25669
25650
|
setEditorError(`Failed to set editor preference: ${error}`);
|
|
25670
25651
|
}
|
|
@@ -25673,7 +25654,7 @@ var useEditorSettings = (loadedSettings, setEditorError, addItem) => {
|
|
|
25673
25654
|
);
|
|
25674
25655
|
const exitEditorDialog = (0, import_react91.useCallback)(() => {
|
|
25675
25656
|
setIsEditorDialogOpen(false);
|
|
25676
|
-
coreEvents.emit(
|
|
25657
|
+
coreEvents.emit("editor-selected" /* EditorSelected */, { editor: void 0 });
|
|
25677
25658
|
}, []);
|
|
25678
25659
|
return {
|
|
25679
25660
|
isEditorDialogOpen,
|
|
@@ -26050,7 +26031,7 @@ var useSlashCommandProcessor = (config, settings, addItem, clearItems, loadHisto
|
|
|
26050
26031
|
canonicalPath: resolvedCommandPath
|
|
26051
26032
|
} = parseSlashCommand(trimmed, commands);
|
|
26052
26033
|
if (!commandToExecute) {
|
|
26053
|
-
const isMcpLoading = config?.getMcpClientManager()?.getDiscoveryState() ===
|
|
26034
|
+
const isMcpLoading = config?.getMcpClientManager()?.getDiscoveryState() === "in_progress" /* IN_PROGRESS */;
|
|
26054
26035
|
if (isMcpLoading) {
|
|
26055
26036
|
setIsProcessing(true);
|
|
26056
26037
|
if (addToHistory) {
|
|
@@ -26230,7 +26211,7 @@ var useSlashCommandProcessor = (config, settings, addItem, clearItems, loadHisto
|
|
|
26230
26211
|
onConfirm: async (resolvedOutcome) => {
|
|
26231
26212
|
resolve3({
|
|
26232
26213
|
outcome: resolvedOutcome,
|
|
26233
|
-
approvedCommands: resolvedOutcome ===
|
|
26214
|
+
approvedCommands: resolvedOutcome === "cancel" /* Cancel */ ? [] : result.commandsToConfirm
|
|
26234
26215
|
});
|
|
26235
26216
|
}
|
|
26236
26217
|
};
|
|
@@ -26238,7 +26219,7 @@ var useSlashCommandProcessor = (config, settings, addItem, clearItems, loadHisto
|
|
|
26238
26219
|
callId,
|
|
26239
26220
|
name: "Expansion",
|
|
26240
26221
|
description: "Command expansion needs shell access",
|
|
26241
|
-
status:
|
|
26222
|
+
status: "awaiting_approval" /* AwaitingApproval */,
|
|
26242
26223
|
isClientInitiated: true,
|
|
26243
26224
|
resultDisplay: void 0,
|
|
26244
26225
|
confirmationDetails
|
|
@@ -26249,7 +26230,7 @@ var useSlashCommandProcessor = (config, settings, addItem, clearItems, loadHisto
|
|
|
26249
26230
|
});
|
|
26250
26231
|
});
|
|
26251
26232
|
setPendingItem(null);
|
|
26252
|
-
if (outcome ===
|
|
26233
|
+
if (outcome === "cancel" /* Cancel */ || !approvedCommands || approvedCommands.length === 0) {
|
|
26253
26234
|
addItem(
|
|
26254
26235
|
{
|
|
26255
26236
|
type: "info" /* INFO */,
|
|
@@ -26259,7 +26240,7 @@ var useSlashCommandProcessor = (config, settings, addItem, clearItems, loadHisto
|
|
|
26259
26240
|
);
|
|
26260
26241
|
return { type: "handled" };
|
|
26261
26242
|
}
|
|
26262
|
-
if (outcome ===
|
|
26243
|
+
if (outcome === "proceed_always" /* ProceedAlways */) {
|
|
26263
26244
|
setSessionShellAllowlist(
|
|
26264
26245
|
(prev) => /* @__PURE__ */ new Set([...prev, ...approvedCommands])
|
|
26265
26246
|
);
|
|
@@ -26735,7 +26716,7 @@ function mapToDisplay(toolOrTools, options = {}) {
|
|
|
26735
26716
|
let description;
|
|
26736
26717
|
let renderOutputAsMarkdown = false;
|
|
26737
26718
|
const displayName = call.tool?.displayName ?? call.request.name;
|
|
26738
|
-
if (call.status ===
|
|
26719
|
+
if (call.status === "error" /* Error */) {
|
|
26739
26720
|
description = JSON.stringify(call.request.args);
|
|
26740
26721
|
} else {
|
|
26741
26722
|
description = call.invocation.getDescription();
|
|
@@ -26758,27 +26739,27 @@ function mapToDisplay(toolOrTools, options = {}) {
|
|
|
26758
26739
|
let progress = void 0;
|
|
26759
26740
|
let progressTotal = void 0;
|
|
26760
26741
|
switch (call.status) {
|
|
26761
|
-
case
|
|
26742
|
+
case "success" /* Success */:
|
|
26762
26743
|
resultDisplay = call.response.resultDisplay;
|
|
26763
26744
|
outputFile = call.response.outputFile;
|
|
26764
26745
|
break;
|
|
26765
|
-
case
|
|
26766
|
-
case
|
|
26746
|
+
case "error" /* Error */:
|
|
26747
|
+
case "cancelled" /* Cancelled */:
|
|
26767
26748
|
resultDisplay = call.response.resultDisplay;
|
|
26768
26749
|
break;
|
|
26769
|
-
case
|
|
26750
|
+
case "awaiting_approval" /* AwaitingApproval */:
|
|
26770
26751
|
correlationId = call.correlationId;
|
|
26771
26752
|
confirmationDetails = call.confirmationDetails;
|
|
26772
26753
|
break;
|
|
26773
|
-
case
|
|
26754
|
+
case "executing" /* Executing */:
|
|
26774
26755
|
resultDisplay = call.liveOutput;
|
|
26775
26756
|
ptyId = call.pid;
|
|
26776
26757
|
progressMessage = call.progressMessage;
|
|
26777
26758
|
progress = call.progress;
|
|
26778
26759
|
progressTotal = call.progressTotal;
|
|
26779
26760
|
break;
|
|
26780
|
-
case
|
|
26781
|
-
case
|
|
26761
|
+
case "scheduled" /* Scheduled */:
|
|
26762
|
+
case "validating" /* Validating */:
|
|
26782
26763
|
break;
|
|
26783
26764
|
default: {
|
|
26784
26765
|
const exhaustiveCheck = call;
|
|
@@ -26849,7 +26830,7 @@ function useToolScheduler(onComplete, config, getPreferredEditor) {
|
|
|
26849
26830
|
const handler = (event) => {
|
|
26850
26831
|
const isRoot = event.schedulerId === ROOT_SCHEDULER_ID;
|
|
26851
26832
|
const hasExecuting = event.toolCalls.some(
|
|
26852
|
-
(tc) => tc.status ===
|
|
26833
|
+
(tc) => tc.status === "executing" /* Executing */ || (tc.status === "success" /* Success */ || tc.status === "error" /* Error */) && "tailToolCallRequest" in tc && tc.tailToolCallRequest != null
|
|
26853
26834
|
);
|
|
26854
26835
|
if (hasExecuting) {
|
|
26855
26836
|
setLastToolOutputTime(Date.now());
|
|
@@ -26858,7 +26839,7 @@ function useToolScheduler(onComplete, config, getPreferredEditor) {
|
|
|
26858
26839
|
const prevCalls = prev[event.schedulerId] ?? [];
|
|
26859
26840
|
const prevCallIds = new Set(prevCalls.map((tc) => tc.request.callId));
|
|
26860
26841
|
const filteredToolCalls = isRoot ? event.toolCalls : event.toolCalls.filter(
|
|
26861
|
-
(tc) => tc.status ===
|
|
26842
|
+
(tc) => tc.status === "awaiting_approval" /* AwaitingApproval */ || prevCallIds.has(tc.request.callId)
|
|
26862
26843
|
);
|
|
26863
26844
|
if (!isRoot && filteredToolCalls.length === 0 && prevCalls.length === 0) {
|
|
26864
26845
|
return prev;
|
|
@@ -26870,9 +26851,9 @@ function useToolScheduler(onComplete, config, getPreferredEditor) {
|
|
|
26870
26851
|
};
|
|
26871
26852
|
});
|
|
26872
26853
|
};
|
|
26873
|
-
messageBus.subscribe(
|
|
26854
|
+
messageBus.subscribe("tool-calls-update" /* TOOL_CALLS_UPDATE */, handler);
|
|
26874
26855
|
return () => {
|
|
26875
|
-
messageBus.unsubscribe(
|
|
26856
|
+
messageBus.unsubscribe("tool-calls-update" /* TOOL_CALLS_UPDATE */, handler);
|
|
26876
26857
|
};
|
|
26877
26858
|
}, [messageBus, internalAdaptToolCalls]);
|
|
26878
26859
|
(0, import_react98.useEffect)(() => {
|
|
@@ -26894,9 +26875,9 @@ function useToolScheduler(onComplete, config, getPreferredEditor) {
|
|
|
26894
26875
|
};
|
|
26895
26876
|
});
|
|
26896
26877
|
};
|
|
26897
|
-
messageBus.subscribe(
|
|
26878
|
+
messageBus.subscribe("subagent-activity" /* SUBAGENT_ACTIVITY */, handler);
|
|
26898
26879
|
return () => {
|
|
26899
|
-
messageBus.unsubscribe(
|
|
26880
|
+
messageBus.unsubscribe("subagent-activity" /* SUBAGENT_ACTIVITY */, handler);
|
|
26900
26881
|
};
|
|
26901
26882
|
}, [messageBus]);
|
|
26902
26883
|
const schedule = (0, import_react98.useCallback)(
|
|
@@ -26995,8 +26976,8 @@ function adaptToolCalls(coreCalls, prevTracked) {
|
|
|
26995
26976
|
const prev = prevMap.get(coreCall.request.callId);
|
|
26996
26977
|
const responseSubmittedToGemini = prev?.responseSubmittedToGemini ?? false;
|
|
26997
26978
|
let status = coreCall.status;
|
|
26998
|
-
if ((status ===
|
|
26999
|
-
status =
|
|
26979
|
+
if ((status === "success" /* Success */ || status === "error" /* Error */) && "tailToolCallRequest" in coreCall && coreCall.tailToolCallRequest != null) {
|
|
26980
|
+
status = "executing" /* Executing */;
|
|
27000
26981
|
}
|
|
27001
26982
|
return {
|
|
27002
26983
|
...coreCall,
|
|
@@ -27028,7 +27009,7 @@ function getBackgroundedToolInfo(toolCall) {
|
|
|
27028
27009
|
};
|
|
27029
27010
|
}
|
|
27030
27011
|
function isBackgroundableExecutingToolCall(toolCall) {
|
|
27031
|
-
return toolCall.status ===
|
|
27012
|
+
return toolCall.status === "executing" /* Executing */ && typeof toolCall.pid === "number";
|
|
27032
27013
|
}
|
|
27033
27014
|
function showCitations(settings) {
|
|
27034
27015
|
const enabled = settings.merged.ui.showCitations;
|
|
@@ -27038,14 +27019,14 @@ function showCitations(settings) {
|
|
|
27038
27019
|
return true;
|
|
27039
27020
|
}
|
|
27040
27021
|
function calculateStreamingState(isResponding, toolCalls) {
|
|
27041
|
-
if (toolCalls.some((tc) => tc.status ===
|
|
27022
|
+
if (toolCalls.some((tc) => tc.status === "awaiting_approval" /* AwaitingApproval */)) {
|
|
27042
27023
|
return "waiting_for_confirmation" /* WaitingForConfirmation */;
|
|
27043
27024
|
}
|
|
27044
27025
|
const isAnyToolActive = toolCalls.some((tc) => {
|
|
27045
|
-
if (tc.status ===
|
|
27026
|
+
if (tc.status === "executing" /* Executing */ || tc.status === "scheduled" /* Scheduled */ || tc.status === "validating" /* Validating */) {
|
|
27046
27027
|
return true;
|
|
27047
27028
|
}
|
|
27048
|
-
if (tc.status ===
|
|
27029
|
+
if (tc.status === "success" /* Success */ || tc.status === "error" /* Error */ || tc.status === "cancelled" /* Cancelled */) {
|
|
27049
27030
|
return !tc.responseSubmittedToGemini;
|
|
27050
27031
|
}
|
|
27051
27032
|
return false;
|
|
@@ -27091,9 +27072,9 @@ var useGeminiStream = (geminiClient, history, addItem, config, settings, onDebug
|
|
|
27091
27072
|
}
|
|
27092
27073
|
setRetryStatus(payload);
|
|
27093
27074
|
};
|
|
27094
|
-
coreEvents.on(
|
|
27075
|
+
coreEvents.on("retry-attempt" /* RetryAttempt */, handleRetryAttempt);
|
|
27095
27076
|
return () => {
|
|
27096
|
-
coreEvents.off(
|
|
27077
|
+
coreEvents.off("retry-attempt" /* RetryAttempt */, handleRetryAttempt);
|
|
27097
27078
|
};
|
|
27098
27079
|
}, [isRespondingRef]);
|
|
27099
27080
|
const [
|
|
@@ -27226,12 +27207,12 @@ var useGeminiStream = (geminiClient, history, addItem, config, settings, onDebug
|
|
|
27226
27207
|
const tc = toolCalls[i];
|
|
27227
27208
|
if (pushedToolCallIdsRef.current.has(tc.request.callId)) continue;
|
|
27228
27209
|
if (tc.status === "success" || tc.status === "error" || tc.status === "cancelled") {
|
|
27229
|
-
const isAgent = tc.tool?.kind ===
|
|
27210
|
+
const isAgent = tc.tool?.kind === "agent" /* Agent */;
|
|
27230
27211
|
if (isAgent) {
|
|
27231
27212
|
let contigAgentsComplete = true;
|
|
27232
27213
|
for (let j = i + 1; j < toolCalls.length; j++) {
|
|
27233
27214
|
const nextTc = toolCalls[j];
|
|
27234
|
-
if (nextTc.tool?.kind ===
|
|
27215
|
+
if (nextTc.tool?.kind === "agent" /* Agent */) {
|
|
27235
27216
|
if (nextTc.status !== "success" && nextTc.status !== "error" && nextTc.status !== "cancelled") {
|
|
27236
27217
|
contigAgentsComplete = false;
|
|
27237
27218
|
break;
|
|
@@ -27257,7 +27238,7 @@ var useGeminiStream = (geminiClient, history, addItem, config, settings, onDebug
|
|
|
27257
27238
|
let currentGroup = [];
|
|
27258
27239
|
for (const tc of toolsToPush) {
|
|
27259
27240
|
newPushed.add(tc.request.callId);
|
|
27260
|
-
if (tc.tool?.kind ===
|
|
27241
|
+
if (tc.tool?.kind === "agent" /* Agent */) {
|
|
27261
27242
|
currentGroup.push(tc);
|
|
27262
27243
|
} else {
|
|
27263
27244
|
if (currentGroup.length > 0) {
|
|
@@ -27407,7 +27388,7 @@ var useGeminiStream = (geminiClient, history, addItem, config, settings, onDebug
|
|
|
27407
27388
|
prevActiveShellPtyIdRef.current = activeShellPtyId;
|
|
27408
27389
|
}, [activeShellPtyId, addItem, setIsResponding]);
|
|
27409
27390
|
(0, import_react99.useEffect)(() => {
|
|
27410
|
-
if (config.getApprovalMode() ===
|
|
27391
|
+
if (config.getApprovalMode() === "yolo" /* YOLO */ && streamingState === "idle" /* Idle */) {
|
|
27411
27392
|
const lastUserMessageIndex = history.findLastIndex(
|
|
27412
27393
|
(item) => item.type === "user" /* USER */
|
|
27413
27394
|
);
|
|
@@ -27475,7 +27456,7 @@ var useGeminiStream = (geminiClient, history, addItem, config, settings, onDebug
|
|
|
27475
27456
|
return;
|
|
27476
27457
|
}
|
|
27477
27458
|
const hasActiveTools = toolCalls.some(
|
|
27478
|
-
(tc) => tc.status ===
|
|
27459
|
+
(tc) => tc.status === "executing" /* Executing */ || tc.status === "scheduled" /* Scheduled */ || tc.status === "validating" /* Validating */
|
|
27479
27460
|
);
|
|
27480
27461
|
if (streamingState === "idle" /* Idle */ && !isRespondingRef.current && !hasActiveTools) {
|
|
27481
27462
|
if (clearBuffer) {
|
|
@@ -27502,7 +27483,7 @@ var useGeminiStream = (geminiClient, history, addItem, config, settings, onDebug
|
|
|
27502
27483
|
if (tool.name === SHELL_COMMAND_NAME) {
|
|
27503
27484
|
return {
|
|
27504
27485
|
...tool,
|
|
27505
|
-
status:
|
|
27486
|
+
status: "cancelled" /* Cancelled */,
|
|
27506
27487
|
resultDisplay: tool.resultDisplay
|
|
27507
27488
|
};
|
|
27508
27489
|
}
|
|
@@ -27567,7 +27548,7 @@ var useGeminiStream = (geminiClient, history, addItem, config, settings, onDebug
|
|
|
27567
27548
|
let localQueryToSendToGemini = null;
|
|
27568
27549
|
if (typeof query === "string") {
|
|
27569
27550
|
const trimmedQuery = query.trim();
|
|
27570
|
-
await logger?.logMessage(
|
|
27551
|
+
await logger?.logMessage("user" /* USER */, trimmedQuery);
|
|
27571
27552
|
if (!shellModeActive) {
|
|
27572
27553
|
const slashCommandResult = isSlashCommand(trimmedQuery) ? await handleSlashCommand(trimmedQuery) : false;
|
|
27573
27554
|
if (slashCommandResult) {
|
|
@@ -27723,7 +27704,7 @@ var useGeminiStream = (geminiClient, history, addItem, config, settings, onDebug
|
|
|
27723
27704
|
if (pendingHistoryItemRef.current) {
|
|
27724
27705
|
if (pendingHistoryItemRef.current.type === "tool_group") {
|
|
27725
27706
|
const updatedTools = pendingHistoryItemRef.current.tools.map(
|
|
27726
|
-
(tool) => tool.status ===
|
|
27707
|
+
(tool) => tool.status === "validating" /* Validating */ || tool.status === "scheduled" /* Scheduled */ || tool.status === "awaiting_approval" /* AwaitingApproval */ || tool.status === "executing" /* Executing */ ? { ...tool, status: "cancelled" /* Cancelled */ } : tool
|
|
27727
27708
|
);
|
|
27728
27709
|
const pendingItem = {
|
|
27729
27710
|
...pendingHistoryItemRef.current,
|
|
@@ -28015,15 +27996,15 @@ var useGeminiStream = (geminiClient, history, addItem, config, settings, onDebug
|
|
|
28015
27996
|
let geminiMessageBuffer = "";
|
|
28016
27997
|
const toolCallRequests = [];
|
|
28017
27998
|
for await (const event of stream) {
|
|
28018
|
-
if (event.type !==
|
|
27999
|
+
if (event.type !== "thought" /* Thought */ && thoughtRef.current !== null) {
|
|
28019
28000
|
setThought(null);
|
|
28020
28001
|
}
|
|
28021
28002
|
switch (event.type) {
|
|
28022
|
-
case
|
|
28003
|
+
case "thought" /* Thought */:
|
|
28023
28004
|
setLastGeminiActivityTime(Date.now());
|
|
28024
28005
|
handleThoughtEvent(event.value, userMessageTimestamp);
|
|
28025
28006
|
break;
|
|
28026
|
-
case
|
|
28007
|
+
case "content" /* Content */:
|
|
28027
28008
|
setLastGeminiActivityTime(Date.now());
|
|
28028
28009
|
geminiMessageBuffer = handleContentEvent(
|
|
28029
28010
|
event.value,
|
|
@@ -28031,16 +28012,16 @@ var useGeminiStream = (geminiClient, history, addItem, config, settings, onDebug
|
|
|
28031
28012
|
userMessageTimestamp
|
|
28032
28013
|
);
|
|
28033
28014
|
break;
|
|
28034
|
-
case
|
|
28015
|
+
case "tool_call_request" /* ToolCallRequest */:
|
|
28035
28016
|
toolCallRequests.push(event.value);
|
|
28036
28017
|
break;
|
|
28037
|
-
case
|
|
28018
|
+
case "user_cancelled" /* UserCancelled */:
|
|
28038
28019
|
handleUserCancelledEvent(userMessageTimestamp);
|
|
28039
28020
|
break;
|
|
28040
|
-
case
|
|
28021
|
+
case "error" /* Error */:
|
|
28041
28022
|
handleErrorEvent(event.value, userMessageTimestamp);
|
|
28042
28023
|
break;
|
|
28043
|
-
case
|
|
28024
|
+
case "agent_execution_stopped" /* AgentExecutionStopped */:
|
|
28044
28025
|
handleAgentExecutionStoppedEvent(
|
|
28045
28026
|
event.value.reason,
|
|
28046
28027
|
userMessageTimestamp,
|
|
@@ -28048,7 +28029,7 @@ var useGeminiStream = (geminiClient, history, addItem, config, settings, onDebug
|
|
|
28048
28029
|
event.value.contextCleared
|
|
28049
28030
|
);
|
|
28050
28031
|
break;
|
|
28051
|
-
case
|
|
28032
|
+
case "agent_execution_blocked" /* AgentExecutionBlocked */:
|
|
28052
28033
|
handleAgentExecutionBlockedEvent(
|
|
28053
28034
|
event.value.reason,
|
|
28054
28035
|
userMessageTimestamp,
|
|
@@ -28056,36 +28037,36 @@ var useGeminiStream = (geminiClient, history, addItem, config, settings, onDebug
|
|
|
28056
28037
|
event.value.contextCleared
|
|
28057
28038
|
);
|
|
28058
28039
|
break;
|
|
28059
|
-
case
|
|
28040
|
+
case "chat_compressed" /* ChatCompressed */:
|
|
28060
28041
|
handleChatCompressionEvent(event.value, userMessageTimestamp);
|
|
28061
28042
|
break;
|
|
28062
|
-
case
|
|
28063
|
-
case
|
|
28043
|
+
case "tool_call_confirmation" /* ToolCallConfirmation */:
|
|
28044
|
+
case "tool_call_response" /* ToolCallResponse */:
|
|
28064
28045
|
break;
|
|
28065
|
-
case
|
|
28046
|
+
case "max_session_turns" /* MaxSessionTurns */:
|
|
28066
28047
|
handleMaxSessionTurnsEvent();
|
|
28067
28048
|
break;
|
|
28068
|
-
case
|
|
28049
|
+
case "context_window_will_overflow" /* ContextWindowWillOverflow */:
|
|
28069
28050
|
handleContextWindowWillOverflowEvent(
|
|
28070
28051
|
event.value.estimatedRequestTokenCount,
|
|
28071
28052
|
event.value.remainingTokenCount
|
|
28072
28053
|
);
|
|
28073
28054
|
break;
|
|
28074
|
-
case
|
|
28055
|
+
case "finished" /* Finished */:
|
|
28075
28056
|
handleFinishedEvent(event, userMessageTimestamp);
|
|
28076
28057
|
break;
|
|
28077
|
-
case
|
|
28058
|
+
case "citation" /* Citation */:
|
|
28078
28059
|
handleCitationEvent(event.value, userMessageTimestamp);
|
|
28079
28060
|
break;
|
|
28080
|
-
case
|
|
28061
|
+
case "model_info" /* ModelInfo */:
|
|
28081
28062
|
handleChatModelEvent(event.value, userMessageTimestamp);
|
|
28082
28063
|
break;
|
|
28083
|
-
case
|
|
28064
|
+
case "loop_detected" /* LoopDetected */:
|
|
28084
28065
|
loopDetectedRef.current = true;
|
|
28085
28066
|
break;
|
|
28086
|
-
case
|
|
28067
|
+
case "retry" /* Retry */:
|
|
28087
28068
|
break;
|
|
28088
|
-
case
|
|
28069
|
+
case "invalid_stream" /* InvalidStream */:
|
|
28089
28070
|
handleInvalidStreamEvent(event.value, userMessageTimestamp);
|
|
28090
28071
|
break;
|
|
28091
28072
|
default: {
|
|
@@ -28128,7 +28109,7 @@ var useGeminiStream = (geminiClient, history, addItem, config, settings, onDebug
|
|
|
28128
28109
|
const submitQuery = (0, import_react99.useCallback)(
|
|
28129
28110
|
async (query, options, prompt_id) => runInDevTraceSpan(
|
|
28130
28111
|
{
|
|
28131
|
-
operation: options?.isContinuation ?
|
|
28112
|
+
operation: options?.isContinuation ? "system_prompt" /* SystemPrompt */ : "user_prompt" /* UserPrompt */,
|
|
28132
28113
|
sessionId: config.getSessionId()
|
|
28133
28114
|
},
|
|
28134
28115
|
async ({ metadata: spanMetadata }) => {
|
|
@@ -28288,7 +28269,7 @@ var useGeminiStream = (geminiClient, history, addItem, config, settings, onDebug
|
|
|
28288
28269
|
);
|
|
28289
28270
|
const handleApprovalModeChange = (0, import_react99.useCallback)(
|
|
28290
28271
|
async (newApprovalMode) => {
|
|
28291
|
-
if (previousApprovalModeRef.current ===
|
|
28272
|
+
if (previousApprovalModeRef.current === "plan" /* PLAN */ && newApprovalMode !== "plan" /* PLAN */ && streamingState === "idle" /* Idle */) {
|
|
28292
28273
|
if (geminiClient) {
|
|
28293
28274
|
try {
|
|
28294
28275
|
await geminiClient.addHistory({
|
|
@@ -28311,11 +28292,11 @@ var useGeminiStream = (geminiClient, history, addItem, config, settings, onDebug
|
|
|
28311
28292
|
}
|
|
28312
28293
|
}
|
|
28313
28294
|
previousApprovalModeRef.current = newApprovalMode;
|
|
28314
|
-
if (newApprovalMode ===
|
|
28295
|
+
if (newApprovalMode === "yolo" /* YOLO */ || newApprovalMode === "autoEdit" /* AUTO_EDIT */) {
|
|
28315
28296
|
let awaitingApprovalCalls = toolCalls.filter(
|
|
28316
28297
|
(call) => call.status === "awaiting_approval" && !call.request.forcedAsk
|
|
28317
28298
|
);
|
|
28318
|
-
if (newApprovalMode ===
|
|
28299
|
+
if (newApprovalMode === "autoEdit" /* AUTO_EDIT */) {
|
|
28319
28300
|
awaitingApprovalCalls = awaitingApprovalCalls.filter((call) => {
|
|
28320
28301
|
if (EDIT_TOOL_NAMES.has(call.request.name)) {
|
|
28321
28302
|
return true;
|
|
@@ -28331,11 +28312,11 @@ var useGeminiStream = (geminiClient, history, addItem, config, settings, onDebug
|
|
|
28331
28312
|
if (call.correlationId) {
|
|
28332
28313
|
try {
|
|
28333
28314
|
await config.getMessageBus().publish({
|
|
28334
|
-
type:
|
|
28315
|
+
type: "tool-confirmation-response" /* TOOL_CONFIRMATION_RESPONSE */,
|
|
28335
28316
|
correlationId: call.correlationId,
|
|
28336
28317
|
confirmed: true,
|
|
28337
28318
|
requiresUserConfirmation: false,
|
|
28338
|
-
outcome:
|
|
28319
|
+
outcome: "proceed_once" /* ProceedOnce */
|
|
28339
28320
|
});
|
|
28340
28321
|
} catch (error) {
|
|
28341
28322
|
debugLogger.warn(
|
|
@@ -28426,14 +28407,14 @@ var useGeminiStream = (geminiClient, history, addItem, config, settings, onDebug
|
|
|
28426
28407
|
);
|
|
28427
28408
|
if (isLowErrorVerbosity) {
|
|
28428
28409
|
suppressedToolErrorCountRef.current += geminiTools.filter(
|
|
28429
|
-
(tc) => tc.status ===
|
|
28410
|
+
(tc) => tc.status === "error" /* Error */
|
|
28430
28411
|
).length;
|
|
28431
28412
|
}
|
|
28432
28413
|
if (geminiTools.length === 0) {
|
|
28433
28414
|
return;
|
|
28434
28415
|
}
|
|
28435
28416
|
const stopExecutionTool = geminiTools.find(
|
|
28436
|
-
(tc) => tc.response.errorType ===
|
|
28417
|
+
(tc) => tc.response.errorType === "stop_execution" /* STOP_EXECUTION */
|
|
28437
28418
|
);
|
|
28438
28419
|
if (stopExecutionTool && stopExecutionTool.response.error) {
|
|
28439
28420
|
maybeAddSuppressedToolErrorNote();
|
|
@@ -28453,9 +28434,9 @@ var useGeminiStream = (geminiClient, history, addItem, config, settings, onDebug
|
|
|
28453
28434
|
(tc) => !isTopicTool2(tc.request.name)
|
|
28454
28435
|
);
|
|
28455
28436
|
const allDeclinableToolsCancelled = declinableTools.length > 0 && declinableTools.every(
|
|
28456
|
-
(tc) => tc.status ===
|
|
28437
|
+
(tc) => tc.status === "cancelled" /* Cancelled */
|
|
28457
28438
|
);
|
|
28458
|
-
const allToolsCancelled = geminiTools.length > 0 && geminiTools.every((tc) => tc.status ===
|
|
28439
|
+
const allToolsCancelled = geminiTools.length > 0 && geminiTools.every((tc) => tc.status === "cancelled" /* Cancelled */);
|
|
28459
28440
|
if (allDeclinableToolsCancelled || allToolsCancelled) {
|
|
28460
28441
|
if (!turnCancelledRef.current) {
|
|
28461
28442
|
addItem({
|
|
@@ -28536,7 +28517,7 @@ var useGeminiStream = (geminiClient, history, addItem, config, settings, onDebug
|
|
|
28536
28517
|
return;
|
|
28537
28518
|
}
|
|
28538
28519
|
const restorableToolCalls = toolCalls.filter(
|
|
28539
|
-
(toolCall) => EDIT_TOOL_NAMES.has(toolCall.request.name) && toolCall.status ===
|
|
28520
|
+
(toolCall) => EDIT_TOOL_NAMES.has(toolCall.request.name) && toolCall.status === "awaiting_approval" /* AwaitingApproval */
|
|
28540
28521
|
);
|
|
28541
28522
|
if (restorableToolCalls.length > 0) {
|
|
28542
28523
|
if (!gitService) {
|
|
@@ -28759,14 +28740,14 @@ var useAgentStream = ({
|
|
|
28759
28740
|
const displayName = legacyState?.displayName ?? event.name;
|
|
28760
28741
|
const isOutputMarkdown = legacyState?.isOutputMarkdown ?? false;
|
|
28761
28742
|
const desc = legacyState?.description ?? "";
|
|
28762
|
-
const fallbackKind =
|
|
28743
|
+
const fallbackKind = "other" /* Other */;
|
|
28763
28744
|
const newCall = {
|
|
28764
28745
|
callId: event.requestId,
|
|
28765
28746
|
name: displayName,
|
|
28766
28747
|
originalRequestName: event.name,
|
|
28767
28748
|
description: desc,
|
|
28768
28749
|
display: event.display,
|
|
28769
|
-
status:
|
|
28750
|
+
status: "scheduled" /* Scheduled */,
|
|
28770
28751
|
isClientInitiated: false,
|
|
28771
28752
|
renderOutputAsMarkdown: isOutputMarkdown,
|
|
28772
28753
|
kind: legacyState?.kind ?? fallbackKind,
|
|
@@ -28784,10 +28765,10 @@ var useAgentStream = ({
|
|
|
28784
28765
|
const evtStatus = legacyState?.status;
|
|
28785
28766
|
let status = tc.status;
|
|
28786
28767
|
if (evtStatus === "executing")
|
|
28787
|
-
status =
|
|
28788
|
-
else if (evtStatus === "error") status =
|
|
28768
|
+
status = "executing" /* Executing */;
|
|
28769
|
+
else if (evtStatus === "error") status = "error" /* Error */;
|
|
28789
28770
|
else if (evtStatus === "success")
|
|
28790
|
-
status =
|
|
28771
|
+
status = "success" /* Success */;
|
|
28791
28772
|
const display = event.display?.result;
|
|
28792
28773
|
const liveOutput = displayContentToString(display) ?? tc.resultDisplay;
|
|
28793
28774
|
const progressMessage = legacyState?.progressMessage ?? tc.progressMessage;
|
|
@@ -28820,7 +28801,7 @@ var useAgentStream = ({
|
|
|
28820
28801
|
const resultDisplay = displayContentToString(display) ?? tc.resultDisplay;
|
|
28821
28802
|
return {
|
|
28822
28803
|
...tc,
|
|
28823
|
-
status: event.isError ?
|
|
28804
|
+
status: event.isError ? "error" /* Error */ : "success" /* Success */,
|
|
28824
28805
|
display: event.display ? { ...tc.display, ...event.display } : tc.display,
|
|
28825
28806
|
resultDisplay,
|
|
28826
28807
|
outputFile
|
|
@@ -28886,7 +28867,7 @@ var useAgentStream = ({
|
|
|
28886
28867
|
if (!options?.isContinuation) {
|
|
28887
28868
|
if (typeof query === "string") {
|
|
28888
28869
|
addItem({ type: "user" /* USER */, text: query }, timestamp);
|
|
28889
|
-
void logger?.logMessage(
|
|
28870
|
+
void logger?.logMessage("user" /* USER */, query);
|
|
28890
28871
|
}
|
|
28891
28872
|
startNewPrompt();
|
|
28892
28873
|
}
|
|
@@ -30413,9 +30394,9 @@ var useFolderTrust = (settings, onTrustChange, addItem) => {
|
|
|
30413
30394
|
const handleFolderTrustSelect = (0, import_react105.useCallback)(
|
|
30414
30395
|
async (choice) => {
|
|
30415
30396
|
const trustLevelMap = {
|
|
30416
|
-
["trust_folder" /* TRUST_FOLDER */]:
|
|
30417
|
-
["trust_parent" /* TRUST_PARENT */]:
|
|
30418
|
-
["do_not_trust" /* DO_NOT_TRUST */]:
|
|
30397
|
+
["trust_folder" /* TRUST_FOLDER */]: "TRUST_FOLDER" /* TRUST_FOLDER */,
|
|
30398
|
+
["trust_parent" /* TRUST_PARENT */]: "TRUST_PARENT" /* TRUST_PARENT */,
|
|
30399
|
+
["do_not_trust" /* DO_NOT_TRUST */]: "DO_NOT_TRUST" /* DO_NOT_TRUST */
|
|
30419
30400
|
};
|
|
30420
30401
|
const trustLevel = trustLevelMap[choice];
|
|
30421
30402
|
if (!trustLevel) return;
|
|
@@ -30434,7 +30415,7 @@ var useFolderTrust = (settings, onTrustChange, addItem) => {
|
|
|
30434
30415
|
}, 100);
|
|
30435
30416
|
return;
|
|
30436
30417
|
}
|
|
30437
|
-
const currentIsTrusted = trustLevel ===
|
|
30418
|
+
const currentIsTrusted = trustLevel === "TRUST_FOLDER" /* TRUST_FOLDER */ || trustLevel === "TRUST_PARENT" /* TRUST_PARENT */;
|
|
30438
30419
|
onTrustChange(currentIsTrusted);
|
|
30439
30420
|
setIsTrusted(currentIsTrusted);
|
|
30440
30421
|
const wasTrusted = isTrusted ?? false;
|
|
@@ -31442,7 +31423,7 @@ function useMessageQueue({
|
|
|
31442
31423
|
var import_react107 = __toESM(require_react(), 1);
|
|
31443
31424
|
function useMcpStatus(config) {
|
|
31444
31425
|
const [discoveryState, setDiscoveryState] = (0, import_react107.useState)(
|
|
31445
|
-
() => config.getMcpClientManager()?.getDiscoveryState() ??
|
|
31426
|
+
() => config.getMcpClientManager()?.getDiscoveryState() ?? "not_started" /* NOT_STARTED */
|
|
31446
31427
|
);
|
|
31447
31428
|
const [mcpServerCount, setMcpServerCount] = (0, import_react107.useState)(
|
|
31448
31429
|
() => config.getMcpClientManager()?.getMcpServerCount() ?? 0
|
|
@@ -31455,12 +31436,12 @@ function useMcpStatus(config) {
|
|
|
31455
31436
|
setMcpServerCount(manager.getMcpServerCount());
|
|
31456
31437
|
}
|
|
31457
31438
|
};
|
|
31458
|
-
coreEvents.on(
|
|
31439
|
+
coreEvents.on("mcp-client-update" /* McpClientUpdate */, onChange);
|
|
31459
31440
|
return () => {
|
|
31460
|
-
coreEvents.off(
|
|
31441
|
+
coreEvents.off("mcp-client-update" /* McpClientUpdate */, onChange);
|
|
31461
31442
|
};
|
|
31462
31443
|
}, [config]);
|
|
31463
|
-
const isMcpReady = discoveryState ===
|
|
31444
|
+
const isMcpReady = discoveryState === "completed" /* COMPLETED */ || discoveryState === "not_started" /* NOT_STARTED */ && mcpServerCount === 0;
|
|
31464
31445
|
return {
|
|
31465
31446
|
discoveryState,
|
|
31466
31447
|
mcpServerCount,
|
|
@@ -31487,7 +31468,7 @@ function useApprovalModeIndicator({
|
|
|
31487
31468
|
(key) => {
|
|
31488
31469
|
let nextApprovalMode;
|
|
31489
31470
|
if (keyMatchers["app.toggleYolo" /* TOGGLE_YOLO */](key)) {
|
|
31490
|
-
if (config.isYoloModeDisabled() && config.getApprovalMode() !==
|
|
31471
|
+
if (config.isYoloModeDisabled() && config.getApprovalMode() !== "yolo" /* YOLO */) {
|
|
31491
31472
|
if (addItem) {
|
|
31492
31473
|
let text = "You cannot enter YOLO mode since it is disabled in your settings.";
|
|
31493
31474
|
const adminSettings = config.getRemoteAdminSettings();
|
|
@@ -31505,21 +31486,21 @@ function useApprovalModeIndicator({
|
|
|
31505
31486
|
}
|
|
31506
31487
|
return;
|
|
31507
31488
|
}
|
|
31508
|
-
nextApprovalMode = config.getApprovalMode() ===
|
|
31489
|
+
nextApprovalMode = config.getApprovalMode() === "yolo" /* YOLO */ ? "default" /* DEFAULT */ : "yolo" /* YOLO */;
|
|
31509
31490
|
} else if (keyMatchers["app.cycleApprovalMode" /* CYCLE_APPROVAL_MODE */](key)) {
|
|
31510
31491
|
const currentMode = config.getApprovalMode();
|
|
31511
31492
|
switch (currentMode) {
|
|
31512
|
-
case
|
|
31513
|
-
nextApprovalMode =
|
|
31493
|
+
case "default" /* DEFAULT */:
|
|
31494
|
+
nextApprovalMode = "autoEdit" /* AUTO_EDIT */;
|
|
31514
31495
|
break;
|
|
31515
|
-
case
|
|
31516
|
-
nextApprovalMode = allowPlanMode ?
|
|
31496
|
+
case "autoEdit" /* AUTO_EDIT */:
|
|
31497
|
+
nextApprovalMode = allowPlanMode ? "plan" /* PLAN */ : "default" /* DEFAULT */;
|
|
31517
31498
|
break;
|
|
31518
|
-
case
|
|
31519
|
-
nextApprovalMode =
|
|
31499
|
+
case "plan" /* PLAN */:
|
|
31500
|
+
nextApprovalMode = "default" /* DEFAULT */;
|
|
31520
31501
|
break;
|
|
31521
|
-
case
|
|
31522
|
-
nextApprovalMode =
|
|
31502
|
+
case "yolo" /* YOLO */:
|
|
31503
|
+
nextApprovalMode = "autoEdit" /* AUTO_EDIT */;
|
|
31523
31504
|
break;
|
|
31524
31505
|
default:
|
|
31525
31506
|
}
|
|
@@ -31929,11 +31910,11 @@ var useHookDisplayState = () => {
|
|
|
31929
31910
|
removeHook();
|
|
31930
31911
|
}
|
|
31931
31912
|
};
|
|
31932
|
-
coreEvents.on(
|
|
31933
|
-
coreEvents.on(
|
|
31913
|
+
coreEvents.on("hook-start" /* HookStart */, handleHookStart);
|
|
31914
|
+
coreEvents.on("hook-end" /* HookEnd */, handleHookEnd);
|
|
31934
31915
|
return () => {
|
|
31935
|
-
coreEvents.off(
|
|
31936
|
-
coreEvents.off(
|
|
31916
|
+
coreEvents.off("hook-start" /* HookStart */, handleHookStart);
|
|
31917
|
+
coreEvents.off("hook-end" /* HookEnd */, handleHookEnd);
|
|
31937
31918
|
activeTimeouts.forEach(clearTimeout);
|
|
31938
31919
|
activeTimeouts.clear();
|
|
31939
31920
|
};
|
|
@@ -32772,7 +32753,7 @@ var AppContainer = (props) => {
|
|
|
32772
32753
|
setConfigInitialized(true);
|
|
32773
32754
|
startupProfiler.flush(config);
|
|
32774
32755
|
startAutoMemoryIfEnabled(config);
|
|
32775
|
-
const sessionStartSource = resumedSessionData ?
|
|
32756
|
+
const sessionStartSource = resumedSessionData ? "resume" /* Resume */ : "startup" /* Startup */;
|
|
32776
32757
|
const result = await config.getHookSystem()?.fireSessionStartEvent(sessionStartSource);
|
|
32777
32758
|
if (result) {
|
|
32778
32759
|
const additionalContext = result.getAdditionalContext();
|
|
@@ -32799,7 +32780,7 @@ var AppContainer = (props) => {
|
|
|
32799
32780
|
);
|
|
32800
32781
|
const ideClient = await IdeClient.getInstance();
|
|
32801
32782
|
await ideClient.disconnect();
|
|
32802
|
-
await config?.getHookSystem()?.fireSessionEndEvent(
|
|
32783
|
+
await config?.getHookSystem()?.fireSessionEndEvent("exit" /* Exit */);
|
|
32803
32784
|
};
|
|
32804
32785
|
registerCleanup(cleanupFn);
|
|
32805
32786
|
return () => {
|
|
@@ -32824,11 +32805,11 @@ var AppContainer = (props) => {
|
|
|
32824
32805
|
resetTime: payload.resetTime
|
|
32825
32806
|
});
|
|
32826
32807
|
};
|
|
32827
|
-
coreEvents.on(
|
|
32828
|
-
coreEvents.on(
|
|
32808
|
+
coreEvents.on("model-changed" /* ModelChanged */, handleModelChanged);
|
|
32809
|
+
coreEvents.on("quota-changed" /* QuotaChanged */, handleQuotaChanged);
|
|
32829
32810
|
return () => {
|
|
32830
|
-
coreEvents.off(
|
|
32831
|
-
coreEvents.off(
|
|
32811
|
+
coreEvents.off("model-changed" /* ModelChanged */, handleModelChanged);
|
|
32812
|
+
coreEvents.off("quota-changed" /* QuotaChanged */, handleQuotaChanged);
|
|
32832
32813
|
};
|
|
32833
32814
|
}, [config]);
|
|
32834
32815
|
(0, import_react121.useEffect)(() => {
|
|
@@ -32841,16 +32822,16 @@ var AppContainer = (props) => {
|
|
|
32841
32822
|
const handleAgentsDiscovered = (payload) => {
|
|
32842
32823
|
setNewAgents(payload.agents);
|
|
32843
32824
|
};
|
|
32844
|
-
coreEvents.on(
|
|
32845
|
-
coreEvents.on(
|
|
32846
|
-
coreEvents.on(
|
|
32825
|
+
coreEvents.on("settings-changed" /* SettingsChanged */, handleSettingsChanged);
|
|
32826
|
+
coreEvents.on("admin-settings-changed" /* AdminSettingsChanged */, handleAdminSettingsChanged);
|
|
32827
|
+
coreEvents.on("agents-discovered" /* AgentsDiscovered */, handleAgentsDiscovered);
|
|
32847
32828
|
return () => {
|
|
32848
|
-
coreEvents.off(
|
|
32829
|
+
coreEvents.off("settings-changed" /* SettingsChanged */, handleSettingsChanged);
|
|
32849
32830
|
coreEvents.off(
|
|
32850
|
-
|
|
32831
|
+
"admin-settings-changed" /* AdminSettingsChanged */,
|
|
32851
32832
|
handleAdminSettingsChanged
|
|
32852
32833
|
);
|
|
32853
|
-
coreEvents.off(
|
|
32834
|
+
coreEvents.off("agents-discovered" /* AgentsDiscovered */, handleAgentsDiscovered);
|
|
32854
32835
|
};
|
|
32855
32836
|
}, [settings]);
|
|
32856
32837
|
const { errorCount, clearErrorCount } = useErrorCount();
|
|
@@ -32915,11 +32896,11 @@ var AppContainer = (props) => {
|
|
|
32915
32896
|
exitEditorDialog
|
|
32916
32897
|
} = useEditorSettings(settings, setEditorError, historyManager.addItem);
|
|
32917
32898
|
(0, import_react121.useEffect)(() => {
|
|
32918
|
-
coreEvents.on(
|
|
32919
|
-
coreEvents.on(
|
|
32899
|
+
coreEvents.on("external-editor-closed" /* ExternalEditorClosed */, handleEditorClose);
|
|
32900
|
+
coreEvents.on("request-editor-selection" /* RequestEditorSelection */, openEditorDialog);
|
|
32920
32901
|
return () => {
|
|
32921
|
-
coreEvents.off(
|
|
32922
|
-
coreEvents.off(
|
|
32902
|
+
coreEvents.off("external-editor-closed" /* ExternalEditorClosed */, handleEditorClose);
|
|
32903
|
+
coreEvents.off("request-editor-selection" /* RequestEditorSelection */, openEditorDialog);
|
|
32923
32904
|
};
|
|
32924
32905
|
}, [handleEditorClose, openEditorDialog]);
|
|
32925
32906
|
(0, import_react121.useEffect)(() => {
|
|
@@ -32987,7 +32968,7 @@ var AppContainer = (props) => {
|
|
|
32987
32968
|
errorVerbosity: settings.merged.ui.errorVerbosity
|
|
32988
32969
|
});
|
|
32989
32970
|
const isAuthDialogOpen = authState === "updating" /* Updating */;
|
|
32990
|
-
const isAuthenticating = authState === "unauthenticated" /* Unauthenticated */ && settings.merged.security.auth.selectedType !==
|
|
32971
|
+
const isAuthenticating = authState === "unauthenticated" /* Unauthenticated */ && settings.merged.security.auth.selectedType !== "gemini-api-key" /* USE_GEMINI */;
|
|
32991
32972
|
const isGeminiClientInitialized = config.getGeminiClient()?.isInitialized();
|
|
32992
32973
|
const { loadHistoryForResume, isResuming } = useSessionResume({
|
|
32993
32974
|
config,
|
|
@@ -33015,7 +32996,7 @@ var AppContainer = (props) => {
|
|
|
33015
32996
|
async (authType, scope) => {
|
|
33016
32997
|
if (authType) {
|
|
33017
32998
|
const previousAuthType = config.getContentGeneratorConfig()?.authType ?? "unknown";
|
|
33018
|
-
if (authType ===
|
|
32999
|
+
if (authType === "oauth-personal" /* LOGIN_WITH_GOOGLE */) {
|
|
33019
33000
|
setAuthContext({ requiresRestart: true });
|
|
33020
33001
|
} else {
|
|
33021
33002
|
setAuthContext({});
|
|
@@ -33043,7 +33024,7 @@ var AppContainer = (props) => {
|
|
|
33043
33024
|
);
|
|
33044
33025
|
return;
|
|
33045
33026
|
}
|
|
33046
|
-
if (authType ===
|
|
33027
|
+
if (authType === "oauth-personal" /* LOGIN_WITH_GOOGLE */ && config.isBrowserLaunchSuppressed()) {
|
|
33047
33028
|
writeToStdout(`
|
|
33048
33029
|
----------------------------------------------------------------
|
|
33049
33030
|
Logging in with Google... Restarting Gemini CLI to continue.
|
|
@@ -33066,7 +33047,7 @@ Logging in with Google... Restarting Gemini CLI to continue.
|
|
|
33066
33047
|
}
|
|
33067
33048
|
await saveApiKey(apiKey);
|
|
33068
33049
|
await reloadApiKey();
|
|
33069
|
-
await config.refreshAuth(
|
|
33050
|
+
await config.refreshAuth("gemini-api-key" /* USE_GEMINI */);
|
|
33070
33051
|
setAuthState("authenticated" /* Authenticated */);
|
|
33071
33052
|
} catch (e) {
|
|
33072
33053
|
onAuthError(
|
|
@@ -33091,7 +33072,7 @@ Logging in with Google... Restarting Gemini CLI to continue.
|
|
|
33091
33072
|
`Authentication is enforced to be ${settings.merged.security.auth.enforcedType}, but you are currently using ${settings.merged.security.auth.selectedType}.`
|
|
33092
33073
|
);
|
|
33093
33074
|
} else if (settings.merged.security.auth.selectedType && !settings.merged.security.auth.useExternal) {
|
|
33094
|
-
if (settings.merged.security.auth.selectedType ===
|
|
33075
|
+
if (settings.merged.security.auth.selectedType === "gemini-api-key" /* USE_GEMINI */) {
|
|
33095
33076
|
return;
|
|
33096
33077
|
}
|
|
33097
33078
|
const authMethod = settings.merged.security.auth.selectedType;
|
|
@@ -33227,9 +33208,9 @@ Logging in with Google... Restarting Gemini CLI to continue.
|
|
|
33227
33208
|
}
|
|
33228
33209
|
});
|
|
33229
33210
|
};
|
|
33230
|
-
coreEvents.on(
|
|
33211
|
+
coreEvents.on("consent-request" /* ConsentRequest */, handleConsentRequest);
|
|
33231
33212
|
return () => {
|
|
33232
|
-
coreEvents.off(
|
|
33213
|
+
coreEvents.off("consent-request" /* ConsentRequest */, handleConsentRequest);
|
|
33233
33214
|
};
|
|
33234
33215
|
}, []);
|
|
33235
33216
|
const performMemoryRefresh = (0, import_react121.useCallback)(async () => {
|
|
@@ -33887,7 +33868,7 @@ ${queuedText}` : queuedText;
|
|
|
33887
33868
|
if (keyMatchers["app.showErrorDetails" /* SHOW_ERROR_DETAILS */](key)) {
|
|
33888
33869
|
if (settings.merged.general.devtools) {
|
|
33889
33870
|
void (async () => {
|
|
33890
|
-
const { toggleDevToolsPanel } = await import("./devtoolsService-
|
|
33871
|
+
const { toggleDevToolsPanel } = await import("./devtoolsService-NZQZUVCI.js");
|
|
33891
33872
|
await toggleDevToolsPanel(
|
|
33892
33873
|
config,
|
|
33893
33874
|
showErrorDetails,
|
|
@@ -34105,17 +34086,17 @@ ${queuedText}` : queuedText;
|
|
|
34105
34086
|
Date.now()
|
|
34106
34087
|
);
|
|
34107
34088
|
};
|
|
34108
|
-
coreEvents.on(
|
|
34109
|
-
coreEvents.on(
|
|
34089
|
+
coreEvents.on("user-feedback" /* UserFeedback */, handleUserFeedback);
|
|
34090
|
+
coreEvents.on("hook-system-message" /* HookSystemMessage */, handleHookSystemMessage);
|
|
34110
34091
|
coreEvents.drainBacklogs();
|
|
34111
34092
|
return () => {
|
|
34112
|
-
coreEvents.off(
|
|
34113
|
-
coreEvents.off(
|
|
34093
|
+
coreEvents.off("user-feedback" /* UserFeedback */, handleUserFeedback);
|
|
34094
|
+
coreEvents.off("hook-system-message" /* HookSystemMessage */, handleHookSystemMessage);
|
|
34114
34095
|
};
|
|
34115
34096
|
}, [historyManager]);
|
|
34116
34097
|
const nightly = props.version.includes("nightly");
|
|
34117
34098
|
const isAwaitingLoginRestart = authState === "awaiting_login_restart" /* AwaitingLoginRestart */;
|
|
34118
|
-
const loginRestartMessage = settings.merged.security.auth.selectedType ===
|
|
34099
|
+
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;
|
|
34119
34100
|
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;
|
|
34120
34101
|
const hasPendingToolConfirmation = (0, import_react121.useMemo)(
|
|
34121
34102
|
() => isToolAwaitingConfirmation(pendingHistoryItems),
|
|
@@ -34215,9 +34196,9 @@ ${queuedText}` : queuedText;
|
|
|
34215
34196
|
const handleMemoryChanged = (result) => {
|
|
34216
34197
|
setGeminiMdFileCount(result.fileCount);
|
|
34217
34198
|
};
|
|
34218
|
-
coreEvents.on(
|
|
34199
|
+
coreEvents.on("memory-changed" /* MemoryChanged */, handleMemoryChanged);
|
|
34219
34200
|
return () => {
|
|
34220
|
-
coreEvents.off(
|
|
34201
|
+
coreEvents.off("memory-changed" /* MemoryChanged */, handleMemoryChanged);
|
|
34221
34202
|
};
|
|
34222
34203
|
}, []);
|
|
34223
34204
|
(0, import_react121.useEffect)(() => {
|