@google/gemini-cli 0.41.0-preview.2 → 0.41.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-LBPROGQS.js → chunk-4CB5QYON.js} +1 -1
- package/bundle/{chunk-4GYMEM7F.js → chunk-5ECQHX5C.js} +2 -2
- package/bundle/{chunk-ODPEYGXR.js → chunk-5ZVQP4WN.js} +1 -1
- package/bundle/{chunk-FQGCL5I2.js → chunk-7LNZOOC7.js} +6 -6
- package/bundle/{chunk-ANBD6P4M.js → chunk-B2LNN6KY.js} +4 -4
- package/bundle/{chunk-BDZNOCWJ.js → chunk-CSDNDSTO.js} +4 -4
- package/bundle/{chunk-BYSXGJG3.js → chunk-CWJ5KY34.js} +1 -1
- package/bundle/{chunk-OR5JBPQX.js → chunk-CZW4D4RQ.js} +1 -1
- package/bundle/{chunk-ZHHJJC4N.js → chunk-F6MNV4SZ.js} +6 -6
- package/bundle/{chunk-2YV27CKR.js → chunk-G2G5UOIR.js} +2 -2
- package/bundle/{chunk-L35AXZHM.js → chunk-GLO32GZ3.js} +12456 -6676
- package/bundle/{chunk-2E4E2OEF.js → chunk-J7E7PI4S.js} +2 -2
- package/bundle/{chunk-V2QQW5SA.js → chunk-KHDD5ZQT.js} +1 -1
- package/bundle/{chunk-7CD6GCRT.js → chunk-KMY2ICHB.js} +1 -1
- package/bundle/{chunk-3GHJ5HPF.js → chunk-KYES7RJ6.js} +54 -67
- package/bundle/{chunk-RYFTYJ75.js → chunk-RVECIZP6.js} +1 -1
- package/bundle/{chunk-HOQYVHXU.js → chunk-TOU7GDCS.js} +3 -3
- package/bundle/{chunk-S4SLTOZU.js → chunk-V7GQYOIO.js} +12 -14
- package/bundle/{cleanup-HRWHMMWM.js → cleanup-KMEBTV6K.js} +2 -2
- package/bundle/{cleanup-2BMR4MMJ.js → cleanup-OJM7LXCH.js} +2 -2
- package/bundle/{cleanup-FHOD65Y6.js → cleanup-PMJYRELA.js} +3 -3
- package/bundle/{core-TKDA7N4G.js → core-4PBU56P6.js} +1 -1
- package/bundle/{dist-PGH3GHGN.js → core-MMHOAGLI.js} +2 -2
- package/bundle/{devtoolsService-V2NU6TJG.js → devtoolsService-ARI22QWG.js} +2 -2
- package/bundle/{devtoolsService-7LCCYOTU.js → devtoolsService-BDOWEGHR.js} +4 -5
- package/bundle/{devtoolsService-6EOO2BQ7.js → devtoolsService-YPN2GRY7.js} +2 -2
- package/bundle/{dist-KFV2ASJV.js → dist-V6XXY2AS.js} +1 -1
- package/bundle/{gemini-YG4MES4L.js → gemini-GSCVWK7Y.js} +175 -191
- package/bundle/{gemini-FLUMXCL4.js → gemini-LDARUG77.js} +12 -12
- package/bundle/{gemini-GNABGJLN.js → gemini-RGSMPB6F.js} +12 -12
- package/bundle/gemini.js +3 -3
- package/bundle/{interactiveCli-JNHY7R4J.js → interactiveCli-5JCJD3F5.js} +7 -7
- package/bundle/{interactiveCli-VP7SGM2Z.js → interactiveCli-KSSJ4M5C.js} +7 -7
- package/bundle/{interactiveCli-ZWNNSDPF.js → interactiveCli-ZNAMZNEE.js} +273 -291
- package/bundle/{liteRtServerManager-D3KQXYD2.js → liteRtServerManager-I6PXKOCJ.js} +3 -3
- package/bundle/{liteRtServerManager-OYB4D65F.js → liteRtServerManager-PG57YSDR.js} +3 -3
- package/bundle/{liteRtServerManager-4OYQKJDU.js → liteRtServerManager-QZCLWSIV.js} +4 -4
- package/bundle/node_modules/@google/gemini-cli-devtools/package.json +1 -1
- package/bundle/{oauth2-provider-BT67SZ33.js → oauth2-provider-356MTA5N.js} +1 -1
- package/bundle/{oauth2-provider-LDPCE34C.js → oauth2-provider-MV6Q65XJ.js} +1 -1
- package/bundle/{oauth2-provider-KNDXPBH3.js → oauth2-provider-SWABWSBH.js} +73 -39
- package/bundle/{start-3OOWLPJZ.js → start-FWXRAXKY.js} +5 -5
- package/bundle/{start-U3FP4KVT.js → start-MWJKRZPA.js} +6 -6
- package/bundle/{start-6T3XMMID.js → start-S2GPZKGW.js} +5 -5
- package/package.json +1 -1
- package/bundle/chunk-3Q7BP33C.js +0 -80034
- package/bundle/chunk-6P6WKPYI.js +0 -156
- package/bundle/chunk-FZXNSS2J.js +0 -118
- package/bundle/chunk-SR4PMLVP.js +0 -354496
- package/bundle/chunk-VHJM22NK.js +0 -1571
- package/bundle/chunk-XBNSSOYA.js +0 -17656
- package/bundle/cleanup-TCNEYDWT.js +0 -33
- package/bundle/devtoolsService-EFVBXKEX.js +0 -857
- package/bundle/dist-VXU5NT6O.js +0 -2068
- package/bundle/gemini-V7YPSW3T.js +0 -15988
- package/bundle/interactiveCli-MD3WNLOS.js +0 -35052
- package/bundle/liteRtServerManager-ONE7YJHO.js +0 -65
- package/bundle/oauth2-provider-RGOB2KSE.js +0 -237
- package/bundle/start-LNWEO65C.js +0 -18
|
@@ -152,13 +152,13 @@ import {
|
|
|
152
152
|
widestLineFromStyledChars,
|
|
153
153
|
wordBreakStyledChars,
|
|
154
154
|
wrapStyledChars
|
|
155
|
-
} from "./chunk-
|
|
155
|
+
} from "./chunk-KYES7RJ6.js";
|
|
156
156
|
import {
|
|
157
157
|
appEvents
|
|
158
158
|
} from "./chunk-5PS3AYFU.js";
|
|
159
159
|
import {
|
|
160
160
|
require_source
|
|
161
|
-
} from "./chunk-
|
|
161
|
+
} from "./chunk-KHDD5ZQT.js";
|
|
162
162
|
import {
|
|
163
163
|
ACTIVE_SHELL_MAX_LINES,
|
|
164
164
|
COMPACT_TOOL_SUBVIEW_MAX_LINES,
|
|
@@ -211,21 +211,19 @@ import {
|
|
|
211
211
|
stringWidth,
|
|
212
212
|
stripUnsafeCharacters,
|
|
213
213
|
toCodePoints
|
|
214
|
-
} from "./chunk-
|
|
214
|
+
} from "./chunk-V7GQYOIO.js";
|
|
215
215
|
import {
|
|
216
216
|
registerCleanup,
|
|
217
217
|
removeCleanup,
|
|
218
218
|
runExitCleanup,
|
|
219
219
|
setupTtyCheck
|
|
220
|
-
} from "./chunk-
|
|
220
|
+
} from "./chunk-G2G5UOIR.js";
|
|
221
221
|
import {
|
|
222
222
|
ApiKeyUpdatedEvent,
|
|
223
223
|
AsyncFzf,
|
|
224
224
|
AudioRecorder,
|
|
225
225
|
AuthType,
|
|
226
|
-
CompressionStatus,
|
|
227
226
|
ConversationFinishedEvent,
|
|
228
|
-
CoreToolCallStatus,
|
|
229
227
|
CreditPurchaseClickEvent,
|
|
230
228
|
EDITOR_DISPLAY_NAMES,
|
|
231
229
|
EmptyWalletMenuShownEvent,
|
|
@@ -235,16 +233,11 @@ import {
|
|
|
235
233
|
FileSearchFactory,
|
|
236
234
|
FolderTrustDiscoveryService,
|
|
237
235
|
G1_UTM_CAMPAIGNS,
|
|
238
|
-
GeminiCliOperation,
|
|
239
|
-
GeminiEventType,
|
|
240
236
|
GitService,
|
|
241
237
|
IdeClient,
|
|
242
238
|
LegacyAgentProtocol,
|
|
243
239
|
LlmRole,
|
|
244
240
|
Logger,
|
|
245
|
-
MCPDiscoveryState,
|
|
246
|
-
MCPServerStatus,
|
|
247
|
-
MessageSenderType,
|
|
248
241
|
ModelNotFoundError,
|
|
249
242
|
ModelSlashCommandEvent,
|
|
250
243
|
OverageMenuShownEvent,
|
|
@@ -253,18 +246,14 @@ import {
|
|
|
253
246
|
ProjectIdRequiredError,
|
|
254
247
|
ROOT_SCHEDULER_ID,
|
|
255
248
|
Scheduler,
|
|
256
|
-
SessionEndReason,
|
|
257
|
-
SessionStartSource,
|
|
258
249
|
ShellExecutionService,
|
|
259
250
|
SlashCommandStatus,
|
|
260
251
|
TerminalQuotaError,
|
|
261
252
|
TranscriptionFactory,
|
|
262
|
-
TrustLevel,
|
|
263
253
|
UserAccountManager,
|
|
264
254
|
UserPromptEvent,
|
|
265
255
|
UserTierId,
|
|
266
256
|
ValidationRequiredError,
|
|
267
|
-
WarningPriority,
|
|
268
257
|
WhisperModelManager,
|
|
269
258
|
addMCPStatusChangeListener,
|
|
270
259
|
allowEditorTypeInSandbox,
|
|
@@ -349,13 +338,11 @@ import {
|
|
|
349
338
|
validatePlanContent,
|
|
350
339
|
validatePlanPath,
|
|
351
340
|
writeToStdout
|
|
352
|
-
} from "./chunk-
|
|
341
|
+
} from "./chunk-GLO32GZ3.js";
|
|
353
342
|
import {
|
|
354
343
|
ACTIVATE_SKILL_TOOL_NAME,
|
|
355
344
|
AGENT_TOOL_NAME,
|
|
356
|
-
ApprovalMode,
|
|
357
345
|
ChangeAuthRequestedError,
|
|
358
|
-
CoreEvent,
|
|
359
346
|
DEFAULT_GEMINI_FLASH_LITE_MODEL,
|
|
360
347
|
DEFAULT_GEMINI_FLASH_MODEL,
|
|
361
348
|
DEFAULT_GEMINI_MODEL,
|
|
@@ -368,16 +355,13 @@ import {
|
|
|
368
355
|
GEMMA_4_31B_IT_MODEL,
|
|
369
356
|
GLOB_DISPLAY_NAME,
|
|
370
357
|
GREP_DISPLAY_NAME,
|
|
371
|
-
Kind,
|
|
372
358
|
LS_DISPLAY_NAME,
|
|
373
|
-
MessageBusType,
|
|
374
359
|
PREVIEW_GEMINI_3_1_CUSTOM_TOOLS_MODEL,
|
|
375
360
|
PREVIEW_GEMINI_3_1_FLASH_LITE_MODEL,
|
|
376
361
|
PREVIEW_GEMINI_3_1_MODEL,
|
|
377
362
|
PREVIEW_GEMINI_FLASH_MODEL,
|
|
378
363
|
PREVIEW_GEMINI_MODEL,
|
|
379
364
|
PREVIEW_GEMINI_MODEL_AUTO,
|
|
380
|
-
QuestionType,
|
|
381
365
|
READ_FILE_DISPLAY_NAME,
|
|
382
366
|
READ_MANY_FILES_DISPLAY_NAME,
|
|
383
367
|
SHELL_TOOL_NAME,
|
|
@@ -385,8 +369,6 @@ import {
|
|
|
385
369
|
TOPIC_PARAM_STRATEGIC_INTENT,
|
|
386
370
|
TOPIC_PARAM_SUMMARY,
|
|
387
371
|
TOPIC_PARAM_TITLE,
|
|
388
|
-
ToolConfirmationOutcome,
|
|
389
|
-
ToolErrorType,
|
|
390
372
|
UPDATE_TOPIC_DISPLAY_NAME,
|
|
391
373
|
UPDATE_TOPIC_TOOL_NAME,
|
|
392
374
|
UnauthorizedError,
|
|
@@ -416,7 +398,7 @@ import {
|
|
|
416
398
|
safeJsonToMarkdown,
|
|
417
399
|
shortenPath,
|
|
418
400
|
tildeifyPath
|
|
419
|
-
} from "./chunk-
|
|
401
|
+
} from "./chunk-XRLFHCHC.js";
|
|
420
402
|
import "./chunk-664ZODQF.js";
|
|
421
403
|
import "./chunk-RJTRUG2J.js";
|
|
422
404
|
import "./chunk-IUUIT4SU.js";
|
|
@@ -5755,7 +5737,7 @@ function calculateShellMaxLines(options) {
|
|
|
5755
5737
|
if (isAlternateBuffer && isThisShellFocused2 && !constrainHeight) {
|
|
5756
5738
|
return maxLinesBasedOnHeight;
|
|
5757
5739
|
}
|
|
5758
|
-
const isExecuting = status ===
|
|
5740
|
+
const isExecuting = status === "executing" /* Executing */;
|
|
5759
5741
|
const shellMaxLinesLimit = isExecuting ? ACTIVE_SHELL_MAX_LINES - SHELL_CONTENT_OVERHEAD : COMPLETED_SHELL_MAX_LINES - SHELL_CONTENT_OVERHEAD;
|
|
5760
5742
|
return Math.min(maxLinesBasedOnHeight, shellMaxLinesLimit);
|
|
5761
5743
|
}
|
|
@@ -5788,10 +5770,10 @@ function isShellTool(name) {
|
|
|
5788
5770
|
return name === SHELL_COMMAND_NAME || name === SHELL_NAME || name === SHELL_TOOL_NAME;
|
|
5789
5771
|
}
|
|
5790
5772
|
function isThisShellFocusable(name, status, config) {
|
|
5791
|
-
return !!(isShellTool(name) && status ===
|
|
5773
|
+
return !!(isShellTool(name) && status === "executing" /* Executing */ && config?.getEnableInteractiveShell());
|
|
5792
5774
|
}
|
|
5793
5775
|
function isThisShellFocused(name, status, ptyId, activeShellPtyId, embeddedShellFocused) {
|
|
5794
|
-
return !!(isShellTool(name) && status ===
|
|
5776
|
+
return !!(isShellTool(name) && status === "executing" /* Executing */ && ptyId === activeShellPtyId && embeddedShellFocused);
|
|
5795
5777
|
}
|
|
5796
5778
|
function useFocusHint(isThisShellFocusable2, isThisShellFocused2, resultDisplay) {
|
|
5797
5779
|
const [userHasFocused, setUserHasFocused] = (0, import_react16.useState)(false);
|
|
@@ -6389,7 +6371,7 @@ var ToolMessage = ({
|
|
|
6389
6371
|
paddingX: 1,
|
|
6390
6372
|
flexDirection: "column",
|
|
6391
6373
|
children: [
|
|
6392
|
-
status ===
|
|
6374
|
+
status === "executing" /* Executing */ && progress !== void 0 && /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(
|
|
6393
6375
|
McpProgressIndicator,
|
|
6394
6376
|
{
|
|
6395
6377
|
progress,
|
|
@@ -6406,8 +6388,8 @@ var ToolMessage = ({
|
|
|
6406
6388
|
terminalWidth,
|
|
6407
6389
|
renderOutputAsMarkdown,
|
|
6408
6390
|
hasFocus: isThisShellFocused2,
|
|
6409
|
-
maxLines: kind ===
|
|
6410
|
-
overflowDirection: kind ===
|
|
6391
|
+
maxLines: kind === "agent" /* Agent */ && availableTerminalHeight !== void 0 ? SUBAGENT_MAX_LINES : void 0,
|
|
6392
|
+
overflowDirection: kind === "agent" /* Agent */ ? "bottom" : "top"
|
|
6411
6393
|
}
|
|
6412
6394
|
),
|
|
6413
6395
|
isThisShellFocused2 && config && /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(Box_default, { paddingLeft: STATUS_INDICATOR_WIDTH, marginTop: 1, children: /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(
|
|
@@ -6740,7 +6722,7 @@ function getInitialTrustState(settings, cwd5, isCurrentWorkspace) {
|
|
|
6740
6722
|
settings.merged,
|
|
6741
6723
|
process3.cwd()
|
|
6742
6724
|
);
|
|
6743
|
-
const isInheritedTrust = isTrusted && (!explicitTrustLevel || explicitTrustLevel ===
|
|
6725
|
+
const isInheritedTrust = isTrusted && (!explicitTrustLevel || explicitTrustLevel === "DO_NOT_TRUST" /* DO_NOT_TRUST */);
|
|
6744
6726
|
return {
|
|
6745
6727
|
currentTrustLevel: explicitTrustLevel,
|
|
6746
6728
|
isInheritedTrustFromParent: !!(source === "file" && isInheritedTrust),
|
|
@@ -6785,7 +6767,7 @@ var usePermissionsModifyTrust = (onExit, addItem, targetDirectory) => {
|
|
|
6785
6767
|
process3.cwd(),
|
|
6786
6768
|
newConfig
|
|
6787
6769
|
);
|
|
6788
|
-
if (trustLevel ===
|
|
6770
|
+
if (trustLevel === "DO_NOT_TRUST" /* DO_NOT_TRUST */ && isTrusted) {
|
|
6789
6771
|
let message = "Note: This folder is still trusted because the connected IDE workspace is trusted.";
|
|
6790
6772
|
if (source === "file") {
|
|
6791
6773
|
message = "Note: This folder is still trusted because a parent folder is trusted.";
|
|
@@ -6859,18 +6841,18 @@ function PermissionsModifyTrustDialog({
|
|
|
6859
6841
|
const TRUST_LEVEL_ITEMS = [
|
|
6860
6842
|
{
|
|
6861
6843
|
label: `Trust this folder (${dirName})`,
|
|
6862
|
-
value:
|
|
6863
|
-
key:
|
|
6844
|
+
value: "TRUST_FOLDER" /* TRUST_FOLDER */,
|
|
6845
|
+
key: "TRUST_FOLDER" /* TRUST_FOLDER */
|
|
6864
6846
|
},
|
|
6865
6847
|
{
|
|
6866
6848
|
label: `Trust parent folder (${parentFolder})`,
|
|
6867
|
-
value:
|
|
6868
|
-
key:
|
|
6849
|
+
value: "TRUST_PARENT" /* TRUST_PARENT */,
|
|
6850
|
+
key: "TRUST_PARENT" /* TRUST_PARENT */
|
|
6869
6851
|
},
|
|
6870
6852
|
{
|
|
6871
6853
|
label: "Don't trust",
|
|
6872
|
-
value:
|
|
6873
|
-
key:
|
|
6854
|
+
value: "DO_NOT_TRUST" /* DO_NOT_TRUST */,
|
|
6855
|
+
key: "DO_NOT_TRUST" /* DO_NOT_TRUST */
|
|
6874
6856
|
}
|
|
6875
6857
|
];
|
|
6876
6858
|
const {
|
|
@@ -7107,7 +7089,7 @@ var ShellToolMessage = ({
|
|
|
7107
7089
|
maxLinesLimit: maxLines
|
|
7108
7090
|
});
|
|
7109
7091
|
import_react23.default.useEffect(() => {
|
|
7110
|
-
const isExecuting = status ===
|
|
7092
|
+
const isExecuting = status === "executing" /* Executing */;
|
|
7111
7093
|
if (isExecuting && ptyId) {
|
|
7112
7094
|
try {
|
|
7113
7095
|
const childWidth = terminalWidth - 4;
|
|
@@ -7293,14 +7275,14 @@ var ToolActionsProvider = (props) => {
|
|
|
7293
7275
|
}
|
|
7294
7276
|
const details = tool.confirmationDetails;
|
|
7295
7277
|
if (details?.type === "edit" && isDiffingEnabled && "filePath" in details) {
|
|
7296
|
-
const cliOutcome = outcome ===
|
|
7278
|
+
const cliOutcome = outcome === "cancel" /* Cancel */ ? "rejected" : "accepted";
|
|
7297
7279
|
await ideClient?.resolveDiffFromCli(details.filePath, cliOutcome);
|
|
7298
7280
|
}
|
|
7299
7281
|
if (tool.correlationId) {
|
|
7300
7282
|
await config.getMessageBus().publish({
|
|
7301
|
-
type:
|
|
7283
|
+
type: "tool-confirmation-response" /* TOOL_CONFIRMATION_RESPONSE */,
|
|
7302
7284
|
correlationId: tool.correlationId,
|
|
7303
|
-
confirmed: outcome !==
|
|
7285
|
+
confirmed: outcome !== "cancel" /* Cancel */,
|
|
7304
7286
|
requiresUserConfirmation: false,
|
|
7305
7287
|
outcome,
|
|
7306
7288
|
payload
|
|
@@ -7319,7 +7301,7 @@ var ToolActionsProvider = (props) => {
|
|
|
7319
7301
|
);
|
|
7320
7302
|
const cancel = (0, import_react24.useCallback)(
|
|
7321
7303
|
async (callId) => {
|
|
7322
|
-
await confirm(callId,
|
|
7304
|
+
await confirm(callId, "cancel" /* Cancel */);
|
|
7323
7305
|
},
|
|
7324
7306
|
[confirm]
|
|
7325
7307
|
);
|
|
@@ -7606,22 +7588,22 @@ var hasPayload = (res) => {
|
|
|
7606
7588
|
function getFileOpData(diff, status, resultDisplay, terminalWidth, availableTerminalHeight, isClickable) {
|
|
7607
7589
|
const added = (diff.diffStat?.model_added_lines ?? 0) + (diff.diffStat?.user_added_lines ?? 0);
|
|
7608
7590
|
const removed = (diff.diffStat?.model_removed_lines ?? 0) + (diff.diffStat?.user_removed_lines ?? 0);
|
|
7609
|
-
const isAcceptedOrConfirming = status ===
|
|
7591
|
+
const isAcceptedOrConfirming = status === "success" /* Success */ || status === "executing" /* Executing */ || status === "awaiting_approval" /* AwaitingApproval */;
|
|
7610
7592
|
const addColor = isAcceptedOrConfirming ? theme.status.success : theme.text.secondary;
|
|
7611
7593
|
const removeColor = isAcceptedOrConfirming ? theme.status.error : theme.text.secondary;
|
|
7612
7594
|
const showDiffStat = !!diff.diffStat;
|
|
7613
7595
|
const description = /* @__PURE__ */ (0, import_jsx_runtime30.jsx)(Box_default, { flexDirection: "row", children: /* @__PURE__ */ (0, import_jsx_runtime30.jsx)(Text, { color: theme.text.secondary, wrap: "truncate-end", children: diff.fileName }) });
|
|
7614
7596
|
let resultSummary = "";
|
|
7615
7597
|
let resultColor = theme.text.secondary;
|
|
7616
|
-
if (status ===
|
|
7598
|
+
if (status === "awaiting_approval" /* AwaitingApproval */) {
|
|
7617
7599
|
resultSummary = "Confirming";
|
|
7618
|
-
} else if (status ===
|
|
7600
|
+
} else if (status === "success" /* Success */ || status === "executing" /* Executing */) {
|
|
7619
7601
|
resultSummary = "Accepted";
|
|
7620
7602
|
resultColor = theme.text.accent;
|
|
7621
|
-
} else if (status ===
|
|
7603
|
+
} else if (status === "cancelled" /* Cancelled */) {
|
|
7622
7604
|
resultSummary = "Rejected";
|
|
7623
7605
|
resultColor = theme.status.error;
|
|
7624
|
-
} else if (status ===
|
|
7606
|
+
} else if (status === "error" /* Error */) {
|
|
7625
7607
|
resultSummary = typeof resultDisplay === "string" ? resultDisplay : "Failed";
|
|
7626
7608
|
resultColor = theme.status.error;
|
|
7627
7609
|
}
|
|
@@ -7652,7 +7634,7 @@ function getFileOpData(diff, status, resultDisplay, terminalWidth, availableTerm
|
|
|
7652
7634
|
filename: diff.fileName,
|
|
7653
7635
|
terminalWidth: terminalWidth - PAYLOAD_MARGIN_LEFT,
|
|
7654
7636
|
availableTerminalHeight,
|
|
7655
|
-
disableColor: status ===
|
|
7637
|
+
disableColor: status === "cancelled" /* Cancelled */
|
|
7656
7638
|
}
|
|
7657
7639
|
);
|
|
7658
7640
|
return { description, summary, payload };
|
|
@@ -7780,10 +7762,10 @@ var DenseToolMessage = (props) => {
|
|
|
7780
7762
|
if (isGrepResult(resultDisplay)) {
|
|
7781
7763
|
return getGenericSuccessData(resultDisplay, originalDescription);
|
|
7782
7764
|
}
|
|
7783
|
-
if (status ===
|
|
7765
|
+
if (status === "success" /* Success */ && resultDisplay) {
|
|
7784
7766
|
return getGenericSuccessData(resultDisplay, originalDescription);
|
|
7785
7767
|
}
|
|
7786
|
-
if (status ===
|
|
7768
|
+
if (status === "error" /* Error */) {
|
|
7787
7769
|
const text = typeof resultDisplay === "string" ? resultDisplay.replace(/\n/g, " ") : "Failed";
|
|
7788
7770
|
const errorSummary = /* @__PURE__ */ (0, import_jsx_runtime30.jsxs)(Text, { color: theme.status.error, wrap: "truncate-end", children: [
|
|
7789
7771
|
"\u2192 ",
|
|
@@ -7824,7 +7806,7 @@ var DenseToolMessage = (props) => {
|
|
|
7824
7806
|
language: fileExtension,
|
|
7825
7807
|
maxWidth: terminalWidth - PAYLOAD_MARGIN_LEFT,
|
|
7826
7808
|
settings,
|
|
7827
|
-
disableColor: status ===
|
|
7809
|
+
disableColor: status === "cancelled" /* Cancelled */,
|
|
7828
7810
|
returnLines: true
|
|
7829
7811
|
});
|
|
7830
7812
|
} else {
|
|
@@ -7832,7 +7814,7 @@ var DenseToolMessage = (props) => {
|
|
|
7832
7814
|
parsedLines,
|
|
7833
7815
|
filename: diff.fileName,
|
|
7834
7816
|
terminalWidth: terminalWidth - PAYLOAD_MARGIN_LEFT,
|
|
7835
|
-
disableColor: status ===
|
|
7817
|
+
disableColor: status === "cancelled" /* Cancelled */
|
|
7836
7818
|
});
|
|
7837
7819
|
}
|
|
7838
7820
|
}, [diff, isExpanded, isAlternateBuffer, terminalWidth, settings, status]);
|
|
@@ -7962,7 +7944,7 @@ function isToolExecuting(pendingHistoryItems) {
|
|
|
7962
7944
|
return pendingHistoryItems.some((item) => {
|
|
7963
7945
|
if (item && item.type === "tool_group") {
|
|
7964
7946
|
return item.tools.some(
|
|
7965
|
-
(tool) =>
|
|
7947
|
+
(tool) => "executing" /* Executing */ === tool.status
|
|
7966
7948
|
);
|
|
7967
7949
|
}
|
|
7968
7950
|
return false;
|
|
@@ -7971,7 +7953,7 @@ function isToolExecuting(pendingHistoryItems) {
|
|
|
7971
7953
|
function isToolAwaitingConfirmation(pendingHistoryItems) {
|
|
7972
7954
|
return pendingHistoryItems.filter((item) => item.type === "tool_group").some(
|
|
7973
7955
|
(item) => item.tools.some(
|
|
7974
|
-
(tool) =>
|
|
7956
|
+
(tool) => "awaiting_approval" /* AwaitingApproval */ === tool.status
|
|
7975
7957
|
)
|
|
7976
7958
|
);
|
|
7977
7959
|
}
|
|
@@ -7994,14 +7976,14 @@ function getToolGroupBorderAppearance(item, activeShellPtyId, embeddedShellFocus
|
|
|
7994
7976
|
if (isTrackedToolCall(t)) {
|
|
7995
7977
|
return t.status !== "success" && t.status !== "error" && t.status !== "cancelled";
|
|
7996
7978
|
} else {
|
|
7997
|
-
return t.status !==
|
|
7979
|
+
return t.status !== "success" /* Success */ && t.status !== "error" /* Error */ && t.status !== "cancelled" /* Cancelled */;
|
|
7998
7980
|
}
|
|
7999
7981
|
});
|
|
8000
7982
|
const isEmbeddedShellFocused = toolsToInspect.some((t) => {
|
|
8001
7983
|
if (isTrackedToolCall(t)) {
|
|
8002
7984
|
return isShellTool(t.request.name) && t.status === "executing" && t.pid === activeShellPtyId && !!embeddedShellFocused;
|
|
8003
7985
|
} else {
|
|
8004
|
-
return isShellTool(t.name) && t.status ===
|
|
7986
|
+
return isShellTool(t.name) && t.status === "executing" /* Executing */ && t.ptyId === activeShellPtyId && !!embeddedShellFocused;
|
|
8005
7987
|
}
|
|
8006
7988
|
});
|
|
8007
7989
|
const isShellCommand = toolsToInspect.some((t) => {
|
|
@@ -8100,7 +8082,7 @@ var ToolGroupMessage = ({
|
|
|
8100
8082
|
const groupedTools = (0, import_react28.useMemo)(() => {
|
|
8101
8083
|
const groups = [];
|
|
8102
8084
|
for (const tool of visibleToolCalls) {
|
|
8103
|
-
if (tool.kind ===
|
|
8085
|
+
if (tool.kind === "agent" /* Agent */) {
|
|
8104
8086
|
const lastGroup = groups[groups.length - 1];
|
|
8105
8087
|
if (Array.isArray(lastGroup)) {
|
|
8106
8088
|
lastGroup.push(tool);
|
|
@@ -8154,7 +8136,7 @@ var ToolGroupMessage = ({
|
|
|
8154
8136
|
}, [groupedTools, isCompactModeEnabled, borderTopOverride]);
|
|
8155
8137
|
let countToolCallsWithResults = 0;
|
|
8156
8138
|
for (const tool of visibleToolCalls) {
|
|
8157
|
-
if (tool.kind !==
|
|
8139
|
+
if (tool.kind !== "agent" /* Agent */) {
|
|
8158
8140
|
if (isCompactTool(tool, isCompactModeEnabled)) {
|
|
8159
8141
|
if (hasDensePayload(tool)) {
|
|
8160
8142
|
countToolCallsWithResults++;
|
|
@@ -8350,18 +8332,18 @@ function CompressionMessage({
|
|
|
8350
8332
|
return "Compressing chat history";
|
|
8351
8333
|
}
|
|
8352
8334
|
switch (compressionStatus) {
|
|
8353
|
-
case
|
|
8335
|
+
case 1 /* COMPRESSED */:
|
|
8354
8336
|
return `Chat history compressed from ${originalTokens} to ${newTokens} tokens.`;
|
|
8355
|
-
case
|
|
8337
|
+
case 2 /* COMPRESSION_FAILED_INFLATED_TOKEN_COUNT */:
|
|
8356
8338
|
if (originalTokens < 5e4) {
|
|
8357
8339
|
return "Compression was not beneficial for this history size.";
|
|
8358
8340
|
}
|
|
8359
8341
|
return "Chat history compression did not reduce size. This may indicate issues with the compression prompt.";
|
|
8360
|
-
case
|
|
8342
|
+
case 3 /* COMPRESSION_FAILED_TOKEN_COUNT_ERROR */:
|
|
8361
8343
|
return "Could not compress chat history due to a token counting error.";
|
|
8362
|
-
case
|
|
8344
|
+
case 4 /* COMPRESSION_FAILED_EMPTY_SUMMARY */:
|
|
8363
8345
|
return "Chat history compression failed: the model returned an empty summary.";
|
|
8364
|
-
case
|
|
8346
|
+
case 5 /* NOOP */:
|
|
8365
8347
|
return "Nothing to compress.";
|
|
8366
8348
|
default:
|
|
8367
8349
|
return "";
|
|
@@ -8775,8 +8757,8 @@ var ModelUsageTable = ({ models }) => {
|
|
|
8775
8757
|
);
|
|
8776
8758
|
roleEntries.sort(([a], [b]) => {
|
|
8777
8759
|
if (a === b) return 0;
|
|
8778
|
-
if (a ===
|
|
8779
|
-
if (b ===
|
|
8760
|
+
if (a === "main" /* MAIN */) return -1;
|
|
8761
|
+
if (b === "main" /* MAIN */) return 1;
|
|
8780
8762
|
return a.localeCompare(b);
|
|
8781
8763
|
});
|
|
8782
8764
|
roleEntries.forEach(([role, roleMetrics]) => {
|
|
@@ -9107,8 +9089,8 @@ var ModelStatsDisplay = ({
|
|
|
9107
9089
|
return validRoles.includes(role);
|
|
9108
9090
|
}).sort((a, b) => {
|
|
9109
9091
|
if (a === b) return 0;
|
|
9110
|
-
if (a ===
|
|
9111
|
-
if (b ===
|
|
9092
|
+
if (a === "main" /* MAIN */) return -1;
|
|
9093
|
+
if (b === "main" /* MAIN */) return 1;
|
|
9112
9094
|
return a.localeCompare(b);
|
|
9113
9095
|
});
|
|
9114
9096
|
const createRow = (metric, getValue, options = {}) => {
|
|
@@ -9898,7 +9880,7 @@ var McpStatus = ({
|
|
|
9898
9880
|
);
|
|
9899
9881
|
const originalStatus = serverStatus(serverName);
|
|
9900
9882
|
const hasCachedItems = serverTools.length > 0 || serverPrompts.length > 0 || serverResources.length > 0;
|
|
9901
|
-
const status = originalStatus ===
|
|
9883
|
+
const status = originalStatus === "disconnected" /* DISCONNECTED */ && hasCachedItems ? "connected" /* CONNECTED */ : originalStatus;
|
|
9902
9884
|
let statusIndicator = "";
|
|
9903
9885
|
let statusText = "";
|
|
9904
9886
|
let statusColor = theme.text.primary;
|
|
@@ -9910,17 +9892,17 @@ var McpStatus = ({
|
|
|
9910
9892
|
statusColor = theme.text.secondary;
|
|
9911
9893
|
} else {
|
|
9912
9894
|
switch (status) {
|
|
9913
|
-
case
|
|
9895
|
+
case "connected" /* CONNECTED */:
|
|
9914
9896
|
statusIndicator = "\u{1F7E2}";
|
|
9915
9897
|
statusText = "Ready";
|
|
9916
9898
|
statusColor = theme.status.success;
|
|
9917
9899
|
break;
|
|
9918
|
-
case
|
|
9900
|
+
case "connecting" /* CONNECTING */:
|
|
9919
9901
|
statusIndicator = "\u{1F504}";
|
|
9920
9902
|
statusText = "Starting... (first startup may take longer)";
|
|
9921
9903
|
statusColor = theme.status.warning;
|
|
9922
9904
|
break;
|
|
9923
|
-
case
|
|
9905
|
+
case "disconnected" /* DISCONNECTED */:
|
|
9924
9906
|
default:
|
|
9925
9907
|
statusIndicator = "\u{1F534}";
|
|
9926
9908
|
statusText = "Disconnected";
|
|
@@ -9968,12 +9950,12 @@ var McpStatus = ({
|
|
|
9968
9950
|
/* @__PURE__ */ (0, import_jsx_runtime50.jsxs)(Text, { children: [
|
|
9969
9951
|
" - ",
|
|
9970
9952
|
statusText,
|
|
9971
|
-
status ===
|
|
9953
|
+
status === "connected" /* CONNECTED */ && parts.length > 0 && ` (${parts.join(", ")})`
|
|
9972
9954
|
] }),
|
|
9973
9955
|
authStatusNode
|
|
9974
9956
|
] }),
|
|
9975
|
-
status ===
|
|
9976
|
-
status ===
|
|
9957
|
+
status === "connecting" /* CONNECTING */ && /* @__PURE__ */ (0, import_jsx_runtime50.jsx)(Text, { children: " (tools and prompts will appear when ready)" }),
|
|
9958
|
+
status === "disconnected" /* DISCONNECTED */ && toolCount > 0 && /* @__PURE__ */ (0, import_jsx_runtime50.jsxs)(Text, { children: [
|
|
9977
9959
|
" (",
|
|
9978
9960
|
toolCount,
|
|
9979
9961
|
" tools cached)"
|
|
@@ -10526,7 +10508,7 @@ var Notifications = () => {
|
|
|
10526
10508
|
if (dismissed) return [];
|
|
10527
10509
|
const counts = persistentState.get("startupWarningCounts") || {};
|
|
10528
10510
|
return startupWarnings.filter((w) => {
|
|
10529
|
-
if (w.priority ===
|
|
10511
|
+
if (w.priority === "low" /* Low */) {
|
|
10530
10512
|
const count = counts[w.id] || 0;
|
|
10531
10513
|
return count < MAX_STARTUP_WARNING_SHOW_COUNT;
|
|
10532
10514
|
}
|
|
@@ -10539,7 +10521,7 @@ var Notifications = () => {
|
|
|
10539
10521
|
const counts = { ...persistentState.get("startupWarningCounts") || {} };
|
|
10540
10522
|
let changed = false;
|
|
10541
10523
|
visibleWarnings.forEach((w) => {
|
|
10542
|
-
if (w.priority ===
|
|
10524
|
+
if (w.priority === "low" /* Low */) {
|
|
10543
10525
|
counts[w.id] = (counts[w.id] || 0) + 1;
|
|
10544
10526
|
changed = true;
|
|
10545
10527
|
}
|
|
@@ -10646,7 +10628,7 @@ var UserIdentity = ({ config }) => {
|
|
|
10646
10628
|
}
|
|
10647
10629
|
return /* @__PURE__ */ (0, import_jsx_runtime60.jsxs)(Box_default, { flexDirection: "column", children: [
|
|
10648
10630
|
/* @__PURE__ */ (0, import_jsx_runtime60.jsxs)(Box_default, { children: [
|
|
10649
|
-
/* @__PURE__ */ (0, import_jsx_runtime60.jsx)(Text, { color: theme.text.primary, wrap: "truncate-end", children: authType ===
|
|
10631
|
+
/* @__PURE__ */ (0, import_jsx_runtime60.jsx)(Text, { color: theme.text.primary, wrap: "truncate-end", children: authType === "oauth-personal" /* LOGIN_WITH_GOOGLE */ ? /* @__PURE__ */ (0, import_jsx_runtime60.jsxs)(Text, { children: [
|
|
10650
10632
|
/* @__PURE__ */ (0, import_jsx_runtime60.jsxs)(Text, { bold: true, children: [
|
|
10651
10633
|
"Signed in with Google",
|
|
10652
10634
|
email ? ":" : ""
|
|
@@ -10880,7 +10862,7 @@ var import_react39 = __toESM(require_react(), 1);
|
|
|
10880
10862
|
function getConfirmingToolState(pendingHistoryItems) {
|
|
10881
10863
|
const allPendingTools = getAllToolCalls(pendingHistoryItems);
|
|
10882
10864
|
const confirmingTools = allPendingTools.filter(
|
|
10883
|
-
(tool) => tool.status ===
|
|
10865
|
+
(tool) => tool.status === "awaiting_approval" /* AwaitingApproval */
|
|
10884
10866
|
);
|
|
10885
10867
|
if (confirmingTools.length === 0) {
|
|
10886
10868
|
return null;
|
|
@@ -12190,7 +12172,7 @@ var ExitPlanModeDialog = ({
|
|
|
12190
12172
|
{
|
|
12191
12173
|
questions: [
|
|
12192
12174
|
{
|
|
12193
|
-
type:
|
|
12175
|
+
type: "choice" /* CHOICE */,
|
|
12194
12176
|
header: "Approval",
|
|
12195
12177
|
question: planContent,
|
|
12196
12178
|
options: [
|
|
@@ -12211,9 +12193,9 @@ var ExitPlanModeDialog = ({
|
|
|
12211
12193
|
onSubmit: (answers) => {
|
|
12212
12194
|
const answer = answers["0"];
|
|
12213
12195
|
if (answer === "Yes, automatically accept edits" /* Auto */) {
|
|
12214
|
-
onApprove(
|
|
12196
|
+
onApprove("autoEdit" /* AUTO_EDIT */);
|
|
12215
12197
|
} else if (answer === "Yes, manually accept edits" /* Manual */) {
|
|
12216
|
-
onApprove(
|
|
12198
|
+
onApprove("default" /* DEFAULT */);
|
|
12217
12199
|
} else if (answer) {
|
|
12218
12200
|
onFeedback(answer);
|
|
12219
12201
|
}
|
|
@@ -12424,7 +12406,7 @@ ${deceptiveUrlWarnings.map(
|
|
|
12424
12406
|
);
|
|
12425
12407
|
(0, import_react44.useEffect)(() => {
|
|
12426
12408
|
if (isCancelling) {
|
|
12427
|
-
handleConfirm(
|
|
12409
|
+
handleConfirm("cancel" /* Cancel */);
|
|
12428
12410
|
}
|
|
12429
12411
|
}, [isCancelling, handleConfirm]);
|
|
12430
12412
|
const handleSelect = (0, import_react44.useCallback)(
|
|
@@ -12437,19 +12419,19 @@ ${deceptiveUrlWarnings.map(
|
|
|
12437
12419
|
if (!confirmationDetails.isModifying) {
|
|
12438
12420
|
options2.push({
|
|
12439
12421
|
label: "Allow once",
|
|
12440
|
-
value:
|
|
12422
|
+
value: "proceed_once" /* ProceedOnce */,
|
|
12441
12423
|
key: "Allow once"
|
|
12442
12424
|
});
|
|
12443
12425
|
if (isTrustedFolder) {
|
|
12444
12426
|
options2.push({
|
|
12445
12427
|
label: "Allow for this session",
|
|
12446
|
-
value:
|
|
12428
|
+
value: "proceed_always" /* ProceedAlways */,
|
|
12447
12429
|
key: "Allow for this session"
|
|
12448
12430
|
});
|
|
12449
12431
|
if (allowPermanentApproval) {
|
|
12450
12432
|
options2.push({
|
|
12451
12433
|
label: "Allow for this file in all future sessions",
|
|
12452
|
-
value:
|
|
12434
|
+
value: "proceed_always_and_save" /* ProceedAlwaysAndSave */,
|
|
12453
12435
|
key: "Allow for this file in all future sessions"
|
|
12454
12436
|
});
|
|
12455
12437
|
}
|
|
@@ -12457,119 +12439,119 @@ ${deceptiveUrlWarnings.map(
|
|
|
12457
12439
|
if (!config.getIdeMode() || !isDiffingEnabled) {
|
|
12458
12440
|
options2.push({
|
|
12459
12441
|
label: "Modify with external editor",
|
|
12460
|
-
value:
|
|
12442
|
+
value: "modify_with_editor" /* ModifyWithEditor */,
|
|
12461
12443
|
key: "Modify with external editor"
|
|
12462
12444
|
});
|
|
12463
12445
|
}
|
|
12464
12446
|
options2.push({
|
|
12465
12447
|
label: "No, suggest changes (esc)",
|
|
12466
|
-
value:
|
|
12448
|
+
value: "cancel" /* Cancel */,
|
|
12467
12449
|
key: "No, suggest changes (esc)"
|
|
12468
12450
|
});
|
|
12469
12451
|
}
|
|
12470
12452
|
} else if (confirmationDetails.type === "sandbox_expansion") {
|
|
12471
12453
|
options2.push({
|
|
12472
12454
|
label: "Allow once",
|
|
12473
|
-
value:
|
|
12455
|
+
value: "proceed_once" /* ProceedOnce */,
|
|
12474
12456
|
key: "Allow once"
|
|
12475
12457
|
});
|
|
12476
12458
|
if (isTrustedFolder) {
|
|
12477
12459
|
options2.push({
|
|
12478
12460
|
label: "Allow for this session",
|
|
12479
|
-
value:
|
|
12461
|
+
value: "proceed_always" /* ProceedAlways */,
|
|
12480
12462
|
key: "Allow for this session"
|
|
12481
12463
|
});
|
|
12482
12464
|
if (allowPermanentApproval) {
|
|
12483
12465
|
options2.push({
|
|
12484
12466
|
label: "Allow for all future sessions",
|
|
12485
|
-
value:
|
|
12467
|
+
value: "proceed_always_and_save" /* ProceedAlwaysAndSave */,
|
|
12486
12468
|
key: "Allow for all future sessions"
|
|
12487
12469
|
});
|
|
12488
12470
|
}
|
|
12489
12471
|
}
|
|
12490
12472
|
options2.push({
|
|
12491
12473
|
label: "No, suggest changes (esc)",
|
|
12492
|
-
value:
|
|
12474
|
+
value: "cancel" /* Cancel */,
|
|
12493
12475
|
key: "No, suggest changes (esc)"
|
|
12494
12476
|
});
|
|
12495
12477
|
} else if (confirmationDetails.type === "exec") {
|
|
12496
12478
|
options2.push({
|
|
12497
12479
|
label: "Allow once",
|
|
12498
|
-
value:
|
|
12480
|
+
value: "proceed_once" /* ProceedOnce */,
|
|
12499
12481
|
key: "Allow once"
|
|
12500
12482
|
});
|
|
12501
12483
|
if (isTrustedFolder) {
|
|
12502
12484
|
options2.push({
|
|
12503
12485
|
label: `Allow for this session`,
|
|
12504
|
-
value:
|
|
12486
|
+
value: "proceed_always" /* ProceedAlways */,
|
|
12505
12487
|
key: `Allow for this session`
|
|
12506
12488
|
});
|
|
12507
12489
|
if (allowPermanentApproval) {
|
|
12508
12490
|
options2.push({
|
|
12509
12491
|
label: `Allow this command for all future sessions`,
|
|
12510
|
-
value:
|
|
12492
|
+
value: "proceed_always_and_save" /* ProceedAlwaysAndSave */,
|
|
12511
12493
|
key: `Allow for all future sessions`
|
|
12512
12494
|
});
|
|
12513
12495
|
}
|
|
12514
12496
|
}
|
|
12515
12497
|
options2.push({
|
|
12516
12498
|
label: "No, suggest changes (esc)",
|
|
12517
|
-
value:
|
|
12499
|
+
value: "cancel" /* Cancel */,
|
|
12518
12500
|
key: "No, suggest changes (esc)"
|
|
12519
12501
|
});
|
|
12520
12502
|
} else if (confirmationDetails.type === "info") {
|
|
12521
12503
|
options2.push({
|
|
12522
12504
|
label: "Allow once",
|
|
12523
|
-
value:
|
|
12505
|
+
value: "proceed_once" /* ProceedOnce */,
|
|
12524
12506
|
key: "Allow once"
|
|
12525
12507
|
});
|
|
12526
12508
|
if (isTrustedFolder) {
|
|
12527
12509
|
options2.push({
|
|
12528
12510
|
label: "Allow for this session",
|
|
12529
|
-
value:
|
|
12511
|
+
value: "proceed_always" /* ProceedAlways */,
|
|
12530
12512
|
key: "Allow for this session"
|
|
12531
12513
|
});
|
|
12532
12514
|
if (allowPermanentApproval) {
|
|
12533
12515
|
options2.push({
|
|
12534
12516
|
label: "Allow for all future sessions",
|
|
12535
|
-
value:
|
|
12517
|
+
value: "proceed_always_and_save" /* ProceedAlwaysAndSave */,
|
|
12536
12518
|
key: "Allow for all future sessions"
|
|
12537
12519
|
});
|
|
12538
12520
|
}
|
|
12539
12521
|
}
|
|
12540
12522
|
options2.push({
|
|
12541
12523
|
label: "No, suggest changes (esc)",
|
|
12542
|
-
value:
|
|
12524
|
+
value: "cancel" /* Cancel */,
|
|
12543
12525
|
key: "No, suggest changes (esc)"
|
|
12544
12526
|
});
|
|
12545
12527
|
} else if (confirmationDetails.type === "mcp") {
|
|
12546
12528
|
options2.push({
|
|
12547
12529
|
label: "Allow once",
|
|
12548
|
-
value:
|
|
12530
|
+
value: "proceed_once" /* ProceedOnce */,
|
|
12549
12531
|
key: "Allow once"
|
|
12550
12532
|
});
|
|
12551
12533
|
if (isTrustedFolder) {
|
|
12552
12534
|
options2.push({
|
|
12553
12535
|
label: "Allow tool for this session",
|
|
12554
|
-
value:
|
|
12536
|
+
value: "proceed_always_tool" /* ProceedAlwaysTool */,
|
|
12555
12537
|
key: "Allow tool for this session"
|
|
12556
12538
|
});
|
|
12557
12539
|
options2.push({
|
|
12558
12540
|
label: "Allow all server tools for this session",
|
|
12559
|
-
value:
|
|
12541
|
+
value: "proceed_always_server" /* ProceedAlwaysServer */,
|
|
12560
12542
|
key: "Allow all server tools for this session"
|
|
12561
12543
|
});
|
|
12562
12544
|
if (allowPermanentApproval) {
|
|
12563
12545
|
options2.push({
|
|
12564
12546
|
label: "Allow tool for all future sessions",
|
|
12565
|
-
value:
|
|
12547
|
+
value: "proceed_always_and_save" /* ProceedAlwaysAndSave */,
|
|
12566
12548
|
key: "Allow tool for all future sessions"
|
|
12567
12549
|
});
|
|
12568
12550
|
}
|
|
12569
12551
|
}
|
|
12570
12552
|
options2.push({
|
|
12571
12553
|
label: "No, suggest changes (esc)",
|
|
12572
|
-
value:
|
|
12554
|
+
value: "cancel" /* Cancel */,
|
|
12573
12555
|
key: "No, suggest changes (esc)"
|
|
12574
12556
|
});
|
|
12575
12557
|
}
|
|
@@ -12608,7 +12590,7 @@ ${deceptiveUrlWarnings.map(
|
|
|
12608
12590
|
const containsRedirection = commandsToDisplay.some(
|
|
12609
12591
|
(cmd) => hasRedirection(cmd)
|
|
12610
12592
|
);
|
|
12611
|
-
const isAutoEdit = config.getApprovalMode() ===
|
|
12593
|
+
const isAutoEdit = config.getApprovalMode() === "yolo" /* YOLO */ || config.getApprovalMode() === "autoEdit" /* AUTO_EDIT */;
|
|
12612
12594
|
if (containsRedirection && !isAutoEdit) {
|
|
12613
12595
|
extraInfoLines = 1;
|
|
12614
12596
|
}
|
|
@@ -12634,7 +12616,7 @@ ${deceptiveUrlWarnings.map(
|
|
|
12634
12616
|
const isSafeToPersist = confirmationDetails.type === "info" || confirmationDetails.type === "edit" || confirmationDetails.type === "mcp";
|
|
12635
12617
|
if (isSafeToPersist && settings.merged.security.autoAddToPolicyByDefault) {
|
|
12636
12618
|
const alwaysAndSaveIndex = options2.findIndex(
|
|
12637
|
-
(o) => o.value ===
|
|
12619
|
+
(o) => o.value === "proceed_always_and_save" /* ProceedAlwaysAndSave */
|
|
12638
12620
|
);
|
|
12639
12621
|
if (alwaysAndSaveIndex !== -1) {
|
|
12640
12622
|
initialIndex2 = alwaysAndSaveIndex;
|
|
@@ -12651,10 +12633,10 @@ ${deceptiveUrlWarnings.map(
|
|
|
12651
12633
|
{
|
|
12652
12634
|
questions: confirmationDetails.questions,
|
|
12653
12635
|
onSubmit: (answers) => {
|
|
12654
|
-
handleConfirm(
|
|
12636
|
+
handleConfirm("proceed_once" /* ProceedOnce */, { answers });
|
|
12655
12637
|
},
|
|
12656
12638
|
onCancel: () => {
|
|
12657
|
-
handleConfirm(
|
|
12639
|
+
handleConfirm("cancel" /* Cancel */);
|
|
12658
12640
|
},
|
|
12659
12641
|
width: terminalWidth,
|
|
12660
12642
|
availableHeight: bodyHeight
|
|
@@ -12675,19 +12657,19 @@ ${deceptiveUrlWarnings.map(
|
|
|
12675
12657
|
planPath: confirmationDetails.planPath,
|
|
12676
12658
|
getPreferredEditor,
|
|
12677
12659
|
onApprove: (approvalMode) => {
|
|
12678
|
-
handleConfirm(
|
|
12660
|
+
handleConfirm("proceed_once" /* ProceedOnce */, {
|
|
12679
12661
|
approved: true,
|
|
12680
12662
|
approvalMode
|
|
12681
12663
|
});
|
|
12682
12664
|
},
|
|
12683
12665
|
onFeedback: (feedback) => {
|
|
12684
|
-
handleConfirm(
|
|
12666
|
+
handleConfirm("proceed_once" /* ProceedOnce */, {
|
|
12685
12667
|
approved: false,
|
|
12686
12668
|
feedback
|
|
12687
12669
|
});
|
|
12688
12670
|
},
|
|
12689
12671
|
onCancel: () => {
|
|
12690
|
-
handleConfirm(
|
|
12672
|
+
handleConfirm("cancel" /* Cancel */);
|
|
12691
12673
|
},
|
|
12692
12674
|
width: terminalWidth,
|
|
12693
12675
|
availableHeight: bodyHeight
|
|
@@ -12797,7 +12779,7 @@ ${deceptiveUrlWarnings.map(
|
|
|
12797
12779
|
const containsRedirection = commandsToDisplay.some(
|
|
12798
12780
|
(cmd) => hasRedirection(cmd)
|
|
12799
12781
|
);
|
|
12800
|
-
const isAutoEdit = config.getApprovalMode() ===
|
|
12782
|
+
const isAutoEdit = config.getApprovalMode() === "yolo" /* YOLO */ || config.getApprovalMode() === "autoEdit" /* AUTO_EDIT */;
|
|
12801
12783
|
let warnings = null;
|
|
12802
12784
|
if (containsRedirection && !isAutoEdit) {
|
|
12803
12785
|
const tipText = `To auto-accept, press ${formatCommand("app.cycleApprovalMode" /* CYCLE_APPROVAL_MODE */)}`;
|
|
@@ -12960,7 +12942,7 @@ ${deceptiveUrlWarnings.map(
|
|
|
12960
12942
|
const bodyOverflowDirection = confirmationDetails.type === "mcp" && isMcpToolDetailsExpanded ? "bottom" : "top";
|
|
12961
12943
|
const renderRadioItem = (0, import_react44.useCallback)(
|
|
12962
12944
|
(item, { titleColor }) => {
|
|
12963
|
-
if (item.value ===
|
|
12945
|
+
if (item.value === "proceed_always_and_save" /* ProceedAlwaysAndSave */) {
|
|
12964
12946
|
return /* @__PURE__ */ (0, import_jsx_runtime67.jsxs)(Text, { color: titleColor, wrap: "truncate", children: [
|
|
12965
12947
|
item.label,
|
|
12966
12948
|
" ",
|
|
@@ -14483,7 +14465,7 @@ function BaseSettingsDialog({
|
|
|
14483
14465
|
flexDirection: "row",
|
|
14484
14466
|
padding: 1,
|
|
14485
14467
|
width: "100%",
|
|
14486
|
-
|
|
14468
|
+
maxHeight: availableHeight,
|
|
14487
14469
|
children: /* @__PURE__ */ (0, import_jsx_runtime75.jsxs)(Box_default, { flexDirection: "column", flexGrow: 1, children: [
|
|
14488
14470
|
/* @__PURE__ */ (0, import_jsx_runtime75.jsx)(Box_default, { marginX: 1, children: /* @__PURE__ */ (0, import_jsx_runtime75.jsxs)(
|
|
14489
14471
|
Text,
|
|
@@ -14959,7 +14941,7 @@ function validateAuthMethodWithSettings(authType, settings) {
|
|
|
14959
14941
|
if (settings.merged.security.auth.useExternal) {
|
|
14960
14942
|
return null;
|
|
14961
14943
|
}
|
|
14962
|
-
if (authType ===
|
|
14944
|
+
if (authType === "gemini-api-key" /* USE_GEMINI */) {
|
|
14963
14945
|
return null;
|
|
14964
14946
|
}
|
|
14965
14947
|
return validateAuthMethod(authType);
|
|
@@ -15011,7 +14993,7 @@ var useAuthCommand = (settings, config, initialAuthError = null, initialAccountS
|
|
|
15011
14993
|
}
|
|
15012
14994
|
return;
|
|
15013
14995
|
}
|
|
15014
|
-
if (authType ===
|
|
14996
|
+
if (authType === "gemini-api-key" /* USE_GEMINI */) {
|
|
15015
14997
|
const key = await reloadApiKey();
|
|
15016
14998
|
if (!key) {
|
|
15017
14999
|
setAuthState("awaiting_api_key_input" /* AwaitingApiKeyInput */);
|
|
@@ -15086,31 +15068,31 @@ function AuthDialog({
|
|
|
15086
15068
|
let items = [
|
|
15087
15069
|
{
|
|
15088
15070
|
label: "Sign in with Google",
|
|
15089
|
-
value:
|
|
15090
|
-
key:
|
|
15071
|
+
value: "oauth-personal" /* LOGIN_WITH_GOOGLE */,
|
|
15072
|
+
key: "oauth-personal" /* LOGIN_WITH_GOOGLE */
|
|
15091
15073
|
},
|
|
15092
15074
|
...process.env["CLOUD_SHELL"] === "true" ? [
|
|
15093
15075
|
{
|
|
15094
15076
|
label: "Use Cloud Shell user credentials",
|
|
15095
|
-
value:
|
|
15096
|
-
key:
|
|
15077
|
+
value: "compute-default-credentials" /* COMPUTE_ADC */,
|
|
15078
|
+
key: "compute-default-credentials" /* COMPUTE_ADC */
|
|
15097
15079
|
}
|
|
15098
15080
|
] : process.env["GEMINI_CLI_USE_COMPUTE_ADC"] === "true" ? [
|
|
15099
15081
|
{
|
|
15100
15082
|
label: "Use metadata server application default credentials",
|
|
15101
|
-
value:
|
|
15102
|
-
key:
|
|
15083
|
+
value: "compute-default-credentials" /* COMPUTE_ADC */,
|
|
15084
|
+
key: "compute-default-credentials" /* COMPUTE_ADC */
|
|
15103
15085
|
}
|
|
15104
15086
|
] : [],
|
|
15105
15087
|
{
|
|
15106
15088
|
label: "Use Gemini API Key",
|
|
15107
|
-
value:
|
|
15108
|
-
key:
|
|
15089
|
+
value: "gemini-api-key" /* USE_GEMINI */,
|
|
15090
|
+
key: "gemini-api-key" /* USE_GEMINI */
|
|
15109
15091
|
},
|
|
15110
15092
|
{
|
|
15111
15093
|
label: "Vertex AI",
|
|
15112
|
-
value:
|
|
15113
|
-
key:
|
|
15094
|
+
value: "vertex-ai" /* USE_VERTEX_AI */,
|
|
15095
|
+
key: "vertex-ai" /* USE_VERTEX_AI */
|
|
15114
15096
|
}
|
|
15115
15097
|
];
|
|
15116
15098
|
if (settings.merged.security.auth.enforcedType) {
|
|
@@ -15132,9 +15114,9 @@ function AuthDialog({
|
|
|
15132
15114
|
return item.value === defaultAuthType;
|
|
15133
15115
|
}
|
|
15134
15116
|
if (process.env["GEMINI_API_KEY"]) {
|
|
15135
|
-
return item.value ===
|
|
15117
|
+
return item.value === "gemini-api-key" /* USE_GEMINI */;
|
|
15136
15118
|
}
|
|
15137
|
-
return item.value ===
|
|
15119
|
+
return item.value === "oauth-personal" /* LOGIN_WITH_GOOGLE */;
|
|
15138
15120
|
});
|
|
15139
15121
|
if (settings.merged.security.auth.enforcedType) {
|
|
15140
15122
|
initialAuthIndex = 0;
|
|
@@ -15145,19 +15127,19 @@ function AuthDialog({
|
|
|
15145
15127
|
return;
|
|
15146
15128
|
}
|
|
15147
15129
|
if (authType) {
|
|
15148
|
-
if (authType ===
|
|
15130
|
+
if (authType === "oauth-personal" /* LOGIN_WITH_GOOGLE */) {
|
|
15149
15131
|
setAuthContext({ requiresRestart: true });
|
|
15150
15132
|
} else {
|
|
15151
15133
|
setAuthContext({});
|
|
15152
15134
|
}
|
|
15153
15135
|
await clearCachedCredentialFile();
|
|
15154
15136
|
settings.setValue(scope, "security.auth.selectedType", authType);
|
|
15155
|
-
if (authType ===
|
|
15137
|
+
if (authType === "oauth-personal" /* LOGIN_WITH_GOOGLE */ && config.isBrowserLaunchSuppressed()) {
|
|
15156
15138
|
setExiting(true);
|
|
15157
15139
|
setTimeout(relaunchApp, 100);
|
|
15158
15140
|
return;
|
|
15159
15141
|
}
|
|
15160
|
-
if (authType ===
|
|
15142
|
+
if (authType === "gemini-api-key" /* USE_GEMINI */) {
|
|
15161
15143
|
setAuthState("awaiting_api_key_input" /* AwaitingApiKeyInput */);
|
|
15162
15144
|
return;
|
|
15163
15145
|
}
|
|
@@ -15907,11 +15889,11 @@ var PrivacyNoticeText = ({
|
|
|
15907
15889
|
}) => {
|
|
15908
15890
|
const authType = config.getContentGeneratorConfig()?.authType;
|
|
15909
15891
|
switch (authType) {
|
|
15910
|
-
case
|
|
15892
|
+
case "gemini-api-key" /* USE_GEMINI */:
|
|
15911
15893
|
return /* @__PURE__ */ (0, import_jsx_runtime85.jsx)(GeminiPrivacyNotice, { onExit });
|
|
15912
|
-
case
|
|
15894
|
+
case "vertex-ai" /* USE_VERTEX_AI */:
|
|
15913
15895
|
return /* @__PURE__ */ (0, import_jsx_runtime85.jsx)(CloudPaidPrivacyNotice, { onExit });
|
|
15914
|
-
case
|
|
15896
|
+
case "oauth-personal" /* LOGIN_WITH_GOOGLE */:
|
|
15915
15897
|
default:
|
|
15916
15898
|
return /* @__PURE__ */ (0, import_jsx_runtime85.jsx)(CloudFreePrivacyNotice, { config, onExit });
|
|
15917
15899
|
}
|
|
@@ -15952,7 +15934,7 @@ function ProQuotaDialog({
|
|
|
15952
15934
|
value: "retry_always",
|
|
15953
15935
|
key: "retry_always"
|
|
15954
15936
|
},
|
|
15955
|
-
...authType ===
|
|
15937
|
+
...authType === "oauth-personal" /* LOGIN_WITH_GOOGLE */ && !isUltra ? [
|
|
15956
15938
|
{
|
|
15957
15939
|
label: "Upgrade for higher limits",
|
|
15958
15940
|
value: "upgrade",
|
|
@@ -17105,7 +17087,7 @@ function ModelDialog({ onClose }) {
|
|
|
17105
17087
|
const useGemini31 = config?.getGemini31LaunchedSync?.() ?? false;
|
|
17106
17088
|
const useGemini31FlashLite = config?.getGemini31FlashLiteLaunchedSync?.() ?? false;
|
|
17107
17089
|
const selectedAuthType = settings.merged.security.auth.selectedType;
|
|
17108
|
-
const useCustomToolModel = useGemini31 && selectedAuthType ===
|
|
17090
|
+
const useCustomToolModel = useGemini31 && selectedAuthType === "gemini-api-key" /* USE_GEMINI */;
|
|
17109
17091
|
const manualModelSelected = (0, import_react62.useMemo)(() => {
|
|
17110
17092
|
if (config?.getExperimentalDynamicModelConfiguration?.() === true && config.getModelConfigService) {
|
|
17111
17093
|
const def = config.getModelConfigService().getModelDefinition(preferredModel);
|
|
@@ -18357,10 +18339,10 @@ function initializeConsoleStore() {
|
|
|
18357
18339
|
globalConsoleMessages = [];
|
|
18358
18340
|
globalErrorCount = 0;
|
|
18359
18341
|
notifyListeners();
|
|
18360
|
-
coreEvents.off(
|
|
18361
|
-
coreEvents.off(
|
|
18362
|
-
coreEvents.on(
|
|
18363
|
-
coreEvents.on(
|
|
18342
|
+
coreEvents.off("console-log" /* ConsoleLog */, handleConsoleLog);
|
|
18343
|
+
coreEvents.off("output" /* Output */, handleOutput);
|
|
18344
|
+
coreEvents.on("console-log" /* ConsoleLog */, handleConsoleLog);
|
|
18345
|
+
coreEvents.on("output" /* Output */, handleOutput);
|
|
18364
18346
|
}
|
|
18365
18347
|
function notifyListeners() {
|
|
18366
18348
|
for (const listener of listeners) {
|
|
@@ -20461,7 +20443,7 @@ function usePromptCompletion({
|
|
|
20461
20443
|
{ model: "prompt-completion" },
|
|
20462
20444
|
contents,
|
|
20463
20445
|
signal,
|
|
20464
|
-
|
|
20446
|
+
"utility_autocomplete" /* UTILITY_AUTOCOMPLETE */
|
|
20465
20447
|
);
|
|
20466
20448
|
if (signal.aborted) {
|
|
20467
20449
|
return;
|
|
@@ -22523,9 +22505,9 @@ var InputPrompt = ({
|
|
|
22523
22505
|
onSuggestionsVisibilityChange(shouldShowSuggestions);
|
|
22524
22506
|
}
|
|
22525
22507
|
}, [shouldShowSuggestions, onSuggestionsVisibilityChange]);
|
|
22526
|
-
const showAutoAcceptStyling = !shellModeActive && approvalMode ===
|
|
22527
|
-
const showYoloStyling = !shellModeActive && approvalMode ===
|
|
22528
|
-
const showPlanStyling = !shellModeActive && approvalMode ===
|
|
22508
|
+
const showAutoAcceptStyling = !shellModeActive && approvalMode === "autoEdit" /* AUTO_EDIT */;
|
|
22509
|
+
const showYoloStyling = !shellModeActive && approvalMode === "yolo" /* YOLO */;
|
|
22510
|
+
const showPlanStyling = !shellModeActive && approvalMode === "plan" /* PLAN */;
|
|
22529
22511
|
let statusColor;
|
|
22530
22512
|
let statusText = "";
|
|
22531
22513
|
if (shellModeActive) {
|
|
@@ -23367,22 +23349,22 @@ var ApprovalModeIndicator = ({
|
|
|
23367
23349
|
const cycleHint = formatCommand("app.cycleApprovalMode" /* CYCLE_APPROVAL_MODE */);
|
|
23368
23350
|
const yoloHint = formatCommand("app.toggleYolo" /* TOGGLE_YOLO */);
|
|
23369
23351
|
switch (approvalMode) {
|
|
23370
|
-
case
|
|
23352
|
+
case "autoEdit" /* AUTO_EDIT */:
|
|
23371
23353
|
textColor = theme.status.warning;
|
|
23372
23354
|
textContent = "auto-accept edits";
|
|
23373
23355
|
subText = allowPlanMode ? `${cycleHint} to plan` : `${cycleHint} to manual`;
|
|
23374
23356
|
break;
|
|
23375
|
-
case
|
|
23357
|
+
case "plan" /* PLAN */:
|
|
23376
23358
|
textColor = theme.status.success;
|
|
23377
23359
|
textContent = "plan";
|
|
23378
23360
|
subText = `${cycleHint} to manual`;
|
|
23379
23361
|
break;
|
|
23380
|
-
case
|
|
23362
|
+
case "yolo" /* YOLO */:
|
|
23381
23363
|
textColor = theme.status.error;
|
|
23382
23364
|
textContent = "YOLO";
|
|
23383
23365
|
subText = yoloHint;
|
|
23384
23366
|
break;
|
|
23385
|
-
case
|
|
23367
|
+
case "default" /* DEFAULT */:
|
|
23386
23368
|
default:
|
|
23387
23369
|
textColor = theme.text.accent;
|
|
23388
23370
|
textContent = "";
|
|
@@ -23430,7 +23412,7 @@ var useComposerStatus = () => {
|
|
|
23430
23412
|
(item) => item.type === "tool_group"
|
|
23431
23413
|
).some(
|
|
23432
23414
|
(item) => item.tools.some(
|
|
23433
|
-
(tool) => tool.status ===
|
|
23415
|
+
(tool) => tool.status === "awaiting_approval" /* AwaitingApproval */
|
|
23434
23416
|
)
|
|
23435
23417
|
),
|
|
23436
23418
|
[uiState.pendingHistoryItems]
|
|
@@ -23445,13 +23427,13 @@ var useComposerStatus = () => {
|
|
|
23445
23427
|
const hideMinimalModeHintWhileBusy = !uiState.cleanUiDetailsVisible && (showLoadingIndicator || uiState.activeHooks.length > 0);
|
|
23446
23428
|
if (hideMinimalModeHintWhileBusy) return null;
|
|
23447
23429
|
switch (showApprovalModeIndicator) {
|
|
23448
|
-
case
|
|
23430
|
+
case "yolo" /* YOLO */:
|
|
23449
23431
|
return { text: "YOLO", color: theme.status.error };
|
|
23450
|
-
case
|
|
23432
|
+
case "plan" /* PLAN */:
|
|
23451
23433
|
return { text: "plan", color: theme.status.success };
|
|
23452
|
-
case
|
|
23434
|
+
case "autoEdit" /* AUTO_EDIT */:
|
|
23453
23435
|
return { text: "auto edit", color: theme.status.warning };
|
|
23454
|
-
case
|
|
23436
|
+
case "default" /* DEFAULT */:
|
|
23455
23437
|
default:
|
|
23456
23438
|
return null;
|
|
23457
23439
|
}
|
|
@@ -23805,7 +23787,7 @@ var ConfigInitDisplay = ({
|
|
|
23805
23787
|
let connected = 0;
|
|
23806
23788
|
const connecting = [];
|
|
23807
23789
|
for (const [name, client] of clients.entries()) {
|
|
23808
|
-
if (client.getStatus() ===
|
|
23790
|
+
if (client.getStatus() === "connected" /* CONNECTED */) {
|
|
23809
23791
|
connected++;
|
|
23810
23792
|
} else {
|
|
23811
23793
|
connecting.push(name);
|
|
@@ -23827,9 +23809,9 @@ var ConfigInitDisplay = ({
|
|
|
23827
23809
|
);
|
|
23828
23810
|
}
|
|
23829
23811
|
};
|
|
23830
|
-
coreEvents.on(
|
|
23812
|
+
coreEvents.on("mcp-client-update" /* McpClientUpdate */, onChange);
|
|
23831
23813
|
return () => {
|
|
23832
|
-
coreEvents.off(
|
|
23814
|
+
coreEvents.off("mcp-client-update" /* McpClientUpdate */, onChange);
|
|
23833
23815
|
};
|
|
23834
23816
|
}, [initialMessage]);
|
|
23835
23817
|
return /* @__PURE__ */ (0, import_jsx_runtime123.jsx)(Box_default, { marginTop: 1, children: /* @__PURE__ */ (0, import_jsx_runtime123.jsxs)(Text, { children: [
|
|
@@ -24544,7 +24526,7 @@ var useExecutionLifecycle = (addItemToHistory, setPendingHistoryItem, onExec, on
|
|
|
24544
24526
|
callId,
|
|
24545
24527
|
name: SHELL_COMMAND_NAME,
|
|
24546
24528
|
description: rawQuery,
|
|
24547
|
-
status:
|
|
24529
|
+
status: "executing" /* Executing */,
|
|
24548
24530
|
isClientInitiated: true,
|
|
24549
24531
|
resultDisplay: "",
|
|
24550
24532
|
confirmationDetails: void 0
|
|
@@ -24685,7 +24667,7 @@ __code=$?; pwd > ${escapedPwdFilePath}; exit $__code`;
|
|
|
24685
24667
|
mainContent = result.output.trim() || "(Command produced no output)";
|
|
24686
24668
|
}
|
|
24687
24669
|
let finalOutput = result.ansiOutput && result.ansiOutput.length > 0 ? result.ansiOutput : mainContent;
|
|
24688
|
-
let finalStatus =
|
|
24670
|
+
let finalStatus = "success" /* Success */;
|
|
24689
24671
|
const prependToAnsiOutput = (output, text) => {
|
|
24690
24672
|
const newLines = text.split("\n").map((line) => [
|
|
24691
24673
|
{
|
|
@@ -24704,20 +24686,20 @@ __code=$?; pwd > ${escapedPwdFilePath}; exit $__code`;
|
|
|
24704
24686
|
};
|
|
24705
24687
|
let prefix = "";
|
|
24706
24688
|
if (result.error) {
|
|
24707
|
-
finalStatus =
|
|
24689
|
+
finalStatus = "error" /* Error */;
|
|
24708
24690
|
prefix = result.error.message;
|
|
24709
24691
|
} else if (result.aborted) {
|
|
24710
|
-
finalStatus =
|
|
24692
|
+
finalStatus = "cancelled" /* Cancelled */;
|
|
24711
24693
|
prefix = "Command was cancelled.";
|
|
24712
24694
|
} else if (result.backgrounded) {
|
|
24713
|
-
finalStatus =
|
|
24695
|
+
finalStatus = "success" /* Success */;
|
|
24714
24696
|
finalOutput = `Command moved to background (PID: ${result.pid}). Output hidden. Press Ctrl+B to view.`;
|
|
24715
24697
|
mainContent = finalOutput;
|
|
24716
24698
|
} else if (result.signal) {
|
|
24717
|
-
finalStatus =
|
|
24699
|
+
finalStatus = "error" /* Error */;
|
|
24718
24700
|
prefix = `Command terminated by signal: ${result.signal}.`;
|
|
24719
24701
|
} else if (result.exitCode !== 0) {
|
|
24720
|
-
finalStatus =
|
|
24702
|
+
finalStatus = "error" /* Error */;
|
|
24721
24703
|
prefix = `Command exited with code ${result.exitCode}.`;
|
|
24722
24704
|
}
|
|
24723
24705
|
if (prefix) {
|
|
@@ -24743,7 +24725,7 @@ ${mainContent}`;
|
|
|
24743
24725
|
status: finalStatus,
|
|
24744
24726
|
resultDisplay: finalOutput
|
|
24745
24727
|
};
|
|
24746
|
-
if (finalStatus !==
|
|
24728
|
+
if (finalStatus !== "cancelled" /* Cancelled */) {
|
|
24747
24729
|
addItemToHistory(
|
|
24748
24730
|
{
|
|
24749
24731
|
type: "tool_group",
|
|
@@ -25733,7 +25715,7 @@ function useQuotaAndFallback({
|
|
|
25733
25715
|
error.retryDelayMs ? `Access resets at ${getResetTimeMessage(error.retryDelayMs)}.` : null,
|
|
25734
25716
|
`/stats model for usage details`,
|
|
25735
25717
|
`/model to switch models.`,
|
|
25736
|
-
contentGeneratorConfig?.authType ===
|
|
25718
|
+
contentGeneratorConfig?.authType === "oauth-personal" /* LOGIN_WITH_GOOGLE */ ? `/auth to switch to API key.` : null
|
|
25737
25719
|
].filter(Boolean);
|
|
25738
25720
|
message = messageLines.join("\n");
|
|
25739
25721
|
} else if (error instanceof ModelNotFoundError) {
|
|
@@ -25921,7 +25903,7 @@ var useEditorSettings = (loadedSettings, setEditorError, addItem) => {
|
|
|
25921
25903
|
);
|
|
25922
25904
|
setEditorError(null);
|
|
25923
25905
|
setIsEditorDialogOpen(false);
|
|
25924
|
-
coreEvents.emit(
|
|
25906
|
+
coreEvents.emit("editor-selected" /* EditorSelected */, { editor: editorType });
|
|
25925
25907
|
} catch (error) {
|
|
25926
25908
|
setEditorError(`Failed to set editor preference: ${error}`);
|
|
25927
25909
|
}
|
|
@@ -25930,7 +25912,7 @@ var useEditorSettings = (loadedSettings, setEditorError, addItem) => {
|
|
|
25930
25912
|
);
|
|
25931
25913
|
const exitEditorDialog = (0, import_react97.useCallback)(() => {
|
|
25932
25914
|
setIsEditorDialogOpen(false);
|
|
25933
|
-
coreEvents.emit(
|
|
25915
|
+
coreEvents.emit("editor-selected" /* EditorSelected */, { editor: void 0 });
|
|
25934
25916
|
}, []);
|
|
25935
25917
|
return {
|
|
25936
25918
|
isEditorDialogOpen,
|
|
@@ -26307,7 +26289,7 @@ var useSlashCommandProcessor = (config, settings, addItem, clearItems, loadHisto
|
|
|
26307
26289
|
canonicalPath: resolvedCommandPath
|
|
26308
26290
|
} = parseSlashCommand(trimmed, commands);
|
|
26309
26291
|
if (!commandToExecute) {
|
|
26310
|
-
const isMcpLoading = config?.getMcpClientManager()?.getDiscoveryState() ===
|
|
26292
|
+
const isMcpLoading = config?.getMcpClientManager()?.getDiscoveryState() === "in_progress" /* IN_PROGRESS */;
|
|
26311
26293
|
if (isMcpLoading) {
|
|
26312
26294
|
setIsProcessing(true);
|
|
26313
26295
|
if (addToHistory) {
|
|
@@ -26478,7 +26460,7 @@ var useSlashCommandProcessor = (config, settings, addItem, clearItems, loadHisto
|
|
|
26478
26460
|
onConfirm: async (resolvedOutcome) => {
|
|
26479
26461
|
resolve3({
|
|
26480
26462
|
outcome: resolvedOutcome,
|
|
26481
|
-
approvedCommands: resolvedOutcome ===
|
|
26463
|
+
approvedCommands: resolvedOutcome === "cancel" /* Cancel */ ? [] : result.commandsToConfirm
|
|
26482
26464
|
});
|
|
26483
26465
|
}
|
|
26484
26466
|
};
|
|
@@ -26486,7 +26468,7 @@ var useSlashCommandProcessor = (config, settings, addItem, clearItems, loadHisto
|
|
|
26486
26468
|
callId,
|
|
26487
26469
|
name: "Expansion",
|
|
26488
26470
|
description: "Command expansion needs shell access",
|
|
26489
|
-
status:
|
|
26471
|
+
status: "awaiting_approval" /* AwaitingApproval */,
|
|
26490
26472
|
isClientInitiated: true,
|
|
26491
26473
|
resultDisplay: void 0,
|
|
26492
26474
|
confirmationDetails
|
|
@@ -26497,7 +26479,7 @@ var useSlashCommandProcessor = (config, settings, addItem, clearItems, loadHisto
|
|
|
26497
26479
|
});
|
|
26498
26480
|
});
|
|
26499
26481
|
setPendingItem(null);
|
|
26500
|
-
if (outcome ===
|
|
26482
|
+
if (outcome === "cancel" /* Cancel */ || !approvedCommands || approvedCommands.length === 0) {
|
|
26501
26483
|
addItem(
|
|
26502
26484
|
{
|
|
26503
26485
|
type: "info" /* INFO */,
|
|
@@ -26507,7 +26489,7 @@ var useSlashCommandProcessor = (config, settings, addItem, clearItems, loadHisto
|
|
|
26507
26489
|
);
|
|
26508
26490
|
return { type: "handled" };
|
|
26509
26491
|
}
|
|
26510
|
-
if (outcome ===
|
|
26492
|
+
if (outcome === "proceed_always" /* ProceedAlways */) {
|
|
26511
26493
|
setSessionShellAllowlist(
|
|
26512
26494
|
(prev) => /* @__PURE__ */ new Set([...prev, ...approvedCommands])
|
|
26513
26495
|
);
|
|
@@ -26983,7 +26965,7 @@ function mapToDisplay(toolOrTools, options = {}) {
|
|
|
26983
26965
|
let description;
|
|
26984
26966
|
let renderOutputAsMarkdown = false;
|
|
26985
26967
|
const displayName = call.tool?.displayName ?? call.request.name;
|
|
26986
|
-
if (call.status ===
|
|
26968
|
+
if (call.status === "error" /* Error */) {
|
|
26987
26969
|
description = JSON.stringify(call.request.args);
|
|
26988
26970
|
} else {
|
|
26989
26971
|
description = call.invocation.getDescription();
|
|
@@ -27006,27 +26988,27 @@ function mapToDisplay(toolOrTools, options = {}) {
|
|
|
27006
26988
|
let progress = void 0;
|
|
27007
26989
|
let progressTotal = void 0;
|
|
27008
26990
|
switch (call.status) {
|
|
27009
|
-
case
|
|
26991
|
+
case "success" /* Success */:
|
|
27010
26992
|
resultDisplay = call.response.resultDisplay;
|
|
27011
26993
|
outputFile = call.response.outputFile;
|
|
27012
26994
|
break;
|
|
27013
|
-
case
|
|
27014
|
-
case
|
|
26995
|
+
case "error" /* Error */:
|
|
26996
|
+
case "cancelled" /* Cancelled */:
|
|
27015
26997
|
resultDisplay = call.response.resultDisplay;
|
|
27016
26998
|
break;
|
|
27017
|
-
case
|
|
26999
|
+
case "awaiting_approval" /* AwaitingApproval */:
|
|
27018
27000
|
correlationId = call.correlationId;
|
|
27019
27001
|
confirmationDetails = call.confirmationDetails;
|
|
27020
27002
|
break;
|
|
27021
|
-
case
|
|
27003
|
+
case "executing" /* Executing */:
|
|
27022
27004
|
resultDisplay = call.liveOutput;
|
|
27023
27005
|
ptyId = call.pid;
|
|
27024
27006
|
progressMessage = call.progressMessage;
|
|
27025
27007
|
progress = call.progress;
|
|
27026
27008
|
progressTotal = call.progressTotal;
|
|
27027
27009
|
break;
|
|
27028
|
-
case
|
|
27029
|
-
case
|
|
27010
|
+
case "scheduled" /* Scheduled */:
|
|
27011
|
+
case "validating" /* Validating */:
|
|
27030
27012
|
break;
|
|
27031
27013
|
default: {
|
|
27032
27014
|
const exhaustiveCheck = call;
|
|
@@ -27097,7 +27079,7 @@ function useToolScheduler(onComplete, config, getPreferredEditor) {
|
|
|
27097
27079
|
const handler = (event) => {
|
|
27098
27080
|
const isRoot = event.schedulerId === ROOT_SCHEDULER_ID;
|
|
27099
27081
|
const hasExecuting = event.toolCalls.some(
|
|
27100
|
-
(tc) => tc.status ===
|
|
27082
|
+
(tc) => tc.status === "executing" /* Executing */ || (tc.status === "success" /* Success */ || tc.status === "error" /* Error */) && "tailToolCallRequest" in tc && tc.tailToolCallRequest != null
|
|
27101
27083
|
);
|
|
27102
27084
|
if (hasExecuting) {
|
|
27103
27085
|
setLastToolOutputTime(Date.now());
|
|
@@ -27106,7 +27088,7 @@ function useToolScheduler(onComplete, config, getPreferredEditor) {
|
|
|
27106
27088
|
const prevCalls = prev[event.schedulerId] ?? [];
|
|
27107
27089
|
const prevCallIds = new Set(prevCalls.map((tc) => tc.request.callId));
|
|
27108
27090
|
const filteredToolCalls = isRoot ? event.toolCalls : event.toolCalls.filter(
|
|
27109
|
-
(tc) => tc.status ===
|
|
27091
|
+
(tc) => tc.status === "awaiting_approval" /* AwaitingApproval */ || prevCallIds.has(tc.request.callId)
|
|
27110
27092
|
);
|
|
27111
27093
|
if (!isRoot && filteredToolCalls.length === 0 && prevCalls.length === 0) {
|
|
27112
27094
|
return prev;
|
|
@@ -27118,9 +27100,9 @@ function useToolScheduler(onComplete, config, getPreferredEditor) {
|
|
|
27118
27100
|
};
|
|
27119
27101
|
});
|
|
27120
27102
|
};
|
|
27121
|
-
messageBus.subscribe(
|
|
27103
|
+
messageBus.subscribe("tool-calls-update" /* TOOL_CALLS_UPDATE */, handler);
|
|
27122
27104
|
return () => {
|
|
27123
|
-
messageBus.unsubscribe(
|
|
27105
|
+
messageBus.unsubscribe("tool-calls-update" /* TOOL_CALLS_UPDATE */, handler);
|
|
27124
27106
|
};
|
|
27125
27107
|
}, [messageBus, internalAdaptToolCalls]);
|
|
27126
27108
|
(0, import_react104.useEffect)(() => {
|
|
@@ -27142,9 +27124,9 @@ function useToolScheduler(onComplete, config, getPreferredEditor) {
|
|
|
27142
27124
|
};
|
|
27143
27125
|
});
|
|
27144
27126
|
};
|
|
27145
|
-
messageBus.subscribe(
|
|
27127
|
+
messageBus.subscribe("subagent-activity" /* SUBAGENT_ACTIVITY */, handler);
|
|
27146
27128
|
return () => {
|
|
27147
|
-
messageBus.unsubscribe(
|
|
27129
|
+
messageBus.unsubscribe("subagent-activity" /* SUBAGENT_ACTIVITY */, handler);
|
|
27148
27130
|
};
|
|
27149
27131
|
}, [messageBus]);
|
|
27150
27132
|
const schedule = (0, import_react104.useCallback)(
|
|
@@ -27243,8 +27225,8 @@ function adaptToolCalls(coreCalls, prevTracked) {
|
|
|
27243
27225
|
const prev = prevMap.get(coreCall.request.callId);
|
|
27244
27226
|
const responseSubmittedToGemini = prev?.responseSubmittedToGemini ?? false;
|
|
27245
27227
|
let status = coreCall.status;
|
|
27246
|
-
if ((status ===
|
|
27247
|
-
status =
|
|
27228
|
+
if ((status === "success" /* Success */ || status === "error" /* Error */) && "tailToolCallRequest" in coreCall && coreCall.tailToolCallRequest != null) {
|
|
27229
|
+
status = "executing" /* Executing */;
|
|
27248
27230
|
}
|
|
27249
27231
|
return {
|
|
27250
27232
|
...coreCall,
|
|
@@ -27276,7 +27258,7 @@ function getBackgroundedToolInfo(toolCall) {
|
|
|
27276
27258
|
};
|
|
27277
27259
|
}
|
|
27278
27260
|
function isBackgroundableExecutingToolCall(toolCall) {
|
|
27279
|
-
return toolCall.status ===
|
|
27261
|
+
return toolCall.status === "executing" /* Executing */ && typeof toolCall.pid === "number";
|
|
27280
27262
|
}
|
|
27281
27263
|
function showCitations(settings) {
|
|
27282
27264
|
const enabled = settings.merged.ui.showCitations;
|
|
@@ -27286,14 +27268,14 @@ function showCitations(settings) {
|
|
|
27286
27268
|
return true;
|
|
27287
27269
|
}
|
|
27288
27270
|
function calculateStreamingState(isResponding, toolCalls) {
|
|
27289
|
-
if (toolCalls.some((tc) => tc.status ===
|
|
27271
|
+
if (toolCalls.some((tc) => tc.status === "awaiting_approval" /* AwaitingApproval */)) {
|
|
27290
27272
|
return "waiting_for_confirmation" /* WaitingForConfirmation */;
|
|
27291
27273
|
}
|
|
27292
27274
|
const isAnyToolActive = toolCalls.some((tc) => {
|
|
27293
|
-
if (tc.status ===
|
|
27275
|
+
if (tc.status === "executing" /* Executing */ || tc.status === "scheduled" /* Scheduled */ || tc.status === "validating" /* Validating */) {
|
|
27294
27276
|
return true;
|
|
27295
27277
|
}
|
|
27296
|
-
if (tc.status ===
|
|
27278
|
+
if (tc.status === "success" /* Success */ || tc.status === "error" /* Error */ || tc.status === "cancelled" /* Cancelled */) {
|
|
27297
27279
|
return !tc.responseSubmittedToGemini;
|
|
27298
27280
|
}
|
|
27299
27281
|
return false;
|
|
@@ -27340,9 +27322,9 @@ var useGeminiStream = (geminiClient, history, addItem, config, settings, onDebug
|
|
|
27340
27322
|
}
|
|
27341
27323
|
setRetryStatus(payload);
|
|
27342
27324
|
};
|
|
27343
|
-
coreEvents.on(
|
|
27325
|
+
coreEvents.on("retry-attempt" /* RetryAttempt */, handleRetryAttempt);
|
|
27344
27326
|
return () => {
|
|
27345
|
-
coreEvents.off(
|
|
27327
|
+
coreEvents.off("retry-attempt" /* RetryAttempt */, handleRetryAttempt);
|
|
27346
27328
|
};
|
|
27347
27329
|
}, [isRespondingRef]);
|
|
27348
27330
|
const [
|
|
@@ -27475,12 +27457,12 @@ var useGeminiStream = (geminiClient, history, addItem, config, settings, onDebug
|
|
|
27475
27457
|
const tc = toolCalls[i];
|
|
27476
27458
|
if (pushedToolCallIdsRef.current.has(tc.request.callId)) continue;
|
|
27477
27459
|
if (tc.status === "success" || tc.status === "error" || tc.status === "cancelled") {
|
|
27478
|
-
const isAgent = tc.tool?.kind ===
|
|
27460
|
+
const isAgent = tc.tool?.kind === "agent" /* Agent */;
|
|
27479
27461
|
if (isAgent) {
|
|
27480
27462
|
let contigAgentsComplete = true;
|
|
27481
27463
|
for (let j = i + 1; j < toolCalls.length; j++) {
|
|
27482
27464
|
const nextTc = toolCalls[j];
|
|
27483
|
-
if (nextTc.tool?.kind ===
|
|
27465
|
+
if (nextTc.tool?.kind === "agent" /* Agent */) {
|
|
27484
27466
|
if (nextTc.status !== "success" && nextTc.status !== "error" && nextTc.status !== "cancelled") {
|
|
27485
27467
|
contigAgentsComplete = false;
|
|
27486
27468
|
break;
|
|
@@ -27506,7 +27488,7 @@ var useGeminiStream = (geminiClient, history, addItem, config, settings, onDebug
|
|
|
27506
27488
|
let currentGroup = [];
|
|
27507
27489
|
for (const tc of toolsToPush) {
|
|
27508
27490
|
newPushed.add(tc.request.callId);
|
|
27509
|
-
if (tc.tool?.kind ===
|
|
27491
|
+
if (tc.tool?.kind === "agent" /* Agent */) {
|
|
27510
27492
|
currentGroup.push(tc);
|
|
27511
27493
|
} else {
|
|
27512
27494
|
if (currentGroup.length > 0) {
|
|
@@ -27656,7 +27638,7 @@ var useGeminiStream = (geminiClient, history, addItem, config, settings, onDebug
|
|
|
27656
27638
|
prevActiveShellPtyIdRef.current = activeShellPtyId;
|
|
27657
27639
|
}, [activeShellPtyId, addItem, setIsResponding]);
|
|
27658
27640
|
(0, import_react105.useEffect)(() => {
|
|
27659
|
-
if (config.getApprovalMode() ===
|
|
27641
|
+
if (config.getApprovalMode() === "yolo" /* YOLO */ && streamingState === "idle" /* Idle */) {
|
|
27660
27642
|
const lastUserMessageIndex = history.findLastIndex(
|
|
27661
27643
|
(item) => item.type === "user" /* USER */
|
|
27662
27644
|
);
|
|
@@ -27742,7 +27724,7 @@ var useGeminiStream = (geminiClient, history, addItem, config, settings, onDebug
|
|
|
27742
27724
|
if (tool.name === SHELL_COMMAND_NAME) {
|
|
27743
27725
|
return {
|
|
27744
27726
|
...tool,
|
|
27745
|
-
status:
|
|
27727
|
+
status: "cancelled" /* Cancelled */,
|
|
27746
27728
|
resultDisplay: tool.resultDisplay
|
|
27747
27729
|
};
|
|
27748
27730
|
}
|
|
@@ -27798,7 +27780,7 @@ var useGeminiStream = (geminiClient, history, addItem, config, settings, onDebug
|
|
|
27798
27780
|
let localQueryToSendToGemini = null;
|
|
27799
27781
|
if (typeof query === "string") {
|
|
27800
27782
|
const trimmedQuery = query.trim();
|
|
27801
|
-
await logger?.logMessage(
|
|
27783
|
+
await logger?.logMessage("user" /* USER */, trimmedQuery);
|
|
27802
27784
|
if (!shellModeActive) {
|
|
27803
27785
|
const slashCommandResult = isSlashCommand(trimmedQuery) ? await handleSlashCommand(trimmedQuery) : false;
|
|
27804
27786
|
if (slashCommandResult) {
|
|
@@ -27954,7 +27936,7 @@ var useGeminiStream = (geminiClient, history, addItem, config, settings, onDebug
|
|
|
27954
27936
|
if (pendingHistoryItemRef.current) {
|
|
27955
27937
|
if (pendingHistoryItemRef.current.type === "tool_group") {
|
|
27956
27938
|
const updatedTools = pendingHistoryItemRef.current.tools.map(
|
|
27957
|
-
(tool) => tool.status ===
|
|
27939
|
+
(tool) => tool.status === "validating" /* Validating */ || tool.status === "scheduled" /* Scheduled */ || tool.status === "awaiting_approval" /* AwaitingApproval */ || tool.status === "executing" /* Executing */ ? { ...tool, status: "cancelled" /* Cancelled */ } : tool
|
|
27958
27940
|
);
|
|
27959
27941
|
const pendingItem = {
|
|
27960
27942
|
...pendingHistoryItemRef.current,
|
|
@@ -28200,15 +28182,15 @@ var useGeminiStream = (geminiClient, history, addItem, config, settings, onDebug
|
|
|
28200
28182
|
let geminiMessageBuffer = "";
|
|
28201
28183
|
const toolCallRequests = [];
|
|
28202
28184
|
for await (const event of stream) {
|
|
28203
|
-
if (event.type !==
|
|
28185
|
+
if (event.type !== "thought" /* Thought */ && thoughtRef.current !== null) {
|
|
28204
28186
|
setThought(null);
|
|
28205
28187
|
}
|
|
28206
28188
|
switch (event.type) {
|
|
28207
|
-
case
|
|
28189
|
+
case "thought" /* Thought */:
|
|
28208
28190
|
setLastGeminiActivityTime(Date.now());
|
|
28209
28191
|
handleThoughtEvent(event.value, userMessageTimestamp);
|
|
28210
28192
|
break;
|
|
28211
|
-
case
|
|
28193
|
+
case "content" /* Content */:
|
|
28212
28194
|
setLastGeminiActivityTime(Date.now());
|
|
28213
28195
|
geminiMessageBuffer = handleContentEvent(
|
|
28214
28196
|
event.value,
|
|
@@ -28216,16 +28198,16 @@ var useGeminiStream = (geminiClient, history, addItem, config, settings, onDebug
|
|
|
28216
28198
|
userMessageTimestamp
|
|
28217
28199
|
);
|
|
28218
28200
|
break;
|
|
28219
|
-
case
|
|
28201
|
+
case "tool_call_request" /* ToolCallRequest */:
|
|
28220
28202
|
toolCallRequests.push(event.value);
|
|
28221
28203
|
break;
|
|
28222
|
-
case
|
|
28204
|
+
case "user_cancelled" /* UserCancelled */:
|
|
28223
28205
|
handleUserCancelledEvent(userMessageTimestamp);
|
|
28224
28206
|
break;
|
|
28225
|
-
case
|
|
28207
|
+
case "error" /* Error */:
|
|
28226
28208
|
handleErrorEvent(event.value, userMessageTimestamp);
|
|
28227
28209
|
break;
|
|
28228
|
-
case
|
|
28210
|
+
case "agent_execution_stopped" /* AgentExecutionStopped */:
|
|
28229
28211
|
handleAgentExecutionStoppedEvent(
|
|
28230
28212
|
event.value.reason,
|
|
28231
28213
|
userMessageTimestamp,
|
|
@@ -28233,7 +28215,7 @@ var useGeminiStream = (geminiClient, history, addItem, config, settings, onDebug
|
|
|
28233
28215
|
event.value.contextCleared
|
|
28234
28216
|
);
|
|
28235
28217
|
break;
|
|
28236
|
-
case
|
|
28218
|
+
case "agent_execution_blocked" /* AgentExecutionBlocked */:
|
|
28237
28219
|
handleAgentExecutionBlockedEvent(
|
|
28238
28220
|
event.value.reason,
|
|
28239
28221
|
userMessageTimestamp,
|
|
@@ -28241,35 +28223,35 @@ var useGeminiStream = (geminiClient, history, addItem, config, settings, onDebug
|
|
|
28241
28223
|
event.value.contextCleared
|
|
28242
28224
|
);
|
|
28243
28225
|
break;
|
|
28244
|
-
case
|
|
28226
|
+
case "chat_compressed" /* ChatCompressed */:
|
|
28245
28227
|
handleChatCompressionEvent(event.value, userMessageTimestamp);
|
|
28246
28228
|
break;
|
|
28247
|
-
case
|
|
28248
|
-
case
|
|
28229
|
+
case "tool_call_confirmation" /* ToolCallConfirmation */:
|
|
28230
|
+
case "tool_call_response" /* ToolCallResponse */:
|
|
28249
28231
|
break;
|
|
28250
|
-
case
|
|
28232
|
+
case "max_session_turns" /* MaxSessionTurns */:
|
|
28251
28233
|
handleMaxSessionTurnsEvent();
|
|
28252
28234
|
break;
|
|
28253
|
-
case
|
|
28235
|
+
case "context_window_will_overflow" /* ContextWindowWillOverflow */:
|
|
28254
28236
|
handleContextWindowWillOverflowEvent(
|
|
28255
28237
|
event.value.estimatedRequestTokenCount,
|
|
28256
28238
|
event.value.remainingTokenCount
|
|
28257
28239
|
);
|
|
28258
28240
|
break;
|
|
28259
|
-
case
|
|
28241
|
+
case "finished" /* Finished */:
|
|
28260
28242
|
handleFinishedEvent(event, userMessageTimestamp);
|
|
28261
28243
|
break;
|
|
28262
|
-
case
|
|
28244
|
+
case "citation" /* Citation */:
|
|
28263
28245
|
handleCitationEvent(event.value, userMessageTimestamp);
|
|
28264
28246
|
break;
|
|
28265
|
-
case
|
|
28247
|
+
case "model_info" /* ModelInfo */:
|
|
28266
28248
|
handleChatModelEvent(event.value, userMessageTimestamp);
|
|
28267
28249
|
break;
|
|
28268
|
-
case
|
|
28250
|
+
case "loop_detected" /* LoopDetected */:
|
|
28269
28251
|
loopDetectedRef.current = true;
|
|
28270
28252
|
break;
|
|
28271
|
-
case
|
|
28272
|
-
case
|
|
28253
|
+
case "retry" /* Retry */:
|
|
28254
|
+
case "invalid_stream" /* InvalidStream */:
|
|
28273
28255
|
break;
|
|
28274
28256
|
default: {
|
|
28275
28257
|
const unreachable = event;
|
|
@@ -28310,7 +28292,7 @@ var useGeminiStream = (geminiClient, history, addItem, config, settings, onDebug
|
|
|
28310
28292
|
const submitQuery = (0, import_react105.useCallback)(
|
|
28311
28293
|
async (query, options, prompt_id) => runInDevTraceSpan(
|
|
28312
28294
|
{
|
|
28313
|
-
operation: options?.isContinuation ?
|
|
28295
|
+
operation: options?.isContinuation ? "system_prompt" /* SystemPrompt */ : "user_prompt" /* UserPrompt */,
|
|
28314
28296
|
sessionId: config.getSessionId()
|
|
28315
28297
|
},
|
|
28316
28298
|
async ({ metadata: spanMetadata }) => {
|
|
@@ -28471,7 +28453,7 @@ var useGeminiStream = (geminiClient, history, addItem, config, settings, onDebug
|
|
|
28471
28453
|
);
|
|
28472
28454
|
const handleApprovalModeChange = (0, import_react105.useCallback)(
|
|
28473
28455
|
async (newApprovalMode) => {
|
|
28474
|
-
if (previousApprovalModeRef.current ===
|
|
28456
|
+
if (previousApprovalModeRef.current === "plan" /* PLAN */ && newApprovalMode !== "plan" /* PLAN */ && streamingState === "idle" /* Idle */) {
|
|
28475
28457
|
if (geminiClient) {
|
|
28476
28458
|
try {
|
|
28477
28459
|
await geminiClient.addHistory({
|
|
@@ -28494,11 +28476,11 @@ var useGeminiStream = (geminiClient, history, addItem, config, settings, onDebug
|
|
|
28494
28476
|
}
|
|
28495
28477
|
}
|
|
28496
28478
|
previousApprovalModeRef.current = newApprovalMode;
|
|
28497
|
-
if (newApprovalMode ===
|
|
28479
|
+
if (newApprovalMode === "yolo" /* YOLO */ || newApprovalMode === "autoEdit" /* AUTO_EDIT */) {
|
|
28498
28480
|
let awaitingApprovalCalls = toolCalls.filter(
|
|
28499
28481
|
(call) => call.status === "awaiting_approval" && !call.request.forcedAsk
|
|
28500
28482
|
);
|
|
28501
|
-
if (newApprovalMode ===
|
|
28483
|
+
if (newApprovalMode === "autoEdit" /* AUTO_EDIT */) {
|
|
28502
28484
|
awaitingApprovalCalls = awaitingApprovalCalls.filter(
|
|
28503
28485
|
(call) => EDIT_TOOL_NAMES.has(call.request.name)
|
|
28504
28486
|
);
|
|
@@ -28507,11 +28489,11 @@ var useGeminiStream = (geminiClient, history, addItem, config, settings, onDebug
|
|
|
28507
28489
|
if (call.correlationId) {
|
|
28508
28490
|
try {
|
|
28509
28491
|
await config.getMessageBus().publish({
|
|
28510
|
-
type:
|
|
28492
|
+
type: "tool-confirmation-response" /* TOOL_CONFIRMATION_RESPONSE */,
|
|
28511
28493
|
correlationId: call.correlationId,
|
|
28512
28494
|
confirmed: true,
|
|
28513
28495
|
requiresUserConfirmation: false,
|
|
28514
|
-
outcome:
|
|
28496
|
+
outcome: "proceed_once" /* ProceedOnce */
|
|
28515
28497
|
});
|
|
28516
28498
|
} catch (error) {
|
|
28517
28499
|
debugLogger.warn(
|
|
@@ -28589,14 +28571,14 @@ var useGeminiStream = (geminiClient, history, addItem, config, settings, onDebug
|
|
|
28589
28571
|
);
|
|
28590
28572
|
if (isLowErrorVerbosity) {
|
|
28591
28573
|
suppressedToolErrorCountRef.current += geminiTools.filter(
|
|
28592
|
-
(tc) => tc.status ===
|
|
28574
|
+
(tc) => tc.status === "error" /* Error */
|
|
28593
28575
|
).length;
|
|
28594
28576
|
}
|
|
28595
28577
|
if (geminiTools.length === 0) {
|
|
28596
28578
|
return;
|
|
28597
28579
|
}
|
|
28598
28580
|
const stopExecutionTool = geminiTools.find(
|
|
28599
|
-
(tc) => tc.response.errorType ===
|
|
28581
|
+
(tc) => tc.response.errorType === "stop_execution" /* STOP_EXECUTION */
|
|
28600
28582
|
);
|
|
28601
28583
|
if (stopExecutionTool && stopExecutionTool.response.error) {
|
|
28602
28584
|
maybeAddSuppressedToolErrorNote();
|
|
@@ -28616,9 +28598,9 @@ var useGeminiStream = (geminiClient, history, addItem, config, settings, onDebug
|
|
|
28616
28598
|
(tc) => !isTopicTool2(tc.request.name)
|
|
28617
28599
|
);
|
|
28618
28600
|
const allDeclinableToolsCancelled = declinableTools.length > 0 && declinableTools.every(
|
|
28619
|
-
(tc) => tc.status ===
|
|
28601
|
+
(tc) => tc.status === "cancelled" /* Cancelled */
|
|
28620
28602
|
);
|
|
28621
|
-
const allToolsCancelled = geminiTools.length > 0 && geminiTools.every((tc) => tc.status ===
|
|
28603
|
+
const allToolsCancelled = geminiTools.length > 0 && geminiTools.every((tc) => tc.status === "cancelled" /* Cancelled */);
|
|
28622
28604
|
if (allDeclinableToolsCancelled || allToolsCancelled) {
|
|
28623
28605
|
if (!turnCancelledRef.current) {
|
|
28624
28606
|
addItem({
|
|
@@ -28699,7 +28681,7 @@ var useGeminiStream = (geminiClient, history, addItem, config, settings, onDebug
|
|
|
28699
28681
|
return;
|
|
28700
28682
|
}
|
|
28701
28683
|
const restorableToolCalls = toolCalls.filter(
|
|
28702
|
-
(toolCall) => EDIT_TOOL_NAMES.has(toolCall.request.name) && toolCall.status ===
|
|
28684
|
+
(toolCall) => EDIT_TOOL_NAMES.has(toolCall.request.name) && toolCall.status === "awaiting_approval" /* AwaitingApproval */
|
|
28703
28685
|
);
|
|
28704
28686
|
if (restorableToolCalls.length > 0) {
|
|
28705
28687
|
if (!gitService) {
|
|
@@ -28918,14 +28900,14 @@ var useAgentStream = ({
|
|
|
28918
28900
|
const displayName = legacyState?.displayName ?? event.name;
|
|
28919
28901
|
const isOutputMarkdown = legacyState?.isOutputMarkdown ?? false;
|
|
28920
28902
|
const desc = legacyState?.description ?? "";
|
|
28921
|
-
const fallbackKind =
|
|
28903
|
+
const fallbackKind = "other" /* Other */;
|
|
28922
28904
|
const newCall = {
|
|
28923
28905
|
callId: event.requestId,
|
|
28924
28906
|
name: displayName,
|
|
28925
28907
|
originalRequestName: event.name,
|
|
28926
28908
|
description: desc,
|
|
28927
28909
|
display: event.display,
|
|
28928
|
-
status:
|
|
28910
|
+
status: "scheduled" /* Scheduled */,
|
|
28929
28911
|
isClientInitiated: false,
|
|
28930
28912
|
renderOutputAsMarkdown: isOutputMarkdown,
|
|
28931
28913
|
kind: legacyState?.kind ?? fallbackKind,
|
|
@@ -28943,10 +28925,10 @@ var useAgentStream = ({
|
|
|
28943
28925
|
const evtStatus = legacyState?.status;
|
|
28944
28926
|
let status = tc.status;
|
|
28945
28927
|
if (evtStatus === "executing")
|
|
28946
|
-
status =
|
|
28947
|
-
else if (evtStatus === "error") status =
|
|
28928
|
+
status = "executing" /* Executing */;
|
|
28929
|
+
else if (evtStatus === "error") status = "error" /* Error */;
|
|
28948
28930
|
else if (evtStatus === "success")
|
|
28949
|
-
status =
|
|
28931
|
+
status = "success" /* Success */;
|
|
28950
28932
|
const display = event.display?.result;
|
|
28951
28933
|
const liveOutput = displayContentToString(display) ?? tc.resultDisplay;
|
|
28952
28934
|
const progressMessage = legacyState?.progressMessage ?? tc.progressMessage;
|
|
@@ -28979,7 +28961,7 @@ var useAgentStream = ({
|
|
|
28979
28961
|
const resultDisplay = displayContentToString(display) ?? tc.resultDisplay;
|
|
28980
28962
|
return {
|
|
28981
28963
|
...tc,
|
|
28982
|
-
status: event.isError ?
|
|
28964
|
+
status: event.isError ? "error" /* Error */ : "success" /* Success */,
|
|
28983
28965
|
display: event.display ? { ...tc.display, ...event.display } : tc.display,
|
|
28984
28966
|
resultDisplay,
|
|
28985
28967
|
outputFile
|
|
@@ -29031,7 +29013,7 @@ var useAgentStream = ({
|
|
|
29031
29013
|
if (!options?.isContinuation) {
|
|
29032
29014
|
if (typeof query === "string") {
|
|
29033
29015
|
addItem({ type: "user" /* USER */, text: query }, timestamp);
|
|
29034
|
-
void logger?.logMessage(
|
|
29016
|
+
void logger?.logMessage("user" /* USER */, query);
|
|
29035
29017
|
}
|
|
29036
29018
|
startNewPrompt();
|
|
29037
29019
|
}
|
|
@@ -30532,9 +30514,9 @@ var useFolderTrust = (settings, onTrustChange, addItem) => {
|
|
|
30532
30514
|
const handleFolderTrustSelect = (0, import_react111.useCallback)(
|
|
30533
30515
|
async (choice) => {
|
|
30534
30516
|
const trustLevelMap = {
|
|
30535
|
-
["trust_folder" /* TRUST_FOLDER */]:
|
|
30536
|
-
["trust_parent" /* TRUST_PARENT */]:
|
|
30537
|
-
["do_not_trust" /* DO_NOT_TRUST */]:
|
|
30517
|
+
["trust_folder" /* TRUST_FOLDER */]: "TRUST_FOLDER" /* TRUST_FOLDER */,
|
|
30518
|
+
["trust_parent" /* TRUST_PARENT */]: "TRUST_PARENT" /* TRUST_PARENT */,
|
|
30519
|
+
["do_not_trust" /* DO_NOT_TRUST */]: "DO_NOT_TRUST" /* DO_NOT_TRUST */
|
|
30538
30520
|
};
|
|
30539
30521
|
const trustLevel = trustLevelMap[choice];
|
|
30540
30522
|
if (!trustLevel) return;
|
|
@@ -30553,7 +30535,7 @@ var useFolderTrust = (settings, onTrustChange, addItem) => {
|
|
|
30553
30535
|
}, 100);
|
|
30554
30536
|
return;
|
|
30555
30537
|
}
|
|
30556
|
-
const currentIsTrusted = trustLevel ===
|
|
30538
|
+
const currentIsTrusted = trustLevel === "TRUST_FOLDER" /* TRUST_FOLDER */ || trustLevel === "TRUST_PARENT" /* TRUST_PARENT */;
|
|
30557
30539
|
onTrustChange(currentIsTrusted);
|
|
30558
30540
|
setIsTrusted(currentIsTrusted);
|
|
30559
30541
|
const wasTrusted = isTrusted ?? false;
|
|
@@ -31551,7 +31533,7 @@ function useMessageQueue({
|
|
|
31551
31533
|
var import_react113 = __toESM(require_react(), 1);
|
|
31552
31534
|
function useMcpStatus(config) {
|
|
31553
31535
|
const [discoveryState, setDiscoveryState] = (0, import_react113.useState)(
|
|
31554
|
-
() => config.getMcpClientManager()?.getDiscoveryState() ??
|
|
31536
|
+
() => config.getMcpClientManager()?.getDiscoveryState() ?? "not_started" /* NOT_STARTED */
|
|
31555
31537
|
);
|
|
31556
31538
|
const [mcpServerCount, setMcpServerCount] = (0, import_react113.useState)(
|
|
31557
31539
|
() => config.getMcpClientManager()?.getMcpServerCount() ?? 0
|
|
@@ -31564,12 +31546,12 @@ function useMcpStatus(config) {
|
|
|
31564
31546
|
setMcpServerCount(manager.getMcpServerCount());
|
|
31565
31547
|
}
|
|
31566
31548
|
};
|
|
31567
|
-
coreEvents.on(
|
|
31549
|
+
coreEvents.on("mcp-client-update" /* McpClientUpdate */, onChange);
|
|
31568
31550
|
return () => {
|
|
31569
|
-
coreEvents.off(
|
|
31551
|
+
coreEvents.off("mcp-client-update" /* McpClientUpdate */, onChange);
|
|
31570
31552
|
};
|
|
31571
31553
|
}, [config]);
|
|
31572
|
-
const isMcpReady = discoveryState ===
|
|
31554
|
+
const isMcpReady = discoveryState === "completed" /* COMPLETED */ || discoveryState === "not_started" /* NOT_STARTED */ && mcpServerCount === 0;
|
|
31573
31555
|
return {
|
|
31574
31556
|
discoveryState,
|
|
31575
31557
|
mcpServerCount,
|
|
@@ -31596,7 +31578,7 @@ function useApprovalModeIndicator({
|
|
|
31596
31578
|
(key) => {
|
|
31597
31579
|
let nextApprovalMode;
|
|
31598
31580
|
if (keyMatchers["app.toggleYolo" /* TOGGLE_YOLO */](key)) {
|
|
31599
|
-
if (config.isYoloModeDisabled() && config.getApprovalMode() !==
|
|
31581
|
+
if (config.isYoloModeDisabled() && config.getApprovalMode() !== "yolo" /* YOLO */) {
|
|
31600
31582
|
if (addItem) {
|
|
31601
31583
|
let text = "You cannot enter YOLO mode since it is disabled in your settings.";
|
|
31602
31584
|
const adminSettings = config.getRemoteAdminSettings();
|
|
@@ -31614,21 +31596,21 @@ function useApprovalModeIndicator({
|
|
|
31614
31596
|
}
|
|
31615
31597
|
return;
|
|
31616
31598
|
}
|
|
31617
|
-
nextApprovalMode = config.getApprovalMode() ===
|
|
31599
|
+
nextApprovalMode = config.getApprovalMode() === "yolo" /* YOLO */ ? "default" /* DEFAULT */ : "yolo" /* YOLO */;
|
|
31618
31600
|
} else if (keyMatchers["app.cycleApprovalMode" /* CYCLE_APPROVAL_MODE */](key)) {
|
|
31619
31601
|
const currentMode = config.getApprovalMode();
|
|
31620
31602
|
switch (currentMode) {
|
|
31621
|
-
case
|
|
31622
|
-
nextApprovalMode =
|
|
31603
|
+
case "default" /* DEFAULT */:
|
|
31604
|
+
nextApprovalMode = "autoEdit" /* AUTO_EDIT */;
|
|
31623
31605
|
break;
|
|
31624
|
-
case
|
|
31625
|
-
nextApprovalMode = allowPlanMode ?
|
|
31606
|
+
case "autoEdit" /* AUTO_EDIT */:
|
|
31607
|
+
nextApprovalMode = allowPlanMode ? "plan" /* PLAN */ : "default" /* DEFAULT */;
|
|
31626
31608
|
break;
|
|
31627
|
-
case
|
|
31628
|
-
nextApprovalMode =
|
|
31609
|
+
case "plan" /* PLAN */:
|
|
31610
|
+
nextApprovalMode = "default" /* DEFAULT */;
|
|
31629
31611
|
break;
|
|
31630
|
-
case
|
|
31631
|
-
nextApprovalMode =
|
|
31612
|
+
case "yolo" /* YOLO */:
|
|
31613
|
+
nextApprovalMode = "autoEdit" /* AUTO_EDIT */;
|
|
31632
31614
|
break;
|
|
31633
31615
|
default:
|
|
31634
31616
|
}
|
|
@@ -32021,11 +32003,11 @@ var useHookDisplayState = () => {
|
|
|
32021
32003
|
removeHook();
|
|
32022
32004
|
}
|
|
32023
32005
|
};
|
|
32024
|
-
coreEvents.on(
|
|
32025
|
-
coreEvents.on(
|
|
32006
|
+
coreEvents.on("hook-start" /* HookStart */, handleHookStart);
|
|
32007
|
+
coreEvents.on("hook-end" /* HookEnd */, handleHookEnd);
|
|
32026
32008
|
return () => {
|
|
32027
|
-
coreEvents.off(
|
|
32028
|
-
coreEvents.off(
|
|
32009
|
+
coreEvents.off("hook-start" /* HookStart */, handleHookStart);
|
|
32010
|
+
coreEvents.off("hook-end" /* HookEnd */, handleHookEnd);
|
|
32029
32011
|
activeTimeouts.forEach(clearTimeout);
|
|
32030
32012
|
activeTimeouts.clear();
|
|
32031
32013
|
};
|
|
@@ -32915,7 +32897,7 @@ var AppContainer = (props) => {
|
|
|
32915
32897
|
setConfigInitialized(true);
|
|
32916
32898
|
startupProfiler.flush(config);
|
|
32917
32899
|
startAutoMemoryIfEnabled(config);
|
|
32918
|
-
const sessionStartSource = resumedSessionData ?
|
|
32900
|
+
const sessionStartSource = resumedSessionData ? "resume" /* Resume */ : "startup" /* Startup */;
|
|
32919
32901
|
const result = await config.getHookSystem()?.fireSessionStartEvent(sessionStartSource);
|
|
32920
32902
|
if (result) {
|
|
32921
32903
|
if (result.systemMessage) {
|
|
@@ -32951,7 +32933,7 @@ var AppContainer = (props) => {
|
|
|
32951
32933
|
);
|
|
32952
32934
|
const ideClient = await IdeClient.getInstance();
|
|
32953
32935
|
await ideClient.disconnect();
|
|
32954
|
-
await config?.getHookSystem()?.fireSessionEndEvent(
|
|
32936
|
+
await config?.getHookSystem()?.fireSessionEndEvent("exit" /* Exit */);
|
|
32955
32937
|
};
|
|
32956
32938
|
registerCleanup(cleanupFn);
|
|
32957
32939
|
return () => {
|
|
@@ -32976,11 +32958,11 @@ var AppContainer = (props) => {
|
|
|
32976
32958
|
resetTime: payload.resetTime
|
|
32977
32959
|
});
|
|
32978
32960
|
};
|
|
32979
|
-
coreEvents.on(
|
|
32980
|
-
coreEvents.on(
|
|
32961
|
+
coreEvents.on("model-changed" /* ModelChanged */, handleModelChanged);
|
|
32962
|
+
coreEvents.on("quota-changed" /* QuotaChanged */, handleQuotaChanged);
|
|
32981
32963
|
return () => {
|
|
32982
|
-
coreEvents.off(
|
|
32983
|
-
coreEvents.off(
|
|
32964
|
+
coreEvents.off("model-changed" /* ModelChanged */, handleModelChanged);
|
|
32965
|
+
coreEvents.off("quota-changed" /* QuotaChanged */, handleQuotaChanged);
|
|
32984
32966
|
};
|
|
32985
32967
|
}, [config]);
|
|
32986
32968
|
(0, import_react127.useEffect)(() => {
|
|
@@ -32993,16 +32975,16 @@ var AppContainer = (props) => {
|
|
|
32993
32975
|
const handleAgentsDiscovered = (payload) => {
|
|
32994
32976
|
setNewAgents(payload.agents);
|
|
32995
32977
|
};
|
|
32996
|
-
coreEvents.on(
|
|
32997
|
-
coreEvents.on(
|
|
32998
|
-
coreEvents.on(
|
|
32978
|
+
coreEvents.on("settings-changed" /* SettingsChanged */, handleSettingsChanged);
|
|
32979
|
+
coreEvents.on("admin-settings-changed" /* AdminSettingsChanged */, handleAdminSettingsChanged);
|
|
32980
|
+
coreEvents.on("agents-discovered" /* AgentsDiscovered */, handleAgentsDiscovered);
|
|
32999
32981
|
return () => {
|
|
33000
|
-
coreEvents.off(
|
|
32982
|
+
coreEvents.off("settings-changed" /* SettingsChanged */, handleSettingsChanged);
|
|
33001
32983
|
coreEvents.off(
|
|
33002
|
-
|
|
32984
|
+
"admin-settings-changed" /* AdminSettingsChanged */,
|
|
33003
32985
|
handleAdminSettingsChanged
|
|
33004
32986
|
);
|
|
33005
|
-
coreEvents.off(
|
|
32987
|
+
coreEvents.off("agents-discovered" /* AgentsDiscovered */, handleAgentsDiscovered);
|
|
33006
32988
|
};
|
|
33007
32989
|
}, [settings]);
|
|
33008
32990
|
const { errorCount, clearErrorCount } = useErrorCount();
|
|
@@ -33068,11 +33050,11 @@ var AppContainer = (props) => {
|
|
|
33068
33050
|
exitEditorDialog
|
|
33069
33051
|
} = useEditorSettings(settings, setEditorError, historyManager.addItem);
|
|
33070
33052
|
(0, import_react127.useEffect)(() => {
|
|
33071
|
-
coreEvents.on(
|
|
33072
|
-
coreEvents.on(
|
|
33053
|
+
coreEvents.on("external-editor-closed" /* ExternalEditorClosed */, handleEditorClose);
|
|
33054
|
+
coreEvents.on("request-editor-selection" /* RequestEditorSelection */, openEditorDialog);
|
|
33073
33055
|
return () => {
|
|
33074
|
-
coreEvents.off(
|
|
33075
|
-
coreEvents.off(
|
|
33056
|
+
coreEvents.off("external-editor-closed" /* ExternalEditorClosed */, handleEditorClose);
|
|
33057
|
+
coreEvents.off("request-editor-selection" /* RequestEditorSelection */, openEditorDialog);
|
|
33076
33058
|
};
|
|
33077
33059
|
}, [handleEditorClose, openEditorDialog]);
|
|
33078
33060
|
(0, import_react127.useEffect)(() => {
|
|
@@ -33140,7 +33122,7 @@ var AppContainer = (props) => {
|
|
|
33140
33122
|
errorVerbosity: settings.merged.ui.errorVerbosity
|
|
33141
33123
|
});
|
|
33142
33124
|
const isAuthDialogOpen = authState === "updating" /* Updating */;
|
|
33143
|
-
const isAuthenticating = authState === "unauthenticated" /* Unauthenticated */ && settings.merged.security.auth.selectedType !==
|
|
33125
|
+
const isAuthenticating = authState === "unauthenticated" /* Unauthenticated */ && settings.merged.security.auth.selectedType !== "gemini-api-key" /* USE_GEMINI */;
|
|
33144
33126
|
const isGeminiClientInitialized = config.getGeminiClient()?.isInitialized();
|
|
33145
33127
|
const { loadHistoryForResume, isResuming } = useSessionResume({
|
|
33146
33128
|
config,
|
|
@@ -33168,7 +33150,7 @@ var AppContainer = (props) => {
|
|
|
33168
33150
|
async (authType, scope) => {
|
|
33169
33151
|
if (authType) {
|
|
33170
33152
|
const previousAuthType = config.getContentGeneratorConfig()?.authType ?? "unknown";
|
|
33171
|
-
if (authType ===
|
|
33153
|
+
if (authType === "oauth-personal" /* LOGIN_WITH_GOOGLE */) {
|
|
33172
33154
|
setAuthContext({ requiresRestart: true });
|
|
33173
33155
|
} else {
|
|
33174
33156
|
setAuthContext({});
|
|
@@ -33196,7 +33178,7 @@ var AppContainer = (props) => {
|
|
|
33196
33178
|
);
|
|
33197
33179
|
return;
|
|
33198
33180
|
}
|
|
33199
|
-
if (authType ===
|
|
33181
|
+
if (authType === "oauth-personal" /* LOGIN_WITH_GOOGLE */ && config.isBrowserLaunchSuppressed()) {
|
|
33200
33182
|
writeToStdout(`
|
|
33201
33183
|
----------------------------------------------------------------
|
|
33202
33184
|
Logging in with Google... Restarting Gemini CLI to continue.
|
|
@@ -33221,7 +33203,7 @@ Logging in with Google... Restarting Gemini CLI to continue.
|
|
|
33221
33203
|
}
|
|
33222
33204
|
await saveApiKey(apiKey);
|
|
33223
33205
|
await reloadApiKey();
|
|
33224
|
-
await config.refreshAuth(
|
|
33206
|
+
await config.refreshAuth("gemini-api-key" /* USE_GEMINI */);
|
|
33225
33207
|
setAuthState("authenticated" /* Authenticated */);
|
|
33226
33208
|
} catch (e) {
|
|
33227
33209
|
onAuthError(
|
|
@@ -33246,7 +33228,7 @@ Logging in with Google... Restarting Gemini CLI to continue.
|
|
|
33246
33228
|
`Authentication is enforced to be ${settings.merged.security.auth.enforcedType}, but you are currently using ${settings.merged.security.auth.selectedType}.`
|
|
33247
33229
|
);
|
|
33248
33230
|
} else if (settings.merged.security.auth.selectedType && !settings.merged.security.auth.useExternal) {
|
|
33249
|
-
if (settings.merged.security.auth.selectedType ===
|
|
33231
|
+
if (settings.merged.security.auth.selectedType === "gemini-api-key" /* USE_GEMINI */) {
|
|
33250
33232
|
return;
|
|
33251
33233
|
}
|
|
33252
33234
|
const error = validateAuthMethod(
|
|
@@ -33375,9 +33357,9 @@ Logging in with Google... Restarting Gemini CLI to continue.
|
|
|
33375
33357
|
}
|
|
33376
33358
|
});
|
|
33377
33359
|
};
|
|
33378
|
-
coreEvents.on(
|
|
33360
|
+
coreEvents.on("consent-request" /* ConsentRequest */, handleConsentRequest);
|
|
33379
33361
|
return () => {
|
|
33380
|
-
coreEvents.off(
|
|
33362
|
+
coreEvents.off("consent-request" /* ConsentRequest */, handleConsentRequest);
|
|
33381
33363
|
};
|
|
33382
33364
|
}, []);
|
|
33383
33365
|
const performMemoryRefresh = (0, import_react127.useCallback)(async () => {
|
|
@@ -34050,7 +34032,7 @@ ${queuedText}` : queuedText;
|
|
|
34050
34032
|
if (keyMatchers["app.showErrorDetails" /* SHOW_ERROR_DETAILS */](key)) {
|
|
34051
34033
|
if (settings.merged.general.devtools) {
|
|
34052
34034
|
void (async () => {
|
|
34053
|
-
const { toggleDevToolsPanel } = await import("./devtoolsService-
|
|
34035
|
+
const { toggleDevToolsPanel } = await import("./devtoolsService-BDOWEGHR.js");
|
|
34054
34036
|
await toggleDevToolsPanel(
|
|
34055
34037
|
config,
|
|
34056
34038
|
showErrorDetails,
|
|
@@ -34268,12 +34250,12 @@ ${queuedText}` : queuedText;
|
|
|
34268
34250
|
Date.now()
|
|
34269
34251
|
);
|
|
34270
34252
|
};
|
|
34271
|
-
coreEvents.on(
|
|
34272
|
-
coreEvents.on(
|
|
34253
|
+
coreEvents.on("user-feedback" /* UserFeedback */, handleUserFeedback);
|
|
34254
|
+
coreEvents.on("hook-system-message" /* HookSystemMessage */, handleHookSystemMessage);
|
|
34273
34255
|
coreEvents.drainBacklogs();
|
|
34274
34256
|
return () => {
|
|
34275
|
-
coreEvents.off(
|
|
34276
|
-
coreEvents.off(
|
|
34257
|
+
coreEvents.off("user-feedback" /* UserFeedback */, handleUserFeedback);
|
|
34258
|
+
coreEvents.off("hook-system-message" /* HookSystemMessage */, handleHookSystemMessage);
|
|
34277
34259
|
};
|
|
34278
34260
|
}, [historyManager]);
|
|
34279
34261
|
const nightly = props.version.includes("nightly");
|
|
@@ -34376,9 +34358,9 @@ ${queuedText}` : queuedText;
|
|
|
34376
34358
|
const handleMemoryChanged = (result) => {
|
|
34377
34359
|
setGeminiMdFileCount(result.fileCount);
|
|
34378
34360
|
};
|
|
34379
|
-
coreEvents.on(
|
|
34361
|
+
coreEvents.on("memory-changed" /* MemoryChanged */, handleMemoryChanged);
|
|
34380
34362
|
return () => {
|
|
34381
|
-
coreEvents.off(
|
|
34363
|
+
coreEvents.off("memory-changed" /* MemoryChanged */, handleMemoryChanged);
|
|
34382
34364
|
};
|
|
34383
34365
|
}, []);
|
|
34384
34366
|
(0, import_react127.useEffect)(() => {
|