@google/gemini-cli 0.42.0-preview.2 → 0.42.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-6QBZKEWW.js → chunk-3IS7GD6D.js} +2 -2
- package/bundle/{chunk-OFOKTVUH.js → chunk-4SLGT6YD.js} +1 -1
- package/bundle/{chunk-OP6THN3K.js → chunk-7C6GGDK6.js} +2 -2
- package/bundle/{chunk-77HSANAH.js → chunk-7VVHSNDQ.js} +4 -4
- package/bundle/{chunk-S3WIE72K.js → chunk-BCYBA52D.js} +1 -1
- package/bundle/{chunk-2KRAWFEQ.js → chunk-CHERUG6W.js} +7 -7
- package/bundle/{chunk-AAU5XCLJ.js → chunk-COKAF5GM.js} +1 -1
- package/bundle/{chunk-SJ6AOVZF.js → chunk-COQP2M4D.js} +54 -67
- package/bundle/{chunk-QM234EIA.js → chunk-CYEIWMZJ.js} +1 -1
- package/bundle/{chunk-WOGMVEEF.js → chunk-DMWX7UP6.js} +4 -4
- package/bundle/{chunk-E54WEGH3.js → chunk-DN4XSYRG.js} +12729 -6831
- package/bundle/{chunk-BLNG7CSO.js → chunk-EDKX67D6.js} +1 -1
- package/bundle/{chunk-LHVIO4J4.js → chunk-FCAODPNO.js} +7 -7
- package/bundle/{chunk-LYMYMKWM.js → chunk-G2VTSEZ6.js} +1 -1
- package/bundle/{chunk-M6ZQAQKH.js → chunk-GA527JB7.js} +1 -1
- package/bundle/{chunk-4NXNVHPO.js → chunk-I7AME6VC.js} +8 -9
- package/bundle/{chunk-Q24MYLMP.js → chunk-KVEAHIIV.js} +3 -3
- package/bundle/{chunk-DEKZKOVU.js → chunk-LATVEETM.js} +1 -1
- package/bundle/{chunk-JW36FWGZ.js → chunk-NTOPH4WG.js} +2 -2
- package/bundle/{chunk-THNM4JU6.js → chunk-PUDLNWHE.js} +2 -2
- package/bundle/{chunk-FIIOJPLW.js → chunk-QOZSZYL7.js} +2 -2
- package/bundle/{chunk-R7BHIYZD.js → chunk-WIXUKOZA.js} +1 -1
- package/bundle/{chunk-I6IY72IP.js → chunk-XUMRUXOT.js} +6 -9
- package/bundle/{chunk-ODIOD5TJ.js → chunk-ZNMQA242.js} +3 -3
- package/bundle/{cleanup-G7DNOS4V.js → cleanup-3RILFNVM.js} +2 -2
- package/bundle/{cleanup-GZM5KIZA.js → cleanup-SVRKYBR6.js} +3 -3
- package/bundle/{cleanup-5FPOUEHR.js → cleanup-XFVHHDVO.js} +2 -2
- package/bundle/{core-IYSSLWMM.js → core-B5S6HZJT.js} +1 -1
- package/bundle/{dist-GF2RNVWZ.js → core-FRVSDP2C.js} +2 -2
- package/bundle/{devtoolsService-UADEEKOH.js → devtoolsService-RUEO5PGP.js} +2 -2
- package/bundle/{devtoolsService-7ZN7CSSO.js → devtoolsService-TRDGMQLJ.js} +4 -5
- package/bundle/{devtoolsService-3XOQOECV.js → devtoolsService-VM2WTHBX.js} +2 -2
- package/bundle/{dist-D7FZVGG3.js → dist-6BN2CJPN.js} +1 -1
- package/bundle/{gemini-IRKIMLB4.js → gemini-GHUELHBF.js} +14 -14
- package/bundle/{gemini-IMX43TZ4.js → gemini-NQPVX5JC.js} +186 -200
- package/bundle/{gemini-MWN2MSYV.js → gemini-QSTQ2DBG.js} +14 -14
- package/bundle/gemini.js +7 -7
- package/bundle/{interactiveCli-752P4PTI.js → interactiveCli-453M2IVE.js} +8 -8
- package/bundle/{interactiveCli-37SKHAKX.js → interactiveCli-AG2YWL2O.js} +8 -8
- package/bundle/{interactiveCli-VX6GBWOV.js → interactiveCli-MZFG35NB.js} +276 -294
- package/bundle/{liteRtServerManager-OWPZ35U6.js → liteRtServerManager-BXQ6VVWP.js} +4 -4
- package/bundle/{liteRtServerManager-FPYU5KEK.js → liteRtServerManager-G4Q7OVBX.js} +4 -4
- package/bundle/{liteRtServerManager-CDLVKT7N.js → liteRtServerManager-S7WL25VD.js} +5 -5
- package/bundle/node_modules/@google/gemini-cli-devtools/package.json +1 -1
- package/bundle/{oauth2-provider-RQNNLGWV.js → oauth2-provider-5UF5WEE2.js} +1 -1
- package/bundle/{oauth2-provider-6W4IY3LC.js → oauth2-provider-H7G6RSFW.js} +1 -1
- package/bundle/{oauth2-provider-446FDCUW.js → oauth2-provider-VR4DL6AL.js} +73 -39
- package/bundle/{start-KUNHDGRA.js → start-2SKRN43X.js} +6 -6
- package/bundle/{start-TZXEJLTH.js → start-CQBSKFYB.js} +7 -7
- package/bundle/{start-6U3XBAVH.js → start-NIMXQJYB.js} +6 -6
- package/package.json +1 -1
- package/bundle/chunk-76KOJPMV.js +0 -391
- package/bundle/chunk-RO2XVFEU.js +0 -512
- package/bundle/chunk-WFKT4UTI.js +0 -118
- package/bundle/chunk-WLPWIJ3Y.js +0 -81544
- package/bundle/chunk-WRDVEMWE.js +0 -1571
- package/bundle/chunk-YDC4M26X.js +0 -156
- package/bundle/chunk-ZDP2ZWKG.js +0 -17230
- package/bundle/chunk-ZFOGBX2H.js +0 -356008
- package/bundle/cleanup-J6AUEKWI.js +0 -33
- package/bundle/devtoolsService-KTUMQHXG.js +0 -857
- package/bundle/dist-HBMVDPXB.js +0 -2096
- package/bundle/gemini-SYFUC6XO.js +0 -16256
- package/bundle/interactiveCli-SAMKYHUU.js +0 -34505
- package/bundle/liteRtServerManager-OWTQEYE6.js +0 -66
- package/bundle/oauth2-provider-TITPL3DN.js +0 -237
- package/bundle/start-TTLMBKNX.js +0 -19
|
@@ -155,13 +155,13 @@ import {
|
|
|
155
155
|
widestLineFromStyledChars,
|
|
156
156
|
wordBreakStyledChars,
|
|
157
157
|
wrapStyledChars
|
|
158
|
-
} from "./chunk-
|
|
158
|
+
} from "./chunk-CHERUG6W.js";
|
|
159
159
|
import {
|
|
160
160
|
appEvents
|
|
161
161
|
} from "./chunk-5PS3AYFU.js";
|
|
162
162
|
import {
|
|
163
163
|
require_source
|
|
164
|
-
} from "./chunk-
|
|
164
|
+
} from "./chunk-CYEIWMZJ.js";
|
|
165
165
|
import {
|
|
166
166
|
ACTIVE_SHELL_MAX_LINES,
|
|
167
167
|
COMPACT_TOOL_SUBVIEW_MAX_LINES,
|
|
@@ -211,32 +211,30 @@ import {
|
|
|
211
211
|
stringWidth,
|
|
212
212
|
stripUnsafeCharacters,
|
|
213
213
|
toCodePoints
|
|
214
|
-
} from "./chunk-
|
|
214
|
+
} from "./chunk-BCYBA52D.js";
|
|
215
215
|
import {
|
|
216
216
|
handleAutoUpdate,
|
|
217
217
|
isDevelopment,
|
|
218
218
|
relaunchApp,
|
|
219
219
|
setUpdateHandler
|
|
220
|
-
} from "./chunk-
|
|
220
|
+
} from "./chunk-ZNMQA242.js";
|
|
221
221
|
import {
|
|
222
222
|
isTodoList,
|
|
223
223
|
mapCoreStatusToDisplayStatus,
|
|
224
224
|
require_react
|
|
225
|
-
} from "./chunk-
|
|
225
|
+
} from "./chunk-I7AME6VC.js";
|
|
226
226
|
import {
|
|
227
227
|
registerCleanup,
|
|
228
228
|
removeCleanup,
|
|
229
229
|
runExitCleanup,
|
|
230
230
|
setupTtyCheck
|
|
231
|
-
} from "./chunk-
|
|
231
|
+
} from "./chunk-NTOPH4WG.js";
|
|
232
232
|
import {
|
|
233
233
|
ApiKeyUpdatedEvent,
|
|
234
234
|
AsyncFzf,
|
|
235
235
|
AudioRecorder,
|
|
236
236
|
AuthType,
|
|
237
|
-
CompressionStatus,
|
|
238
237
|
ConversationFinishedEvent,
|
|
239
|
-
CoreToolCallStatus,
|
|
240
238
|
CreditPurchaseClickEvent,
|
|
241
239
|
EDITOR_DISPLAY_NAMES,
|
|
242
240
|
EmptyWalletMenuShownEvent,
|
|
@@ -246,16 +244,11 @@ import {
|
|
|
246
244
|
FileSearchFactory,
|
|
247
245
|
FolderTrustDiscoveryService,
|
|
248
246
|
G1_UTM_CAMPAIGNS,
|
|
249
|
-
GeminiCliOperation,
|
|
250
|
-
GeminiEventType,
|
|
251
247
|
GitService,
|
|
252
248
|
IdeClient,
|
|
253
249
|
LegacyAgentProtocol,
|
|
254
250
|
LlmRole,
|
|
255
251
|
Logger,
|
|
256
|
-
MCPDiscoveryState,
|
|
257
|
-
MCPServerStatus,
|
|
258
|
-
MessageSenderType,
|
|
259
252
|
ModelNotFoundError,
|
|
260
253
|
ModelSlashCommandEvent,
|
|
261
254
|
OverageMenuShownEvent,
|
|
@@ -265,18 +258,14 @@ import {
|
|
|
265
258
|
RELEASE_CHANNEL_STABILITY,
|
|
266
259
|
ROOT_SCHEDULER_ID,
|
|
267
260
|
Scheduler,
|
|
268
|
-
SessionEndReason,
|
|
269
|
-
SessionStartSource,
|
|
270
261
|
ShellExecutionService,
|
|
271
262
|
SlashCommandStatus,
|
|
272
263
|
TerminalQuotaError,
|
|
273
264
|
TranscriptionFactory,
|
|
274
|
-
TrustLevel,
|
|
275
265
|
UserAccountManager,
|
|
276
266
|
UserPromptEvent,
|
|
277
267
|
UserTierId,
|
|
278
268
|
ValidationRequiredError,
|
|
279
|
-
WarningPriority,
|
|
280
269
|
WhisperModelManager,
|
|
281
270
|
addMCPStatusChangeListener,
|
|
282
271
|
allowEditorTypeInSandbox,
|
|
@@ -363,13 +352,11 @@ import {
|
|
|
363
352
|
validatePlanContent,
|
|
364
353
|
validatePlanPath,
|
|
365
354
|
writeToStdout
|
|
366
|
-
} from "./chunk-
|
|
355
|
+
} from "./chunk-DMWX7UP6.js";
|
|
367
356
|
import {
|
|
368
357
|
ACTIVATE_SKILL_TOOL_NAME,
|
|
369
358
|
AGENT_TOOL_NAME,
|
|
370
|
-
ApprovalMode,
|
|
371
359
|
ChangeAuthRequestedError,
|
|
372
|
-
CoreEvent,
|
|
373
360
|
DEFAULT_GEMINI_FLASH_LITE_MODEL,
|
|
374
361
|
DEFAULT_GEMINI_FLASH_MODEL,
|
|
375
362
|
DEFAULT_GEMINI_MODEL,
|
|
@@ -382,16 +369,13 @@ import {
|
|
|
382
369
|
GEMMA_4_31B_IT_MODEL,
|
|
383
370
|
GLOB_DISPLAY_NAME,
|
|
384
371
|
GREP_DISPLAY_NAME,
|
|
385
|
-
Kind,
|
|
386
372
|
LS_DISPLAY_NAME,
|
|
387
|
-
MessageBusType,
|
|
388
373
|
PREVIEW_GEMINI_3_1_CUSTOM_TOOLS_MODEL,
|
|
389
374
|
PREVIEW_GEMINI_3_1_FLASH_LITE_MODEL,
|
|
390
375
|
PREVIEW_GEMINI_3_1_MODEL,
|
|
391
376
|
PREVIEW_GEMINI_FLASH_MODEL,
|
|
392
377
|
PREVIEW_GEMINI_MODEL,
|
|
393
378
|
PREVIEW_GEMINI_MODEL_AUTO,
|
|
394
|
-
QuestionType,
|
|
395
379
|
READ_FILE_DISPLAY_NAME,
|
|
396
380
|
READ_MANY_FILES_DISPLAY_NAME,
|
|
397
381
|
SHELL_TOOL_NAME,
|
|
@@ -399,8 +383,6 @@ import {
|
|
|
399
383
|
TOPIC_PARAM_STRATEGIC_INTENT,
|
|
400
384
|
TOPIC_PARAM_SUMMARY,
|
|
401
385
|
TOPIC_PARAM_TITLE,
|
|
402
|
-
ToolConfirmationOutcome,
|
|
403
|
-
ToolErrorType,
|
|
404
386
|
UPDATE_TOPIC_DISPLAY_NAME,
|
|
405
387
|
UPDATE_TOPIC_TOOL_NAME,
|
|
406
388
|
UnauthorizedError,
|
|
@@ -430,7 +412,7 @@ import {
|
|
|
430
412
|
safeJsonToMarkdown,
|
|
431
413
|
shortenPath,
|
|
432
414
|
tildeifyPath
|
|
433
|
-
} from "./chunk-
|
|
415
|
+
} from "./chunk-ECNYAST2.js";
|
|
434
416
|
import "./chunk-664ZODQF.js";
|
|
435
417
|
import "./chunk-RJTRUG2J.js";
|
|
436
418
|
import "./chunk-IUUIT4SU.js";
|
|
@@ -5056,7 +5038,7 @@ function calculateShellMaxLines(options) {
|
|
|
5056
5038
|
if (isAlternateBuffer && isThisShellFocused2 && !constrainHeight) {
|
|
5057
5039
|
return maxLinesBasedOnHeight;
|
|
5058
5040
|
}
|
|
5059
|
-
const isExecuting = status ===
|
|
5041
|
+
const isExecuting = status === "executing" /* Executing */;
|
|
5060
5042
|
const shellMaxLinesLimit = isExecuting ? ACTIVE_SHELL_MAX_LINES - SHELL_CONTENT_OVERHEAD : COMPLETED_SHELL_MAX_LINES - SHELL_CONTENT_OVERHEAD;
|
|
5061
5043
|
return Math.min(maxLinesBasedOnHeight, shellMaxLinesLimit);
|
|
5062
5044
|
}
|
|
@@ -5089,10 +5071,10 @@ function isShellTool(name) {
|
|
|
5089
5071
|
return name === SHELL_COMMAND_NAME || name === SHELL_NAME || name === SHELL_TOOL_NAME;
|
|
5090
5072
|
}
|
|
5091
5073
|
function isThisShellFocusable(name, status, config) {
|
|
5092
|
-
return !!(isShellTool(name) && status ===
|
|
5074
|
+
return !!(isShellTool(name) && status === "executing" /* Executing */ && config?.getEnableInteractiveShell());
|
|
5093
5075
|
}
|
|
5094
5076
|
function isThisShellFocused(name, status, ptyId, activeShellPtyId, embeddedShellFocused) {
|
|
5095
|
-
return !!(isShellTool(name) && status ===
|
|
5077
|
+
return !!(isShellTool(name) && status === "executing" /* Executing */ && ptyId === activeShellPtyId && embeddedShellFocused);
|
|
5096
5078
|
}
|
|
5097
5079
|
function useFocusHint(isThisShellFocusable2, isThisShellFocused2, resultDisplay) {
|
|
5098
5080
|
const [userHasFocused, setUserHasFocused] = (0, import_react9.useState)(false);
|
|
@@ -5672,14 +5654,14 @@ var ToolActionsProvider = (props) => {
|
|
|
5672
5654
|
}
|
|
5673
5655
|
const details = tool.confirmationDetails;
|
|
5674
5656
|
if (details?.type === "edit" && isDiffingEnabled && "filePath" in details) {
|
|
5675
|
-
const cliOutcome = outcome ===
|
|
5657
|
+
const cliOutcome = outcome === "cancel" /* Cancel */ ? "rejected" : "accepted";
|
|
5676
5658
|
await ideClient?.resolveDiffFromCli(details.filePath, cliOutcome);
|
|
5677
5659
|
}
|
|
5678
5660
|
if (tool.correlationId) {
|
|
5679
5661
|
await config.getMessageBus().publish({
|
|
5680
|
-
type:
|
|
5662
|
+
type: "tool-confirmation-response" /* TOOL_CONFIRMATION_RESPONSE */,
|
|
5681
5663
|
correlationId: tool.correlationId,
|
|
5682
|
-
confirmed: outcome !==
|
|
5664
|
+
confirmed: outcome !== "cancel" /* Cancel */,
|
|
5683
5665
|
requiresUserConfirmation: false,
|
|
5684
5666
|
outcome,
|
|
5685
5667
|
payload
|
|
@@ -5698,7 +5680,7 @@ var ToolActionsProvider = (props) => {
|
|
|
5698
5680
|
);
|
|
5699
5681
|
const cancel = (0, import_react12.useCallback)(
|
|
5700
5682
|
async (callId) => {
|
|
5701
|
-
await confirm(callId,
|
|
5683
|
+
await confirm(callId, "cancel" /* Cancel */);
|
|
5702
5684
|
},
|
|
5703
5685
|
[confirm]
|
|
5704
5686
|
);
|
|
@@ -5817,7 +5799,7 @@ var ToolMessage = ({
|
|
|
5817
5799
|
paddingX: 1,
|
|
5818
5800
|
flexDirection: "column",
|
|
5819
5801
|
children: [
|
|
5820
|
-
status ===
|
|
5802
|
+
status === "executing" /* Executing */ && progress !== void 0 && /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(
|
|
5821
5803
|
McpProgressIndicator,
|
|
5822
5804
|
{
|
|
5823
5805
|
progress,
|
|
@@ -5834,8 +5816,8 @@ var ToolMessage = ({
|
|
|
5834
5816
|
terminalWidth,
|
|
5835
5817
|
renderOutputAsMarkdown,
|
|
5836
5818
|
hasFocus: isThisShellFocused2,
|
|
5837
|
-
maxLines: kind ===
|
|
5838
|
-
overflowDirection: kind ===
|
|
5819
|
+
maxLines: kind === "agent" /* Agent */ && availableTerminalHeight !== void 0 ? SUBAGENT_MAX_LINES : void 0,
|
|
5820
|
+
overflowDirection: kind === "agent" /* Agent */ ? "bottom" : "top"
|
|
5839
5821
|
}
|
|
5840
5822
|
),
|
|
5841
5823
|
isThisShellFocused2 && config && /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(Box_default, { paddingLeft: STATUS_INDICATOR_WIDTH, marginTop: 1, children: /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(
|
|
@@ -6151,7 +6133,7 @@ function getInitialTrustState(settings, cwd5, isCurrentWorkspace) {
|
|
|
6151
6133
|
settings.merged,
|
|
6152
6134
|
process3.cwd()
|
|
6153
6135
|
);
|
|
6154
|
-
const isInheritedTrust = isTrusted && (!explicitTrustLevel || explicitTrustLevel ===
|
|
6136
|
+
const isInheritedTrust = isTrusted && (!explicitTrustLevel || explicitTrustLevel === "DO_NOT_TRUST" /* DO_NOT_TRUST */);
|
|
6155
6137
|
return {
|
|
6156
6138
|
currentTrustLevel: explicitTrustLevel,
|
|
6157
6139
|
isInheritedTrustFromParent: !!(source === "file" && isInheritedTrust),
|
|
@@ -6196,7 +6178,7 @@ var usePermissionsModifyTrust = (onExit, addItem, targetDirectory) => {
|
|
|
6196
6178
|
process3.cwd(),
|
|
6197
6179
|
newConfig
|
|
6198
6180
|
);
|
|
6199
|
-
if (trustLevel ===
|
|
6181
|
+
if (trustLevel === "DO_NOT_TRUST" /* DO_NOT_TRUST */ && isTrusted) {
|
|
6200
6182
|
let message = "Note: This folder is still trusted because the connected IDE workspace is trusted.";
|
|
6201
6183
|
if (source === "file") {
|
|
6202
6184
|
message = "Note: This folder is still trusted because a parent folder is trusted.";
|
|
@@ -6270,18 +6252,18 @@ function PermissionsModifyTrustDialog({
|
|
|
6270
6252
|
const TRUST_LEVEL_ITEMS = [
|
|
6271
6253
|
{
|
|
6272
6254
|
label: `Trust this folder (${dirName})`,
|
|
6273
|
-
value:
|
|
6274
|
-
key:
|
|
6255
|
+
value: "TRUST_FOLDER" /* TRUST_FOLDER */,
|
|
6256
|
+
key: "TRUST_FOLDER" /* TRUST_FOLDER */
|
|
6275
6257
|
},
|
|
6276
6258
|
{
|
|
6277
6259
|
label: `Trust parent folder (${parentFolder})`,
|
|
6278
|
-
value:
|
|
6279
|
-
key:
|
|
6260
|
+
value: "TRUST_PARENT" /* TRUST_PARENT */,
|
|
6261
|
+
key: "TRUST_PARENT" /* TRUST_PARENT */
|
|
6280
6262
|
},
|
|
6281
6263
|
{
|
|
6282
6264
|
label: "Don't trust",
|
|
6283
|
-
value:
|
|
6284
|
-
key:
|
|
6265
|
+
value: "DO_NOT_TRUST" /* DO_NOT_TRUST */,
|
|
6266
|
+
key: "DO_NOT_TRUST" /* DO_NOT_TRUST */
|
|
6285
6267
|
}
|
|
6286
6268
|
];
|
|
6287
6269
|
const {
|
|
@@ -6521,7 +6503,7 @@ var ShellToolMessage = ({
|
|
|
6521
6503
|
maxLinesLimit: maxLines
|
|
6522
6504
|
});
|
|
6523
6505
|
import_react17.default.useEffect(() => {
|
|
6524
|
-
const isExecuting = status ===
|
|
6506
|
+
const isExecuting = status === "executing" /* Executing */;
|
|
6525
6507
|
if (isExecuting && ptyId) {
|
|
6526
6508
|
try {
|
|
6527
6509
|
const childWidth = terminalWidth - 4;
|
|
@@ -6913,22 +6895,22 @@ var hasPayload = (res) => {
|
|
|
6913
6895
|
function getFileOpData(diff, status, resultDisplay, terminalWidth, availableTerminalHeight, isClickable) {
|
|
6914
6896
|
const added = (diff.diffStat?.model_added_lines ?? 0) + (diff.diffStat?.user_added_lines ?? 0);
|
|
6915
6897
|
const removed = (diff.diffStat?.model_removed_lines ?? 0) + (diff.diffStat?.user_removed_lines ?? 0);
|
|
6916
|
-
const isAcceptedOrConfirming = status ===
|
|
6898
|
+
const isAcceptedOrConfirming = status === "success" /* Success */ || status === "executing" /* Executing */ || status === "awaiting_approval" /* AwaitingApproval */;
|
|
6917
6899
|
const addColor = isAcceptedOrConfirming ? theme.status.success : theme.text.secondary;
|
|
6918
6900
|
const removeColor = isAcceptedOrConfirming ? theme.status.error : theme.text.secondary;
|
|
6919
6901
|
const showDiffStat = !!diff.diffStat;
|
|
6920
6902
|
const description = /* @__PURE__ */ (0, import_jsx_runtime26.jsx)(Box_default, { flexDirection: "row", children: /* @__PURE__ */ (0, import_jsx_runtime26.jsx)(Text, { color: theme.text.secondary, wrap: "truncate-end", children: diff.fileName }) });
|
|
6921
6903
|
let resultSummary = "";
|
|
6922
6904
|
let resultColor = theme.text.secondary;
|
|
6923
|
-
if (status ===
|
|
6905
|
+
if (status === "awaiting_approval" /* AwaitingApproval */) {
|
|
6924
6906
|
resultSummary = "Confirming";
|
|
6925
|
-
} else if (status ===
|
|
6907
|
+
} else if (status === "success" /* Success */ || status === "executing" /* Executing */) {
|
|
6926
6908
|
resultSummary = "Accepted";
|
|
6927
6909
|
resultColor = theme.text.accent;
|
|
6928
|
-
} else if (status ===
|
|
6910
|
+
} else if (status === "cancelled" /* Cancelled */) {
|
|
6929
6911
|
resultSummary = "Rejected";
|
|
6930
6912
|
resultColor = theme.status.error;
|
|
6931
|
-
} else if (status ===
|
|
6913
|
+
} else if (status === "error" /* Error */) {
|
|
6932
6914
|
resultSummary = typeof resultDisplay === "string" ? resultDisplay : "Failed";
|
|
6933
6915
|
resultColor = theme.status.error;
|
|
6934
6916
|
}
|
|
@@ -6959,7 +6941,7 @@ function getFileOpData(diff, status, resultDisplay, terminalWidth, availableTerm
|
|
|
6959
6941
|
filename: diff.fileName,
|
|
6960
6942
|
terminalWidth: terminalWidth - PAYLOAD_MARGIN_LEFT,
|
|
6961
6943
|
availableTerminalHeight,
|
|
6962
|
-
disableColor: status ===
|
|
6944
|
+
disableColor: status === "cancelled" /* Cancelled */
|
|
6963
6945
|
}
|
|
6964
6946
|
);
|
|
6965
6947
|
return { description, summary, payload };
|
|
@@ -7087,10 +7069,10 @@ var DenseToolMessage = (props) => {
|
|
|
7087
7069
|
if (isGrepResult(resultDisplay)) {
|
|
7088
7070
|
return getGenericSuccessData(resultDisplay, originalDescription);
|
|
7089
7071
|
}
|
|
7090
|
-
if (status ===
|
|
7072
|
+
if (status === "success" /* Success */ && resultDisplay) {
|
|
7091
7073
|
return getGenericSuccessData(resultDisplay, originalDescription);
|
|
7092
7074
|
}
|
|
7093
|
-
if (status ===
|
|
7075
|
+
if (status === "error" /* Error */) {
|
|
7094
7076
|
const text = typeof resultDisplay === "string" ? resultDisplay.replace(/\n/g, " ") : "Failed";
|
|
7095
7077
|
const errorSummary = /* @__PURE__ */ (0, import_jsx_runtime26.jsxs)(Text, { color: theme.status.error, wrap: "truncate-end", children: [
|
|
7096
7078
|
"\u2192 ",
|
|
@@ -7131,7 +7113,7 @@ var DenseToolMessage = (props) => {
|
|
|
7131
7113
|
language: fileExtension,
|
|
7132
7114
|
maxWidth: terminalWidth - PAYLOAD_MARGIN_LEFT,
|
|
7133
7115
|
settings,
|
|
7134
|
-
disableColor: status ===
|
|
7116
|
+
disableColor: status === "cancelled" /* Cancelled */,
|
|
7135
7117
|
returnLines: true
|
|
7136
7118
|
});
|
|
7137
7119
|
} else {
|
|
@@ -7139,7 +7121,7 @@ var DenseToolMessage = (props) => {
|
|
|
7139
7121
|
parsedLines,
|
|
7140
7122
|
filename: diff.fileName,
|
|
7141
7123
|
terminalWidth: terminalWidth - PAYLOAD_MARGIN_LEFT,
|
|
7142
|
-
disableColor: status ===
|
|
7124
|
+
disableColor: status === "cancelled" /* Cancelled */
|
|
7143
7125
|
});
|
|
7144
7126
|
}
|
|
7145
7127
|
}, [diff, isExpanded, isAlternateBuffer, terminalWidth, settings, status]);
|
|
@@ -7269,7 +7251,7 @@ function isToolExecuting(pendingHistoryItems) {
|
|
|
7269
7251
|
return pendingHistoryItems.some((item) => {
|
|
7270
7252
|
if (item && item.type === "tool_group") {
|
|
7271
7253
|
return item.tools.some(
|
|
7272
|
-
(tool) =>
|
|
7254
|
+
(tool) => "executing" /* Executing */ === tool.status
|
|
7273
7255
|
);
|
|
7274
7256
|
}
|
|
7275
7257
|
return false;
|
|
@@ -7278,7 +7260,7 @@ function isToolExecuting(pendingHistoryItems) {
|
|
|
7278
7260
|
function isToolAwaitingConfirmation(pendingHistoryItems) {
|
|
7279
7261
|
return pendingHistoryItems.filter((item) => item.type === "tool_group").some(
|
|
7280
7262
|
(item) => item.tools.some(
|
|
7281
|
-
(tool) =>
|
|
7263
|
+
(tool) => "awaiting_approval" /* AwaitingApproval */ === tool.status
|
|
7282
7264
|
)
|
|
7283
7265
|
);
|
|
7284
7266
|
}
|
|
@@ -7301,14 +7283,14 @@ function getToolGroupBorderAppearance(item, activeShellPtyId, embeddedShellFocus
|
|
|
7301
7283
|
if (isTrackedToolCall(t)) {
|
|
7302
7284
|
return t.status !== "success" && t.status !== "error" && t.status !== "cancelled";
|
|
7303
7285
|
} else {
|
|
7304
|
-
return t.status !==
|
|
7286
|
+
return t.status !== "success" /* Success */ && t.status !== "error" /* Error */ && t.status !== "cancelled" /* Cancelled */;
|
|
7305
7287
|
}
|
|
7306
7288
|
});
|
|
7307
7289
|
const isEmbeddedShellFocused = toolsToInspect.some((t) => {
|
|
7308
7290
|
if (isTrackedToolCall(t)) {
|
|
7309
7291
|
return isShellTool(t.request.name) && t.status === "executing" && t.pid === activeShellPtyId && !!embeddedShellFocused;
|
|
7310
7292
|
} else {
|
|
7311
|
-
return isShellTool(t.name) && t.status ===
|
|
7293
|
+
return isShellTool(t.name) && t.status === "executing" /* Executing */ && t.ptyId === activeShellPtyId && !!embeddedShellFocused;
|
|
7312
7294
|
}
|
|
7313
7295
|
});
|
|
7314
7296
|
const isShellCommand = toolsToInspect.some((t) => {
|
|
@@ -7407,7 +7389,7 @@ var ToolGroupMessage = ({
|
|
|
7407
7389
|
const groupedTools = (0, import_react21.useMemo)(() => {
|
|
7408
7390
|
const groups = [];
|
|
7409
7391
|
for (const tool of visibleToolCalls) {
|
|
7410
|
-
if (tool.kind ===
|
|
7392
|
+
if (tool.kind === "agent" /* Agent */) {
|
|
7411
7393
|
const lastGroup = groups[groups.length - 1];
|
|
7412
7394
|
if (Array.isArray(lastGroup)) {
|
|
7413
7395
|
lastGroup.push(tool);
|
|
@@ -7462,7 +7444,7 @@ var ToolGroupMessage = ({
|
|
|
7462
7444
|
}, [groupedTools, isCompactModeEnabled, borderTopOverride]);
|
|
7463
7445
|
let countToolCallsWithResults = 0;
|
|
7464
7446
|
for (const tool of visibleToolCalls) {
|
|
7465
|
-
if (tool.kind !==
|
|
7447
|
+
if (tool.kind !== "agent" /* Agent */) {
|
|
7466
7448
|
if (isCompactTool(tool, isCompactModeEnabled)) {
|
|
7467
7449
|
if (hasDensePayload(tool)) {
|
|
7468
7450
|
countToolCallsWithResults++;
|
|
@@ -7659,18 +7641,18 @@ function CompressionMessage({
|
|
|
7659
7641
|
return "Compressing chat history";
|
|
7660
7642
|
}
|
|
7661
7643
|
switch (compressionStatus) {
|
|
7662
|
-
case
|
|
7644
|
+
case 1 /* COMPRESSED */:
|
|
7663
7645
|
return `Chat history compressed from ${originalTokens} to ${newTokens} tokens.`;
|
|
7664
|
-
case
|
|
7646
|
+
case 2 /* COMPRESSION_FAILED_INFLATED_TOKEN_COUNT */:
|
|
7665
7647
|
if (originalTokens < 5e4) {
|
|
7666
7648
|
return "Compression was not beneficial for this history size.";
|
|
7667
7649
|
}
|
|
7668
7650
|
return "Chat history compression did not reduce size. This may indicate issues with the compression prompt.";
|
|
7669
|
-
case
|
|
7651
|
+
case 3 /* COMPRESSION_FAILED_TOKEN_COUNT_ERROR */:
|
|
7670
7652
|
return "Could not compress chat history due to a token counting error.";
|
|
7671
|
-
case
|
|
7653
|
+
case 4 /* COMPRESSION_FAILED_EMPTY_SUMMARY */:
|
|
7672
7654
|
return "Chat history compression failed: the model returned an empty summary.";
|
|
7673
|
-
case
|
|
7655
|
+
case 5 /* NOOP */:
|
|
7674
7656
|
return "Nothing to compress.";
|
|
7675
7657
|
default:
|
|
7676
7658
|
return "";
|
|
@@ -8084,8 +8066,8 @@ var ModelUsageTable = ({ models }) => {
|
|
|
8084
8066
|
);
|
|
8085
8067
|
roleEntries.sort(([a], [b]) => {
|
|
8086
8068
|
if (a === b) return 0;
|
|
8087
|
-
if (a ===
|
|
8088
|
-
if (b ===
|
|
8069
|
+
if (a === "main" /* MAIN */) return -1;
|
|
8070
|
+
if (b === "main" /* MAIN */) return 1;
|
|
8089
8071
|
return a.localeCompare(b);
|
|
8090
8072
|
});
|
|
8091
8073
|
roleEntries.forEach(([role, roleMetrics]) => {
|
|
@@ -8416,8 +8398,8 @@ var ModelStatsDisplay = ({
|
|
|
8416
8398
|
return validRoles.includes(role);
|
|
8417
8399
|
}).sort((a, b) => {
|
|
8418
8400
|
if (a === b) return 0;
|
|
8419
|
-
if (a ===
|
|
8420
|
-
if (b ===
|
|
8401
|
+
if (a === "main" /* MAIN */) return -1;
|
|
8402
|
+
if (b === "main" /* MAIN */) return 1;
|
|
8421
8403
|
return a.localeCompare(b);
|
|
8422
8404
|
});
|
|
8423
8405
|
const createRow = (metric, getValue, options = {}) => {
|
|
@@ -9207,7 +9189,7 @@ var McpStatus = ({
|
|
|
9207
9189
|
);
|
|
9208
9190
|
const originalStatus = serverStatus(serverName);
|
|
9209
9191
|
const hasCachedItems = serverTools.length > 0 || serverPrompts.length > 0 || serverResources.length > 0;
|
|
9210
|
-
const status = originalStatus ===
|
|
9192
|
+
const status = originalStatus === "disconnected" /* DISCONNECTED */ && hasCachedItems ? "connected" /* CONNECTED */ : originalStatus;
|
|
9211
9193
|
let statusIndicator = "";
|
|
9212
9194
|
let statusText = "";
|
|
9213
9195
|
let statusColor = theme.text.primary;
|
|
@@ -9219,17 +9201,17 @@ var McpStatus = ({
|
|
|
9219
9201
|
statusColor = theme.text.secondary;
|
|
9220
9202
|
} else {
|
|
9221
9203
|
switch (status) {
|
|
9222
|
-
case
|
|
9204
|
+
case "connected" /* CONNECTED */:
|
|
9223
9205
|
statusIndicator = "\u{1F7E2}";
|
|
9224
9206
|
statusText = "Ready";
|
|
9225
9207
|
statusColor = theme.status.success;
|
|
9226
9208
|
break;
|
|
9227
|
-
case
|
|
9209
|
+
case "connecting" /* CONNECTING */:
|
|
9228
9210
|
statusIndicator = "\u{1F504}";
|
|
9229
9211
|
statusText = "Starting... (first startup may take longer)";
|
|
9230
9212
|
statusColor = theme.status.warning;
|
|
9231
9213
|
break;
|
|
9232
|
-
case
|
|
9214
|
+
case "disconnected" /* DISCONNECTED */:
|
|
9233
9215
|
default:
|
|
9234
9216
|
statusIndicator = "\u{1F534}";
|
|
9235
9217
|
statusText = "Disconnected";
|
|
@@ -9277,12 +9259,12 @@ var McpStatus = ({
|
|
|
9277
9259
|
/* @__PURE__ */ (0, import_jsx_runtime46.jsxs)(Text, { children: [
|
|
9278
9260
|
" - ",
|
|
9279
9261
|
statusText,
|
|
9280
|
-
status ===
|
|
9262
|
+
status === "connected" /* CONNECTED */ && parts.length > 0 && ` (${parts.join(", ")})`
|
|
9281
9263
|
] }),
|
|
9282
9264
|
authStatusNode
|
|
9283
9265
|
] }),
|
|
9284
|
-
status ===
|
|
9285
|
-
status ===
|
|
9266
|
+
status === "connecting" /* CONNECTING */ && /* @__PURE__ */ (0, import_jsx_runtime46.jsx)(Text, { children: " (tools and prompts will appear when ready)" }),
|
|
9267
|
+
status === "disconnected" /* DISCONNECTED */ && toolCount > 0 && /* @__PURE__ */ (0, import_jsx_runtime46.jsxs)(Text, { children: [
|
|
9286
9268
|
" (",
|
|
9287
9269
|
toolCount,
|
|
9288
9270
|
" tools cached)"
|
|
@@ -9835,7 +9817,7 @@ var Notifications = () => {
|
|
|
9835
9817
|
if (dismissed) return [];
|
|
9836
9818
|
const counts = persistentState.get("startupWarningCounts") || {};
|
|
9837
9819
|
return startupWarnings.filter((w) => {
|
|
9838
|
-
if (w.priority ===
|
|
9820
|
+
if (w.priority === "low" /* Low */) {
|
|
9839
9821
|
const count = counts[w.id] || 0;
|
|
9840
9822
|
return count < MAX_STARTUP_WARNING_SHOW_COUNT;
|
|
9841
9823
|
}
|
|
@@ -9848,7 +9830,7 @@ var Notifications = () => {
|
|
|
9848
9830
|
const counts = { ...persistentState.get("startupWarningCounts") || {} };
|
|
9849
9831
|
let changed = false;
|
|
9850
9832
|
visibleWarnings.forEach((w) => {
|
|
9851
|
-
if (w.priority ===
|
|
9833
|
+
if (w.priority === "low" /* Low */) {
|
|
9852
9834
|
counts[w.id] = (counts[w.id] || 0) + 1;
|
|
9853
9835
|
changed = true;
|
|
9854
9836
|
}
|
|
@@ -9955,7 +9937,7 @@ var UserIdentity = ({ config }) => {
|
|
|
9955
9937
|
}
|
|
9956
9938
|
return /* @__PURE__ */ (0, import_jsx_runtime56.jsxs)(Box_default, { flexDirection: "column", children: [
|
|
9957
9939
|
/* @__PURE__ */ (0, import_jsx_runtime56.jsxs)(Box_default, { children: [
|
|
9958
|
-
/* @__PURE__ */ (0, import_jsx_runtime56.jsx)(Text, { color: theme.text.primary, wrap: "truncate-end", children: authType ===
|
|
9940
|
+
/* @__PURE__ */ (0, import_jsx_runtime56.jsx)(Text, { color: theme.text.primary, wrap: "truncate-end", children: authType === "oauth-personal" /* LOGIN_WITH_GOOGLE */ ? /* @__PURE__ */ (0, import_jsx_runtime56.jsxs)(Text, { children: [
|
|
9959
9941
|
/* @__PURE__ */ (0, import_jsx_runtime56.jsxs)(Text, { bold: true, children: [
|
|
9960
9942
|
"Signed in with Google",
|
|
9961
9943
|
email ? ":" : ""
|
|
@@ -10189,7 +10171,7 @@ var import_react32 = __toESM(require_react(), 1);
|
|
|
10189
10171
|
function getConfirmingToolState(pendingHistoryItems) {
|
|
10190
10172
|
const allPendingTools = getAllToolCalls(pendingHistoryItems);
|
|
10191
10173
|
const confirmingTools = allPendingTools.filter(
|
|
10192
|
-
(tool) => tool.status ===
|
|
10174
|
+
(tool) => tool.status === "awaiting_approval" /* AwaitingApproval */
|
|
10193
10175
|
);
|
|
10194
10176
|
if (confirmingTools.length === 0) {
|
|
10195
10177
|
return null;
|
|
@@ -11499,7 +11481,7 @@ var ExitPlanModeDialog = ({
|
|
|
11499
11481
|
{
|
|
11500
11482
|
questions: [
|
|
11501
11483
|
{
|
|
11502
|
-
type:
|
|
11484
|
+
type: "choice" /* CHOICE */,
|
|
11503
11485
|
header: "Approval",
|
|
11504
11486
|
question: planContent,
|
|
11505
11487
|
options: [
|
|
@@ -11520,9 +11502,9 @@ var ExitPlanModeDialog = ({
|
|
|
11520
11502
|
onSubmit: (answers) => {
|
|
11521
11503
|
const answer = answers["0"];
|
|
11522
11504
|
if (answer === "Yes, automatically accept edits" /* Auto */) {
|
|
11523
|
-
onApprove(
|
|
11505
|
+
onApprove("autoEdit" /* AUTO_EDIT */);
|
|
11524
11506
|
} else if (answer === "Yes, manually accept edits" /* Manual */) {
|
|
11525
|
-
onApprove(
|
|
11507
|
+
onApprove("default" /* DEFAULT */);
|
|
11526
11508
|
} else if (answer) {
|
|
11527
11509
|
onFeedback(answer);
|
|
11528
11510
|
}
|
|
@@ -11733,7 +11715,7 @@ ${deceptiveUrlWarnings.map(
|
|
|
11733
11715
|
);
|
|
11734
11716
|
(0, import_react37.useEffect)(() => {
|
|
11735
11717
|
if (isCancelling) {
|
|
11736
|
-
handleConfirm(
|
|
11718
|
+
handleConfirm("cancel" /* Cancel */);
|
|
11737
11719
|
}
|
|
11738
11720
|
}, [isCancelling, handleConfirm]);
|
|
11739
11721
|
const handleSelect = (0, import_react37.useCallback)(
|
|
@@ -11746,19 +11728,19 @@ ${deceptiveUrlWarnings.map(
|
|
|
11746
11728
|
if (!confirmationDetails.isModifying) {
|
|
11747
11729
|
options2.push({
|
|
11748
11730
|
label: "Allow once",
|
|
11749
|
-
value:
|
|
11731
|
+
value: "proceed_once" /* ProceedOnce */,
|
|
11750
11732
|
key: "Allow once"
|
|
11751
11733
|
});
|
|
11752
11734
|
if (isTrustedFolder) {
|
|
11753
11735
|
options2.push({
|
|
11754
11736
|
label: "Allow for this session",
|
|
11755
|
-
value:
|
|
11737
|
+
value: "proceed_always" /* ProceedAlways */,
|
|
11756
11738
|
key: "Allow for this session"
|
|
11757
11739
|
});
|
|
11758
11740
|
if (allowPermanentApproval) {
|
|
11759
11741
|
options2.push({
|
|
11760
11742
|
label: "Allow for this file in all future sessions",
|
|
11761
|
-
value:
|
|
11743
|
+
value: "proceed_always_and_save" /* ProceedAlwaysAndSave */,
|
|
11762
11744
|
key: "Allow for this file in all future sessions"
|
|
11763
11745
|
});
|
|
11764
11746
|
}
|
|
@@ -11766,119 +11748,119 @@ ${deceptiveUrlWarnings.map(
|
|
|
11766
11748
|
if (!config.getIdeMode() || !isDiffingEnabled) {
|
|
11767
11749
|
options2.push({
|
|
11768
11750
|
label: "Modify with external editor",
|
|
11769
|
-
value:
|
|
11751
|
+
value: "modify_with_editor" /* ModifyWithEditor */,
|
|
11770
11752
|
key: "Modify with external editor"
|
|
11771
11753
|
});
|
|
11772
11754
|
}
|
|
11773
11755
|
options2.push({
|
|
11774
11756
|
label: "No, suggest changes (esc)",
|
|
11775
|
-
value:
|
|
11757
|
+
value: "cancel" /* Cancel */,
|
|
11776
11758
|
key: "No, suggest changes (esc)"
|
|
11777
11759
|
});
|
|
11778
11760
|
}
|
|
11779
11761
|
} else if (confirmationDetails.type === "sandbox_expansion") {
|
|
11780
11762
|
options2.push({
|
|
11781
11763
|
label: "Allow once",
|
|
11782
|
-
value:
|
|
11764
|
+
value: "proceed_once" /* ProceedOnce */,
|
|
11783
11765
|
key: "Allow once"
|
|
11784
11766
|
});
|
|
11785
11767
|
if (isTrustedFolder) {
|
|
11786
11768
|
options2.push({
|
|
11787
11769
|
label: "Allow for this session",
|
|
11788
|
-
value:
|
|
11770
|
+
value: "proceed_always" /* ProceedAlways */,
|
|
11789
11771
|
key: "Allow for this session"
|
|
11790
11772
|
});
|
|
11791
11773
|
if (allowPermanentApproval) {
|
|
11792
11774
|
options2.push({
|
|
11793
11775
|
label: "Allow for all future sessions",
|
|
11794
|
-
value:
|
|
11776
|
+
value: "proceed_always_and_save" /* ProceedAlwaysAndSave */,
|
|
11795
11777
|
key: "Allow for all future sessions"
|
|
11796
11778
|
});
|
|
11797
11779
|
}
|
|
11798
11780
|
}
|
|
11799
11781
|
options2.push({
|
|
11800
11782
|
label: "No, suggest changes (esc)",
|
|
11801
|
-
value:
|
|
11783
|
+
value: "cancel" /* Cancel */,
|
|
11802
11784
|
key: "No, suggest changes (esc)"
|
|
11803
11785
|
});
|
|
11804
11786
|
} else if (confirmationDetails.type === "exec") {
|
|
11805
11787
|
options2.push({
|
|
11806
11788
|
label: "Allow once",
|
|
11807
|
-
value:
|
|
11789
|
+
value: "proceed_once" /* ProceedOnce */,
|
|
11808
11790
|
key: "Allow once"
|
|
11809
11791
|
});
|
|
11810
11792
|
if (isTrustedFolder) {
|
|
11811
11793
|
options2.push({
|
|
11812
11794
|
label: `Allow for this session`,
|
|
11813
|
-
value:
|
|
11795
|
+
value: "proceed_always" /* ProceedAlways */,
|
|
11814
11796
|
key: `Allow for this session`
|
|
11815
11797
|
});
|
|
11816
11798
|
if (allowPermanentApproval) {
|
|
11817
11799
|
options2.push({
|
|
11818
11800
|
label: `Allow this command for all future sessions`,
|
|
11819
|
-
value:
|
|
11801
|
+
value: "proceed_always_and_save" /* ProceedAlwaysAndSave */,
|
|
11820
11802
|
key: `Allow for all future sessions`
|
|
11821
11803
|
});
|
|
11822
11804
|
}
|
|
11823
11805
|
}
|
|
11824
11806
|
options2.push({
|
|
11825
11807
|
label: "No, suggest changes (esc)",
|
|
11826
|
-
value:
|
|
11808
|
+
value: "cancel" /* Cancel */,
|
|
11827
11809
|
key: "No, suggest changes (esc)"
|
|
11828
11810
|
});
|
|
11829
11811
|
} else if (confirmationDetails.type === "info") {
|
|
11830
11812
|
options2.push({
|
|
11831
11813
|
label: "Allow once",
|
|
11832
|
-
value:
|
|
11814
|
+
value: "proceed_once" /* ProceedOnce */,
|
|
11833
11815
|
key: "Allow once"
|
|
11834
11816
|
});
|
|
11835
11817
|
if (isTrustedFolder) {
|
|
11836
11818
|
options2.push({
|
|
11837
11819
|
label: "Allow for this session",
|
|
11838
|
-
value:
|
|
11820
|
+
value: "proceed_always" /* ProceedAlways */,
|
|
11839
11821
|
key: "Allow for this session"
|
|
11840
11822
|
});
|
|
11841
11823
|
if (allowPermanentApproval) {
|
|
11842
11824
|
options2.push({
|
|
11843
11825
|
label: "Allow for all future sessions",
|
|
11844
|
-
value:
|
|
11826
|
+
value: "proceed_always_and_save" /* ProceedAlwaysAndSave */,
|
|
11845
11827
|
key: "Allow for all future sessions"
|
|
11846
11828
|
});
|
|
11847
11829
|
}
|
|
11848
11830
|
}
|
|
11849
11831
|
options2.push({
|
|
11850
11832
|
label: "No, suggest changes (esc)",
|
|
11851
|
-
value:
|
|
11833
|
+
value: "cancel" /* Cancel */,
|
|
11852
11834
|
key: "No, suggest changes (esc)"
|
|
11853
11835
|
});
|
|
11854
11836
|
} else if (confirmationDetails.type === "mcp") {
|
|
11855
11837
|
options2.push({
|
|
11856
11838
|
label: "Allow once",
|
|
11857
|
-
value:
|
|
11839
|
+
value: "proceed_once" /* ProceedOnce */,
|
|
11858
11840
|
key: "Allow once"
|
|
11859
11841
|
});
|
|
11860
11842
|
if (isTrustedFolder) {
|
|
11861
11843
|
options2.push({
|
|
11862
11844
|
label: "Allow tool for this session",
|
|
11863
|
-
value:
|
|
11845
|
+
value: "proceed_always_tool" /* ProceedAlwaysTool */,
|
|
11864
11846
|
key: "Allow tool for this session"
|
|
11865
11847
|
});
|
|
11866
11848
|
options2.push({
|
|
11867
11849
|
label: "Allow all server tools for this session",
|
|
11868
|
-
value:
|
|
11850
|
+
value: "proceed_always_server" /* ProceedAlwaysServer */,
|
|
11869
11851
|
key: "Allow all server tools for this session"
|
|
11870
11852
|
});
|
|
11871
11853
|
if (allowPermanentApproval) {
|
|
11872
11854
|
options2.push({
|
|
11873
11855
|
label: "Allow tool for all future sessions",
|
|
11874
|
-
value:
|
|
11856
|
+
value: "proceed_always_and_save" /* ProceedAlwaysAndSave */,
|
|
11875
11857
|
key: "Allow tool for all future sessions"
|
|
11876
11858
|
});
|
|
11877
11859
|
}
|
|
11878
11860
|
}
|
|
11879
11861
|
options2.push({
|
|
11880
11862
|
label: "No, suggest changes (esc)",
|
|
11881
|
-
value:
|
|
11863
|
+
value: "cancel" /* Cancel */,
|
|
11882
11864
|
key: "No, suggest changes (esc)"
|
|
11883
11865
|
});
|
|
11884
11866
|
}
|
|
@@ -11917,7 +11899,7 @@ ${deceptiveUrlWarnings.map(
|
|
|
11917
11899
|
const containsRedirection = commandsToDisplay.some(
|
|
11918
11900
|
(cmd) => hasRedirection(cmd)
|
|
11919
11901
|
);
|
|
11920
|
-
const isAutoEdit = config.getApprovalMode() ===
|
|
11902
|
+
const isAutoEdit = config.getApprovalMode() === "yolo" /* YOLO */ || config.getApprovalMode() === "autoEdit" /* AUTO_EDIT */;
|
|
11921
11903
|
if (containsRedirection && !isAutoEdit) {
|
|
11922
11904
|
extraInfoLines = 1;
|
|
11923
11905
|
}
|
|
@@ -11943,7 +11925,7 @@ ${deceptiveUrlWarnings.map(
|
|
|
11943
11925
|
const isSafeToPersist = confirmationDetails.type === "info" || confirmationDetails.type === "edit" || confirmationDetails.type === "mcp";
|
|
11944
11926
|
if (isSafeToPersist && settings.merged.security.autoAddToPolicyByDefault) {
|
|
11945
11927
|
const alwaysAndSaveIndex = options2.findIndex(
|
|
11946
|
-
(o) => o.value ===
|
|
11928
|
+
(o) => o.value === "proceed_always_and_save" /* ProceedAlwaysAndSave */
|
|
11947
11929
|
);
|
|
11948
11930
|
if (alwaysAndSaveIndex !== -1) {
|
|
11949
11931
|
initialIndex2 = alwaysAndSaveIndex;
|
|
@@ -11960,10 +11942,10 @@ ${deceptiveUrlWarnings.map(
|
|
|
11960
11942
|
{
|
|
11961
11943
|
questions: confirmationDetails.questions,
|
|
11962
11944
|
onSubmit: (answers) => {
|
|
11963
|
-
handleConfirm(
|
|
11945
|
+
handleConfirm("proceed_once" /* ProceedOnce */, { answers });
|
|
11964
11946
|
},
|
|
11965
11947
|
onCancel: () => {
|
|
11966
|
-
handleConfirm(
|
|
11948
|
+
handleConfirm("cancel" /* Cancel */);
|
|
11967
11949
|
},
|
|
11968
11950
|
width: terminalWidth,
|
|
11969
11951
|
availableHeight: bodyHeight
|
|
@@ -11984,19 +11966,19 @@ ${deceptiveUrlWarnings.map(
|
|
|
11984
11966
|
planPath: confirmationDetails.planPath,
|
|
11985
11967
|
getPreferredEditor,
|
|
11986
11968
|
onApprove: (approvalMode) => {
|
|
11987
|
-
handleConfirm(
|
|
11969
|
+
handleConfirm("proceed_once" /* ProceedOnce */, {
|
|
11988
11970
|
approved: true,
|
|
11989
11971
|
approvalMode
|
|
11990
11972
|
});
|
|
11991
11973
|
},
|
|
11992
11974
|
onFeedback: (feedback) => {
|
|
11993
|
-
handleConfirm(
|
|
11975
|
+
handleConfirm("proceed_once" /* ProceedOnce */, {
|
|
11994
11976
|
approved: false,
|
|
11995
11977
|
feedback
|
|
11996
11978
|
});
|
|
11997
11979
|
},
|
|
11998
11980
|
onCancel: () => {
|
|
11999
|
-
handleConfirm(
|
|
11981
|
+
handleConfirm("cancel" /* Cancel */);
|
|
12000
11982
|
},
|
|
12001
11983
|
width: terminalWidth,
|
|
12002
11984
|
availableHeight: bodyHeight
|
|
@@ -12106,7 +12088,7 @@ ${deceptiveUrlWarnings.map(
|
|
|
12106
12088
|
const containsRedirection = commandsToDisplay.some(
|
|
12107
12089
|
(cmd) => hasRedirection(cmd)
|
|
12108
12090
|
);
|
|
12109
|
-
const isAutoEdit = config.getApprovalMode() ===
|
|
12091
|
+
const isAutoEdit = config.getApprovalMode() === "yolo" /* YOLO */ || config.getApprovalMode() === "autoEdit" /* AUTO_EDIT */;
|
|
12110
12092
|
let warnings = null;
|
|
12111
12093
|
if (containsRedirection && !isAutoEdit) {
|
|
12112
12094
|
const tipText = `To auto-accept, press ${formatCommand("app.cycleApprovalMode" /* CYCLE_APPROVAL_MODE */)}`;
|
|
@@ -12269,7 +12251,7 @@ ${deceptiveUrlWarnings.map(
|
|
|
12269
12251
|
const bodyOverflowDirection = confirmationDetails.type === "mcp" && isMcpToolDetailsExpanded ? "bottom" : "top";
|
|
12270
12252
|
const renderRadioItem = (0, import_react37.useCallback)(
|
|
12271
12253
|
(item, { titleColor }) => {
|
|
12272
|
-
if (item.value ===
|
|
12254
|
+
if (item.value === "proceed_always_and_save" /* ProceedAlwaysAndSave */) {
|
|
12273
12255
|
return /* @__PURE__ */ (0, import_jsx_runtime63.jsxs)(Text, { color: titleColor, wrap: "truncate", children: [
|
|
12274
12256
|
item.label,
|
|
12275
12257
|
" ",
|
|
@@ -14273,7 +14255,7 @@ function validateAuthMethodWithSettings(authType, settings) {
|
|
|
14273
14255
|
if (settings.merged.security.auth.useExternal) {
|
|
14274
14256
|
return null;
|
|
14275
14257
|
}
|
|
14276
|
-
if (authType ===
|
|
14258
|
+
if (authType === "gemini-api-key" /* USE_GEMINI */) {
|
|
14277
14259
|
return null;
|
|
14278
14260
|
}
|
|
14279
14261
|
return validateAuthMethod(authType);
|
|
@@ -14325,7 +14307,7 @@ var useAuthCommand = (settings, config, initialAuthError = null, initialAccountS
|
|
|
14325
14307
|
}
|
|
14326
14308
|
return;
|
|
14327
14309
|
}
|
|
14328
|
-
if (authType ===
|
|
14310
|
+
if (authType === "gemini-api-key" /* USE_GEMINI */) {
|
|
14329
14311
|
const key = await reloadApiKey();
|
|
14330
14312
|
if (!key) {
|
|
14331
14313
|
setAuthState("awaiting_api_key_input" /* AwaitingApiKeyInput */);
|
|
@@ -14400,31 +14382,31 @@ function AuthDialog({
|
|
|
14400
14382
|
let items = [
|
|
14401
14383
|
{
|
|
14402
14384
|
label: "Sign in with Google",
|
|
14403
|
-
value:
|
|
14404
|
-
key:
|
|
14385
|
+
value: "oauth-personal" /* LOGIN_WITH_GOOGLE */,
|
|
14386
|
+
key: "oauth-personal" /* LOGIN_WITH_GOOGLE */
|
|
14405
14387
|
},
|
|
14406
14388
|
...process.env["CLOUD_SHELL"] === "true" ? [
|
|
14407
14389
|
{
|
|
14408
14390
|
label: "Use Cloud Shell user credentials",
|
|
14409
|
-
value:
|
|
14410
|
-
key:
|
|
14391
|
+
value: "compute-default-credentials" /* COMPUTE_ADC */,
|
|
14392
|
+
key: "compute-default-credentials" /* COMPUTE_ADC */
|
|
14411
14393
|
}
|
|
14412
14394
|
] : process.env["GEMINI_CLI_USE_COMPUTE_ADC"] === "true" ? [
|
|
14413
14395
|
{
|
|
14414
14396
|
label: "Use metadata server application default credentials",
|
|
14415
|
-
value:
|
|
14416
|
-
key:
|
|
14397
|
+
value: "compute-default-credentials" /* COMPUTE_ADC */,
|
|
14398
|
+
key: "compute-default-credentials" /* COMPUTE_ADC */
|
|
14417
14399
|
}
|
|
14418
14400
|
] : [],
|
|
14419
14401
|
{
|
|
14420
14402
|
label: "Use Gemini API Key",
|
|
14421
|
-
value:
|
|
14422
|
-
key:
|
|
14403
|
+
value: "gemini-api-key" /* USE_GEMINI */,
|
|
14404
|
+
key: "gemini-api-key" /* USE_GEMINI */
|
|
14423
14405
|
},
|
|
14424
14406
|
{
|
|
14425
14407
|
label: "Vertex AI",
|
|
14426
|
-
value:
|
|
14427
|
-
key:
|
|
14408
|
+
value: "vertex-ai" /* USE_VERTEX_AI */,
|
|
14409
|
+
key: "vertex-ai" /* USE_VERTEX_AI */
|
|
14428
14410
|
}
|
|
14429
14411
|
];
|
|
14430
14412
|
if (settings.merged.security.auth.enforcedType) {
|
|
@@ -14446,9 +14428,9 @@ function AuthDialog({
|
|
|
14446
14428
|
return item.value === defaultAuthType;
|
|
14447
14429
|
}
|
|
14448
14430
|
if (process.env["GEMINI_API_KEY"]) {
|
|
14449
|
-
return item.value ===
|
|
14431
|
+
return item.value === "gemini-api-key" /* USE_GEMINI */;
|
|
14450
14432
|
}
|
|
14451
|
-
return item.value ===
|
|
14433
|
+
return item.value === "oauth-personal" /* LOGIN_WITH_GOOGLE */;
|
|
14452
14434
|
});
|
|
14453
14435
|
if (settings.merged.security.auth.enforcedType) {
|
|
14454
14436
|
initialAuthIndex = 0;
|
|
@@ -14459,7 +14441,7 @@ function AuthDialog({
|
|
|
14459
14441
|
return;
|
|
14460
14442
|
}
|
|
14461
14443
|
if (authType) {
|
|
14462
|
-
const needsRestart = authType ===
|
|
14444
|
+
const needsRestart = authType === "oauth-personal" /* LOGIN_WITH_GOOGLE */ || authType === "vertex-ai" /* USE_VERTEX_AI */ && process.env["CLOUD_SHELL"] === "true";
|
|
14463
14445
|
if (needsRestart) {
|
|
14464
14446
|
setAuthContext({ requiresRestart: true });
|
|
14465
14447
|
} else {
|
|
@@ -14467,12 +14449,12 @@ function AuthDialog({
|
|
|
14467
14449
|
}
|
|
14468
14450
|
await clearCachedCredentialFile();
|
|
14469
14451
|
settings.setValue(scope, "security.auth.selectedType", authType);
|
|
14470
|
-
if (authType ===
|
|
14452
|
+
if (authType === "oauth-personal" /* LOGIN_WITH_GOOGLE */ && config.isBrowserLaunchSuppressed()) {
|
|
14471
14453
|
setExiting(true);
|
|
14472
14454
|
setTimeout(relaunchApp, 100);
|
|
14473
14455
|
return;
|
|
14474
14456
|
}
|
|
14475
|
-
if (authType ===
|
|
14457
|
+
if (authType === "gemini-api-key" /* USE_GEMINI */) {
|
|
14476
14458
|
setAuthState("awaiting_api_key_input" /* AwaitingApiKeyInput */);
|
|
14477
14459
|
return;
|
|
14478
14460
|
}
|
|
@@ -15222,11 +15204,11 @@ var PrivacyNoticeText = ({
|
|
|
15222
15204
|
}) => {
|
|
15223
15205
|
const authType = config.getContentGeneratorConfig()?.authType;
|
|
15224
15206
|
switch (authType) {
|
|
15225
|
-
case
|
|
15207
|
+
case "gemini-api-key" /* USE_GEMINI */:
|
|
15226
15208
|
return /* @__PURE__ */ (0, import_jsx_runtime81.jsx)(GeminiPrivacyNotice, { onExit });
|
|
15227
|
-
case
|
|
15209
|
+
case "vertex-ai" /* USE_VERTEX_AI */:
|
|
15228
15210
|
return /* @__PURE__ */ (0, import_jsx_runtime81.jsx)(CloudPaidPrivacyNotice, { onExit });
|
|
15229
|
-
case
|
|
15211
|
+
case "oauth-personal" /* LOGIN_WITH_GOOGLE */:
|
|
15230
15212
|
default:
|
|
15231
15213
|
return /* @__PURE__ */ (0, import_jsx_runtime81.jsx)(CloudFreePrivacyNotice, { config, onExit });
|
|
15232
15214
|
}
|
|
@@ -15267,7 +15249,7 @@ function ProQuotaDialog({
|
|
|
15267
15249
|
value: "retry_always",
|
|
15268
15250
|
key: "retry_always"
|
|
15269
15251
|
},
|
|
15270
|
-
...authType ===
|
|
15252
|
+
...authType === "oauth-personal" /* LOGIN_WITH_GOOGLE */ && !isUltra ? [
|
|
15271
15253
|
{
|
|
15272
15254
|
label: "Upgrade for higher limits",
|
|
15273
15255
|
value: "upgrade",
|
|
@@ -16420,7 +16402,7 @@ function ModelDialog({ onClose }) {
|
|
|
16420
16402
|
const useGemini31 = config?.getGemini31LaunchedSync?.() ?? false;
|
|
16421
16403
|
const useGemini31FlashLite = config?.getGemini31FlashLiteLaunchedSync?.() ?? false;
|
|
16422
16404
|
const selectedAuthType = settings.merged.security.auth.selectedType;
|
|
16423
|
-
const useCustomToolModel = useGemini31 && selectedAuthType ===
|
|
16405
|
+
const useCustomToolModel = useGemini31 && selectedAuthType === "gemini-api-key" /* USE_GEMINI */;
|
|
16424
16406
|
const manualModelSelected = (0, import_react55.useMemo)(() => {
|
|
16425
16407
|
if (config?.getExperimentalDynamicModelConfiguration?.() === true && config.getModelConfigService) {
|
|
16426
16408
|
const def = config.getModelConfigService().getModelDefinition(preferredModel);
|
|
@@ -17737,10 +17719,10 @@ function initializeConsoleStore() {
|
|
|
17737
17719
|
globalConsoleMessages = [];
|
|
17738
17720
|
globalErrorCount = 0;
|
|
17739
17721
|
notifyListeners();
|
|
17740
|
-
coreEvents.off(
|
|
17741
|
-
coreEvents.off(
|
|
17742
|
-
coreEvents.on(
|
|
17743
|
-
coreEvents.on(
|
|
17722
|
+
coreEvents.off("console-log" /* ConsoleLog */, handleConsoleLog);
|
|
17723
|
+
coreEvents.off("output" /* Output */, handleOutput);
|
|
17724
|
+
coreEvents.on("console-log" /* ConsoleLog */, handleConsoleLog);
|
|
17725
|
+
coreEvents.on("output" /* Output */, handleOutput);
|
|
17744
17726
|
}
|
|
17745
17727
|
function notifyListeners() {
|
|
17746
17728
|
for (const listener of listeners) {
|
|
@@ -19873,7 +19855,7 @@ function usePromptCompletion({
|
|
|
19873
19855
|
{ model: "prompt-completion" },
|
|
19874
19856
|
contents,
|
|
19875
19857
|
signal,
|
|
19876
|
-
|
|
19858
|
+
"utility_autocomplete" /* UTILITY_AUTOCOMPLETE */
|
|
19877
19859
|
);
|
|
19878
19860
|
if (signal.aborted) {
|
|
19879
19861
|
return;
|
|
@@ -21943,9 +21925,9 @@ var InputPrompt = ({
|
|
|
21943
21925
|
onSuggestionsVisibilityChange(shouldShowSuggestions);
|
|
21944
21926
|
}
|
|
21945
21927
|
}, [shouldShowSuggestions, onSuggestionsVisibilityChange]);
|
|
21946
|
-
const showAutoAcceptStyling = !shellModeActive && approvalMode ===
|
|
21947
|
-
const showYoloStyling = !shellModeActive && approvalMode ===
|
|
21948
|
-
const showPlanStyling = !shellModeActive && approvalMode ===
|
|
21928
|
+
const showAutoAcceptStyling = !shellModeActive && approvalMode === "autoEdit" /* AUTO_EDIT */;
|
|
21929
|
+
const showYoloStyling = !shellModeActive && approvalMode === "yolo" /* YOLO */;
|
|
21930
|
+
const showPlanStyling = !shellModeActive && approvalMode === "plan" /* PLAN */;
|
|
21949
21931
|
let statusColor;
|
|
21950
21932
|
let statusText = "";
|
|
21951
21933
|
if (shellModeActive) {
|
|
@@ -22778,22 +22760,22 @@ var ApprovalModeIndicator = ({
|
|
|
22778
22760
|
const cycleHint = formatCommand("app.cycleApprovalMode" /* CYCLE_APPROVAL_MODE */);
|
|
22779
22761
|
const yoloHint = formatCommand("app.toggleYolo" /* TOGGLE_YOLO */);
|
|
22780
22762
|
switch (approvalMode) {
|
|
22781
|
-
case
|
|
22763
|
+
case "autoEdit" /* AUTO_EDIT */:
|
|
22782
22764
|
textColor = theme.status.warning;
|
|
22783
22765
|
textContent = "auto-accept edits";
|
|
22784
22766
|
subText = allowPlanMode ? `${cycleHint} to plan` : `${cycleHint} to manual`;
|
|
22785
22767
|
break;
|
|
22786
|
-
case
|
|
22768
|
+
case "plan" /* PLAN */:
|
|
22787
22769
|
textColor = theme.status.success;
|
|
22788
22770
|
textContent = "plan";
|
|
22789
22771
|
subText = `${cycleHint} to manual`;
|
|
22790
22772
|
break;
|
|
22791
|
-
case
|
|
22773
|
+
case "yolo" /* YOLO */:
|
|
22792
22774
|
textColor = theme.status.error;
|
|
22793
22775
|
textContent = "YOLO";
|
|
22794
22776
|
subText = yoloHint;
|
|
22795
22777
|
break;
|
|
22796
|
-
case
|
|
22778
|
+
case "default" /* DEFAULT */:
|
|
22797
22779
|
default:
|
|
22798
22780
|
textColor = theme.text.accent;
|
|
22799
22781
|
textContent = "";
|
|
@@ -22841,7 +22823,7 @@ var useComposerStatus = () => {
|
|
|
22841
22823
|
(item) => item.type === "tool_group"
|
|
22842
22824
|
).some(
|
|
22843
22825
|
(item) => item.tools.some(
|
|
22844
|
-
(tool) => tool.status ===
|
|
22826
|
+
(tool) => tool.status === "awaiting_approval" /* AwaitingApproval */
|
|
22845
22827
|
)
|
|
22846
22828
|
),
|
|
22847
22829
|
[uiState.pendingHistoryItems]
|
|
@@ -22856,13 +22838,13 @@ var useComposerStatus = () => {
|
|
|
22856
22838
|
const hideMinimalModeHintWhileBusy = !uiState.cleanUiDetailsVisible && (showLoadingIndicator || uiState.activeHooks.length > 0);
|
|
22857
22839
|
if (hideMinimalModeHintWhileBusy) return null;
|
|
22858
22840
|
switch (showApprovalModeIndicator) {
|
|
22859
|
-
case
|
|
22841
|
+
case "yolo" /* YOLO */:
|
|
22860
22842
|
return { text: "YOLO", color: theme.status.error };
|
|
22861
|
-
case
|
|
22843
|
+
case "plan" /* PLAN */:
|
|
22862
22844
|
return { text: "plan", color: theme.status.success };
|
|
22863
|
-
case
|
|
22845
|
+
case "autoEdit" /* AUTO_EDIT */:
|
|
22864
22846
|
return { text: "auto edit", color: theme.status.warning };
|
|
22865
|
-
case
|
|
22847
|
+
case "default" /* DEFAULT */:
|
|
22866
22848
|
default:
|
|
22867
22849
|
return null;
|
|
22868
22850
|
}
|
|
@@ -23216,7 +23198,7 @@ var ConfigInitDisplay = ({
|
|
|
23216
23198
|
let connected = 0;
|
|
23217
23199
|
const connecting = [];
|
|
23218
23200
|
for (const [name, client] of clients.entries()) {
|
|
23219
|
-
if (client.getStatus() ===
|
|
23201
|
+
if (client.getStatus() === "connected" /* CONNECTED */) {
|
|
23220
23202
|
connected++;
|
|
23221
23203
|
} else {
|
|
23222
23204
|
connecting.push(name);
|
|
@@ -23238,9 +23220,9 @@ var ConfigInitDisplay = ({
|
|
|
23238
23220
|
);
|
|
23239
23221
|
}
|
|
23240
23222
|
};
|
|
23241
|
-
coreEvents.on(
|
|
23223
|
+
coreEvents.on("mcp-client-update" /* McpClientUpdate */, onChange);
|
|
23242
23224
|
return () => {
|
|
23243
|
-
coreEvents.off(
|
|
23225
|
+
coreEvents.off("mcp-client-update" /* McpClientUpdate */, onChange);
|
|
23244
23226
|
};
|
|
23245
23227
|
}, [initialMessage]);
|
|
23246
23228
|
return /* @__PURE__ */ (0, import_jsx_runtime121.jsx)(Box_default, { marginTop: 1, children: /* @__PURE__ */ (0, import_jsx_runtime121.jsxs)(Text, { children: [
|
|
@@ -23955,7 +23937,7 @@ var useExecutionLifecycle = (addItemToHistory, setPendingHistoryItem, onExec, on
|
|
|
23955
23937
|
callId,
|
|
23956
23938
|
name: SHELL_COMMAND_NAME,
|
|
23957
23939
|
description: rawQuery,
|
|
23958
|
-
status:
|
|
23940
|
+
status: "executing" /* Executing */,
|
|
23959
23941
|
isClientInitiated: true,
|
|
23960
23942
|
resultDisplay: "",
|
|
23961
23943
|
confirmationDetails: void 0
|
|
@@ -24096,7 +24078,7 @@ __code=$?; pwd > ${escapedPwdFilePath}; exit $__code`;
|
|
|
24096
24078
|
mainContent = result.output.trim() || "(Command produced no output)";
|
|
24097
24079
|
}
|
|
24098
24080
|
let finalOutput = result.ansiOutput && result.ansiOutput.length > 0 ? result.ansiOutput : mainContent;
|
|
24099
|
-
let finalStatus =
|
|
24081
|
+
let finalStatus = "success" /* Success */;
|
|
24100
24082
|
const prependToAnsiOutput = (output, text) => {
|
|
24101
24083
|
const newLines = text.split("\n").map((line) => [
|
|
24102
24084
|
{
|
|
@@ -24115,20 +24097,20 @@ __code=$?; pwd > ${escapedPwdFilePath}; exit $__code`;
|
|
|
24115
24097
|
};
|
|
24116
24098
|
let prefix = "";
|
|
24117
24099
|
if (result.error) {
|
|
24118
|
-
finalStatus =
|
|
24100
|
+
finalStatus = "error" /* Error */;
|
|
24119
24101
|
prefix = result.error.message;
|
|
24120
24102
|
} else if (result.aborted) {
|
|
24121
|
-
finalStatus =
|
|
24103
|
+
finalStatus = "cancelled" /* Cancelled */;
|
|
24122
24104
|
prefix = "Command was cancelled.";
|
|
24123
24105
|
} else if (result.backgrounded) {
|
|
24124
|
-
finalStatus =
|
|
24106
|
+
finalStatus = "success" /* Success */;
|
|
24125
24107
|
finalOutput = `Command moved to background (PID: ${result.pid}). Output hidden. Press Ctrl+B to view.`;
|
|
24126
24108
|
mainContent = finalOutput;
|
|
24127
24109
|
} else if (result.signal) {
|
|
24128
|
-
finalStatus =
|
|
24110
|
+
finalStatus = "error" /* Error */;
|
|
24129
24111
|
prefix = `Command terminated by signal: ${result.signal}.`;
|
|
24130
24112
|
} else if (result.exitCode !== 0) {
|
|
24131
|
-
finalStatus =
|
|
24113
|
+
finalStatus = "error" /* Error */;
|
|
24132
24114
|
prefix = `Command exited with code ${result.exitCode}.`;
|
|
24133
24115
|
}
|
|
24134
24116
|
if (prefix) {
|
|
@@ -24154,7 +24136,7 @@ ${mainContent}`;
|
|
|
24154
24136
|
status: finalStatus,
|
|
24155
24137
|
resultDisplay: finalOutput
|
|
24156
24138
|
};
|
|
24157
|
-
if (finalStatus !==
|
|
24139
|
+
if (finalStatus !== "cancelled" /* Cancelled */) {
|
|
24158
24140
|
addItemToHistory(
|
|
24159
24141
|
{
|
|
24160
24142
|
type: "tool_group",
|
|
@@ -25144,7 +25126,7 @@ function useQuotaAndFallback({
|
|
|
25144
25126
|
error.retryDelayMs ? `Access resets at ${getResetTimeMessage(error.retryDelayMs)}.` : null,
|
|
25145
25127
|
`/stats model for usage details`,
|
|
25146
25128
|
`/model to switch models.`,
|
|
25147
|
-
contentGeneratorConfig?.authType ===
|
|
25129
|
+
contentGeneratorConfig?.authType === "oauth-personal" /* LOGIN_WITH_GOOGLE */ ? `/auth to switch to API key.` : null
|
|
25148
25130
|
].filter(Boolean);
|
|
25149
25131
|
message = messageLines.join("\n");
|
|
25150
25132
|
} else if (error instanceof ModelNotFoundError) {
|
|
@@ -25332,7 +25314,7 @@ var useEditorSettings = (loadedSettings, setEditorError, addItem) => {
|
|
|
25332
25314
|
);
|
|
25333
25315
|
setEditorError(null);
|
|
25334
25316
|
setIsEditorDialogOpen(false);
|
|
25335
|
-
coreEvents.emit(
|
|
25317
|
+
coreEvents.emit("editor-selected" /* EditorSelected */, { editor: editorType });
|
|
25336
25318
|
} catch (error) {
|
|
25337
25319
|
setEditorError(`Failed to set editor preference: ${error}`);
|
|
25338
25320
|
}
|
|
@@ -25341,7 +25323,7 @@ var useEditorSettings = (loadedSettings, setEditorError, addItem) => {
|
|
|
25341
25323
|
);
|
|
25342
25324
|
const exitEditorDialog = (0, import_react91.useCallback)(() => {
|
|
25343
25325
|
setIsEditorDialogOpen(false);
|
|
25344
|
-
coreEvents.emit(
|
|
25326
|
+
coreEvents.emit("editor-selected" /* EditorSelected */, { editor: void 0 });
|
|
25345
25327
|
}, []);
|
|
25346
25328
|
return {
|
|
25347
25329
|
isEditorDialogOpen,
|
|
@@ -25718,7 +25700,7 @@ var useSlashCommandProcessor = (config, settings, addItem, clearItems, loadHisto
|
|
|
25718
25700
|
canonicalPath: resolvedCommandPath
|
|
25719
25701
|
} = parseSlashCommand(trimmed, commands);
|
|
25720
25702
|
if (!commandToExecute) {
|
|
25721
|
-
const isMcpLoading = config?.getMcpClientManager()?.getDiscoveryState() ===
|
|
25703
|
+
const isMcpLoading = config?.getMcpClientManager()?.getDiscoveryState() === "in_progress" /* IN_PROGRESS */;
|
|
25722
25704
|
if (isMcpLoading) {
|
|
25723
25705
|
setIsProcessing(true);
|
|
25724
25706
|
if (addToHistory) {
|
|
@@ -25898,7 +25880,7 @@ var useSlashCommandProcessor = (config, settings, addItem, clearItems, loadHisto
|
|
|
25898
25880
|
onConfirm: async (resolvedOutcome) => {
|
|
25899
25881
|
resolve3({
|
|
25900
25882
|
outcome: resolvedOutcome,
|
|
25901
|
-
approvedCommands: resolvedOutcome ===
|
|
25883
|
+
approvedCommands: resolvedOutcome === "cancel" /* Cancel */ ? [] : result.commandsToConfirm
|
|
25902
25884
|
});
|
|
25903
25885
|
}
|
|
25904
25886
|
};
|
|
@@ -25906,7 +25888,7 @@ var useSlashCommandProcessor = (config, settings, addItem, clearItems, loadHisto
|
|
|
25906
25888
|
callId,
|
|
25907
25889
|
name: "Expansion",
|
|
25908
25890
|
description: "Command expansion needs shell access",
|
|
25909
|
-
status:
|
|
25891
|
+
status: "awaiting_approval" /* AwaitingApproval */,
|
|
25910
25892
|
isClientInitiated: true,
|
|
25911
25893
|
resultDisplay: void 0,
|
|
25912
25894
|
confirmationDetails
|
|
@@ -25917,7 +25899,7 @@ var useSlashCommandProcessor = (config, settings, addItem, clearItems, loadHisto
|
|
|
25917
25899
|
});
|
|
25918
25900
|
});
|
|
25919
25901
|
setPendingItem(null);
|
|
25920
|
-
if (outcome ===
|
|
25902
|
+
if (outcome === "cancel" /* Cancel */ || !approvedCommands || approvedCommands.length === 0) {
|
|
25921
25903
|
addItem(
|
|
25922
25904
|
{
|
|
25923
25905
|
type: "info" /* INFO */,
|
|
@@ -25927,7 +25909,7 @@ var useSlashCommandProcessor = (config, settings, addItem, clearItems, loadHisto
|
|
|
25927
25909
|
);
|
|
25928
25910
|
return { type: "handled" };
|
|
25929
25911
|
}
|
|
25930
|
-
if (outcome ===
|
|
25912
|
+
if (outcome === "proceed_always" /* ProceedAlways */) {
|
|
25931
25913
|
setSessionShellAllowlist(
|
|
25932
25914
|
(prev) => /* @__PURE__ */ new Set([...prev, ...approvedCommands])
|
|
25933
25915
|
);
|
|
@@ -26403,7 +26385,7 @@ function mapToDisplay(toolOrTools, options = {}) {
|
|
|
26403
26385
|
let description;
|
|
26404
26386
|
let renderOutputAsMarkdown = false;
|
|
26405
26387
|
const displayName = call.tool?.displayName ?? call.request.name;
|
|
26406
|
-
if (call.status ===
|
|
26388
|
+
if (call.status === "error" /* Error */) {
|
|
26407
26389
|
description = JSON.stringify(call.request.args);
|
|
26408
26390
|
} else {
|
|
26409
26391
|
description = call.invocation.getDescription();
|
|
@@ -26426,27 +26408,27 @@ function mapToDisplay(toolOrTools, options = {}) {
|
|
|
26426
26408
|
let progress = void 0;
|
|
26427
26409
|
let progressTotal = void 0;
|
|
26428
26410
|
switch (call.status) {
|
|
26429
|
-
case
|
|
26411
|
+
case "success" /* Success */:
|
|
26430
26412
|
resultDisplay = call.response.resultDisplay;
|
|
26431
26413
|
outputFile = call.response.outputFile;
|
|
26432
26414
|
break;
|
|
26433
|
-
case
|
|
26434
|
-
case
|
|
26415
|
+
case "error" /* Error */:
|
|
26416
|
+
case "cancelled" /* Cancelled */:
|
|
26435
26417
|
resultDisplay = call.response.resultDisplay;
|
|
26436
26418
|
break;
|
|
26437
|
-
case
|
|
26419
|
+
case "awaiting_approval" /* AwaitingApproval */:
|
|
26438
26420
|
correlationId = call.correlationId;
|
|
26439
26421
|
confirmationDetails = call.confirmationDetails;
|
|
26440
26422
|
break;
|
|
26441
|
-
case
|
|
26423
|
+
case "executing" /* Executing */:
|
|
26442
26424
|
resultDisplay = call.liveOutput;
|
|
26443
26425
|
ptyId = call.pid;
|
|
26444
26426
|
progressMessage = call.progressMessage;
|
|
26445
26427
|
progress = call.progress;
|
|
26446
26428
|
progressTotal = call.progressTotal;
|
|
26447
26429
|
break;
|
|
26448
|
-
case
|
|
26449
|
-
case
|
|
26430
|
+
case "scheduled" /* Scheduled */:
|
|
26431
|
+
case "validating" /* Validating */:
|
|
26450
26432
|
break;
|
|
26451
26433
|
default: {
|
|
26452
26434
|
const exhaustiveCheck = call;
|
|
@@ -26517,7 +26499,7 @@ function useToolScheduler(onComplete, config, getPreferredEditor) {
|
|
|
26517
26499
|
const handler = (event) => {
|
|
26518
26500
|
const isRoot = event.schedulerId === ROOT_SCHEDULER_ID;
|
|
26519
26501
|
const hasExecuting = event.toolCalls.some(
|
|
26520
|
-
(tc) => tc.status ===
|
|
26502
|
+
(tc) => tc.status === "executing" /* Executing */ || (tc.status === "success" /* Success */ || tc.status === "error" /* Error */) && "tailToolCallRequest" in tc && tc.tailToolCallRequest != null
|
|
26521
26503
|
);
|
|
26522
26504
|
if (hasExecuting) {
|
|
26523
26505
|
setLastToolOutputTime(Date.now());
|
|
@@ -26526,7 +26508,7 @@ function useToolScheduler(onComplete, config, getPreferredEditor) {
|
|
|
26526
26508
|
const prevCalls = prev[event.schedulerId] ?? [];
|
|
26527
26509
|
const prevCallIds = new Set(prevCalls.map((tc) => tc.request.callId));
|
|
26528
26510
|
const filteredToolCalls = isRoot ? event.toolCalls : event.toolCalls.filter(
|
|
26529
|
-
(tc) => tc.status ===
|
|
26511
|
+
(tc) => tc.status === "awaiting_approval" /* AwaitingApproval */ || prevCallIds.has(tc.request.callId)
|
|
26530
26512
|
);
|
|
26531
26513
|
if (!isRoot && filteredToolCalls.length === 0 && prevCalls.length === 0) {
|
|
26532
26514
|
return prev;
|
|
@@ -26538,9 +26520,9 @@ function useToolScheduler(onComplete, config, getPreferredEditor) {
|
|
|
26538
26520
|
};
|
|
26539
26521
|
});
|
|
26540
26522
|
};
|
|
26541
|
-
messageBus.subscribe(
|
|
26523
|
+
messageBus.subscribe("tool-calls-update" /* TOOL_CALLS_UPDATE */, handler);
|
|
26542
26524
|
return () => {
|
|
26543
|
-
messageBus.unsubscribe(
|
|
26525
|
+
messageBus.unsubscribe("tool-calls-update" /* TOOL_CALLS_UPDATE */, handler);
|
|
26544
26526
|
};
|
|
26545
26527
|
}, [messageBus, internalAdaptToolCalls]);
|
|
26546
26528
|
(0, import_react98.useEffect)(() => {
|
|
@@ -26562,9 +26544,9 @@ function useToolScheduler(onComplete, config, getPreferredEditor) {
|
|
|
26562
26544
|
};
|
|
26563
26545
|
});
|
|
26564
26546
|
};
|
|
26565
|
-
messageBus.subscribe(
|
|
26547
|
+
messageBus.subscribe("subagent-activity" /* SUBAGENT_ACTIVITY */, handler);
|
|
26566
26548
|
return () => {
|
|
26567
|
-
messageBus.unsubscribe(
|
|
26549
|
+
messageBus.unsubscribe("subagent-activity" /* SUBAGENT_ACTIVITY */, handler);
|
|
26568
26550
|
};
|
|
26569
26551
|
}, [messageBus]);
|
|
26570
26552
|
const schedule = (0, import_react98.useCallback)(
|
|
@@ -26663,8 +26645,8 @@ function adaptToolCalls(coreCalls, prevTracked) {
|
|
|
26663
26645
|
const prev = prevMap.get(coreCall.request.callId);
|
|
26664
26646
|
const responseSubmittedToGemini = prev?.responseSubmittedToGemini ?? false;
|
|
26665
26647
|
let status = coreCall.status;
|
|
26666
|
-
if ((status ===
|
|
26667
|
-
status =
|
|
26648
|
+
if ((status === "success" /* Success */ || status === "error" /* Error */) && "tailToolCallRequest" in coreCall && coreCall.tailToolCallRequest != null) {
|
|
26649
|
+
status = "executing" /* Executing */;
|
|
26668
26650
|
}
|
|
26669
26651
|
return {
|
|
26670
26652
|
...coreCall,
|
|
@@ -26696,7 +26678,7 @@ function getBackgroundedToolInfo(toolCall) {
|
|
|
26696
26678
|
};
|
|
26697
26679
|
}
|
|
26698
26680
|
function isBackgroundableExecutingToolCall(toolCall) {
|
|
26699
|
-
return toolCall.status ===
|
|
26681
|
+
return toolCall.status === "executing" /* Executing */ && typeof toolCall.pid === "number";
|
|
26700
26682
|
}
|
|
26701
26683
|
function showCitations(settings) {
|
|
26702
26684
|
const enabled = settings.merged.ui.showCitations;
|
|
@@ -26706,14 +26688,14 @@ function showCitations(settings) {
|
|
|
26706
26688
|
return true;
|
|
26707
26689
|
}
|
|
26708
26690
|
function calculateStreamingState(isResponding, toolCalls) {
|
|
26709
|
-
if (toolCalls.some((tc) => tc.status ===
|
|
26691
|
+
if (toolCalls.some((tc) => tc.status === "awaiting_approval" /* AwaitingApproval */)) {
|
|
26710
26692
|
return "waiting_for_confirmation" /* WaitingForConfirmation */;
|
|
26711
26693
|
}
|
|
26712
26694
|
const isAnyToolActive = toolCalls.some((tc) => {
|
|
26713
|
-
if (tc.status ===
|
|
26695
|
+
if (tc.status === "executing" /* Executing */ || tc.status === "scheduled" /* Scheduled */ || tc.status === "validating" /* Validating */) {
|
|
26714
26696
|
return true;
|
|
26715
26697
|
}
|
|
26716
|
-
if (tc.status ===
|
|
26698
|
+
if (tc.status === "success" /* Success */ || tc.status === "error" /* Error */ || tc.status === "cancelled" /* Cancelled */) {
|
|
26717
26699
|
return !tc.responseSubmittedToGemini;
|
|
26718
26700
|
}
|
|
26719
26701
|
return false;
|
|
@@ -26760,9 +26742,9 @@ var useGeminiStream = (geminiClient, history, addItem, config, settings, onDebug
|
|
|
26760
26742
|
}
|
|
26761
26743
|
setRetryStatus(payload);
|
|
26762
26744
|
};
|
|
26763
|
-
coreEvents.on(
|
|
26745
|
+
coreEvents.on("retry-attempt" /* RetryAttempt */, handleRetryAttempt);
|
|
26764
26746
|
return () => {
|
|
26765
|
-
coreEvents.off(
|
|
26747
|
+
coreEvents.off("retry-attempt" /* RetryAttempt */, handleRetryAttempt);
|
|
26766
26748
|
};
|
|
26767
26749
|
}, [isRespondingRef]);
|
|
26768
26750
|
const [
|
|
@@ -26895,12 +26877,12 @@ var useGeminiStream = (geminiClient, history, addItem, config, settings, onDebug
|
|
|
26895
26877
|
const tc = toolCalls[i];
|
|
26896
26878
|
if (pushedToolCallIdsRef.current.has(tc.request.callId)) continue;
|
|
26897
26879
|
if (tc.status === "success" || tc.status === "error" || tc.status === "cancelled") {
|
|
26898
|
-
const isAgent = tc.tool?.kind ===
|
|
26880
|
+
const isAgent = tc.tool?.kind === "agent" /* Agent */;
|
|
26899
26881
|
if (isAgent) {
|
|
26900
26882
|
let contigAgentsComplete = true;
|
|
26901
26883
|
for (let j = i + 1; j < toolCalls.length; j++) {
|
|
26902
26884
|
const nextTc = toolCalls[j];
|
|
26903
|
-
if (nextTc.tool?.kind ===
|
|
26885
|
+
if (nextTc.tool?.kind === "agent" /* Agent */) {
|
|
26904
26886
|
if (nextTc.status !== "success" && nextTc.status !== "error" && nextTc.status !== "cancelled") {
|
|
26905
26887
|
contigAgentsComplete = false;
|
|
26906
26888
|
break;
|
|
@@ -26926,7 +26908,7 @@ var useGeminiStream = (geminiClient, history, addItem, config, settings, onDebug
|
|
|
26926
26908
|
let currentGroup = [];
|
|
26927
26909
|
for (const tc of toolsToPush) {
|
|
26928
26910
|
newPushed.add(tc.request.callId);
|
|
26929
|
-
if (tc.tool?.kind ===
|
|
26911
|
+
if (tc.tool?.kind === "agent" /* Agent */) {
|
|
26930
26912
|
currentGroup.push(tc);
|
|
26931
26913
|
} else {
|
|
26932
26914
|
if (currentGroup.length > 0) {
|
|
@@ -27076,7 +27058,7 @@ var useGeminiStream = (geminiClient, history, addItem, config, settings, onDebug
|
|
|
27076
27058
|
prevActiveShellPtyIdRef.current = activeShellPtyId;
|
|
27077
27059
|
}, [activeShellPtyId, addItem, setIsResponding]);
|
|
27078
27060
|
(0, import_react99.useEffect)(() => {
|
|
27079
|
-
if (config.getApprovalMode() ===
|
|
27061
|
+
if (config.getApprovalMode() === "yolo" /* YOLO */ && streamingState === "idle" /* Idle */) {
|
|
27080
27062
|
const lastUserMessageIndex = history.findLastIndex(
|
|
27081
27063
|
(item) => item.type === "user" /* USER */
|
|
27082
27064
|
);
|
|
@@ -27144,7 +27126,7 @@ var useGeminiStream = (geminiClient, history, addItem, config, settings, onDebug
|
|
|
27144
27126
|
return;
|
|
27145
27127
|
}
|
|
27146
27128
|
const hasActiveTools = toolCalls.some(
|
|
27147
|
-
(tc) => tc.status ===
|
|
27129
|
+
(tc) => tc.status === "executing" /* Executing */ || tc.status === "scheduled" /* Scheduled */ || tc.status === "validating" /* Validating */
|
|
27148
27130
|
);
|
|
27149
27131
|
if (streamingState === "idle" /* Idle */ && !isRespondingRef.current && !hasActiveTools) {
|
|
27150
27132
|
if (clearBuffer) {
|
|
@@ -27171,7 +27153,7 @@ var useGeminiStream = (geminiClient, history, addItem, config, settings, onDebug
|
|
|
27171
27153
|
if (tool.name === SHELL_COMMAND_NAME) {
|
|
27172
27154
|
return {
|
|
27173
27155
|
...tool,
|
|
27174
|
-
status:
|
|
27156
|
+
status: "cancelled" /* Cancelled */,
|
|
27175
27157
|
resultDisplay: tool.resultDisplay
|
|
27176
27158
|
};
|
|
27177
27159
|
}
|
|
@@ -27236,7 +27218,7 @@ var useGeminiStream = (geminiClient, history, addItem, config, settings, onDebug
|
|
|
27236
27218
|
let localQueryToSendToGemini = null;
|
|
27237
27219
|
if (typeof query === "string") {
|
|
27238
27220
|
const trimmedQuery = query.trim();
|
|
27239
|
-
await logger?.logMessage(
|
|
27221
|
+
await logger?.logMessage("user" /* USER */, trimmedQuery);
|
|
27240
27222
|
if (!shellModeActive) {
|
|
27241
27223
|
const slashCommandResult = isSlashCommand(trimmedQuery) ? await handleSlashCommand(trimmedQuery) : false;
|
|
27242
27224
|
if (slashCommandResult) {
|
|
@@ -27392,7 +27374,7 @@ var useGeminiStream = (geminiClient, history, addItem, config, settings, onDebug
|
|
|
27392
27374
|
if (pendingHistoryItemRef.current) {
|
|
27393
27375
|
if (pendingHistoryItemRef.current.type === "tool_group") {
|
|
27394
27376
|
const updatedTools = pendingHistoryItemRef.current.tools.map(
|
|
27395
|
-
(tool) => tool.status ===
|
|
27377
|
+
(tool) => tool.status === "validating" /* Validating */ || tool.status === "scheduled" /* Scheduled */ || tool.status === "awaiting_approval" /* AwaitingApproval */ || tool.status === "executing" /* Executing */ ? { ...tool, status: "cancelled" /* Cancelled */ } : tool
|
|
27396
27378
|
);
|
|
27397
27379
|
const pendingItem = {
|
|
27398
27380
|
...pendingHistoryItemRef.current,
|
|
@@ -27638,15 +27620,15 @@ var useGeminiStream = (geminiClient, history, addItem, config, settings, onDebug
|
|
|
27638
27620
|
let geminiMessageBuffer = "";
|
|
27639
27621
|
const toolCallRequests = [];
|
|
27640
27622
|
for await (const event of stream) {
|
|
27641
|
-
if (event.type !==
|
|
27623
|
+
if (event.type !== "thought" /* Thought */ && thoughtRef.current !== null) {
|
|
27642
27624
|
setThought(null);
|
|
27643
27625
|
}
|
|
27644
27626
|
switch (event.type) {
|
|
27645
|
-
case
|
|
27627
|
+
case "thought" /* Thought */:
|
|
27646
27628
|
setLastGeminiActivityTime(Date.now());
|
|
27647
27629
|
handleThoughtEvent(event.value, userMessageTimestamp);
|
|
27648
27630
|
break;
|
|
27649
|
-
case
|
|
27631
|
+
case "content" /* Content */:
|
|
27650
27632
|
setLastGeminiActivityTime(Date.now());
|
|
27651
27633
|
geminiMessageBuffer = handleContentEvent(
|
|
27652
27634
|
event.value,
|
|
@@ -27654,16 +27636,16 @@ var useGeminiStream = (geminiClient, history, addItem, config, settings, onDebug
|
|
|
27654
27636
|
userMessageTimestamp
|
|
27655
27637
|
);
|
|
27656
27638
|
break;
|
|
27657
|
-
case
|
|
27639
|
+
case "tool_call_request" /* ToolCallRequest */:
|
|
27658
27640
|
toolCallRequests.push(event.value);
|
|
27659
27641
|
break;
|
|
27660
|
-
case
|
|
27642
|
+
case "user_cancelled" /* UserCancelled */:
|
|
27661
27643
|
handleUserCancelledEvent(userMessageTimestamp);
|
|
27662
27644
|
break;
|
|
27663
|
-
case
|
|
27645
|
+
case "error" /* Error */:
|
|
27664
27646
|
handleErrorEvent(event.value, userMessageTimestamp);
|
|
27665
27647
|
break;
|
|
27666
|
-
case
|
|
27648
|
+
case "agent_execution_stopped" /* AgentExecutionStopped */:
|
|
27667
27649
|
handleAgentExecutionStoppedEvent(
|
|
27668
27650
|
event.value.reason,
|
|
27669
27651
|
userMessageTimestamp,
|
|
@@ -27671,7 +27653,7 @@ var useGeminiStream = (geminiClient, history, addItem, config, settings, onDebug
|
|
|
27671
27653
|
event.value.contextCleared
|
|
27672
27654
|
);
|
|
27673
27655
|
break;
|
|
27674
|
-
case
|
|
27656
|
+
case "agent_execution_blocked" /* AgentExecutionBlocked */:
|
|
27675
27657
|
handleAgentExecutionBlockedEvent(
|
|
27676
27658
|
event.value.reason,
|
|
27677
27659
|
userMessageTimestamp,
|
|
@@ -27679,35 +27661,35 @@ var useGeminiStream = (geminiClient, history, addItem, config, settings, onDebug
|
|
|
27679
27661
|
event.value.contextCleared
|
|
27680
27662
|
);
|
|
27681
27663
|
break;
|
|
27682
|
-
case
|
|
27664
|
+
case "chat_compressed" /* ChatCompressed */:
|
|
27683
27665
|
handleChatCompressionEvent(event.value, userMessageTimestamp);
|
|
27684
27666
|
break;
|
|
27685
|
-
case
|
|
27686
|
-
case
|
|
27667
|
+
case "tool_call_confirmation" /* ToolCallConfirmation */:
|
|
27668
|
+
case "tool_call_response" /* ToolCallResponse */:
|
|
27687
27669
|
break;
|
|
27688
|
-
case
|
|
27670
|
+
case "max_session_turns" /* MaxSessionTurns */:
|
|
27689
27671
|
handleMaxSessionTurnsEvent();
|
|
27690
27672
|
break;
|
|
27691
|
-
case
|
|
27673
|
+
case "context_window_will_overflow" /* ContextWindowWillOverflow */:
|
|
27692
27674
|
handleContextWindowWillOverflowEvent(
|
|
27693
27675
|
event.value.estimatedRequestTokenCount,
|
|
27694
27676
|
event.value.remainingTokenCount
|
|
27695
27677
|
);
|
|
27696
27678
|
break;
|
|
27697
|
-
case
|
|
27679
|
+
case "finished" /* Finished */:
|
|
27698
27680
|
handleFinishedEvent(event, userMessageTimestamp);
|
|
27699
27681
|
break;
|
|
27700
|
-
case
|
|
27682
|
+
case "citation" /* Citation */:
|
|
27701
27683
|
handleCitationEvent(event.value, userMessageTimestamp);
|
|
27702
27684
|
break;
|
|
27703
|
-
case
|
|
27685
|
+
case "model_info" /* ModelInfo */:
|
|
27704
27686
|
handleChatModelEvent(event.value, userMessageTimestamp);
|
|
27705
27687
|
break;
|
|
27706
|
-
case
|
|
27688
|
+
case "loop_detected" /* LoopDetected */:
|
|
27707
27689
|
loopDetectedRef.current = true;
|
|
27708
27690
|
break;
|
|
27709
|
-
case
|
|
27710
|
-
case
|
|
27691
|
+
case "retry" /* Retry */:
|
|
27692
|
+
case "invalid_stream" /* InvalidStream */:
|
|
27711
27693
|
break;
|
|
27712
27694
|
default: {
|
|
27713
27695
|
const unreachable = event;
|
|
@@ -27748,7 +27730,7 @@ var useGeminiStream = (geminiClient, history, addItem, config, settings, onDebug
|
|
|
27748
27730
|
const submitQuery = (0, import_react99.useCallback)(
|
|
27749
27731
|
async (query, options, prompt_id) => runInDevTraceSpan(
|
|
27750
27732
|
{
|
|
27751
|
-
operation: options?.isContinuation ?
|
|
27733
|
+
operation: options?.isContinuation ? "system_prompt" /* SystemPrompt */ : "user_prompt" /* UserPrompt */,
|
|
27752
27734
|
sessionId: config.getSessionId()
|
|
27753
27735
|
},
|
|
27754
27736
|
async ({ metadata: spanMetadata }) => {
|
|
@@ -27908,7 +27890,7 @@ var useGeminiStream = (geminiClient, history, addItem, config, settings, onDebug
|
|
|
27908
27890
|
);
|
|
27909
27891
|
const handleApprovalModeChange = (0, import_react99.useCallback)(
|
|
27910
27892
|
async (newApprovalMode) => {
|
|
27911
|
-
if (previousApprovalModeRef.current ===
|
|
27893
|
+
if (previousApprovalModeRef.current === "plan" /* PLAN */ && newApprovalMode !== "plan" /* PLAN */ && streamingState === "idle" /* Idle */) {
|
|
27912
27894
|
if (geminiClient) {
|
|
27913
27895
|
try {
|
|
27914
27896
|
await geminiClient.addHistory({
|
|
@@ -27931,11 +27913,11 @@ var useGeminiStream = (geminiClient, history, addItem, config, settings, onDebug
|
|
|
27931
27913
|
}
|
|
27932
27914
|
}
|
|
27933
27915
|
previousApprovalModeRef.current = newApprovalMode;
|
|
27934
|
-
if (newApprovalMode ===
|
|
27916
|
+
if (newApprovalMode === "yolo" /* YOLO */ || newApprovalMode === "autoEdit" /* AUTO_EDIT */) {
|
|
27935
27917
|
let awaitingApprovalCalls = toolCalls.filter(
|
|
27936
27918
|
(call) => call.status === "awaiting_approval" && !call.request.forcedAsk
|
|
27937
27919
|
);
|
|
27938
|
-
if (newApprovalMode ===
|
|
27920
|
+
if (newApprovalMode === "autoEdit" /* AUTO_EDIT */) {
|
|
27939
27921
|
awaitingApprovalCalls = awaitingApprovalCalls.filter(
|
|
27940
27922
|
(call) => EDIT_TOOL_NAMES.has(call.request.name)
|
|
27941
27923
|
);
|
|
@@ -27944,11 +27926,11 @@ var useGeminiStream = (geminiClient, history, addItem, config, settings, onDebug
|
|
|
27944
27926
|
if (call.correlationId) {
|
|
27945
27927
|
try {
|
|
27946
27928
|
await config.getMessageBus().publish({
|
|
27947
|
-
type:
|
|
27929
|
+
type: "tool-confirmation-response" /* TOOL_CONFIRMATION_RESPONSE */,
|
|
27948
27930
|
correlationId: call.correlationId,
|
|
27949
27931
|
confirmed: true,
|
|
27950
27932
|
requiresUserConfirmation: false,
|
|
27951
|
-
outcome:
|
|
27933
|
+
outcome: "proceed_once" /* ProceedOnce */
|
|
27952
27934
|
});
|
|
27953
27935
|
} catch (error) {
|
|
27954
27936
|
debugLogger.warn(
|
|
@@ -28026,14 +28008,14 @@ var useGeminiStream = (geminiClient, history, addItem, config, settings, onDebug
|
|
|
28026
28008
|
);
|
|
28027
28009
|
if (isLowErrorVerbosity) {
|
|
28028
28010
|
suppressedToolErrorCountRef.current += geminiTools.filter(
|
|
28029
|
-
(tc) => tc.status ===
|
|
28011
|
+
(tc) => tc.status === "error" /* Error */
|
|
28030
28012
|
).length;
|
|
28031
28013
|
}
|
|
28032
28014
|
if (geminiTools.length === 0) {
|
|
28033
28015
|
return;
|
|
28034
28016
|
}
|
|
28035
28017
|
const stopExecutionTool = geminiTools.find(
|
|
28036
|
-
(tc) => tc.response.errorType ===
|
|
28018
|
+
(tc) => tc.response.errorType === "stop_execution" /* STOP_EXECUTION */
|
|
28037
28019
|
);
|
|
28038
28020
|
if (stopExecutionTool && stopExecutionTool.response.error) {
|
|
28039
28021
|
maybeAddSuppressedToolErrorNote();
|
|
@@ -28053,9 +28035,9 @@ var useGeminiStream = (geminiClient, history, addItem, config, settings, onDebug
|
|
|
28053
28035
|
(tc) => !isTopicTool2(tc.request.name)
|
|
28054
28036
|
);
|
|
28055
28037
|
const allDeclinableToolsCancelled = declinableTools.length > 0 && declinableTools.every(
|
|
28056
|
-
(tc) => tc.status ===
|
|
28038
|
+
(tc) => tc.status === "cancelled" /* Cancelled */
|
|
28057
28039
|
);
|
|
28058
|
-
const allToolsCancelled = geminiTools.length > 0 && geminiTools.every((tc) => tc.status ===
|
|
28040
|
+
const allToolsCancelled = geminiTools.length > 0 && geminiTools.every((tc) => tc.status === "cancelled" /* Cancelled */);
|
|
28059
28041
|
if (allDeclinableToolsCancelled || allToolsCancelled) {
|
|
28060
28042
|
if (!turnCancelledRef.current) {
|
|
28061
28043
|
addItem({
|
|
@@ -28136,7 +28118,7 @@ var useGeminiStream = (geminiClient, history, addItem, config, settings, onDebug
|
|
|
28136
28118
|
return;
|
|
28137
28119
|
}
|
|
28138
28120
|
const restorableToolCalls = toolCalls.filter(
|
|
28139
|
-
(toolCall) => EDIT_TOOL_NAMES.has(toolCall.request.name) && toolCall.status ===
|
|
28121
|
+
(toolCall) => EDIT_TOOL_NAMES.has(toolCall.request.name) && toolCall.status === "awaiting_approval" /* AwaitingApproval */
|
|
28140
28122
|
);
|
|
28141
28123
|
if (restorableToolCalls.length > 0) {
|
|
28142
28124
|
if (!gitService) {
|
|
@@ -28358,14 +28340,14 @@ var useAgentStream = ({
|
|
|
28358
28340
|
const displayName = legacyState?.displayName ?? event.name;
|
|
28359
28341
|
const isOutputMarkdown = legacyState?.isOutputMarkdown ?? false;
|
|
28360
28342
|
const desc = legacyState?.description ?? "";
|
|
28361
|
-
const fallbackKind =
|
|
28343
|
+
const fallbackKind = "other" /* Other */;
|
|
28362
28344
|
const newCall = {
|
|
28363
28345
|
callId: event.requestId,
|
|
28364
28346
|
name: displayName,
|
|
28365
28347
|
originalRequestName: event.name,
|
|
28366
28348
|
description: desc,
|
|
28367
28349
|
display: event.display,
|
|
28368
|
-
status:
|
|
28350
|
+
status: "scheduled" /* Scheduled */,
|
|
28369
28351
|
isClientInitiated: false,
|
|
28370
28352
|
renderOutputAsMarkdown: isOutputMarkdown,
|
|
28371
28353
|
kind: legacyState?.kind ?? fallbackKind,
|
|
@@ -28383,10 +28365,10 @@ var useAgentStream = ({
|
|
|
28383
28365
|
const evtStatus = legacyState?.status;
|
|
28384
28366
|
let status = tc.status;
|
|
28385
28367
|
if (evtStatus === "executing")
|
|
28386
|
-
status =
|
|
28387
|
-
else if (evtStatus === "error") status =
|
|
28368
|
+
status = "executing" /* Executing */;
|
|
28369
|
+
else if (evtStatus === "error") status = "error" /* Error */;
|
|
28388
28370
|
else if (evtStatus === "success")
|
|
28389
|
-
status =
|
|
28371
|
+
status = "success" /* Success */;
|
|
28390
28372
|
const display = event.display?.result;
|
|
28391
28373
|
const liveOutput = displayContentToString(display) ?? tc.resultDisplay;
|
|
28392
28374
|
const progressMessage = legacyState?.progressMessage ?? tc.progressMessage;
|
|
@@ -28419,7 +28401,7 @@ var useAgentStream = ({
|
|
|
28419
28401
|
const resultDisplay = displayContentToString(display) ?? tc.resultDisplay;
|
|
28420
28402
|
return {
|
|
28421
28403
|
...tc,
|
|
28422
|
-
status: event.isError ?
|
|
28404
|
+
status: event.isError ? "error" /* Error */ : "success" /* Success */,
|
|
28423
28405
|
display: event.display ? { ...tc.display, ...event.display } : tc.display,
|
|
28424
28406
|
resultDisplay,
|
|
28425
28407
|
outputFile
|
|
@@ -28485,7 +28467,7 @@ var useAgentStream = ({
|
|
|
28485
28467
|
if (!options?.isContinuation) {
|
|
28486
28468
|
if (typeof query === "string") {
|
|
28487
28469
|
addItem({ type: "user" /* USER */, text: query }, timestamp);
|
|
28488
|
-
void logger?.logMessage(
|
|
28470
|
+
void logger?.logMessage("user" /* USER */, query);
|
|
28489
28471
|
}
|
|
28490
28472
|
startNewPrompt();
|
|
28491
28473
|
}
|
|
@@ -29986,9 +29968,9 @@ var useFolderTrust = (settings, onTrustChange, addItem) => {
|
|
|
29986
29968
|
const handleFolderTrustSelect = (0, import_react105.useCallback)(
|
|
29987
29969
|
async (choice) => {
|
|
29988
29970
|
const trustLevelMap = {
|
|
29989
|
-
["trust_folder" /* TRUST_FOLDER */]:
|
|
29990
|
-
["trust_parent" /* TRUST_PARENT */]:
|
|
29991
|
-
["do_not_trust" /* DO_NOT_TRUST */]:
|
|
29971
|
+
["trust_folder" /* TRUST_FOLDER */]: "TRUST_FOLDER" /* TRUST_FOLDER */,
|
|
29972
|
+
["trust_parent" /* TRUST_PARENT */]: "TRUST_PARENT" /* TRUST_PARENT */,
|
|
29973
|
+
["do_not_trust" /* DO_NOT_TRUST */]: "DO_NOT_TRUST" /* DO_NOT_TRUST */
|
|
29992
29974
|
};
|
|
29993
29975
|
const trustLevel = trustLevelMap[choice];
|
|
29994
29976
|
if (!trustLevel) return;
|
|
@@ -30007,7 +29989,7 @@ var useFolderTrust = (settings, onTrustChange, addItem) => {
|
|
|
30007
29989
|
}, 100);
|
|
30008
29990
|
return;
|
|
30009
29991
|
}
|
|
30010
|
-
const currentIsTrusted = trustLevel ===
|
|
29992
|
+
const currentIsTrusted = trustLevel === "TRUST_FOLDER" /* TRUST_FOLDER */ || trustLevel === "TRUST_PARENT" /* TRUST_PARENT */;
|
|
30011
29993
|
onTrustChange(currentIsTrusted);
|
|
30012
29994
|
setIsTrusted(currentIsTrusted);
|
|
30013
29995
|
const wasTrusted = isTrusted ?? false;
|
|
@@ -31015,7 +30997,7 @@ function useMessageQueue({
|
|
|
31015
30997
|
var import_react107 = __toESM(require_react(), 1);
|
|
31016
30998
|
function useMcpStatus(config) {
|
|
31017
30999
|
const [discoveryState, setDiscoveryState] = (0, import_react107.useState)(
|
|
31018
|
-
() => config.getMcpClientManager()?.getDiscoveryState() ??
|
|
31000
|
+
() => config.getMcpClientManager()?.getDiscoveryState() ?? "not_started" /* NOT_STARTED */
|
|
31019
31001
|
);
|
|
31020
31002
|
const [mcpServerCount, setMcpServerCount] = (0, import_react107.useState)(
|
|
31021
31003
|
() => config.getMcpClientManager()?.getMcpServerCount() ?? 0
|
|
@@ -31028,12 +31010,12 @@ function useMcpStatus(config) {
|
|
|
31028
31010
|
setMcpServerCount(manager.getMcpServerCount());
|
|
31029
31011
|
}
|
|
31030
31012
|
};
|
|
31031
|
-
coreEvents.on(
|
|
31013
|
+
coreEvents.on("mcp-client-update" /* McpClientUpdate */, onChange);
|
|
31032
31014
|
return () => {
|
|
31033
|
-
coreEvents.off(
|
|
31015
|
+
coreEvents.off("mcp-client-update" /* McpClientUpdate */, onChange);
|
|
31034
31016
|
};
|
|
31035
31017
|
}, [config]);
|
|
31036
|
-
const isMcpReady = discoveryState ===
|
|
31018
|
+
const isMcpReady = discoveryState === "completed" /* COMPLETED */ || discoveryState === "not_started" /* NOT_STARTED */ && mcpServerCount === 0;
|
|
31037
31019
|
return {
|
|
31038
31020
|
discoveryState,
|
|
31039
31021
|
mcpServerCount,
|
|
@@ -31060,7 +31042,7 @@ function useApprovalModeIndicator({
|
|
|
31060
31042
|
(key) => {
|
|
31061
31043
|
let nextApprovalMode;
|
|
31062
31044
|
if (keyMatchers["app.toggleYolo" /* TOGGLE_YOLO */](key)) {
|
|
31063
|
-
if (config.isYoloModeDisabled() && config.getApprovalMode() !==
|
|
31045
|
+
if (config.isYoloModeDisabled() && config.getApprovalMode() !== "yolo" /* YOLO */) {
|
|
31064
31046
|
if (addItem) {
|
|
31065
31047
|
let text = "You cannot enter YOLO mode since it is disabled in your settings.";
|
|
31066
31048
|
const adminSettings = config.getRemoteAdminSettings();
|
|
@@ -31078,21 +31060,21 @@ function useApprovalModeIndicator({
|
|
|
31078
31060
|
}
|
|
31079
31061
|
return;
|
|
31080
31062
|
}
|
|
31081
|
-
nextApprovalMode = config.getApprovalMode() ===
|
|
31063
|
+
nextApprovalMode = config.getApprovalMode() === "yolo" /* YOLO */ ? "default" /* DEFAULT */ : "yolo" /* YOLO */;
|
|
31082
31064
|
} else if (keyMatchers["app.cycleApprovalMode" /* CYCLE_APPROVAL_MODE */](key)) {
|
|
31083
31065
|
const currentMode = config.getApprovalMode();
|
|
31084
31066
|
switch (currentMode) {
|
|
31085
|
-
case
|
|
31086
|
-
nextApprovalMode =
|
|
31067
|
+
case "default" /* DEFAULT */:
|
|
31068
|
+
nextApprovalMode = "autoEdit" /* AUTO_EDIT */;
|
|
31087
31069
|
break;
|
|
31088
|
-
case
|
|
31089
|
-
nextApprovalMode = allowPlanMode ?
|
|
31070
|
+
case "autoEdit" /* AUTO_EDIT */:
|
|
31071
|
+
nextApprovalMode = allowPlanMode ? "plan" /* PLAN */ : "default" /* DEFAULT */;
|
|
31090
31072
|
break;
|
|
31091
|
-
case
|
|
31092
|
-
nextApprovalMode =
|
|
31073
|
+
case "plan" /* PLAN */:
|
|
31074
|
+
nextApprovalMode = "default" /* DEFAULT */;
|
|
31093
31075
|
break;
|
|
31094
|
-
case
|
|
31095
|
-
nextApprovalMode =
|
|
31076
|
+
case "yolo" /* YOLO */:
|
|
31077
|
+
nextApprovalMode = "autoEdit" /* AUTO_EDIT */;
|
|
31096
31078
|
break;
|
|
31097
31079
|
default:
|
|
31098
31080
|
}
|
|
@@ -31502,11 +31484,11 @@ var useHookDisplayState = () => {
|
|
|
31502
31484
|
removeHook();
|
|
31503
31485
|
}
|
|
31504
31486
|
};
|
|
31505
|
-
coreEvents.on(
|
|
31506
|
-
coreEvents.on(
|
|
31487
|
+
coreEvents.on("hook-start" /* HookStart */, handleHookStart);
|
|
31488
|
+
coreEvents.on("hook-end" /* HookEnd */, handleHookEnd);
|
|
31507
31489
|
return () => {
|
|
31508
|
-
coreEvents.off(
|
|
31509
|
-
coreEvents.off(
|
|
31490
|
+
coreEvents.off("hook-start" /* HookStart */, handleHookStart);
|
|
31491
|
+
coreEvents.off("hook-end" /* HookEnd */, handleHookEnd);
|
|
31510
31492
|
activeTimeouts.forEach(clearTimeout);
|
|
31511
31493
|
activeTimeouts.clear();
|
|
31512
31494
|
};
|
|
@@ -32359,7 +32341,7 @@ var AppContainer = (props) => {
|
|
|
32359
32341
|
setConfigInitialized(true);
|
|
32360
32342
|
startupProfiler.flush(config);
|
|
32361
32343
|
startAutoMemoryIfEnabled(config);
|
|
32362
|
-
const sessionStartSource = resumedSessionData ?
|
|
32344
|
+
const sessionStartSource = resumedSessionData ? "resume" /* Resume */ : "startup" /* Startup */;
|
|
32363
32345
|
const result = await config.getHookSystem()?.fireSessionStartEvent(sessionStartSource);
|
|
32364
32346
|
if (result) {
|
|
32365
32347
|
if (result.systemMessage) {
|
|
@@ -32395,7 +32377,7 @@ var AppContainer = (props) => {
|
|
|
32395
32377
|
);
|
|
32396
32378
|
const ideClient = await IdeClient.getInstance();
|
|
32397
32379
|
await ideClient.disconnect();
|
|
32398
|
-
await config?.getHookSystem()?.fireSessionEndEvent(
|
|
32380
|
+
await config?.getHookSystem()?.fireSessionEndEvent("exit" /* Exit */);
|
|
32399
32381
|
};
|
|
32400
32382
|
registerCleanup(cleanupFn);
|
|
32401
32383
|
return () => {
|
|
@@ -32420,11 +32402,11 @@ var AppContainer = (props) => {
|
|
|
32420
32402
|
resetTime: payload.resetTime
|
|
32421
32403
|
});
|
|
32422
32404
|
};
|
|
32423
|
-
coreEvents.on(
|
|
32424
|
-
coreEvents.on(
|
|
32405
|
+
coreEvents.on("model-changed" /* ModelChanged */, handleModelChanged);
|
|
32406
|
+
coreEvents.on("quota-changed" /* QuotaChanged */, handleQuotaChanged);
|
|
32425
32407
|
return () => {
|
|
32426
|
-
coreEvents.off(
|
|
32427
|
-
coreEvents.off(
|
|
32408
|
+
coreEvents.off("model-changed" /* ModelChanged */, handleModelChanged);
|
|
32409
|
+
coreEvents.off("quota-changed" /* QuotaChanged */, handleQuotaChanged);
|
|
32428
32410
|
};
|
|
32429
32411
|
}, [config]);
|
|
32430
32412
|
(0, import_react121.useEffect)(() => {
|
|
@@ -32437,16 +32419,16 @@ var AppContainer = (props) => {
|
|
|
32437
32419
|
const handleAgentsDiscovered = (payload) => {
|
|
32438
32420
|
setNewAgents(payload.agents);
|
|
32439
32421
|
};
|
|
32440
|
-
coreEvents.on(
|
|
32441
|
-
coreEvents.on(
|
|
32442
|
-
coreEvents.on(
|
|
32422
|
+
coreEvents.on("settings-changed" /* SettingsChanged */, handleSettingsChanged);
|
|
32423
|
+
coreEvents.on("admin-settings-changed" /* AdminSettingsChanged */, handleAdminSettingsChanged);
|
|
32424
|
+
coreEvents.on("agents-discovered" /* AgentsDiscovered */, handleAgentsDiscovered);
|
|
32443
32425
|
return () => {
|
|
32444
|
-
coreEvents.off(
|
|
32426
|
+
coreEvents.off("settings-changed" /* SettingsChanged */, handleSettingsChanged);
|
|
32445
32427
|
coreEvents.off(
|
|
32446
|
-
|
|
32428
|
+
"admin-settings-changed" /* AdminSettingsChanged */,
|
|
32447
32429
|
handleAdminSettingsChanged
|
|
32448
32430
|
);
|
|
32449
|
-
coreEvents.off(
|
|
32431
|
+
coreEvents.off("agents-discovered" /* AgentsDiscovered */, handleAgentsDiscovered);
|
|
32450
32432
|
};
|
|
32451
32433
|
}, [settings]);
|
|
32452
32434
|
const { errorCount, clearErrorCount } = useErrorCount();
|
|
@@ -32512,11 +32494,11 @@ var AppContainer = (props) => {
|
|
|
32512
32494
|
exitEditorDialog
|
|
32513
32495
|
} = useEditorSettings(settings, setEditorError, historyManager.addItem);
|
|
32514
32496
|
(0, import_react121.useEffect)(() => {
|
|
32515
|
-
coreEvents.on(
|
|
32516
|
-
coreEvents.on(
|
|
32497
|
+
coreEvents.on("external-editor-closed" /* ExternalEditorClosed */, handleEditorClose);
|
|
32498
|
+
coreEvents.on("request-editor-selection" /* RequestEditorSelection */, openEditorDialog);
|
|
32517
32499
|
return () => {
|
|
32518
|
-
coreEvents.off(
|
|
32519
|
-
coreEvents.off(
|
|
32500
|
+
coreEvents.off("external-editor-closed" /* ExternalEditorClosed */, handleEditorClose);
|
|
32501
|
+
coreEvents.off("request-editor-selection" /* RequestEditorSelection */, openEditorDialog);
|
|
32520
32502
|
};
|
|
32521
32503
|
}, [handleEditorClose, openEditorDialog]);
|
|
32522
32504
|
(0, import_react121.useEffect)(() => {
|
|
@@ -32584,7 +32566,7 @@ var AppContainer = (props) => {
|
|
|
32584
32566
|
errorVerbosity: settings.merged.ui.errorVerbosity
|
|
32585
32567
|
});
|
|
32586
32568
|
const isAuthDialogOpen = authState === "updating" /* Updating */;
|
|
32587
|
-
const isAuthenticating = authState === "unauthenticated" /* Unauthenticated */ && settings.merged.security.auth.selectedType !==
|
|
32569
|
+
const isAuthenticating = authState === "unauthenticated" /* Unauthenticated */ && settings.merged.security.auth.selectedType !== "gemini-api-key" /* USE_GEMINI */;
|
|
32588
32570
|
const isGeminiClientInitialized = config.getGeminiClient()?.isInitialized();
|
|
32589
32571
|
const { loadHistoryForResume, isResuming } = useSessionResume({
|
|
32590
32572
|
config,
|
|
@@ -32612,7 +32594,7 @@ var AppContainer = (props) => {
|
|
|
32612
32594
|
async (authType, scope) => {
|
|
32613
32595
|
if (authType) {
|
|
32614
32596
|
const previousAuthType = config.getContentGeneratorConfig()?.authType ?? "unknown";
|
|
32615
|
-
if (authType ===
|
|
32597
|
+
if (authType === "oauth-personal" /* LOGIN_WITH_GOOGLE */) {
|
|
32616
32598
|
setAuthContext({ requiresRestart: true });
|
|
32617
32599
|
} else {
|
|
32618
32600
|
setAuthContext({});
|
|
@@ -32640,7 +32622,7 @@ var AppContainer = (props) => {
|
|
|
32640
32622
|
);
|
|
32641
32623
|
return;
|
|
32642
32624
|
}
|
|
32643
|
-
if (authType ===
|
|
32625
|
+
if (authType === "oauth-personal" /* LOGIN_WITH_GOOGLE */ && config.isBrowserLaunchSuppressed()) {
|
|
32644
32626
|
writeToStdout(`
|
|
32645
32627
|
----------------------------------------------------------------
|
|
32646
32628
|
Logging in with Google... Restarting Gemini CLI to continue.
|
|
@@ -32663,7 +32645,7 @@ Logging in with Google... Restarting Gemini CLI to continue.
|
|
|
32663
32645
|
}
|
|
32664
32646
|
await saveApiKey(apiKey);
|
|
32665
32647
|
await reloadApiKey();
|
|
32666
|
-
await config.refreshAuth(
|
|
32648
|
+
await config.refreshAuth("gemini-api-key" /* USE_GEMINI */);
|
|
32667
32649
|
setAuthState("authenticated" /* Authenticated */);
|
|
32668
32650
|
} catch (e) {
|
|
32669
32651
|
onAuthError(
|
|
@@ -32688,7 +32670,7 @@ Logging in with Google... Restarting Gemini CLI to continue.
|
|
|
32688
32670
|
`Authentication is enforced to be ${settings.merged.security.auth.enforcedType}, but you are currently using ${settings.merged.security.auth.selectedType}.`
|
|
32689
32671
|
);
|
|
32690
32672
|
} else if (settings.merged.security.auth.selectedType && !settings.merged.security.auth.useExternal) {
|
|
32691
|
-
if (settings.merged.security.auth.selectedType ===
|
|
32673
|
+
if (settings.merged.security.auth.selectedType === "gemini-api-key" /* USE_GEMINI */) {
|
|
32692
32674
|
return;
|
|
32693
32675
|
}
|
|
32694
32676
|
const error = validateAuthMethod(
|
|
@@ -32817,9 +32799,9 @@ Logging in with Google... Restarting Gemini CLI to continue.
|
|
|
32817
32799
|
}
|
|
32818
32800
|
});
|
|
32819
32801
|
};
|
|
32820
|
-
coreEvents.on(
|
|
32802
|
+
coreEvents.on("consent-request" /* ConsentRequest */, handleConsentRequest);
|
|
32821
32803
|
return () => {
|
|
32822
|
-
coreEvents.off(
|
|
32804
|
+
coreEvents.off("consent-request" /* ConsentRequest */, handleConsentRequest);
|
|
32823
32805
|
};
|
|
32824
32806
|
}, []);
|
|
32825
32807
|
const performMemoryRefresh = (0, import_react121.useCallback)(async () => {
|
|
@@ -33500,7 +33482,7 @@ ${queuedText}` : queuedText;
|
|
|
33500
33482
|
if (keyMatchers["app.showErrorDetails" /* SHOW_ERROR_DETAILS */](key)) {
|
|
33501
33483
|
if (settings.merged.general.devtools) {
|
|
33502
33484
|
void (async () => {
|
|
33503
|
-
const { toggleDevToolsPanel } = await import("./devtoolsService-
|
|
33485
|
+
const { toggleDevToolsPanel } = await import("./devtoolsService-TRDGMQLJ.js");
|
|
33504
33486
|
await toggleDevToolsPanel(
|
|
33505
33487
|
config,
|
|
33506
33488
|
showErrorDetails,
|
|
@@ -33718,17 +33700,17 @@ ${queuedText}` : queuedText;
|
|
|
33718
33700
|
Date.now()
|
|
33719
33701
|
);
|
|
33720
33702
|
};
|
|
33721
|
-
coreEvents.on(
|
|
33722
|
-
coreEvents.on(
|
|
33703
|
+
coreEvents.on("user-feedback" /* UserFeedback */, handleUserFeedback);
|
|
33704
|
+
coreEvents.on("hook-system-message" /* HookSystemMessage */, handleHookSystemMessage);
|
|
33723
33705
|
coreEvents.drainBacklogs();
|
|
33724
33706
|
return () => {
|
|
33725
|
-
coreEvents.off(
|
|
33726
|
-
coreEvents.off(
|
|
33707
|
+
coreEvents.off("user-feedback" /* UserFeedback */, handleUserFeedback);
|
|
33708
|
+
coreEvents.off("hook-system-message" /* HookSystemMessage */, handleHookSystemMessage);
|
|
33727
33709
|
};
|
|
33728
33710
|
}, [historyManager]);
|
|
33729
33711
|
const nightly = props.version.includes("nightly");
|
|
33730
33712
|
const isAwaitingLoginRestart = authState === "awaiting_login_restart" /* AwaitingLoginRestart */;
|
|
33731
|
-
const loginRestartMessage = settings.merged.security.auth.selectedType ===
|
|
33713
|
+
const loginRestartMessage = settings.merged.security.auth.selectedType === "vertex-ai" /* USE_VERTEX_AI */ ? "Authenticating to Vertex AI in Cloud Shell requires a restart to apply project settings." : void 0;
|
|
33732
33714
|
const dialogsVisible = shouldShowIdePrompt || isFolderTrustDialogOpen || isPolicyUpdateDialogOpen || adminSettingsChanged || !!commandConfirmationRequest || !!authConsentRequest || !!permissionConfirmationRequest || !!customDialog || confirmUpdateExtensionRequests.length > 0 || !!loopDetectionConfirmationRequest || isThemeDialogOpen || isSettingsDialogOpen || isModelDialogOpen || isVoiceModelDialogOpen || isAgentConfigDialogOpen || isPermissionsDialogOpen || isAuthenticating || isAuthDialogOpen || isEditorDialogOpen || showPrivacyNotice || showIdeRestartPrompt || !!proQuotaRequest || !!validationRequest || !!overageMenuRequest || !!emptyWalletRequest || isSessionBrowserOpen || authState === "awaiting_api_key_input" /* AwaitingApiKeyInput */ || isAwaitingLoginRestart || !!newAgents;
|
|
33733
33715
|
const hasPendingToolConfirmation = (0, import_react121.useMemo)(
|
|
33734
33716
|
() => isToolAwaitingConfirmation(pendingHistoryItems),
|
|
@@ -33828,9 +33810,9 @@ ${queuedText}` : queuedText;
|
|
|
33828
33810
|
const handleMemoryChanged = (result) => {
|
|
33829
33811
|
setGeminiMdFileCount(result.fileCount);
|
|
33830
33812
|
};
|
|
33831
|
-
coreEvents.on(
|
|
33813
|
+
coreEvents.on("memory-changed" /* MemoryChanged */, handleMemoryChanged);
|
|
33832
33814
|
return () => {
|
|
33833
|
-
coreEvents.off(
|
|
33815
|
+
coreEvents.off("memory-changed" /* MemoryChanged */, handleMemoryChanged);
|
|
33834
33816
|
};
|
|
33835
33817
|
}, []);
|
|
33836
33818
|
(0, import_react121.useEffect)(() => {
|