@google/gemini-cli 0.45.0-preview.1 → 0.45.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-6WWGBNKT.js → chunk-2ARYG3KE.js} +1 -1
- package/bundle/{chunk-2ZH72RHY.js → chunk-3TWZMAJU.js} +3 -3
- package/bundle/{chunk-BO72FGK2.js → chunk-4EBMYFID.js} +7 -7
- package/bundle/{chunk-K43EAKOP.js → chunk-4KOU3QNT.js} +5 -8
- package/bundle/{chunk-BLUAEAZN.js → chunk-53SRWMUU.js} +1 -1
- package/bundle/{chunk-5YTIYFJO.js → chunk-6T7N6JF2.js} +4 -4
- package/bundle/{chunk-OWSYSTWM.js → chunk-EORX7LYI.js} +1 -1
- package/bundle/{chunk-IGJG7DNZ.js → chunk-EUYIPFPA.js} +1 -1
- package/bundle/{chunk-3NDAYKF4.js → chunk-GVEZJIV3.js} +1 -1
- package/bundle/{chunk-E3KBY4EQ.js → chunk-HFVEWB6N.js} +1 -1
- package/bundle/{chunk-CJTRYZPP.js → chunk-IL7J46PP.js} +3 -3
- package/bundle/{chunk-4KX3ETW3.js → chunk-JLFE3KRS.js} +1 -1
- package/bundle/{chunk-JXVK53RJ.js → chunk-K6WTIGVC.js} +2 -2
- package/bundle/{chunk-JWWA32XO.js → chunk-KSNTXH4E.js} +54 -67
- package/bundle/{chunk-R52453KY.js → chunk-N6QPQL7E.js} +4 -4
- package/bundle/{chunk-Y6SLZFPD.js → chunk-PNU4GACG.js} +2 -2
- package/bundle/{chunk-FEY3T6LA.js → chunk-PXEK5ENZ.js} +8 -9
- package/bundle/{chunk-5BX5PJIE.js → chunk-SG46YSQ3.js} +7 -7
- package/bundle/{chunk-S6AQSJNU.js → chunk-THZMPVCN.js} +1 -1
- package/bundle/{chunk-WTRP3GGZ.js → chunk-TWSSMLUS.js} +1 -1
- package/bundle/{chunk-HA5VES5S.js → chunk-VL3FKVC7.js} +3 -3
- package/bundle/{chunk-DDJWQSDN.js → chunk-XV2YFH7B.js} +14033 -7525
- package/bundle/{chunk-NB2NOE4L.js → chunk-YI3KORH5.js} +2 -2
- package/bundle/{chunk-CJHCK2YW.js → chunk-Z5F25543.js} +1 -1
- package/bundle/{cleanup-2FHZMQ3Z.js → cleanup-3SMSXJJA.js} +2 -2
- package/bundle/{cleanup-F7XRM3DT.js → cleanup-FNQ3LEWG.js} +2 -2
- package/bundle/{cleanup-OZH3SJVM.js → cleanup-I56KHTTC.js} +2 -2
- package/bundle/{core-B47ZXN3Y.js → core-AQUUQTX2.js} +1 -1
- package/bundle/{dist-C6L3MGQS.js → core-KGXBOJTX.js} +1 -1
- package/bundle/{devtoolsService-L7PYKOHR.js → devtoolsService-EW3B2Y63.js} +2 -2
- package/bundle/{devtoolsService-XYSZCMQM.js → devtoolsService-F7PHNBEQ.js} +2 -2
- package/bundle/{devtoolsService-OYQJHPEW.js → devtoolsService-VFEFRDYG.js} +3 -4
- package/bundle/{dist-MOEHPHUN.js → dist-2G5KTD32.js} +1 -1
- package/bundle/{gemini-LT5MWLZQ.js → gemini-4KS2EZX6.js} +14 -14
- package/bundle/{gemini-CHS2YNJG.js → gemini-JMMBFICD.js} +196 -212
- package/bundle/{gemini-2XSNIT2N.js → gemini-ORQHD633.js} +14 -14
- package/bundle/gemini.js +7 -7
- package/bundle/{interactiveCli-UUI7OUZK.js → interactiveCli-ESB66RW7.js} +8 -8
- package/bundle/{interactiveCli-2YFAMDR5.js → interactiveCli-XUZZOZXX.js} +8 -8
- package/bundle/{interactiveCli-6EFCVZP7.js → interactiveCli-ZJXV4DW7.js} +295 -314
- package/bundle/{liteRtServerManager-2VKZTPMY.js → liteRtServerManager-DORIWEMR.js} +4 -4
- package/bundle/{liteRtServerManager-4PZ3X7SS.js → liteRtServerManager-HELKQKOZ.js} +4 -4
- package/bundle/{liteRtServerManager-GH6VHWTU.js → liteRtServerManager-RNNHEQJI.js} +4 -4
- package/bundle/{oauth2-provider-BDX6V2YX.js → oauth2-provider-2IJNOFOO.js} +1 -1
- package/bundle/{oauth2-provider-4UIWNIX3.js → oauth2-provider-7N4OFPTL.js} +1 -1
- package/bundle/{oauth2-provider-N2ZY2DXQ.js → oauth2-provider-YYLBPESU.js} +72 -38
- package/bundle/{start-3LEQZELI.js → start-66KF6MVV.js} +6 -6
- package/bundle/{start-FH2E2VQ2.js → start-IGG6LDST.js} +6 -6
- package/bundle/{start-FPEO7KCZ.js → start-R7DTCFCN.js} +6 -6
- package/package.json +1 -1
- package/bundle/chunk-565MWDPP.js +0 -394439
- package/bundle/chunk-HVWNKZSB.js +0 -154
- package/bundle/chunk-HZCAEM2F.js +0 -398
- package/bundle/chunk-NVJOR76X.js +0 -1571
- package/bundle/chunk-NYWYNF2Z.js +0 -81685
- package/bundle/chunk-OQLEYMM2.js +0 -512
- package/bundle/chunk-SKDT4PWC.js +0 -118
- package/bundle/chunk-TCAVPMJX.js +0 -17320
- package/bundle/cleanup-ZO5CVKGH.js +0 -32
- package/bundle/devtoolsService-SGV7MSUA.js +0 -856
- package/bundle/dist-WLKMTHZQ.js +0 -2134
- package/bundle/gemini-CQDPCFEE.js +0 -16406
- package/bundle/interactiveCli-HA3BASZN.js +0 -34726
- package/bundle/liteRtServerManager-OMSM6SJU.js +0 -65
- package/bundle/oauth2-provider-TRRJCE2P.js +0 -235
- package/bundle/start-J7G6YXDJ.js +0 -18
|
@@ -155,13 +155,13 @@ import {
|
|
|
155
155
|
widestLineFromStyledChars,
|
|
156
156
|
wordBreakStyledChars,
|
|
157
157
|
wrapStyledChars
|
|
158
|
-
} from "./chunk-
|
|
158
|
+
} from "./chunk-KSNTXH4E.js";
|
|
159
159
|
import {
|
|
160
160
|
appEvents
|
|
161
161
|
} from "./chunk-5PS3AYFU.js";
|
|
162
162
|
import {
|
|
163
163
|
require_source
|
|
164
|
-
} from "./chunk-
|
|
164
|
+
} from "./chunk-GVEZJIV3.js";
|
|
165
165
|
import {
|
|
166
166
|
ACTIVE_SHELL_MAX_LINES,
|
|
167
167
|
COMPACT_TOOL_SUBVIEW_MAX_LINES,
|
|
@@ -211,37 +211,33 @@ import {
|
|
|
211
211
|
stringWidth,
|
|
212
212
|
stripUnsafeCharacters,
|
|
213
213
|
toCodePoints
|
|
214
|
-
} from "./chunk-
|
|
214
|
+
} from "./chunk-2ARYG3KE.js";
|
|
215
215
|
import {
|
|
216
216
|
handleAutoUpdate,
|
|
217
217
|
isDevelopment,
|
|
218
218
|
relaunchApp,
|
|
219
219
|
setUpdateHandler
|
|
220
|
-
} from "./chunk-
|
|
220
|
+
} from "./chunk-YI3KORH5.js";
|
|
221
221
|
import {
|
|
222
222
|
isTodoList,
|
|
223
223
|
mapCoreStatusToDisplayStatus,
|
|
224
224
|
require_react
|
|
225
|
-
} from "./chunk-
|
|
225
|
+
} from "./chunk-HFVEWB6N.js";
|
|
226
226
|
import {
|
|
227
227
|
registerCleanup,
|
|
228
228
|
removeCleanup,
|
|
229
229
|
runExitCleanup,
|
|
230
230
|
setupTtyCheck
|
|
231
|
-
} from "./chunk-
|
|
231
|
+
} from "./chunk-TWSSMLUS.js";
|
|
232
232
|
import {
|
|
233
233
|
ACTIVATE_SKILL_TOOL_NAME,
|
|
234
234
|
AGENT_TOOL_NAME,
|
|
235
235
|
ApiKeyUpdatedEvent,
|
|
236
|
-
ApprovalMode,
|
|
237
236
|
AsyncFzf,
|
|
238
237
|
AudioRecorder,
|
|
239
238
|
AuthType,
|
|
240
239
|
ChangeAuthRequestedError,
|
|
241
|
-
CompressionStatus,
|
|
242
240
|
ConversationFinishedEvent,
|
|
243
|
-
CoreEvent,
|
|
244
|
-
CoreToolCallStatus,
|
|
245
241
|
CreditPurchaseClickEvent,
|
|
246
242
|
DEFAULT_GEMINI_FLASH_LITE_MODEL,
|
|
247
243
|
DEFAULT_GEMINI_FLASH_MODEL,
|
|
@@ -263,19 +259,12 @@ import {
|
|
|
263
259
|
GEMMA_4_31B_IT_MODEL,
|
|
264
260
|
GLOB_DISPLAY_NAME,
|
|
265
261
|
GREP_DISPLAY_NAME,
|
|
266
|
-
GeminiCliOperation,
|
|
267
|
-
GeminiEventType,
|
|
268
262
|
GitService,
|
|
269
263
|
IdeClient,
|
|
270
|
-
Kind,
|
|
271
264
|
LS_DISPLAY_NAME,
|
|
272
265
|
LegacyAgentProtocol,
|
|
273
266
|
LlmRole,
|
|
274
267
|
Logger,
|
|
275
|
-
MCPDiscoveryState,
|
|
276
|
-
MCPServerStatus,
|
|
277
|
-
MessageBusType,
|
|
278
|
-
MessageSenderType,
|
|
279
268
|
ModelNotFoundError,
|
|
280
269
|
ModelSlashCommandEvent,
|
|
281
270
|
OverageMenuShownEvent,
|
|
@@ -287,27 +276,20 @@ import {
|
|
|
287
276
|
PREVIEW_GEMINI_MODEL,
|
|
288
277
|
PolicyIntegrityManager,
|
|
289
278
|
ProjectIdRequiredError,
|
|
290
|
-
QuestionType,
|
|
291
279
|
READ_FILE_DISPLAY_NAME,
|
|
292
280
|
READ_MANY_FILES_DISPLAY_NAME,
|
|
293
281
|
RELEASE_CHANNEL_STABILITY,
|
|
294
282
|
ROOT_SCHEDULER_ID,
|
|
295
283
|
SHELL_TOOL_NAME,
|
|
296
284
|
Scheduler,
|
|
297
|
-
SessionEndReason,
|
|
298
|
-
SessionStartSource,
|
|
299
285
|
ShellExecutionService,
|
|
300
286
|
SlashCommandStatus,
|
|
301
287
|
Storage,
|
|
302
|
-
SubagentState,
|
|
303
288
|
TOPIC_PARAM_STRATEGIC_INTENT,
|
|
304
289
|
TOPIC_PARAM_SUMMARY,
|
|
305
290
|
TOPIC_PARAM_TITLE,
|
|
306
291
|
TerminalQuotaError,
|
|
307
|
-
ToolConfirmationOutcome,
|
|
308
|
-
ToolErrorType,
|
|
309
292
|
TranscriptionFactory,
|
|
310
|
-
TrustLevel,
|
|
311
293
|
UPDATE_TOPIC_DISPLAY_NAME,
|
|
312
294
|
UPDATE_TOPIC_TOOL_NAME,
|
|
313
295
|
UnauthorizedError,
|
|
@@ -319,7 +301,6 @@ import {
|
|
|
319
301
|
WEB_FETCH_DISPLAY_NAME,
|
|
320
302
|
WEB_SEARCH_DISPLAY_NAME,
|
|
321
303
|
WRITE_FILE_DISPLAY_NAME,
|
|
322
|
-
WarningPriority,
|
|
323
304
|
WhisperModelManager,
|
|
324
305
|
addMCPStatusChangeListener,
|
|
325
306
|
allowEditorTypeInSandbox,
|
|
@@ -429,7 +410,7 @@ import {
|
|
|
429
410
|
validatePlanContent,
|
|
430
411
|
validatePlanPath,
|
|
431
412
|
writeToStdout
|
|
432
|
-
} from "./chunk-
|
|
413
|
+
} from "./chunk-N6QPQL7E.js";
|
|
433
414
|
import "./chunk-6HI7VNOG.js";
|
|
434
415
|
import "./chunk-TUDYL3X4.js";
|
|
435
416
|
import "./chunk-IUUIT4SU.js";
|
|
@@ -5055,7 +5036,7 @@ function calculateShellMaxLines(options) {
|
|
|
5055
5036
|
if (isAlternateBuffer && isThisShellFocused2 && !constrainHeight) {
|
|
5056
5037
|
return maxLinesBasedOnHeight;
|
|
5057
5038
|
}
|
|
5058
|
-
const isExecuting = status ===
|
|
5039
|
+
const isExecuting = status === "executing" /* Executing */;
|
|
5059
5040
|
const shellMaxLinesLimit = isExecuting ? ACTIVE_SHELL_MAX_LINES - SHELL_CONTENT_OVERHEAD : COMPLETED_SHELL_MAX_LINES - SHELL_CONTENT_OVERHEAD;
|
|
5060
5041
|
return Math.min(maxLinesBasedOnHeight, shellMaxLinesLimit);
|
|
5061
5042
|
}
|
|
@@ -5089,10 +5070,10 @@ function isShellTool(name) {
|
|
|
5089
5070
|
return name === SHELL_COMMAND_NAME || name === SHELL_NAME || name === SHELL_TOOL_NAME || normalized === "shell";
|
|
5090
5071
|
}
|
|
5091
5072
|
function isThisShellFocusable(name, status, config) {
|
|
5092
|
-
return !!(isShellTool(name) && status ===
|
|
5073
|
+
return !!(isShellTool(name) && status === "executing" /* Executing */ && config?.getEnableInteractiveShell());
|
|
5093
5074
|
}
|
|
5094
5075
|
function isThisShellFocused(name, status, ptyId, activeShellPtyId, embeddedShellFocused) {
|
|
5095
|
-
return !!(isShellTool(name) && status ===
|
|
5076
|
+
return !!(isShellTool(name) && status === "executing" /* Executing */ && ptyId === activeShellPtyId && embeddedShellFocused);
|
|
5096
5077
|
}
|
|
5097
5078
|
function useFocusHint(isThisShellFocusable2, isThisShellFocused2, resultDisplay) {
|
|
5098
5079
|
const [userHasFocused, setUserHasFocused] = (0, import_react9.useState)(false);
|
|
@@ -5252,13 +5233,13 @@ var formatToolArgs = (args) => {
|
|
|
5252
5233
|
var SubagentProgressDisplay = ({ progress, terminalWidth, historyOverrides }) => {
|
|
5253
5234
|
let headerText;
|
|
5254
5235
|
let headerColor = theme.text.secondary;
|
|
5255
|
-
if (progress.state ===
|
|
5236
|
+
if (progress.state === "cancelled" /* CANCELLED */) {
|
|
5256
5237
|
headerText = `Subagent ${progress.agentName} was cancelled.`;
|
|
5257
5238
|
headerColor = theme.status.warning;
|
|
5258
|
-
} else if (progress.state ===
|
|
5239
|
+
} else if (progress.state === "error" /* ERROR */) {
|
|
5259
5240
|
headerText = `Subagent ${progress.agentName} failed.`;
|
|
5260
5241
|
headerColor = theme.status.error;
|
|
5261
|
-
} else if (progress.state ===
|
|
5242
|
+
} else if (progress.state === "completed" /* COMPLETED */) {
|
|
5262
5243
|
headerText = `Subagent ${progress.agentName} completed.`;
|
|
5263
5244
|
headerColor = theme.status.success;
|
|
5264
5245
|
} else {
|
|
@@ -5278,7 +5259,7 @@ var SubagentProgressDisplay = ({ progress, terminalWidth, historyOverrides }) =>
|
|
|
5278
5259
|
/* @__PURE__ */ (0, import_jsx_runtime15.jsx)(Box_default, { flexGrow: 1, children: /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(Text, { color, children: item.content }) })
|
|
5279
5260
|
] }, item.id);
|
|
5280
5261
|
} else if (item.type === "tool_call") {
|
|
5281
|
-
const statusSymbol = item.status ===
|
|
5262
|
+
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 });
|
|
5282
5263
|
const formattedArgs = item.description || formatToolArgs(item.args);
|
|
5283
5264
|
const displayArgs = formattedArgs.length > 60 ? formattedArgs.slice(0, 60) + "..." : formattedArgs;
|
|
5284
5265
|
return /* @__PURE__ */ (0, import_jsx_runtime15.jsxs)(Box_default, { flexDirection: "row", children: [
|
|
@@ -5289,7 +5270,7 @@ var SubagentProgressDisplay = ({ progress, terminalWidth, historyOverrides }) =>
|
|
|
5289
5270
|
{
|
|
5290
5271
|
bold: true,
|
|
5291
5272
|
color: theme.text.primary,
|
|
5292
|
-
strikethrough: item.status ===
|
|
5273
|
+
strikethrough: item.status === "cancelled" /* CANCELLED */,
|
|
5293
5274
|
children: item.displayName || item.content
|
|
5294
5275
|
}
|
|
5295
5276
|
),
|
|
@@ -5298,7 +5279,7 @@ var SubagentProgressDisplay = ({ progress, terminalWidth, historyOverrides }) =>
|
|
|
5298
5279
|
{
|
|
5299
5280
|
color: theme.text.secondary,
|
|
5300
5281
|
wrap: "truncate",
|
|
5301
|
-
strikethrough: item.status ===
|
|
5282
|
+
strikethrough: item.status === "cancelled" /* CANCELLED */,
|
|
5302
5283
|
children: displayArgs
|
|
5303
5284
|
}
|
|
5304
5285
|
) })
|
|
@@ -5318,7 +5299,7 @@ var SubagentProgressDisplay = ({ progress, terminalWidth, historyOverrides }) =>
|
|
|
5318
5299
|
MarkdownDisplay,
|
|
5319
5300
|
{
|
|
5320
5301
|
text: safeJsonToMarkdown(progress.result),
|
|
5321
|
-
isPending: progress.state !==
|
|
5302
|
+
isPending: progress.state !== "completed" /* COMPLETED */,
|
|
5322
5303
|
terminalWidth
|
|
5323
5304
|
}
|
|
5324
5305
|
)
|
|
@@ -5672,14 +5653,14 @@ var ToolActionsProvider = (props) => {
|
|
|
5672
5653
|
}
|
|
5673
5654
|
const details = tool.confirmationDetails;
|
|
5674
5655
|
if (details?.type === "edit" && isDiffingEnabled && "filePath" in details) {
|
|
5675
|
-
const cliOutcome = outcome ===
|
|
5656
|
+
const cliOutcome = outcome === "cancel" /* Cancel */ ? "rejected" : "accepted";
|
|
5676
5657
|
await ideClient?.resolveDiffFromCli(details.filePath, cliOutcome);
|
|
5677
5658
|
}
|
|
5678
5659
|
if (tool.correlationId) {
|
|
5679
5660
|
await config.getMessageBus().publish({
|
|
5680
|
-
type:
|
|
5661
|
+
type: "tool-confirmation-response" /* TOOL_CONFIRMATION_RESPONSE */,
|
|
5681
5662
|
correlationId: tool.correlationId,
|
|
5682
|
-
confirmed: outcome !==
|
|
5663
|
+
confirmed: outcome !== "cancel" /* Cancel */,
|
|
5683
5664
|
requiresUserConfirmation: false,
|
|
5684
5665
|
outcome,
|
|
5685
5666
|
payload
|
|
@@ -5698,7 +5679,7 @@ var ToolActionsProvider = (props) => {
|
|
|
5698
5679
|
);
|
|
5699
5680
|
const cancel = (0, import_react12.useCallback)(
|
|
5700
5681
|
async (callId) => {
|
|
5701
|
-
await confirm(callId,
|
|
5682
|
+
await confirm(callId, "cancel" /* Cancel */);
|
|
5702
5683
|
},
|
|
5703
5684
|
[confirm]
|
|
5704
5685
|
);
|
|
@@ -5817,7 +5798,7 @@ var ToolMessage = ({
|
|
|
5817
5798
|
paddingX: 1,
|
|
5818
5799
|
flexDirection: "column",
|
|
5819
5800
|
children: [
|
|
5820
|
-
status ===
|
|
5801
|
+
status === "executing" /* Executing */ && progress !== void 0 && /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(
|
|
5821
5802
|
McpProgressIndicator,
|
|
5822
5803
|
{
|
|
5823
5804
|
progress,
|
|
@@ -5834,8 +5815,8 @@ var ToolMessage = ({
|
|
|
5834
5815
|
terminalWidth,
|
|
5835
5816
|
renderOutputAsMarkdown,
|
|
5836
5817
|
hasFocus: isThisShellFocused2,
|
|
5837
|
-
maxLines: kind ===
|
|
5838
|
-
overflowDirection: kind ===
|
|
5818
|
+
maxLines: kind === "agent" /* Agent */ && availableTerminalHeight !== void 0 ? SUBAGENT_MAX_LINES : void 0,
|
|
5819
|
+
overflowDirection: kind === "agent" /* Agent */ ? "bottom" : "top"
|
|
5839
5820
|
}
|
|
5840
5821
|
),
|
|
5841
5822
|
isThisShellFocused2 && config && /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(Box_default, { paddingLeft: STATUS_INDICATOR_WIDTH, marginTop: 1, children: /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(
|
|
@@ -6151,7 +6132,7 @@ function getInitialTrustState(settings, cwd5, isCurrentWorkspace) {
|
|
|
6151
6132
|
settings.merged,
|
|
6152
6133
|
process3.cwd()
|
|
6153
6134
|
);
|
|
6154
|
-
const isInheritedTrust = isTrusted && (!explicitTrustLevel || explicitTrustLevel ===
|
|
6135
|
+
const isInheritedTrust = isTrusted && (!explicitTrustLevel || explicitTrustLevel === "DO_NOT_TRUST" /* DO_NOT_TRUST */);
|
|
6155
6136
|
return {
|
|
6156
6137
|
currentTrustLevel: explicitTrustLevel,
|
|
6157
6138
|
isInheritedTrustFromParent: !!(source === "file" && isInheritedTrust),
|
|
@@ -6196,7 +6177,7 @@ var usePermissionsModifyTrust = (onExit, addItem, targetDirectory) => {
|
|
|
6196
6177
|
process3.cwd(),
|
|
6197
6178
|
newConfig
|
|
6198
6179
|
);
|
|
6199
|
-
if (trustLevel ===
|
|
6180
|
+
if (trustLevel === "DO_NOT_TRUST" /* DO_NOT_TRUST */ && isTrusted) {
|
|
6200
6181
|
let message = "Note: This folder is still trusted because the connected IDE workspace is trusted.";
|
|
6201
6182
|
if (source === "file") {
|
|
6202
6183
|
message = "Note: This folder is still trusted because a parent folder is trusted.";
|
|
@@ -6270,18 +6251,18 @@ function PermissionsModifyTrustDialog({
|
|
|
6270
6251
|
const TRUST_LEVEL_ITEMS = [
|
|
6271
6252
|
{
|
|
6272
6253
|
label: `Trust this folder (${dirName})`,
|
|
6273
|
-
value:
|
|
6274
|
-
key:
|
|
6254
|
+
value: "TRUST_FOLDER" /* TRUST_FOLDER */,
|
|
6255
|
+
key: "TRUST_FOLDER" /* TRUST_FOLDER */
|
|
6275
6256
|
},
|
|
6276
6257
|
{
|
|
6277
6258
|
label: `Trust parent folder (${parentFolder})`,
|
|
6278
|
-
value:
|
|
6279
|
-
key:
|
|
6259
|
+
value: "TRUST_PARENT" /* TRUST_PARENT */,
|
|
6260
|
+
key: "TRUST_PARENT" /* TRUST_PARENT */
|
|
6280
6261
|
},
|
|
6281
6262
|
{
|
|
6282
6263
|
label: "Don't trust",
|
|
6283
|
-
value:
|
|
6284
|
-
key:
|
|
6264
|
+
value: "DO_NOT_TRUST" /* DO_NOT_TRUST */,
|
|
6265
|
+
key: "DO_NOT_TRUST" /* DO_NOT_TRUST */
|
|
6285
6266
|
}
|
|
6286
6267
|
];
|
|
6287
6268
|
const {
|
|
@@ -6521,7 +6502,7 @@ var ShellToolMessage = ({
|
|
|
6521
6502
|
maxLinesLimit: maxLines
|
|
6522
6503
|
});
|
|
6523
6504
|
import_react17.default.useEffect(() => {
|
|
6524
|
-
const isExecuting = status ===
|
|
6505
|
+
const isExecuting = status === "executing" /* Executing */;
|
|
6525
6506
|
if (isExecuting && ptyId) {
|
|
6526
6507
|
try {
|
|
6527
6508
|
const childWidth = terminalWidth - 4;
|
|
@@ -6734,13 +6715,13 @@ var SubagentGroupDisplay = ({
|
|
|
6734
6715
|
const singleAgent = toolCalls[0].resultDisplay;
|
|
6735
6716
|
if (isSubagentProgress(singleAgent)) {
|
|
6736
6717
|
switch (singleAgent.state) {
|
|
6737
|
-
case
|
|
6718
|
+
case "completed" /* COMPLETED */:
|
|
6738
6719
|
headerText = "Agent Completed";
|
|
6739
6720
|
break;
|
|
6740
|
-
case
|
|
6721
|
+
case "cancelled" /* CANCELLED */:
|
|
6741
6722
|
headerText = "Agent Cancelled";
|
|
6742
6723
|
break;
|
|
6743
|
-
case
|
|
6724
|
+
case "error" /* ERROR */:
|
|
6744
6725
|
headerText = "Agent Error";
|
|
6745
6726
|
break;
|
|
6746
6727
|
default:
|
|
@@ -6756,8 +6737,8 @@ var SubagentGroupDisplay = ({
|
|
|
6756
6737
|
for (const tc of toolCalls) {
|
|
6757
6738
|
const progress = tc.resultDisplay;
|
|
6758
6739
|
if (isSubagentProgress(progress)) {
|
|
6759
|
-
if (progress.state ===
|
|
6760
|
-
else if (progress.state ===
|
|
6740
|
+
if (progress.state === "completed" /* COMPLETED */) completedCount++;
|
|
6741
|
+
else if (progress.state === "running" /* RUNNING */) runningCount++;
|
|
6761
6742
|
} else {
|
|
6762
6743
|
runningCount++;
|
|
6763
6744
|
}
|
|
@@ -6836,7 +6817,7 @@ var SubagentGroupDisplay = ({
|
|
|
6836
6817
|
if (!isExpanded) {
|
|
6837
6818
|
let content = "Starting...";
|
|
6838
6819
|
let formattedArgs;
|
|
6839
|
-
if (progress.state ===
|
|
6820
|
+
if (progress.state === "completed" /* COMPLETED */) {
|
|
6840
6821
|
if (progress.terminateReason && progress.terminateReason !== "GOAL") {
|
|
6841
6822
|
content = `Finished Early (${progress.terminateReason})`;
|
|
6842
6823
|
} else {
|
|
@@ -6850,17 +6831,17 @@ var SubagentGroupDisplay = ({
|
|
|
6850
6831
|
formattedArgs = formatToolArgs(lastActivity.args);
|
|
6851
6832
|
}
|
|
6852
6833
|
}
|
|
6853
|
-
const displayArgs = progress.state ===
|
|
6834
|
+
const displayArgs = progress.state === "completed" /* COMPLETED */ ? "" : formattedArgs;
|
|
6854
6835
|
const renderStatusIcon = () => {
|
|
6855
|
-
const state = progress.state ??
|
|
6836
|
+
const state = progress.state ?? "running" /* RUNNING */;
|
|
6856
6837
|
switch (state) {
|
|
6857
|
-
case
|
|
6838
|
+
case "running" /* RUNNING */:
|
|
6858
6839
|
return /* @__PURE__ */ (0, import_jsx_runtime25.jsx)(Text, { color: theme.text.primary, children: "!" });
|
|
6859
|
-
case
|
|
6840
|
+
case "completed" /* COMPLETED */:
|
|
6860
6841
|
return /* @__PURE__ */ (0, import_jsx_runtime25.jsx)(Text, { color: theme.status.success, children: "\u2713" });
|
|
6861
|
-
case
|
|
6842
|
+
case "cancelled" /* CANCELLED */:
|
|
6862
6843
|
return /* @__PURE__ */ (0, import_jsx_runtime25.jsx)(Text, { color: theme.status.warning, children: "\u2139" });
|
|
6863
|
-
case
|
|
6844
|
+
case "error" /* ERROR */:
|
|
6864
6845
|
return /* @__PURE__ */ (0, import_jsx_runtime25.jsx)(Text, { color: theme.status.error, children: "\u2717" });
|
|
6865
6846
|
default:
|
|
6866
6847
|
return checkExhaustive(state);
|
|
@@ -6913,22 +6894,22 @@ var hasPayload = (res) => {
|
|
|
6913
6894
|
function getFileOpData(diff, status, resultDisplay, terminalWidth, availableTerminalHeight, isClickable) {
|
|
6914
6895
|
const added = (diff.diffStat?.model_added_lines ?? 0) + (diff.diffStat?.user_added_lines ?? 0);
|
|
6915
6896
|
const removed = (diff.diffStat?.model_removed_lines ?? 0) + (diff.diffStat?.user_removed_lines ?? 0);
|
|
6916
|
-
const isAcceptedOrConfirming = status ===
|
|
6897
|
+
const isAcceptedOrConfirming = status === "success" /* Success */ || status === "executing" /* Executing */ || status === "awaiting_approval" /* AwaitingApproval */;
|
|
6917
6898
|
const addColor = isAcceptedOrConfirming ? theme.status.success : theme.text.secondary;
|
|
6918
6899
|
const removeColor = isAcceptedOrConfirming ? theme.status.error : theme.text.secondary;
|
|
6919
6900
|
const showDiffStat = !!diff.diffStat;
|
|
6920
6901
|
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 }) });
|
|
6921
6902
|
let resultSummary = "";
|
|
6922
6903
|
let resultColor = theme.text.secondary;
|
|
6923
|
-
if (status ===
|
|
6904
|
+
if (status === "awaiting_approval" /* AwaitingApproval */) {
|
|
6924
6905
|
resultSummary = "Confirming";
|
|
6925
|
-
} else if (status ===
|
|
6906
|
+
} else if (status === "success" /* Success */ || status === "executing" /* Executing */) {
|
|
6926
6907
|
resultSummary = "Accepted";
|
|
6927
6908
|
resultColor = theme.text.accent;
|
|
6928
|
-
} else if (status ===
|
|
6909
|
+
} else if (status === "cancelled" /* Cancelled */) {
|
|
6929
6910
|
resultSummary = "Rejected";
|
|
6930
6911
|
resultColor = theme.status.error;
|
|
6931
|
-
} else if (status ===
|
|
6912
|
+
} else if (status === "error" /* Error */) {
|
|
6932
6913
|
resultSummary = typeof resultDisplay === "string" ? resultDisplay : "Failed";
|
|
6933
6914
|
resultColor = theme.status.error;
|
|
6934
6915
|
}
|
|
@@ -6959,7 +6940,7 @@ function getFileOpData(diff, status, resultDisplay, terminalWidth, availableTerm
|
|
|
6959
6940
|
filename: diff.fileName,
|
|
6960
6941
|
terminalWidth: terminalWidth - PAYLOAD_MARGIN_LEFT,
|
|
6961
6942
|
availableTerminalHeight,
|
|
6962
|
-
disableColor: status ===
|
|
6943
|
+
disableColor: status === "cancelled" /* Cancelled */
|
|
6963
6944
|
}
|
|
6964
6945
|
);
|
|
6965
6946
|
return { description, summary, payload };
|
|
@@ -7087,10 +7068,10 @@ var DenseToolMessage = (props) => {
|
|
|
7087
7068
|
if (isGrepResult(resultDisplay)) {
|
|
7088
7069
|
return getGenericSuccessData(resultDisplay, originalDescription);
|
|
7089
7070
|
}
|
|
7090
|
-
if (status ===
|
|
7071
|
+
if (status === "success" /* Success */ && resultDisplay) {
|
|
7091
7072
|
return getGenericSuccessData(resultDisplay, originalDescription);
|
|
7092
7073
|
}
|
|
7093
|
-
if (status ===
|
|
7074
|
+
if (status === "error" /* Error */) {
|
|
7094
7075
|
const text = typeof resultDisplay === "string" ? resultDisplay.replace(/\n/g, " ") : "Failed";
|
|
7095
7076
|
const errorSummary = /* @__PURE__ */ (0, import_jsx_runtime26.jsxs)(Text, { color: theme.status.error, wrap: "truncate-end", children: [
|
|
7096
7077
|
"\u2192 ",
|
|
@@ -7131,7 +7112,7 @@ var DenseToolMessage = (props) => {
|
|
|
7131
7112
|
language: fileExtension,
|
|
7132
7113
|
maxWidth: terminalWidth - PAYLOAD_MARGIN_LEFT,
|
|
7133
7114
|
settings,
|
|
7134
|
-
disableColor: status ===
|
|
7115
|
+
disableColor: status === "cancelled" /* Cancelled */,
|
|
7135
7116
|
returnLines: true
|
|
7136
7117
|
});
|
|
7137
7118
|
} else {
|
|
@@ -7139,7 +7120,7 @@ var DenseToolMessage = (props) => {
|
|
|
7139
7120
|
parsedLines,
|
|
7140
7121
|
filename: diff.fileName,
|
|
7141
7122
|
terminalWidth: terminalWidth - PAYLOAD_MARGIN_LEFT,
|
|
7142
|
-
disableColor: status ===
|
|
7123
|
+
disableColor: status === "cancelled" /* Cancelled */
|
|
7143
7124
|
});
|
|
7144
7125
|
}
|
|
7145
7126
|
}, [diff, isExpanded, isAlternateBuffer, terminalWidth, settings, status]);
|
|
@@ -7269,7 +7250,7 @@ function isToolExecuting(pendingHistoryItems) {
|
|
|
7269
7250
|
return pendingHistoryItems.some((item) => {
|
|
7270
7251
|
if (item && item.type === "tool_group") {
|
|
7271
7252
|
return item.tools.some(
|
|
7272
|
-
(tool) =>
|
|
7253
|
+
(tool) => "executing" /* Executing */ === tool.status
|
|
7273
7254
|
);
|
|
7274
7255
|
}
|
|
7275
7256
|
return false;
|
|
@@ -7278,7 +7259,7 @@ function isToolExecuting(pendingHistoryItems) {
|
|
|
7278
7259
|
function isToolAwaitingConfirmation(pendingHistoryItems) {
|
|
7279
7260
|
return pendingHistoryItems.filter((item) => item.type === "tool_group").some(
|
|
7280
7261
|
(item) => item.tools.some(
|
|
7281
|
-
(tool) =>
|
|
7262
|
+
(tool) => "awaiting_approval" /* AwaitingApproval */ === tool.status
|
|
7282
7263
|
)
|
|
7283
7264
|
);
|
|
7284
7265
|
}
|
|
@@ -7301,14 +7282,14 @@ function getToolGroupBorderAppearance(item, activeShellPtyId, embeddedShellFocus
|
|
|
7301
7282
|
if (isTrackedToolCall(t)) {
|
|
7302
7283
|
return t.status !== "success" && t.status !== "error" && t.status !== "cancelled";
|
|
7303
7284
|
} else {
|
|
7304
|
-
return t.status !==
|
|
7285
|
+
return t.status !== "success" /* Success */ && t.status !== "error" /* Error */ && t.status !== "cancelled" /* Cancelled */;
|
|
7305
7286
|
}
|
|
7306
7287
|
});
|
|
7307
7288
|
const isEmbeddedShellFocused = toolsToInspect.some((t) => {
|
|
7308
7289
|
if (isTrackedToolCall(t)) {
|
|
7309
7290
|
return isShellTool(t.request.name) && t.status === "executing" && t.pid === activeShellPtyId && !!embeddedShellFocused;
|
|
7310
7291
|
} else {
|
|
7311
|
-
return isShellTool(t.name) && t.status ===
|
|
7292
|
+
return isShellTool(t.name) && t.status === "executing" /* Executing */ && t.ptyId === activeShellPtyId && !!embeddedShellFocused;
|
|
7312
7293
|
}
|
|
7313
7294
|
});
|
|
7314
7295
|
const isShellCommand = toolsToInspect.some((t) => {
|
|
@@ -7407,7 +7388,7 @@ var ToolGroupMessage = ({
|
|
|
7407
7388
|
const groupedTools = (0, import_react21.useMemo)(() => {
|
|
7408
7389
|
const groups = [];
|
|
7409
7390
|
for (const tool of visibleToolCalls) {
|
|
7410
|
-
if (tool.kind ===
|
|
7391
|
+
if (tool.kind === "agent" /* Agent */) {
|
|
7411
7392
|
const lastGroup = groups[groups.length - 1];
|
|
7412
7393
|
if (Array.isArray(lastGroup)) {
|
|
7413
7394
|
lastGroup.push(tool);
|
|
@@ -7462,7 +7443,7 @@ var ToolGroupMessage = ({
|
|
|
7462
7443
|
}, [groupedTools, isCompactModeEnabled, borderTopOverride]);
|
|
7463
7444
|
let countToolCallsWithResults = 0;
|
|
7464
7445
|
for (const tool of visibleToolCalls) {
|
|
7465
|
-
if (tool.kind !==
|
|
7446
|
+
if (tool.kind !== "agent" /* Agent */) {
|
|
7466
7447
|
if (isCompactTool(tool, isCompactModeEnabled)) {
|
|
7467
7448
|
if (hasDensePayload(tool)) {
|
|
7468
7449
|
countToolCallsWithResults++;
|
|
@@ -7636,7 +7617,7 @@ var ToolGroupDisplay = ({
|
|
|
7636
7617
|
}
|
|
7637
7618
|
const { tools, borderColor, borderDimColor, borderTop, borderBottom } = item;
|
|
7638
7619
|
const visibleTools = tools.filter(
|
|
7639
|
-
(t) => t.status !==
|
|
7620
|
+
(t) => t.status !== "awaiting_approval" /* AwaitingApproval */
|
|
7640
7621
|
);
|
|
7641
7622
|
const noticeTools = visibleTools.filter((t) => t.format === "notice");
|
|
7642
7623
|
const otherTools = visibleTools.filter(
|
|
@@ -7838,18 +7819,18 @@ function CompressionMessage({
|
|
|
7838
7819
|
return "Compressing chat history";
|
|
7839
7820
|
}
|
|
7840
7821
|
switch (compressionStatus) {
|
|
7841
|
-
case
|
|
7822
|
+
case 1 /* COMPRESSED */:
|
|
7842
7823
|
return `Chat history compressed from ${originalTokens} to ${newTokens} tokens.`;
|
|
7843
|
-
case
|
|
7824
|
+
case 2 /* COMPRESSION_FAILED_INFLATED_TOKEN_COUNT */:
|
|
7844
7825
|
if (originalTokens < 5e4) {
|
|
7845
7826
|
return "Compression was not beneficial for this history size.";
|
|
7846
7827
|
}
|
|
7847
7828
|
return "Chat history compression did not reduce size. This may indicate issues with the compression prompt.";
|
|
7848
|
-
case
|
|
7829
|
+
case 3 /* COMPRESSION_FAILED_TOKEN_COUNT_ERROR */:
|
|
7849
7830
|
return "Could not compress chat history due to a token counting error.";
|
|
7850
|
-
case
|
|
7831
|
+
case 4 /* COMPRESSION_FAILED_EMPTY_SUMMARY */:
|
|
7851
7832
|
return "Chat history compression failed: the model returned an empty summary.";
|
|
7852
|
-
case
|
|
7833
|
+
case 5 /* NOOP */:
|
|
7853
7834
|
return "Nothing to compress.";
|
|
7854
7835
|
default:
|
|
7855
7836
|
return "";
|
|
@@ -8275,8 +8256,8 @@ var ModelUsageTable = ({ models }) => {
|
|
|
8275
8256
|
);
|
|
8276
8257
|
roleEntries.sort(([a], [b]) => {
|
|
8277
8258
|
if (a === b) return 0;
|
|
8278
|
-
if (a ===
|
|
8279
|
-
if (b ===
|
|
8259
|
+
if (a === "main" /* MAIN */) return -1;
|
|
8260
|
+
if (b === "main" /* MAIN */) return 1;
|
|
8280
8261
|
return a.localeCompare(b);
|
|
8281
8262
|
});
|
|
8282
8263
|
roleEntries.forEach(([role, roleMetrics]) => {
|
|
@@ -8607,8 +8588,8 @@ var ModelStatsDisplay = ({
|
|
|
8607
8588
|
return validRoles.includes(role);
|
|
8608
8589
|
}).sort((a, b) => {
|
|
8609
8590
|
if (a === b) return 0;
|
|
8610
|
-
if (a ===
|
|
8611
|
-
if (b ===
|
|
8591
|
+
if (a === "main" /* MAIN */) return -1;
|
|
8592
|
+
if (b === "main" /* MAIN */) return 1;
|
|
8612
8593
|
return a.localeCompare(b);
|
|
8613
8594
|
});
|
|
8614
8595
|
const createRow = (metric, getValue, options = {}) => {
|
|
@@ -9399,7 +9380,7 @@ var McpStatus = ({
|
|
|
9399
9380
|
);
|
|
9400
9381
|
const originalStatus = serverStatus(serverName);
|
|
9401
9382
|
const hasCachedItems = serverTools.length > 0 || serverPrompts.length > 0 || serverResources.length > 0;
|
|
9402
|
-
const status = originalStatus ===
|
|
9383
|
+
const status = originalStatus === "disconnected" /* DISCONNECTED */ && hasCachedItems ? "connected" /* CONNECTED */ : originalStatus;
|
|
9403
9384
|
let statusIndicator = "";
|
|
9404
9385
|
let statusText = "";
|
|
9405
9386
|
let statusColor = theme.text.primary;
|
|
@@ -9411,17 +9392,17 @@ var McpStatus = ({
|
|
|
9411
9392
|
statusColor = theme.text.secondary;
|
|
9412
9393
|
} else {
|
|
9413
9394
|
switch (status) {
|
|
9414
|
-
case
|
|
9395
|
+
case "connected" /* CONNECTED */:
|
|
9415
9396
|
statusIndicator = "\u{1F7E2}";
|
|
9416
9397
|
statusText = "Ready";
|
|
9417
9398
|
statusColor = theme.status.success;
|
|
9418
9399
|
break;
|
|
9419
|
-
case
|
|
9400
|
+
case "connecting" /* CONNECTING */:
|
|
9420
9401
|
statusIndicator = "\u{1F504}";
|
|
9421
9402
|
statusText = "Starting... (first startup may take longer)";
|
|
9422
9403
|
statusColor = theme.status.warning;
|
|
9423
9404
|
break;
|
|
9424
|
-
case
|
|
9405
|
+
case "disconnected" /* DISCONNECTED */:
|
|
9425
9406
|
default:
|
|
9426
9407
|
statusIndicator = "\u{1F534}";
|
|
9427
9408
|
statusText = "Disconnected";
|
|
@@ -9469,12 +9450,12 @@ var McpStatus = ({
|
|
|
9469
9450
|
/* @__PURE__ */ (0, import_jsx_runtime48.jsxs)(Text, { children: [
|
|
9470
9451
|
" - ",
|
|
9471
9452
|
statusText,
|
|
9472
|
-
status ===
|
|
9453
|
+
status === "connected" /* CONNECTED */ && parts.length > 0 && ` (${parts.join(", ")})`
|
|
9473
9454
|
] }),
|
|
9474
9455
|
authStatusNode
|
|
9475
9456
|
] }),
|
|
9476
|
-
status ===
|
|
9477
|
-
status ===
|
|
9457
|
+
status === "connecting" /* CONNECTING */ && /* @__PURE__ */ (0, import_jsx_runtime48.jsx)(Text, { children: " (tools and prompts will appear when ready)" }),
|
|
9458
|
+
status === "disconnected" /* DISCONNECTED */ && toolCount > 0 && /* @__PURE__ */ (0, import_jsx_runtime48.jsxs)(Text, { children: [
|
|
9478
9459
|
" (",
|
|
9479
9460
|
toolCount,
|
|
9480
9461
|
" tools cached)"
|
|
@@ -10035,7 +10016,7 @@ var Notifications = () => {
|
|
|
10035
10016
|
if (dismissed) return [];
|
|
10036
10017
|
const counts = persistentState.get("startupWarningCounts") || {};
|
|
10037
10018
|
return startupWarnings.filter((w) => {
|
|
10038
|
-
if (w.priority ===
|
|
10019
|
+
if (w.priority === "low" /* Low */) {
|
|
10039
10020
|
const count = counts[w.id] || 0;
|
|
10040
10021
|
return count < MAX_STARTUP_WARNING_SHOW_COUNT;
|
|
10041
10022
|
}
|
|
@@ -10048,7 +10029,7 @@ var Notifications = () => {
|
|
|
10048
10029
|
const counts = { ...persistentState.get("startupWarningCounts") || {} };
|
|
10049
10030
|
let changed = false;
|
|
10050
10031
|
visibleWarnings.forEach((w) => {
|
|
10051
|
-
if (w.priority ===
|
|
10032
|
+
if (w.priority === "low" /* Low */) {
|
|
10052
10033
|
counts[w.id] = (counts[w.id] || 0) + 1;
|
|
10053
10034
|
changed = true;
|
|
10054
10035
|
}
|
|
@@ -10155,7 +10136,7 @@ var UserIdentity = ({ config }) => {
|
|
|
10155
10136
|
}
|
|
10156
10137
|
return /* @__PURE__ */ (0, import_jsx_runtime58.jsxs)(Box_default, { flexDirection: "column", children: [
|
|
10157
10138
|
/* @__PURE__ */ (0, import_jsx_runtime58.jsxs)(Box_default, { children: [
|
|
10158
|
-
/* @__PURE__ */ (0, import_jsx_runtime58.jsx)(Text, { color: theme.text.primary, wrap: "truncate-end", children: authType ===
|
|
10139
|
+
/* @__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: [
|
|
10159
10140
|
/* @__PURE__ */ (0, import_jsx_runtime58.jsxs)(Text, { bold: true, children: [
|
|
10160
10141
|
"Signed in with Google",
|
|
10161
10142
|
email ? ":" : ""
|
|
@@ -10389,7 +10370,7 @@ var import_react32 = __toESM(require_react(), 1);
|
|
|
10389
10370
|
function getConfirmingToolState(pendingHistoryItems) {
|
|
10390
10371
|
const allPendingTools = getAllToolCalls(pendingHistoryItems);
|
|
10391
10372
|
const confirmingTools = allPendingTools.filter(
|
|
10392
|
-
(tool) => tool.status ===
|
|
10373
|
+
(tool) => tool.status === "awaiting_approval" /* AwaitingApproval */
|
|
10393
10374
|
);
|
|
10394
10375
|
if (confirmingTools.length === 0) {
|
|
10395
10376
|
return null;
|
|
@@ -11697,7 +11678,7 @@ var ExitPlanModeDialog = ({
|
|
|
11697
11678
|
{
|
|
11698
11679
|
questions: [
|
|
11699
11680
|
{
|
|
11700
|
-
type:
|
|
11681
|
+
type: "choice" /* CHOICE */,
|
|
11701
11682
|
header: "Approval",
|
|
11702
11683
|
question: planContent,
|
|
11703
11684
|
options: [
|
|
@@ -11718,9 +11699,9 @@ var ExitPlanModeDialog = ({
|
|
|
11718
11699
|
onSubmit: (answers) => {
|
|
11719
11700
|
const answer = answers["0"];
|
|
11720
11701
|
if (answer === "Yes, automatically accept edits" /* Auto */) {
|
|
11721
|
-
onApprove(
|
|
11702
|
+
onApprove("autoEdit" /* AUTO_EDIT */);
|
|
11722
11703
|
} else if (answer === "Yes, manually accept edits" /* Manual */) {
|
|
11723
|
-
onApprove(
|
|
11704
|
+
onApprove("default" /* DEFAULT */);
|
|
11724
11705
|
} else if (answer) {
|
|
11725
11706
|
onFeedback(answer);
|
|
11726
11707
|
}
|
|
@@ -11931,7 +11912,7 @@ ${deceptiveUrlWarnings.map(
|
|
|
11931
11912
|
);
|
|
11932
11913
|
(0, import_react37.useEffect)(() => {
|
|
11933
11914
|
if (isCancelling) {
|
|
11934
|
-
handleConfirm(
|
|
11915
|
+
handleConfirm("cancel" /* Cancel */);
|
|
11935
11916
|
}
|
|
11936
11917
|
}, [isCancelling, handleConfirm]);
|
|
11937
11918
|
const handleSelect = (0, import_react37.useCallback)(
|
|
@@ -11944,19 +11925,19 @@ ${deceptiveUrlWarnings.map(
|
|
|
11944
11925
|
if (!confirmationDetails.isModifying) {
|
|
11945
11926
|
options2.push({
|
|
11946
11927
|
label: "Allow once",
|
|
11947
|
-
value:
|
|
11928
|
+
value: "proceed_once" /* ProceedOnce */,
|
|
11948
11929
|
key: "Allow once"
|
|
11949
11930
|
});
|
|
11950
11931
|
if (isTrustedFolder) {
|
|
11951
11932
|
options2.push({
|
|
11952
11933
|
label: "Allow for this session",
|
|
11953
|
-
value:
|
|
11934
|
+
value: "proceed_always" /* ProceedAlways */,
|
|
11954
11935
|
key: "Allow for this session"
|
|
11955
11936
|
});
|
|
11956
11937
|
if (allowPermanentApproval) {
|
|
11957
11938
|
options2.push({
|
|
11958
11939
|
label: "Allow for this file in all future sessions",
|
|
11959
|
-
value:
|
|
11940
|
+
value: "proceed_always_and_save" /* ProceedAlwaysAndSave */,
|
|
11960
11941
|
key: "Allow for this file in all future sessions"
|
|
11961
11942
|
});
|
|
11962
11943
|
}
|
|
@@ -11964,119 +11945,119 @@ ${deceptiveUrlWarnings.map(
|
|
|
11964
11945
|
if (!config.getIdeMode() || !isDiffingEnabled) {
|
|
11965
11946
|
options2.push({
|
|
11966
11947
|
label: "Modify with external editor",
|
|
11967
|
-
value:
|
|
11948
|
+
value: "modify_with_editor" /* ModifyWithEditor */,
|
|
11968
11949
|
key: "Modify with external editor"
|
|
11969
11950
|
});
|
|
11970
11951
|
}
|
|
11971
11952
|
options2.push({
|
|
11972
11953
|
label: "No, suggest changes (esc)",
|
|
11973
|
-
value:
|
|
11954
|
+
value: "cancel" /* Cancel */,
|
|
11974
11955
|
key: "No, suggest changes (esc)"
|
|
11975
11956
|
});
|
|
11976
11957
|
}
|
|
11977
11958
|
} else if (confirmationDetails.type === "sandbox_expansion") {
|
|
11978
11959
|
options2.push({
|
|
11979
11960
|
label: "Allow once",
|
|
11980
|
-
value:
|
|
11961
|
+
value: "proceed_once" /* ProceedOnce */,
|
|
11981
11962
|
key: "Allow once"
|
|
11982
11963
|
});
|
|
11983
11964
|
if (isTrustedFolder) {
|
|
11984
11965
|
options2.push({
|
|
11985
11966
|
label: "Allow for this session",
|
|
11986
|
-
value:
|
|
11967
|
+
value: "proceed_always" /* ProceedAlways */,
|
|
11987
11968
|
key: "Allow for this session"
|
|
11988
11969
|
});
|
|
11989
11970
|
if (allowPermanentApproval) {
|
|
11990
11971
|
options2.push({
|
|
11991
11972
|
label: "Allow for all future sessions",
|
|
11992
|
-
value:
|
|
11973
|
+
value: "proceed_always_and_save" /* ProceedAlwaysAndSave */,
|
|
11993
11974
|
key: "Allow for all future sessions"
|
|
11994
11975
|
});
|
|
11995
11976
|
}
|
|
11996
11977
|
}
|
|
11997
11978
|
options2.push({
|
|
11998
11979
|
label: "No, suggest changes (esc)",
|
|
11999
|
-
value:
|
|
11980
|
+
value: "cancel" /* Cancel */,
|
|
12000
11981
|
key: "No, suggest changes (esc)"
|
|
12001
11982
|
});
|
|
12002
11983
|
} else if (confirmationDetails.type === "exec") {
|
|
12003
11984
|
options2.push({
|
|
12004
11985
|
label: "Allow once",
|
|
12005
|
-
value:
|
|
11986
|
+
value: "proceed_once" /* ProceedOnce */,
|
|
12006
11987
|
key: "Allow once"
|
|
12007
11988
|
});
|
|
12008
11989
|
if (isTrustedFolder) {
|
|
12009
11990
|
options2.push({
|
|
12010
11991
|
label: `Allow for this session`,
|
|
12011
|
-
value:
|
|
11992
|
+
value: "proceed_always" /* ProceedAlways */,
|
|
12012
11993
|
key: `Allow for this session`
|
|
12013
11994
|
});
|
|
12014
11995
|
if (allowPermanentApproval) {
|
|
12015
11996
|
options2.push({
|
|
12016
11997
|
label: `Allow this command for all future sessions`,
|
|
12017
|
-
value:
|
|
11998
|
+
value: "proceed_always_and_save" /* ProceedAlwaysAndSave */,
|
|
12018
11999
|
key: `Allow for all future sessions`
|
|
12019
12000
|
});
|
|
12020
12001
|
}
|
|
12021
12002
|
}
|
|
12022
12003
|
options2.push({
|
|
12023
12004
|
label: "No, suggest changes (esc)",
|
|
12024
|
-
value:
|
|
12005
|
+
value: "cancel" /* Cancel */,
|
|
12025
12006
|
key: "No, suggest changes (esc)"
|
|
12026
12007
|
});
|
|
12027
12008
|
} else if (confirmationDetails.type === "info") {
|
|
12028
12009
|
options2.push({
|
|
12029
12010
|
label: "Allow once",
|
|
12030
|
-
value:
|
|
12011
|
+
value: "proceed_once" /* ProceedOnce */,
|
|
12031
12012
|
key: "Allow once"
|
|
12032
12013
|
});
|
|
12033
12014
|
if (isTrustedFolder) {
|
|
12034
12015
|
options2.push({
|
|
12035
12016
|
label: "Allow for this session",
|
|
12036
|
-
value:
|
|
12017
|
+
value: "proceed_always" /* ProceedAlways */,
|
|
12037
12018
|
key: "Allow for this session"
|
|
12038
12019
|
});
|
|
12039
12020
|
if (allowPermanentApproval) {
|
|
12040
12021
|
options2.push({
|
|
12041
12022
|
label: "Allow for all future sessions",
|
|
12042
|
-
value:
|
|
12023
|
+
value: "proceed_always_and_save" /* ProceedAlwaysAndSave */,
|
|
12043
12024
|
key: "Allow for all future sessions"
|
|
12044
12025
|
});
|
|
12045
12026
|
}
|
|
12046
12027
|
}
|
|
12047
12028
|
options2.push({
|
|
12048
12029
|
label: "No, suggest changes (esc)",
|
|
12049
|
-
value:
|
|
12030
|
+
value: "cancel" /* Cancel */,
|
|
12050
12031
|
key: "No, suggest changes (esc)"
|
|
12051
12032
|
});
|
|
12052
12033
|
} else if (confirmationDetails.type === "mcp") {
|
|
12053
12034
|
options2.push({
|
|
12054
12035
|
label: "Allow once",
|
|
12055
|
-
value:
|
|
12036
|
+
value: "proceed_once" /* ProceedOnce */,
|
|
12056
12037
|
key: "Allow once"
|
|
12057
12038
|
});
|
|
12058
12039
|
if (isTrustedFolder) {
|
|
12059
12040
|
options2.push({
|
|
12060
12041
|
label: "Allow tool for this session",
|
|
12061
|
-
value:
|
|
12042
|
+
value: "proceed_always_tool" /* ProceedAlwaysTool */,
|
|
12062
12043
|
key: "Allow tool for this session"
|
|
12063
12044
|
});
|
|
12064
12045
|
options2.push({
|
|
12065
12046
|
label: "Allow all server tools for this session",
|
|
12066
|
-
value:
|
|
12047
|
+
value: "proceed_always_server" /* ProceedAlwaysServer */,
|
|
12067
12048
|
key: "Allow all server tools for this session"
|
|
12068
12049
|
});
|
|
12069
12050
|
if (allowPermanentApproval) {
|
|
12070
12051
|
options2.push({
|
|
12071
12052
|
label: "Allow tool for all future sessions",
|
|
12072
|
-
value:
|
|
12053
|
+
value: "proceed_always_and_save" /* ProceedAlwaysAndSave */,
|
|
12073
12054
|
key: "Allow tool for all future sessions"
|
|
12074
12055
|
});
|
|
12075
12056
|
}
|
|
12076
12057
|
}
|
|
12077
12058
|
options2.push({
|
|
12078
12059
|
label: "No, suggest changes (esc)",
|
|
12079
|
-
value:
|
|
12060
|
+
value: "cancel" /* Cancel */,
|
|
12080
12061
|
key: "No, suggest changes (esc)"
|
|
12081
12062
|
});
|
|
12082
12063
|
}
|
|
@@ -12115,7 +12096,7 @@ ${deceptiveUrlWarnings.map(
|
|
|
12115
12096
|
const containsRedirection = commandsToDisplay.some(
|
|
12116
12097
|
(cmd) => hasRedirection(cmd)
|
|
12117
12098
|
);
|
|
12118
|
-
const isAutoEdit = config.getApprovalMode() ===
|
|
12099
|
+
const isAutoEdit = config.getApprovalMode() === "yolo" /* YOLO */ || config.getApprovalMode() === "autoEdit" /* AUTO_EDIT */;
|
|
12119
12100
|
if (containsRedirection && !isAutoEdit) {
|
|
12120
12101
|
extraInfoLines = 1;
|
|
12121
12102
|
}
|
|
@@ -12141,7 +12122,7 @@ ${deceptiveUrlWarnings.map(
|
|
|
12141
12122
|
const isSafeToPersist = confirmationDetails.type === "info" || confirmationDetails.type === "edit" || confirmationDetails.type === "mcp";
|
|
12142
12123
|
if (isSafeToPersist && settings.merged.security.autoAddToPolicyByDefault) {
|
|
12143
12124
|
const alwaysAndSaveIndex = options2.findIndex(
|
|
12144
|
-
(o) => o.value ===
|
|
12125
|
+
(o) => o.value === "proceed_always_and_save" /* ProceedAlwaysAndSave */
|
|
12145
12126
|
);
|
|
12146
12127
|
if (alwaysAndSaveIndex !== -1) {
|
|
12147
12128
|
initialIndex2 = alwaysAndSaveIndex;
|
|
@@ -12158,10 +12139,10 @@ ${deceptiveUrlWarnings.map(
|
|
|
12158
12139
|
{
|
|
12159
12140
|
questions: confirmationDetails.questions,
|
|
12160
12141
|
onSubmit: (answers) => {
|
|
12161
|
-
handleConfirm(
|
|
12142
|
+
handleConfirm("proceed_once" /* ProceedOnce */, { answers });
|
|
12162
12143
|
},
|
|
12163
12144
|
onCancel: () => {
|
|
12164
|
-
handleConfirm(
|
|
12145
|
+
handleConfirm("cancel" /* Cancel */);
|
|
12165
12146
|
},
|
|
12166
12147
|
width: terminalWidth,
|
|
12167
12148
|
availableHeight: bodyHeight
|
|
@@ -12182,19 +12163,19 @@ ${deceptiveUrlWarnings.map(
|
|
|
12182
12163
|
planPath: confirmationDetails.planPath,
|
|
12183
12164
|
getPreferredEditor,
|
|
12184
12165
|
onApprove: (approvalMode) => {
|
|
12185
|
-
handleConfirm(
|
|
12166
|
+
handleConfirm("proceed_once" /* ProceedOnce */, {
|
|
12186
12167
|
approved: true,
|
|
12187
12168
|
approvalMode
|
|
12188
12169
|
});
|
|
12189
12170
|
},
|
|
12190
12171
|
onFeedback: (feedback) => {
|
|
12191
|
-
handleConfirm(
|
|
12172
|
+
handleConfirm("proceed_once" /* ProceedOnce */, {
|
|
12192
12173
|
approved: false,
|
|
12193
12174
|
feedback
|
|
12194
12175
|
});
|
|
12195
12176
|
},
|
|
12196
12177
|
onCancel: () => {
|
|
12197
|
-
handleConfirm(
|
|
12178
|
+
handleConfirm("cancel" /* Cancel */);
|
|
12198
12179
|
},
|
|
12199
12180
|
width: terminalWidth,
|
|
12200
12181
|
availableHeight: bodyHeight
|
|
@@ -12303,7 +12284,7 @@ ${deceptiveUrlWarnings.map(
|
|
|
12303
12284
|
const containsRedirection = commandsToDisplay.some(
|
|
12304
12285
|
(cmd) => hasRedirection(cmd)
|
|
12305
12286
|
);
|
|
12306
|
-
const isAutoEdit = config.getApprovalMode() ===
|
|
12287
|
+
const isAutoEdit = config.getApprovalMode() === "yolo" /* YOLO */ || config.getApprovalMode() === "autoEdit" /* AUTO_EDIT */;
|
|
12307
12288
|
let warnings = null;
|
|
12308
12289
|
if (containsRedirection && !isAutoEdit) {
|
|
12309
12290
|
const tipText = `To auto-accept, press ${formatCommand("app.cycleApprovalMode" /* CYCLE_APPROVAL_MODE */)}`;
|
|
@@ -12462,7 +12443,7 @@ ${deceptiveUrlWarnings.map(
|
|
|
12462
12443
|
const bodyOverflowDirection = confirmationDetails.type === "mcp" && isMcpToolDetailsExpanded ? "bottom" : "top";
|
|
12463
12444
|
const renderRadioItem = (0, import_react37.useCallback)(
|
|
12464
12445
|
(item, { titleColor }) => {
|
|
12465
|
-
if (item.value ===
|
|
12446
|
+
if (item.value === "proceed_always_and_save" /* ProceedAlwaysAndSave */) {
|
|
12466
12447
|
return /* @__PURE__ */ (0, import_jsx_runtime65.jsxs)(Text, { color: titleColor, wrap: "truncate", children: [
|
|
12467
12448
|
item.label,
|
|
12468
12449
|
" ",
|
|
@@ -14492,7 +14473,7 @@ async function validateAuthMethodWithSettings(authType, settings) {
|
|
|
14492
14473
|
if (settings.merged.security.auth.useExternal) {
|
|
14493
14474
|
return null;
|
|
14494
14475
|
}
|
|
14495
|
-
if (authType ===
|
|
14476
|
+
if (authType === "gemini-api-key" /* USE_GEMINI */) {
|
|
14496
14477
|
return null;
|
|
14497
14478
|
}
|
|
14498
14479
|
return validateAuthMethod(authType);
|
|
@@ -14544,7 +14525,7 @@ var useAuthCommand = (settings, config, initialAuthError = null, initialAccountS
|
|
|
14544
14525
|
}
|
|
14545
14526
|
return;
|
|
14546
14527
|
}
|
|
14547
|
-
if (authType ===
|
|
14528
|
+
if (authType === "gemini-api-key" /* USE_GEMINI */) {
|
|
14548
14529
|
const key = await reloadApiKey();
|
|
14549
14530
|
if (!key) {
|
|
14550
14531
|
setAuthState("awaiting_api_key_input" /* AwaitingApiKeyInput */);
|
|
@@ -14622,31 +14603,31 @@ function AuthDialog({
|
|
|
14622
14603
|
let items = [
|
|
14623
14604
|
{
|
|
14624
14605
|
label: "Sign in with Google",
|
|
14625
|
-
value:
|
|
14626
|
-
key:
|
|
14606
|
+
value: "oauth-personal" /* LOGIN_WITH_GOOGLE */,
|
|
14607
|
+
key: "oauth-personal" /* LOGIN_WITH_GOOGLE */
|
|
14627
14608
|
},
|
|
14628
14609
|
...process.env["CLOUD_SHELL"] === "true" ? [
|
|
14629
14610
|
{
|
|
14630
14611
|
label: "Use Cloud Shell user credentials",
|
|
14631
|
-
value:
|
|
14632
|
-
key:
|
|
14612
|
+
value: "compute-default-credentials" /* COMPUTE_ADC */,
|
|
14613
|
+
key: "compute-default-credentials" /* COMPUTE_ADC */
|
|
14633
14614
|
}
|
|
14634
14615
|
] : process.env["GEMINI_CLI_USE_COMPUTE_ADC"] === "true" ? [
|
|
14635
14616
|
{
|
|
14636
14617
|
label: "Use metadata server application default credentials",
|
|
14637
|
-
value:
|
|
14638
|
-
key:
|
|
14618
|
+
value: "compute-default-credentials" /* COMPUTE_ADC */,
|
|
14619
|
+
key: "compute-default-credentials" /* COMPUTE_ADC */
|
|
14639
14620
|
}
|
|
14640
14621
|
] : [],
|
|
14641
14622
|
{
|
|
14642
14623
|
label: "Use Gemini API Key",
|
|
14643
|
-
value:
|
|
14644
|
-
key:
|
|
14624
|
+
value: "gemini-api-key" /* USE_GEMINI */,
|
|
14625
|
+
key: "gemini-api-key" /* USE_GEMINI */
|
|
14645
14626
|
},
|
|
14646
14627
|
{
|
|
14647
14628
|
label: "Vertex AI",
|
|
14648
|
-
value:
|
|
14649
|
-
key:
|
|
14629
|
+
value: "vertex-ai" /* USE_VERTEX_AI */,
|
|
14630
|
+
key: "vertex-ai" /* USE_VERTEX_AI */
|
|
14650
14631
|
}
|
|
14651
14632
|
];
|
|
14652
14633
|
if (settings.merged.security.auth.enforcedType) {
|
|
@@ -14668,9 +14649,9 @@ function AuthDialog({
|
|
|
14668
14649
|
return item.value === defaultAuthType;
|
|
14669
14650
|
}
|
|
14670
14651
|
if (process.env["GEMINI_API_KEY"]) {
|
|
14671
|
-
return item.value ===
|
|
14652
|
+
return item.value === "gemini-api-key" /* USE_GEMINI */;
|
|
14672
14653
|
}
|
|
14673
|
-
return item.value ===
|
|
14654
|
+
return item.value === "oauth-personal" /* LOGIN_WITH_GOOGLE */;
|
|
14674
14655
|
});
|
|
14675
14656
|
if (settings.merged.security.auth.enforcedType) {
|
|
14676
14657
|
initialAuthIndex = 0;
|
|
@@ -14681,7 +14662,7 @@ function AuthDialog({
|
|
|
14681
14662
|
return;
|
|
14682
14663
|
}
|
|
14683
14664
|
if (authType) {
|
|
14684
|
-
const needsRestart = authType ===
|
|
14665
|
+
const needsRestart = authType === "oauth-personal" /* LOGIN_WITH_GOOGLE */ || authType === "vertex-ai" /* USE_VERTEX_AI */ && process.env["CLOUD_SHELL"] === "true";
|
|
14685
14666
|
if (needsRestart) {
|
|
14686
14667
|
setAuthContext({ requiresRestart: true });
|
|
14687
14668
|
} else {
|
|
@@ -14689,12 +14670,12 @@ function AuthDialog({
|
|
|
14689
14670
|
}
|
|
14690
14671
|
await clearCachedCredentialFile();
|
|
14691
14672
|
settings.setValue(scope, "security.auth.selectedType", authType);
|
|
14692
|
-
if (authType ===
|
|
14673
|
+
if (authType === "oauth-personal" /* LOGIN_WITH_GOOGLE */ && config.isBrowserLaunchSuppressed()) {
|
|
14693
14674
|
setExiting(true);
|
|
14694
14675
|
setTimeout(relaunchApp, 100);
|
|
14695
14676
|
return;
|
|
14696
14677
|
}
|
|
14697
|
-
if (authType ===
|
|
14678
|
+
if (authType === "gemini-api-key" /* USE_GEMINI */) {
|
|
14698
14679
|
setAuthState("awaiting_api_key_input" /* AwaitingApiKeyInput */);
|
|
14699
14680
|
return;
|
|
14700
14681
|
}
|
|
@@ -15441,11 +15422,11 @@ var PrivacyNoticeText = ({
|
|
|
15441
15422
|
}) => {
|
|
15442
15423
|
const authType = config.getContentGeneratorConfig()?.authType;
|
|
15443
15424
|
switch (authType) {
|
|
15444
|
-
case
|
|
15425
|
+
case "gemini-api-key" /* USE_GEMINI */:
|
|
15445
15426
|
return /* @__PURE__ */ (0, import_jsx_runtime83.jsx)(GeminiPrivacyNotice, { onExit });
|
|
15446
|
-
case
|
|
15427
|
+
case "vertex-ai" /* USE_VERTEX_AI */:
|
|
15447
15428
|
return /* @__PURE__ */ (0, import_jsx_runtime83.jsx)(CloudPaidPrivacyNotice, { onExit });
|
|
15448
|
-
case
|
|
15429
|
+
case "oauth-personal" /* LOGIN_WITH_GOOGLE */:
|
|
15449
15430
|
default:
|
|
15450
15431
|
return /* @__PURE__ */ (0, import_jsx_runtime83.jsx)(CloudFreePrivacyNotice, { config, onExit });
|
|
15451
15432
|
}
|
|
@@ -15486,7 +15467,7 @@ function ProQuotaDialog({
|
|
|
15486
15467
|
value: "retry_always",
|
|
15487
15468
|
key: "retry_always"
|
|
15488
15469
|
},
|
|
15489
|
-
...authType ===
|
|
15470
|
+
...authType === "oauth-personal" /* LOGIN_WITH_GOOGLE */ && !isUltra ? [
|
|
15490
15471
|
{
|
|
15491
15472
|
label: "Upgrade for higher limits",
|
|
15492
15473
|
value: "upgrade",
|
|
@@ -16644,7 +16625,7 @@ function ModelDialog({ onClose }) {
|
|
|
16644
16625
|
const shouldShowPreviewModels = config?.getHasAccessToPreviewModel() ?? false;
|
|
16645
16626
|
const useGemini31 = config?.getGemini31LaunchedSync?.() ?? false;
|
|
16646
16627
|
const selectedAuthType = settings.merged.security.auth.selectedType;
|
|
16647
|
-
const useCustomToolModel = useGemini31 && selectedAuthType ===
|
|
16628
|
+
const useCustomToolModel = useGemini31 && selectedAuthType === "gemini-api-key" /* USE_GEMINI */;
|
|
16648
16629
|
const manualModelSelected = (0, import_react55.useMemo)(() => {
|
|
16649
16630
|
if (config?.getExperimentalDynamicModelConfiguration?.() === true && config.getModelConfigService) {
|
|
16650
16631
|
const def = config.getModelConfigService().getModelDefinition(preferredModel);
|
|
@@ -17962,10 +17943,10 @@ function initializeConsoleStore() {
|
|
|
17962
17943
|
globalConsoleMessages = [];
|
|
17963
17944
|
globalErrorCount = 0;
|
|
17964
17945
|
notifyListeners();
|
|
17965
|
-
coreEvents.off(
|
|
17966
|
-
coreEvents.off(
|
|
17967
|
-
coreEvents.on(
|
|
17968
|
-
coreEvents.on(
|
|
17946
|
+
coreEvents.off("console-log" /* ConsoleLog */, handleConsoleLog);
|
|
17947
|
+
coreEvents.off("output" /* Output */, handleOutput);
|
|
17948
|
+
coreEvents.on("console-log" /* ConsoleLog */, handleConsoleLog);
|
|
17949
|
+
coreEvents.on("output" /* Output */, handleOutput);
|
|
17969
17950
|
}
|
|
17970
17951
|
function notifyListeners() {
|
|
17971
17952
|
for (const listener of listeners) {
|
|
@@ -20102,7 +20083,7 @@ function usePromptCompletion({
|
|
|
20102
20083
|
{ model: "prompt-completion" },
|
|
20103
20084
|
contents,
|
|
20104
20085
|
signal,
|
|
20105
|
-
|
|
20086
|
+
"utility_autocomplete" /* UTILITY_AUTOCOMPLETE */
|
|
20106
20087
|
);
|
|
20107
20088
|
if (signal.aborted) {
|
|
20108
20089
|
return;
|
|
@@ -22180,9 +22161,9 @@ var InputPrompt = ({
|
|
|
22180
22161
|
onSuggestionsVisibilityChange(shouldShowSuggestions);
|
|
22181
22162
|
}
|
|
22182
22163
|
}, [shouldShowSuggestions, onSuggestionsVisibilityChange]);
|
|
22183
|
-
const showAutoAcceptStyling = !shellModeActive && approvalMode ===
|
|
22184
|
-
const showYoloStyling = !shellModeActive && approvalMode ===
|
|
22185
|
-
const showPlanStyling = !shellModeActive && approvalMode ===
|
|
22164
|
+
const showAutoAcceptStyling = !shellModeActive && approvalMode === "autoEdit" /* AUTO_EDIT */;
|
|
22165
|
+
const showYoloStyling = !shellModeActive && approvalMode === "yolo" /* YOLO */;
|
|
22166
|
+
const showPlanStyling = !shellModeActive && approvalMode === "plan" /* PLAN */;
|
|
22186
22167
|
let statusColor;
|
|
22187
22168
|
let statusText = "";
|
|
22188
22169
|
if (shellModeActive) {
|
|
@@ -23014,22 +22995,22 @@ var ApprovalModeIndicator = ({
|
|
|
23014
22995
|
const cycleHint = formatCommand("app.cycleApprovalMode" /* CYCLE_APPROVAL_MODE */);
|
|
23015
22996
|
const yoloHint = formatCommand("app.toggleYolo" /* TOGGLE_YOLO */);
|
|
23016
22997
|
switch (approvalMode) {
|
|
23017
|
-
case
|
|
22998
|
+
case "autoEdit" /* AUTO_EDIT */:
|
|
23018
22999
|
textColor = theme.status.warning;
|
|
23019
23000
|
textContent = "auto-accept edits";
|
|
23020
23001
|
subText = allowPlanMode ? `${cycleHint} to plan` : `${cycleHint} to manual`;
|
|
23021
23002
|
break;
|
|
23022
|
-
case
|
|
23003
|
+
case "plan" /* PLAN */:
|
|
23023
23004
|
textColor = theme.status.success;
|
|
23024
23005
|
textContent = "plan";
|
|
23025
23006
|
subText = `${cycleHint} to manual`;
|
|
23026
23007
|
break;
|
|
23027
|
-
case
|
|
23008
|
+
case "yolo" /* YOLO */:
|
|
23028
23009
|
textColor = theme.status.error;
|
|
23029
23010
|
textContent = "YOLO";
|
|
23030
23011
|
subText = yoloHint;
|
|
23031
23012
|
break;
|
|
23032
|
-
case
|
|
23013
|
+
case "default" /* DEFAULT */:
|
|
23033
23014
|
default:
|
|
23034
23015
|
textColor = theme.text.accent;
|
|
23035
23016
|
textContent = "";
|
|
@@ -23077,7 +23058,7 @@ var useComposerStatus = () => {
|
|
|
23077
23058
|
(item) => item.type === "tool_group"
|
|
23078
23059
|
).some(
|
|
23079
23060
|
(item) => item.tools.some(
|
|
23080
|
-
(tool) => tool.status ===
|
|
23061
|
+
(tool) => tool.status === "awaiting_approval" /* AwaitingApproval */
|
|
23081
23062
|
)
|
|
23082
23063
|
),
|
|
23083
23064
|
[uiState.pendingHistoryItems]
|
|
@@ -23092,13 +23073,13 @@ var useComposerStatus = () => {
|
|
|
23092
23073
|
const hideMinimalModeHintWhileBusy = !uiState.cleanUiDetailsVisible && (showLoadingIndicator || uiState.activeHooks.length > 0);
|
|
23093
23074
|
if (hideMinimalModeHintWhileBusy) return null;
|
|
23094
23075
|
switch (showApprovalModeIndicator) {
|
|
23095
|
-
case
|
|
23076
|
+
case "yolo" /* YOLO */:
|
|
23096
23077
|
return { text: "YOLO", color: theme.status.error };
|
|
23097
|
-
case
|
|
23078
|
+
case "plan" /* PLAN */:
|
|
23098
23079
|
return { text: "plan", color: theme.status.success };
|
|
23099
|
-
case
|
|
23080
|
+
case "autoEdit" /* AUTO_EDIT */:
|
|
23100
23081
|
return { text: "auto edit", color: theme.status.warning };
|
|
23101
|
-
case
|
|
23082
|
+
case "default" /* DEFAULT */:
|
|
23102
23083
|
default:
|
|
23103
23084
|
return null;
|
|
23104
23085
|
}
|
|
@@ -23452,7 +23433,7 @@ var ConfigInitDisplay = ({
|
|
|
23452
23433
|
let connected = 0;
|
|
23453
23434
|
const connecting = [];
|
|
23454
23435
|
for (const [name, client] of clients.entries()) {
|
|
23455
|
-
if (client.getStatus() ===
|
|
23436
|
+
if (client.getStatus() === "connected" /* CONNECTED */) {
|
|
23456
23437
|
connected++;
|
|
23457
23438
|
} else {
|
|
23458
23439
|
connecting.push(name);
|
|
@@ -23474,9 +23455,9 @@ var ConfigInitDisplay = ({
|
|
|
23474
23455
|
);
|
|
23475
23456
|
}
|
|
23476
23457
|
};
|
|
23477
|
-
coreEvents.on(
|
|
23458
|
+
coreEvents.on("mcp-client-update" /* McpClientUpdate */, onChange);
|
|
23478
23459
|
return () => {
|
|
23479
|
-
coreEvents.off(
|
|
23460
|
+
coreEvents.off("mcp-client-update" /* McpClientUpdate */, onChange);
|
|
23480
23461
|
};
|
|
23481
23462
|
}, [initialMessage]);
|
|
23482
23463
|
return /* @__PURE__ */ (0, import_jsx_runtime123.jsx)(Box_default, { marginTop: 1, children: /* @__PURE__ */ (0, import_jsx_runtime123.jsxs)(Text, { children: [
|
|
@@ -24193,7 +24174,7 @@ var useExecutionLifecycle = (addItemToHistory, setPendingHistoryItem, onExec, on
|
|
|
24193
24174
|
callId,
|
|
24194
24175
|
name: SHELL_COMMAND_NAME,
|
|
24195
24176
|
description: rawQuery,
|
|
24196
|
-
status:
|
|
24177
|
+
status: "executing" /* Executing */,
|
|
24197
24178
|
isClientInitiated: true,
|
|
24198
24179
|
resultDisplay: "",
|
|
24199
24180
|
confirmationDetails: void 0
|
|
@@ -24334,7 +24315,7 @@ __code=$?; pwd > ${escapedPwdFilePath}; exit $__code`;
|
|
|
24334
24315
|
mainContent = result.output.trim() || "(Command produced no output)";
|
|
24335
24316
|
}
|
|
24336
24317
|
let finalOutput = result.ansiOutput && result.ansiOutput.length > 0 ? result.ansiOutput : mainContent;
|
|
24337
|
-
let finalStatus =
|
|
24318
|
+
let finalStatus = "success" /* Success */;
|
|
24338
24319
|
const prependToAnsiOutput = (output, text) => {
|
|
24339
24320
|
const newLines = text.split("\n").map((line) => [
|
|
24340
24321
|
{
|
|
@@ -24353,20 +24334,20 @@ __code=$?; pwd > ${escapedPwdFilePath}; exit $__code`;
|
|
|
24353
24334
|
};
|
|
24354
24335
|
let prefix = "";
|
|
24355
24336
|
if (result.error) {
|
|
24356
|
-
finalStatus =
|
|
24337
|
+
finalStatus = "error" /* Error */;
|
|
24357
24338
|
prefix = result.error.message;
|
|
24358
24339
|
} else if (result.aborted) {
|
|
24359
|
-
finalStatus =
|
|
24340
|
+
finalStatus = "cancelled" /* Cancelled */;
|
|
24360
24341
|
prefix = "Command was cancelled.";
|
|
24361
24342
|
} else if (result.backgrounded) {
|
|
24362
|
-
finalStatus =
|
|
24343
|
+
finalStatus = "success" /* Success */;
|
|
24363
24344
|
finalOutput = `Command moved to background (PID: ${result.pid}). Output hidden. Press Ctrl+B to view.`;
|
|
24364
24345
|
mainContent = finalOutput;
|
|
24365
24346
|
} else if (result.signal) {
|
|
24366
|
-
finalStatus =
|
|
24347
|
+
finalStatus = "error" /* Error */;
|
|
24367
24348
|
prefix = `Command terminated by signal: ${result.signal}.`;
|
|
24368
24349
|
} else if (result.exitCode !== 0) {
|
|
24369
|
-
finalStatus =
|
|
24350
|
+
finalStatus = "error" /* Error */;
|
|
24370
24351
|
prefix = `Command exited with code ${result.exitCode}.`;
|
|
24371
24352
|
}
|
|
24372
24353
|
if (prefix) {
|
|
@@ -24392,7 +24373,7 @@ ${mainContent}`;
|
|
|
24392
24373
|
status: finalStatus,
|
|
24393
24374
|
resultDisplay: finalOutput
|
|
24394
24375
|
};
|
|
24395
|
-
if (finalStatus !==
|
|
24376
|
+
if (finalStatus !== "cancelled" /* Cancelled */) {
|
|
24396
24377
|
addItemToHistory(
|
|
24397
24378
|
{
|
|
24398
24379
|
type: "tool_group",
|
|
@@ -25382,7 +25363,7 @@ function useQuotaAndFallback({
|
|
|
25382
25363
|
error.retryDelayMs ? `Access resets at ${getResetTimeMessage(error.retryDelayMs)}.` : null,
|
|
25383
25364
|
`/stats model for usage details`,
|
|
25384
25365
|
`/model to switch models.`,
|
|
25385
|
-
contentGeneratorConfig?.authType ===
|
|
25366
|
+
contentGeneratorConfig?.authType === "oauth-personal" /* LOGIN_WITH_GOOGLE */ ? `/auth to switch to API key.` : null
|
|
25386
25367
|
].filter(Boolean);
|
|
25387
25368
|
message = messageLines.join("\n");
|
|
25388
25369
|
} else if (error instanceof ModelNotFoundError) {
|
|
@@ -25570,7 +25551,7 @@ var useEditorSettings = (loadedSettings, setEditorError, addItem) => {
|
|
|
25570
25551
|
);
|
|
25571
25552
|
setEditorError(null);
|
|
25572
25553
|
setIsEditorDialogOpen(false);
|
|
25573
|
-
coreEvents.emit(
|
|
25554
|
+
coreEvents.emit("editor-selected" /* EditorSelected */, { editor: editorType });
|
|
25574
25555
|
} catch (error) {
|
|
25575
25556
|
setEditorError(`Failed to set editor preference: ${error}`);
|
|
25576
25557
|
}
|
|
@@ -25579,7 +25560,7 @@ var useEditorSettings = (loadedSettings, setEditorError, addItem) => {
|
|
|
25579
25560
|
);
|
|
25580
25561
|
const exitEditorDialog = (0, import_react91.useCallback)(() => {
|
|
25581
25562
|
setIsEditorDialogOpen(false);
|
|
25582
|
-
coreEvents.emit(
|
|
25563
|
+
coreEvents.emit("editor-selected" /* EditorSelected */, { editor: void 0 });
|
|
25583
25564
|
}, []);
|
|
25584
25565
|
return {
|
|
25585
25566
|
isEditorDialogOpen,
|
|
@@ -25956,7 +25937,7 @@ var useSlashCommandProcessor = (config, settings, addItem, clearItems, loadHisto
|
|
|
25956
25937
|
canonicalPath: resolvedCommandPath
|
|
25957
25938
|
} = parseSlashCommand(trimmed, commands);
|
|
25958
25939
|
if (!commandToExecute) {
|
|
25959
|
-
const isMcpLoading = config?.getMcpClientManager()?.getDiscoveryState() ===
|
|
25940
|
+
const isMcpLoading = config?.getMcpClientManager()?.getDiscoveryState() === "in_progress" /* IN_PROGRESS */;
|
|
25960
25941
|
if (isMcpLoading) {
|
|
25961
25942
|
setIsProcessing(true);
|
|
25962
25943
|
if (addToHistory) {
|
|
@@ -26136,7 +26117,7 @@ var useSlashCommandProcessor = (config, settings, addItem, clearItems, loadHisto
|
|
|
26136
26117
|
onConfirm: async (resolvedOutcome) => {
|
|
26137
26118
|
resolve3({
|
|
26138
26119
|
outcome: resolvedOutcome,
|
|
26139
|
-
approvedCommands: resolvedOutcome ===
|
|
26120
|
+
approvedCommands: resolvedOutcome === "cancel" /* Cancel */ ? [] : result.commandsToConfirm
|
|
26140
26121
|
});
|
|
26141
26122
|
}
|
|
26142
26123
|
};
|
|
@@ -26144,7 +26125,7 @@ var useSlashCommandProcessor = (config, settings, addItem, clearItems, loadHisto
|
|
|
26144
26125
|
callId,
|
|
26145
26126
|
name: "Expansion",
|
|
26146
26127
|
description: "Command expansion needs shell access",
|
|
26147
|
-
status:
|
|
26128
|
+
status: "awaiting_approval" /* AwaitingApproval */,
|
|
26148
26129
|
isClientInitiated: true,
|
|
26149
26130
|
resultDisplay: void 0,
|
|
26150
26131
|
confirmationDetails
|
|
@@ -26155,7 +26136,7 @@ var useSlashCommandProcessor = (config, settings, addItem, clearItems, loadHisto
|
|
|
26155
26136
|
});
|
|
26156
26137
|
});
|
|
26157
26138
|
setPendingItem(null);
|
|
26158
|
-
if (outcome ===
|
|
26139
|
+
if (outcome === "cancel" /* Cancel */ || !approvedCommands || approvedCommands.length === 0) {
|
|
26159
26140
|
addItem(
|
|
26160
26141
|
{
|
|
26161
26142
|
type: "info" /* INFO */,
|
|
@@ -26165,7 +26146,7 @@ var useSlashCommandProcessor = (config, settings, addItem, clearItems, loadHisto
|
|
|
26165
26146
|
);
|
|
26166
26147
|
return { type: "handled" };
|
|
26167
26148
|
}
|
|
26168
|
-
if (outcome ===
|
|
26149
|
+
if (outcome === "proceed_always" /* ProceedAlways */) {
|
|
26169
26150
|
setSessionShellAllowlist(
|
|
26170
26151
|
(prev) => /* @__PURE__ */ new Set([...prev, ...approvedCommands])
|
|
26171
26152
|
);
|
|
@@ -26641,7 +26622,7 @@ function mapToDisplay(toolOrTools, options = {}) {
|
|
|
26641
26622
|
let description;
|
|
26642
26623
|
let renderOutputAsMarkdown = false;
|
|
26643
26624
|
const displayName = call.tool?.displayName ?? call.request.name;
|
|
26644
|
-
if (call.status ===
|
|
26625
|
+
if (call.status === "error" /* Error */) {
|
|
26645
26626
|
description = JSON.stringify(call.request.args);
|
|
26646
26627
|
} else {
|
|
26647
26628
|
description = call.invocation.getDescription();
|
|
@@ -26664,27 +26645,27 @@ function mapToDisplay(toolOrTools, options = {}) {
|
|
|
26664
26645
|
let progress = void 0;
|
|
26665
26646
|
let progressTotal = void 0;
|
|
26666
26647
|
switch (call.status) {
|
|
26667
|
-
case
|
|
26648
|
+
case "success" /* Success */:
|
|
26668
26649
|
resultDisplay = call.response.resultDisplay;
|
|
26669
26650
|
outputFile = call.response.outputFile;
|
|
26670
26651
|
break;
|
|
26671
|
-
case
|
|
26672
|
-
case
|
|
26652
|
+
case "error" /* Error */:
|
|
26653
|
+
case "cancelled" /* Cancelled */:
|
|
26673
26654
|
resultDisplay = call.response.resultDisplay;
|
|
26674
26655
|
break;
|
|
26675
|
-
case
|
|
26656
|
+
case "awaiting_approval" /* AwaitingApproval */:
|
|
26676
26657
|
correlationId = call.correlationId;
|
|
26677
26658
|
confirmationDetails = call.confirmationDetails;
|
|
26678
26659
|
break;
|
|
26679
|
-
case
|
|
26660
|
+
case "executing" /* Executing */:
|
|
26680
26661
|
resultDisplay = call.liveOutput;
|
|
26681
26662
|
ptyId = call.pid;
|
|
26682
26663
|
progressMessage = call.progressMessage;
|
|
26683
26664
|
progress = call.progress;
|
|
26684
26665
|
progressTotal = call.progressTotal;
|
|
26685
26666
|
break;
|
|
26686
|
-
case
|
|
26687
|
-
case
|
|
26667
|
+
case "scheduled" /* Scheduled */:
|
|
26668
|
+
case "validating" /* Validating */:
|
|
26688
26669
|
break;
|
|
26689
26670
|
default: {
|
|
26690
26671
|
const exhaustiveCheck = call;
|
|
@@ -26755,7 +26736,7 @@ function useToolScheduler(onComplete, config, getPreferredEditor) {
|
|
|
26755
26736
|
const handler = (event) => {
|
|
26756
26737
|
const isRoot = event.schedulerId === ROOT_SCHEDULER_ID;
|
|
26757
26738
|
const hasExecuting = event.toolCalls.some(
|
|
26758
|
-
(tc) => tc.status ===
|
|
26739
|
+
(tc) => tc.status === "executing" /* Executing */ || (tc.status === "success" /* Success */ || tc.status === "error" /* Error */) && "tailToolCallRequest" in tc && tc.tailToolCallRequest != null
|
|
26759
26740
|
);
|
|
26760
26741
|
if (hasExecuting) {
|
|
26761
26742
|
setLastToolOutputTime(Date.now());
|
|
@@ -26764,7 +26745,7 @@ function useToolScheduler(onComplete, config, getPreferredEditor) {
|
|
|
26764
26745
|
const prevCalls = prev[event.schedulerId] ?? [];
|
|
26765
26746
|
const prevCallIds = new Set(prevCalls.map((tc) => tc.request.callId));
|
|
26766
26747
|
const filteredToolCalls = isRoot ? event.toolCalls : event.toolCalls.filter(
|
|
26767
|
-
(tc) => tc.status ===
|
|
26748
|
+
(tc) => tc.status === "awaiting_approval" /* AwaitingApproval */ || prevCallIds.has(tc.request.callId)
|
|
26768
26749
|
);
|
|
26769
26750
|
if (!isRoot && filteredToolCalls.length === 0 && prevCalls.length === 0) {
|
|
26770
26751
|
return prev;
|
|
@@ -26776,9 +26757,9 @@ function useToolScheduler(onComplete, config, getPreferredEditor) {
|
|
|
26776
26757
|
};
|
|
26777
26758
|
});
|
|
26778
26759
|
};
|
|
26779
|
-
messageBus.subscribe(
|
|
26760
|
+
messageBus.subscribe("tool-calls-update" /* TOOL_CALLS_UPDATE */, handler);
|
|
26780
26761
|
return () => {
|
|
26781
|
-
messageBus.unsubscribe(
|
|
26762
|
+
messageBus.unsubscribe("tool-calls-update" /* TOOL_CALLS_UPDATE */, handler);
|
|
26782
26763
|
};
|
|
26783
26764
|
}, [messageBus, internalAdaptToolCalls]);
|
|
26784
26765
|
(0, import_react98.useEffect)(() => {
|
|
@@ -26800,9 +26781,9 @@ function useToolScheduler(onComplete, config, getPreferredEditor) {
|
|
|
26800
26781
|
};
|
|
26801
26782
|
});
|
|
26802
26783
|
};
|
|
26803
|
-
messageBus.subscribe(
|
|
26784
|
+
messageBus.subscribe("subagent-activity" /* SUBAGENT_ACTIVITY */, handler);
|
|
26804
26785
|
return () => {
|
|
26805
|
-
messageBus.unsubscribe(
|
|
26786
|
+
messageBus.unsubscribe("subagent-activity" /* SUBAGENT_ACTIVITY */, handler);
|
|
26806
26787
|
};
|
|
26807
26788
|
}, [messageBus]);
|
|
26808
26789
|
const schedule = (0, import_react98.useCallback)(
|
|
@@ -26901,8 +26882,8 @@ function adaptToolCalls(coreCalls, prevTracked) {
|
|
|
26901
26882
|
const prev = prevMap.get(coreCall.request.callId);
|
|
26902
26883
|
const responseSubmittedToGemini = prev?.responseSubmittedToGemini ?? false;
|
|
26903
26884
|
let status = coreCall.status;
|
|
26904
|
-
if ((status ===
|
|
26905
|
-
status =
|
|
26885
|
+
if ((status === "success" /* Success */ || status === "error" /* Error */) && "tailToolCallRequest" in coreCall && coreCall.tailToolCallRequest != null) {
|
|
26886
|
+
status = "executing" /* Executing */;
|
|
26906
26887
|
}
|
|
26907
26888
|
return {
|
|
26908
26889
|
...coreCall,
|
|
@@ -26934,7 +26915,7 @@ function getBackgroundedToolInfo(toolCall) {
|
|
|
26934
26915
|
};
|
|
26935
26916
|
}
|
|
26936
26917
|
function isBackgroundableExecutingToolCall(toolCall) {
|
|
26937
|
-
return toolCall.status ===
|
|
26918
|
+
return toolCall.status === "executing" /* Executing */ && typeof toolCall.pid === "number";
|
|
26938
26919
|
}
|
|
26939
26920
|
function showCitations(settings) {
|
|
26940
26921
|
const enabled = settings.merged.ui.showCitations;
|
|
@@ -26944,14 +26925,14 @@ function showCitations(settings) {
|
|
|
26944
26925
|
return true;
|
|
26945
26926
|
}
|
|
26946
26927
|
function calculateStreamingState(isResponding, toolCalls) {
|
|
26947
|
-
if (toolCalls.some((tc) => tc.status ===
|
|
26928
|
+
if (toolCalls.some((tc) => tc.status === "awaiting_approval" /* AwaitingApproval */)) {
|
|
26948
26929
|
return "waiting_for_confirmation" /* WaitingForConfirmation */;
|
|
26949
26930
|
}
|
|
26950
26931
|
const isAnyToolActive = toolCalls.some((tc) => {
|
|
26951
|
-
if (tc.status ===
|
|
26932
|
+
if (tc.status === "executing" /* Executing */ || tc.status === "scheduled" /* Scheduled */ || tc.status === "validating" /* Validating */) {
|
|
26952
26933
|
return true;
|
|
26953
26934
|
}
|
|
26954
|
-
if (tc.status ===
|
|
26935
|
+
if (tc.status === "success" /* Success */ || tc.status === "error" /* Error */ || tc.status === "cancelled" /* Cancelled */) {
|
|
26955
26936
|
return !tc.responseSubmittedToGemini;
|
|
26956
26937
|
}
|
|
26957
26938
|
return false;
|
|
@@ -26997,9 +26978,9 @@ var useGeminiStream = (geminiClient, history, addItem, config, settings, onDebug
|
|
|
26997
26978
|
}
|
|
26998
26979
|
setRetryStatus(payload);
|
|
26999
26980
|
};
|
|
27000
|
-
coreEvents.on(
|
|
26981
|
+
coreEvents.on("retry-attempt" /* RetryAttempt */, handleRetryAttempt);
|
|
27001
26982
|
return () => {
|
|
27002
|
-
coreEvents.off(
|
|
26983
|
+
coreEvents.off("retry-attempt" /* RetryAttempt */, handleRetryAttempt);
|
|
27003
26984
|
};
|
|
27004
26985
|
}, [isRespondingRef]);
|
|
27005
26986
|
const [
|
|
@@ -27132,12 +27113,12 @@ var useGeminiStream = (geminiClient, history, addItem, config, settings, onDebug
|
|
|
27132
27113
|
const tc = toolCalls[i];
|
|
27133
27114
|
if (pushedToolCallIdsRef.current.has(tc.request.callId)) continue;
|
|
27134
27115
|
if (tc.status === "success" || tc.status === "error" || tc.status === "cancelled") {
|
|
27135
|
-
const isAgent = tc.tool?.kind ===
|
|
27116
|
+
const isAgent = tc.tool?.kind === "agent" /* Agent */;
|
|
27136
27117
|
if (isAgent) {
|
|
27137
27118
|
let contigAgentsComplete = true;
|
|
27138
27119
|
for (let j = i + 1; j < toolCalls.length; j++) {
|
|
27139
27120
|
const nextTc = toolCalls[j];
|
|
27140
|
-
if (nextTc.tool?.kind ===
|
|
27121
|
+
if (nextTc.tool?.kind === "agent" /* Agent */) {
|
|
27141
27122
|
if (nextTc.status !== "success" && nextTc.status !== "error" && nextTc.status !== "cancelled") {
|
|
27142
27123
|
contigAgentsComplete = false;
|
|
27143
27124
|
break;
|
|
@@ -27163,7 +27144,7 @@ var useGeminiStream = (geminiClient, history, addItem, config, settings, onDebug
|
|
|
27163
27144
|
let currentGroup = [];
|
|
27164
27145
|
for (const tc of toolsToPush) {
|
|
27165
27146
|
newPushed.add(tc.request.callId);
|
|
27166
|
-
if (tc.tool?.kind ===
|
|
27147
|
+
if (tc.tool?.kind === "agent" /* Agent */) {
|
|
27167
27148
|
currentGroup.push(tc);
|
|
27168
27149
|
} else {
|
|
27169
27150
|
if (currentGroup.length > 0) {
|
|
@@ -27313,7 +27294,7 @@ var useGeminiStream = (geminiClient, history, addItem, config, settings, onDebug
|
|
|
27313
27294
|
prevActiveShellPtyIdRef.current = activeShellPtyId;
|
|
27314
27295
|
}, [activeShellPtyId, addItem, setIsResponding]);
|
|
27315
27296
|
(0, import_react99.useEffect)(() => {
|
|
27316
|
-
if (config.getApprovalMode() ===
|
|
27297
|
+
if (config.getApprovalMode() === "yolo" /* YOLO */ && streamingState === "idle" /* Idle */) {
|
|
27317
27298
|
const lastUserMessageIndex = history.findLastIndex(
|
|
27318
27299
|
(item) => item.type === "user" /* USER */
|
|
27319
27300
|
);
|
|
@@ -27381,7 +27362,7 @@ var useGeminiStream = (geminiClient, history, addItem, config, settings, onDebug
|
|
|
27381
27362
|
return;
|
|
27382
27363
|
}
|
|
27383
27364
|
const hasActiveTools = toolCalls.some(
|
|
27384
|
-
(tc) => tc.status ===
|
|
27365
|
+
(tc) => tc.status === "executing" /* Executing */ || tc.status === "scheduled" /* Scheduled */ || tc.status === "validating" /* Validating */
|
|
27385
27366
|
);
|
|
27386
27367
|
if (streamingState === "idle" /* Idle */ && !isRespondingRef.current && !hasActiveTools) {
|
|
27387
27368
|
if (clearBuffer) {
|
|
@@ -27408,7 +27389,7 @@ var useGeminiStream = (geminiClient, history, addItem, config, settings, onDebug
|
|
|
27408
27389
|
if (tool.name === SHELL_COMMAND_NAME) {
|
|
27409
27390
|
return {
|
|
27410
27391
|
...tool,
|
|
27411
|
-
status:
|
|
27392
|
+
status: "cancelled" /* Cancelled */,
|
|
27412
27393
|
resultDisplay: tool.resultDisplay
|
|
27413
27394
|
};
|
|
27414
27395
|
}
|
|
@@ -27473,7 +27454,7 @@ var useGeminiStream = (geminiClient, history, addItem, config, settings, onDebug
|
|
|
27473
27454
|
let localQueryToSendToGemini = null;
|
|
27474
27455
|
if (typeof query === "string") {
|
|
27475
27456
|
const trimmedQuery = query.trim();
|
|
27476
|
-
await logger?.logMessage(
|
|
27457
|
+
await logger?.logMessage("user" /* USER */, trimmedQuery);
|
|
27477
27458
|
if (!shellModeActive) {
|
|
27478
27459
|
const slashCommandResult = isSlashCommand(trimmedQuery) ? await handleSlashCommand(trimmedQuery) : false;
|
|
27479
27460
|
if (slashCommandResult) {
|
|
@@ -27629,7 +27610,7 @@ var useGeminiStream = (geminiClient, history, addItem, config, settings, onDebug
|
|
|
27629
27610
|
if (pendingHistoryItemRef.current) {
|
|
27630
27611
|
if (pendingHistoryItemRef.current.type === "tool_group") {
|
|
27631
27612
|
const updatedTools = pendingHistoryItemRef.current.tools.map(
|
|
27632
|
-
(tool) => tool.status ===
|
|
27613
|
+
(tool) => tool.status === "validating" /* Validating */ || tool.status === "scheduled" /* Scheduled */ || tool.status === "awaiting_approval" /* AwaitingApproval */ || tool.status === "executing" /* Executing */ ? { ...tool, status: "cancelled" /* Cancelled */ } : tool
|
|
27633
27614
|
);
|
|
27634
27615
|
const pendingItem = {
|
|
27635
27616
|
...pendingHistoryItemRef.current,
|
|
@@ -27875,15 +27856,15 @@ var useGeminiStream = (geminiClient, history, addItem, config, settings, onDebug
|
|
|
27875
27856
|
let geminiMessageBuffer = "";
|
|
27876
27857
|
const toolCallRequests = [];
|
|
27877
27858
|
for await (const event of stream) {
|
|
27878
|
-
if (event.type !==
|
|
27859
|
+
if (event.type !== "thought" /* Thought */ && thoughtRef.current !== null) {
|
|
27879
27860
|
setThought(null);
|
|
27880
27861
|
}
|
|
27881
27862
|
switch (event.type) {
|
|
27882
|
-
case
|
|
27863
|
+
case "thought" /* Thought */:
|
|
27883
27864
|
setLastGeminiActivityTime(Date.now());
|
|
27884
27865
|
handleThoughtEvent(event.value, userMessageTimestamp);
|
|
27885
27866
|
break;
|
|
27886
|
-
case
|
|
27867
|
+
case "content" /* Content */:
|
|
27887
27868
|
setLastGeminiActivityTime(Date.now());
|
|
27888
27869
|
geminiMessageBuffer = handleContentEvent(
|
|
27889
27870
|
event.value,
|
|
@@ -27891,16 +27872,16 @@ var useGeminiStream = (geminiClient, history, addItem, config, settings, onDebug
|
|
|
27891
27872
|
userMessageTimestamp
|
|
27892
27873
|
);
|
|
27893
27874
|
break;
|
|
27894
|
-
case
|
|
27875
|
+
case "tool_call_request" /* ToolCallRequest */:
|
|
27895
27876
|
toolCallRequests.push(event.value);
|
|
27896
27877
|
break;
|
|
27897
|
-
case
|
|
27878
|
+
case "user_cancelled" /* UserCancelled */:
|
|
27898
27879
|
handleUserCancelledEvent(userMessageTimestamp);
|
|
27899
27880
|
break;
|
|
27900
|
-
case
|
|
27881
|
+
case "error" /* Error */:
|
|
27901
27882
|
handleErrorEvent(event.value, userMessageTimestamp);
|
|
27902
27883
|
break;
|
|
27903
|
-
case
|
|
27884
|
+
case "agent_execution_stopped" /* AgentExecutionStopped */:
|
|
27904
27885
|
handleAgentExecutionStoppedEvent(
|
|
27905
27886
|
event.value.reason,
|
|
27906
27887
|
userMessageTimestamp,
|
|
@@ -27908,7 +27889,7 @@ var useGeminiStream = (geminiClient, history, addItem, config, settings, onDebug
|
|
|
27908
27889
|
event.value.contextCleared
|
|
27909
27890
|
);
|
|
27910
27891
|
break;
|
|
27911
|
-
case
|
|
27892
|
+
case "agent_execution_blocked" /* AgentExecutionBlocked */:
|
|
27912
27893
|
handleAgentExecutionBlockedEvent(
|
|
27913
27894
|
event.value.reason,
|
|
27914
27895
|
userMessageTimestamp,
|
|
@@ -27916,35 +27897,35 @@ var useGeminiStream = (geminiClient, history, addItem, config, settings, onDebug
|
|
|
27916
27897
|
event.value.contextCleared
|
|
27917
27898
|
);
|
|
27918
27899
|
break;
|
|
27919
|
-
case
|
|
27900
|
+
case "chat_compressed" /* ChatCompressed */:
|
|
27920
27901
|
handleChatCompressionEvent(event.value, userMessageTimestamp);
|
|
27921
27902
|
break;
|
|
27922
|
-
case
|
|
27923
|
-
case
|
|
27903
|
+
case "tool_call_confirmation" /* ToolCallConfirmation */:
|
|
27904
|
+
case "tool_call_response" /* ToolCallResponse */:
|
|
27924
27905
|
break;
|
|
27925
|
-
case
|
|
27906
|
+
case "max_session_turns" /* MaxSessionTurns */:
|
|
27926
27907
|
handleMaxSessionTurnsEvent();
|
|
27927
27908
|
break;
|
|
27928
|
-
case
|
|
27909
|
+
case "context_window_will_overflow" /* ContextWindowWillOverflow */:
|
|
27929
27910
|
handleContextWindowWillOverflowEvent(
|
|
27930
27911
|
event.value.estimatedRequestTokenCount,
|
|
27931
27912
|
event.value.remainingTokenCount
|
|
27932
27913
|
);
|
|
27933
27914
|
break;
|
|
27934
|
-
case
|
|
27915
|
+
case "finished" /* Finished */:
|
|
27935
27916
|
handleFinishedEvent(event, userMessageTimestamp);
|
|
27936
27917
|
break;
|
|
27937
|
-
case
|
|
27918
|
+
case "citation" /* Citation */:
|
|
27938
27919
|
handleCitationEvent(event.value, userMessageTimestamp);
|
|
27939
27920
|
break;
|
|
27940
|
-
case
|
|
27921
|
+
case "model_info" /* ModelInfo */:
|
|
27941
27922
|
handleChatModelEvent(event.value, userMessageTimestamp);
|
|
27942
27923
|
break;
|
|
27943
|
-
case
|
|
27924
|
+
case "loop_detected" /* LoopDetected */:
|
|
27944
27925
|
loopDetectedRef.current = true;
|
|
27945
27926
|
break;
|
|
27946
|
-
case
|
|
27947
|
-
case
|
|
27927
|
+
case "retry" /* Retry */:
|
|
27928
|
+
case "invalid_stream" /* InvalidStream */:
|
|
27948
27929
|
break;
|
|
27949
27930
|
default: {
|
|
27950
27931
|
const unreachable = event;
|
|
@@ -27985,7 +27966,7 @@ var useGeminiStream = (geminiClient, history, addItem, config, settings, onDebug
|
|
|
27985
27966
|
const submitQuery = (0, import_react99.useCallback)(
|
|
27986
27967
|
async (query, options, prompt_id) => runInDevTraceSpan(
|
|
27987
27968
|
{
|
|
27988
|
-
operation: options?.isContinuation ?
|
|
27969
|
+
operation: options?.isContinuation ? "system_prompt" /* SystemPrompt */ : "user_prompt" /* UserPrompt */,
|
|
27989
27970
|
sessionId: config.getSessionId()
|
|
27990
27971
|
},
|
|
27991
27972
|
async ({ metadata: spanMetadata }) => {
|
|
@@ -28145,7 +28126,7 @@ var useGeminiStream = (geminiClient, history, addItem, config, settings, onDebug
|
|
|
28145
28126
|
);
|
|
28146
28127
|
const handleApprovalModeChange = (0, import_react99.useCallback)(
|
|
28147
28128
|
async (newApprovalMode) => {
|
|
28148
|
-
if (previousApprovalModeRef.current ===
|
|
28129
|
+
if (previousApprovalModeRef.current === "plan" /* PLAN */ && newApprovalMode !== "plan" /* PLAN */ && streamingState === "idle" /* Idle */) {
|
|
28149
28130
|
if (geminiClient) {
|
|
28150
28131
|
try {
|
|
28151
28132
|
await geminiClient.addHistory({
|
|
@@ -28168,11 +28149,11 @@ var useGeminiStream = (geminiClient, history, addItem, config, settings, onDebug
|
|
|
28168
28149
|
}
|
|
28169
28150
|
}
|
|
28170
28151
|
previousApprovalModeRef.current = newApprovalMode;
|
|
28171
|
-
if (newApprovalMode ===
|
|
28152
|
+
if (newApprovalMode === "yolo" /* YOLO */ || newApprovalMode === "autoEdit" /* AUTO_EDIT */) {
|
|
28172
28153
|
let awaitingApprovalCalls = toolCalls.filter(
|
|
28173
28154
|
(call) => call.status === "awaiting_approval" && !call.request.forcedAsk
|
|
28174
28155
|
);
|
|
28175
|
-
if (newApprovalMode ===
|
|
28156
|
+
if (newApprovalMode === "autoEdit" /* AUTO_EDIT */) {
|
|
28176
28157
|
awaitingApprovalCalls = awaitingApprovalCalls.filter((call) => {
|
|
28177
28158
|
if (EDIT_TOOL_NAMES.has(call.request.name)) {
|
|
28178
28159
|
return true;
|
|
@@ -28188,11 +28169,11 @@ var useGeminiStream = (geminiClient, history, addItem, config, settings, onDebug
|
|
|
28188
28169
|
if (call.correlationId) {
|
|
28189
28170
|
try {
|
|
28190
28171
|
await config.getMessageBus().publish({
|
|
28191
|
-
type:
|
|
28172
|
+
type: "tool-confirmation-response" /* TOOL_CONFIRMATION_RESPONSE */,
|
|
28192
28173
|
correlationId: call.correlationId,
|
|
28193
28174
|
confirmed: true,
|
|
28194
28175
|
requiresUserConfirmation: false,
|
|
28195
|
-
outcome:
|
|
28176
|
+
outcome: "proceed_once" /* ProceedOnce */
|
|
28196
28177
|
});
|
|
28197
28178
|
} catch (error) {
|
|
28198
28179
|
debugLogger.warn(
|
|
@@ -28261,14 +28242,14 @@ var useGeminiStream = (geminiClient, history, addItem, config, settings, onDebug
|
|
|
28261
28242
|
);
|
|
28262
28243
|
if (isLowErrorVerbosity) {
|
|
28263
28244
|
suppressedToolErrorCountRef.current += geminiTools.filter(
|
|
28264
|
-
(tc) => tc.status ===
|
|
28245
|
+
(tc) => tc.status === "error" /* Error */
|
|
28265
28246
|
).length;
|
|
28266
28247
|
}
|
|
28267
28248
|
if (geminiTools.length === 0) {
|
|
28268
28249
|
return;
|
|
28269
28250
|
}
|
|
28270
28251
|
const stopExecutionTool = geminiTools.find(
|
|
28271
|
-
(tc) => tc.response.errorType ===
|
|
28252
|
+
(tc) => tc.response.errorType === "stop_execution" /* STOP_EXECUTION */
|
|
28272
28253
|
);
|
|
28273
28254
|
if (stopExecutionTool && stopExecutionTool.response.error) {
|
|
28274
28255
|
maybeAddSuppressedToolErrorNote();
|
|
@@ -28288,9 +28269,9 @@ var useGeminiStream = (geminiClient, history, addItem, config, settings, onDebug
|
|
|
28288
28269
|
(tc) => !isTopicTool2(tc.request.name)
|
|
28289
28270
|
);
|
|
28290
28271
|
const allDeclinableToolsCancelled = declinableTools.length > 0 && declinableTools.every(
|
|
28291
|
-
(tc) => tc.status ===
|
|
28272
|
+
(tc) => tc.status === "cancelled" /* Cancelled */
|
|
28292
28273
|
);
|
|
28293
|
-
const allToolsCancelled = geminiTools.length > 0 && geminiTools.every((tc) => tc.status ===
|
|
28274
|
+
const allToolsCancelled = geminiTools.length > 0 && geminiTools.every((tc) => tc.status === "cancelled" /* Cancelled */);
|
|
28294
28275
|
if (allDeclinableToolsCancelled || allToolsCancelled) {
|
|
28295
28276
|
if (!turnCancelledRef.current) {
|
|
28296
28277
|
addItem({
|
|
@@ -28370,7 +28351,7 @@ var useGeminiStream = (geminiClient, history, addItem, config, settings, onDebug
|
|
|
28370
28351
|
return;
|
|
28371
28352
|
}
|
|
28372
28353
|
const restorableToolCalls = toolCalls.filter(
|
|
28373
|
-
(toolCall) => EDIT_TOOL_NAMES.has(toolCall.request.name) && toolCall.status ===
|
|
28354
|
+
(toolCall) => EDIT_TOOL_NAMES.has(toolCall.request.name) && toolCall.status === "awaiting_approval" /* AwaitingApproval */
|
|
28374
28355
|
);
|
|
28375
28356
|
if (restorableToolCalls.length > 0) {
|
|
28376
28357
|
if (!gitService) {
|
|
@@ -28593,14 +28574,14 @@ var useAgentStream = ({
|
|
|
28593
28574
|
const displayName = legacyState?.displayName ?? event.name;
|
|
28594
28575
|
const isOutputMarkdown = legacyState?.isOutputMarkdown ?? false;
|
|
28595
28576
|
const desc = legacyState?.description ?? "";
|
|
28596
|
-
const fallbackKind =
|
|
28577
|
+
const fallbackKind = "other" /* Other */;
|
|
28597
28578
|
const newCall = {
|
|
28598
28579
|
callId: event.requestId,
|
|
28599
28580
|
name: displayName,
|
|
28600
28581
|
originalRequestName: event.name,
|
|
28601
28582
|
description: desc,
|
|
28602
28583
|
display: event.display,
|
|
28603
|
-
status:
|
|
28584
|
+
status: "scheduled" /* Scheduled */,
|
|
28604
28585
|
isClientInitiated: false,
|
|
28605
28586
|
renderOutputAsMarkdown: isOutputMarkdown,
|
|
28606
28587
|
kind: legacyState?.kind ?? fallbackKind,
|
|
@@ -28618,10 +28599,10 @@ var useAgentStream = ({
|
|
|
28618
28599
|
const evtStatus = legacyState?.status;
|
|
28619
28600
|
let status = tc.status;
|
|
28620
28601
|
if (evtStatus === "executing")
|
|
28621
|
-
status =
|
|
28622
|
-
else if (evtStatus === "error") status =
|
|
28602
|
+
status = "executing" /* Executing */;
|
|
28603
|
+
else if (evtStatus === "error") status = "error" /* Error */;
|
|
28623
28604
|
else if (evtStatus === "success")
|
|
28624
|
-
status =
|
|
28605
|
+
status = "success" /* Success */;
|
|
28625
28606
|
const display = event.display?.result;
|
|
28626
28607
|
const liveOutput = displayContentToString(display) ?? tc.resultDisplay;
|
|
28627
28608
|
const progressMessage = legacyState?.progressMessage ?? tc.progressMessage;
|
|
@@ -28654,7 +28635,7 @@ var useAgentStream = ({
|
|
|
28654
28635
|
const resultDisplay = displayContentToString(display) ?? tc.resultDisplay;
|
|
28655
28636
|
return {
|
|
28656
28637
|
...tc,
|
|
28657
|
-
status: event.isError ?
|
|
28638
|
+
status: event.isError ? "error" /* Error */ : "success" /* Success */,
|
|
28658
28639
|
display: event.display ? { ...tc.display, ...event.display } : tc.display,
|
|
28659
28640
|
resultDisplay,
|
|
28660
28641
|
outputFile
|
|
@@ -28720,7 +28701,7 @@ var useAgentStream = ({
|
|
|
28720
28701
|
if (!options?.isContinuation) {
|
|
28721
28702
|
if (typeof query === "string") {
|
|
28722
28703
|
addItem({ type: "user" /* USER */, text: query }, timestamp);
|
|
28723
|
-
void logger?.logMessage(
|
|
28704
|
+
void logger?.logMessage("user" /* USER */, query);
|
|
28724
28705
|
}
|
|
28725
28706
|
startNewPrompt();
|
|
28726
28707
|
}
|
|
@@ -30247,9 +30228,9 @@ var useFolderTrust = (settings, onTrustChange, addItem) => {
|
|
|
30247
30228
|
const handleFolderTrustSelect = (0, import_react105.useCallback)(
|
|
30248
30229
|
async (choice) => {
|
|
30249
30230
|
const trustLevelMap = {
|
|
30250
|
-
["trust_folder" /* TRUST_FOLDER */]:
|
|
30251
|
-
["trust_parent" /* TRUST_PARENT */]:
|
|
30252
|
-
["do_not_trust" /* DO_NOT_TRUST */]:
|
|
30231
|
+
["trust_folder" /* TRUST_FOLDER */]: "TRUST_FOLDER" /* TRUST_FOLDER */,
|
|
30232
|
+
["trust_parent" /* TRUST_PARENT */]: "TRUST_PARENT" /* TRUST_PARENT */,
|
|
30233
|
+
["do_not_trust" /* DO_NOT_TRUST */]: "DO_NOT_TRUST" /* DO_NOT_TRUST */
|
|
30253
30234
|
};
|
|
30254
30235
|
const trustLevel = trustLevelMap[choice];
|
|
30255
30236
|
if (!trustLevel) return;
|
|
@@ -30268,7 +30249,7 @@ var useFolderTrust = (settings, onTrustChange, addItem) => {
|
|
|
30268
30249
|
}, 100);
|
|
30269
30250
|
return;
|
|
30270
30251
|
}
|
|
30271
|
-
const currentIsTrusted = trustLevel ===
|
|
30252
|
+
const currentIsTrusted = trustLevel === "TRUST_FOLDER" /* TRUST_FOLDER */ || trustLevel === "TRUST_PARENT" /* TRUST_PARENT */;
|
|
30272
30253
|
onTrustChange(currentIsTrusted);
|
|
30273
30254
|
setIsTrusted(currentIsTrusted);
|
|
30274
30255
|
const wasTrusted = isTrusted ?? false;
|
|
@@ -31276,7 +31257,7 @@ function useMessageQueue({
|
|
|
31276
31257
|
var import_react107 = __toESM(require_react(), 1);
|
|
31277
31258
|
function useMcpStatus(config) {
|
|
31278
31259
|
const [discoveryState, setDiscoveryState] = (0, import_react107.useState)(
|
|
31279
|
-
() => config.getMcpClientManager()?.getDiscoveryState() ??
|
|
31260
|
+
() => config.getMcpClientManager()?.getDiscoveryState() ?? "not_started" /* NOT_STARTED */
|
|
31280
31261
|
);
|
|
31281
31262
|
const [mcpServerCount, setMcpServerCount] = (0, import_react107.useState)(
|
|
31282
31263
|
() => config.getMcpClientManager()?.getMcpServerCount() ?? 0
|
|
@@ -31289,12 +31270,12 @@ function useMcpStatus(config) {
|
|
|
31289
31270
|
setMcpServerCount(manager.getMcpServerCount());
|
|
31290
31271
|
}
|
|
31291
31272
|
};
|
|
31292
|
-
coreEvents.on(
|
|
31273
|
+
coreEvents.on("mcp-client-update" /* McpClientUpdate */, onChange);
|
|
31293
31274
|
return () => {
|
|
31294
|
-
coreEvents.off(
|
|
31275
|
+
coreEvents.off("mcp-client-update" /* McpClientUpdate */, onChange);
|
|
31295
31276
|
};
|
|
31296
31277
|
}, [config]);
|
|
31297
|
-
const isMcpReady = discoveryState ===
|
|
31278
|
+
const isMcpReady = discoveryState === "completed" /* COMPLETED */ || discoveryState === "not_started" /* NOT_STARTED */ && mcpServerCount === 0;
|
|
31298
31279
|
return {
|
|
31299
31280
|
discoveryState,
|
|
31300
31281
|
mcpServerCount,
|
|
@@ -31321,7 +31302,7 @@ function useApprovalModeIndicator({
|
|
|
31321
31302
|
(key) => {
|
|
31322
31303
|
let nextApprovalMode;
|
|
31323
31304
|
if (keyMatchers["app.toggleYolo" /* TOGGLE_YOLO */](key)) {
|
|
31324
|
-
if (config.isYoloModeDisabled() && config.getApprovalMode() !==
|
|
31305
|
+
if (config.isYoloModeDisabled() && config.getApprovalMode() !== "yolo" /* YOLO */) {
|
|
31325
31306
|
if (addItem) {
|
|
31326
31307
|
let text = "You cannot enter YOLO mode since it is disabled in your settings.";
|
|
31327
31308
|
const adminSettings = config.getRemoteAdminSettings();
|
|
@@ -31339,21 +31320,21 @@ function useApprovalModeIndicator({
|
|
|
31339
31320
|
}
|
|
31340
31321
|
return;
|
|
31341
31322
|
}
|
|
31342
|
-
nextApprovalMode = config.getApprovalMode() ===
|
|
31323
|
+
nextApprovalMode = config.getApprovalMode() === "yolo" /* YOLO */ ? "default" /* DEFAULT */ : "yolo" /* YOLO */;
|
|
31343
31324
|
} else if (keyMatchers["app.cycleApprovalMode" /* CYCLE_APPROVAL_MODE */](key)) {
|
|
31344
31325
|
const currentMode = config.getApprovalMode();
|
|
31345
31326
|
switch (currentMode) {
|
|
31346
|
-
case
|
|
31347
|
-
nextApprovalMode =
|
|
31327
|
+
case "default" /* DEFAULT */:
|
|
31328
|
+
nextApprovalMode = "autoEdit" /* AUTO_EDIT */;
|
|
31348
31329
|
break;
|
|
31349
|
-
case
|
|
31350
|
-
nextApprovalMode = allowPlanMode ?
|
|
31330
|
+
case "autoEdit" /* AUTO_EDIT */:
|
|
31331
|
+
nextApprovalMode = allowPlanMode ? "plan" /* PLAN */ : "default" /* DEFAULT */;
|
|
31351
31332
|
break;
|
|
31352
|
-
case
|
|
31353
|
-
nextApprovalMode =
|
|
31333
|
+
case "plan" /* PLAN */:
|
|
31334
|
+
nextApprovalMode = "default" /* DEFAULT */;
|
|
31354
31335
|
break;
|
|
31355
|
-
case
|
|
31356
|
-
nextApprovalMode =
|
|
31336
|
+
case "yolo" /* YOLO */:
|
|
31337
|
+
nextApprovalMode = "autoEdit" /* AUTO_EDIT */;
|
|
31357
31338
|
break;
|
|
31358
31339
|
default:
|
|
31359
31340
|
}
|
|
@@ -31763,11 +31744,11 @@ var useHookDisplayState = () => {
|
|
|
31763
31744
|
removeHook();
|
|
31764
31745
|
}
|
|
31765
31746
|
};
|
|
31766
|
-
coreEvents.on(
|
|
31767
|
-
coreEvents.on(
|
|
31747
|
+
coreEvents.on("hook-start" /* HookStart */, handleHookStart);
|
|
31748
|
+
coreEvents.on("hook-end" /* HookEnd */, handleHookEnd);
|
|
31768
31749
|
return () => {
|
|
31769
|
-
coreEvents.off(
|
|
31770
|
-
coreEvents.off(
|
|
31750
|
+
coreEvents.off("hook-start" /* HookStart */, handleHookStart);
|
|
31751
|
+
coreEvents.off("hook-end" /* HookEnd */, handleHookEnd);
|
|
31771
31752
|
activeTimeouts.forEach(clearTimeout);
|
|
31772
31753
|
activeTimeouts.clear();
|
|
31773
31754
|
};
|
|
@@ -32606,7 +32587,7 @@ var AppContainer = (props) => {
|
|
|
32606
32587
|
setConfigInitialized(true);
|
|
32607
32588
|
startupProfiler.flush(config);
|
|
32608
32589
|
startAutoMemoryIfEnabled(config);
|
|
32609
|
-
const sessionStartSource = resumedSessionData ?
|
|
32590
|
+
const sessionStartSource = resumedSessionData ? "resume" /* Resume */ : "startup" /* Startup */;
|
|
32610
32591
|
const result = await config.getHookSystem()?.fireSessionStartEvent(sessionStartSource);
|
|
32611
32592
|
if (result) {
|
|
32612
32593
|
const additionalContext = result.getAdditionalContext();
|
|
@@ -32633,7 +32614,7 @@ var AppContainer = (props) => {
|
|
|
32633
32614
|
);
|
|
32634
32615
|
const ideClient = await IdeClient.getInstance();
|
|
32635
32616
|
await ideClient.disconnect();
|
|
32636
|
-
await config?.getHookSystem()?.fireSessionEndEvent(
|
|
32617
|
+
await config?.getHookSystem()?.fireSessionEndEvent("exit" /* Exit */);
|
|
32637
32618
|
};
|
|
32638
32619
|
registerCleanup(cleanupFn);
|
|
32639
32620
|
return () => {
|
|
@@ -32658,11 +32639,11 @@ var AppContainer = (props) => {
|
|
|
32658
32639
|
resetTime: payload.resetTime
|
|
32659
32640
|
});
|
|
32660
32641
|
};
|
|
32661
|
-
coreEvents.on(
|
|
32662
|
-
coreEvents.on(
|
|
32642
|
+
coreEvents.on("model-changed" /* ModelChanged */, handleModelChanged);
|
|
32643
|
+
coreEvents.on("quota-changed" /* QuotaChanged */, handleQuotaChanged);
|
|
32663
32644
|
return () => {
|
|
32664
|
-
coreEvents.off(
|
|
32665
|
-
coreEvents.off(
|
|
32645
|
+
coreEvents.off("model-changed" /* ModelChanged */, handleModelChanged);
|
|
32646
|
+
coreEvents.off("quota-changed" /* QuotaChanged */, handleQuotaChanged);
|
|
32666
32647
|
};
|
|
32667
32648
|
}, [config]);
|
|
32668
32649
|
(0, import_react121.useEffect)(() => {
|
|
@@ -32675,16 +32656,16 @@ var AppContainer = (props) => {
|
|
|
32675
32656
|
const handleAgentsDiscovered = (payload) => {
|
|
32676
32657
|
setNewAgents(payload.agents);
|
|
32677
32658
|
};
|
|
32678
|
-
coreEvents.on(
|
|
32679
|
-
coreEvents.on(
|
|
32680
|
-
coreEvents.on(
|
|
32659
|
+
coreEvents.on("settings-changed" /* SettingsChanged */, handleSettingsChanged);
|
|
32660
|
+
coreEvents.on("admin-settings-changed" /* AdminSettingsChanged */, handleAdminSettingsChanged);
|
|
32661
|
+
coreEvents.on("agents-discovered" /* AgentsDiscovered */, handleAgentsDiscovered);
|
|
32681
32662
|
return () => {
|
|
32682
|
-
coreEvents.off(
|
|
32663
|
+
coreEvents.off("settings-changed" /* SettingsChanged */, handleSettingsChanged);
|
|
32683
32664
|
coreEvents.off(
|
|
32684
|
-
|
|
32665
|
+
"admin-settings-changed" /* AdminSettingsChanged */,
|
|
32685
32666
|
handleAdminSettingsChanged
|
|
32686
32667
|
);
|
|
32687
|
-
coreEvents.off(
|
|
32668
|
+
coreEvents.off("agents-discovered" /* AgentsDiscovered */, handleAgentsDiscovered);
|
|
32688
32669
|
};
|
|
32689
32670
|
}, [settings]);
|
|
32690
32671
|
const { errorCount, clearErrorCount } = useErrorCount();
|
|
@@ -32749,11 +32730,11 @@ var AppContainer = (props) => {
|
|
|
32749
32730
|
exitEditorDialog
|
|
32750
32731
|
} = useEditorSettings(settings, setEditorError, historyManager.addItem);
|
|
32751
32732
|
(0, import_react121.useEffect)(() => {
|
|
32752
|
-
coreEvents.on(
|
|
32753
|
-
coreEvents.on(
|
|
32733
|
+
coreEvents.on("external-editor-closed" /* ExternalEditorClosed */, handleEditorClose);
|
|
32734
|
+
coreEvents.on("request-editor-selection" /* RequestEditorSelection */, openEditorDialog);
|
|
32754
32735
|
return () => {
|
|
32755
|
-
coreEvents.off(
|
|
32756
|
-
coreEvents.off(
|
|
32736
|
+
coreEvents.off("external-editor-closed" /* ExternalEditorClosed */, handleEditorClose);
|
|
32737
|
+
coreEvents.off("request-editor-selection" /* RequestEditorSelection */, openEditorDialog);
|
|
32757
32738
|
};
|
|
32758
32739
|
}, [handleEditorClose, openEditorDialog]);
|
|
32759
32740
|
(0, import_react121.useEffect)(() => {
|
|
@@ -32821,7 +32802,7 @@ var AppContainer = (props) => {
|
|
|
32821
32802
|
errorVerbosity: settings.merged.ui.errorVerbosity
|
|
32822
32803
|
});
|
|
32823
32804
|
const isAuthDialogOpen = authState === "updating" /* Updating */;
|
|
32824
|
-
const isAuthenticating = authState === "unauthenticated" /* Unauthenticated */ && settings.merged.security.auth.selectedType !==
|
|
32805
|
+
const isAuthenticating = authState === "unauthenticated" /* Unauthenticated */ && settings.merged.security.auth.selectedType !== "gemini-api-key" /* USE_GEMINI */;
|
|
32825
32806
|
const isGeminiClientInitialized = config.getGeminiClient()?.isInitialized();
|
|
32826
32807
|
const { loadHistoryForResume, isResuming } = useSessionResume({
|
|
32827
32808
|
config,
|
|
@@ -32849,7 +32830,7 @@ var AppContainer = (props) => {
|
|
|
32849
32830
|
async (authType, scope) => {
|
|
32850
32831
|
if (authType) {
|
|
32851
32832
|
const previousAuthType = config.getContentGeneratorConfig()?.authType ?? "unknown";
|
|
32852
|
-
if (authType ===
|
|
32833
|
+
if (authType === "oauth-personal" /* LOGIN_WITH_GOOGLE */) {
|
|
32853
32834
|
setAuthContext({ requiresRestart: true });
|
|
32854
32835
|
} else {
|
|
32855
32836
|
setAuthContext({});
|
|
@@ -32877,7 +32858,7 @@ var AppContainer = (props) => {
|
|
|
32877
32858
|
);
|
|
32878
32859
|
return;
|
|
32879
32860
|
}
|
|
32880
|
-
if (authType ===
|
|
32861
|
+
if (authType === "oauth-personal" /* LOGIN_WITH_GOOGLE */ && config.isBrowserLaunchSuppressed()) {
|
|
32881
32862
|
writeToStdout(`
|
|
32882
32863
|
----------------------------------------------------------------
|
|
32883
32864
|
Logging in with Google... Restarting Gemini CLI to continue.
|
|
@@ -32900,7 +32881,7 @@ Logging in with Google... Restarting Gemini CLI to continue.
|
|
|
32900
32881
|
}
|
|
32901
32882
|
await saveApiKey(apiKey);
|
|
32902
32883
|
await reloadApiKey();
|
|
32903
|
-
await config.refreshAuth(
|
|
32884
|
+
await config.refreshAuth("gemini-api-key" /* USE_GEMINI */);
|
|
32904
32885
|
setAuthState("authenticated" /* Authenticated */);
|
|
32905
32886
|
} catch (e) {
|
|
32906
32887
|
onAuthError(
|
|
@@ -32925,7 +32906,7 @@ Logging in with Google... Restarting Gemini CLI to continue.
|
|
|
32925
32906
|
`Authentication is enforced to be ${settings.merged.security.auth.enforcedType}, but you are currently using ${settings.merged.security.auth.selectedType}.`
|
|
32926
32907
|
);
|
|
32927
32908
|
} else if (settings.merged.security.auth.selectedType && !settings.merged.security.auth.useExternal) {
|
|
32928
|
-
if (settings.merged.security.auth.selectedType ===
|
|
32909
|
+
if (settings.merged.security.auth.selectedType === "gemini-api-key" /* USE_GEMINI */) {
|
|
32929
32910
|
return;
|
|
32930
32911
|
}
|
|
32931
32912
|
const authMethod = settings.merged.security.auth.selectedType;
|
|
@@ -33061,9 +33042,9 @@ Logging in with Google... Restarting Gemini CLI to continue.
|
|
|
33061
33042
|
}
|
|
33062
33043
|
});
|
|
33063
33044
|
};
|
|
33064
|
-
coreEvents.on(
|
|
33045
|
+
coreEvents.on("consent-request" /* ConsentRequest */, handleConsentRequest);
|
|
33065
33046
|
return () => {
|
|
33066
|
-
coreEvents.off(
|
|
33047
|
+
coreEvents.off("consent-request" /* ConsentRequest */, handleConsentRequest);
|
|
33067
33048
|
};
|
|
33068
33049
|
}, []);
|
|
33069
33050
|
const performMemoryRefresh = (0, import_react121.useCallback)(async () => {
|
|
@@ -33721,7 +33702,7 @@ ${queuedText}` : queuedText;
|
|
|
33721
33702
|
if (keyMatchers["app.showErrorDetails" /* SHOW_ERROR_DETAILS */](key)) {
|
|
33722
33703
|
if (settings.merged.general.devtools) {
|
|
33723
33704
|
void (async () => {
|
|
33724
|
-
const { toggleDevToolsPanel } = await import("./devtoolsService-
|
|
33705
|
+
const { toggleDevToolsPanel } = await import("./devtoolsService-F7PHNBEQ.js");
|
|
33725
33706
|
await toggleDevToolsPanel(
|
|
33726
33707
|
config,
|
|
33727
33708
|
showErrorDetails,
|
|
@@ -33939,17 +33920,17 @@ ${queuedText}` : queuedText;
|
|
|
33939
33920
|
Date.now()
|
|
33940
33921
|
);
|
|
33941
33922
|
};
|
|
33942
|
-
coreEvents.on(
|
|
33943
|
-
coreEvents.on(
|
|
33923
|
+
coreEvents.on("user-feedback" /* UserFeedback */, handleUserFeedback);
|
|
33924
|
+
coreEvents.on("hook-system-message" /* HookSystemMessage */, handleHookSystemMessage);
|
|
33944
33925
|
coreEvents.drainBacklogs();
|
|
33945
33926
|
return () => {
|
|
33946
|
-
coreEvents.off(
|
|
33947
|
-
coreEvents.off(
|
|
33927
|
+
coreEvents.off("user-feedback" /* UserFeedback */, handleUserFeedback);
|
|
33928
|
+
coreEvents.off("hook-system-message" /* HookSystemMessage */, handleHookSystemMessage);
|
|
33948
33929
|
};
|
|
33949
33930
|
}, [historyManager]);
|
|
33950
33931
|
const nightly = props.version.includes("nightly");
|
|
33951
33932
|
const isAwaitingLoginRestart = authState === "awaiting_login_restart" /* AwaitingLoginRestart */;
|
|
33952
|
-
const loginRestartMessage = settings.merged.security.auth.selectedType ===
|
|
33933
|
+
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;
|
|
33953
33934
|
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;
|
|
33954
33935
|
const hasPendingToolConfirmation = (0, import_react121.useMemo)(
|
|
33955
33936
|
() => isToolAwaitingConfirmation(pendingHistoryItems),
|
|
@@ -34049,9 +34030,9 @@ ${queuedText}` : queuedText;
|
|
|
34049
34030
|
const handleMemoryChanged = (result) => {
|
|
34050
34031
|
setGeminiMdFileCount(result.fileCount);
|
|
34051
34032
|
};
|
|
34052
|
-
coreEvents.on(
|
|
34033
|
+
coreEvents.on("memory-changed" /* MemoryChanged */, handleMemoryChanged);
|
|
34053
34034
|
return () => {
|
|
34054
|
-
coreEvents.off(
|
|
34035
|
+
coreEvents.off("memory-changed" /* MemoryChanged */, handleMemoryChanged);
|
|
34055
34036
|
};
|
|
34056
34037
|
}, []);
|
|
34057
34038
|
(0, import_react121.useEffect)(() => {
|