@google/gemini-cli 0.61.0-preview.1 → 0.61.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-LZGP7KFI.js → chunk-2YTYPKEZ.js} +1 -1
- package/bundle/{chunk-4YQFFXRN.js → chunk-3BON7LO7.js} +1 -1
- package/bundle/{chunk-BHKACUMI.js → chunk-3YIQF3FY.js} +3 -3
- package/bundle/{chunk-MNBKYFEY.js → chunk-4DKTUBCF.js} +8 -9
- package/bundle/{chunk-MXQQJJNZ.js → chunk-4GP6HFBO.js} +7 -7
- package/bundle/{chunk-VSZD56FP.js → chunk-55E6VPR2.js} +54 -67
- package/bundle/{chunk-X63OLHR4.js → chunk-5FZXKDXH.js} +4 -4
- package/bundle/{chunk-O4KOWLVM.js → chunk-5V744PDA.js} +1 -1
- package/bundle/{chunk-BFB2YEJY.js → chunk-75COGLDC.js} +1 -1
- package/bundle/{chunk-PBNOO4UX.js → chunk-AMOGWHKC.js} +1 -1
- package/bundle/{chunk-TFQNPQHU.js → chunk-BS3JDRJQ.js} +1 -1
- package/bundle/{chunk-4D7PRDBS.js → chunk-DWY2O4BN.js} +1 -1
- package/bundle/{chunk-UEKG6P2N.js → chunk-DZZAUXYI.js} +5 -8
- package/bundle/{chunk-EM2O5AOZ.js → chunk-FJCIWVRV.js} +3 -3
- package/bundle/{chunk-KXVODVLE.js → chunk-HPLZM7PQ.js} +7 -7
- package/bundle/{chunk-HDPU5WOJ.js → chunk-JDPZ4CE3.js} +4 -4
- package/bundle/{chunk-GOOJJ7ZQ.js → chunk-RWXT3CQ6.js} +1 -1
- package/bundle/{chunk-OTWH6H2T.js → chunk-S2Z77X3K.js} +2 -2
- package/bundle/{chunk-FSZD7V6N.js → chunk-S7IITRXI.js} +2 -2
- package/bundle/{chunk-EUZJSBKR.js → chunk-TQ3FGGPE.js} +1 -1
- package/bundle/{chunk-SABJGE2G.js → chunk-VT3MBDD3.js} +3 -3
- package/bundle/{chunk-YD7YFB3H.js → chunk-W766PNZK.js} +2 -2
- package/bundle/{chunk-NQXTLK5U.js → chunk-Y2J3C62M.js} +14630 -7763
- package/bundle/{chunk-34PFYALD.js → chunk-YKD74FOF.js} +1 -1
- package/bundle/{cleanup-DGDWVDXX.js → cleanup-KRMS36ET.js} +2 -2
- package/bundle/{cleanup-ILJI4AEW.js → cleanup-PWFFQ2ZF.js} +2 -2
- package/bundle/{cleanup-QW4EQ3QR.js → cleanup-XO3PUOXN.js} +2 -2
- package/bundle/{core-HFCJBVEU.js → core-4U3AXZ3Y.js} +1 -1
- package/bundle/{dist-2BSGBE32.js → core-BYHFA5QC.js} +1 -1
- package/bundle/{devtoolsService-KXJDH42U.js → devtoolsService-4LLMXKZ3.js} +2 -2
- package/bundle/{devtoolsService-LWSF6JIT.js → devtoolsService-JTGAYMK3.js} +2 -2
- package/bundle/{devtoolsService-N3A5BSJN.js → devtoolsService-KPCAEWJX.js} +3 -4
- package/bundle/{dist-6YQ35ICZ.js → dist-3UYXETJU.js} +1 -1
- package/bundle/{gemini-ATQ3WGVL.js → gemini-3HFX2LNT.js} +14 -14
- package/bundle/{gemini-5UNXMZT3.js → gemini-4IF7D7UG.js} +198 -214
- package/bundle/{gemini-G7D5KPQ2.js → gemini-NPCD6A4N.js} +14 -14
- package/bundle/gemini.js +7 -7
- package/bundle/{interactiveCli-WC6IXMOE.js → interactiveCli-4ZJLSCID.js} +8 -8
- package/bundle/{interactiveCli-EAB7PSHJ.js → interactiveCli-F3TDVF3E.js} +296 -315
- package/bundle/{interactiveCli-JYJNFC5D.js → interactiveCli-TRXNUIPM.js} +8 -8
- package/bundle/{liteRtServerManager-27LLIZ3H.js → liteRtServerManager-C5EQRV4O.js} +4 -4
- package/bundle/{liteRtServerManager-HB6JSWYM.js → liteRtServerManager-LQNV6EK2.js} +4 -4
- package/bundle/{liteRtServerManager-NSPOA7KV.js → liteRtServerManager-T6NSUQ7G.js} +4 -4
- package/bundle/{oauth2-provider-5CXK7KFQ.js → oauth2-provider-B67V2HIE.js} +1 -1
- package/bundle/{oauth2-provider-N7JBWITO.js → oauth2-provider-CIEE5U5B.js} +72 -38
- package/bundle/{oauth2-provider-FYIOQREN.js → oauth2-provider-UXWR2XFY.js} +1 -1
- package/bundle/{start-4CI64D6Q.js → start-4GM5UE3J.js} +6 -6
- package/bundle/{start-MHS6EQUA.js → start-7IHG7KRC.js} +6 -6
- package/bundle/{start-OO24SR5D.js → start-FBWB5XJU.js} +6 -6
- package/package.json +1 -1
- package/bundle/chunk-7HAUMOMS.js +0 -102678
- package/bundle/chunk-H6SLDOAI.js +0 -398
- package/bundle/chunk-JKUZ4FYJ.js +0 -154
- package/bundle/chunk-NXDIRTLT.js +0 -512
- package/bundle/chunk-OO7JC2QX.js +0 -399635
- package/bundle/chunk-UST2ZL7P.js +0 -1571
- package/bundle/chunk-ZAUQFML4.js +0 -118
- package/bundle/chunk-ZXK7SZMG.js +0 -17368
- package/bundle/cleanup-R6YFTONK.js +0 -32
- package/bundle/devtoolsService-N4LL6WGD.js +0 -4359
- package/bundle/dist-C4IKSTQN.js +0 -2232
- package/bundle/gemini-RWMUQAJ6.js +0 -17764
- package/bundle/interactiveCli-KQPTYHND.js +0 -35029
- package/bundle/liteRtServerManager-WXCFUD52.js +0 -65
- package/bundle/oauth2-provider-Z7WSYKBF.js +0 -235
- package/bundle/start-WRVCTB7Z.js +0 -18
|
@@ -158,10 +158,10 @@ import {
|
|
|
158
158
|
widestLineFromStyledChars,
|
|
159
159
|
wordBreakStyledChars,
|
|
160
160
|
wrapStyledChars
|
|
161
|
-
} from "./chunk-
|
|
161
|
+
} from "./chunk-4GP6HFBO.js";
|
|
162
162
|
import {
|
|
163
163
|
require_source
|
|
164
|
-
} from "./chunk-
|
|
164
|
+
} from "./chunk-TQ3FGGPE.js";
|
|
165
165
|
import {
|
|
166
166
|
appEvents
|
|
167
167
|
} from "./chunk-5PS3AYFU.js";
|
|
@@ -215,37 +215,33 @@ import {
|
|
|
215
215
|
stripAnsi,
|
|
216
216
|
stripUnsafeCharacters,
|
|
217
217
|
toCodePoints
|
|
218
|
-
} from "./chunk-
|
|
218
|
+
} from "./chunk-DZZAUXYI.js";
|
|
219
219
|
import {
|
|
220
220
|
handleAutoUpdate,
|
|
221
221
|
isDevelopment,
|
|
222
222
|
relaunchApp,
|
|
223
223
|
setUpdateHandler
|
|
224
|
-
} from "./chunk-
|
|
224
|
+
} from "./chunk-S2Z77X3K.js";
|
|
225
225
|
import {
|
|
226
226
|
isTodoList,
|
|
227
227
|
mapCoreStatusToDisplayStatus,
|
|
228
228
|
require_react
|
|
229
|
-
} from "./chunk-
|
|
229
|
+
} from "./chunk-4DKTUBCF.js";
|
|
230
230
|
import {
|
|
231
231
|
registerCleanup,
|
|
232
232
|
removeCleanup,
|
|
233
233
|
runExitCleanup,
|
|
234
234
|
setupTtyCheck
|
|
235
|
-
} from "./chunk-
|
|
235
|
+
} from "./chunk-AMOGWHKC.js";
|
|
236
236
|
import {
|
|
237
237
|
ACTIVATE_SKILL_TOOL_NAME,
|
|
238
238
|
AGENT_TOOL_NAME,
|
|
239
239
|
ApiKeyUpdatedEvent,
|
|
240
|
-
ApprovalMode,
|
|
241
240
|
AsyncFzf,
|
|
242
241
|
AudioRecorder,
|
|
243
242
|
AuthType,
|
|
244
243
|
ChangeAuthRequestedError,
|
|
245
|
-
CompressionStatus,
|
|
246
244
|
ConversationFinishedEvent,
|
|
247
|
-
CoreEvent,
|
|
248
|
-
CoreToolCallStatus,
|
|
249
245
|
CreditPurchaseClickEvent,
|
|
250
246
|
DEFAULT_GEMINI_FLASH_LITE_MODEL,
|
|
251
247
|
DEFAULT_GEMINI_FLASH_MODEL,
|
|
@@ -267,20 +263,13 @@ import {
|
|
|
267
263
|
GEMMA_4_31B_IT_MODEL,
|
|
268
264
|
GLOB_DISPLAY_NAME,
|
|
269
265
|
GREP_DISPLAY_NAME,
|
|
270
|
-
GeminiCliOperation,
|
|
271
|
-
GeminiEventType,
|
|
272
266
|
GitService,
|
|
273
267
|
IdeClient,
|
|
274
|
-
Kind,
|
|
275
268
|
LS_DISPLAY_NAME,
|
|
276
269
|
LegacyAgentProtocol,
|
|
277
270
|
LlmRole,
|
|
278
271
|
Logger,
|
|
279
272
|
MAX_TOKENS_EXCEEDED_SUGGESTION,
|
|
280
|
-
MCPDiscoveryState,
|
|
281
|
-
MCPServerStatus,
|
|
282
|
-
MessageBusType,
|
|
283
|
-
MessageSenderType,
|
|
284
273
|
ModelNotFoundError,
|
|
285
274
|
ModelSlashCommandEvent,
|
|
286
275
|
OTHER_BLOCKED_MESSAGE,
|
|
@@ -293,7 +282,6 @@ import {
|
|
|
293
282
|
PREVIEW_GEMINI_MODEL,
|
|
294
283
|
PolicyIntegrityManager,
|
|
295
284
|
ProjectIdRequiredError,
|
|
296
|
-
QuestionType,
|
|
297
285
|
READ_FILE_DISPLAY_NAME,
|
|
298
286
|
READ_MANY_FILES_DISPLAY_NAME,
|
|
299
287
|
RECITATION_BLOCKED_MESSAGE,
|
|
@@ -302,22 +290,16 @@ import {
|
|
|
302
290
|
SAFETY_BLOCKED_MESSAGE,
|
|
303
291
|
SHELL_TOOL_NAME,
|
|
304
292
|
Scheduler,
|
|
305
|
-
SessionEndReason,
|
|
306
|
-
SessionStartSource,
|
|
307
293
|
ShellExecutionService,
|
|
308
294
|
SlashCommandStatus,
|
|
309
295
|
Storage,
|
|
310
|
-
SubagentState,
|
|
311
296
|
THINKING_ONLY_COMPRESS_SUGGESTION,
|
|
312
297
|
TOPIC_PARAM_STRATEGIC_INTENT,
|
|
313
298
|
TOPIC_PARAM_SUMMARY,
|
|
314
299
|
TOPIC_PARAM_TITLE,
|
|
315
300
|
TRUE_EMPTY_RESPONSE_MESSAGE,
|
|
316
301
|
TerminalQuotaError,
|
|
317
|
-
ToolConfirmationOutcome,
|
|
318
|
-
ToolErrorType,
|
|
319
302
|
TranscriptionFactory,
|
|
320
|
-
TrustLevel,
|
|
321
303
|
UPDATE_TOPIC_DISPLAY_NAME,
|
|
322
304
|
UPDATE_TOPIC_TOOL_NAME,
|
|
323
305
|
UnauthorizedError,
|
|
@@ -329,7 +311,6 @@ import {
|
|
|
329
311
|
WEB_FETCH_DISPLAY_NAME,
|
|
330
312
|
WEB_SEARCH_DISPLAY_NAME,
|
|
331
313
|
WRITE_FILE_DISPLAY_NAME,
|
|
332
|
-
WarningPriority,
|
|
333
314
|
WhisperModelManager,
|
|
334
315
|
addMCPStatusChangeListener,
|
|
335
316
|
allowEditorTypeInSandbox,
|
|
@@ -438,7 +419,7 @@ import {
|
|
|
438
419
|
validatePlanContent,
|
|
439
420
|
validatePlanPath,
|
|
440
421
|
writeToStdout
|
|
441
|
-
} from "./chunk-
|
|
422
|
+
} from "./chunk-Y2J3C62M.js";
|
|
442
423
|
import "./chunk-664ZODQF.js";
|
|
443
424
|
import "./chunk-IUUIT4SU.js";
|
|
444
425
|
import "./chunk-TUDYL3X4.js";
|
|
@@ -5064,7 +5045,7 @@ function calculateShellMaxLines(options) {
|
|
|
5064
5045
|
if (isAlternateBuffer && isThisShellFocused2 && !constrainHeight) {
|
|
5065
5046
|
return maxLinesBasedOnHeight;
|
|
5066
5047
|
}
|
|
5067
|
-
const isExecuting = status ===
|
|
5048
|
+
const isExecuting = status === "executing" /* Executing */;
|
|
5068
5049
|
const shellMaxLinesLimit = isExecuting ? ACTIVE_SHELL_MAX_LINES - SHELL_CONTENT_OVERHEAD : COMPLETED_SHELL_MAX_LINES - SHELL_CONTENT_OVERHEAD;
|
|
5069
5050
|
return Math.min(maxLinesBasedOnHeight, shellMaxLinesLimit);
|
|
5070
5051
|
}
|
|
@@ -5098,10 +5079,10 @@ function isShellTool(name) {
|
|
|
5098
5079
|
return name === SHELL_COMMAND_NAME || name === SHELL_NAME || name === SHELL_TOOL_NAME || normalized === "shell";
|
|
5099
5080
|
}
|
|
5100
5081
|
function isThisShellFocusable(name, status, config) {
|
|
5101
|
-
return !!(isShellTool(name) && status ===
|
|
5082
|
+
return !!(isShellTool(name) && status === "executing" /* Executing */ && config?.getEnableInteractiveShell());
|
|
5102
5083
|
}
|
|
5103
5084
|
function isThisShellFocused(name, status, ptyId, activeShellPtyId, embeddedShellFocused) {
|
|
5104
|
-
return !!(isShellTool(name) && status ===
|
|
5085
|
+
return !!(isShellTool(name) && status === "executing" /* Executing */ && ptyId === activeShellPtyId && embeddedShellFocused);
|
|
5105
5086
|
}
|
|
5106
5087
|
function useFocusHint(isThisShellFocusable2, isThisShellFocused2, resultDisplay) {
|
|
5107
5088
|
const [userHasFocused, setUserHasFocused] = (0, import_react9.useState)(false);
|
|
@@ -5261,13 +5242,13 @@ var formatToolArgs = (args) => {
|
|
|
5261
5242
|
var SubagentProgressDisplay = ({ progress, terminalWidth, historyOverrides }) => {
|
|
5262
5243
|
let headerText;
|
|
5263
5244
|
let headerColor = theme.text.secondary;
|
|
5264
|
-
if (progress.state ===
|
|
5245
|
+
if (progress.state === "cancelled" /* CANCELLED */) {
|
|
5265
5246
|
headerText = `Subagent ${progress.agentName} was cancelled.`;
|
|
5266
5247
|
headerColor = theme.status.warning;
|
|
5267
|
-
} else if (progress.state ===
|
|
5248
|
+
} else if (progress.state === "error" /* ERROR */) {
|
|
5268
5249
|
headerText = `Subagent ${progress.agentName} failed.`;
|
|
5269
5250
|
headerColor = theme.status.error;
|
|
5270
|
-
} else if (progress.state ===
|
|
5251
|
+
} else if (progress.state === "completed" /* COMPLETED */) {
|
|
5271
5252
|
headerText = `Subagent ${progress.agentName} completed.`;
|
|
5272
5253
|
headerColor = theme.status.success;
|
|
5273
5254
|
} else {
|
|
@@ -5287,7 +5268,7 @@ var SubagentProgressDisplay = ({ progress, terminalWidth, historyOverrides }) =>
|
|
|
5287
5268
|
/* @__PURE__ */ (0, import_jsx_runtime15.jsx)(Box_default, { flexGrow: 1, children: /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(Text, { color, children: item.content }) })
|
|
5288
5269
|
] }, item.id);
|
|
5289
5270
|
} else if (item.type === "tool_call") {
|
|
5290
|
-
const statusSymbol = item.status ===
|
|
5271
|
+
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 });
|
|
5291
5272
|
const formattedArgs = item.description || formatToolArgs(item.args);
|
|
5292
5273
|
const displayArgs = formattedArgs.length > 60 ? formattedArgs.slice(0, 60) + "..." : formattedArgs;
|
|
5293
5274
|
return /* @__PURE__ */ (0, import_jsx_runtime15.jsxs)(Box_default, { flexDirection: "row", children: [
|
|
@@ -5298,7 +5279,7 @@ var SubagentProgressDisplay = ({ progress, terminalWidth, historyOverrides }) =>
|
|
|
5298
5279
|
{
|
|
5299
5280
|
bold: true,
|
|
5300
5281
|
color: theme.text.primary,
|
|
5301
|
-
strikethrough: item.status ===
|
|
5282
|
+
strikethrough: item.status === "cancelled" /* CANCELLED */,
|
|
5302
5283
|
children: item.displayName || item.content
|
|
5303
5284
|
}
|
|
5304
5285
|
),
|
|
@@ -5307,7 +5288,7 @@ var SubagentProgressDisplay = ({ progress, terminalWidth, historyOverrides }) =>
|
|
|
5307
5288
|
{
|
|
5308
5289
|
color: theme.text.secondary,
|
|
5309
5290
|
wrap: "truncate",
|
|
5310
|
-
strikethrough: item.status ===
|
|
5291
|
+
strikethrough: item.status === "cancelled" /* CANCELLED */,
|
|
5311
5292
|
children: displayArgs
|
|
5312
5293
|
}
|
|
5313
5294
|
) })
|
|
@@ -5327,7 +5308,7 @@ var SubagentProgressDisplay = ({ progress, terminalWidth, historyOverrides }) =>
|
|
|
5327
5308
|
MarkdownDisplay,
|
|
5328
5309
|
{
|
|
5329
5310
|
text: safeJsonToMarkdown(progress.result),
|
|
5330
|
-
isPending: progress.state !==
|
|
5311
|
+
isPending: progress.state !== "completed" /* COMPLETED */,
|
|
5331
5312
|
terminalWidth
|
|
5332
5313
|
}
|
|
5333
5314
|
)
|
|
@@ -5682,14 +5663,14 @@ var ToolActionsProvider = (props) => {
|
|
|
5682
5663
|
}
|
|
5683
5664
|
const details = tool.confirmationDetails;
|
|
5684
5665
|
if (details?.type === "edit" && isDiffingEnabled && "filePath" in details) {
|
|
5685
|
-
const cliOutcome = outcome ===
|
|
5666
|
+
const cliOutcome = outcome === "cancel" /* Cancel */ ? "rejected" : "accepted";
|
|
5686
5667
|
await ideClient?.resolveDiffFromCli(details.filePath, cliOutcome);
|
|
5687
5668
|
}
|
|
5688
5669
|
if (tool.correlationId) {
|
|
5689
5670
|
await config.getMessageBus().publish({
|
|
5690
|
-
type:
|
|
5671
|
+
type: "tool-confirmation-response" /* TOOL_CONFIRMATION_RESPONSE */,
|
|
5691
5672
|
correlationId: tool.correlationId,
|
|
5692
|
-
confirmed: outcome !==
|
|
5673
|
+
confirmed: outcome !== "cancel" /* Cancel */,
|
|
5693
5674
|
requiresUserConfirmation: false,
|
|
5694
5675
|
outcome,
|
|
5695
5676
|
payload
|
|
@@ -5708,7 +5689,7 @@ var ToolActionsProvider = (props) => {
|
|
|
5708
5689
|
);
|
|
5709
5690
|
const cancel = (0, import_react12.useCallback)(
|
|
5710
5691
|
async (callId) => {
|
|
5711
|
-
await confirm(callId,
|
|
5692
|
+
await confirm(callId, "cancel" /* Cancel */);
|
|
5712
5693
|
},
|
|
5713
5694
|
[confirm]
|
|
5714
5695
|
);
|
|
@@ -5827,7 +5808,7 @@ var ToolMessage = ({
|
|
|
5827
5808
|
paddingX: 1,
|
|
5828
5809
|
flexDirection: "column",
|
|
5829
5810
|
children: [
|
|
5830
|
-
status ===
|
|
5811
|
+
status === "executing" /* Executing */ && progress !== void 0 && /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(
|
|
5831
5812
|
McpProgressIndicator,
|
|
5832
5813
|
{
|
|
5833
5814
|
progress,
|
|
@@ -5844,8 +5825,8 @@ var ToolMessage = ({
|
|
|
5844
5825
|
terminalWidth,
|
|
5845
5826
|
renderOutputAsMarkdown,
|
|
5846
5827
|
hasFocus: isThisShellFocused2,
|
|
5847
|
-
maxLines: kind ===
|
|
5848
|
-
overflowDirection: kind ===
|
|
5828
|
+
maxLines: kind === "agent" /* Agent */ && availableTerminalHeight !== void 0 ? SUBAGENT_MAX_LINES : void 0,
|
|
5829
|
+
overflowDirection: kind === "agent" /* Agent */ ? "bottom" : "top"
|
|
5849
5830
|
}
|
|
5850
5831
|
),
|
|
5851
5832
|
isThisShellFocused2 && config && /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(Box_default, { paddingLeft: STATUS_INDICATOR_WIDTH, marginTop: 1, children: /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(
|
|
@@ -6161,7 +6142,7 @@ function getInitialTrustState(settings, cwd5, isCurrentWorkspace) {
|
|
|
6161
6142
|
settings.merged,
|
|
6162
6143
|
process3.cwd()
|
|
6163
6144
|
);
|
|
6164
|
-
const isInheritedTrust = isTrusted && (!explicitTrustLevel || explicitTrustLevel ===
|
|
6145
|
+
const isInheritedTrust = isTrusted && (!explicitTrustLevel || explicitTrustLevel === "DO_NOT_TRUST" /* DO_NOT_TRUST */);
|
|
6165
6146
|
return {
|
|
6166
6147
|
currentTrustLevel: explicitTrustLevel,
|
|
6167
6148
|
isInheritedTrustFromParent: !!(source === "file" && isInheritedTrust),
|
|
@@ -6206,7 +6187,7 @@ var usePermissionsModifyTrust = (onExit, addItem, targetDirectory) => {
|
|
|
6206
6187
|
process3.cwd(),
|
|
6207
6188
|
newConfig
|
|
6208
6189
|
);
|
|
6209
|
-
if (trustLevel ===
|
|
6190
|
+
if (trustLevel === "DO_NOT_TRUST" /* DO_NOT_TRUST */ && isTrusted) {
|
|
6210
6191
|
let message = "Note: This folder is still trusted because the connected IDE workspace is trusted.";
|
|
6211
6192
|
if (source === "file") {
|
|
6212
6193
|
message = "Note: This folder is still trusted because a parent folder is trusted.";
|
|
@@ -6280,18 +6261,18 @@ function PermissionsModifyTrustDialog({
|
|
|
6280
6261
|
const TRUST_LEVEL_ITEMS = [
|
|
6281
6262
|
{
|
|
6282
6263
|
label: `Trust this folder (${dirName})`,
|
|
6283
|
-
value:
|
|
6284
|
-
key:
|
|
6264
|
+
value: "TRUST_FOLDER" /* TRUST_FOLDER */,
|
|
6265
|
+
key: "TRUST_FOLDER" /* TRUST_FOLDER */
|
|
6285
6266
|
},
|
|
6286
6267
|
{
|
|
6287
6268
|
label: `Trust parent folder (${parentFolder})`,
|
|
6288
|
-
value:
|
|
6289
|
-
key:
|
|
6269
|
+
value: "TRUST_PARENT" /* TRUST_PARENT */,
|
|
6270
|
+
key: "TRUST_PARENT" /* TRUST_PARENT */
|
|
6290
6271
|
},
|
|
6291
6272
|
{
|
|
6292
6273
|
label: "Don't trust",
|
|
6293
|
-
value:
|
|
6294
|
-
key:
|
|
6274
|
+
value: "DO_NOT_TRUST" /* DO_NOT_TRUST */,
|
|
6275
|
+
key: "DO_NOT_TRUST" /* DO_NOT_TRUST */
|
|
6295
6276
|
}
|
|
6296
6277
|
];
|
|
6297
6278
|
const {
|
|
@@ -6531,7 +6512,7 @@ var ShellToolMessage = ({
|
|
|
6531
6512
|
maxLinesLimit: maxLines
|
|
6532
6513
|
});
|
|
6533
6514
|
import_react17.default.useEffect(() => {
|
|
6534
|
-
const isExecuting = status ===
|
|
6515
|
+
const isExecuting = status === "executing" /* Executing */;
|
|
6535
6516
|
if (isExecuting && ptyId) {
|
|
6536
6517
|
try {
|
|
6537
6518
|
const childWidth = terminalWidth - 4;
|
|
@@ -6744,13 +6725,13 @@ var SubagentGroupDisplay = ({
|
|
|
6744
6725
|
const singleAgent = toolCalls[0].resultDisplay;
|
|
6745
6726
|
if (isSubagentProgress(singleAgent)) {
|
|
6746
6727
|
switch (singleAgent.state) {
|
|
6747
|
-
case
|
|
6728
|
+
case "completed" /* COMPLETED */:
|
|
6748
6729
|
headerText = "Agent Completed";
|
|
6749
6730
|
break;
|
|
6750
|
-
case
|
|
6731
|
+
case "cancelled" /* CANCELLED */:
|
|
6751
6732
|
headerText = "Agent Cancelled";
|
|
6752
6733
|
break;
|
|
6753
|
-
case
|
|
6734
|
+
case "error" /* ERROR */:
|
|
6754
6735
|
headerText = "Agent Error";
|
|
6755
6736
|
break;
|
|
6756
6737
|
default:
|
|
@@ -6766,8 +6747,8 @@ var SubagentGroupDisplay = ({
|
|
|
6766
6747
|
for (const tc of toolCalls) {
|
|
6767
6748
|
const progress = tc.resultDisplay;
|
|
6768
6749
|
if (isSubagentProgress(progress)) {
|
|
6769
|
-
if (progress.state ===
|
|
6770
|
-
else if (progress.state ===
|
|
6750
|
+
if (progress.state === "completed" /* COMPLETED */) completedCount++;
|
|
6751
|
+
else if (progress.state === "running" /* RUNNING */) runningCount++;
|
|
6771
6752
|
} else {
|
|
6772
6753
|
runningCount++;
|
|
6773
6754
|
}
|
|
@@ -6846,7 +6827,7 @@ var SubagentGroupDisplay = ({
|
|
|
6846
6827
|
if (!isExpanded) {
|
|
6847
6828
|
let content = "Starting...";
|
|
6848
6829
|
let formattedArgs;
|
|
6849
|
-
if (progress.state ===
|
|
6830
|
+
if (progress.state === "completed" /* COMPLETED */) {
|
|
6850
6831
|
if (progress.terminateReason && progress.terminateReason !== "GOAL") {
|
|
6851
6832
|
content = `Finished Early (${progress.terminateReason})`;
|
|
6852
6833
|
} else {
|
|
@@ -6860,17 +6841,17 @@ var SubagentGroupDisplay = ({
|
|
|
6860
6841
|
formattedArgs = formatToolArgs(lastActivity.args);
|
|
6861
6842
|
}
|
|
6862
6843
|
}
|
|
6863
|
-
const displayArgs = progress.state ===
|
|
6844
|
+
const displayArgs = progress.state === "completed" /* COMPLETED */ ? "" : formattedArgs;
|
|
6864
6845
|
const renderStatusIcon = () => {
|
|
6865
|
-
const state = progress.state ??
|
|
6846
|
+
const state = progress.state ?? "running" /* RUNNING */;
|
|
6866
6847
|
switch (state) {
|
|
6867
|
-
case
|
|
6848
|
+
case "running" /* RUNNING */:
|
|
6868
6849
|
return /* @__PURE__ */ (0, import_jsx_runtime25.jsx)(Text, { color: theme.text.primary, children: "!" });
|
|
6869
|
-
case
|
|
6850
|
+
case "completed" /* COMPLETED */:
|
|
6870
6851
|
return /* @__PURE__ */ (0, import_jsx_runtime25.jsx)(Text, { color: theme.status.success, children: "\u2713" });
|
|
6871
|
-
case
|
|
6852
|
+
case "cancelled" /* CANCELLED */:
|
|
6872
6853
|
return /* @__PURE__ */ (0, import_jsx_runtime25.jsx)(Text, { color: theme.status.warning, children: "\u2139" });
|
|
6873
|
-
case
|
|
6854
|
+
case "error" /* ERROR */:
|
|
6874
6855
|
return /* @__PURE__ */ (0, import_jsx_runtime25.jsx)(Text, { color: theme.status.error, children: "\u2717" });
|
|
6875
6856
|
default:
|
|
6876
6857
|
return checkExhaustive(state);
|
|
@@ -6923,22 +6904,22 @@ var hasPayload = (res) => {
|
|
|
6923
6904
|
function getFileOpData(diff, status, resultDisplay, terminalWidth, availableTerminalHeight, isClickable) {
|
|
6924
6905
|
const added = (diff.diffStat?.model_added_lines ?? 0) + (diff.diffStat?.user_added_lines ?? 0);
|
|
6925
6906
|
const removed = (diff.diffStat?.model_removed_lines ?? 0) + (diff.diffStat?.user_removed_lines ?? 0);
|
|
6926
|
-
const isAcceptedOrConfirming = status ===
|
|
6907
|
+
const isAcceptedOrConfirming = status === "success" /* Success */ || status === "executing" /* Executing */ || status === "awaiting_approval" /* AwaitingApproval */;
|
|
6927
6908
|
const addColor = isAcceptedOrConfirming ? theme.status.success : theme.text.secondary;
|
|
6928
6909
|
const removeColor = isAcceptedOrConfirming ? theme.status.error : theme.text.secondary;
|
|
6929
6910
|
const showDiffStat = !!diff.diffStat;
|
|
6930
6911
|
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 }) });
|
|
6931
6912
|
let resultSummary = "";
|
|
6932
6913
|
let resultColor = theme.text.secondary;
|
|
6933
|
-
if (status ===
|
|
6914
|
+
if (status === "awaiting_approval" /* AwaitingApproval */) {
|
|
6934
6915
|
resultSummary = "Confirming";
|
|
6935
|
-
} else if (status ===
|
|
6916
|
+
} else if (status === "success" /* Success */ || status === "executing" /* Executing */) {
|
|
6936
6917
|
resultSummary = "Accepted";
|
|
6937
6918
|
resultColor = theme.text.accent;
|
|
6938
|
-
} else if (status ===
|
|
6919
|
+
} else if (status === "cancelled" /* Cancelled */) {
|
|
6939
6920
|
resultSummary = "Rejected";
|
|
6940
6921
|
resultColor = theme.status.error;
|
|
6941
|
-
} else if (status ===
|
|
6922
|
+
} else if (status === "error" /* Error */) {
|
|
6942
6923
|
resultSummary = typeof resultDisplay === "string" ? resultDisplay : "Failed";
|
|
6943
6924
|
resultColor = theme.status.error;
|
|
6944
6925
|
}
|
|
@@ -6969,7 +6950,7 @@ function getFileOpData(diff, status, resultDisplay, terminalWidth, availableTerm
|
|
|
6969
6950
|
filename: diff.fileName,
|
|
6970
6951
|
terminalWidth: terminalWidth - PAYLOAD_MARGIN_LEFT,
|
|
6971
6952
|
availableTerminalHeight,
|
|
6972
|
-
disableColor: status ===
|
|
6953
|
+
disableColor: status === "cancelled" /* Cancelled */
|
|
6973
6954
|
}
|
|
6974
6955
|
);
|
|
6975
6956
|
return { description, summary, payload };
|
|
@@ -7097,10 +7078,10 @@ var DenseToolMessage = (props) => {
|
|
|
7097
7078
|
if (isGrepResult(resultDisplay)) {
|
|
7098
7079
|
return getGenericSuccessData(resultDisplay, originalDescription);
|
|
7099
7080
|
}
|
|
7100
|
-
if (status ===
|
|
7081
|
+
if (status === "success" /* Success */ && resultDisplay) {
|
|
7101
7082
|
return getGenericSuccessData(resultDisplay, originalDescription);
|
|
7102
7083
|
}
|
|
7103
|
-
if (status ===
|
|
7084
|
+
if (status === "error" /* Error */) {
|
|
7104
7085
|
const text = typeof resultDisplay === "string" ? resultDisplay.replace(/\n/g, " ") : "Failed";
|
|
7105
7086
|
const errorSummary = /* @__PURE__ */ (0, import_jsx_runtime26.jsxs)(Text, { color: theme.status.error, wrap: "truncate-end", children: [
|
|
7106
7087
|
"\u2192 ",
|
|
@@ -7141,7 +7122,7 @@ var DenseToolMessage = (props) => {
|
|
|
7141
7122
|
language: fileExtension,
|
|
7142
7123
|
maxWidth: terminalWidth - PAYLOAD_MARGIN_LEFT,
|
|
7143
7124
|
settings,
|
|
7144
|
-
disableColor: status ===
|
|
7125
|
+
disableColor: status === "cancelled" /* Cancelled */,
|
|
7145
7126
|
returnLines: true
|
|
7146
7127
|
});
|
|
7147
7128
|
} else {
|
|
@@ -7149,7 +7130,7 @@ var DenseToolMessage = (props) => {
|
|
|
7149
7130
|
parsedLines,
|
|
7150
7131
|
filename: diff.fileName,
|
|
7151
7132
|
terminalWidth: terminalWidth - PAYLOAD_MARGIN_LEFT,
|
|
7152
|
-
disableColor: status ===
|
|
7133
|
+
disableColor: status === "cancelled" /* Cancelled */
|
|
7153
7134
|
});
|
|
7154
7135
|
}
|
|
7155
7136
|
}, [diff, isExpanded, isAlternateBuffer, terminalWidth, settings, status]);
|
|
@@ -7279,7 +7260,7 @@ function isToolExecuting(pendingHistoryItems) {
|
|
|
7279
7260
|
return pendingHistoryItems.some((item) => {
|
|
7280
7261
|
if (item && item.type === "tool_group") {
|
|
7281
7262
|
return item.tools.some(
|
|
7282
|
-
(tool) =>
|
|
7263
|
+
(tool) => "executing" /* Executing */ === tool.status
|
|
7283
7264
|
);
|
|
7284
7265
|
}
|
|
7285
7266
|
return false;
|
|
@@ -7288,7 +7269,7 @@ function isToolExecuting(pendingHistoryItems) {
|
|
|
7288
7269
|
function isToolAwaitingConfirmation(pendingHistoryItems) {
|
|
7289
7270
|
return pendingHistoryItems.filter((item) => item.type === "tool_group").some(
|
|
7290
7271
|
(item) => item.tools.some(
|
|
7291
|
-
(tool) =>
|
|
7272
|
+
(tool) => "awaiting_approval" /* AwaitingApproval */ === tool.status
|
|
7292
7273
|
)
|
|
7293
7274
|
);
|
|
7294
7275
|
}
|
|
@@ -7311,14 +7292,14 @@ function getToolGroupBorderAppearance(item, activeShellPtyId, embeddedShellFocus
|
|
|
7311
7292
|
if (isTrackedToolCall(t)) {
|
|
7312
7293
|
return t.status !== "success" && t.status !== "error" && t.status !== "cancelled";
|
|
7313
7294
|
} else {
|
|
7314
|
-
return t.status !==
|
|
7295
|
+
return t.status !== "success" /* Success */ && t.status !== "error" /* Error */ && t.status !== "cancelled" /* Cancelled */;
|
|
7315
7296
|
}
|
|
7316
7297
|
});
|
|
7317
7298
|
const isEmbeddedShellFocused = toolsToInspect.some((t) => {
|
|
7318
7299
|
if (isTrackedToolCall(t)) {
|
|
7319
7300
|
return isShellTool(t.request.name) && t.status === "executing" && t.pid === activeShellPtyId && !!embeddedShellFocused;
|
|
7320
7301
|
} else {
|
|
7321
|
-
return isShellTool(t.name) && t.status ===
|
|
7302
|
+
return isShellTool(t.name) && t.status === "executing" /* Executing */ && t.ptyId === activeShellPtyId && !!embeddedShellFocused;
|
|
7322
7303
|
}
|
|
7323
7304
|
});
|
|
7324
7305
|
const isShellCommand = toolsToInspect.some((t) => {
|
|
@@ -7417,7 +7398,7 @@ var ToolGroupMessage = ({
|
|
|
7417
7398
|
const groupedTools = (0, import_react21.useMemo)(() => {
|
|
7418
7399
|
const groups = [];
|
|
7419
7400
|
for (const tool of visibleToolCalls) {
|
|
7420
|
-
if (tool.kind ===
|
|
7401
|
+
if (tool.kind === "agent" /* Agent */) {
|
|
7421
7402
|
const lastGroup = groups[groups.length - 1];
|
|
7422
7403
|
if (Array.isArray(lastGroup)) {
|
|
7423
7404
|
lastGroup.push(tool);
|
|
@@ -7472,7 +7453,7 @@ var ToolGroupMessage = ({
|
|
|
7472
7453
|
}, [groupedTools, isCompactModeEnabled, borderTopOverride]);
|
|
7473
7454
|
let countToolCallsWithResults = 0;
|
|
7474
7455
|
for (const tool of visibleToolCalls) {
|
|
7475
|
-
if (tool.kind !==
|
|
7456
|
+
if (tool.kind !== "agent" /* Agent */) {
|
|
7476
7457
|
if (isCompactTool(tool, isCompactModeEnabled)) {
|
|
7477
7458
|
if (hasDensePayload(tool)) {
|
|
7478
7459
|
countToolCallsWithResults++;
|
|
@@ -7646,7 +7627,7 @@ var ToolGroupDisplay = ({
|
|
|
7646
7627
|
}
|
|
7647
7628
|
const { tools, borderColor, borderDimColor, borderTop, borderBottom } = item;
|
|
7648
7629
|
const visibleTools = tools.filter(
|
|
7649
|
-
(t) => t.status !==
|
|
7630
|
+
(t) => t.status !== "awaiting_approval" /* AwaitingApproval */
|
|
7650
7631
|
);
|
|
7651
7632
|
const noticeTools = visibleTools.filter((t) => t.format === "notice");
|
|
7652
7633
|
const otherTools = visibleTools.filter(
|
|
@@ -7848,18 +7829,18 @@ function CompressionMessage({
|
|
|
7848
7829
|
return "Compressing chat history";
|
|
7849
7830
|
}
|
|
7850
7831
|
switch (compressionStatus) {
|
|
7851
|
-
case
|
|
7832
|
+
case 1 /* COMPRESSED */:
|
|
7852
7833
|
return `Chat history compressed from ${originalTokens} to ${newTokens} tokens.`;
|
|
7853
|
-
case
|
|
7834
|
+
case 2 /* COMPRESSION_FAILED_INFLATED_TOKEN_COUNT */:
|
|
7854
7835
|
if (originalTokens < 5e4) {
|
|
7855
7836
|
return "Compression was not beneficial for this history size.";
|
|
7856
7837
|
}
|
|
7857
7838
|
return "Chat history compression did not reduce size. This may indicate issues with the compression prompt.";
|
|
7858
|
-
case
|
|
7839
|
+
case 3 /* COMPRESSION_FAILED_TOKEN_COUNT_ERROR */:
|
|
7859
7840
|
return "Could not compress chat history due to a token counting error.";
|
|
7860
|
-
case
|
|
7841
|
+
case 4 /* COMPRESSION_FAILED_EMPTY_SUMMARY */:
|
|
7861
7842
|
return "Chat history compression failed: the model returned an empty summary.";
|
|
7862
|
-
case
|
|
7843
|
+
case 5 /* NOOP */:
|
|
7863
7844
|
return "Nothing to compress.";
|
|
7864
7845
|
default:
|
|
7865
7846
|
return "";
|
|
@@ -8297,8 +8278,8 @@ var ModelUsageTable = ({ models }) => {
|
|
|
8297
8278
|
);
|
|
8298
8279
|
roleEntries.sort(([a], [b]) => {
|
|
8299
8280
|
if (a === b) return 0;
|
|
8300
|
-
if (a ===
|
|
8301
|
-
if (b ===
|
|
8281
|
+
if (a === "main" /* MAIN */) return -1;
|
|
8282
|
+
if (b === "main" /* MAIN */) return 1;
|
|
8302
8283
|
return a.localeCompare(b);
|
|
8303
8284
|
});
|
|
8304
8285
|
roleEntries.forEach(([role, roleMetrics]) => {
|
|
@@ -8629,8 +8610,8 @@ var ModelStatsDisplay = ({
|
|
|
8629
8610
|
return validRoles.includes(role);
|
|
8630
8611
|
}).sort((a, b) => {
|
|
8631
8612
|
if (a === b) return 0;
|
|
8632
|
-
if (a ===
|
|
8633
|
-
if (b ===
|
|
8613
|
+
if (a === "main" /* MAIN */) return -1;
|
|
8614
|
+
if (b === "main" /* MAIN */) return 1;
|
|
8634
8615
|
return a.localeCompare(b);
|
|
8635
8616
|
});
|
|
8636
8617
|
const createRow = (metric, getValue, options = {}) => {
|
|
@@ -9421,7 +9402,7 @@ var McpStatus = ({
|
|
|
9421
9402
|
);
|
|
9422
9403
|
const originalStatus = serverStatus(serverName);
|
|
9423
9404
|
const hasCachedItems = serverTools.length > 0 || serverPrompts.length > 0 || serverResources.length > 0;
|
|
9424
|
-
const status = originalStatus ===
|
|
9405
|
+
const status = originalStatus === "disconnected" /* DISCONNECTED */ && hasCachedItems ? "connected" /* CONNECTED */ : originalStatus;
|
|
9425
9406
|
let statusIndicator = "";
|
|
9426
9407
|
let statusText = "";
|
|
9427
9408
|
let statusColor = theme.text.primary;
|
|
@@ -9433,17 +9414,17 @@ var McpStatus = ({
|
|
|
9433
9414
|
statusColor = theme.text.secondary;
|
|
9434
9415
|
} else {
|
|
9435
9416
|
switch (status) {
|
|
9436
|
-
case
|
|
9417
|
+
case "connected" /* CONNECTED */:
|
|
9437
9418
|
statusIndicator = "\u{1F7E2}";
|
|
9438
9419
|
statusText = "Ready";
|
|
9439
9420
|
statusColor = theme.status.success;
|
|
9440
9421
|
break;
|
|
9441
|
-
case
|
|
9422
|
+
case "connecting" /* CONNECTING */:
|
|
9442
9423
|
statusIndicator = "\u{1F504}";
|
|
9443
9424
|
statusText = "Starting... (first startup may take longer)";
|
|
9444
9425
|
statusColor = theme.status.warning;
|
|
9445
9426
|
break;
|
|
9446
|
-
case
|
|
9427
|
+
case "disconnected" /* DISCONNECTED */:
|
|
9447
9428
|
default:
|
|
9448
9429
|
statusIndicator = "\u{1F534}";
|
|
9449
9430
|
statusText = "Disconnected";
|
|
@@ -9491,12 +9472,12 @@ var McpStatus = ({
|
|
|
9491
9472
|
/* @__PURE__ */ (0, import_jsx_runtime48.jsxs)(Text, { children: [
|
|
9492
9473
|
" - ",
|
|
9493
9474
|
statusText,
|
|
9494
|
-
status ===
|
|
9475
|
+
status === "connected" /* CONNECTED */ && parts.length > 0 && ` (${parts.join(", ")})`
|
|
9495
9476
|
] }),
|
|
9496
9477
|
authStatusNode
|
|
9497
9478
|
] }),
|
|
9498
|
-
status ===
|
|
9499
|
-
status ===
|
|
9479
|
+
status === "connecting" /* CONNECTING */ && /* @__PURE__ */ (0, import_jsx_runtime48.jsx)(Text, { children: " (tools and prompts will appear when ready)" }),
|
|
9480
|
+
status === "disconnected" /* DISCONNECTED */ && toolCount > 0 && /* @__PURE__ */ (0, import_jsx_runtime48.jsxs)(Text, { children: [
|
|
9500
9481
|
" (",
|
|
9501
9482
|
toolCount,
|
|
9502
9483
|
" tools cached)"
|
|
@@ -10057,7 +10038,7 @@ var Notifications = () => {
|
|
|
10057
10038
|
if (dismissed) return [];
|
|
10058
10039
|
const counts = persistentState.get("startupWarningCounts") || {};
|
|
10059
10040
|
return startupWarnings.filter((w) => {
|
|
10060
|
-
if (w.priority ===
|
|
10041
|
+
if (w.priority === "low" /* Low */) {
|
|
10061
10042
|
const count = counts[w.id] || 0;
|
|
10062
10043
|
return count < MAX_STARTUP_WARNING_SHOW_COUNT;
|
|
10063
10044
|
}
|
|
@@ -10070,7 +10051,7 @@ var Notifications = () => {
|
|
|
10070
10051
|
const counts = { ...persistentState.get("startupWarningCounts") || {} };
|
|
10071
10052
|
let changed = false;
|
|
10072
10053
|
visibleWarnings.forEach((w) => {
|
|
10073
|
-
if (w.priority ===
|
|
10054
|
+
if (w.priority === "low" /* Low */) {
|
|
10074
10055
|
counts[w.id] = (counts[w.id] || 0) + 1;
|
|
10075
10056
|
changed = true;
|
|
10076
10057
|
}
|
|
@@ -10177,7 +10158,7 @@ var UserIdentity = ({ config }) => {
|
|
|
10177
10158
|
}
|
|
10178
10159
|
return /* @__PURE__ */ (0, import_jsx_runtime58.jsxs)(Box_default, { flexDirection: "column", children: [
|
|
10179
10160
|
/* @__PURE__ */ (0, import_jsx_runtime58.jsxs)(Box_default, { children: [
|
|
10180
|
-
/* @__PURE__ */ (0, import_jsx_runtime58.jsx)(Text, { color: theme.text.primary, wrap: "truncate-end", children: authType ===
|
|
10161
|
+
/* @__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: [
|
|
10181
10162
|
/* @__PURE__ */ (0, import_jsx_runtime58.jsxs)(Text, { bold: true, children: [
|
|
10182
10163
|
"Signed in with Google",
|
|
10183
10164
|
email ? ":" : ""
|
|
@@ -10420,7 +10401,7 @@ var import_react32 = __toESM(require_react(), 1);
|
|
|
10420
10401
|
function getConfirmingToolState(pendingHistoryItems) {
|
|
10421
10402
|
const allPendingTools = getAllToolCalls(pendingHistoryItems);
|
|
10422
10403
|
const confirmingTools = allPendingTools.filter(
|
|
10423
|
-
(tool) => tool.status ===
|
|
10404
|
+
(tool) => tool.status === "awaiting_approval" /* AwaitingApproval */
|
|
10424
10405
|
);
|
|
10425
10406
|
if (confirmingTools.length === 0) {
|
|
10426
10407
|
return null;
|
|
@@ -11729,7 +11710,7 @@ var ExitPlanModeDialog = ({
|
|
|
11729
11710
|
{
|
|
11730
11711
|
questions: [
|
|
11731
11712
|
{
|
|
11732
|
-
type:
|
|
11713
|
+
type: "choice" /* CHOICE */,
|
|
11733
11714
|
header: "Approval",
|
|
11734
11715
|
question: planContent,
|
|
11735
11716
|
options: [
|
|
@@ -11750,9 +11731,9 @@ var ExitPlanModeDialog = ({
|
|
|
11750
11731
|
onSubmit: (answers) => {
|
|
11751
11732
|
const answer = answers["0"];
|
|
11752
11733
|
if (answer === "Yes, automatically accept edits" /* Auto */) {
|
|
11753
|
-
onApprove(
|
|
11734
|
+
onApprove("autoEdit" /* AUTO_EDIT */);
|
|
11754
11735
|
} else if (answer === "Yes, manually accept edits" /* Manual */) {
|
|
11755
|
-
onApprove(
|
|
11736
|
+
onApprove("default" /* DEFAULT */);
|
|
11756
11737
|
} else if (answer) {
|
|
11757
11738
|
onFeedback(answer);
|
|
11758
11739
|
}
|
|
@@ -11963,7 +11944,7 @@ ${deceptiveUrlWarnings.map(
|
|
|
11963
11944
|
);
|
|
11964
11945
|
(0, import_react37.useEffect)(() => {
|
|
11965
11946
|
if (isCancelling) {
|
|
11966
|
-
handleConfirm(
|
|
11947
|
+
handleConfirm("cancel" /* Cancel */);
|
|
11967
11948
|
}
|
|
11968
11949
|
}, [isCancelling, handleConfirm]);
|
|
11969
11950
|
const handleSelect = (0, import_react37.useCallback)(
|
|
@@ -11976,19 +11957,19 @@ ${deceptiveUrlWarnings.map(
|
|
|
11976
11957
|
if (!confirmationDetails.isModifying) {
|
|
11977
11958
|
options2.push({
|
|
11978
11959
|
label: "Allow once",
|
|
11979
|
-
value:
|
|
11960
|
+
value: "proceed_once" /* ProceedOnce */,
|
|
11980
11961
|
key: "Allow once"
|
|
11981
11962
|
});
|
|
11982
11963
|
if (isTrustedFolder && !confirmationDetails.isBuildFile) {
|
|
11983
11964
|
options2.push({
|
|
11984
11965
|
label: "Allow for this session",
|
|
11985
|
-
value:
|
|
11966
|
+
value: "proceed_always" /* ProceedAlways */,
|
|
11986
11967
|
key: "Allow for this session"
|
|
11987
11968
|
});
|
|
11988
11969
|
if (allowPermanentApproval) {
|
|
11989
11970
|
options2.push({
|
|
11990
11971
|
label: "Allow for this file in all future sessions",
|
|
11991
|
-
value:
|
|
11972
|
+
value: "proceed_always_and_save" /* ProceedAlwaysAndSave */,
|
|
11992
11973
|
key: "Allow for this file in all future sessions"
|
|
11993
11974
|
});
|
|
11994
11975
|
}
|
|
@@ -11996,45 +11977,45 @@ ${deceptiveUrlWarnings.map(
|
|
|
11996
11977
|
if (!config.getIdeMode() || !isDiffingEnabled) {
|
|
11997
11978
|
options2.push({
|
|
11998
11979
|
label: "Modify with external editor",
|
|
11999
|
-
value:
|
|
11980
|
+
value: "modify_with_editor" /* ModifyWithEditor */,
|
|
12000
11981
|
key: "Modify with external editor"
|
|
12001
11982
|
});
|
|
12002
11983
|
}
|
|
12003
11984
|
options2.push({
|
|
12004
11985
|
label: "No, suggest changes (esc)",
|
|
12005
|
-
value:
|
|
11986
|
+
value: "cancel" /* Cancel */,
|
|
12006
11987
|
key: "No, suggest changes (esc)"
|
|
12007
11988
|
});
|
|
12008
11989
|
}
|
|
12009
11990
|
} else if (confirmationDetails.type === "sandbox_expansion") {
|
|
12010
11991
|
options2.push({
|
|
12011
11992
|
label: "Allow once",
|
|
12012
|
-
value:
|
|
11993
|
+
value: "proceed_once" /* ProceedOnce */,
|
|
12013
11994
|
key: "Allow once"
|
|
12014
11995
|
});
|
|
12015
11996
|
if (isTrustedFolder) {
|
|
12016
11997
|
options2.push({
|
|
12017
11998
|
label: "Allow for this session",
|
|
12018
|
-
value:
|
|
11999
|
+
value: "proceed_always" /* ProceedAlways */,
|
|
12019
12000
|
key: "Allow for this session"
|
|
12020
12001
|
});
|
|
12021
12002
|
if (allowPermanentApproval) {
|
|
12022
12003
|
options2.push({
|
|
12023
12004
|
label: "Allow for all future sessions",
|
|
12024
|
-
value:
|
|
12005
|
+
value: "proceed_always_and_save" /* ProceedAlwaysAndSave */,
|
|
12025
12006
|
key: "Allow for all future sessions"
|
|
12026
12007
|
});
|
|
12027
12008
|
}
|
|
12028
12009
|
}
|
|
12029
12010
|
options2.push({
|
|
12030
12011
|
label: "No, suggest changes (esc)",
|
|
12031
|
-
value:
|
|
12012
|
+
value: "cancel" /* Cancel */,
|
|
12032
12013
|
key: "No, suggest changes (esc)"
|
|
12033
12014
|
});
|
|
12034
12015
|
} else if (confirmationDetails.type === "exec") {
|
|
12035
12016
|
options2.push({
|
|
12036
12017
|
label: "Allow once",
|
|
12037
|
-
value:
|
|
12018
|
+
value: "proceed_once" /* ProceedOnce */,
|
|
12038
12019
|
key: "Allow once"
|
|
12039
12020
|
});
|
|
12040
12021
|
const hasUntrustedFlags = confirmationDetails.untrustedFlags && confirmationDetails.untrustedFlags.length > 0;
|
|
@@ -12042,75 +12023,75 @@ ${deceptiveUrlWarnings.map(
|
|
|
12042
12023
|
if (isTrustedFolder && !hasUntrustedFlags && !hasModifiedBuildFiles) {
|
|
12043
12024
|
options2.push({
|
|
12044
12025
|
label: `Allow for this session`,
|
|
12045
|
-
value:
|
|
12026
|
+
value: "proceed_always" /* ProceedAlways */,
|
|
12046
12027
|
key: `Allow for this session`
|
|
12047
12028
|
});
|
|
12048
12029
|
if (allowPermanentApproval) {
|
|
12049
12030
|
options2.push({
|
|
12050
12031
|
label: `Allow this command for all future sessions`,
|
|
12051
|
-
value:
|
|
12032
|
+
value: "proceed_always_and_save" /* ProceedAlwaysAndSave */,
|
|
12052
12033
|
key: `Allow for all future sessions`
|
|
12053
12034
|
});
|
|
12054
12035
|
}
|
|
12055
12036
|
}
|
|
12056
12037
|
options2.push({
|
|
12057
12038
|
label: "No, suggest changes (esc)",
|
|
12058
|
-
value:
|
|
12039
|
+
value: "cancel" /* Cancel */,
|
|
12059
12040
|
key: "No, suggest changes (esc)"
|
|
12060
12041
|
});
|
|
12061
12042
|
} else if (confirmationDetails.type === "info") {
|
|
12062
12043
|
options2.push({
|
|
12063
12044
|
label: "Allow once",
|
|
12064
|
-
value:
|
|
12045
|
+
value: "proceed_once" /* ProceedOnce */,
|
|
12065
12046
|
key: "Allow once"
|
|
12066
12047
|
});
|
|
12067
12048
|
if (isTrustedFolder) {
|
|
12068
12049
|
options2.push({
|
|
12069
12050
|
label: "Allow for this session",
|
|
12070
|
-
value:
|
|
12051
|
+
value: "proceed_always" /* ProceedAlways */,
|
|
12071
12052
|
key: "Allow for this session"
|
|
12072
12053
|
});
|
|
12073
12054
|
if (allowPermanentApproval) {
|
|
12074
12055
|
options2.push({
|
|
12075
12056
|
label: "Allow for all future sessions",
|
|
12076
|
-
value:
|
|
12057
|
+
value: "proceed_always_and_save" /* ProceedAlwaysAndSave */,
|
|
12077
12058
|
key: "Allow for all future sessions"
|
|
12078
12059
|
});
|
|
12079
12060
|
}
|
|
12080
12061
|
}
|
|
12081
12062
|
options2.push({
|
|
12082
12063
|
label: "No, suggest changes (esc)",
|
|
12083
|
-
value:
|
|
12064
|
+
value: "cancel" /* Cancel */,
|
|
12084
12065
|
key: "No, suggest changes (esc)"
|
|
12085
12066
|
});
|
|
12086
12067
|
} else if (confirmationDetails.type === "mcp") {
|
|
12087
12068
|
options2.push({
|
|
12088
12069
|
label: "Allow once",
|
|
12089
|
-
value:
|
|
12070
|
+
value: "proceed_once" /* ProceedOnce */,
|
|
12090
12071
|
key: "Allow once"
|
|
12091
12072
|
});
|
|
12092
12073
|
if (isTrustedFolder) {
|
|
12093
12074
|
options2.push({
|
|
12094
12075
|
label: "Allow tool for this session",
|
|
12095
|
-
value:
|
|
12076
|
+
value: "proceed_always_tool" /* ProceedAlwaysTool */,
|
|
12096
12077
|
key: "Allow tool for this session"
|
|
12097
12078
|
});
|
|
12098
12079
|
options2.push({
|
|
12099
12080
|
label: "Allow all server tools for this session",
|
|
12100
|
-
value:
|
|
12081
|
+
value: "proceed_always_server" /* ProceedAlwaysServer */,
|
|
12101
12082
|
key: "Allow all server tools for this session"
|
|
12102
12083
|
});
|
|
12103
12084
|
if (allowPermanentApproval) {
|
|
12104
12085
|
options2.push({
|
|
12105
12086
|
label: "Allow tool for all future sessions",
|
|
12106
|
-
value:
|
|
12087
|
+
value: "proceed_always_and_save" /* ProceedAlwaysAndSave */,
|
|
12107
12088
|
key: "Allow tool for all future sessions"
|
|
12108
12089
|
});
|
|
12109
12090
|
}
|
|
12110
12091
|
}
|
|
12111
12092
|
options2.push({
|
|
12112
12093
|
label: "No, suggest changes (esc)",
|
|
12113
|
-
value:
|
|
12094
|
+
value: "cancel" /* Cancel */,
|
|
12114
12095
|
key: "No, suggest changes (esc)"
|
|
12115
12096
|
});
|
|
12116
12097
|
}
|
|
@@ -12151,7 +12132,7 @@ ${deceptiveUrlWarnings.map(
|
|
|
12151
12132
|
const containsRedirection = commandsToDisplay.some(
|
|
12152
12133
|
(cmd) => hasRedirection(cmd)
|
|
12153
12134
|
);
|
|
12154
|
-
const isAutoEdit = config.getApprovalMode() ===
|
|
12135
|
+
const isAutoEdit = config.getApprovalMode() === "yolo" /* YOLO */ || config.getApprovalMode() === "autoEdit" /* AUTO_EDIT */;
|
|
12155
12136
|
if (containsRedirection && !isAutoEdit) {
|
|
12156
12137
|
extraInfoLines = 1;
|
|
12157
12138
|
}
|
|
@@ -12178,7 +12159,7 @@ ${deceptiveUrlWarnings.map(
|
|
|
12178
12159
|
const isSafeToPersist = confirmationDetails.type === "info" || confirmationDetails.type === "edit" || confirmationDetails.type === "mcp";
|
|
12179
12160
|
if (isSafeToPersist && settings.merged.security.autoAddToPolicyByDefault) {
|
|
12180
12161
|
const alwaysAndSaveIndex = options2.findIndex(
|
|
12181
|
-
(o) => o.value ===
|
|
12162
|
+
(o) => o.value === "proceed_always_and_save" /* ProceedAlwaysAndSave */
|
|
12182
12163
|
);
|
|
12183
12164
|
if (alwaysAndSaveIndex !== -1) {
|
|
12184
12165
|
initialIndex2 = alwaysAndSaveIndex;
|
|
@@ -12227,10 +12208,10 @@ Ensure you trust all modifications made to build files before approving executio
|
|
|
12227
12208
|
{
|
|
12228
12209
|
questions: confirmationDetails.questions,
|
|
12229
12210
|
onSubmit: (answers) => {
|
|
12230
|
-
handleConfirm(
|
|
12211
|
+
handleConfirm("proceed_once" /* ProceedOnce */, { answers });
|
|
12231
12212
|
},
|
|
12232
12213
|
onCancel: () => {
|
|
12233
|
-
handleConfirm(
|
|
12214
|
+
handleConfirm("cancel" /* Cancel */);
|
|
12234
12215
|
},
|
|
12235
12216
|
width: terminalWidth,
|
|
12236
12217
|
availableHeight: bodyHeight
|
|
@@ -12251,19 +12232,19 @@ Ensure you trust all modifications made to build files before approving executio
|
|
|
12251
12232
|
planPath: confirmationDetails.planPath,
|
|
12252
12233
|
getPreferredEditor,
|
|
12253
12234
|
onApprove: (approvalMode) => {
|
|
12254
|
-
handleConfirm(
|
|
12235
|
+
handleConfirm("proceed_once" /* ProceedOnce */, {
|
|
12255
12236
|
approved: true,
|
|
12256
12237
|
approvalMode
|
|
12257
12238
|
});
|
|
12258
12239
|
},
|
|
12259
12240
|
onFeedback: (feedback) => {
|
|
12260
|
-
handleConfirm(
|
|
12241
|
+
handleConfirm("proceed_once" /* ProceedOnce */, {
|
|
12261
12242
|
approved: false,
|
|
12262
12243
|
feedback
|
|
12263
12244
|
});
|
|
12264
12245
|
},
|
|
12265
12246
|
onCancel: () => {
|
|
12266
|
-
handleConfirm(
|
|
12247
|
+
handleConfirm("cancel" /* Cancel */);
|
|
12267
12248
|
},
|
|
12268
12249
|
width: terminalWidth,
|
|
12269
12250
|
availableHeight: bodyHeight
|
|
@@ -12373,7 +12354,7 @@ Ensure you trust all modifications made to build files before approving executio
|
|
|
12373
12354
|
const containsRedirection = commandsToDisplay.some(
|
|
12374
12355
|
(cmd) => hasRedirection(cmd)
|
|
12375
12356
|
);
|
|
12376
|
-
const isAutoEdit = config.getApprovalMode() ===
|
|
12357
|
+
const isAutoEdit = config.getApprovalMode() === "yolo" /* YOLO */ || config.getApprovalMode() === "autoEdit" /* AUTO_EDIT */;
|
|
12377
12358
|
let warnings = null;
|
|
12378
12359
|
if (containsRedirection && !isAutoEdit) {
|
|
12379
12360
|
const tipText = `To auto-accept, press ${formatCommand("app.cycleApprovalMode" /* CYCLE_APPROVAL_MODE */)}`;
|
|
@@ -12532,7 +12513,7 @@ Ensure you trust all modifications made to build files before approving executio
|
|
|
12532
12513
|
const bodyOverflowDirection = confirmationDetails.type === "mcp" && isMcpToolDetailsExpanded ? "bottom" : "top";
|
|
12533
12514
|
const renderRadioItem = (0, import_react37.useCallback)(
|
|
12534
12515
|
(item, { titleColor }) => {
|
|
12535
|
-
if (item.value ===
|
|
12516
|
+
if (item.value === "proceed_always_and_save" /* ProceedAlwaysAndSave */) {
|
|
12536
12517
|
return /* @__PURE__ */ (0, import_jsx_runtime65.jsxs)(Text, { color: titleColor, wrap: "truncate", children: [
|
|
12537
12518
|
item.label,
|
|
12538
12519
|
" ",
|
|
@@ -14562,7 +14543,7 @@ async function validateAuthMethodWithSettings(authType, settings) {
|
|
|
14562
14543
|
if (settings.merged.security.auth.useExternal) {
|
|
14563
14544
|
return null;
|
|
14564
14545
|
}
|
|
14565
|
-
if (authType ===
|
|
14546
|
+
if (authType === "gemini-api-key" /* USE_GEMINI */) {
|
|
14566
14547
|
return null;
|
|
14567
14548
|
}
|
|
14568
14549
|
return validateAuthMethod(authType);
|
|
@@ -14614,7 +14595,7 @@ var useAuthCommand = (settings, config, initialAuthError = null, initialAccountS
|
|
|
14614
14595
|
}
|
|
14615
14596
|
return;
|
|
14616
14597
|
}
|
|
14617
|
-
if (authType ===
|
|
14598
|
+
if (authType === "gemini-api-key" /* USE_GEMINI */) {
|
|
14618
14599
|
const key = await reloadApiKey();
|
|
14619
14600
|
if (!key) {
|
|
14620
14601
|
setAuthState("awaiting_api_key_input" /* AwaitingApiKeyInput */);
|
|
@@ -14692,31 +14673,31 @@ function AuthDialog({
|
|
|
14692
14673
|
let items = [
|
|
14693
14674
|
{
|
|
14694
14675
|
label: "Sign in with Google",
|
|
14695
|
-
value:
|
|
14696
|
-
key:
|
|
14676
|
+
value: "oauth-personal" /* LOGIN_WITH_GOOGLE */,
|
|
14677
|
+
key: "oauth-personal" /* LOGIN_WITH_GOOGLE */
|
|
14697
14678
|
},
|
|
14698
14679
|
...process.env["CLOUD_SHELL"] === "true" ? [
|
|
14699
14680
|
{
|
|
14700
14681
|
label: "Use Cloud Shell user credentials",
|
|
14701
|
-
value:
|
|
14702
|
-
key:
|
|
14682
|
+
value: "compute-default-credentials" /* COMPUTE_ADC */,
|
|
14683
|
+
key: "compute-default-credentials" /* COMPUTE_ADC */
|
|
14703
14684
|
}
|
|
14704
14685
|
] : process.env["GEMINI_CLI_USE_COMPUTE_ADC"] === "true" ? [
|
|
14705
14686
|
{
|
|
14706
14687
|
label: "Use metadata server application default credentials",
|
|
14707
|
-
value:
|
|
14708
|
-
key:
|
|
14688
|
+
value: "compute-default-credentials" /* COMPUTE_ADC */,
|
|
14689
|
+
key: "compute-default-credentials" /* COMPUTE_ADC */
|
|
14709
14690
|
}
|
|
14710
14691
|
] : [],
|
|
14711
14692
|
{
|
|
14712
14693
|
label: "Use Gemini API Key",
|
|
14713
|
-
value:
|
|
14714
|
-
key:
|
|
14694
|
+
value: "gemini-api-key" /* USE_GEMINI */,
|
|
14695
|
+
key: "gemini-api-key" /* USE_GEMINI */
|
|
14715
14696
|
},
|
|
14716
14697
|
{
|
|
14717
14698
|
label: "Vertex AI",
|
|
14718
|
-
value:
|
|
14719
|
-
key:
|
|
14699
|
+
value: "vertex-ai" /* USE_VERTEX_AI */,
|
|
14700
|
+
key: "vertex-ai" /* USE_VERTEX_AI */
|
|
14720
14701
|
}
|
|
14721
14702
|
];
|
|
14722
14703
|
if (settings.merged.security.auth.enforcedType) {
|
|
@@ -14738,9 +14719,9 @@ function AuthDialog({
|
|
|
14738
14719
|
return item.value === defaultAuthType;
|
|
14739
14720
|
}
|
|
14740
14721
|
if (process.env["GEMINI_API_KEY"]) {
|
|
14741
|
-
return item.value ===
|
|
14722
|
+
return item.value === "gemini-api-key" /* USE_GEMINI */;
|
|
14742
14723
|
}
|
|
14743
|
-
return item.value ===
|
|
14724
|
+
return item.value === "oauth-personal" /* LOGIN_WITH_GOOGLE */;
|
|
14744
14725
|
});
|
|
14745
14726
|
if (settings.merged.security.auth.enforcedType) {
|
|
14746
14727
|
initialAuthIndex = 0;
|
|
@@ -14751,7 +14732,7 @@ function AuthDialog({
|
|
|
14751
14732
|
return;
|
|
14752
14733
|
}
|
|
14753
14734
|
if (authType) {
|
|
14754
|
-
const needsRestart = authType ===
|
|
14735
|
+
const needsRestart = authType === "oauth-personal" /* LOGIN_WITH_GOOGLE */ || authType === "vertex-ai" /* USE_VERTEX_AI */ && process.env["CLOUD_SHELL"] === "true";
|
|
14755
14736
|
if (needsRestart) {
|
|
14756
14737
|
setAuthContext({ requiresRestart: true });
|
|
14757
14738
|
} else {
|
|
@@ -14759,12 +14740,12 @@ function AuthDialog({
|
|
|
14759
14740
|
}
|
|
14760
14741
|
await clearCachedCredentialFile();
|
|
14761
14742
|
settings.setValue(scope, "security.auth.selectedType", authType);
|
|
14762
|
-
if (authType ===
|
|
14743
|
+
if (authType === "oauth-personal" /* LOGIN_WITH_GOOGLE */ && config.isBrowserLaunchSuppressed()) {
|
|
14763
14744
|
setExiting(true);
|
|
14764
14745
|
setTimeout(relaunchApp, 100);
|
|
14765
14746
|
return;
|
|
14766
14747
|
}
|
|
14767
|
-
if (authType ===
|
|
14748
|
+
if (authType === "gemini-api-key" /* USE_GEMINI */) {
|
|
14768
14749
|
setAuthState("awaiting_api_key_input" /* AwaitingApiKeyInput */);
|
|
14769
14750
|
return;
|
|
14770
14751
|
}
|
|
@@ -15571,11 +15552,11 @@ var PrivacyNoticeText = ({
|
|
|
15571
15552
|
}) => {
|
|
15572
15553
|
const authType = config.getContentGeneratorConfig()?.authType;
|
|
15573
15554
|
switch (authType) {
|
|
15574
|
-
case
|
|
15555
|
+
case "gemini-api-key" /* USE_GEMINI */:
|
|
15575
15556
|
return /* @__PURE__ */ (0, import_jsx_runtime83.jsx)(GeminiPrivacyNotice, { onExit });
|
|
15576
|
-
case
|
|
15557
|
+
case "vertex-ai" /* USE_VERTEX_AI */:
|
|
15577
15558
|
return /* @__PURE__ */ (0, import_jsx_runtime83.jsx)(CloudPaidPrivacyNotice, { onExit });
|
|
15578
|
-
case
|
|
15559
|
+
case "oauth-personal" /* LOGIN_WITH_GOOGLE */:
|
|
15579
15560
|
default:
|
|
15580
15561
|
return /* @__PURE__ */ (0, import_jsx_runtime83.jsx)(CloudFreePrivacyNotice, { config, onExit });
|
|
15581
15562
|
}
|
|
@@ -15635,7 +15616,7 @@ function ProQuotaDialog({
|
|
|
15635
15616
|
value: "retry_always",
|
|
15636
15617
|
key: "retry_always"
|
|
15637
15618
|
},
|
|
15638
|
-
...authType ===
|
|
15619
|
+
...authType === "oauth-personal" /* LOGIN_WITH_GOOGLE */ && !isUltra ? [
|
|
15639
15620
|
{
|
|
15640
15621
|
label: "Upgrade for higher limits",
|
|
15641
15622
|
value: "upgrade",
|
|
@@ -16795,7 +16776,7 @@ function ModelDialog({ onClose }) {
|
|
|
16795
16776
|
const useLatestFlash = config?.hasLatestFlashGAAccess?.() ?? false;
|
|
16796
16777
|
const useLatestFlashLite = config?.hasLatestFlashLiteGAAccess?.() ?? false;
|
|
16797
16778
|
const selectedAuthType = settings.merged.security.auth.selectedType;
|
|
16798
|
-
const useCustomToolModel = useGemini31 && selectedAuthType ===
|
|
16779
|
+
const useCustomToolModel = useGemini31 && selectedAuthType === "gemini-api-key" /* USE_GEMINI */;
|
|
16799
16780
|
const manualModelSelected = (0, import_react55.useMemo)(() => {
|
|
16800
16781
|
if (config?.getExperimentalDynamicModelConfiguration?.() === true && config.getModelConfigService) {
|
|
16801
16782
|
const def = config.getModelConfigService().getModelDefinition(preferredModel);
|
|
@@ -18123,10 +18104,10 @@ function initializeConsoleStore() {
|
|
|
18123
18104
|
globalConsoleMessages = [];
|
|
18124
18105
|
globalErrorCount = 0;
|
|
18125
18106
|
notifyListeners();
|
|
18126
|
-
coreEvents.off(
|
|
18127
|
-
coreEvents.off(
|
|
18128
|
-
coreEvents.on(
|
|
18129
|
-
coreEvents.on(
|
|
18107
|
+
coreEvents.off("console-log" /* ConsoleLog */, handleConsoleLog);
|
|
18108
|
+
coreEvents.off("output" /* Output */, handleOutput);
|
|
18109
|
+
coreEvents.on("console-log" /* ConsoleLog */, handleConsoleLog);
|
|
18110
|
+
coreEvents.on("output" /* Output */, handleOutput);
|
|
18130
18111
|
}
|
|
18131
18112
|
function notifyListeners() {
|
|
18132
18113
|
for (const listener of listeners) {
|
|
@@ -20263,7 +20244,7 @@ function usePromptCompletion({
|
|
|
20263
20244
|
{ model: "prompt-completion" },
|
|
20264
20245
|
contents,
|
|
20265
20246
|
signal,
|
|
20266
|
-
|
|
20247
|
+
"utility_autocomplete" /* UTILITY_AUTOCOMPLETE */
|
|
20267
20248
|
);
|
|
20268
20249
|
if (signal.aborted) {
|
|
20269
20250
|
return;
|
|
@@ -22335,9 +22316,9 @@ var InputPrompt = ({
|
|
|
22335
22316
|
onSuggestionsVisibilityChange(shouldShowSuggestions);
|
|
22336
22317
|
}
|
|
22337
22318
|
}, [shouldShowSuggestions, onSuggestionsVisibilityChange]);
|
|
22338
|
-
const showAutoAcceptStyling = !shellModeActive && approvalMode ===
|
|
22339
|
-
const showYoloStyling = !shellModeActive && approvalMode ===
|
|
22340
|
-
const showPlanStyling = !shellModeActive && approvalMode ===
|
|
22319
|
+
const showAutoAcceptStyling = !shellModeActive && approvalMode === "autoEdit" /* AUTO_EDIT */;
|
|
22320
|
+
const showYoloStyling = !shellModeActive && approvalMode === "yolo" /* YOLO */;
|
|
22321
|
+
const showPlanStyling = !shellModeActive && approvalMode === "plan" /* PLAN */;
|
|
22341
22322
|
let statusColor;
|
|
22342
22323
|
let statusText = "";
|
|
22343
22324
|
if (shellModeActive) {
|
|
@@ -23170,22 +23151,22 @@ var ApprovalModeIndicator = ({
|
|
|
23170
23151
|
const cycleHint = formatCommand("app.cycleApprovalMode" /* CYCLE_APPROVAL_MODE */);
|
|
23171
23152
|
const yoloHint = formatCommand("app.toggleYolo" /* TOGGLE_YOLO */);
|
|
23172
23153
|
switch (approvalMode) {
|
|
23173
|
-
case
|
|
23154
|
+
case "autoEdit" /* AUTO_EDIT */:
|
|
23174
23155
|
textColor = theme.status.warning;
|
|
23175
23156
|
textContent = "auto-accept edits";
|
|
23176
23157
|
subText = allowPlanMode ? `${cycleHint} to plan` : `${cycleHint} to manual`;
|
|
23177
23158
|
break;
|
|
23178
|
-
case
|
|
23159
|
+
case "plan" /* PLAN */:
|
|
23179
23160
|
textColor = theme.status.success;
|
|
23180
23161
|
textContent = "plan";
|
|
23181
23162
|
subText = `${cycleHint} to manual`;
|
|
23182
23163
|
break;
|
|
23183
|
-
case
|
|
23164
|
+
case "yolo" /* YOLO */:
|
|
23184
23165
|
textColor = theme.status.error;
|
|
23185
23166
|
textContent = "YOLO";
|
|
23186
23167
|
subText = yoloHint;
|
|
23187
23168
|
break;
|
|
23188
|
-
case
|
|
23169
|
+
case "default" /* DEFAULT */:
|
|
23189
23170
|
default:
|
|
23190
23171
|
textColor = theme.text.accent;
|
|
23191
23172
|
textContent = "";
|
|
@@ -23233,7 +23214,7 @@ var useComposerStatus = () => {
|
|
|
23233
23214
|
(item) => item.type === "tool_group"
|
|
23234
23215
|
).some(
|
|
23235
23216
|
(item) => item.tools.some(
|
|
23236
|
-
(tool) => tool.status ===
|
|
23217
|
+
(tool) => tool.status === "awaiting_approval" /* AwaitingApproval */
|
|
23237
23218
|
)
|
|
23238
23219
|
),
|
|
23239
23220
|
[uiState.pendingHistoryItems]
|
|
@@ -23248,13 +23229,13 @@ var useComposerStatus = () => {
|
|
|
23248
23229
|
const hideMinimalModeHintWhileBusy = !uiState.cleanUiDetailsVisible && (showLoadingIndicator || uiState.activeHooks.length > 0);
|
|
23249
23230
|
if (hideMinimalModeHintWhileBusy) return null;
|
|
23250
23231
|
switch (showApprovalModeIndicator) {
|
|
23251
|
-
case
|
|
23232
|
+
case "yolo" /* YOLO */:
|
|
23252
23233
|
return { text: "YOLO", color: theme.status.error };
|
|
23253
|
-
case
|
|
23234
|
+
case "plan" /* PLAN */:
|
|
23254
23235
|
return { text: "plan", color: theme.status.success };
|
|
23255
|
-
case
|
|
23236
|
+
case "autoEdit" /* AUTO_EDIT */:
|
|
23256
23237
|
return { text: "auto edit", color: theme.status.warning };
|
|
23257
|
-
case
|
|
23238
|
+
case "default" /* DEFAULT */:
|
|
23258
23239
|
default:
|
|
23259
23240
|
return null;
|
|
23260
23241
|
}
|
|
@@ -23608,7 +23589,7 @@ var ConfigInitDisplay = ({
|
|
|
23608
23589
|
let connected = 0;
|
|
23609
23590
|
const connecting = [];
|
|
23610
23591
|
for (const [name, client] of clients.entries()) {
|
|
23611
|
-
if (client.getStatus() ===
|
|
23592
|
+
if (client.getStatus() === "connected" /* CONNECTED */) {
|
|
23612
23593
|
connected++;
|
|
23613
23594
|
} else {
|
|
23614
23595
|
connecting.push(name);
|
|
@@ -23630,9 +23611,9 @@ var ConfigInitDisplay = ({
|
|
|
23630
23611
|
);
|
|
23631
23612
|
}
|
|
23632
23613
|
};
|
|
23633
|
-
coreEvents.on(
|
|
23614
|
+
coreEvents.on("mcp-client-update" /* McpClientUpdate */, onChange);
|
|
23634
23615
|
return () => {
|
|
23635
|
-
coreEvents.off(
|
|
23616
|
+
coreEvents.off("mcp-client-update" /* McpClientUpdate */, onChange);
|
|
23636
23617
|
};
|
|
23637
23618
|
}, [initialMessage]);
|
|
23638
23619
|
return /* @__PURE__ */ (0, import_jsx_runtime123.jsx)(Box_default, { marginTop: 1, children: /* @__PURE__ */ (0, import_jsx_runtime123.jsxs)(Text, { children: [
|
|
@@ -24349,7 +24330,7 @@ var useExecutionLifecycle = (addItemToHistory, setPendingHistoryItem, onExec, on
|
|
|
24349
24330
|
callId,
|
|
24350
24331
|
name: SHELL_COMMAND_NAME,
|
|
24351
24332
|
description: rawQuery,
|
|
24352
|
-
status:
|
|
24333
|
+
status: "executing" /* Executing */,
|
|
24353
24334
|
isClientInitiated: true,
|
|
24354
24335
|
resultDisplay: "",
|
|
24355
24336
|
confirmationDetails: void 0
|
|
@@ -24490,7 +24471,7 @@ __code=$?; pwd > ${escapedPwdFilePath}; exit $__code`;
|
|
|
24490
24471
|
mainContent = result.output.trim() || "(Command produced no output)";
|
|
24491
24472
|
}
|
|
24492
24473
|
let finalOutput = result.ansiOutput && result.ansiOutput.length > 0 ? result.ansiOutput : mainContent;
|
|
24493
|
-
let finalStatus =
|
|
24474
|
+
let finalStatus = "success" /* Success */;
|
|
24494
24475
|
const prependToAnsiOutput = (output, text) => {
|
|
24495
24476
|
const newLines = text.split("\n").map((line) => [
|
|
24496
24477
|
{
|
|
@@ -24509,20 +24490,20 @@ __code=$?; pwd > ${escapedPwdFilePath}; exit $__code`;
|
|
|
24509
24490
|
};
|
|
24510
24491
|
let prefix = "";
|
|
24511
24492
|
if (result.error) {
|
|
24512
|
-
finalStatus =
|
|
24493
|
+
finalStatus = "error" /* Error */;
|
|
24513
24494
|
prefix = result.error.message;
|
|
24514
24495
|
} else if (result.aborted) {
|
|
24515
|
-
finalStatus =
|
|
24496
|
+
finalStatus = "cancelled" /* Cancelled */;
|
|
24516
24497
|
prefix = "Command was cancelled.";
|
|
24517
24498
|
} else if (result.backgrounded) {
|
|
24518
|
-
finalStatus =
|
|
24499
|
+
finalStatus = "success" /* Success */;
|
|
24519
24500
|
finalOutput = `Command moved to background (PID: ${result.pid}). Output hidden. Press Ctrl+B to view.`;
|
|
24520
24501
|
mainContent = finalOutput;
|
|
24521
24502
|
} else if (result.signal) {
|
|
24522
|
-
finalStatus =
|
|
24503
|
+
finalStatus = "error" /* Error */;
|
|
24523
24504
|
prefix = `Command terminated by signal: ${result.signal}.`;
|
|
24524
24505
|
} else if (result.exitCode !== 0) {
|
|
24525
|
-
finalStatus =
|
|
24506
|
+
finalStatus = "error" /* Error */;
|
|
24526
24507
|
prefix = `Command exited with code ${result.exitCode}.`;
|
|
24527
24508
|
}
|
|
24528
24509
|
if (prefix) {
|
|
@@ -24548,7 +24529,7 @@ ${mainContent}`;
|
|
|
24548
24529
|
status: finalStatus,
|
|
24549
24530
|
resultDisplay: finalOutput
|
|
24550
24531
|
};
|
|
24551
|
-
if (finalStatus !==
|
|
24532
|
+
if (finalStatus !== "cancelled" /* Cancelled */) {
|
|
24552
24533
|
addItemToHistory(
|
|
24553
24534
|
{
|
|
24554
24535
|
type: "tool_group",
|
|
@@ -25558,13 +25539,13 @@ function useQuotaAndFallback({
|
|
|
25558
25539
|
error.retryDelayMs ? `Access resets at ${getResetTimeMessage(error.retryDelayMs)}.` : null,
|
|
25559
25540
|
`/stats model for usage details`,
|
|
25560
25541
|
`/model to switch models.`,
|
|
25561
|
-
contentGeneratorConfig?.authType ===
|
|
25542
|
+
contentGeneratorConfig?.authType === "oauth-personal" /* LOGIN_WITH_GOOGLE */ ? `/auth to switch to API key.` : null
|
|
25562
25543
|
].filter(Boolean);
|
|
25563
25544
|
message = messageLines.join("\n");
|
|
25564
25545
|
}
|
|
25565
25546
|
} else if (error instanceof ModelNotFoundError) {
|
|
25566
25547
|
isModelNotFoundError = true;
|
|
25567
|
-
if (contentGeneratorConfig?.authType ===
|
|
25548
|
+
if (contentGeneratorConfig?.authType === "vertex-ai" /* USE_VERTEX_AI */ && VALID_GEMINI_MODELS.has(failedModel)) {
|
|
25568
25549
|
const location = process.env["GOOGLE_CLOUD_LOCATION"] || "your configured region";
|
|
25569
25550
|
const messageLines = [
|
|
25570
25551
|
`Model "${failedModel}" is not available in region "${location}".`,
|
|
@@ -25758,7 +25739,7 @@ var useEditorSettings = (loadedSettings, setEditorError, addItem) => {
|
|
|
25758
25739
|
);
|
|
25759
25740
|
setEditorError(null);
|
|
25760
25741
|
setIsEditorDialogOpen(false);
|
|
25761
|
-
coreEvents.emit(
|
|
25742
|
+
coreEvents.emit("editor-selected" /* EditorSelected */, { editor: editorType });
|
|
25762
25743
|
} catch (error) {
|
|
25763
25744
|
setEditorError(`Failed to set editor preference: ${error}`);
|
|
25764
25745
|
}
|
|
@@ -25767,7 +25748,7 @@ var useEditorSettings = (loadedSettings, setEditorError, addItem) => {
|
|
|
25767
25748
|
);
|
|
25768
25749
|
const exitEditorDialog = (0, import_react91.useCallback)(() => {
|
|
25769
25750
|
setIsEditorDialogOpen(false);
|
|
25770
|
-
coreEvents.emit(
|
|
25751
|
+
coreEvents.emit("editor-selected" /* EditorSelected */, { editor: void 0 });
|
|
25771
25752
|
}, []);
|
|
25772
25753
|
return {
|
|
25773
25754
|
isEditorDialogOpen,
|
|
@@ -26144,7 +26125,7 @@ var useSlashCommandProcessor = (config, settings, addItem, clearItems, loadHisto
|
|
|
26144
26125
|
canonicalPath: resolvedCommandPath
|
|
26145
26126
|
} = parseSlashCommand(trimmed, commands);
|
|
26146
26127
|
if (!commandToExecute) {
|
|
26147
|
-
const isMcpLoading = config?.getMcpClientManager()?.getDiscoveryState() ===
|
|
26128
|
+
const isMcpLoading = config?.getMcpClientManager()?.getDiscoveryState() === "in_progress" /* IN_PROGRESS */;
|
|
26148
26129
|
if (isMcpLoading) {
|
|
26149
26130
|
setIsProcessing(true);
|
|
26150
26131
|
if (addToHistory) {
|
|
@@ -26324,7 +26305,7 @@ var useSlashCommandProcessor = (config, settings, addItem, clearItems, loadHisto
|
|
|
26324
26305
|
onConfirm: async (resolvedOutcome) => {
|
|
26325
26306
|
resolve3({
|
|
26326
26307
|
outcome: resolvedOutcome,
|
|
26327
|
-
approvedCommands: resolvedOutcome ===
|
|
26308
|
+
approvedCommands: resolvedOutcome === "cancel" /* Cancel */ ? [] : result.commandsToConfirm
|
|
26328
26309
|
});
|
|
26329
26310
|
}
|
|
26330
26311
|
};
|
|
@@ -26332,7 +26313,7 @@ var useSlashCommandProcessor = (config, settings, addItem, clearItems, loadHisto
|
|
|
26332
26313
|
callId,
|
|
26333
26314
|
name: "Expansion",
|
|
26334
26315
|
description: "Command expansion needs shell access",
|
|
26335
|
-
status:
|
|
26316
|
+
status: "awaiting_approval" /* AwaitingApproval */,
|
|
26336
26317
|
isClientInitiated: true,
|
|
26337
26318
|
resultDisplay: void 0,
|
|
26338
26319
|
confirmationDetails
|
|
@@ -26343,7 +26324,7 @@ var useSlashCommandProcessor = (config, settings, addItem, clearItems, loadHisto
|
|
|
26343
26324
|
});
|
|
26344
26325
|
});
|
|
26345
26326
|
setPendingItem(null);
|
|
26346
|
-
if (outcome ===
|
|
26327
|
+
if (outcome === "cancel" /* Cancel */ || !approvedCommands || approvedCommands.length === 0) {
|
|
26347
26328
|
addItem(
|
|
26348
26329
|
{
|
|
26349
26330
|
type: "info" /* INFO */,
|
|
@@ -26353,7 +26334,7 @@ var useSlashCommandProcessor = (config, settings, addItem, clearItems, loadHisto
|
|
|
26353
26334
|
);
|
|
26354
26335
|
return { type: "handled" };
|
|
26355
26336
|
}
|
|
26356
|
-
if (outcome ===
|
|
26337
|
+
if (outcome === "proceed_always" /* ProceedAlways */) {
|
|
26357
26338
|
setSessionShellAllowlist(
|
|
26358
26339
|
(prev) => /* @__PURE__ */ new Set([...prev, ...approvedCommands])
|
|
26359
26340
|
);
|
|
@@ -26829,7 +26810,7 @@ function mapToDisplay(toolOrTools, options = {}) {
|
|
|
26829
26810
|
let description;
|
|
26830
26811
|
let renderOutputAsMarkdown = false;
|
|
26831
26812
|
const displayName = call.tool?.displayName ?? call.request.name;
|
|
26832
|
-
if (call.status ===
|
|
26813
|
+
if (call.status === "error" /* Error */) {
|
|
26833
26814
|
description = JSON.stringify(call.request.args);
|
|
26834
26815
|
} else {
|
|
26835
26816
|
description = call.invocation.getDescription();
|
|
@@ -26852,27 +26833,27 @@ function mapToDisplay(toolOrTools, options = {}) {
|
|
|
26852
26833
|
let progress = void 0;
|
|
26853
26834
|
let progressTotal = void 0;
|
|
26854
26835
|
switch (call.status) {
|
|
26855
|
-
case
|
|
26836
|
+
case "success" /* Success */:
|
|
26856
26837
|
resultDisplay = call.response.resultDisplay;
|
|
26857
26838
|
outputFile = call.response.outputFile;
|
|
26858
26839
|
break;
|
|
26859
|
-
case
|
|
26860
|
-
case
|
|
26840
|
+
case "error" /* Error */:
|
|
26841
|
+
case "cancelled" /* Cancelled */:
|
|
26861
26842
|
resultDisplay = call.response.resultDisplay;
|
|
26862
26843
|
break;
|
|
26863
|
-
case
|
|
26844
|
+
case "awaiting_approval" /* AwaitingApproval */:
|
|
26864
26845
|
correlationId = call.correlationId;
|
|
26865
26846
|
confirmationDetails = call.confirmationDetails;
|
|
26866
26847
|
break;
|
|
26867
|
-
case
|
|
26848
|
+
case "executing" /* Executing */:
|
|
26868
26849
|
resultDisplay = call.liveOutput;
|
|
26869
26850
|
ptyId = call.pid;
|
|
26870
26851
|
progressMessage = call.progressMessage;
|
|
26871
26852
|
progress = call.progress;
|
|
26872
26853
|
progressTotal = call.progressTotal;
|
|
26873
26854
|
break;
|
|
26874
|
-
case
|
|
26875
|
-
case
|
|
26855
|
+
case "scheduled" /* Scheduled */:
|
|
26856
|
+
case "validating" /* Validating */:
|
|
26876
26857
|
break;
|
|
26877
26858
|
default: {
|
|
26878
26859
|
const exhaustiveCheck = call;
|
|
@@ -26943,7 +26924,7 @@ function useToolScheduler(onComplete, config, getPreferredEditor) {
|
|
|
26943
26924
|
const handler = (event) => {
|
|
26944
26925
|
const isRoot = event.schedulerId === ROOT_SCHEDULER_ID;
|
|
26945
26926
|
const hasExecuting = event.toolCalls.some(
|
|
26946
|
-
(tc) => tc.status ===
|
|
26927
|
+
(tc) => tc.status === "executing" /* Executing */ || (tc.status === "success" /* Success */ || tc.status === "error" /* Error */) && "tailToolCallRequest" in tc && tc.tailToolCallRequest != null
|
|
26947
26928
|
);
|
|
26948
26929
|
if (hasExecuting) {
|
|
26949
26930
|
setLastToolOutputTime(Date.now());
|
|
@@ -26952,7 +26933,7 @@ function useToolScheduler(onComplete, config, getPreferredEditor) {
|
|
|
26952
26933
|
const prevCalls = prev[event.schedulerId] ?? [];
|
|
26953
26934
|
const prevCallIds = new Set(prevCalls.map((tc) => tc.request.callId));
|
|
26954
26935
|
const filteredToolCalls = isRoot ? event.toolCalls : event.toolCalls.filter(
|
|
26955
|
-
(tc) => tc.status ===
|
|
26936
|
+
(tc) => tc.status === "awaiting_approval" /* AwaitingApproval */ || prevCallIds.has(tc.request.callId)
|
|
26956
26937
|
);
|
|
26957
26938
|
if (!isRoot && filteredToolCalls.length === 0 && prevCalls.length === 0) {
|
|
26958
26939
|
return prev;
|
|
@@ -26964,9 +26945,9 @@ function useToolScheduler(onComplete, config, getPreferredEditor) {
|
|
|
26964
26945
|
};
|
|
26965
26946
|
});
|
|
26966
26947
|
};
|
|
26967
|
-
messageBus.subscribe(
|
|
26948
|
+
messageBus.subscribe("tool-calls-update" /* TOOL_CALLS_UPDATE */, handler);
|
|
26968
26949
|
return () => {
|
|
26969
|
-
messageBus.unsubscribe(
|
|
26950
|
+
messageBus.unsubscribe("tool-calls-update" /* TOOL_CALLS_UPDATE */, handler);
|
|
26970
26951
|
};
|
|
26971
26952
|
}, [messageBus, internalAdaptToolCalls]);
|
|
26972
26953
|
(0, import_react98.useEffect)(() => {
|
|
@@ -26988,9 +26969,9 @@ function useToolScheduler(onComplete, config, getPreferredEditor) {
|
|
|
26988
26969
|
};
|
|
26989
26970
|
});
|
|
26990
26971
|
};
|
|
26991
|
-
messageBus.subscribe(
|
|
26972
|
+
messageBus.subscribe("subagent-activity" /* SUBAGENT_ACTIVITY */, handler);
|
|
26992
26973
|
return () => {
|
|
26993
|
-
messageBus.unsubscribe(
|
|
26974
|
+
messageBus.unsubscribe("subagent-activity" /* SUBAGENT_ACTIVITY */, handler);
|
|
26994
26975
|
};
|
|
26995
26976
|
}, [messageBus]);
|
|
26996
26977
|
const schedule = (0, import_react98.useCallback)(
|
|
@@ -27089,8 +27070,8 @@ function adaptToolCalls(coreCalls, prevTracked) {
|
|
|
27089
27070
|
const prev = prevMap.get(coreCall.request.callId);
|
|
27090
27071
|
const responseSubmittedToGemini = prev?.responseSubmittedToGemini ?? false;
|
|
27091
27072
|
let status = coreCall.status;
|
|
27092
|
-
if ((status ===
|
|
27093
|
-
status =
|
|
27073
|
+
if ((status === "success" /* Success */ || status === "error" /* Error */) && "tailToolCallRequest" in coreCall && coreCall.tailToolCallRequest != null) {
|
|
27074
|
+
status = "executing" /* Executing */;
|
|
27094
27075
|
}
|
|
27095
27076
|
return {
|
|
27096
27077
|
...coreCall,
|
|
@@ -27122,7 +27103,7 @@ function getBackgroundedToolInfo(toolCall) {
|
|
|
27122
27103
|
};
|
|
27123
27104
|
}
|
|
27124
27105
|
function isBackgroundableExecutingToolCall(toolCall) {
|
|
27125
|
-
return toolCall.status ===
|
|
27106
|
+
return toolCall.status === "executing" /* Executing */ && typeof toolCall.pid === "number";
|
|
27126
27107
|
}
|
|
27127
27108
|
function showCitations(settings) {
|
|
27128
27109
|
const enabled = settings.merged.ui.showCitations;
|
|
@@ -27132,14 +27113,14 @@ function showCitations(settings) {
|
|
|
27132
27113
|
return true;
|
|
27133
27114
|
}
|
|
27134
27115
|
function calculateStreamingState(isResponding, toolCalls) {
|
|
27135
|
-
if (toolCalls.some((tc) => tc.status ===
|
|
27116
|
+
if (toolCalls.some((tc) => tc.status === "awaiting_approval" /* AwaitingApproval */)) {
|
|
27136
27117
|
return "waiting_for_confirmation" /* WaitingForConfirmation */;
|
|
27137
27118
|
}
|
|
27138
27119
|
const isAnyToolActive = toolCalls.some((tc) => {
|
|
27139
|
-
if (tc.status ===
|
|
27120
|
+
if (tc.status === "executing" /* Executing */ || tc.status === "scheduled" /* Scheduled */ || tc.status === "validating" /* Validating */) {
|
|
27140
27121
|
return true;
|
|
27141
27122
|
}
|
|
27142
|
-
if (tc.status ===
|
|
27123
|
+
if (tc.status === "success" /* Success */ || tc.status === "error" /* Error */ || tc.status === "cancelled" /* Cancelled */) {
|
|
27143
27124
|
return !tc.responseSubmittedToGemini;
|
|
27144
27125
|
}
|
|
27145
27126
|
return false;
|
|
@@ -27186,9 +27167,9 @@ var useGeminiStream = (geminiClient, history, addItem, config, settings, onDebug
|
|
|
27186
27167
|
}
|
|
27187
27168
|
setRetryStatus(payload);
|
|
27188
27169
|
};
|
|
27189
|
-
coreEvents.on(
|
|
27170
|
+
coreEvents.on("retry-attempt" /* RetryAttempt */, handleRetryAttempt);
|
|
27190
27171
|
return () => {
|
|
27191
|
-
coreEvents.off(
|
|
27172
|
+
coreEvents.off("retry-attempt" /* RetryAttempt */, handleRetryAttempt);
|
|
27192
27173
|
};
|
|
27193
27174
|
}, [isRespondingRef]);
|
|
27194
27175
|
const [
|
|
@@ -27321,12 +27302,12 @@ var useGeminiStream = (geminiClient, history, addItem, config, settings, onDebug
|
|
|
27321
27302
|
const tc = toolCalls[i];
|
|
27322
27303
|
if (pushedToolCallIdsRef.current.has(tc.request.callId)) continue;
|
|
27323
27304
|
if (tc.status === "success" || tc.status === "error" || tc.status === "cancelled") {
|
|
27324
|
-
const isAgent = tc.tool?.kind ===
|
|
27305
|
+
const isAgent = tc.tool?.kind === "agent" /* Agent */;
|
|
27325
27306
|
if (isAgent) {
|
|
27326
27307
|
let contigAgentsComplete = true;
|
|
27327
27308
|
for (let j = i + 1; j < toolCalls.length; j++) {
|
|
27328
27309
|
const nextTc = toolCalls[j];
|
|
27329
|
-
if (nextTc.tool?.kind ===
|
|
27310
|
+
if (nextTc.tool?.kind === "agent" /* Agent */) {
|
|
27330
27311
|
if (nextTc.status !== "success" && nextTc.status !== "error" && nextTc.status !== "cancelled") {
|
|
27331
27312
|
contigAgentsComplete = false;
|
|
27332
27313
|
break;
|
|
@@ -27352,7 +27333,7 @@ var useGeminiStream = (geminiClient, history, addItem, config, settings, onDebug
|
|
|
27352
27333
|
let currentGroup = [];
|
|
27353
27334
|
for (const tc of toolsToPush) {
|
|
27354
27335
|
newPushed.add(tc.request.callId);
|
|
27355
|
-
if (tc.tool?.kind ===
|
|
27336
|
+
if (tc.tool?.kind === "agent" /* Agent */) {
|
|
27356
27337
|
currentGroup.push(tc);
|
|
27357
27338
|
} else {
|
|
27358
27339
|
if (currentGroup.length > 0) {
|
|
@@ -27505,7 +27486,7 @@ var useGeminiStream = (geminiClient, history, addItem, config, settings, onDebug
|
|
|
27505
27486
|
prevActiveShellPtyIdRef.current = activeShellPtyId;
|
|
27506
27487
|
}, [activeShellPtyId, addItem, setIsResponding]);
|
|
27507
27488
|
(0, import_react99.useEffect)(() => {
|
|
27508
|
-
if (config.getApprovalMode() ===
|
|
27489
|
+
if (config.getApprovalMode() === "yolo" /* YOLO */ && streamingState === "idle" /* Idle */) {
|
|
27509
27490
|
const lastUserMessageIndex = history.findLastIndex(
|
|
27510
27491
|
(item) => item.type === "user" /* USER */
|
|
27511
27492
|
);
|
|
@@ -27573,7 +27554,7 @@ var useGeminiStream = (geminiClient, history, addItem, config, settings, onDebug
|
|
|
27573
27554
|
return;
|
|
27574
27555
|
}
|
|
27575
27556
|
const hasActiveTools = toolCalls.some(
|
|
27576
|
-
(tc) => tc.status ===
|
|
27557
|
+
(tc) => tc.status === "executing" /* Executing */ || tc.status === "scheduled" /* Scheduled */ || tc.status === "validating" /* Validating */
|
|
27577
27558
|
);
|
|
27578
27559
|
if (streamingState === "idle" /* Idle */ && !isRespondingRef.current && !hasActiveTools) {
|
|
27579
27560
|
if (clearBuffer) {
|
|
@@ -27600,7 +27581,7 @@ var useGeminiStream = (geminiClient, history, addItem, config, settings, onDebug
|
|
|
27600
27581
|
if (tool.name === SHELL_COMMAND_NAME) {
|
|
27601
27582
|
return {
|
|
27602
27583
|
...tool,
|
|
27603
|
-
status:
|
|
27584
|
+
status: "cancelled" /* Cancelled */,
|
|
27604
27585
|
resultDisplay: tool.resultDisplay
|
|
27605
27586
|
};
|
|
27606
27587
|
}
|
|
@@ -27665,7 +27646,7 @@ var useGeminiStream = (geminiClient, history, addItem, config, settings, onDebug
|
|
|
27665
27646
|
let localQueryToSendToGemini = null;
|
|
27666
27647
|
if (typeof query === "string") {
|
|
27667
27648
|
const trimmedQuery = query.trim();
|
|
27668
|
-
await logger?.logMessage(
|
|
27649
|
+
await logger?.logMessage("user" /* USER */, trimmedQuery);
|
|
27669
27650
|
if (!shellModeActive) {
|
|
27670
27651
|
const slashCommandResult = isSlashCommand(trimmedQuery) ? await handleSlashCommand(trimmedQuery) : false;
|
|
27671
27652
|
if (slashCommandResult) {
|
|
@@ -27821,7 +27802,7 @@ var useGeminiStream = (geminiClient, history, addItem, config, settings, onDebug
|
|
|
27821
27802
|
if (pendingHistoryItemRef.current) {
|
|
27822
27803
|
if (pendingHistoryItemRef.current.type === "tool_group") {
|
|
27823
27804
|
const updatedTools = pendingHistoryItemRef.current.tools.map(
|
|
27824
|
-
(tool) => tool.status ===
|
|
27805
|
+
(tool) => tool.status === "validating" /* Validating */ || tool.status === "scheduled" /* Scheduled */ || tool.status === "awaiting_approval" /* AwaitingApproval */ || tool.status === "executing" /* Executing */ ? { ...tool, status: "cancelled" /* Cancelled */ } : tool
|
|
27825
27806
|
);
|
|
27826
27807
|
const pendingItem = {
|
|
27827
27808
|
...pendingHistoryItemRef.current,
|
|
@@ -28113,15 +28094,15 @@ var useGeminiStream = (geminiClient, history, addItem, config, settings, onDebug
|
|
|
28113
28094
|
let geminiMessageBuffer = "";
|
|
28114
28095
|
const toolCallRequests = [];
|
|
28115
28096
|
for await (const event of stream) {
|
|
28116
|
-
if (event.type !==
|
|
28097
|
+
if (event.type !== "thought" /* Thought */ && thoughtRef.current !== null) {
|
|
28117
28098
|
setThought(null);
|
|
28118
28099
|
}
|
|
28119
28100
|
switch (event.type) {
|
|
28120
|
-
case
|
|
28101
|
+
case "thought" /* Thought */:
|
|
28121
28102
|
setLastGeminiActivityTime(Date.now());
|
|
28122
28103
|
handleThoughtEvent(event.value, userMessageTimestamp);
|
|
28123
28104
|
break;
|
|
28124
|
-
case
|
|
28105
|
+
case "content" /* Content */:
|
|
28125
28106
|
setLastGeminiActivityTime(Date.now());
|
|
28126
28107
|
geminiMessageBuffer = handleContentEvent(
|
|
28127
28108
|
event.value,
|
|
@@ -28129,16 +28110,16 @@ var useGeminiStream = (geminiClient, history, addItem, config, settings, onDebug
|
|
|
28129
28110
|
userMessageTimestamp
|
|
28130
28111
|
);
|
|
28131
28112
|
break;
|
|
28132
|
-
case
|
|
28113
|
+
case "tool_call_request" /* ToolCallRequest */:
|
|
28133
28114
|
toolCallRequests.push(event.value);
|
|
28134
28115
|
break;
|
|
28135
|
-
case
|
|
28116
|
+
case "user_cancelled" /* UserCancelled */:
|
|
28136
28117
|
handleUserCancelledEvent(userMessageTimestamp);
|
|
28137
28118
|
break;
|
|
28138
|
-
case
|
|
28119
|
+
case "error" /* Error */:
|
|
28139
28120
|
handleErrorEvent(event.value, userMessageTimestamp);
|
|
28140
28121
|
break;
|
|
28141
|
-
case
|
|
28122
|
+
case "agent_execution_stopped" /* AgentExecutionStopped */:
|
|
28142
28123
|
handleAgentExecutionStoppedEvent(
|
|
28143
28124
|
event.value.reason,
|
|
28144
28125
|
userMessageTimestamp,
|
|
@@ -28146,7 +28127,7 @@ var useGeminiStream = (geminiClient, history, addItem, config, settings, onDebug
|
|
|
28146
28127
|
event.value.contextCleared
|
|
28147
28128
|
);
|
|
28148
28129
|
break;
|
|
28149
|
-
case
|
|
28130
|
+
case "agent_execution_blocked" /* AgentExecutionBlocked */:
|
|
28150
28131
|
handleAgentExecutionBlockedEvent(
|
|
28151
28132
|
event.value.reason,
|
|
28152
28133
|
userMessageTimestamp,
|
|
@@ -28154,36 +28135,36 @@ var useGeminiStream = (geminiClient, history, addItem, config, settings, onDebug
|
|
|
28154
28135
|
event.value.contextCleared
|
|
28155
28136
|
);
|
|
28156
28137
|
break;
|
|
28157
|
-
case
|
|
28138
|
+
case "chat_compressed" /* ChatCompressed */:
|
|
28158
28139
|
handleChatCompressionEvent(event.value, userMessageTimestamp);
|
|
28159
28140
|
break;
|
|
28160
|
-
case
|
|
28161
|
-
case
|
|
28141
|
+
case "tool_call_confirmation" /* ToolCallConfirmation */:
|
|
28142
|
+
case "tool_call_response" /* ToolCallResponse */:
|
|
28162
28143
|
break;
|
|
28163
|
-
case
|
|
28144
|
+
case "max_session_turns" /* MaxSessionTurns */:
|
|
28164
28145
|
handleMaxSessionTurnsEvent();
|
|
28165
28146
|
break;
|
|
28166
|
-
case
|
|
28147
|
+
case "context_window_will_overflow" /* ContextWindowWillOverflow */:
|
|
28167
28148
|
handleContextWindowWillOverflowEvent(
|
|
28168
28149
|
event.value.estimatedRequestTokenCount,
|
|
28169
28150
|
event.value.remainingTokenCount
|
|
28170
28151
|
);
|
|
28171
28152
|
break;
|
|
28172
|
-
case
|
|
28153
|
+
case "finished" /* Finished */:
|
|
28173
28154
|
handleFinishedEvent(event, userMessageTimestamp);
|
|
28174
28155
|
break;
|
|
28175
|
-
case
|
|
28156
|
+
case "citation" /* Citation */:
|
|
28176
28157
|
handleCitationEvent(event.value, userMessageTimestamp);
|
|
28177
28158
|
break;
|
|
28178
|
-
case
|
|
28159
|
+
case "model_info" /* ModelInfo */:
|
|
28179
28160
|
handleChatModelEvent(event.value, userMessageTimestamp);
|
|
28180
28161
|
break;
|
|
28181
|
-
case
|
|
28162
|
+
case "loop_detected" /* LoopDetected */:
|
|
28182
28163
|
loopDetectedRef.current = true;
|
|
28183
28164
|
break;
|
|
28184
|
-
case
|
|
28165
|
+
case "retry" /* Retry */:
|
|
28185
28166
|
break;
|
|
28186
|
-
case
|
|
28167
|
+
case "invalid_stream" /* InvalidStream */:
|
|
28187
28168
|
handleInvalidStreamEvent(event.value, userMessageTimestamp);
|
|
28188
28169
|
break;
|
|
28189
28170
|
default: {
|
|
@@ -28237,7 +28218,7 @@ var useGeminiStream = (geminiClient, history, addItem, config, settings, onDebug
|
|
|
28237
28218
|
const submitQuery = (0, import_react99.useCallback)(
|
|
28238
28219
|
async (query, options, prompt_id) => runInDevTraceSpan(
|
|
28239
28220
|
{
|
|
28240
|
-
operation: options?.isContinuation ?
|
|
28221
|
+
operation: options?.isContinuation ? "system_prompt" /* SystemPrompt */ : "user_prompt" /* UserPrompt */,
|
|
28241
28222
|
sessionId: config.getSessionId()
|
|
28242
28223
|
},
|
|
28243
28224
|
async ({ metadata: spanMetadata }) => {
|
|
@@ -28404,7 +28385,7 @@ var useGeminiStream = (geminiClient, history, addItem, config, settings, onDebug
|
|
|
28404
28385
|
submitQueryRef.current = submitQuery;
|
|
28405
28386
|
const handleApprovalModeChange = (0, import_react99.useCallback)(
|
|
28406
28387
|
async (newApprovalMode) => {
|
|
28407
|
-
if (previousApprovalModeRef.current ===
|
|
28388
|
+
if (previousApprovalModeRef.current === "plan" /* PLAN */ && newApprovalMode !== "plan" /* PLAN */ && streamingState === "idle" /* Idle */) {
|
|
28408
28389
|
if (geminiClient) {
|
|
28409
28390
|
try {
|
|
28410
28391
|
await geminiClient.addHistory({
|
|
@@ -28427,11 +28408,11 @@ var useGeminiStream = (geminiClient, history, addItem, config, settings, onDebug
|
|
|
28427
28408
|
}
|
|
28428
28409
|
}
|
|
28429
28410
|
previousApprovalModeRef.current = newApprovalMode;
|
|
28430
|
-
if (newApprovalMode ===
|
|
28411
|
+
if (newApprovalMode === "yolo" /* YOLO */ || newApprovalMode === "autoEdit" /* AUTO_EDIT */) {
|
|
28431
28412
|
let awaitingApprovalCalls = toolCalls.filter(
|
|
28432
28413
|
(call) => call.status === "awaiting_approval" && !call.request.forcedAsk
|
|
28433
28414
|
);
|
|
28434
|
-
if (newApprovalMode ===
|
|
28415
|
+
if (newApprovalMode === "autoEdit" /* AUTO_EDIT */) {
|
|
28435
28416
|
awaitingApprovalCalls = awaitingApprovalCalls.filter((call) => {
|
|
28436
28417
|
if (EDIT_TOOL_NAMES.has(call.request.name)) {
|
|
28437
28418
|
return true;
|
|
@@ -28447,11 +28428,11 @@ var useGeminiStream = (geminiClient, history, addItem, config, settings, onDebug
|
|
|
28447
28428
|
if (call.correlationId) {
|
|
28448
28429
|
try {
|
|
28449
28430
|
await config.getMessageBus().publish({
|
|
28450
|
-
type:
|
|
28431
|
+
type: "tool-confirmation-response" /* TOOL_CONFIRMATION_RESPONSE */,
|
|
28451
28432
|
correlationId: call.correlationId,
|
|
28452
28433
|
confirmed: true,
|
|
28453
28434
|
requiresUserConfirmation: false,
|
|
28454
|
-
outcome:
|
|
28435
|
+
outcome: "proceed_once" /* ProceedOnce */
|
|
28455
28436
|
});
|
|
28456
28437
|
} catch (error) {
|
|
28457
28438
|
debugLogger.warn(
|
|
@@ -28542,14 +28523,14 @@ var useGeminiStream = (geminiClient, history, addItem, config, settings, onDebug
|
|
|
28542
28523
|
);
|
|
28543
28524
|
if (isLowErrorVerbosity) {
|
|
28544
28525
|
suppressedToolErrorCountRef.current += geminiTools.filter(
|
|
28545
|
-
(tc) => tc.status ===
|
|
28526
|
+
(tc) => tc.status === "error" /* Error */
|
|
28546
28527
|
).length;
|
|
28547
28528
|
}
|
|
28548
28529
|
if (geminiTools.length === 0) {
|
|
28549
28530
|
return;
|
|
28550
28531
|
}
|
|
28551
28532
|
const stopExecutionTool = geminiTools.find(
|
|
28552
|
-
(tc) => tc.response.errorType ===
|
|
28533
|
+
(tc) => tc.response.errorType === "stop_execution" /* STOP_EXECUTION */
|
|
28553
28534
|
);
|
|
28554
28535
|
if (stopExecutionTool && stopExecutionTool.response.error) {
|
|
28555
28536
|
maybeAddSuppressedToolErrorNote();
|
|
@@ -28569,9 +28550,9 @@ var useGeminiStream = (geminiClient, history, addItem, config, settings, onDebug
|
|
|
28569
28550
|
(tc) => !isTopicTool2(tc.request.name)
|
|
28570
28551
|
);
|
|
28571
28552
|
const allDeclinableToolsCancelled = declinableTools.length > 0 && declinableTools.every(
|
|
28572
|
-
(tc) => tc.status ===
|
|
28553
|
+
(tc) => tc.status === "cancelled" /* Cancelled */
|
|
28573
28554
|
);
|
|
28574
|
-
const allToolsCancelled = geminiTools.length > 0 && geminiTools.every((tc) => tc.status ===
|
|
28555
|
+
const allToolsCancelled = geminiTools.length > 0 && geminiTools.every((tc) => tc.status === "cancelled" /* Cancelled */);
|
|
28575
28556
|
if (allDeclinableToolsCancelled || allToolsCancelled) {
|
|
28576
28557
|
if (!turnCancelledRef.current) {
|
|
28577
28558
|
addItem({
|
|
@@ -28657,7 +28638,7 @@ var useGeminiStream = (geminiClient, history, addItem, config, settings, onDebug
|
|
|
28657
28638
|
return;
|
|
28658
28639
|
}
|
|
28659
28640
|
const restorableToolCalls = toolCalls.filter(
|
|
28660
|
-
(toolCall) => EDIT_TOOL_NAMES.has(toolCall.request.name) && toolCall.status ===
|
|
28641
|
+
(toolCall) => EDIT_TOOL_NAMES.has(toolCall.request.name) && toolCall.status === "awaiting_approval" /* AwaitingApproval */
|
|
28661
28642
|
);
|
|
28662
28643
|
if (restorableToolCalls.length > 0) {
|
|
28663
28644
|
if (!gitService) {
|
|
@@ -28880,14 +28861,14 @@ var useAgentStream = ({
|
|
|
28880
28861
|
const displayName = legacyState?.displayName ?? event.name;
|
|
28881
28862
|
const isOutputMarkdown = legacyState?.isOutputMarkdown ?? false;
|
|
28882
28863
|
const desc = legacyState?.description ?? "";
|
|
28883
|
-
const fallbackKind =
|
|
28864
|
+
const fallbackKind = "other" /* Other */;
|
|
28884
28865
|
const newCall = {
|
|
28885
28866
|
callId: event.requestId,
|
|
28886
28867
|
name: displayName,
|
|
28887
28868
|
originalRequestName: event.name,
|
|
28888
28869
|
description: desc,
|
|
28889
28870
|
display: event.display,
|
|
28890
|
-
status:
|
|
28871
|
+
status: "scheduled" /* Scheduled */,
|
|
28891
28872
|
isClientInitiated: false,
|
|
28892
28873
|
renderOutputAsMarkdown: isOutputMarkdown,
|
|
28893
28874
|
kind: legacyState?.kind ?? fallbackKind,
|
|
@@ -28905,10 +28886,10 @@ var useAgentStream = ({
|
|
|
28905
28886
|
const evtStatus = legacyState?.status;
|
|
28906
28887
|
let status = tc.status;
|
|
28907
28888
|
if (evtStatus === "executing")
|
|
28908
|
-
status =
|
|
28909
|
-
else if (evtStatus === "error") status =
|
|
28889
|
+
status = "executing" /* Executing */;
|
|
28890
|
+
else if (evtStatus === "error") status = "error" /* Error */;
|
|
28910
28891
|
else if (evtStatus === "success")
|
|
28911
|
-
status =
|
|
28892
|
+
status = "success" /* Success */;
|
|
28912
28893
|
const display = event.display?.result;
|
|
28913
28894
|
const liveOutput = displayContentToString(display) ?? tc.resultDisplay;
|
|
28914
28895
|
const progressMessage = legacyState?.progressMessage ?? tc.progressMessage;
|
|
@@ -28941,7 +28922,7 @@ var useAgentStream = ({
|
|
|
28941
28922
|
const resultDisplay = displayContentToString(display) ?? tc.resultDisplay;
|
|
28942
28923
|
return {
|
|
28943
28924
|
...tc,
|
|
28944
|
-
status: event.isError ?
|
|
28925
|
+
status: event.isError ? "error" /* Error */ : "success" /* Success */,
|
|
28945
28926
|
display: event.display ? { ...tc.display, ...event.display } : tc.display,
|
|
28946
28927
|
resultDisplay,
|
|
28947
28928
|
outputFile
|
|
@@ -29007,7 +28988,7 @@ var useAgentStream = ({
|
|
|
29007
28988
|
if (!options?.isContinuation) {
|
|
29008
28989
|
if (typeof query === "string") {
|
|
29009
28990
|
addItem({ type: "user" /* USER */, text: query }, timestamp);
|
|
29010
|
-
void logger?.logMessage(
|
|
28991
|
+
void logger?.logMessage("user" /* USER */, query);
|
|
29011
28992
|
}
|
|
29012
28993
|
startNewPrompt();
|
|
29013
28994
|
}
|
|
@@ -30534,9 +30515,9 @@ var useFolderTrust = (settings, onTrustChange, addItem) => {
|
|
|
30534
30515
|
const handleFolderTrustSelect = (0, import_react105.useCallback)(
|
|
30535
30516
|
async (choice) => {
|
|
30536
30517
|
const trustLevelMap = {
|
|
30537
|
-
["trust_folder" /* TRUST_FOLDER */]:
|
|
30538
|
-
["trust_parent" /* TRUST_PARENT */]:
|
|
30539
|
-
["do_not_trust" /* DO_NOT_TRUST */]:
|
|
30518
|
+
["trust_folder" /* TRUST_FOLDER */]: "TRUST_FOLDER" /* TRUST_FOLDER */,
|
|
30519
|
+
["trust_parent" /* TRUST_PARENT */]: "TRUST_PARENT" /* TRUST_PARENT */,
|
|
30520
|
+
["do_not_trust" /* DO_NOT_TRUST */]: "DO_NOT_TRUST" /* DO_NOT_TRUST */
|
|
30540
30521
|
};
|
|
30541
30522
|
const trustLevel = trustLevelMap[choice];
|
|
30542
30523
|
if (!trustLevel) return;
|
|
@@ -30555,7 +30536,7 @@ var useFolderTrust = (settings, onTrustChange, addItem) => {
|
|
|
30555
30536
|
}, 100);
|
|
30556
30537
|
return;
|
|
30557
30538
|
}
|
|
30558
|
-
const currentIsTrusted = trustLevel ===
|
|
30539
|
+
const currentIsTrusted = trustLevel === "TRUST_FOLDER" /* TRUST_FOLDER */ || trustLevel === "TRUST_PARENT" /* TRUST_PARENT */;
|
|
30559
30540
|
onTrustChange(currentIsTrusted);
|
|
30560
30541
|
setIsTrusted(currentIsTrusted);
|
|
30561
30542
|
const wasTrusted = isTrusted ?? false;
|
|
@@ -31563,7 +31544,7 @@ function useMessageQueue({
|
|
|
31563
31544
|
var import_react107 = __toESM(require_react(), 1);
|
|
31564
31545
|
function useMcpStatus(config) {
|
|
31565
31546
|
const [discoveryState, setDiscoveryState] = (0, import_react107.useState)(
|
|
31566
|
-
() => config.getMcpClientManager()?.getDiscoveryState() ??
|
|
31547
|
+
() => config.getMcpClientManager()?.getDiscoveryState() ?? "not_started" /* NOT_STARTED */
|
|
31567
31548
|
);
|
|
31568
31549
|
const [mcpServerCount, setMcpServerCount] = (0, import_react107.useState)(
|
|
31569
31550
|
() => config.getMcpClientManager()?.getMcpServerCount() ?? 0
|
|
@@ -31576,12 +31557,12 @@ function useMcpStatus(config) {
|
|
|
31576
31557
|
setMcpServerCount(manager.getMcpServerCount());
|
|
31577
31558
|
}
|
|
31578
31559
|
};
|
|
31579
|
-
coreEvents.on(
|
|
31560
|
+
coreEvents.on("mcp-client-update" /* McpClientUpdate */, onChange);
|
|
31580
31561
|
return () => {
|
|
31581
|
-
coreEvents.off(
|
|
31562
|
+
coreEvents.off("mcp-client-update" /* McpClientUpdate */, onChange);
|
|
31582
31563
|
};
|
|
31583
31564
|
}, [config]);
|
|
31584
|
-
const isMcpReady = discoveryState ===
|
|
31565
|
+
const isMcpReady = discoveryState === "completed" /* COMPLETED */ || discoveryState === "not_started" /* NOT_STARTED */ && mcpServerCount === 0;
|
|
31585
31566
|
return {
|
|
31586
31567
|
discoveryState,
|
|
31587
31568
|
mcpServerCount,
|
|
@@ -31608,7 +31589,7 @@ function useApprovalModeIndicator({
|
|
|
31608
31589
|
(key) => {
|
|
31609
31590
|
let nextApprovalMode;
|
|
31610
31591
|
if (keyMatchers["app.toggleYolo" /* TOGGLE_YOLO */](key)) {
|
|
31611
|
-
if (config.isYoloModeDisabled() && config.getApprovalMode() !==
|
|
31592
|
+
if (config.isYoloModeDisabled() && config.getApprovalMode() !== "yolo" /* YOLO */) {
|
|
31612
31593
|
if (addItem) {
|
|
31613
31594
|
let text = "You cannot enter YOLO mode since it is disabled in your settings.";
|
|
31614
31595
|
const adminSettings = config.getRemoteAdminSettings();
|
|
@@ -31626,21 +31607,21 @@ function useApprovalModeIndicator({
|
|
|
31626
31607
|
}
|
|
31627
31608
|
return;
|
|
31628
31609
|
}
|
|
31629
|
-
nextApprovalMode = config.getApprovalMode() ===
|
|
31610
|
+
nextApprovalMode = config.getApprovalMode() === "yolo" /* YOLO */ ? "default" /* DEFAULT */ : "yolo" /* YOLO */;
|
|
31630
31611
|
} else if (keyMatchers["app.cycleApprovalMode" /* CYCLE_APPROVAL_MODE */](key)) {
|
|
31631
31612
|
const currentMode = config.getApprovalMode();
|
|
31632
31613
|
switch (currentMode) {
|
|
31633
|
-
case
|
|
31634
|
-
nextApprovalMode =
|
|
31614
|
+
case "default" /* DEFAULT */:
|
|
31615
|
+
nextApprovalMode = "autoEdit" /* AUTO_EDIT */;
|
|
31635
31616
|
break;
|
|
31636
|
-
case
|
|
31637
|
-
nextApprovalMode = allowPlanMode ?
|
|
31617
|
+
case "autoEdit" /* AUTO_EDIT */:
|
|
31618
|
+
nextApprovalMode = allowPlanMode ? "plan" /* PLAN */ : "default" /* DEFAULT */;
|
|
31638
31619
|
break;
|
|
31639
|
-
case
|
|
31640
|
-
nextApprovalMode =
|
|
31620
|
+
case "plan" /* PLAN */:
|
|
31621
|
+
nextApprovalMode = "default" /* DEFAULT */;
|
|
31641
31622
|
break;
|
|
31642
|
-
case
|
|
31643
|
-
nextApprovalMode =
|
|
31623
|
+
case "yolo" /* YOLO */:
|
|
31624
|
+
nextApprovalMode = "autoEdit" /* AUTO_EDIT */;
|
|
31644
31625
|
break;
|
|
31645
31626
|
default:
|
|
31646
31627
|
}
|
|
@@ -32050,11 +32031,11 @@ var useHookDisplayState = () => {
|
|
|
32050
32031
|
removeHook();
|
|
32051
32032
|
}
|
|
32052
32033
|
};
|
|
32053
|
-
coreEvents.on(
|
|
32054
|
-
coreEvents.on(
|
|
32034
|
+
coreEvents.on("hook-start" /* HookStart */, handleHookStart);
|
|
32035
|
+
coreEvents.on("hook-end" /* HookEnd */, handleHookEnd);
|
|
32055
32036
|
return () => {
|
|
32056
|
-
coreEvents.off(
|
|
32057
|
-
coreEvents.off(
|
|
32037
|
+
coreEvents.off("hook-start" /* HookStart */, handleHookStart);
|
|
32038
|
+
coreEvents.off("hook-end" /* HookEnd */, handleHookEnd);
|
|
32058
32039
|
activeTimeouts.forEach(clearTimeout);
|
|
32059
32040
|
activeTimeouts.clear();
|
|
32060
32041
|
};
|
|
@@ -32893,7 +32874,7 @@ var AppContainer = (props) => {
|
|
|
32893
32874
|
setConfigInitialized(true);
|
|
32894
32875
|
startupProfiler.flush(config);
|
|
32895
32876
|
startAutoMemoryIfEnabled(config);
|
|
32896
|
-
const sessionStartSource = resumedSessionData ?
|
|
32877
|
+
const sessionStartSource = resumedSessionData ? "resume" /* Resume */ : "startup" /* Startup */;
|
|
32897
32878
|
const result = await config.getHookSystem()?.fireSessionStartEvent(sessionStartSource);
|
|
32898
32879
|
if (result) {
|
|
32899
32880
|
const additionalContext = result.getAdditionalContext();
|
|
@@ -32920,7 +32901,7 @@ var AppContainer = (props) => {
|
|
|
32920
32901
|
);
|
|
32921
32902
|
const ideClient = await IdeClient.getInstance();
|
|
32922
32903
|
await ideClient.disconnect();
|
|
32923
|
-
await config?.getHookSystem()?.fireSessionEndEvent(
|
|
32904
|
+
await config?.getHookSystem()?.fireSessionEndEvent("exit" /* Exit */);
|
|
32924
32905
|
};
|
|
32925
32906
|
registerCleanup(cleanupFn);
|
|
32926
32907
|
return () => {
|
|
@@ -32945,11 +32926,11 @@ var AppContainer = (props) => {
|
|
|
32945
32926
|
resetTime: payload.resetTime
|
|
32946
32927
|
});
|
|
32947
32928
|
};
|
|
32948
|
-
coreEvents.on(
|
|
32949
|
-
coreEvents.on(
|
|
32929
|
+
coreEvents.on("model-changed" /* ModelChanged */, handleModelChanged);
|
|
32930
|
+
coreEvents.on("quota-changed" /* QuotaChanged */, handleQuotaChanged);
|
|
32950
32931
|
return () => {
|
|
32951
|
-
coreEvents.off(
|
|
32952
|
-
coreEvents.off(
|
|
32932
|
+
coreEvents.off("model-changed" /* ModelChanged */, handleModelChanged);
|
|
32933
|
+
coreEvents.off("quota-changed" /* QuotaChanged */, handleQuotaChanged);
|
|
32953
32934
|
};
|
|
32954
32935
|
}, [config]);
|
|
32955
32936
|
(0, import_react121.useEffect)(() => {
|
|
@@ -32962,16 +32943,16 @@ var AppContainer = (props) => {
|
|
|
32962
32943
|
const handleAgentsDiscovered = (payload) => {
|
|
32963
32944
|
setNewAgents(payload.agents);
|
|
32964
32945
|
};
|
|
32965
|
-
coreEvents.on(
|
|
32966
|
-
coreEvents.on(
|
|
32967
|
-
coreEvents.on(
|
|
32946
|
+
coreEvents.on("settings-changed" /* SettingsChanged */, handleSettingsChanged);
|
|
32947
|
+
coreEvents.on("admin-settings-changed" /* AdminSettingsChanged */, handleAdminSettingsChanged);
|
|
32948
|
+
coreEvents.on("agents-discovered" /* AgentsDiscovered */, handleAgentsDiscovered);
|
|
32968
32949
|
return () => {
|
|
32969
|
-
coreEvents.off(
|
|
32950
|
+
coreEvents.off("settings-changed" /* SettingsChanged */, handleSettingsChanged);
|
|
32970
32951
|
coreEvents.off(
|
|
32971
|
-
|
|
32952
|
+
"admin-settings-changed" /* AdminSettingsChanged */,
|
|
32972
32953
|
handleAdminSettingsChanged
|
|
32973
32954
|
);
|
|
32974
|
-
coreEvents.off(
|
|
32955
|
+
coreEvents.off("agents-discovered" /* AgentsDiscovered */, handleAgentsDiscovered);
|
|
32975
32956
|
};
|
|
32976
32957
|
}, [settings]);
|
|
32977
32958
|
const { errorCount, clearErrorCount } = useErrorCount();
|
|
@@ -33038,11 +33019,11 @@ var AppContainer = (props) => {
|
|
|
33038
33019
|
exitEditorDialog
|
|
33039
33020
|
} = useEditorSettings(settings, setEditorError, historyManager.addItem);
|
|
33040
33021
|
(0, import_react121.useEffect)(() => {
|
|
33041
|
-
coreEvents.on(
|
|
33042
|
-
coreEvents.on(
|
|
33022
|
+
coreEvents.on("external-editor-closed" /* ExternalEditorClosed */, handleEditorClose);
|
|
33023
|
+
coreEvents.on("request-editor-selection" /* RequestEditorSelection */, openEditorDialog);
|
|
33043
33024
|
return () => {
|
|
33044
|
-
coreEvents.off(
|
|
33045
|
-
coreEvents.off(
|
|
33025
|
+
coreEvents.off("external-editor-closed" /* ExternalEditorClosed */, handleEditorClose);
|
|
33026
|
+
coreEvents.off("request-editor-selection" /* RequestEditorSelection */, openEditorDialog);
|
|
33046
33027
|
};
|
|
33047
33028
|
}, [handleEditorClose, openEditorDialog]);
|
|
33048
33029
|
(0, import_react121.useEffect)(() => {
|
|
@@ -33110,7 +33091,7 @@ var AppContainer = (props) => {
|
|
|
33110
33091
|
errorVerbosity: settings.merged.ui.errorVerbosity
|
|
33111
33092
|
});
|
|
33112
33093
|
const isAuthDialogOpen = authState === "updating" /* Updating */;
|
|
33113
|
-
const isAuthenticating = authState === "unauthenticated" /* Unauthenticated */ && settings.merged.security.auth.selectedType !==
|
|
33094
|
+
const isAuthenticating = authState === "unauthenticated" /* Unauthenticated */ && settings.merged.security.auth.selectedType !== "gemini-api-key" /* USE_GEMINI */;
|
|
33114
33095
|
const isGeminiClientInitialized = config.getGeminiClient()?.isInitialized();
|
|
33115
33096
|
const { loadHistoryForResume, isResuming } = useSessionResume({
|
|
33116
33097
|
config,
|
|
@@ -33138,7 +33119,7 @@ var AppContainer = (props) => {
|
|
|
33138
33119
|
async (authType, scope) => {
|
|
33139
33120
|
if (authType) {
|
|
33140
33121
|
const previousAuthType = config.getContentGeneratorConfig()?.authType ?? "unknown";
|
|
33141
|
-
if (authType ===
|
|
33122
|
+
if (authType === "oauth-personal" /* LOGIN_WITH_GOOGLE */) {
|
|
33142
33123
|
setAuthContext({ requiresRestart: true });
|
|
33143
33124
|
} else {
|
|
33144
33125
|
setAuthContext({});
|
|
@@ -33166,7 +33147,7 @@ var AppContainer = (props) => {
|
|
|
33166
33147
|
);
|
|
33167
33148
|
return;
|
|
33168
33149
|
}
|
|
33169
|
-
if (authType ===
|
|
33150
|
+
if (authType === "oauth-personal" /* LOGIN_WITH_GOOGLE */ && config.isBrowserLaunchSuppressed()) {
|
|
33170
33151
|
writeToStdout(`
|
|
33171
33152
|
----------------------------------------------------------------
|
|
33172
33153
|
Logging in with Google... Restarting Gemini CLI to continue.
|
|
@@ -33189,7 +33170,7 @@ Logging in with Google... Restarting Gemini CLI to continue.
|
|
|
33189
33170
|
}
|
|
33190
33171
|
await saveApiKey(apiKey);
|
|
33191
33172
|
await reloadApiKey();
|
|
33192
|
-
await config.refreshAuth(
|
|
33173
|
+
await config.refreshAuth("gemini-api-key" /* USE_GEMINI */);
|
|
33193
33174
|
setAuthState("authenticated" /* Authenticated */);
|
|
33194
33175
|
} catch (e) {
|
|
33195
33176
|
onAuthError(
|
|
@@ -33214,7 +33195,7 @@ Logging in with Google... Restarting Gemini CLI to continue.
|
|
|
33214
33195
|
`Authentication is enforced to be ${settings.merged.security.auth.enforcedType}, but you are currently using ${settings.merged.security.auth.selectedType}.`
|
|
33215
33196
|
);
|
|
33216
33197
|
} else if (settings.merged.security.auth.selectedType && !settings.merged.security.auth.useExternal) {
|
|
33217
|
-
if (settings.merged.security.auth.selectedType ===
|
|
33198
|
+
if (settings.merged.security.auth.selectedType === "gemini-api-key" /* USE_GEMINI */) {
|
|
33218
33199
|
return;
|
|
33219
33200
|
}
|
|
33220
33201
|
const authMethod = settings.merged.security.auth.selectedType;
|
|
@@ -33350,9 +33331,9 @@ Logging in with Google... Restarting Gemini CLI to continue.
|
|
|
33350
33331
|
}
|
|
33351
33332
|
});
|
|
33352
33333
|
};
|
|
33353
|
-
coreEvents.on(
|
|
33334
|
+
coreEvents.on("consent-request" /* ConsentRequest */, handleConsentRequest);
|
|
33354
33335
|
return () => {
|
|
33355
|
-
coreEvents.off(
|
|
33336
|
+
coreEvents.off("consent-request" /* ConsentRequest */, handleConsentRequest);
|
|
33356
33337
|
};
|
|
33357
33338
|
}, []);
|
|
33358
33339
|
const performMemoryRefresh = (0, import_react121.useCallback)(async () => {
|
|
@@ -34010,7 +33991,7 @@ ${queuedText}` : queuedText;
|
|
|
34010
33991
|
if (keyMatchers["app.showErrorDetails" /* SHOW_ERROR_DETAILS */](key)) {
|
|
34011
33992
|
if (settings.merged.general.devtools) {
|
|
34012
33993
|
void (async () => {
|
|
34013
|
-
const { toggleDevToolsPanel } = await import("./devtoolsService-
|
|
33994
|
+
const { toggleDevToolsPanel } = await import("./devtoolsService-KPCAEWJX.js");
|
|
34014
33995
|
await toggleDevToolsPanel(
|
|
34015
33996
|
config,
|
|
34016
33997
|
showErrorDetails,
|
|
@@ -34228,17 +34209,17 @@ ${queuedText}` : queuedText;
|
|
|
34228
34209
|
Date.now()
|
|
34229
34210
|
);
|
|
34230
34211
|
};
|
|
34231
|
-
coreEvents.on(
|
|
34232
|
-
coreEvents.on(
|
|
34212
|
+
coreEvents.on("user-feedback" /* UserFeedback */, handleUserFeedback);
|
|
34213
|
+
coreEvents.on("hook-system-message" /* HookSystemMessage */, handleHookSystemMessage);
|
|
34233
34214
|
coreEvents.drainBacklogs();
|
|
34234
34215
|
return () => {
|
|
34235
|
-
coreEvents.off(
|
|
34236
|
-
coreEvents.off(
|
|
34216
|
+
coreEvents.off("user-feedback" /* UserFeedback */, handleUserFeedback);
|
|
34217
|
+
coreEvents.off("hook-system-message" /* HookSystemMessage */, handleHookSystemMessage);
|
|
34237
34218
|
};
|
|
34238
34219
|
}, [historyManager]);
|
|
34239
34220
|
const nightly = props.version.includes("nightly");
|
|
34240
34221
|
const isAwaitingLoginRestart = authState === "awaiting_login_restart" /* AwaitingLoginRestart */;
|
|
34241
|
-
const loginRestartMessage = settings.merged.security.auth.selectedType ===
|
|
34222
|
+
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;
|
|
34242
34223
|
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;
|
|
34243
34224
|
const hasPendingToolConfirmation = (0, import_react121.useMemo)(
|
|
34244
34225
|
() => isToolAwaitingConfirmation(pendingHistoryItems),
|
|
@@ -34338,9 +34319,9 @@ ${queuedText}` : queuedText;
|
|
|
34338
34319
|
const handleMemoryChanged = (result) => {
|
|
34339
34320
|
setGeminiMdFileCount(result.fileCount);
|
|
34340
34321
|
};
|
|
34341
|
-
coreEvents.on(
|
|
34322
|
+
coreEvents.on("memory-changed" /* MemoryChanged */, handleMemoryChanged);
|
|
34342
34323
|
return () => {
|
|
34343
|
-
coreEvents.off(
|
|
34324
|
+
coreEvents.off("memory-changed" /* MemoryChanged */, handleMemoryChanged);
|
|
34344
34325
|
};
|
|
34345
34326
|
}, []);
|
|
34346
34327
|
(0, import_react121.useEffect)(() => {
|