@google/gemini-cli 0.51.0-nightly.20260708.gc988cbb1e → 0.51.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-5ROOHRPU.js → chunk-24NAD7C5.js} +3 -3
- package/bundle/{chunk-QJNCOYUJ.js → chunk-5HMMNXTW.js} +2 -2
- package/bundle/{chunk-2JDZFYC3.js → chunk-5TLWWJBW.js} +1 -1
- package/bundle/{chunk-4KR7HBX4.js → chunk-6Q62LQM2.js} +1 -1
- package/bundle/{chunk-7D3ADWYE.js → chunk-AWR3APYV.js} +5 -11
- package/bundle/{chunk-YBDM2ODU.js → chunk-CVOBP6E7.js} +1 -1
- package/bundle/{chunk-4IU75RRO.js → chunk-DHQ53XVO.js} +5 -11
- package/bundle/{chunk-MC7OL7L5.js → chunk-EFAERAGP.js} +1 -1
- package/bundle/{chunk-2QHXXANZ.js → chunk-FAVXT6HW.js} +7 -7
- package/bundle/{chunk-NFXURVSG.js → chunk-GDYX7GKQ.js} +1 -1
- package/bundle/{chunk-FQK7DMV3.js → chunk-HR7S6IG5.js} +1 -1
- package/bundle/{chunk-FFNA4K6Q.js → chunk-HSKKDILO.js} +8 -9
- package/bundle/{chunk-DP5SFKWT.js → chunk-JDNHY4EW.js} +3 -3
- package/bundle/{chunk-TJBXGMNA.js → chunk-JW5YTR32.js} +1 -1
- package/bundle/{chunk-RYFK65YQ.js → chunk-NHMFOV3I.js} +2 -2
- package/bundle/{chunk-5WUHO5LJ.js → chunk-OW353XI3.js} +14191 -7605
- package/bundle/{chunk-FRH7RQYQ.js → chunk-PNLYANQZ.js} +3 -3
- package/bundle/{chunk-KTR2AROX.js → chunk-TTSETJW4.js} +54 -67
- package/bundle/{chunk-KPOGDQAW.js → chunk-VJX5MJPE.js} +7 -7
- package/bundle/{chunk-IXKAG66M.js → chunk-W3GXG3TT.js} +1 -1
- package/bundle/{chunk-WRD6EKKS.js → chunk-W4CRBK3Q.js} +2 -2
- package/bundle/{chunk-SWXBIZTJ.js → chunk-WWHOEQ32.js} +1 -1
- package/bundle/{chunk-QY634ECV.js → chunk-XDAVUESV.js} +5 -8
- package/bundle/{chunk-VAD47FH3.js → chunk-ZR3L5V6U.js} +1 -1
- package/bundle/{cleanup-F346RWAB.js → cleanup-3Z2HSZDT.js} +2 -2
- package/bundle/{cleanup-HK7WSOZ4.js → cleanup-PU5SP3HU.js} +2 -2
- package/bundle/{cleanup-QDOGZ6LD.js → cleanup-QMDDK5HT.js} +2 -2
- package/bundle/{core-OE2FN6H4.js → core-B3PBPXVS.js} +1 -1
- package/bundle/{dist-GOVFKZUP.js → core-E5FGEYHI.js} +1 -1
- package/bundle/{devtoolsService-LUX2QI2P.js → devtoolsService-2XF7DDHC.js} +2 -2
- package/bundle/{devtoolsService-CUFYN7RR.js → devtoolsService-CRN6YE4U.js} +2 -2
- package/bundle/{devtoolsService-OFIHV2E2.js → devtoolsService-P33QSD7O.js} +3 -4
- package/bundle/{dist-SYV2MKKT.js → dist-2KYOZ4WS.js} +1 -1
- package/bundle/{gemini-OIHKLMRS.js → gemini-EVKJWIDN.js} +14 -14
- package/bundle/{gemini-J2WVD3HI.js → gemini-FJJIUT3T.js} +196 -212
- package/bundle/{gemini-NMU6HI2V.js → gemini-PPWSIUOX.js} +14 -14
- package/bundle/gemini.js +7 -7
- package/bundle/{interactiveCli-ZSCRTNFT.js → interactiveCli-IGIRH6LD.js} +8 -8
- package/bundle/{interactiveCli-JPNG4XNZ.js → interactiveCli-K46EDB4I.js} +8 -8
- package/bundle/{interactiveCli-JXJWMPVK.js → interactiveCli-LIY2TCD4.js} +296 -315
- package/bundle/{liteRtServerManager-CGFM7N3B.js → liteRtServerManager-2UVXXAFT.js} +4 -4
- package/bundle/{liteRtServerManager-IOUCER7S.js → liteRtServerManager-AQ6QKMM2.js} +4 -4
- package/bundle/{liteRtServerManager-JY2MURMO.js → liteRtServerManager-CHKODBL3.js} +4 -4
- package/bundle/{oauth2-provider-5EW734HE.js → oauth2-provider-DMK354XO.js} +1 -1
- package/bundle/{oauth2-provider-423KYCCV.js → oauth2-provider-EJMQIWQZ.js} +1 -1
- package/bundle/{oauth2-provider-D7AYLO4B.js → oauth2-provider-ROQJTVTD.js} +72 -38
- package/bundle/{start-HEAF5AYN.js → start-AII542BS.js} +6 -6
- package/bundle/{start-LR7NW5AT.js → start-KNGH45SZ.js} +6 -6
- package/bundle/{start-WPNOCPM6.js → start-V2SV63TN.js} +6 -6
- package/package.json +1 -1
- package/bundle/chunk-3RAOFZWC.js +0 -512
- package/bundle/chunk-46LUTSJ4.js +0 -17332
- package/bundle/chunk-G63UEXXU.js +0 -154
- package/bundle/chunk-L7HQQFTI.js +0 -398
- package/bundle/chunk-LKCMWW54.js +0 -388057
- package/bundle/chunk-SHMPMIKB.js +0 -118
- package/bundle/chunk-SUZMHKOU.js +0 -102505
- package/bundle/chunk-VJQWDQHT.js +0 -1571
- package/bundle/cleanup-XGIZ3M66.js +0 -32
- package/bundle/devtoolsService-PZBPSAKB.js +0 -4359
- package/bundle/dist-VRX3PYGK.js +0 -2152
- package/bundle/gemini-TSF7456F.js +0 -29270
- package/bundle/interactiveCli-SFIYURNH.js +0 -34776
- package/bundle/liteRtServerManager-ZOUYJ3HK.js +0 -65
- package/bundle/oauth2-provider-XSTJLVJW.js +0 -235
- package/bundle/start-YQNS7733.js +0 -18
|
@@ -157,13 +157,13 @@ import {
|
|
|
157
157
|
widestLineFromStyledChars,
|
|
158
158
|
wordBreakStyledChars,
|
|
159
159
|
wrapStyledChars
|
|
160
|
-
} from "./chunk-
|
|
160
|
+
} from "./chunk-FAVXT6HW.js";
|
|
161
161
|
import {
|
|
162
162
|
appEvents
|
|
163
163
|
} from "./chunk-5PS3AYFU.js";
|
|
164
164
|
import {
|
|
165
165
|
require_source
|
|
166
|
-
} from "./chunk-
|
|
166
|
+
} from "./chunk-WWHOEQ32.js";
|
|
167
167
|
import {
|
|
168
168
|
ACTIVE_SHELL_MAX_LINES,
|
|
169
169
|
COMPACT_TOOL_SUBVIEW_MAX_LINES,
|
|
@@ -214,37 +214,33 @@ import {
|
|
|
214
214
|
stripAnsi,
|
|
215
215
|
stripUnsafeCharacters,
|
|
216
216
|
toCodePoints
|
|
217
|
-
} from "./chunk-
|
|
217
|
+
} from "./chunk-W3GXG3TT.js";
|
|
218
218
|
import {
|
|
219
219
|
handleAutoUpdate,
|
|
220
220
|
isDevelopment,
|
|
221
221
|
relaunchApp,
|
|
222
222
|
setUpdateHandler
|
|
223
|
-
} from "./chunk-
|
|
223
|
+
} from "./chunk-5HMMNXTW.js";
|
|
224
224
|
import {
|
|
225
225
|
isTodoList,
|
|
226
226
|
mapCoreStatusToDisplayStatus,
|
|
227
227
|
require_react
|
|
228
|
-
} from "./chunk-
|
|
228
|
+
} from "./chunk-CVOBP6E7.js";
|
|
229
229
|
import {
|
|
230
230
|
registerCleanup,
|
|
231
231
|
removeCleanup,
|
|
232
232
|
runExitCleanup,
|
|
233
233
|
setupTtyCheck
|
|
234
|
-
} from "./chunk-
|
|
234
|
+
} from "./chunk-JW5YTR32.js";
|
|
235
235
|
import {
|
|
236
236
|
ACTIVATE_SKILL_TOOL_NAME,
|
|
237
237
|
AGENT_TOOL_NAME,
|
|
238
238
|
ApiKeyUpdatedEvent,
|
|
239
|
-
ApprovalMode,
|
|
240
239
|
AsyncFzf,
|
|
241
240
|
AudioRecorder,
|
|
242
241
|
AuthType,
|
|
243
242
|
ChangeAuthRequestedError,
|
|
244
|
-
CompressionStatus,
|
|
245
243
|
ConversationFinishedEvent,
|
|
246
|
-
CoreEvent,
|
|
247
|
-
CoreToolCallStatus,
|
|
248
244
|
CreditPurchaseClickEvent,
|
|
249
245
|
DEFAULT_GEMINI_FLASH_LITE_MODEL,
|
|
250
246
|
DEFAULT_GEMINI_FLASH_MODEL,
|
|
@@ -266,19 +262,12 @@ import {
|
|
|
266
262
|
GEMMA_4_31B_IT_MODEL,
|
|
267
263
|
GLOB_DISPLAY_NAME,
|
|
268
264
|
GREP_DISPLAY_NAME,
|
|
269
|
-
GeminiCliOperation,
|
|
270
|
-
GeminiEventType,
|
|
271
265
|
GitService,
|
|
272
266
|
IdeClient,
|
|
273
|
-
Kind,
|
|
274
267
|
LS_DISPLAY_NAME,
|
|
275
268
|
LegacyAgentProtocol,
|
|
276
269
|
LlmRole,
|
|
277
270
|
Logger,
|
|
278
|
-
MCPDiscoveryState,
|
|
279
|
-
MCPServerStatus,
|
|
280
|
-
MessageBusType,
|
|
281
|
-
MessageSenderType,
|
|
282
271
|
ModelNotFoundError,
|
|
283
272
|
ModelSlashCommandEvent,
|
|
284
273
|
OverageMenuShownEvent,
|
|
@@ -290,27 +279,20 @@ import {
|
|
|
290
279
|
PREVIEW_GEMINI_MODEL,
|
|
291
280
|
PolicyIntegrityManager,
|
|
292
281
|
ProjectIdRequiredError,
|
|
293
|
-
QuestionType,
|
|
294
282
|
READ_FILE_DISPLAY_NAME,
|
|
295
283
|
READ_MANY_FILES_DISPLAY_NAME,
|
|
296
284
|
RELEASE_CHANNEL_STABILITY,
|
|
297
285
|
ROOT_SCHEDULER_ID,
|
|
298
286
|
SHELL_TOOL_NAME,
|
|
299
287
|
Scheduler,
|
|
300
|
-
SessionEndReason,
|
|
301
|
-
SessionStartSource,
|
|
302
288
|
ShellExecutionService,
|
|
303
289
|
SlashCommandStatus,
|
|
304
290
|
Storage,
|
|
305
|
-
SubagentState,
|
|
306
291
|
TOPIC_PARAM_STRATEGIC_INTENT,
|
|
307
292
|
TOPIC_PARAM_SUMMARY,
|
|
308
293
|
TOPIC_PARAM_TITLE,
|
|
309
294
|
TerminalQuotaError,
|
|
310
|
-
ToolConfirmationOutcome,
|
|
311
|
-
ToolErrorType,
|
|
312
295
|
TranscriptionFactory,
|
|
313
|
-
TrustLevel,
|
|
314
296
|
UPDATE_TOPIC_DISPLAY_NAME,
|
|
315
297
|
UPDATE_TOPIC_TOOL_NAME,
|
|
316
298
|
UnauthorizedError,
|
|
@@ -322,7 +304,6 @@ import {
|
|
|
322
304
|
WEB_FETCH_DISPLAY_NAME,
|
|
323
305
|
WEB_SEARCH_DISPLAY_NAME,
|
|
324
306
|
WRITE_FILE_DISPLAY_NAME,
|
|
325
|
-
WarningPriority,
|
|
326
307
|
WhisperModelManager,
|
|
327
308
|
addMCPStatusChangeListener,
|
|
328
309
|
allowEditorTypeInSandbox,
|
|
@@ -431,7 +412,7 @@ import {
|
|
|
431
412
|
validatePlanContent,
|
|
432
413
|
validatePlanPath,
|
|
433
414
|
writeToStdout
|
|
434
|
-
} from "./chunk-
|
|
415
|
+
} from "./chunk-OW353XI3.js";
|
|
435
416
|
import "./chunk-664ZODQF.js";
|
|
436
417
|
import "./chunk-TUDYL3X4.js";
|
|
437
418
|
import "./chunk-IUUIT4SU.js";
|
|
@@ -5057,7 +5038,7 @@ function calculateShellMaxLines(options) {
|
|
|
5057
5038
|
if (isAlternateBuffer && isThisShellFocused2 && !constrainHeight) {
|
|
5058
5039
|
return maxLinesBasedOnHeight;
|
|
5059
5040
|
}
|
|
5060
|
-
const isExecuting = status ===
|
|
5041
|
+
const isExecuting = status === "executing" /* Executing */;
|
|
5061
5042
|
const shellMaxLinesLimit = isExecuting ? ACTIVE_SHELL_MAX_LINES - SHELL_CONTENT_OVERHEAD : COMPLETED_SHELL_MAX_LINES - SHELL_CONTENT_OVERHEAD;
|
|
5062
5043
|
return Math.min(maxLinesBasedOnHeight, shellMaxLinesLimit);
|
|
5063
5044
|
}
|
|
@@ -5091,10 +5072,10 @@ function isShellTool(name) {
|
|
|
5091
5072
|
return name === SHELL_COMMAND_NAME || name === SHELL_NAME || name === SHELL_TOOL_NAME || normalized === "shell";
|
|
5092
5073
|
}
|
|
5093
5074
|
function isThisShellFocusable(name, status, config) {
|
|
5094
|
-
return !!(isShellTool(name) && status ===
|
|
5075
|
+
return !!(isShellTool(name) && status === "executing" /* Executing */ && config?.getEnableInteractiveShell());
|
|
5095
5076
|
}
|
|
5096
5077
|
function isThisShellFocused(name, status, ptyId, activeShellPtyId, embeddedShellFocused) {
|
|
5097
|
-
return !!(isShellTool(name) && status ===
|
|
5078
|
+
return !!(isShellTool(name) && status === "executing" /* Executing */ && ptyId === activeShellPtyId && embeddedShellFocused);
|
|
5098
5079
|
}
|
|
5099
5080
|
function useFocusHint(isThisShellFocusable2, isThisShellFocused2, resultDisplay) {
|
|
5100
5081
|
const [userHasFocused, setUserHasFocused] = (0, import_react9.useState)(false);
|
|
@@ -5254,13 +5235,13 @@ var formatToolArgs = (args) => {
|
|
|
5254
5235
|
var SubagentProgressDisplay = ({ progress, terminalWidth, historyOverrides }) => {
|
|
5255
5236
|
let headerText;
|
|
5256
5237
|
let headerColor = theme.text.secondary;
|
|
5257
|
-
if (progress.state ===
|
|
5238
|
+
if (progress.state === "cancelled" /* CANCELLED */) {
|
|
5258
5239
|
headerText = `Subagent ${progress.agentName} was cancelled.`;
|
|
5259
5240
|
headerColor = theme.status.warning;
|
|
5260
|
-
} else if (progress.state ===
|
|
5241
|
+
} else if (progress.state === "error" /* ERROR */) {
|
|
5261
5242
|
headerText = `Subagent ${progress.agentName} failed.`;
|
|
5262
5243
|
headerColor = theme.status.error;
|
|
5263
|
-
} else if (progress.state ===
|
|
5244
|
+
} else if (progress.state === "completed" /* COMPLETED */) {
|
|
5264
5245
|
headerText = `Subagent ${progress.agentName} completed.`;
|
|
5265
5246
|
headerColor = theme.status.success;
|
|
5266
5247
|
} else {
|
|
@@ -5280,7 +5261,7 @@ var SubagentProgressDisplay = ({ progress, terminalWidth, historyOverrides }) =>
|
|
|
5280
5261
|
/* @__PURE__ */ (0, import_jsx_runtime15.jsx)(Box_default, { flexGrow: 1, children: /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(Text, { color, children: item.content }) })
|
|
5281
5262
|
] }, item.id);
|
|
5282
5263
|
} else if (item.type === "tool_call") {
|
|
5283
|
-
const statusSymbol = item.status ===
|
|
5264
|
+
const statusSymbol = item.status === "running" /* RUNNING */ ? /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(build_default, { type: "dots" }) : item.status === "completed" /* COMPLETED */ ? /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(Text, { color: theme.status.success, children: TOOL_STATUS.SUCCESS }) : item.status === "cancelled" /* CANCELLED */ ? /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(Text, { color: theme.status.warning, bold: true, children: TOOL_STATUS.CANCELED }) : /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(Text, { color: theme.status.error, children: TOOL_STATUS.ERROR });
|
|
5284
5265
|
const formattedArgs = item.description || formatToolArgs(item.args);
|
|
5285
5266
|
const displayArgs = formattedArgs.length > 60 ? formattedArgs.slice(0, 60) + "..." : formattedArgs;
|
|
5286
5267
|
return /* @__PURE__ */ (0, import_jsx_runtime15.jsxs)(Box_default, { flexDirection: "row", children: [
|
|
@@ -5291,7 +5272,7 @@ var SubagentProgressDisplay = ({ progress, terminalWidth, historyOverrides }) =>
|
|
|
5291
5272
|
{
|
|
5292
5273
|
bold: true,
|
|
5293
5274
|
color: theme.text.primary,
|
|
5294
|
-
strikethrough: item.status ===
|
|
5275
|
+
strikethrough: item.status === "cancelled" /* CANCELLED */,
|
|
5295
5276
|
children: item.displayName || item.content
|
|
5296
5277
|
}
|
|
5297
5278
|
),
|
|
@@ -5300,7 +5281,7 @@ var SubagentProgressDisplay = ({ progress, terminalWidth, historyOverrides }) =>
|
|
|
5300
5281
|
{
|
|
5301
5282
|
color: theme.text.secondary,
|
|
5302
5283
|
wrap: "truncate",
|
|
5303
|
-
strikethrough: item.status ===
|
|
5284
|
+
strikethrough: item.status === "cancelled" /* CANCELLED */,
|
|
5304
5285
|
children: displayArgs
|
|
5305
5286
|
}
|
|
5306
5287
|
) })
|
|
@@ -5320,7 +5301,7 @@ var SubagentProgressDisplay = ({ progress, terminalWidth, historyOverrides }) =>
|
|
|
5320
5301
|
MarkdownDisplay,
|
|
5321
5302
|
{
|
|
5322
5303
|
text: safeJsonToMarkdown(progress.result),
|
|
5323
|
-
isPending: progress.state !==
|
|
5304
|
+
isPending: progress.state !== "completed" /* COMPLETED */,
|
|
5324
5305
|
terminalWidth
|
|
5325
5306
|
}
|
|
5326
5307
|
)
|
|
@@ -5674,14 +5655,14 @@ var ToolActionsProvider = (props) => {
|
|
|
5674
5655
|
}
|
|
5675
5656
|
const details = tool.confirmationDetails;
|
|
5676
5657
|
if (details?.type === "edit" && isDiffingEnabled && "filePath" in details) {
|
|
5677
|
-
const cliOutcome = outcome ===
|
|
5658
|
+
const cliOutcome = outcome === "cancel" /* Cancel */ ? "rejected" : "accepted";
|
|
5678
5659
|
await ideClient?.resolveDiffFromCli(details.filePath, cliOutcome);
|
|
5679
5660
|
}
|
|
5680
5661
|
if (tool.correlationId) {
|
|
5681
5662
|
await config.getMessageBus().publish({
|
|
5682
|
-
type:
|
|
5663
|
+
type: "tool-confirmation-response" /* TOOL_CONFIRMATION_RESPONSE */,
|
|
5683
5664
|
correlationId: tool.correlationId,
|
|
5684
|
-
confirmed: outcome !==
|
|
5665
|
+
confirmed: outcome !== "cancel" /* Cancel */,
|
|
5685
5666
|
requiresUserConfirmation: false,
|
|
5686
5667
|
outcome,
|
|
5687
5668
|
payload
|
|
@@ -5700,7 +5681,7 @@ var ToolActionsProvider = (props) => {
|
|
|
5700
5681
|
);
|
|
5701
5682
|
const cancel = (0, import_react12.useCallback)(
|
|
5702
5683
|
async (callId) => {
|
|
5703
|
-
await confirm(callId,
|
|
5684
|
+
await confirm(callId, "cancel" /* Cancel */);
|
|
5704
5685
|
},
|
|
5705
5686
|
[confirm]
|
|
5706
5687
|
);
|
|
@@ -5819,7 +5800,7 @@ var ToolMessage = ({
|
|
|
5819
5800
|
paddingX: 1,
|
|
5820
5801
|
flexDirection: "column",
|
|
5821
5802
|
children: [
|
|
5822
|
-
status ===
|
|
5803
|
+
status === "executing" /* Executing */ && progress !== void 0 && /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(
|
|
5823
5804
|
McpProgressIndicator,
|
|
5824
5805
|
{
|
|
5825
5806
|
progress,
|
|
@@ -5836,8 +5817,8 @@ var ToolMessage = ({
|
|
|
5836
5817
|
terminalWidth,
|
|
5837
5818
|
renderOutputAsMarkdown,
|
|
5838
5819
|
hasFocus: isThisShellFocused2,
|
|
5839
|
-
maxLines: kind ===
|
|
5840
|
-
overflowDirection: kind ===
|
|
5820
|
+
maxLines: kind === "agent" /* Agent */ && availableTerminalHeight !== void 0 ? SUBAGENT_MAX_LINES : void 0,
|
|
5821
|
+
overflowDirection: kind === "agent" /* Agent */ ? "bottom" : "top"
|
|
5841
5822
|
}
|
|
5842
5823
|
),
|
|
5843
5824
|
isThisShellFocused2 && config && /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(Box_default, { paddingLeft: STATUS_INDICATOR_WIDTH, marginTop: 1, children: /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(
|
|
@@ -6153,7 +6134,7 @@ function getInitialTrustState(settings, cwd5, isCurrentWorkspace) {
|
|
|
6153
6134
|
settings.merged,
|
|
6154
6135
|
process3.cwd()
|
|
6155
6136
|
);
|
|
6156
|
-
const isInheritedTrust = isTrusted && (!explicitTrustLevel || explicitTrustLevel ===
|
|
6137
|
+
const isInheritedTrust = isTrusted && (!explicitTrustLevel || explicitTrustLevel === "DO_NOT_TRUST" /* DO_NOT_TRUST */);
|
|
6157
6138
|
return {
|
|
6158
6139
|
currentTrustLevel: explicitTrustLevel,
|
|
6159
6140
|
isInheritedTrustFromParent: !!(source === "file" && isInheritedTrust),
|
|
@@ -6198,7 +6179,7 @@ var usePermissionsModifyTrust = (onExit, addItem, targetDirectory) => {
|
|
|
6198
6179
|
process3.cwd(),
|
|
6199
6180
|
newConfig
|
|
6200
6181
|
);
|
|
6201
|
-
if (trustLevel ===
|
|
6182
|
+
if (trustLevel === "DO_NOT_TRUST" /* DO_NOT_TRUST */ && isTrusted) {
|
|
6202
6183
|
let message = "Note: This folder is still trusted because the connected IDE workspace is trusted.";
|
|
6203
6184
|
if (source === "file") {
|
|
6204
6185
|
message = "Note: This folder is still trusted because a parent folder is trusted.";
|
|
@@ -6272,18 +6253,18 @@ function PermissionsModifyTrustDialog({
|
|
|
6272
6253
|
const TRUST_LEVEL_ITEMS = [
|
|
6273
6254
|
{
|
|
6274
6255
|
label: `Trust this folder (${dirName})`,
|
|
6275
|
-
value:
|
|
6276
|
-
key:
|
|
6256
|
+
value: "TRUST_FOLDER" /* TRUST_FOLDER */,
|
|
6257
|
+
key: "TRUST_FOLDER" /* TRUST_FOLDER */
|
|
6277
6258
|
},
|
|
6278
6259
|
{
|
|
6279
6260
|
label: `Trust parent folder (${parentFolder})`,
|
|
6280
|
-
value:
|
|
6281
|
-
key:
|
|
6261
|
+
value: "TRUST_PARENT" /* TRUST_PARENT */,
|
|
6262
|
+
key: "TRUST_PARENT" /* TRUST_PARENT */
|
|
6282
6263
|
},
|
|
6283
6264
|
{
|
|
6284
6265
|
label: "Don't trust",
|
|
6285
|
-
value:
|
|
6286
|
-
key:
|
|
6266
|
+
value: "DO_NOT_TRUST" /* DO_NOT_TRUST */,
|
|
6267
|
+
key: "DO_NOT_TRUST" /* DO_NOT_TRUST */
|
|
6287
6268
|
}
|
|
6288
6269
|
];
|
|
6289
6270
|
const {
|
|
@@ -6523,7 +6504,7 @@ var ShellToolMessage = ({
|
|
|
6523
6504
|
maxLinesLimit: maxLines
|
|
6524
6505
|
});
|
|
6525
6506
|
import_react17.default.useEffect(() => {
|
|
6526
|
-
const isExecuting = status ===
|
|
6507
|
+
const isExecuting = status === "executing" /* Executing */;
|
|
6527
6508
|
if (isExecuting && ptyId) {
|
|
6528
6509
|
try {
|
|
6529
6510
|
const childWidth = terminalWidth - 4;
|
|
@@ -6736,13 +6717,13 @@ var SubagentGroupDisplay = ({
|
|
|
6736
6717
|
const singleAgent = toolCalls[0].resultDisplay;
|
|
6737
6718
|
if (isSubagentProgress(singleAgent)) {
|
|
6738
6719
|
switch (singleAgent.state) {
|
|
6739
|
-
case
|
|
6720
|
+
case "completed" /* COMPLETED */:
|
|
6740
6721
|
headerText = "Agent Completed";
|
|
6741
6722
|
break;
|
|
6742
|
-
case
|
|
6723
|
+
case "cancelled" /* CANCELLED */:
|
|
6743
6724
|
headerText = "Agent Cancelled";
|
|
6744
6725
|
break;
|
|
6745
|
-
case
|
|
6726
|
+
case "error" /* ERROR */:
|
|
6746
6727
|
headerText = "Agent Error";
|
|
6747
6728
|
break;
|
|
6748
6729
|
default:
|
|
@@ -6758,8 +6739,8 @@ var SubagentGroupDisplay = ({
|
|
|
6758
6739
|
for (const tc of toolCalls) {
|
|
6759
6740
|
const progress = tc.resultDisplay;
|
|
6760
6741
|
if (isSubagentProgress(progress)) {
|
|
6761
|
-
if (progress.state ===
|
|
6762
|
-
else if (progress.state ===
|
|
6742
|
+
if (progress.state === "completed" /* COMPLETED */) completedCount++;
|
|
6743
|
+
else if (progress.state === "running" /* RUNNING */) runningCount++;
|
|
6763
6744
|
} else {
|
|
6764
6745
|
runningCount++;
|
|
6765
6746
|
}
|
|
@@ -6838,7 +6819,7 @@ var SubagentGroupDisplay = ({
|
|
|
6838
6819
|
if (!isExpanded) {
|
|
6839
6820
|
let content = "Starting...";
|
|
6840
6821
|
let formattedArgs;
|
|
6841
|
-
if (progress.state ===
|
|
6822
|
+
if (progress.state === "completed" /* COMPLETED */) {
|
|
6842
6823
|
if (progress.terminateReason && progress.terminateReason !== "GOAL") {
|
|
6843
6824
|
content = `Finished Early (${progress.terminateReason})`;
|
|
6844
6825
|
} else {
|
|
@@ -6852,17 +6833,17 @@ var SubagentGroupDisplay = ({
|
|
|
6852
6833
|
formattedArgs = formatToolArgs(lastActivity.args);
|
|
6853
6834
|
}
|
|
6854
6835
|
}
|
|
6855
|
-
const displayArgs = progress.state ===
|
|
6836
|
+
const displayArgs = progress.state === "completed" /* COMPLETED */ ? "" : formattedArgs;
|
|
6856
6837
|
const renderStatusIcon = () => {
|
|
6857
|
-
const state = progress.state ??
|
|
6838
|
+
const state = progress.state ?? "running" /* RUNNING */;
|
|
6858
6839
|
switch (state) {
|
|
6859
|
-
case
|
|
6840
|
+
case "running" /* RUNNING */:
|
|
6860
6841
|
return /* @__PURE__ */ (0, import_jsx_runtime25.jsx)(Text, { color: theme.text.primary, children: "!" });
|
|
6861
|
-
case
|
|
6842
|
+
case "completed" /* COMPLETED */:
|
|
6862
6843
|
return /* @__PURE__ */ (0, import_jsx_runtime25.jsx)(Text, { color: theme.status.success, children: "\u2713" });
|
|
6863
|
-
case
|
|
6844
|
+
case "cancelled" /* CANCELLED */:
|
|
6864
6845
|
return /* @__PURE__ */ (0, import_jsx_runtime25.jsx)(Text, { color: theme.status.warning, children: "\u2139" });
|
|
6865
|
-
case
|
|
6846
|
+
case "error" /* ERROR */:
|
|
6866
6847
|
return /* @__PURE__ */ (0, import_jsx_runtime25.jsx)(Text, { color: theme.status.error, children: "\u2717" });
|
|
6867
6848
|
default:
|
|
6868
6849
|
return checkExhaustive(state);
|
|
@@ -6915,22 +6896,22 @@ var hasPayload = (res) => {
|
|
|
6915
6896
|
function getFileOpData(diff, status, resultDisplay, terminalWidth, availableTerminalHeight, isClickable) {
|
|
6916
6897
|
const added = (diff.diffStat?.model_added_lines ?? 0) + (diff.diffStat?.user_added_lines ?? 0);
|
|
6917
6898
|
const removed = (diff.diffStat?.model_removed_lines ?? 0) + (diff.diffStat?.user_removed_lines ?? 0);
|
|
6918
|
-
const isAcceptedOrConfirming = status ===
|
|
6899
|
+
const isAcceptedOrConfirming = status === "success" /* Success */ || status === "executing" /* Executing */ || status === "awaiting_approval" /* AwaitingApproval */;
|
|
6919
6900
|
const addColor = isAcceptedOrConfirming ? theme.status.success : theme.text.secondary;
|
|
6920
6901
|
const removeColor = isAcceptedOrConfirming ? theme.status.error : theme.text.secondary;
|
|
6921
6902
|
const showDiffStat = !!diff.diffStat;
|
|
6922
6903
|
const description = /* @__PURE__ */ (0, import_jsx_runtime26.jsx)(Box_default, { flexDirection: "row", children: /* @__PURE__ */ (0, import_jsx_runtime26.jsx)(Text, { color: theme.text.secondary, wrap: "truncate-end", children: diff.fileName }) });
|
|
6923
6904
|
let resultSummary = "";
|
|
6924
6905
|
let resultColor = theme.text.secondary;
|
|
6925
|
-
if (status ===
|
|
6906
|
+
if (status === "awaiting_approval" /* AwaitingApproval */) {
|
|
6926
6907
|
resultSummary = "Confirming";
|
|
6927
|
-
} else if (status ===
|
|
6908
|
+
} else if (status === "success" /* Success */ || status === "executing" /* Executing */) {
|
|
6928
6909
|
resultSummary = "Accepted";
|
|
6929
6910
|
resultColor = theme.text.accent;
|
|
6930
|
-
} else if (status ===
|
|
6911
|
+
} else if (status === "cancelled" /* Cancelled */) {
|
|
6931
6912
|
resultSummary = "Rejected";
|
|
6932
6913
|
resultColor = theme.status.error;
|
|
6933
|
-
} else if (status ===
|
|
6914
|
+
} else if (status === "error" /* Error */) {
|
|
6934
6915
|
resultSummary = typeof resultDisplay === "string" ? resultDisplay : "Failed";
|
|
6935
6916
|
resultColor = theme.status.error;
|
|
6936
6917
|
}
|
|
@@ -6961,7 +6942,7 @@ function getFileOpData(diff, status, resultDisplay, terminalWidth, availableTerm
|
|
|
6961
6942
|
filename: diff.fileName,
|
|
6962
6943
|
terminalWidth: terminalWidth - PAYLOAD_MARGIN_LEFT,
|
|
6963
6944
|
availableTerminalHeight,
|
|
6964
|
-
disableColor: status ===
|
|
6945
|
+
disableColor: status === "cancelled" /* Cancelled */
|
|
6965
6946
|
}
|
|
6966
6947
|
);
|
|
6967
6948
|
return { description, summary, payload };
|
|
@@ -7089,10 +7070,10 @@ var DenseToolMessage = (props) => {
|
|
|
7089
7070
|
if (isGrepResult(resultDisplay)) {
|
|
7090
7071
|
return getGenericSuccessData(resultDisplay, originalDescription);
|
|
7091
7072
|
}
|
|
7092
|
-
if (status ===
|
|
7073
|
+
if (status === "success" /* Success */ && resultDisplay) {
|
|
7093
7074
|
return getGenericSuccessData(resultDisplay, originalDescription);
|
|
7094
7075
|
}
|
|
7095
|
-
if (status ===
|
|
7076
|
+
if (status === "error" /* Error */) {
|
|
7096
7077
|
const text = typeof resultDisplay === "string" ? resultDisplay.replace(/\n/g, " ") : "Failed";
|
|
7097
7078
|
const errorSummary = /* @__PURE__ */ (0, import_jsx_runtime26.jsxs)(Text, { color: theme.status.error, wrap: "truncate-end", children: [
|
|
7098
7079
|
"\u2192 ",
|
|
@@ -7133,7 +7114,7 @@ var DenseToolMessage = (props) => {
|
|
|
7133
7114
|
language: fileExtension,
|
|
7134
7115
|
maxWidth: terminalWidth - PAYLOAD_MARGIN_LEFT,
|
|
7135
7116
|
settings,
|
|
7136
|
-
disableColor: status ===
|
|
7117
|
+
disableColor: status === "cancelled" /* Cancelled */,
|
|
7137
7118
|
returnLines: true
|
|
7138
7119
|
});
|
|
7139
7120
|
} else {
|
|
@@ -7141,7 +7122,7 @@ var DenseToolMessage = (props) => {
|
|
|
7141
7122
|
parsedLines,
|
|
7142
7123
|
filename: diff.fileName,
|
|
7143
7124
|
terminalWidth: terminalWidth - PAYLOAD_MARGIN_LEFT,
|
|
7144
|
-
disableColor: status ===
|
|
7125
|
+
disableColor: status === "cancelled" /* Cancelled */
|
|
7145
7126
|
});
|
|
7146
7127
|
}
|
|
7147
7128
|
}, [diff, isExpanded, isAlternateBuffer, terminalWidth, settings, status]);
|
|
@@ -7271,7 +7252,7 @@ function isToolExecuting(pendingHistoryItems) {
|
|
|
7271
7252
|
return pendingHistoryItems.some((item) => {
|
|
7272
7253
|
if (item && item.type === "tool_group") {
|
|
7273
7254
|
return item.tools.some(
|
|
7274
|
-
(tool) =>
|
|
7255
|
+
(tool) => "executing" /* Executing */ === tool.status
|
|
7275
7256
|
);
|
|
7276
7257
|
}
|
|
7277
7258
|
return false;
|
|
@@ -7280,7 +7261,7 @@ function isToolExecuting(pendingHistoryItems) {
|
|
|
7280
7261
|
function isToolAwaitingConfirmation(pendingHistoryItems) {
|
|
7281
7262
|
return pendingHistoryItems.filter((item) => item.type === "tool_group").some(
|
|
7282
7263
|
(item) => item.tools.some(
|
|
7283
|
-
(tool) =>
|
|
7264
|
+
(tool) => "awaiting_approval" /* AwaitingApproval */ === tool.status
|
|
7284
7265
|
)
|
|
7285
7266
|
);
|
|
7286
7267
|
}
|
|
@@ -7303,14 +7284,14 @@ function getToolGroupBorderAppearance(item, activeShellPtyId, embeddedShellFocus
|
|
|
7303
7284
|
if (isTrackedToolCall(t)) {
|
|
7304
7285
|
return t.status !== "success" && t.status !== "error" && t.status !== "cancelled";
|
|
7305
7286
|
} else {
|
|
7306
|
-
return t.status !==
|
|
7287
|
+
return t.status !== "success" /* Success */ && t.status !== "error" /* Error */ && t.status !== "cancelled" /* Cancelled */;
|
|
7307
7288
|
}
|
|
7308
7289
|
});
|
|
7309
7290
|
const isEmbeddedShellFocused = toolsToInspect.some((t) => {
|
|
7310
7291
|
if (isTrackedToolCall(t)) {
|
|
7311
7292
|
return isShellTool(t.request.name) && t.status === "executing" && t.pid === activeShellPtyId && !!embeddedShellFocused;
|
|
7312
7293
|
} else {
|
|
7313
|
-
return isShellTool(t.name) && t.status ===
|
|
7294
|
+
return isShellTool(t.name) && t.status === "executing" /* Executing */ && t.ptyId === activeShellPtyId && !!embeddedShellFocused;
|
|
7314
7295
|
}
|
|
7315
7296
|
});
|
|
7316
7297
|
const isShellCommand = toolsToInspect.some((t) => {
|
|
@@ -7409,7 +7390,7 @@ var ToolGroupMessage = ({
|
|
|
7409
7390
|
const groupedTools = (0, import_react21.useMemo)(() => {
|
|
7410
7391
|
const groups = [];
|
|
7411
7392
|
for (const tool of visibleToolCalls) {
|
|
7412
|
-
if (tool.kind ===
|
|
7393
|
+
if (tool.kind === "agent" /* Agent */) {
|
|
7413
7394
|
const lastGroup = groups[groups.length - 1];
|
|
7414
7395
|
if (Array.isArray(lastGroup)) {
|
|
7415
7396
|
lastGroup.push(tool);
|
|
@@ -7464,7 +7445,7 @@ var ToolGroupMessage = ({
|
|
|
7464
7445
|
}, [groupedTools, isCompactModeEnabled, borderTopOverride]);
|
|
7465
7446
|
let countToolCallsWithResults = 0;
|
|
7466
7447
|
for (const tool of visibleToolCalls) {
|
|
7467
|
-
if (tool.kind !==
|
|
7448
|
+
if (tool.kind !== "agent" /* Agent */) {
|
|
7468
7449
|
if (isCompactTool(tool, isCompactModeEnabled)) {
|
|
7469
7450
|
if (hasDensePayload(tool)) {
|
|
7470
7451
|
countToolCallsWithResults++;
|
|
@@ -7638,7 +7619,7 @@ var ToolGroupDisplay = ({
|
|
|
7638
7619
|
}
|
|
7639
7620
|
const { tools, borderColor, borderDimColor, borderTop, borderBottom } = item;
|
|
7640
7621
|
const visibleTools = tools.filter(
|
|
7641
|
-
(t) => t.status !==
|
|
7622
|
+
(t) => t.status !== "awaiting_approval" /* AwaitingApproval */
|
|
7642
7623
|
);
|
|
7643
7624
|
const noticeTools = visibleTools.filter((t) => t.format === "notice");
|
|
7644
7625
|
const otherTools = visibleTools.filter(
|
|
@@ -7840,18 +7821,18 @@ function CompressionMessage({
|
|
|
7840
7821
|
return "Compressing chat history";
|
|
7841
7822
|
}
|
|
7842
7823
|
switch (compressionStatus) {
|
|
7843
|
-
case
|
|
7824
|
+
case 1 /* COMPRESSED */:
|
|
7844
7825
|
return `Chat history compressed from ${originalTokens} to ${newTokens} tokens.`;
|
|
7845
|
-
case
|
|
7826
|
+
case 2 /* COMPRESSION_FAILED_INFLATED_TOKEN_COUNT */:
|
|
7846
7827
|
if (originalTokens < 5e4) {
|
|
7847
7828
|
return "Compression was not beneficial for this history size.";
|
|
7848
7829
|
}
|
|
7849
7830
|
return "Chat history compression did not reduce size. This may indicate issues with the compression prompt.";
|
|
7850
|
-
case
|
|
7831
|
+
case 3 /* COMPRESSION_FAILED_TOKEN_COUNT_ERROR */:
|
|
7851
7832
|
return "Could not compress chat history due to a token counting error.";
|
|
7852
|
-
case
|
|
7833
|
+
case 4 /* COMPRESSION_FAILED_EMPTY_SUMMARY */:
|
|
7853
7834
|
return "Chat history compression failed: the model returned an empty summary.";
|
|
7854
|
-
case
|
|
7835
|
+
case 5 /* NOOP */:
|
|
7855
7836
|
return "Nothing to compress.";
|
|
7856
7837
|
default:
|
|
7857
7838
|
return "";
|
|
@@ -8277,8 +8258,8 @@ var ModelUsageTable = ({ models }) => {
|
|
|
8277
8258
|
);
|
|
8278
8259
|
roleEntries.sort(([a], [b]) => {
|
|
8279
8260
|
if (a === b) return 0;
|
|
8280
|
-
if (a ===
|
|
8281
|
-
if (b ===
|
|
8261
|
+
if (a === "main" /* MAIN */) return -1;
|
|
8262
|
+
if (b === "main" /* MAIN */) return 1;
|
|
8282
8263
|
return a.localeCompare(b);
|
|
8283
8264
|
});
|
|
8284
8265
|
roleEntries.forEach(([role, roleMetrics]) => {
|
|
@@ -8609,8 +8590,8 @@ var ModelStatsDisplay = ({
|
|
|
8609
8590
|
return validRoles.includes(role);
|
|
8610
8591
|
}).sort((a, b) => {
|
|
8611
8592
|
if (a === b) return 0;
|
|
8612
|
-
if (a ===
|
|
8613
|
-
if (b ===
|
|
8593
|
+
if (a === "main" /* MAIN */) return -1;
|
|
8594
|
+
if (b === "main" /* MAIN */) return 1;
|
|
8614
8595
|
return a.localeCompare(b);
|
|
8615
8596
|
});
|
|
8616
8597
|
const createRow = (metric, getValue, options = {}) => {
|
|
@@ -9401,7 +9382,7 @@ var McpStatus = ({
|
|
|
9401
9382
|
);
|
|
9402
9383
|
const originalStatus = serverStatus(serverName);
|
|
9403
9384
|
const hasCachedItems = serverTools.length > 0 || serverPrompts.length > 0 || serverResources.length > 0;
|
|
9404
|
-
const status = originalStatus ===
|
|
9385
|
+
const status = originalStatus === "disconnected" /* DISCONNECTED */ && hasCachedItems ? "connected" /* CONNECTED */ : originalStatus;
|
|
9405
9386
|
let statusIndicator = "";
|
|
9406
9387
|
let statusText = "";
|
|
9407
9388
|
let statusColor = theme.text.primary;
|
|
@@ -9413,17 +9394,17 @@ var McpStatus = ({
|
|
|
9413
9394
|
statusColor = theme.text.secondary;
|
|
9414
9395
|
} else {
|
|
9415
9396
|
switch (status) {
|
|
9416
|
-
case
|
|
9397
|
+
case "connected" /* CONNECTED */:
|
|
9417
9398
|
statusIndicator = "\u{1F7E2}";
|
|
9418
9399
|
statusText = "Ready";
|
|
9419
9400
|
statusColor = theme.status.success;
|
|
9420
9401
|
break;
|
|
9421
|
-
case
|
|
9402
|
+
case "connecting" /* CONNECTING */:
|
|
9422
9403
|
statusIndicator = "\u{1F504}";
|
|
9423
9404
|
statusText = "Starting... (first startup may take longer)";
|
|
9424
9405
|
statusColor = theme.status.warning;
|
|
9425
9406
|
break;
|
|
9426
|
-
case
|
|
9407
|
+
case "disconnected" /* DISCONNECTED */:
|
|
9427
9408
|
default:
|
|
9428
9409
|
statusIndicator = "\u{1F534}";
|
|
9429
9410
|
statusText = "Disconnected";
|
|
@@ -9471,12 +9452,12 @@ var McpStatus = ({
|
|
|
9471
9452
|
/* @__PURE__ */ (0, import_jsx_runtime48.jsxs)(Text, { children: [
|
|
9472
9453
|
" - ",
|
|
9473
9454
|
statusText,
|
|
9474
|
-
status ===
|
|
9455
|
+
status === "connected" /* CONNECTED */ && parts.length > 0 && ` (${parts.join(", ")})`
|
|
9475
9456
|
] }),
|
|
9476
9457
|
authStatusNode
|
|
9477
9458
|
] }),
|
|
9478
|
-
status ===
|
|
9479
|
-
status ===
|
|
9459
|
+
status === "connecting" /* CONNECTING */ && /* @__PURE__ */ (0, import_jsx_runtime48.jsx)(Text, { children: " (tools and prompts will appear when ready)" }),
|
|
9460
|
+
status === "disconnected" /* DISCONNECTED */ && toolCount > 0 && /* @__PURE__ */ (0, import_jsx_runtime48.jsxs)(Text, { children: [
|
|
9480
9461
|
" (",
|
|
9481
9462
|
toolCount,
|
|
9482
9463
|
" tools cached)"
|
|
@@ -10037,7 +10018,7 @@ var Notifications = () => {
|
|
|
10037
10018
|
if (dismissed) return [];
|
|
10038
10019
|
const counts = persistentState.get("startupWarningCounts") || {};
|
|
10039
10020
|
return startupWarnings.filter((w) => {
|
|
10040
|
-
if (w.priority ===
|
|
10021
|
+
if (w.priority === "low" /* Low */) {
|
|
10041
10022
|
const count = counts[w.id] || 0;
|
|
10042
10023
|
return count < MAX_STARTUP_WARNING_SHOW_COUNT;
|
|
10043
10024
|
}
|
|
@@ -10050,7 +10031,7 @@ var Notifications = () => {
|
|
|
10050
10031
|
const counts = { ...persistentState.get("startupWarningCounts") || {} };
|
|
10051
10032
|
let changed = false;
|
|
10052
10033
|
visibleWarnings.forEach((w) => {
|
|
10053
|
-
if (w.priority ===
|
|
10034
|
+
if (w.priority === "low" /* Low */) {
|
|
10054
10035
|
counts[w.id] = (counts[w.id] || 0) + 1;
|
|
10055
10036
|
changed = true;
|
|
10056
10037
|
}
|
|
@@ -10157,7 +10138,7 @@ var UserIdentity = ({ config }) => {
|
|
|
10157
10138
|
}
|
|
10158
10139
|
return /* @__PURE__ */ (0, import_jsx_runtime58.jsxs)(Box_default, { flexDirection: "column", children: [
|
|
10159
10140
|
/* @__PURE__ */ (0, import_jsx_runtime58.jsxs)(Box_default, { children: [
|
|
10160
|
-
/* @__PURE__ */ (0, import_jsx_runtime58.jsx)(Text, { color: theme.text.primary, wrap: "truncate-end", children: authType ===
|
|
10141
|
+
/* @__PURE__ */ (0, import_jsx_runtime58.jsx)(Text, { color: theme.text.primary, wrap: "truncate-end", children: authType === "oauth-personal" /* LOGIN_WITH_GOOGLE */ ? /* @__PURE__ */ (0, import_jsx_runtime58.jsxs)(Text, { children: [
|
|
10161
10142
|
/* @__PURE__ */ (0, import_jsx_runtime58.jsxs)(Text, { bold: true, children: [
|
|
10162
10143
|
"Signed in with Google",
|
|
10163
10144
|
email ? ":" : ""
|
|
@@ -10400,7 +10381,7 @@ var import_react32 = __toESM(require_react(), 1);
|
|
|
10400
10381
|
function getConfirmingToolState(pendingHistoryItems) {
|
|
10401
10382
|
const allPendingTools = getAllToolCalls(pendingHistoryItems);
|
|
10402
10383
|
const confirmingTools = allPendingTools.filter(
|
|
10403
|
-
(tool) => tool.status ===
|
|
10384
|
+
(tool) => tool.status === "awaiting_approval" /* AwaitingApproval */
|
|
10404
10385
|
);
|
|
10405
10386
|
if (confirmingTools.length === 0) {
|
|
10406
10387
|
return null;
|
|
@@ -11708,7 +11689,7 @@ var ExitPlanModeDialog = ({
|
|
|
11708
11689
|
{
|
|
11709
11690
|
questions: [
|
|
11710
11691
|
{
|
|
11711
|
-
type:
|
|
11692
|
+
type: "choice" /* CHOICE */,
|
|
11712
11693
|
header: "Approval",
|
|
11713
11694
|
question: planContent,
|
|
11714
11695
|
options: [
|
|
@@ -11729,9 +11710,9 @@ var ExitPlanModeDialog = ({
|
|
|
11729
11710
|
onSubmit: (answers) => {
|
|
11730
11711
|
const answer = answers["0"];
|
|
11731
11712
|
if (answer === "Yes, automatically accept edits" /* Auto */) {
|
|
11732
|
-
onApprove(
|
|
11713
|
+
onApprove("autoEdit" /* AUTO_EDIT */);
|
|
11733
11714
|
} else if (answer === "Yes, manually accept edits" /* Manual */) {
|
|
11734
|
-
onApprove(
|
|
11715
|
+
onApprove("default" /* DEFAULT */);
|
|
11735
11716
|
} else if (answer) {
|
|
11736
11717
|
onFeedback(answer);
|
|
11737
11718
|
}
|
|
@@ -11942,7 +11923,7 @@ ${deceptiveUrlWarnings.map(
|
|
|
11942
11923
|
);
|
|
11943
11924
|
(0, import_react37.useEffect)(() => {
|
|
11944
11925
|
if (isCancelling) {
|
|
11945
|
-
handleConfirm(
|
|
11926
|
+
handleConfirm("cancel" /* Cancel */);
|
|
11946
11927
|
}
|
|
11947
11928
|
}, [isCancelling, handleConfirm]);
|
|
11948
11929
|
const handleSelect = (0, import_react37.useCallback)(
|
|
@@ -11955,19 +11936,19 @@ ${deceptiveUrlWarnings.map(
|
|
|
11955
11936
|
if (!confirmationDetails.isModifying) {
|
|
11956
11937
|
options2.push({
|
|
11957
11938
|
label: "Allow once",
|
|
11958
|
-
value:
|
|
11939
|
+
value: "proceed_once" /* ProceedOnce */,
|
|
11959
11940
|
key: "Allow once"
|
|
11960
11941
|
});
|
|
11961
11942
|
if (isTrustedFolder) {
|
|
11962
11943
|
options2.push({
|
|
11963
11944
|
label: "Allow for this session",
|
|
11964
|
-
value:
|
|
11945
|
+
value: "proceed_always" /* ProceedAlways */,
|
|
11965
11946
|
key: "Allow for this session"
|
|
11966
11947
|
});
|
|
11967
11948
|
if (allowPermanentApproval) {
|
|
11968
11949
|
options2.push({
|
|
11969
11950
|
label: "Allow for this file in all future sessions",
|
|
11970
|
-
value:
|
|
11951
|
+
value: "proceed_always_and_save" /* ProceedAlwaysAndSave */,
|
|
11971
11952
|
key: "Allow for this file in all future sessions"
|
|
11972
11953
|
});
|
|
11973
11954
|
}
|
|
@@ -11975,119 +11956,119 @@ ${deceptiveUrlWarnings.map(
|
|
|
11975
11956
|
if (!config.getIdeMode() || !isDiffingEnabled) {
|
|
11976
11957
|
options2.push({
|
|
11977
11958
|
label: "Modify with external editor",
|
|
11978
|
-
value:
|
|
11959
|
+
value: "modify_with_editor" /* ModifyWithEditor */,
|
|
11979
11960
|
key: "Modify with external editor"
|
|
11980
11961
|
});
|
|
11981
11962
|
}
|
|
11982
11963
|
options2.push({
|
|
11983
11964
|
label: "No, suggest changes (esc)",
|
|
11984
|
-
value:
|
|
11965
|
+
value: "cancel" /* Cancel */,
|
|
11985
11966
|
key: "No, suggest changes (esc)"
|
|
11986
11967
|
});
|
|
11987
11968
|
}
|
|
11988
11969
|
} else if (confirmationDetails.type === "sandbox_expansion") {
|
|
11989
11970
|
options2.push({
|
|
11990
11971
|
label: "Allow once",
|
|
11991
|
-
value:
|
|
11972
|
+
value: "proceed_once" /* ProceedOnce */,
|
|
11992
11973
|
key: "Allow once"
|
|
11993
11974
|
});
|
|
11994
11975
|
if (isTrustedFolder) {
|
|
11995
11976
|
options2.push({
|
|
11996
11977
|
label: "Allow for this session",
|
|
11997
|
-
value:
|
|
11978
|
+
value: "proceed_always" /* ProceedAlways */,
|
|
11998
11979
|
key: "Allow for this session"
|
|
11999
11980
|
});
|
|
12000
11981
|
if (allowPermanentApproval) {
|
|
12001
11982
|
options2.push({
|
|
12002
11983
|
label: "Allow for all future sessions",
|
|
12003
|
-
value:
|
|
11984
|
+
value: "proceed_always_and_save" /* ProceedAlwaysAndSave */,
|
|
12004
11985
|
key: "Allow for all future sessions"
|
|
12005
11986
|
});
|
|
12006
11987
|
}
|
|
12007
11988
|
}
|
|
12008
11989
|
options2.push({
|
|
12009
11990
|
label: "No, suggest changes (esc)",
|
|
12010
|
-
value:
|
|
11991
|
+
value: "cancel" /* Cancel */,
|
|
12011
11992
|
key: "No, suggest changes (esc)"
|
|
12012
11993
|
});
|
|
12013
11994
|
} else if (confirmationDetails.type === "exec") {
|
|
12014
11995
|
options2.push({
|
|
12015
11996
|
label: "Allow once",
|
|
12016
|
-
value:
|
|
11997
|
+
value: "proceed_once" /* ProceedOnce */,
|
|
12017
11998
|
key: "Allow once"
|
|
12018
11999
|
});
|
|
12019
12000
|
if (isTrustedFolder) {
|
|
12020
12001
|
options2.push({
|
|
12021
12002
|
label: `Allow for this session`,
|
|
12022
|
-
value:
|
|
12003
|
+
value: "proceed_always" /* ProceedAlways */,
|
|
12023
12004
|
key: `Allow for this session`
|
|
12024
12005
|
});
|
|
12025
12006
|
if (allowPermanentApproval) {
|
|
12026
12007
|
options2.push({
|
|
12027
12008
|
label: `Allow this command for all future sessions`,
|
|
12028
|
-
value:
|
|
12009
|
+
value: "proceed_always_and_save" /* ProceedAlwaysAndSave */,
|
|
12029
12010
|
key: `Allow for all future sessions`
|
|
12030
12011
|
});
|
|
12031
12012
|
}
|
|
12032
12013
|
}
|
|
12033
12014
|
options2.push({
|
|
12034
12015
|
label: "No, suggest changes (esc)",
|
|
12035
|
-
value:
|
|
12016
|
+
value: "cancel" /* Cancel */,
|
|
12036
12017
|
key: "No, suggest changes (esc)"
|
|
12037
12018
|
});
|
|
12038
12019
|
} else if (confirmationDetails.type === "info") {
|
|
12039
12020
|
options2.push({
|
|
12040
12021
|
label: "Allow once",
|
|
12041
|
-
value:
|
|
12022
|
+
value: "proceed_once" /* ProceedOnce */,
|
|
12042
12023
|
key: "Allow once"
|
|
12043
12024
|
});
|
|
12044
12025
|
if (isTrustedFolder) {
|
|
12045
12026
|
options2.push({
|
|
12046
12027
|
label: "Allow for this session",
|
|
12047
|
-
value:
|
|
12028
|
+
value: "proceed_always" /* ProceedAlways */,
|
|
12048
12029
|
key: "Allow for this session"
|
|
12049
12030
|
});
|
|
12050
12031
|
if (allowPermanentApproval) {
|
|
12051
12032
|
options2.push({
|
|
12052
12033
|
label: "Allow for all future sessions",
|
|
12053
|
-
value:
|
|
12034
|
+
value: "proceed_always_and_save" /* ProceedAlwaysAndSave */,
|
|
12054
12035
|
key: "Allow for all future sessions"
|
|
12055
12036
|
});
|
|
12056
12037
|
}
|
|
12057
12038
|
}
|
|
12058
12039
|
options2.push({
|
|
12059
12040
|
label: "No, suggest changes (esc)",
|
|
12060
|
-
value:
|
|
12041
|
+
value: "cancel" /* Cancel */,
|
|
12061
12042
|
key: "No, suggest changes (esc)"
|
|
12062
12043
|
});
|
|
12063
12044
|
} else if (confirmationDetails.type === "mcp") {
|
|
12064
12045
|
options2.push({
|
|
12065
12046
|
label: "Allow once",
|
|
12066
|
-
value:
|
|
12047
|
+
value: "proceed_once" /* ProceedOnce */,
|
|
12067
12048
|
key: "Allow once"
|
|
12068
12049
|
});
|
|
12069
12050
|
if (isTrustedFolder) {
|
|
12070
12051
|
options2.push({
|
|
12071
12052
|
label: "Allow tool for this session",
|
|
12072
|
-
value:
|
|
12053
|
+
value: "proceed_always_tool" /* ProceedAlwaysTool */,
|
|
12073
12054
|
key: "Allow tool for this session"
|
|
12074
12055
|
});
|
|
12075
12056
|
options2.push({
|
|
12076
12057
|
label: "Allow all server tools for this session",
|
|
12077
|
-
value:
|
|
12058
|
+
value: "proceed_always_server" /* ProceedAlwaysServer */,
|
|
12078
12059
|
key: "Allow all server tools for this session"
|
|
12079
12060
|
});
|
|
12080
12061
|
if (allowPermanentApproval) {
|
|
12081
12062
|
options2.push({
|
|
12082
12063
|
label: "Allow tool for all future sessions",
|
|
12083
|
-
value:
|
|
12064
|
+
value: "proceed_always_and_save" /* ProceedAlwaysAndSave */,
|
|
12084
12065
|
key: "Allow tool for all future sessions"
|
|
12085
12066
|
});
|
|
12086
12067
|
}
|
|
12087
12068
|
}
|
|
12088
12069
|
options2.push({
|
|
12089
12070
|
label: "No, suggest changes (esc)",
|
|
12090
|
-
value:
|
|
12071
|
+
value: "cancel" /* Cancel */,
|
|
12091
12072
|
key: "No, suggest changes (esc)"
|
|
12092
12073
|
});
|
|
12093
12074
|
}
|
|
@@ -12126,7 +12107,7 @@ ${deceptiveUrlWarnings.map(
|
|
|
12126
12107
|
const containsRedirection = commandsToDisplay.some(
|
|
12127
12108
|
(cmd) => hasRedirection(cmd)
|
|
12128
12109
|
);
|
|
12129
|
-
const isAutoEdit = config.getApprovalMode() ===
|
|
12110
|
+
const isAutoEdit = config.getApprovalMode() === "yolo" /* YOLO */ || config.getApprovalMode() === "autoEdit" /* AUTO_EDIT */;
|
|
12130
12111
|
if (containsRedirection && !isAutoEdit) {
|
|
12131
12112
|
extraInfoLines = 1;
|
|
12132
12113
|
}
|
|
@@ -12152,7 +12133,7 @@ ${deceptiveUrlWarnings.map(
|
|
|
12152
12133
|
const isSafeToPersist = confirmationDetails.type === "info" || confirmationDetails.type === "edit" || confirmationDetails.type === "mcp";
|
|
12153
12134
|
if (isSafeToPersist && settings.merged.security.autoAddToPolicyByDefault) {
|
|
12154
12135
|
const alwaysAndSaveIndex = options2.findIndex(
|
|
12155
|
-
(o) => o.value ===
|
|
12136
|
+
(o) => o.value === "proceed_always_and_save" /* ProceedAlwaysAndSave */
|
|
12156
12137
|
);
|
|
12157
12138
|
if (alwaysAndSaveIndex !== -1) {
|
|
12158
12139
|
initialIndex2 = alwaysAndSaveIndex;
|
|
@@ -12169,10 +12150,10 @@ ${deceptiveUrlWarnings.map(
|
|
|
12169
12150
|
{
|
|
12170
12151
|
questions: confirmationDetails.questions,
|
|
12171
12152
|
onSubmit: (answers) => {
|
|
12172
|
-
handleConfirm(
|
|
12153
|
+
handleConfirm("proceed_once" /* ProceedOnce */, { answers });
|
|
12173
12154
|
},
|
|
12174
12155
|
onCancel: () => {
|
|
12175
|
-
handleConfirm(
|
|
12156
|
+
handleConfirm("cancel" /* Cancel */);
|
|
12176
12157
|
},
|
|
12177
12158
|
width: terminalWidth,
|
|
12178
12159
|
availableHeight: bodyHeight
|
|
@@ -12193,19 +12174,19 @@ ${deceptiveUrlWarnings.map(
|
|
|
12193
12174
|
planPath: confirmationDetails.planPath,
|
|
12194
12175
|
getPreferredEditor,
|
|
12195
12176
|
onApprove: (approvalMode) => {
|
|
12196
|
-
handleConfirm(
|
|
12177
|
+
handleConfirm("proceed_once" /* ProceedOnce */, {
|
|
12197
12178
|
approved: true,
|
|
12198
12179
|
approvalMode
|
|
12199
12180
|
});
|
|
12200
12181
|
},
|
|
12201
12182
|
onFeedback: (feedback) => {
|
|
12202
|
-
handleConfirm(
|
|
12183
|
+
handleConfirm("proceed_once" /* ProceedOnce */, {
|
|
12203
12184
|
approved: false,
|
|
12204
12185
|
feedback
|
|
12205
12186
|
});
|
|
12206
12187
|
},
|
|
12207
12188
|
onCancel: () => {
|
|
12208
|
-
handleConfirm(
|
|
12189
|
+
handleConfirm("cancel" /* Cancel */);
|
|
12209
12190
|
},
|
|
12210
12191
|
width: terminalWidth,
|
|
12211
12192
|
availableHeight: bodyHeight
|
|
@@ -12314,7 +12295,7 @@ ${deceptiveUrlWarnings.map(
|
|
|
12314
12295
|
const containsRedirection = commandsToDisplay.some(
|
|
12315
12296
|
(cmd) => hasRedirection(cmd)
|
|
12316
12297
|
);
|
|
12317
|
-
const isAutoEdit = config.getApprovalMode() ===
|
|
12298
|
+
const isAutoEdit = config.getApprovalMode() === "yolo" /* YOLO */ || config.getApprovalMode() === "autoEdit" /* AUTO_EDIT */;
|
|
12318
12299
|
let warnings = null;
|
|
12319
12300
|
if (containsRedirection && !isAutoEdit) {
|
|
12320
12301
|
const tipText = `To auto-accept, press ${formatCommand("app.cycleApprovalMode" /* CYCLE_APPROVAL_MODE */)}`;
|
|
@@ -12473,7 +12454,7 @@ ${deceptiveUrlWarnings.map(
|
|
|
12473
12454
|
const bodyOverflowDirection = confirmationDetails.type === "mcp" && isMcpToolDetailsExpanded ? "bottom" : "top";
|
|
12474
12455
|
const renderRadioItem = (0, import_react37.useCallback)(
|
|
12475
12456
|
(item, { titleColor }) => {
|
|
12476
|
-
if (item.value ===
|
|
12457
|
+
if (item.value === "proceed_always_and_save" /* ProceedAlwaysAndSave */) {
|
|
12477
12458
|
return /* @__PURE__ */ (0, import_jsx_runtime65.jsxs)(Text, { color: titleColor, wrap: "truncate", children: [
|
|
12478
12459
|
item.label,
|
|
12479
12460
|
" ",
|
|
@@ -14503,7 +14484,7 @@ async function validateAuthMethodWithSettings(authType, settings) {
|
|
|
14503
14484
|
if (settings.merged.security.auth.useExternal) {
|
|
14504
14485
|
return null;
|
|
14505
14486
|
}
|
|
14506
|
-
if (authType ===
|
|
14487
|
+
if (authType === "gemini-api-key" /* USE_GEMINI */) {
|
|
14507
14488
|
return null;
|
|
14508
14489
|
}
|
|
14509
14490
|
return validateAuthMethod(authType);
|
|
@@ -14555,7 +14536,7 @@ var useAuthCommand = (settings, config, initialAuthError = null, initialAccountS
|
|
|
14555
14536
|
}
|
|
14556
14537
|
return;
|
|
14557
14538
|
}
|
|
14558
|
-
if (authType ===
|
|
14539
|
+
if (authType === "gemini-api-key" /* USE_GEMINI */) {
|
|
14559
14540
|
const key = await reloadApiKey();
|
|
14560
14541
|
if (!key) {
|
|
14561
14542
|
setAuthState("awaiting_api_key_input" /* AwaitingApiKeyInput */);
|
|
@@ -14633,31 +14614,31 @@ function AuthDialog({
|
|
|
14633
14614
|
let items = [
|
|
14634
14615
|
{
|
|
14635
14616
|
label: "Sign in with Google",
|
|
14636
|
-
value:
|
|
14637
|
-
key:
|
|
14617
|
+
value: "oauth-personal" /* LOGIN_WITH_GOOGLE */,
|
|
14618
|
+
key: "oauth-personal" /* LOGIN_WITH_GOOGLE */
|
|
14638
14619
|
},
|
|
14639
14620
|
...process.env["CLOUD_SHELL"] === "true" ? [
|
|
14640
14621
|
{
|
|
14641
14622
|
label: "Use Cloud Shell user credentials",
|
|
14642
|
-
value:
|
|
14643
|
-
key:
|
|
14623
|
+
value: "compute-default-credentials" /* COMPUTE_ADC */,
|
|
14624
|
+
key: "compute-default-credentials" /* COMPUTE_ADC */
|
|
14644
14625
|
}
|
|
14645
14626
|
] : process.env["GEMINI_CLI_USE_COMPUTE_ADC"] === "true" ? [
|
|
14646
14627
|
{
|
|
14647
14628
|
label: "Use metadata server application default credentials",
|
|
14648
|
-
value:
|
|
14649
|
-
key:
|
|
14629
|
+
value: "compute-default-credentials" /* COMPUTE_ADC */,
|
|
14630
|
+
key: "compute-default-credentials" /* COMPUTE_ADC */
|
|
14650
14631
|
}
|
|
14651
14632
|
] : [],
|
|
14652
14633
|
{
|
|
14653
14634
|
label: "Use Gemini API Key",
|
|
14654
|
-
value:
|
|
14655
|
-
key:
|
|
14635
|
+
value: "gemini-api-key" /* USE_GEMINI */,
|
|
14636
|
+
key: "gemini-api-key" /* USE_GEMINI */
|
|
14656
14637
|
},
|
|
14657
14638
|
{
|
|
14658
14639
|
label: "Vertex AI",
|
|
14659
|
-
value:
|
|
14660
|
-
key:
|
|
14640
|
+
value: "vertex-ai" /* USE_VERTEX_AI */,
|
|
14641
|
+
key: "vertex-ai" /* USE_VERTEX_AI */
|
|
14661
14642
|
}
|
|
14662
14643
|
];
|
|
14663
14644
|
if (settings.merged.security.auth.enforcedType) {
|
|
@@ -14679,9 +14660,9 @@ function AuthDialog({
|
|
|
14679
14660
|
return item.value === defaultAuthType;
|
|
14680
14661
|
}
|
|
14681
14662
|
if (process.env["GEMINI_API_KEY"]) {
|
|
14682
|
-
return item.value ===
|
|
14663
|
+
return item.value === "gemini-api-key" /* USE_GEMINI */;
|
|
14683
14664
|
}
|
|
14684
|
-
return item.value ===
|
|
14665
|
+
return item.value === "oauth-personal" /* LOGIN_WITH_GOOGLE */;
|
|
14685
14666
|
});
|
|
14686
14667
|
if (settings.merged.security.auth.enforcedType) {
|
|
14687
14668
|
initialAuthIndex = 0;
|
|
@@ -14692,7 +14673,7 @@ function AuthDialog({
|
|
|
14692
14673
|
return;
|
|
14693
14674
|
}
|
|
14694
14675
|
if (authType) {
|
|
14695
|
-
const needsRestart = authType ===
|
|
14676
|
+
const needsRestart = authType === "oauth-personal" /* LOGIN_WITH_GOOGLE */ || authType === "vertex-ai" /* USE_VERTEX_AI */ && process.env["CLOUD_SHELL"] === "true";
|
|
14696
14677
|
if (needsRestart) {
|
|
14697
14678
|
setAuthContext({ requiresRestart: true });
|
|
14698
14679
|
} else {
|
|
@@ -14700,12 +14681,12 @@ function AuthDialog({
|
|
|
14700
14681
|
}
|
|
14701
14682
|
await clearCachedCredentialFile();
|
|
14702
14683
|
settings.setValue(scope, "security.auth.selectedType", authType);
|
|
14703
|
-
if (authType ===
|
|
14684
|
+
if (authType === "oauth-personal" /* LOGIN_WITH_GOOGLE */ && config.isBrowserLaunchSuppressed()) {
|
|
14704
14685
|
setExiting(true);
|
|
14705
14686
|
setTimeout(relaunchApp, 100);
|
|
14706
14687
|
return;
|
|
14707
14688
|
}
|
|
14708
|
-
if (authType ===
|
|
14689
|
+
if (authType === "gemini-api-key" /* USE_GEMINI */) {
|
|
14709
14690
|
setAuthState("awaiting_api_key_input" /* AwaitingApiKeyInput */);
|
|
14710
14691
|
return;
|
|
14711
14692
|
}
|
|
@@ -15461,11 +15442,11 @@ var PrivacyNoticeText = ({
|
|
|
15461
15442
|
}) => {
|
|
15462
15443
|
const authType = config.getContentGeneratorConfig()?.authType;
|
|
15463
15444
|
switch (authType) {
|
|
15464
|
-
case
|
|
15445
|
+
case "gemini-api-key" /* USE_GEMINI */:
|
|
15465
15446
|
return /* @__PURE__ */ (0, import_jsx_runtime83.jsx)(GeminiPrivacyNotice, { onExit });
|
|
15466
|
-
case
|
|
15447
|
+
case "vertex-ai" /* USE_VERTEX_AI */:
|
|
15467
15448
|
return /* @__PURE__ */ (0, import_jsx_runtime83.jsx)(CloudPaidPrivacyNotice, { onExit });
|
|
15468
|
-
case
|
|
15449
|
+
case "oauth-personal" /* LOGIN_WITH_GOOGLE */:
|
|
15469
15450
|
default:
|
|
15470
15451
|
return /* @__PURE__ */ (0, import_jsx_runtime83.jsx)(CloudFreePrivacyNotice, { config, onExit });
|
|
15471
15452
|
}
|
|
@@ -15506,7 +15487,7 @@ function ProQuotaDialog({
|
|
|
15506
15487
|
value: "retry_always",
|
|
15507
15488
|
key: "retry_always"
|
|
15508
15489
|
},
|
|
15509
|
-
...authType ===
|
|
15490
|
+
...authType === "oauth-personal" /* LOGIN_WITH_GOOGLE */ && !isUltra ? [
|
|
15510
15491
|
{
|
|
15511
15492
|
label: "Upgrade for higher limits",
|
|
15512
15493
|
value: "upgrade",
|
|
@@ -16665,7 +16646,7 @@ function ModelDialog({ onClose }) {
|
|
|
16665
16646
|
const useGemini31 = config?.getGemini31LaunchedSync?.() ?? false;
|
|
16666
16647
|
const useGemini3_5Flash = config?.hasGemini35FlashGAAccess?.() ?? false;
|
|
16667
16648
|
const selectedAuthType = settings.merged.security.auth.selectedType;
|
|
16668
|
-
const useCustomToolModel = useGemini31 && selectedAuthType ===
|
|
16649
|
+
const useCustomToolModel = useGemini31 && selectedAuthType === "gemini-api-key" /* USE_GEMINI */;
|
|
16669
16650
|
const manualModelSelected = (0, import_react55.useMemo)(() => {
|
|
16670
16651
|
if (config?.getExperimentalDynamicModelConfiguration?.() === true && config.getModelConfigService) {
|
|
16671
16652
|
const def = config.getModelConfigService().getModelDefinition(preferredModel);
|
|
@@ -17988,10 +17969,10 @@ function initializeConsoleStore() {
|
|
|
17988
17969
|
globalConsoleMessages = [];
|
|
17989
17970
|
globalErrorCount = 0;
|
|
17990
17971
|
notifyListeners();
|
|
17991
|
-
coreEvents.off(
|
|
17992
|
-
coreEvents.off(
|
|
17993
|
-
coreEvents.on(
|
|
17994
|
-
coreEvents.on(
|
|
17972
|
+
coreEvents.off("console-log" /* ConsoleLog */, handleConsoleLog);
|
|
17973
|
+
coreEvents.off("output" /* Output */, handleOutput);
|
|
17974
|
+
coreEvents.on("console-log" /* ConsoleLog */, handleConsoleLog);
|
|
17975
|
+
coreEvents.on("output" /* Output */, handleOutput);
|
|
17995
17976
|
}
|
|
17996
17977
|
function notifyListeners() {
|
|
17997
17978
|
for (const listener of listeners) {
|
|
@@ -20128,7 +20109,7 @@ function usePromptCompletion({
|
|
|
20128
20109
|
{ model: "prompt-completion" },
|
|
20129
20110
|
contents,
|
|
20130
20111
|
signal,
|
|
20131
|
-
|
|
20112
|
+
"utility_autocomplete" /* UTILITY_AUTOCOMPLETE */
|
|
20132
20113
|
);
|
|
20133
20114
|
if (signal.aborted) {
|
|
20134
20115
|
return;
|
|
@@ -22206,9 +22187,9 @@ var InputPrompt = ({
|
|
|
22206
22187
|
onSuggestionsVisibilityChange(shouldShowSuggestions);
|
|
22207
22188
|
}
|
|
22208
22189
|
}, [shouldShowSuggestions, onSuggestionsVisibilityChange]);
|
|
22209
|
-
const showAutoAcceptStyling = !shellModeActive && approvalMode ===
|
|
22210
|
-
const showYoloStyling = !shellModeActive && approvalMode ===
|
|
22211
|
-
const showPlanStyling = !shellModeActive && approvalMode ===
|
|
22190
|
+
const showAutoAcceptStyling = !shellModeActive && approvalMode === "autoEdit" /* AUTO_EDIT */;
|
|
22191
|
+
const showYoloStyling = !shellModeActive && approvalMode === "yolo" /* YOLO */;
|
|
22192
|
+
const showPlanStyling = !shellModeActive && approvalMode === "plan" /* PLAN */;
|
|
22212
22193
|
let statusColor;
|
|
22213
22194
|
let statusText = "";
|
|
22214
22195
|
if (shellModeActive) {
|
|
@@ -23041,22 +23022,22 @@ var ApprovalModeIndicator = ({
|
|
|
23041
23022
|
const cycleHint = formatCommand("app.cycleApprovalMode" /* CYCLE_APPROVAL_MODE */);
|
|
23042
23023
|
const yoloHint = formatCommand("app.toggleYolo" /* TOGGLE_YOLO */);
|
|
23043
23024
|
switch (approvalMode) {
|
|
23044
|
-
case
|
|
23025
|
+
case "autoEdit" /* AUTO_EDIT */:
|
|
23045
23026
|
textColor = theme.status.warning;
|
|
23046
23027
|
textContent = "auto-accept edits";
|
|
23047
23028
|
subText = allowPlanMode ? `${cycleHint} to plan` : `${cycleHint} to manual`;
|
|
23048
23029
|
break;
|
|
23049
|
-
case
|
|
23030
|
+
case "plan" /* PLAN */:
|
|
23050
23031
|
textColor = theme.status.success;
|
|
23051
23032
|
textContent = "plan";
|
|
23052
23033
|
subText = `${cycleHint} to manual`;
|
|
23053
23034
|
break;
|
|
23054
|
-
case
|
|
23035
|
+
case "yolo" /* YOLO */:
|
|
23055
23036
|
textColor = theme.status.error;
|
|
23056
23037
|
textContent = "YOLO";
|
|
23057
23038
|
subText = yoloHint;
|
|
23058
23039
|
break;
|
|
23059
|
-
case
|
|
23040
|
+
case "default" /* DEFAULT */:
|
|
23060
23041
|
default:
|
|
23061
23042
|
textColor = theme.text.accent;
|
|
23062
23043
|
textContent = "";
|
|
@@ -23104,7 +23085,7 @@ var useComposerStatus = () => {
|
|
|
23104
23085
|
(item) => item.type === "tool_group"
|
|
23105
23086
|
).some(
|
|
23106
23087
|
(item) => item.tools.some(
|
|
23107
|
-
(tool) => tool.status ===
|
|
23088
|
+
(tool) => tool.status === "awaiting_approval" /* AwaitingApproval */
|
|
23108
23089
|
)
|
|
23109
23090
|
),
|
|
23110
23091
|
[uiState.pendingHistoryItems]
|
|
@@ -23119,13 +23100,13 @@ var useComposerStatus = () => {
|
|
|
23119
23100
|
const hideMinimalModeHintWhileBusy = !uiState.cleanUiDetailsVisible && (showLoadingIndicator || uiState.activeHooks.length > 0);
|
|
23120
23101
|
if (hideMinimalModeHintWhileBusy) return null;
|
|
23121
23102
|
switch (showApprovalModeIndicator) {
|
|
23122
|
-
case
|
|
23103
|
+
case "yolo" /* YOLO */:
|
|
23123
23104
|
return { text: "YOLO", color: theme.status.error };
|
|
23124
|
-
case
|
|
23105
|
+
case "plan" /* PLAN */:
|
|
23125
23106
|
return { text: "plan", color: theme.status.success };
|
|
23126
|
-
case
|
|
23107
|
+
case "autoEdit" /* AUTO_EDIT */:
|
|
23127
23108
|
return { text: "auto edit", color: theme.status.warning };
|
|
23128
|
-
case
|
|
23109
|
+
case "default" /* DEFAULT */:
|
|
23129
23110
|
default:
|
|
23130
23111
|
return null;
|
|
23131
23112
|
}
|
|
@@ -23479,7 +23460,7 @@ var ConfigInitDisplay = ({
|
|
|
23479
23460
|
let connected = 0;
|
|
23480
23461
|
const connecting = [];
|
|
23481
23462
|
for (const [name, client] of clients.entries()) {
|
|
23482
|
-
if (client.getStatus() ===
|
|
23463
|
+
if (client.getStatus() === "connected" /* CONNECTED */) {
|
|
23483
23464
|
connected++;
|
|
23484
23465
|
} else {
|
|
23485
23466
|
connecting.push(name);
|
|
@@ -23501,9 +23482,9 @@ var ConfigInitDisplay = ({
|
|
|
23501
23482
|
);
|
|
23502
23483
|
}
|
|
23503
23484
|
};
|
|
23504
|
-
coreEvents.on(
|
|
23485
|
+
coreEvents.on("mcp-client-update" /* McpClientUpdate */, onChange);
|
|
23505
23486
|
return () => {
|
|
23506
|
-
coreEvents.off(
|
|
23487
|
+
coreEvents.off("mcp-client-update" /* McpClientUpdate */, onChange);
|
|
23507
23488
|
};
|
|
23508
23489
|
}, [initialMessage]);
|
|
23509
23490
|
return /* @__PURE__ */ (0, import_jsx_runtime123.jsx)(Box_default, { marginTop: 1, children: /* @__PURE__ */ (0, import_jsx_runtime123.jsxs)(Text, { children: [
|
|
@@ -24220,7 +24201,7 @@ var useExecutionLifecycle = (addItemToHistory, setPendingHistoryItem, onExec, on
|
|
|
24220
24201
|
callId,
|
|
24221
24202
|
name: SHELL_COMMAND_NAME,
|
|
24222
24203
|
description: rawQuery,
|
|
24223
|
-
status:
|
|
24204
|
+
status: "executing" /* Executing */,
|
|
24224
24205
|
isClientInitiated: true,
|
|
24225
24206
|
resultDisplay: "",
|
|
24226
24207
|
confirmationDetails: void 0
|
|
@@ -24361,7 +24342,7 @@ __code=$?; pwd > ${escapedPwdFilePath}; exit $__code`;
|
|
|
24361
24342
|
mainContent = result.output.trim() || "(Command produced no output)";
|
|
24362
24343
|
}
|
|
24363
24344
|
let finalOutput = result.ansiOutput && result.ansiOutput.length > 0 ? result.ansiOutput : mainContent;
|
|
24364
|
-
let finalStatus =
|
|
24345
|
+
let finalStatus = "success" /* Success */;
|
|
24365
24346
|
const prependToAnsiOutput = (output, text) => {
|
|
24366
24347
|
const newLines = text.split("\n").map((line) => [
|
|
24367
24348
|
{
|
|
@@ -24380,20 +24361,20 @@ __code=$?; pwd > ${escapedPwdFilePath}; exit $__code`;
|
|
|
24380
24361
|
};
|
|
24381
24362
|
let prefix = "";
|
|
24382
24363
|
if (result.error) {
|
|
24383
|
-
finalStatus =
|
|
24364
|
+
finalStatus = "error" /* Error */;
|
|
24384
24365
|
prefix = result.error.message;
|
|
24385
24366
|
} else if (result.aborted) {
|
|
24386
|
-
finalStatus =
|
|
24367
|
+
finalStatus = "cancelled" /* Cancelled */;
|
|
24387
24368
|
prefix = "Command was cancelled.";
|
|
24388
24369
|
} else if (result.backgrounded) {
|
|
24389
|
-
finalStatus =
|
|
24370
|
+
finalStatus = "success" /* Success */;
|
|
24390
24371
|
finalOutput = `Command moved to background (PID: ${result.pid}). Output hidden. Press Ctrl+B to view.`;
|
|
24391
24372
|
mainContent = finalOutput;
|
|
24392
24373
|
} else if (result.signal) {
|
|
24393
|
-
finalStatus =
|
|
24374
|
+
finalStatus = "error" /* Error */;
|
|
24394
24375
|
prefix = `Command terminated by signal: ${result.signal}.`;
|
|
24395
24376
|
} else if (result.exitCode !== 0) {
|
|
24396
|
-
finalStatus =
|
|
24377
|
+
finalStatus = "error" /* Error */;
|
|
24397
24378
|
prefix = `Command exited with code ${result.exitCode}.`;
|
|
24398
24379
|
}
|
|
24399
24380
|
if (prefix) {
|
|
@@ -24419,7 +24400,7 @@ ${mainContent}`;
|
|
|
24419
24400
|
status: finalStatus,
|
|
24420
24401
|
resultDisplay: finalOutput
|
|
24421
24402
|
};
|
|
24422
|
-
if (finalStatus !==
|
|
24403
|
+
if (finalStatus !== "cancelled" /* Cancelled */) {
|
|
24423
24404
|
addItemToHistory(
|
|
24424
24405
|
{
|
|
24425
24406
|
type: "tool_group",
|
|
@@ -25409,12 +25390,12 @@ function useQuotaAndFallback({
|
|
|
25409
25390
|
error.retryDelayMs ? `Access resets at ${getResetTimeMessage(error.retryDelayMs)}.` : null,
|
|
25410
25391
|
`/stats model for usage details`,
|
|
25411
25392
|
`/model to switch models.`,
|
|
25412
|
-
contentGeneratorConfig?.authType ===
|
|
25393
|
+
contentGeneratorConfig?.authType === "oauth-personal" /* LOGIN_WITH_GOOGLE */ ? `/auth to switch to API key.` : null
|
|
25413
25394
|
].filter(Boolean);
|
|
25414
25395
|
message = messageLines.join("\n");
|
|
25415
25396
|
} else if (error instanceof ModelNotFoundError) {
|
|
25416
25397
|
isModelNotFoundError = true;
|
|
25417
|
-
if (contentGeneratorConfig?.authType ===
|
|
25398
|
+
if (contentGeneratorConfig?.authType === "vertex-ai" /* USE_VERTEX_AI */ && VALID_GEMINI_MODELS.has(failedModel)) {
|
|
25418
25399
|
const location = process.env["GOOGLE_CLOUD_LOCATION"] || "your configured region";
|
|
25419
25400
|
const messageLines = [
|
|
25420
25401
|
`Model "${failedModel}" is not available in region "${location}".`,
|
|
@@ -25606,7 +25587,7 @@ var useEditorSettings = (loadedSettings, setEditorError, addItem) => {
|
|
|
25606
25587
|
);
|
|
25607
25588
|
setEditorError(null);
|
|
25608
25589
|
setIsEditorDialogOpen(false);
|
|
25609
|
-
coreEvents.emit(
|
|
25590
|
+
coreEvents.emit("editor-selected" /* EditorSelected */, { editor: editorType });
|
|
25610
25591
|
} catch (error) {
|
|
25611
25592
|
setEditorError(`Failed to set editor preference: ${error}`);
|
|
25612
25593
|
}
|
|
@@ -25615,7 +25596,7 @@ var useEditorSettings = (loadedSettings, setEditorError, addItem) => {
|
|
|
25615
25596
|
);
|
|
25616
25597
|
const exitEditorDialog = (0, import_react91.useCallback)(() => {
|
|
25617
25598
|
setIsEditorDialogOpen(false);
|
|
25618
|
-
coreEvents.emit(
|
|
25599
|
+
coreEvents.emit("editor-selected" /* EditorSelected */, { editor: void 0 });
|
|
25619
25600
|
}, []);
|
|
25620
25601
|
return {
|
|
25621
25602
|
isEditorDialogOpen,
|
|
@@ -25992,7 +25973,7 @@ var useSlashCommandProcessor = (config, settings, addItem, clearItems, loadHisto
|
|
|
25992
25973
|
canonicalPath: resolvedCommandPath
|
|
25993
25974
|
} = parseSlashCommand(trimmed, commands);
|
|
25994
25975
|
if (!commandToExecute) {
|
|
25995
|
-
const isMcpLoading = config?.getMcpClientManager()?.getDiscoveryState() ===
|
|
25976
|
+
const isMcpLoading = config?.getMcpClientManager()?.getDiscoveryState() === "in_progress" /* IN_PROGRESS */;
|
|
25996
25977
|
if (isMcpLoading) {
|
|
25997
25978
|
setIsProcessing(true);
|
|
25998
25979
|
if (addToHistory) {
|
|
@@ -26172,7 +26153,7 @@ var useSlashCommandProcessor = (config, settings, addItem, clearItems, loadHisto
|
|
|
26172
26153
|
onConfirm: async (resolvedOutcome) => {
|
|
26173
26154
|
resolve3({
|
|
26174
26155
|
outcome: resolvedOutcome,
|
|
26175
|
-
approvedCommands: resolvedOutcome ===
|
|
26156
|
+
approvedCommands: resolvedOutcome === "cancel" /* Cancel */ ? [] : result.commandsToConfirm
|
|
26176
26157
|
});
|
|
26177
26158
|
}
|
|
26178
26159
|
};
|
|
@@ -26180,7 +26161,7 @@ var useSlashCommandProcessor = (config, settings, addItem, clearItems, loadHisto
|
|
|
26180
26161
|
callId,
|
|
26181
26162
|
name: "Expansion",
|
|
26182
26163
|
description: "Command expansion needs shell access",
|
|
26183
|
-
status:
|
|
26164
|
+
status: "awaiting_approval" /* AwaitingApproval */,
|
|
26184
26165
|
isClientInitiated: true,
|
|
26185
26166
|
resultDisplay: void 0,
|
|
26186
26167
|
confirmationDetails
|
|
@@ -26191,7 +26172,7 @@ var useSlashCommandProcessor = (config, settings, addItem, clearItems, loadHisto
|
|
|
26191
26172
|
});
|
|
26192
26173
|
});
|
|
26193
26174
|
setPendingItem(null);
|
|
26194
|
-
if (outcome ===
|
|
26175
|
+
if (outcome === "cancel" /* Cancel */ || !approvedCommands || approvedCommands.length === 0) {
|
|
26195
26176
|
addItem(
|
|
26196
26177
|
{
|
|
26197
26178
|
type: "info" /* INFO */,
|
|
@@ -26201,7 +26182,7 @@ var useSlashCommandProcessor = (config, settings, addItem, clearItems, loadHisto
|
|
|
26201
26182
|
);
|
|
26202
26183
|
return { type: "handled" };
|
|
26203
26184
|
}
|
|
26204
|
-
if (outcome ===
|
|
26185
|
+
if (outcome === "proceed_always" /* ProceedAlways */) {
|
|
26205
26186
|
setSessionShellAllowlist(
|
|
26206
26187
|
(prev) => /* @__PURE__ */ new Set([...prev, ...approvedCommands])
|
|
26207
26188
|
);
|
|
@@ -26677,7 +26658,7 @@ function mapToDisplay(toolOrTools, options = {}) {
|
|
|
26677
26658
|
let description;
|
|
26678
26659
|
let renderOutputAsMarkdown = false;
|
|
26679
26660
|
const displayName = call.tool?.displayName ?? call.request.name;
|
|
26680
|
-
if (call.status ===
|
|
26661
|
+
if (call.status === "error" /* Error */) {
|
|
26681
26662
|
description = JSON.stringify(call.request.args);
|
|
26682
26663
|
} else {
|
|
26683
26664
|
description = call.invocation.getDescription();
|
|
@@ -26700,27 +26681,27 @@ function mapToDisplay(toolOrTools, options = {}) {
|
|
|
26700
26681
|
let progress = void 0;
|
|
26701
26682
|
let progressTotal = void 0;
|
|
26702
26683
|
switch (call.status) {
|
|
26703
|
-
case
|
|
26684
|
+
case "success" /* Success */:
|
|
26704
26685
|
resultDisplay = call.response.resultDisplay;
|
|
26705
26686
|
outputFile = call.response.outputFile;
|
|
26706
26687
|
break;
|
|
26707
|
-
case
|
|
26708
|
-
case
|
|
26688
|
+
case "error" /* Error */:
|
|
26689
|
+
case "cancelled" /* Cancelled */:
|
|
26709
26690
|
resultDisplay = call.response.resultDisplay;
|
|
26710
26691
|
break;
|
|
26711
|
-
case
|
|
26692
|
+
case "awaiting_approval" /* AwaitingApproval */:
|
|
26712
26693
|
correlationId = call.correlationId;
|
|
26713
26694
|
confirmationDetails = call.confirmationDetails;
|
|
26714
26695
|
break;
|
|
26715
|
-
case
|
|
26696
|
+
case "executing" /* Executing */:
|
|
26716
26697
|
resultDisplay = call.liveOutput;
|
|
26717
26698
|
ptyId = call.pid;
|
|
26718
26699
|
progressMessage = call.progressMessage;
|
|
26719
26700
|
progress = call.progress;
|
|
26720
26701
|
progressTotal = call.progressTotal;
|
|
26721
26702
|
break;
|
|
26722
|
-
case
|
|
26723
|
-
case
|
|
26703
|
+
case "scheduled" /* Scheduled */:
|
|
26704
|
+
case "validating" /* Validating */:
|
|
26724
26705
|
break;
|
|
26725
26706
|
default: {
|
|
26726
26707
|
const exhaustiveCheck = call;
|
|
@@ -26791,7 +26772,7 @@ function useToolScheduler(onComplete, config, getPreferredEditor) {
|
|
|
26791
26772
|
const handler = (event) => {
|
|
26792
26773
|
const isRoot = event.schedulerId === ROOT_SCHEDULER_ID;
|
|
26793
26774
|
const hasExecuting = event.toolCalls.some(
|
|
26794
|
-
(tc) => tc.status ===
|
|
26775
|
+
(tc) => tc.status === "executing" /* Executing */ || (tc.status === "success" /* Success */ || tc.status === "error" /* Error */) && "tailToolCallRequest" in tc && tc.tailToolCallRequest != null
|
|
26795
26776
|
);
|
|
26796
26777
|
if (hasExecuting) {
|
|
26797
26778
|
setLastToolOutputTime(Date.now());
|
|
@@ -26800,7 +26781,7 @@ function useToolScheduler(onComplete, config, getPreferredEditor) {
|
|
|
26800
26781
|
const prevCalls = prev[event.schedulerId] ?? [];
|
|
26801
26782
|
const prevCallIds = new Set(prevCalls.map((tc) => tc.request.callId));
|
|
26802
26783
|
const filteredToolCalls = isRoot ? event.toolCalls : event.toolCalls.filter(
|
|
26803
|
-
(tc) => tc.status ===
|
|
26784
|
+
(tc) => tc.status === "awaiting_approval" /* AwaitingApproval */ || prevCallIds.has(tc.request.callId)
|
|
26804
26785
|
);
|
|
26805
26786
|
if (!isRoot && filteredToolCalls.length === 0 && prevCalls.length === 0) {
|
|
26806
26787
|
return prev;
|
|
@@ -26812,9 +26793,9 @@ function useToolScheduler(onComplete, config, getPreferredEditor) {
|
|
|
26812
26793
|
};
|
|
26813
26794
|
});
|
|
26814
26795
|
};
|
|
26815
|
-
messageBus.subscribe(
|
|
26796
|
+
messageBus.subscribe("tool-calls-update" /* TOOL_CALLS_UPDATE */, handler);
|
|
26816
26797
|
return () => {
|
|
26817
|
-
messageBus.unsubscribe(
|
|
26798
|
+
messageBus.unsubscribe("tool-calls-update" /* TOOL_CALLS_UPDATE */, handler);
|
|
26818
26799
|
};
|
|
26819
26800
|
}, [messageBus, internalAdaptToolCalls]);
|
|
26820
26801
|
(0, import_react98.useEffect)(() => {
|
|
@@ -26836,9 +26817,9 @@ function useToolScheduler(onComplete, config, getPreferredEditor) {
|
|
|
26836
26817
|
};
|
|
26837
26818
|
});
|
|
26838
26819
|
};
|
|
26839
|
-
messageBus.subscribe(
|
|
26820
|
+
messageBus.subscribe("subagent-activity" /* SUBAGENT_ACTIVITY */, handler);
|
|
26840
26821
|
return () => {
|
|
26841
|
-
messageBus.unsubscribe(
|
|
26822
|
+
messageBus.unsubscribe("subagent-activity" /* SUBAGENT_ACTIVITY */, handler);
|
|
26842
26823
|
};
|
|
26843
26824
|
}, [messageBus]);
|
|
26844
26825
|
const schedule = (0, import_react98.useCallback)(
|
|
@@ -26937,8 +26918,8 @@ function adaptToolCalls(coreCalls, prevTracked) {
|
|
|
26937
26918
|
const prev = prevMap.get(coreCall.request.callId);
|
|
26938
26919
|
const responseSubmittedToGemini = prev?.responseSubmittedToGemini ?? false;
|
|
26939
26920
|
let status = coreCall.status;
|
|
26940
|
-
if ((status ===
|
|
26941
|
-
status =
|
|
26921
|
+
if ((status === "success" /* Success */ || status === "error" /* Error */) && "tailToolCallRequest" in coreCall && coreCall.tailToolCallRequest != null) {
|
|
26922
|
+
status = "executing" /* Executing */;
|
|
26942
26923
|
}
|
|
26943
26924
|
return {
|
|
26944
26925
|
...coreCall,
|
|
@@ -26970,7 +26951,7 @@ function getBackgroundedToolInfo(toolCall) {
|
|
|
26970
26951
|
};
|
|
26971
26952
|
}
|
|
26972
26953
|
function isBackgroundableExecutingToolCall(toolCall) {
|
|
26973
|
-
return toolCall.status ===
|
|
26954
|
+
return toolCall.status === "executing" /* Executing */ && typeof toolCall.pid === "number";
|
|
26974
26955
|
}
|
|
26975
26956
|
function showCitations(settings) {
|
|
26976
26957
|
const enabled = settings.merged.ui.showCitations;
|
|
@@ -26980,14 +26961,14 @@ function showCitations(settings) {
|
|
|
26980
26961
|
return true;
|
|
26981
26962
|
}
|
|
26982
26963
|
function calculateStreamingState(isResponding, toolCalls) {
|
|
26983
|
-
if (toolCalls.some((tc) => tc.status ===
|
|
26964
|
+
if (toolCalls.some((tc) => tc.status === "awaiting_approval" /* AwaitingApproval */)) {
|
|
26984
26965
|
return "waiting_for_confirmation" /* WaitingForConfirmation */;
|
|
26985
26966
|
}
|
|
26986
26967
|
const isAnyToolActive = toolCalls.some((tc) => {
|
|
26987
|
-
if (tc.status ===
|
|
26968
|
+
if (tc.status === "executing" /* Executing */ || tc.status === "scheduled" /* Scheduled */ || tc.status === "validating" /* Validating */) {
|
|
26988
26969
|
return true;
|
|
26989
26970
|
}
|
|
26990
|
-
if (tc.status ===
|
|
26971
|
+
if (tc.status === "success" /* Success */ || tc.status === "error" /* Error */ || tc.status === "cancelled" /* Cancelled */) {
|
|
26991
26972
|
return !tc.responseSubmittedToGemini;
|
|
26992
26973
|
}
|
|
26993
26974
|
return false;
|
|
@@ -27033,9 +27014,9 @@ var useGeminiStream = (geminiClient, history, addItem, config, settings, onDebug
|
|
|
27033
27014
|
}
|
|
27034
27015
|
setRetryStatus(payload);
|
|
27035
27016
|
};
|
|
27036
|
-
coreEvents.on(
|
|
27017
|
+
coreEvents.on("retry-attempt" /* RetryAttempt */, handleRetryAttempt);
|
|
27037
27018
|
return () => {
|
|
27038
|
-
coreEvents.off(
|
|
27019
|
+
coreEvents.off("retry-attempt" /* RetryAttempt */, handleRetryAttempt);
|
|
27039
27020
|
};
|
|
27040
27021
|
}, [isRespondingRef]);
|
|
27041
27022
|
const [
|
|
@@ -27168,12 +27149,12 @@ var useGeminiStream = (geminiClient, history, addItem, config, settings, onDebug
|
|
|
27168
27149
|
const tc = toolCalls[i];
|
|
27169
27150
|
if (pushedToolCallIdsRef.current.has(tc.request.callId)) continue;
|
|
27170
27151
|
if (tc.status === "success" || tc.status === "error" || tc.status === "cancelled") {
|
|
27171
|
-
const isAgent = tc.tool?.kind ===
|
|
27152
|
+
const isAgent = tc.tool?.kind === "agent" /* Agent */;
|
|
27172
27153
|
if (isAgent) {
|
|
27173
27154
|
let contigAgentsComplete = true;
|
|
27174
27155
|
for (let j = i + 1; j < toolCalls.length; j++) {
|
|
27175
27156
|
const nextTc = toolCalls[j];
|
|
27176
|
-
if (nextTc.tool?.kind ===
|
|
27157
|
+
if (nextTc.tool?.kind === "agent" /* Agent */) {
|
|
27177
27158
|
if (nextTc.status !== "success" && nextTc.status !== "error" && nextTc.status !== "cancelled") {
|
|
27178
27159
|
contigAgentsComplete = false;
|
|
27179
27160
|
break;
|
|
@@ -27199,7 +27180,7 @@ var useGeminiStream = (geminiClient, history, addItem, config, settings, onDebug
|
|
|
27199
27180
|
let currentGroup = [];
|
|
27200
27181
|
for (const tc of toolsToPush) {
|
|
27201
27182
|
newPushed.add(tc.request.callId);
|
|
27202
|
-
if (tc.tool?.kind ===
|
|
27183
|
+
if (tc.tool?.kind === "agent" /* Agent */) {
|
|
27203
27184
|
currentGroup.push(tc);
|
|
27204
27185
|
} else {
|
|
27205
27186
|
if (currentGroup.length > 0) {
|
|
@@ -27349,7 +27330,7 @@ var useGeminiStream = (geminiClient, history, addItem, config, settings, onDebug
|
|
|
27349
27330
|
prevActiveShellPtyIdRef.current = activeShellPtyId;
|
|
27350
27331
|
}, [activeShellPtyId, addItem, setIsResponding]);
|
|
27351
27332
|
(0, import_react99.useEffect)(() => {
|
|
27352
|
-
if (config.getApprovalMode() ===
|
|
27333
|
+
if (config.getApprovalMode() === "yolo" /* YOLO */ && streamingState === "idle" /* Idle */) {
|
|
27353
27334
|
const lastUserMessageIndex = history.findLastIndex(
|
|
27354
27335
|
(item) => item.type === "user" /* USER */
|
|
27355
27336
|
);
|
|
@@ -27417,7 +27398,7 @@ var useGeminiStream = (geminiClient, history, addItem, config, settings, onDebug
|
|
|
27417
27398
|
return;
|
|
27418
27399
|
}
|
|
27419
27400
|
const hasActiveTools = toolCalls.some(
|
|
27420
|
-
(tc) => tc.status ===
|
|
27401
|
+
(tc) => tc.status === "executing" /* Executing */ || tc.status === "scheduled" /* Scheduled */ || tc.status === "validating" /* Validating */
|
|
27421
27402
|
);
|
|
27422
27403
|
if (streamingState === "idle" /* Idle */ && !isRespondingRef.current && !hasActiveTools) {
|
|
27423
27404
|
if (clearBuffer) {
|
|
@@ -27444,7 +27425,7 @@ var useGeminiStream = (geminiClient, history, addItem, config, settings, onDebug
|
|
|
27444
27425
|
if (tool.name === SHELL_COMMAND_NAME) {
|
|
27445
27426
|
return {
|
|
27446
27427
|
...tool,
|
|
27447
|
-
status:
|
|
27428
|
+
status: "cancelled" /* Cancelled */,
|
|
27448
27429
|
resultDisplay: tool.resultDisplay
|
|
27449
27430
|
};
|
|
27450
27431
|
}
|
|
@@ -27509,7 +27490,7 @@ var useGeminiStream = (geminiClient, history, addItem, config, settings, onDebug
|
|
|
27509
27490
|
let localQueryToSendToGemini = null;
|
|
27510
27491
|
if (typeof query === "string") {
|
|
27511
27492
|
const trimmedQuery = query.trim();
|
|
27512
|
-
await logger?.logMessage(
|
|
27493
|
+
await logger?.logMessage("user" /* USER */, trimmedQuery);
|
|
27513
27494
|
if (!shellModeActive) {
|
|
27514
27495
|
const slashCommandResult = isSlashCommand(trimmedQuery) ? await handleSlashCommand(trimmedQuery) : false;
|
|
27515
27496
|
if (slashCommandResult) {
|
|
@@ -27665,7 +27646,7 @@ var useGeminiStream = (geminiClient, history, addItem, config, settings, onDebug
|
|
|
27665
27646
|
if (pendingHistoryItemRef.current) {
|
|
27666
27647
|
if (pendingHistoryItemRef.current.type === "tool_group") {
|
|
27667
27648
|
const updatedTools = pendingHistoryItemRef.current.tools.map(
|
|
27668
|
-
(tool) => tool.status ===
|
|
27649
|
+
(tool) => tool.status === "validating" /* Validating */ || tool.status === "scheduled" /* Scheduled */ || tool.status === "awaiting_approval" /* AwaitingApproval */ || tool.status === "executing" /* Executing */ ? { ...tool, status: "cancelled" /* Cancelled */ } : tool
|
|
27669
27650
|
);
|
|
27670
27651
|
const pendingItem = {
|
|
27671
27652
|
...pendingHistoryItemRef.current,
|
|
@@ -27911,15 +27892,15 @@ var useGeminiStream = (geminiClient, history, addItem, config, settings, onDebug
|
|
|
27911
27892
|
let geminiMessageBuffer = "";
|
|
27912
27893
|
const toolCallRequests = [];
|
|
27913
27894
|
for await (const event of stream) {
|
|
27914
|
-
if (event.type !==
|
|
27895
|
+
if (event.type !== "thought" /* Thought */ && thoughtRef.current !== null) {
|
|
27915
27896
|
setThought(null);
|
|
27916
27897
|
}
|
|
27917
27898
|
switch (event.type) {
|
|
27918
|
-
case
|
|
27899
|
+
case "thought" /* Thought */:
|
|
27919
27900
|
setLastGeminiActivityTime(Date.now());
|
|
27920
27901
|
handleThoughtEvent(event.value, userMessageTimestamp);
|
|
27921
27902
|
break;
|
|
27922
|
-
case
|
|
27903
|
+
case "content" /* Content */:
|
|
27923
27904
|
setLastGeminiActivityTime(Date.now());
|
|
27924
27905
|
geminiMessageBuffer = handleContentEvent(
|
|
27925
27906
|
event.value,
|
|
@@ -27927,16 +27908,16 @@ var useGeminiStream = (geminiClient, history, addItem, config, settings, onDebug
|
|
|
27927
27908
|
userMessageTimestamp
|
|
27928
27909
|
);
|
|
27929
27910
|
break;
|
|
27930
|
-
case
|
|
27911
|
+
case "tool_call_request" /* ToolCallRequest */:
|
|
27931
27912
|
toolCallRequests.push(event.value);
|
|
27932
27913
|
break;
|
|
27933
|
-
case
|
|
27914
|
+
case "user_cancelled" /* UserCancelled */:
|
|
27934
27915
|
handleUserCancelledEvent(userMessageTimestamp);
|
|
27935
27916
|
break;
|
|
27936
|
-
case
|
|
27917
|
+
case "error" /* Error */:
|
|
27937
27918
|
handleErrorEvent(event.value, userMessageTimestamp);
|
|
27938
27919
|
break;
|
|
27939
|
-
case
|
|
27920
|
+
case "agent_execution_stopped" /* AgentExecutionStopped */:
|
|
27940
27921
|
handleAgentExecutionStoppedEvent(
|
|
27941
27922
|
event.value.reason,
|
|
27942
27923
|
userMessageTimestamp,
|
|
@@ -27944,7 +27925,7 @@ var useGeminiStream = (geminiClient, history, addItem, config, settings, onDebug
|
|
|
27944
27925
|
event.value.contextCleared
|
|
27945
27926
|
);
|
|
27946
27927
|
break;
|
|
27947
|
-
case
|
|
27928
|
+
case "agent_execution_blocked" /* AgentExecutionBlocked */:
|
|
27948
27929
|
handleAgentExecutionBlockedEvent(
|
|
27949
27930
|
event.value.reason,
|
|
27950
27931
|
userMessageTimestamp,
|
|
@@ -27952,35 +27933,35 @@ var useGeminiStream = (geminiClient, history, addItem, config, settings, onDebug
|
|
|
27952
27933
|
event.value.contextCleared
|
|
27953
27934
|
);
|
|
27954
27935
|
break;
|
|
27955
|
-
case
|
|
27936
|
+
case "chat_compressed" /* ChatCompressed */:
|
|
27956
27937
|
handleChatCompressionEvent(event.value, userMessageTimestamp);
|
|
27957
27938
|
break;
|
|
27958
|
-
case
|
|
27959
|
-
case
|
|
27939
|
+
case "tool_call_confirmation" /* ToolCallConfirmation */:
|
|
27940
|
+
case "tool_call_response" /* ToolCallResponse */:
|
|
27960
27941
|
break;
|
|
27961
|
-
case
|
|
27942
|
+
case "max_session_turns" /* MaxSessionTurns */:
|
|
27962
27943
|
handleMaxSessionTurnsEvent();
|
|
27963
27944
|
break;
|
|
27964
|
-
case
|
|
27945
|
+
case "context_window_will_overflow" /* ContextWindowWillOverflow */:
|
|
27965
27946
|
handleContextWindowWillOverflowEvent(
|
|
27966
27947
|
event.value.estimatedRequestTokenCount,
|
|
27967
27948
|
event.value.remainingTokenCount
|
|
27968
27949
|
);
|
|
27969
27950
|
break;
|
|
27970
|
-
case
|
|
27951
|
+
case "finished" /* Finished */:
|
|
27971
27952
|
handleFinishedEvent(event, userMessageTimestamp);
|
|
27972
27953
|
break;
|
|
27973
|
-
case
|
|
27954
|
+
case "citation" /* Citation */:
|
|
27974
27955
|
handleCitationEvent(event.value, userMessageTimestamp);
|
|
27975
27956
|
break;
|
|
27976
|
-
case
|
|
27957
|
+
case "model_info" /* ModelInfo */:
|
|
27977
27958
|
handleChatModelEvent(event.value, userMessageTimestamp);
|
|
27978
27959
|
break;
|
|
27979
|
-
case
|
|
27960
|
+
case "loop_detected" /* LoopDetected */:
|
|
27980
27961
|
loopDetectedRef.current = true;
|
|
27981
27962
|
break;
|
|
27982
|
-
case
|
|
27983
|
-
case
|
|
27963
|
+
case "retry" /* Retry */:
|
|
27964
|
+
case "invalid_stream" /* InvalidStream */:
|
|
27984
27965
|
break;
|
|
27985
27966
|
default: {
|
|
27986
27967
|
const unreachable = event;
|
|
@@ -28021,7 +28002,7 @@ var useGeminiStream = (geminiClient, history, addItem, config, settings, onDebug
|
|
|
28021
28002
|
const submitQuery = (0, import_react99.useCallback)(
|
|
28022
28003
|
async (query, options, prompt_id) => runInDevTraceSpan(
|
|
28023
28004
|
{
|
|
28024
|
-
operation: options?.isContinuation ?
|
|
28005
|
+
operation: options?.isContinuation ? "system_prompt" /* SystemPrompt */ : "user_prompt" /* UserPrompt */,
|
|
28025
28006
|
sessionId: config.getSessionId()
|
|
28026
28007
|
},
|
|
28027
28008
|
async ({ metadata: spanMetadata }) => {
|
|
@@ -28181,7 +28162,7 @@ var useGeminiStream = (geminiClient, history, addItem, config, settings, onDebug
|
|
|
28181
28162
|
);
|
|
28182
28163
|
const handleApprovalModeChange = (0, import_react99.useCallback)(
|
|
28183
28164
|
async (newApprovalMode) => {
|
|
28184
|
-
if (previousApprovalModeRef.current ===
|
|
28165
|
+
if (previousApprovalModeRef.current === "plan" /* PLAN */ && newApprovalMode !== "plan" /* PLAN */ && streamingState === "idle" /* Idle */) {
|
|
28185
28166
|
if (geminiClient) {
|
|
28186
28167
|
try {
|
|
28187
28168
|
await geminiClient.addHistory({
|
|
@@ -28204,11 +28185,11 @@ var useGeminiStream = (geminiClient, history, addItem, config, settings, onDebug
|
|
|
28204
28185
|
}
|
|
28205
28186
|
}
|
|
28206
28187
|
previousApprovalModeRef.current = newApprovalMode;
|
|
28207
|
-
if (newApprovalMode ===
|
|
28188
|
+
if (newApprovalMode === "yolo" /* YOLO */ || newApprovalMode === "autoEdit" /* AUTO_EDIT */) {
|
|
28208
28189
|
let awaitingApprovalCalls = toolCalls.filter(
|
|
28209
28190
|
(call) => call.status === "awaiting_approval" && !call.request.forcedAsk
|
|
28210
28191
|
);
|
|
28211
|
-
if (newApprovalMode ===
|
|
28192
|
+
if (newApprovalMode === "autoEdit" /* AUTO_EDIT */) {
|
|
28212
28193
|
awaitingApprovalCalls = awaitingApprovalCalls.filter((call) => {
|
|
28213
28194
|
if (EDIT_TOOL_NAMES.has(call.request.name)) {
|
|
28214
28195
|
return true;
|
|
@@ -28224,11 +28205,11 @@ var useGeminiStream = (geminiClient, history, addItem, config, settings, onDebug
|
|
|
28224
28205
|
if (call.correlationId) {
|
|
28225
28206
|
try {
|
|
28226
28207
|
await config.getMessageBus().publish({
|
|
28227
|
-
type:
|
|
28208
|
+
type: "tool-confirmation-response" /* TOOL_CONFIRMATION_RESPONSE */,
|
|
28228
28209
|
correlationId: call.correlationId,
|
|
28229
28210
|
confirmed: true,
|
|
28230
28211
|
requiresUserConfirmation: false,
|
|
28231
|
-
outcome:
|
|
28212
|
+
outcome: "proceed_once" /* ProceedOnce */
|
|
28232
28213
|
});
|
|
28233
28214
|
} catch (error) {
|
|
28234
28215
|
debugLogger.warn(
|
|
@@ -28297,14 +28278,14 @@ var useGeminiStream = (geminiClient, history, addItem, config, settings, onDebug
|
|
|
28297
28278
|
);
|
|
28298
28279
|
if (isLowErrorVerbosity) {
|
|
28299
28280
|
suppressedToolErrorCountRef.current += geminiTools.filter(
|
|
28300
|
-
(tc) => tc.status ===
|
|
28281
|
+
(tc) => tc.status === "error" /* Error */
|
|
28301
28282
|
).length;
|
|
28302
28283
|
}
|
|
28303
28284
|
if (geminiTools.length === 0) {
|
|
28304
28285
|
return;
|
|
28305
28286
|
}
|
|
28306
28287
|
const stopExecutionTool = geminiTools.find(
|
|
28307
|
-
(tc) => tc.response.errorType ===
|
|
28288
|
+
(tc) => tc.response.errorType === "stop_execution" /* STOP_EXECUTION */
|
|
28308
28289
|
);
|
|
28309
28290
|
if (stopExecutionTool && stopExecutionTool.response.error) {
|
|
28310
28291
|
maybeAddSuppressedToolErrorNote();
|
|
@@ -28324,9 +28305,9 @@ var useGeminiStream = (geminiClient, history, addItem, config, settings, onDebug
|
|
|
28324
28305
|
(tc) => !isTopicTool2(tc.request.name)
|
|
28325
28306
|
);
|
|
28326
28307
|
const allDeclinableToolsCancelled = declinableTools.length > 0 && declinableTools.every(
|
|
28327
|
-
(tc) => tc.status ===
|
|
28308
|
+
(tc) => tc.status === "cancelled" /* Cancelled */
|
|
28328
28309
|
);
|
|
28329
|
-
const allToolsCancelled = geminiTools.length > 0 && geminiTools.every((tc) => tc.status ===
|
|
28310
|
+
const allToolsCancelled = geminiTools.length > 0 && geminiTools.every((tc) => tc.status === "cancelled" /* Cancelled */);
|
|
28330
28311
|
if (allDeclinableToolsCancelled || allToolsCancelled) {
|
|
28331
28312
|
if (!turnCancelledRef.current) {
|
|
28332
28313
|
addItem({
|
|
@@ -28406,7 +28387,7 @@ var useGeminiStream = (geminiClient, history, addItem, config, settings, onDebug
|
|
|
28406
28387
|
return;
|
|
28407
28388
|
}
|
|
28408
28389
|
const restorableToolCalls = toolCalls.filter(
|
|
28409
|
-
(toolCall) => EDIT_TOOL_NAMES.has(toolCall.request.name) && toolCall.status ===
|
|
28390
|
+
(toolCall) => EDIT_TOOL_NAMES.has(toolCall.request.name) && toolCall.status === "awaiting_approval" /* AwaitingApproval */
|
|
28410
28391
|
);
|
|
28411
28392
|
if (restorableToolCalls.length > 0) {
|
|
28412
28393
|
if (!gitService) {
|
|
@@ -28629,14 +28610,14 @@ var useAgentStream = ({
|
|
|
28629
28610
|
const displayName = legacyState?.displayName ?? event.name;
|
|
28630
28611
|
const isOutputMarkdown = legacyState?.isOutputMarkdown ?? false;
|
|
28631
28612
|
const desc = legacyState?.description ?? "";
|
|
28632
|
-
const fallbackKind =
|
|
28613
|
+
const fallbackKind = "other" /* Other */;
|
|
28633
28614
|
const newCall = {
|
|
28634
28615
|
callId: event.requestId,
|
|
28635
28616
|
name: displayName,
|
|
28636
28617
|
originalRequestName: event.name,
|
|
28637
28618
|
description: desc,
|
|
28638
28619
|
display: event.display,
|
|
28639
|
-
status:
|
|
28620
|
+
status: "scheduled" /* Scheduled */,
|
|
28640
28621
|
isClientInitiated: false,
|
|
28641
28622
|
renderOutputAsMarkdown: isOutputMarkdown,
|
|
28642
28623
|
kind: legacyState?.kind ?? fallbackKind,
|
|
@@ -28654,10 +28635,10 @@ var useAgentStream = ({
|
|
|
28654
28635
|
const evtStatus = legacyState?.status;
|
|
28655
28636
|
let status = tc.status;
|
|
28656
28637
|
if (evtStatus === "executing")
|
|
28657
|
-
status =
|
|
28658
|
-
else if (evtStatus === "error") status =
|
|
28638
|
+
status = "executing" /* Executing */;
|
|
28639
|
+
else if (evtStatus === "error") status = "error" /* Error */;
|
|
28659
28640
|
else if (evtStatus === "success")
|
|
28660
|
-
status =
|
|
28641
|
+
status = "success" /* Success */;
|
|
28661
28642
|
const display = event.display?.result;
|
|
28662
28643
|
const liveOutput = displayContentToString(display) ?? tc.resultDisplay;
|
|
28663
28644
|
const progressMessage = legacyState?.progressMessage ?? tc.progressMessage;
|
|
@@ -28690,7 +28671,7 @@ var useAgentStream = ({
|
|
|
28690
28671
|
const resultDisplay = displayContentToString(display) ?? tc.resultDisplay;
|
|
28691
28672
|
return {
|
|
28692
28673
|
...tc,
|
|
28693
|
-
status: event.isError ?
|
|
28674
|
+
status: event.isError ? "error" /* Error */ : "success" /* Success */,
|
|
28694
28675
|
display: event.display ? { ...tc.display, ...event.display } : tc.display,
|
|
28695
28676
|
resultDisplay,
|
|
28696
28677
|
outputFile
|
|
@@ -28756,7 +28737,7 @@ var useAgentStream = ({
|
|
|
28756
28737
|
if (!options?.isContinuation) {
|
|
28757
28738
|
if (typeof query === "string") {
|
|
28758
28739
|
addItem({ type: "user" /* USER */, text: query }, timestamp);
|
|
28759
|
-
void logger?.logMessage(
|
|
28740
|
+
void logger?.logMessage("user" /* USER */, query);
|
|
28760
28741
|
}
|
|
28761
28742
|
startNewPrompt();
|
|
28762
28743
|
}
|
|
@@ -30283,9 +30264,9 @@ var useFolderTrust = (settings, onTrustChange, addItem) => {
|
|
|
30283
30264
|
const handleFolderTrustSelect = (0, import_react105.useCallback)(
|
|
30284
30265
|
async (choice) => {
|
|
30285
30266
|
const trustLevelMap = {
|
|
30286
|
-
["trust_folder" /* TRUST_FOLDER */]:
|
|
30287
|
-
["trust_parent" /* TRUST_PARENT */]:
|
|
30288
|
-
["do_not_trust" /* DO_NOT_TRUST */]:
|
|
30267
|
+
["trust_folder" /* TRUST_FOLDER */]: "TRUST_FOLDER" /* TRUST_FOLDER */,
|
|
30268
|
+
["trust_parent" /* TRUST_PARENT */]: "TRUST_PARENT" /* TRUST_PARENT */,
|
|
30269
|
+
["do_not_trust" /* DO_NOT_TRUST */]: "DO_NOT_TRUST" /* DO_NOT_TRUST */
|
|
30289
30270
|
};
|
|
30290
30271
|
const trustLevel = trustLevelMap[choice];
|
|
30291
30272
|
if (!trustLevel) return;
|
|
@@ -30304,7 +30285,7 @@ var useFolderTrust = (settings, onTrustChange, addItem) => {
|
|
|
30304
30285
|
}, 100);
|
|
30305
30286
|
return;
|
|
30306
30287
|
}
|
|
30307
|
-
const currentIsTrusted = trustLevel ===
|
|
30288
|
+
const currentIsTrusted = trustLevel === "TRUST_FOLDER" /* TRUST_FOLDER */ || trustLevel === "TRUST_PARENT" /* TRUST_PARENT */;
|
|
30308
30289
|
onTrustChange(currentIsTrusted);
|
|
30309
30290
|
setIsTrusted(currentIsTrusted);
|
|
30310
30291
|
const wasTrusted = isTrusted ?? false;
|
|
@@ -31312,7 +31293,7 @@ function useMessageQueue({
|
|
|
31312
31293
|
var import_react107 = __toESM(require_react(), 1);
|
|
31313
31294
|
function useMcpStatus(config) {
|
|
31314
31295
|
const [discoveryState, setDiscoveryState] = (0, import_react107.useState)(
|
|
31315
|
-
() => config.getMcpClientManager()?.getDiscoveryState() ??
|
|
31296
|
+
() => config.getMcpClientManager()?.getDiscoveryState() ?? "not_started" /* NOT_STARTED */
|
|
31316
31297
|
);
|
|
31317
31298
|
const [mcpServerCount, setMcpServerCount] = (0, import_react107.useState)(
|
|
31318
31299
|
() => config.getMcpClientManager()?.getMcpServerCount() ?? 0
|
|
@@ -31325,12 +31306,12 @@ function useMcpStatus(config) {
|
|
|
31325
31306
|
setMcpServerCount(manager.getMcpServerCount());
|
|
31326
31307
|
}
|
|
31327
31308
|
};
|
|
31328
|
-
coreEvents.on(
|
|
31309
|
+
coreEvents.on("mcp-client-update" /* McpClientUpdate */, onChange);
|
|
31329
31310
|
return () => {
|
|
31330
|
-
coreEvents.off(
|
|
31311
|
+
coreEvents.off("mcp-client-update" /* McpClientUpdate */, onChange);
|
|
31331
31312
|
};
|
|
31332
31313
|
}, [config]);
|
|
31333
|
-
const isMcpReady = discoveryState ===
|
|
31314
|
+
const isMcpReady = discoveryState === "completed" /* COMPLETED */ || discoveryState === "not_started" /* NOT_STARTED */ && mcpServerCount === 0;
|
|
31334
31315
|
return {
|
|
31335
31316
|
discoveryState,
|
|
31336
31317
|
mcpServerCount,
|
|
@@ -31357,7 +31338,7 @@ function useApprovalModeIndicator({
|
|
|
31357
31338
|
(key) => {
|
|
31358
31339
|
let nextApprovalMode;
|
|
31359
31340
|
if (keyMatchers["app.toggleYolo" /* TOGGLE_YOLO */](key)) {
|
|
31360
|
-
if (config.isYoloModeDisabled() && config.getApprovalMode() !==
|
|
31341
|
+
if (config.isYoloModeDisabled() && config.getApprovalMode() !== "yolo" /* YOLO */) {
|
|
31361
31342
|
if (addItem) {
|
|
31362
31343
|
let text = "You cannot enter YOLO mode since it is disabled in your settings.";
|
|
31363
31344
|
const adminSettings = config.getRemoteAdminSettings();
|
|
@@ -31375,21 +31356,21 @@ function useApprovalModeIndicator({
|
|
|
31375
31356
|
}
|
|
31376
31357
|
return;
|
|
31377
31358
|
}
|
|
31378
|
-
nextApprovalMode = config.getApprovalMode() ===
|
|
31359
|
+
nextApprovalMode = config.getApprovalMode() === "yolo" /* YOLO */ ? "default" /* DEFAULT */ : "yolo" /* YOLO */;
|
|
31379
31360
|
} else if (keyMatchers["app.cycleApprovalMode" /* CYCLE_APPROVAL_MODE */](key)) {
|
|
31380
31361
|
const currentMode = config.getApprovalMode();
|
|
31381
31362
|
switch (currentMode) {
|
|
31382
|
-
case
|
|
31383
|
-
nextApprovalMode =
|
|
31363
|
+
case "default" /* DEFAULT */:
|
|
31364
|
+
nextApprovalMode = "autoEdit" /* AUTO_EDIT */;
|
|
31384
31365
|
break;
|
|
31385
|
-
case
|
|
31386
|
-
nextApprovalMode = allowPlanMode ?
|
|
31366
|
+
case "autoEdit" /* AUTO_EDIT */:
|
|
31367
|
+
nextApprovalMode = allowPlanMode ? "plan" /* PLAN */ : "default" /* DEFAULT */;
|
|
31387
31368
|
break;
|
|
31388
|
-
case
|
|
31389
|
-
nextApprovalMode =
|
|
31369
|
+
case "plan" /* PLAN */:
|
|
31370
|
+
nextApprovalMode = "default" /* DEFAULT */;
|
|
31390
31371
|
break;
|
|
31391
|
-
case
|
|
31392
|
-
nextApprovalMode =
|
|
31372
|
+
case "yolo" /* YOLO */:
|
|
31373
|
+
nextApprovalMode = "autoEdit" /* AUTO_EDIT */;
|
|
31393
31374
|
break;
|
|
31394
31375
|
default:
|
|
31395
31376
|
}
|
|
@@ -31799,11 +31780,11 @@ var useHookDisplayState = () => {
|
|
|
31799
31780
|
removeHook();
|
|
31800
31781
|
}
|
|
31801
31782
|
};
|
|
31802
|
-
coreEvents.on(
|
|
31803
|
-
coreEvents.on(
|
|
31783
|
+
coreEvents.on("hook-start" /* HookStart */, handleHookStart);
|
|
31784
|
+
coreEvents.on("hook-end" /* HookEnd */, handleHookEnd);
|
|
31804
31785
|
return () => {
|
|
31805
|
-
coreEvents.off(
|
|
31806
|
-
coreEvents.off(
|
|
31786
|
+
coreEvents.off("hook-start" /* HookStart */, handleHookStart);
|
|
31787
|
+
coreEvents.off("hook-end" /* HookEnd */, handleHookEnd);
|
|
31807
31788
|
activeTimeouts.forEach(clearTimeout);
|
|
31808
31789
|
activeTimeouts.clear();
|
|
31809
31790
|
};
|
|
@@ -32642,7 +32623,7 @@ var AppContainer = (props) => {
|
|
|
32642
32623
|
setConfigInitialized(true);
|
|
32643
32624
|
startupProfiler.flush(config);
|
|
32644
32625
|
startAutoMemoryIfEnabled(config);
|
|
32645
|
-
const sessionStartSource = resumedSessionData ?
|
|
32626
|
+
const sessionStartSource = resumedSessionData ? "resume" /* Resume */ : "startup" /* Startup */;
|
|
32646
32627
|
const result = await config.getHookSystem()?.fireSessionStartEvent(sessionStartSource);
|
|
32647
32628
|
if (result) {
|
|
32648
32629
|
const additionalContext = result.getAdditionalContext();
|
|
@@ -32669,7 +32650,7 @@ var AppContainer = (props) => {
|
|
|
32669
32650
|
);
|
|
32670
32651
|
const ideClient = await IdeClient.getInstance();
|
|
32671
32652
|
await ideClient.disconnect();
|
|
32672
|
-
await config?.getHookSystem()?.fireSessionEndEvent(
|
|
32653
|
+
await config?.getHookSystem()?.fireSessionEndEvent("exit" /* Exit */);
|
|
32673
32654
|
};
|
|
32674
32655
|
registerCleanup(cleanupFn);
|
|
32675
32656
|
return () => {
|
|
@@ -32694,11 +32675,11 @@ var AppContainer = (props) => {
|
|
|
32694
32675
|
resetTime: payload.resetTime
|
|
32695
32676
|
});
|
|
32696
32677
|
};
|
|
32697
|
-
coreEvents.on(
|
|
32698
|
-
coreEvents.on(
|
|
32678
|
+
coreEvents.on("model-changed" /* ModelChanged */, handleModelChanged);
|
|
32679
|
+
coreEvents.on("quota-changed" /* QuotaChanged */, handleQuotaChanged);
|
|
32699
32680
|
return () => {
|
|
32700
|
-
coreEvents.off(
|
|
32701
|
-
coreEvents.off(
|
|
32681
|
+
coreEvents.off("model-changed" /* ModelChanged */, handleModelChanged);
|
|
32682
|
+
coreEvents.off("quota-changed" /* QuotaChanged */, handleQuotaChanged);
|
|
32702
32683
|
};
|
|
32703
32684
|
}, [config]);
|
|
32704
32685
|
(0, import_react121.useEffect)(() => {
|
|
@@ -32711,16 +32692,16 @@ var AppContainer = (props) => {
|
|
|
32711
32692
|
const handleAgentsDiscovered = (payload) => {
|
|
32712
32693
|
setNewAgents(payload.agents);
|
|
32713
32694
|
};
|
|
32714
|
-
coreEvents.on(
|
|
32715
|
-
coreEvents.on(
|
|
32716
|
-
coreEvents.on(
|
|
32695
|
+
coreEvents.on("settings-changed" /* SettingsChanged */, handleSettingsChanged);
|
|
32696
|
+
coreEvents.on("admin-settings-changed" /* AdminSettingsChanged */, handleAdminSettingsChanged);
|
|
32697
|
+
coreEvents.on("agents-discovered" /* AgentsDiscovered */, handleAgentsDiscovered);
|
|
32717
32698
|
return () => {
|
|
32718
|
-
coreEvents.off(
|
|
32699
|
+
coreEvents.off("settings-changed" /* SettingsChanged */, handleSettingsChanged);
|
|
32719
32700
|
coreEvents.off(
|
|
32720
|
-
|
|
32701
|
+
"admin-settings-changed" /* AdminSettingsChanged */,
|
|
32721
32702
|
handleAdminSettingsChanged
|
|
32722
32703
|
);
|
|
32723
|
-
coreEvents.off(
|
|
32704
|
+
coreEvents.off("agents-discovered" /* AgentsDiscovered */, handleAgentsDiscovered);
|
|
32724
32705
|
};
|
|
32725
32706
|
}, [settings]);
|
|
32726
32707
|
const { errorCount, clearErrorCount } = useErrorCount();
|
|
@@ -32785,11 +32766,11 @@ var AppContainer = (props) => {
|
|
|
32785
32766
|
exitEditorDialog
|
|
32786
32767
|
} = useEditorSettings(settings, setEditorError, historyManager.addItem);
|
|
32787
32768
|
(0, import_react121.useEffect)(() => {
|
|
32788
|
-
coreEvents.on(
|
|
32789
|
-
coreEvents.on(
|
|
32769
|
+
coreEvents.on("external-editor-closed" /* ExternalEditorClosed */, handleEditorClose);
|
|
32770
|
+
coreEvents.on("request-editor-selection" /* RequestEditorSelection */, openEditorDialog);
|
|
32790
32771
|
return () => {
|
|
32791
|
-
coreEvents.off(
|
|
32792
|
-
coreEvents.off(
|
|
32772
|
+
coreEvents.off("external-editor-closed" /* ExternalEditorClosed */, handleEditorClose);
|
|
32773
|
+
coreEvents.off("request-editor-selection" /* RequestEditorSelection */, openEditorDialog);
|
|
32793
32774
|
};
|
|
32794
32775
|
}, [handleEditorClose, openEditorDialog]);
|
|
32795
32776
|
(0, import_react121.useEffect)(() => {
|
|
@@ -32857,7 +32838,7 @@ var AppContainer = (props) => {
|
|
|
32857
32838
|
errorVerbosity: settings.merged.ui.errorVerbosity
|
|
32858
32839
|
});
|
|
32859
32840
|
const isAuthDialogOpen = authState === "updating" /* Updating */;
|
|
32860
|
-
const isAuthenticating = authState === "unauthenticated" /* Unauthenticated */ && settings.merged.security.auth.selectedType !==
|
|
32841
|
+
const isAuthenticating = authState === "unauthenticated" /* Unauthenticated */ && settings.merged.security.auth.selectedType !== "gemini-api-key" /* USE_GEMINI */;
|
|
32861
32842
|
const isGeminiClientInitialized = config.getGeminiClient()?.isInitialized();
|
|
32862
32843
|
const { loadHistoryForResume, isResuming } = useSessionResume({
|
|
32863
32844
|
config,
|
|
@@ -32885,7 +32866,7 @@ var AppContainer = (props) => {
|
|
|
32885
32866
|
async (authType, scope) => {
|
|
32886
32867
|
if (authType) {
|
|
32887
32868
|
const previousAuthType = config.getContentGeneratorConfig()?.authType ?? "unknown";
|
|
32888
|
-
if (authType ===
|
|
32869
|
+
if (authType === "oauth-personal" /* LOGIN_WITH_GOOGLE */) {
|
|
32889
32870
|
setAuthContext({ requiresRestart: true });
|
|
32890
32871
|
} else {
|
|
32891
32872
|
setAuthContext({});
|
|
@@ -32913,7 +32894,7 @@ var AppContainer = (props) => {
|
|
|
32913
32894
|
);
|
|
32914
32895
|
return;
|
|
32915
32896
|
}
|
|
32916
|
-
if (authType ===
|
|
32897
|
+
if (authType === "oauth-personal" /* LOGIN_WITH_GOOGLE */ && config.isBrowserLaunchSuppressed()) {
|
|
32917
32898
|
writeToStdout(`
|
|
32918
32899
|
----------------------------------------------------------------
|
|
32919
32900
|
Logging in with Google... Restarting Gemini CLI to continue.
|
|
@@ -32936,7 +32917,7 @@ Logging in with Google... Restarting Gemini CLI to continue.
|
|
|
32936
32917
|
}
|
|
32937
32918
|
await saveApiKey(apiKey);
|
|
32938
32919
|
await reloadApiKey();
|
|
32939
|
-
await config.refreshAuth(
|
|
32920
|
+
await config.refreshAuth("gemini-api-key" /* USE_GEMINI */);
|
|
32940
32921
|
setAuthState("authenticated" /* Authenticated */);
|
|
32941
32922
|
} catch (e) {
|
|
32942
32923
|
onAuthError(
|
|
@@ -32961,7 +32942,7 @@ Logging in with Google... Restarting Gemini CLI to continue.
|
|
|
32961
32942
|
`Authentication is enforced to be ${settings.merged.security.auth.enforcedType}, but you are currently using ${settings.merged.security.auth.selectedType}.`
|
|
32962
32943
|
);
|
|
32963
32944
|
} else if (settings.merged.security.auth.selectedType && !settings.merged.security.auth.useExternal) {
|
|
32964
|
-
if (settings.merged.security.auth.selectedType ===
|
|
32945
|
+
if (settings.merged.security.auth.selectedType === "gemini-api-key" /* USE_GEMINI */) {
|
|
32965
32946
|
return;
|
|
32966
32947
|
}
|
|
32967
32948
|
const authMethod = settings.merged.security.auth.selectedType;
|
|
@@ -33097,9 +33078,9 @@ Logging in with Google... Restarting Gemini CLI to continue.
|
|
|
33097
33078
|
}
|
|
33098
33079
|
});
|
|
33099
33080
|
};
|
|
33100
|
-
coreEvents.on(
|
|
33081
|
+
coreEvents.on("consent-request" /* ConsentRequest */, handleConsentRequest);
|
|
33101
33082
|
return () => {
|
|
33102
|
-
coreEvents.off(
|
|
33083
|
+
coreEvents.off("consent-request" /* ConsentRequest */, handleConsentRequest);
|
|
33103
33084
|
};
|
|
33104
33085
|
}, []);
|
|
33105
33086
|
const performMemoryRefresh = (0, import_react121.useCallback)(async () => {
|
|
@@ -33757,7 +33738,7 @@ ${queuedText}` : queuedText;
|
|
|
33757
33738
|
if (keyMatchers["app.showErrorDetails" /* SHOW_ERROR_DETAILS */](key)) {
|
|
33758
33739
|
if (settings.merged.general.devtools) {
|
|
33759
33740
|
void (async () => {
|
|
33760
|
-
const { toggleDevToolsPanel } = await import("./devtoolsService-
|
|
33741
|
+
const { toggleDevToolsPanel } = await import("./devtoolsService-P33QSD7O.js");
|
|
33761
33742
|
await toggleDevToolsPanel(
|
|
33762
33743
|
config,
|
|
33763
33744
|
showErrorDetails,
|
|
@@ -33975,17 +33956,17 @@ ${queuedText}` : queuedText;
|
|
|
33975
33956
|
Date.now()
|
|
33976
33957
|
);
|
|
33977
33958
|
};
|
|
33978
|
-
coreEvents.on(
|
|
33979
|
-
coreEvents.on(
|
|
33959
|
+
coreEvents.on("user-feedback" /* UserFeedback */, handleUserFeedback);
|
|
33960
|
+
coreEvents.on("hook-system-message" /* HookSystemMessage */, handleHookSystemMessage);
|
|
33980
33961
|
coreEvents.drainBacklogs();
|
|
33981
33962
|
return () => {
|
|
33982
|
-
coreEvents.off(
|
|
33983
|
-
coreEvents.off(
|
|
33963
|
+
coreEvents.off("user-feedback" /* UserFeedback */, handleUserFeedback);
|
|
33964
|
+
coreEvents.off("hook-system-message" /* HookSystemMessage */, handleHookSystemMessage);
|
|
33984
33965
|
};
|
|
33985
33966
|
}, [historyManager]);
|
|
33986
33967
|
const nightly = props.version.includes("nightly");
|
|
33987
33968
|
const isAwaitingLoginRestart = authState === "awaiting_login_restart" /* AwaitingLoginRestart */;
|
|
33988
|
-
const loginRestartMessage = settings.merged.security.auth.selectedType ===
|
|
33969
|
+
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;
|
|
33989
33970
|
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;
|
|
33990
33971
|
const hasPendingToolConfirmation = (0, import_react121.useMemo)(
|
|
33991
33972
|
() => isToolAwaitingConfirmation(pendingHistoryItems),
|
|
@@ -34085,9 +34066,9 @@ ${queuedText}` : queuedText;
|
|
|
34085
34066
|
const handleMemoryChanged = (result) => {
|
|
34086
34067
|
setGeminiMdFileCount(result.fileCount);
|
|
34087
34068
|
};
|
|
34088
|
-
coreEvents.on(
|
|
34069
|
+
coreEvents.on("memory-changed" /* MemoryChanged */, handleMemoryChanged);
|
|
34089
34070
|
return () => {
|
|
34090
|
-
coreEvents.off(
|
|
34071
|
+
coreEvents.off("memory-changed" /* MemoryChanged */, handleMemoryChanged);
|
|
34091
34072
|
};
|
|
34092
34073
|
}, []);
|
|
34093
34074
|
(0, import_react121.useEffect)(() => {
|