@google/gemini-cli 0.36.0-preview.7 → 0.36.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-NYCY3Q2B.js → chunk-2OFO4ODK.js} +5 -5
- package/bundle/{chunk-2RCLDWUX.js → chunk-EAXTBDLN.js} +7380 -2768
- package/bundle/{chunk-QTVUHTZR.js → chunk-GHJNEZXJ.js} +7435 -2835
- package/bundle/{chunk-VA3P26WZ.js → chunk-QVTX2M5J.js} +5 -5
- package/bundle/{chunk-APAYS2LE.js → chunk-UNM3DGTG.js} +7380 -2768
- package/bundle/{chunk-EHC7O4TG.js → chunk-VB55KQW3.js} +10496 -5616
- package/bundle/{core-BHH4RB6L.js → core-6V2OYDRU.js} +1 -1
- package/bundle/{dist-YHAAIIZP.js → core-BMLL5RF4.js} +2 -2
- package/bundle/{devtoolsService-STAWBGOY.js → devtoolsService-QTW7GHQP.js} +2 -2
- package/bundle/{devtoolsService-GJALET3B.js → devtoolsService-UL6JE436.js} +4 -5
- package/bundle/{devtoolsService-4QGIZO5B.js → devtoolsService-ZKU2HLK2.js} +2 -2
- package/bundle/{dist-SWQPYLLV.js → dist-PYC2JXAJ.js} +1 -1
- package/bundle/docs/reference/configuration.md +1 -1
- package/bundle/gemini.js +6 -6
- package/bundle/{interactiveCli-MEBWWWE7.js → interactiveCli-A6HZ2TDO.js} +16 -15
- package/bundle/{interactiveCli-HYY2W6AF.js → interactiveCli-DWMSDCKV.js} +248 -264
- package/bundle/{interactiveCli-B6Y3UISW.js → interactiveCli-VLQHRXHU.js} +16 -15
- package/bundle/node_modules/@google/gemini-cli-devtools/package.json +1 -1
- package/bundle/{oauth2-provider-IGY3DL3D.js → oauth2-provider-5ENESIRQ.js} +1 -1
- package/bundle/{oauth2-provider-DLPX23GY.js → oauth2-provider-CAKFQRQV.js} +1 -1
- package/bundle/{oauth2-provider-MKUXMD5I.js → oauth2-provider-RVED6DAZ.js} +73 -39
- package/package.json +1 -1
- package/bundle/chunk-GDBDMLKR.js +0 -354180
- package/bundle/chunk-YTGZ6CSI.js +0 -93293
- package/bundle/devtoolsService-Q6LGZKTJ.js +0 -854
- package/bundle/dist-YOBWJF52.js +0 -1886
- package/bundle/interactiveCli-YJFA3P4G.js +0 -49298
- package/bundle/oauth2-provider-TIKPJAVU.js +0 -237
|
@@ -55,6 +55,7 @@ import {
|
|
|
55
55
|
SettingScope,
|
|
56
56
|
SettingsContext,
|
|
57
57
|
Static,
|
|
58
|
+
StyledLine,
|
|
58
59
|
TOGGLE_TYPES,
|
|
59
60
|
TOOL_STATUS,
|
|
60
61
|
TOOL_SUCCESS_RATE_HIGH,
|
|
@@ -181,14 +182,12 @@ import {
|
|
|
181
182
|
widestLineFromStyledChars,
|
|
182
183
|
wordBreakStyledChars,
|
|
183
184
|
wrapStyledChars
|
|
184
|
-
} from "./chunk-
|
|
185
|
+
} from "./chunk-EAXTBDLN.js";
|
|
185
186
|
import {
|
|
186
187
|
ApiKeyUpdatedEvent,
|
|
187
188
|
AsyncFzf,
|
|
188
189
|
AuthType,
|
|
189
|
-
CompressionStatus,
|
|
190
190
|
ConversationFinishedEvent,
|
|
191
|
-
CoreToolCallStatus,
|
|
192
191
|
CreditPurchaseClickEvent,
|
|
193
192
|
EDITOR_DISPLAY_NAMES,
|
|
194
193
|
EmptyWalletMenuShownEvent,
|
|
@@ -197,15 +196,10 @@ import {
|
|
|
197
196
|
FileSearchFactory,
|
|
198
197
|
FolderTrustDiscoveryService,
|
|
199
198
|
G1_UTM_CAMPAIGNS,
|
|
200
|
-
GeminiCliOperation,
|
|
201
|
-
GeminiEventType,
|
|
202
199
|
GitService,
|
|
203
200
|
IdeClient,
|
|
204
201
|
LlmRole,
|
|
205
202
|
Logger,
|
|
206
|
-
MCPDiscoveryState,
|
|
207
|
-
MCPServerStatus,
|
|
208
|
-
MessageSenderType,
|
|
209
203
|
ModelNotFoundError,
|
|
210
204
|
ModelSlashCommandEvent,
|
|
211
205
|
OverageMenuShownEvent,
|
|
@@ -214,8 +208,6 @@ import {
|
|
|
214
208
|
ProjectIdRequiredError,
|
|
215
209
|
ROOT_SCHEDULER_ID,
|
|
216
210
|
Scheduler,
|
|
217
|
-
SessionEndReason,
|
|
218
|
-
SessionStartSource,
|
|
219
211
|
ShellExecutionService,
|
|
220
212
|
SlashCommandStatus,
|
|
221
213
|
TerminalQuotaError,
|
|
@@ -223,7 +215,6 @@ import {
|
|
|
223
215
|
UserPromptEvent,
|
|
224
216
|
UserTierId,
|
|
225
217
|
ValidationRequiredError,
|
|
226
|
-
WarningPriority,
|
|
227
218
|
addMCPStatusChangeListener,
|
|
228
219
|
allowEditorTypeInSandbox,
|
|
229
220
|
buildG1Url,
|
|
@@ -300,12 +291,10 @@ import {
|
|
|
300
291
|
validatePlanContent,
|
|
301
292
|
validatePlanPath,
|
|
302
293
|
writeToStdout
|
|
303
|
-
} from "./chunk-
|
|
294
|
+
} from "./chunk-VB55KQW3.js";
|
|
304
295
|
import {
|
|
305
296
|
ACTIVATE_SKILL_TOOL_NAME,
|
|
306
|
-
ApprovalMode,
|
|
307
297
|
ChangeAuthRequestedError,
|
|
308
|
-
CoreEvent,
|
|
309
298
|
DEFAULT_GEMINI_FLASH_LITE_MODEL,
|
|
310
299
|
DEFAULT_GEMINI_FLASH_MODEL,
|
|
311
300
|
DEFAULT_GEMINI_MODEL,
|
|
@@ -313,19 +302,14 @@ import {
|
|
|
313
302
|
EDIT_TOOL_NAMES,
|
|
314
303
|
FinishReason,
|
|
315
304
|
GEMINI_DIR,
|
|
316
|
-
Kind,
|
|
317
|
-
MessageBusType,
|
|
318
305
|
PREVIEW_GEMINI_3_1_CUSTOM_TOOLS_MODEL,
|
|
319
306
|
PREVIEW_GEMINI_3_1_FLASH_LITE_MODEL,
|
|
320
307
|
PREVIEW_GEMINI_3_1_MODEL,
|
|
321
308
|
PREVIEW_GEMINI_FLASH_MODEL,
|
|
322
309
|
PREVIEW_GEMINI_MODEL,
|
|
323
310
|
PREVIEW_GEMINI_MODEL_AUTO,
|
|
324
|
-
QuestionType,
|
|
325
311
|
SHELL_TOOL_NAME,
|
|
326
312
|
Storage,
|
|
327
|
-
ToolConfirmationOutcome,
|
|
328
|
-
ToolErrorType,
|
|
329
313
|
UnauthorizedError,
|
|
330
314
|
VALID_GEMINI_MODELS,
|
|
331
315
|
coreEvents,
|
|
@@ -345,7 +329,7 @@ import {
|
|
|
345
329
|
safeJsonToMarkdown,
|
|
346
330
|
shortenPath,
|
|
347
331
|
tildeifyPath
|
|
348
|
-
} from "./chunk-
|
|
332
|
+
} from "./chunk-MYI75E6G.js";
|
|
349
333
|
import "./chunk-664ZODQF.js";
|
|
350
334
|
import "./chunk-RJTRUG2J.js";
|
|
351
335
|
import "./chunk-IUUIT4SU.js";
|
|
@@ -19858,13 +19842,13 @@ var import_jsx_runtime7 = __toESM(require_jsx_runtime(), 1);
|
|
|
19858
19842
|
var MIN_COLUMN_WIDTH = 5;
|
|
19859
19843
|
var COLUMN_PADDING = 2;
|
|
19860
19844
|
var TABLE_MARGIN = 2;
|
|
19861
|
-
var
|
|
19845
|
+
var parseMarkdownToStyledLine = (text, defaultColor) => {
|
|
19862
19846
|
const ansi = parseMarkdownToANSI(text, defaultColor);
|
|
19863
19847
|
return toStyledCharacters(ansi);
|
|
19864
19848
|
};
|
|
19865
|
-
var calculateWidths = (
|
|
19866
|
-
const contentWidth = styledCharsWidth(
|
|
19867
|
-
const words = wordBreakStyledChars(
|
|
19849
|
+
var calculateWidths = (styledLine) => {
|
|
19850
|
+
const contentWidth = styledCharsWidth(styledLine);
|
|
19851
|
+
const words = wordBreakStyledChars(styledLine);
|
|
19868
19852
|
const maxWordWidth = widestLineFromStyledChars(words);
|
|
19869
19853
|
return { contentWidth, maxWordWidth };
|
|
19870
19854
|
};
|
|
@@ -19875,7 +19859,7 @@ var TableRenderer = ({
|
|
|
19875
19859
|
}) => {
|
|
19876
19860
|
const styledHeaders = (0, import_react7.useMemo)(
|
|
19877
19861
|
() => headers.map(
|
|
19878
|
-
(header) =>
|
|
19862
|
+
(header) => parseMarkdownToStyledLine(
|
|
19879
19863
|
stripUnsafeCharacters(header),
|
|
19880
19864
|
theme.text.link
|
|
19881
19865
|
)
|
|
@@ -19885,7 +19869,7 @@ var TableRenderer = ({
|
|
|
19885
19869
|
const styledRows = (0, import_react7.useMemo)(
|
|
19886
19870
|
() => rows.map(
|
|
19887
19871
|
(row) => row.map(
|
|
19888
|
-
(cell) =>
|
|
19872
|
+
(cell) => parseMarkdownToStyledLine(
|
|
19889
19873
|
stripUnsafeCharacters(cell),
|
|
19890
19874
|
theme.text.primary
|
|
19891
19875
|
)
|
|
@@ -19900,11 +19884,11 @@ var TableRenderer = ({
|
|
|
19900
19884
|
);
|
|
19901
19885
|
const constraints = Array.from({ length: numColumns }).map(
|
|
19902
19886
|
(_, colIndex) => {
|
|
19903
|
-
const
|
|
19904
|
-
let { contentWidth: maxContentWidth, maxWordWidth } = calculateWidths(
|
|
19887
|
+
const headerStyledLine = styledHeaders[colIndex] || StyledLine.empty(0);
|
|
19888
|
+
let { contentWidth: maxContentWidth, maxWordWidth } = calculateWidths(headerStyledLine);
|
|
19905
19889
|
styledRows.forEach((row) => {
|
|
19906
|
-
const
|
|
19907
|
-
const { contentWidth: cellWidth, maxWordWidth: cellWordWidth } = calculateWidths(
|
|
19890
|
+
const cellStyledLine = row[colIndex] || StyledLine.empty(0);
|
|
19891
|
+
const { contentWidth: cellWidth, maxWordWidth: cellWordWidth } = calculateWidths(cellStyledLine);
|
|
19908
19892
|
maxContentWidth = Math.max(maxContentWidth, cellWidth);
|
|
19909
19893
|
maxWordWidth = Math.max(maxWordWidth, cellWordWidth);
|
|
19910
19894
|
});
|
|
@@ -19957,11 +19941,11 @@ var TableRenderer = ({
|
|
|
19957
19941
|
const wrapAndProcessRow = (row) => {
|
|
19958
19942
|
const rowResult = [];
|
|
19959
19943
|
for (let colIndex = 0; colIndex < numColumns; colIndex++) {
|
|
19960
|
-
const
|
|
19944
|
+
const cellStyledLine = row[colIndex] || StyledLine.empty(0);
|
|
19961
19945
|
const allocatedWidth = finalContentWidths[colIndex];
|
|
19962
19946
|
const contentWidth = Math.max(1, allocatedWidth);
|
|
19963
19947
|
const wrappedStyledLines = wrapStyledChars(
|
|
19964
|
-
|
|
19948
|
+
cellStyledLine,
|
|
19965
19949
|
contentWidth
|
|
19966
19950
|
);
|
|
19967
19951
|
const maxLineWidth = widestLineFromStyledChars(wrappedStyledLines);
|
|
@@ -22273,7 +22257,7 @@ function calculateShellMaxLines(options) {
|
|
|
22273
22257
|
if (isAlternateBuffer && isThisShellFocused2 && !constrainHeight) {
|
|
22274
22258
|
return maxLinesBasedOnHeight;
|
|
22275
22259
|
}
|
|
22276
|
-
const isExecuting = status ===
|
|
22260
|
+
const isExecuting = status === "executing" /* Executing */;
|
|
22277
22261
|
const shellMaxLinesLimit = isExecuting ? ACTIVE_SHELL_MAX_LINES - SHELL_CONTENT_OVERHEAD : COMPLETED_SHELL_MAX_LINES - SHELL_CONTENT_OVERHEAD;
|
|
22278
22262
|
return Math.min(maxLinesBasedOnHeight, shellMaxLinesLimit);
|
|
22279
22263
|
}
|
|
@@ -22306,10 +22290,10 @@ function isShellTool(name) {
|
|
|
22306
22290
|
return name === SHELL_COMMAND_NAME || name === SHELL_NAME || name === SHELL_TOOL_NAME;
|
|
22307
22291
|
}
|
|
22308
22292
|
function isThisShellFocusable(name, status, config) {
|
|
22309
|
-
return !!(isShellTool(name) && status ===
|
|
22293
|
+
return !!(isShellTool(name) && status === "executing" /* Executing */ && config?.getEnableInteractiveShell());
|
|
22310
22294
|
}
|
|
22311
22295
|
function isThisShellFocused(name, status, ptyId, activeShellPtyId, embeddedShellFocused) {
|
|
22312
|
-
return !!(isShellTool(name) && status ===
|
|
22296
|
+
return !!(isShellTool(name) && status === "executing" /* Executing */ && ptyId === activeShellPtyId && embeddedShellFocused);
|
|
22313
22297
|
}
|
|
22314
22298
|
function useFocusHint(isThisShellFocusable2, isThisShellFocused2, resultDisplay) {
|
|
22315
22299
|
const [userHasFocused, setUserHasFocused] = (0, import_react21.useState)(false);
|
|
@@ -22852,7 +22836,7 @@ var ToolMessage = ({
|
|
|
22852
22836
|
paddingX: 1,
|
|
22853
22837
|
flexDirection: "column",
|
|
22854
22838
|
children: [
|
|
22855
|
-
status ===
|
|
22839
|
+
status === "executing" /* Executing */ && progress !== void 0 && /* @__PURE__ */ (0, import_jsx_runtime25.jsx)(
|
|
22856
22840
|
McpProgressIndicator,
|
|
22857
22841
|
{
|
|
22858
22842
|
progress,
|
|
@@ -22869,8 +22853,8 @@ var ToolMessage = ({
|
|
|
22869
22853
|
terminalWidth,
|
|
22870
22854
|
renderOutputAsMarkdown,
|
|
22871
22855
|
hasFocus: isThisShellFocused2,
|
|
22872
|
-
maxLines: kind ===
|
|
22873
|
-
overflowDirection: kind ===
|
|
22856
|
+
maxLines: kind === "agent" /* Agent */ && availableTerminalHeight !== void 0 ? SUBAGENT_MAX_LINES : void 0,
|
|
22857
|
+
overflowDirection: kind === "agent" /* Agent */ ? "bottom" : "top"
|
|
22874
22858
|
}
|
|
22875
22859
|
),
|
|
22876
22860
|
isThisShellFocused2 && config && /* @__PURE__ */ (0, import_jsx_runtime25.jsx)(Box_default, { paddingLeft: STATUS_INDICATOR_WIDTH, marginTop: 1, children: /* @__PURE__ */ (0, import_jsx_runtime25.jsx)(
|
|
@@ -23595,7 +23579,7 @@ var ShellToolMessage = ({
|
|
|
23595
23579
|
maxLinesLimit: maxLines
|
|
23596
23580
|
});
|
|
23597
23581
|
import_react29.default.useEffect(() => {
|
|
23598
|
-
const isExecuting = status ===
|
|
23582
|
+
const isExecuting = status === "executing" /* Executing */;
|
|
23599
23583
|
if (isExecuting && ptyId) {
|
|
23600
23584
|
try {
|
|
23601
23585
|
const childWidth = terminalWidth - 4;
|
|
@@ -23928,14 +23912,14 @@ function getToolGroupBorderAppearance(item, activeShellPtyId, embeddedShellFocus
|
|
|
23928
23912
|
if (isTrackedToolCall(t)) {
|
|
23929
23913
|
return t.status !== "success" && t.status !== "error" && t.status !== "cancelled";
|
|
23930
23914
|
} else {
|
|
23931
|
-
return t.status !==
|
|
23915
|
+
return t.status !== "success" /* Success */ && t.status !== "error" /* Error */ && t.status !== "cancelled" /* Cancelled */;
|
|
23932
23916
|
}
|
|
23933
23917
|
});
|
|
23934
23918
|
const isEmbeddedShellFocused = toolsToInspect.some((t) => {
|
|
23935
23919
|
if (isTrackedToolCall(t)) {
|
|
23936
23920
|
return isShellTool(t.request.name) && t.status === "executing" && t.pid === activeShellPtyId && !!embeddedShellFocused;
|
|
23937
23921
|
} else {
|
|
23938
|
-
return isShellTool(t.name) && t.status ===
|
|
23922
|
+
return isShellTool(t.name) && t.status === "executing" /* Executing */ && t.ptyId === activeShellPtyId && !!embeddedShellFocused;
|
|
23939
23923
|
}
|
|
23940
23924
|
});
|
|
23941
23925
|
const isShellCommand = toolsToInspect.some((t) => {
|
|
@@ -23970,7 +23954,7 @@ var ToolGroupMessage = ({
|
|
|
23970
23954
|
const isLowErrorVerbosity = settings.merged.ui?.errorVerbosity !== "full";
|
|
23971
23955
|
const toolCalls = (0, import_react31.useMemo)(
|
|
23972
23956
|
() => allToolCalls.filter((t) => {
|
|
23973
|
-
if (isLowErrorVerbosity && t.status ===
|
|
23957
|
+
if (isLowErrorVerbosity && t.status === "error" /* Error */ && !t.isClientInitiated) {
|
|
23974
23958
|
return false;
|
|
23975
23959
|
}
|
|
23976
23960
|
return !shouldHideToolCall({
|
|
@@ -24019,15 +24003,15 @@ var ToolGroupMessage = ({
|
|
|
24019
24003
|
);
|
|
24020
24004
|
let countToolCallsWithResults = 0;
|
|
24021
24005
|
for (const tool of visibleToolCalls) {
|
|
24022
|
-
if (tool.kind !==
|
|
24006
|
+
if (tool.kind !== "agent" /* Agent */ && tool.resultDisplay !== void 0 && tool.resultDisplay !== "") {
|
|
24023
24007
|
countToolCallsWithResults++;
|
|
24024
24008
|
}
|
|
24025
24009
|
}
|
|
24026
|
-
const countOneLineToolCalls = visibleToolCalls.filter((t) => t.kind !==
|
|
24010
|
+
const countOneLineToolCalls = visibleToolCalls.filter((t) => t.kind !== "agent" /* Agent */).length - countToolCallsWithResults;
|
|
24027
24011
|
const groupedTools = (0, import_react31.useMemo)(() => {
|
|
24028
24012
|
const groups = [];
|
|
24029
24013
|
for (const tool of visibleToolCalls) {
|
|
24030
|
-
if (tool.kind ===
|
|
24014
|
+
if (tool.kind === "agent" /* Agent */) {
|
|
24031
24015
|
const lastGroup = groups[groups.length - 1];
|
|
24032
24016
|
if (Array.isArray(lastGroup)) {
|
|
24033
24017
|
lastGroup.push(tool);
|
|
@@ -24180,18 +24164,18 @@ function CompressionMessage({
|
|
|
24180
24164
|
return "Compressing chat history";
|
|
24181
24165
|
}
|
|
24182
24166
|
switch (compressionStatus) {
|
|
24183
|
-
case
|
|
24167
|
+
case 1 /* COMPRESSED */:
|
|
24184
24168
|
return `Chat history compressed from ${originalTokens} to ${newTokens} tokens.`;
|
|
24185
|
-
case
|
|
24169
|
+
case 2 /* COMPRESSION_FAILED_INFLATED_TOKEN_COUNT */:
|
|
24186
24170
|
if (originalTokens < 5e4) {
|
|
24187
24171
|
return "Compression was not beneficial for this history size.";
|
|
24188
24172
|
}
|
|
24189
24173
|
return "Chat history compression did not reduce size. This may indicate issues with the compression prompt.";
|
|
24190
|
-
case
|
|
24174
|
+
case 3 /* COMPRESSION_FAILED_TOKEN_COUNT_ERROR */:
|
|
24191
24175
|
return "Could not compress chat history due to a token counting error.";
|
|
24192
|
-
case
|
|
24176
|
+
case 4 /* COMPRESSION_FAILED_EMPTY_SUMMARY */:
|
|
24193
24177
|
return "Chat history compression failed: the model returned an empty summary.";
|
|
24194
|
-
case
|
|
24178
|
+
case 5 /* NOOP */:
|
|
24195
24179
|
return "Nothing to compress.";
|
|
24196
24180
|
default:
|
|
24197
24181
|
return "";
|
|
@@ -24937,7 +24921,7 @@ var StatsDisplay = ({
|
|
|
24937
24921
|
const config = useConfig();
|
|
24938
24922
|
const useGemini3_1 = config.getGemini31LaunchedSync?.() ?? false;
|
|
24939
24923
|
const useGemini3_1FlashLite = config.getGemini31FlashLiteLaunchedSync?.() ?? false;
|
|
24940
|
-
const useCustomToolModel = useGemini3_1 && config.getContentGeneratorConfig().authType ===
|
|
24924
|
+
const useCustomToolModel = useGemini3_1 && config.getContentGeneratorConfig().authType === "gemini-api-key" /* USE_GEMINI */;
|
|
24941
24925
|
const pooledRemaining = quotaStats?.remaining;
|
|
24942
24926
|
const pooledLimit = quotaStats?.limit;
|
|
24943
24927
|
const pooledResetTime = quotaStats?.resetTime;
|
|
@@ -25167,8 +25151,8 @@ var ModelStatsDisplay = ({
|
|
|
25167
25151
|
return validRoles.includes(role);
|
|
25168
25152
|
}).sort((a, b) => {
|
|
25169
25153
|
if (a === b) return 0;
|
|
25170
|
-
if (a ===
|
|
25171
|
-
if (b ===
|
|
25154
|
+
if (a === "main" /* MAIN */) return -1;
|
|
25155
|
+
if (b === "main" /* MAIN */) return 1;
|
|
25172
25156
|
return a.localeCompare(b);
|
|
25173
25157
|
});
|
|
25174
25158
|
const createRow = (metric, getValue, options = {}) => {
|
|
@@ -25952,7 +25936,7 @@ var McpStatus = ({
|
|
|
25952
25936
|
);
|
|
25953
25937
|
const originalStatus = serverStatus(serverName);
|
|
25954
25938
|
const hasCachedItems = serverTools.length > 0 || serverPrompts.length > 0 || serverResources.length > 0;
|
|
25955
|
-
const status = originalStatus ===
|
|
25939
|
+
const status = originalStatus === "disconnected" /* DISCONNECTED */ && hasCachedItems ? "connected" /* CONNECTED */ : originalStatus;
|
|
25956
25940
|
let statusIndicator = "";
|
|
25957
25941
|
let statusText = "";
|
|
25958
25942
|
let statusColor = theme.text.primary;
|
|
@@ -25964,17 +25948,17 @@ var McpStatus = ({
|
|
|
25964
25948
|
statusColor = theme.text.secondary;
|
|
25965
25949
|
} else {
|
|
25966
25950
|
switch (status) {
|
|
25967
|
-
case
|
|
25951
|
+
case "connected" /* CONNECTED */:
|
|
25968
25952
|
statusIndicator = "\u{1F7E2}";
|
|
25969
25953
|
statusText = "Ready";
|
|
25970
25954
|
statusColor = theme.status.success;
|
|
25971
25955
|
break;
|
|
25972
|
-
case
|
|
25956
|
+
case "connecting" /* CONNECTING */:
|
|
25973
25957
|
statusIndicator = "\u{1F504}";
|
|
25974
25958
|
statusText = "Starting... (first startup may take longer)";
|
|
25975
25959
|
statusColor = theme.status.warning;
|
|
25976
25960
|
break;
|
|
25977
|
-
case
|
|
25961
|
+
case "disconnected" /* DISCONNECTED */:
|
|
25978
25962
|
default:
|
|
25979
25963
|
statusIndicator = "\u{1F534}";
|
|
25980
25964
|
statusText = "Disconnected";
|
|
@@ -26022,12 +26006,12 @@ var McpStatus = ({
|
|
|
26022
26006
|
/* @__PURE__ */ (0, import_jsx_runtime51.jsxs)(Text, { children: [
|
|
26023
26007
|
" - ",
|
|
26024
26008
|
statusText,
|
|
26025
|
-
status ===
|
|
26009
|
+
status === "connected" /* CONNECTED */ && parts.length > 0 && ` (${parts.join(", ")})`
|
|
26026
26010
|
] }),
|
|
26027
26011
|
authStatusNode
|
|
26028
26012
|
] }),
|
|
26029
|
-
status ===
|
|
26030
|
-
status ===
|
|
26013
|
+
status === "connecting" /* CONNECTING */ && /* @__PURE__ */ (0, import_jsx_runtime51.jsx)(Text, { children: " (tools and prompts will appear when ready)" }),
|
|
26014
|
+
status === "disconnected" /* DISCONNECTED */ && toolCount > 0 && /* @__PURE__ */ (0, import_jsx_runtime51.jsxs)(Text, { children: [
|
|
26031
26015
|
" (",
|
|
26032
26016
|
toolCount,
|
|
26033
26017
|
" tools cached)"
|
|
@@ -26505,7 +26489,7 @@ var Notifications = () => {
|
|
|
26505
26489
|
if (dismissed) return [];
|
|
26506
26490
|
const counts = persistentState.get("startupWarningCounts") || {};
|
|
26507
26491
|
return startupWarnings.filter((w) => {
|
|
26508
|
-
if (w.priority ===
|
|
26492
|
+
if (w.priority === "low" /* Low */) {
|
|
26509
26493
|
const count = counts[w.id] || 0;
|
|
26510
26494
|
return count < MAX_STARTUP_WARNING_SHOW_COUNT;
|
|
26511
26495
|
}
|
|
@@ -26518,7 +26502,7 @@ var Notifications = () => {
|
|
|
26518
26502
|
const counts = { ...persistentState.get("startupWarningCounts") || {} };
|
|
26519
26503
|
let changed = false;
|
|
26520
26504
|
visibleWarnings.forEach((w) => {
|
|
26521
|
-
if (w.priority ===
|
|
26505
|
+
if (w.priority === "low" /* Low */) {
|
|
26522
26506
|
counts[w.id] = (counts[w.id] || 0) + 1;
|
|
26523
26507
|
changed = true;
|
|
26524
26508
|
}
|
|
@@ -26623,7 +26607,7 @@ var UserIdentity = ({ config }) => {
|
|
|
26623
26607
|
}
|
|
26624
26608
|
return /* @__PURE__ */ (0, import_jsx_runtime60.jsxs)(Box_default, { flexDirection: "column", children: [
|
|
26625
26609
|
/* @__PURE__ */ (0, import_jsx_runtime60.jsxs)(Box_default, { children: [
|
|
26626
|
-
/* @__PURE__ */ (0, import_jsx_runtime60.jsx)(Text, { color: theme.text.primary, wrap: "truncate-end", children: authType ===
|
|
26610
|
+
/* @__PURE__ */ (0, import_jsx_runtime60.jsx)(Text, { color: theme.text.primary, wrap: "truncate-end", children: authType === "oauth-personal" /* LOGIN_WITH_GOOGLE */ ? /* @__PURE__ */ (0, import_jsx_runtime60.jsxs)(Text, { children: [
|
|
26627
26611
|
/* @__PURE__ */ (0, import_jsx_runtime60.jsxs)(Text, { bold: true, children: [
|
|
26628
26612
|
"Signed in with Google",
|
|
26629
26613
|
email ? ":" : ""
|
|
@@ -26850,7 +26834,7 @@ function isToolExecuting(pendingHistoryItems) {
|
|
|
26850
26834
|
return pendingHistoryItems.some((item) => {
|
|
26851
26835
|
if (item && item.type === "tool_group") {
|
|
26852
26836
|
return item.tools.some(
|
|
26853
|
-
(tool) =>
|
|
26837
|
+
(tool) => "executing" /* Executing */ === tool.status
|
|
26854
26838
|
);
|
|
26855
26839
|
}
|
|
26856
26840
|
return false;
|
|
@@ -26859,7 +26843,7 @@ function isToolExecuting(pendingHistoryItems) {
|
|
|
26859
26843
|
function isToolAwaitingConfirmation(pendingHistoryItems) {
|
|
26860
26844
|
return pendingHistoryItems.filter((item) => item.type === "tool_group").some(
|
|
26861
26845
|
(item) => item.tools.some(
|
|
26862
|
-
(tool) =>
|
|
26846
|
+
(tool) => "awaiting_approval" /* AwaitingApproval */ === tool.status
|
|
26863
26847
|
)
|
|
26864
26848
|
);
|
|
26865
26849
|
}
|
|
@@ -26871,7 +26855,7 @@ function getAllToolCalls(historyItems) {
|
|
|
26871
26855
|
function getConfirmingToolState(pendingHistoryItems) {
|
|
26872
26856
|
const allPendingTools = getAllToolCalls(pendingHistoryItems);
|
|
26873
26857
|
const confirmingTools = allPendingTools.filter(
|
|
26874
|
-
(tool) => tool.status ===
|
|
26858
|
+
(tool) => tool.status === "awaiting_approval" /* AwaitingApproval */
|
|
26875
26859
|
);
|
|
26876
26860
|
if (confirmingTools.length === 0) {
|
|
26877
26861
|
return null;
|
|
@@ -26950,14 +26934,14 @@ var ToolActionsProvider = (props) => {
|
|
|
26950
26934
|
}
|
|
26951
26935
|
const details = tool.confirmationDetails;
|
|
26952
26936
|
if (details?.type === "edit" && isDiffingEnabled && "filePath" in details) {
|
|
26953
|
-
const cliOutcome = outcome ===
|
|
26937
|
+
const cliOutcome = outcome === "cancel" /* Cancel */ ? "rejected" : "accepted";
|
|
26954
26938
|
await ideClient?.resolveDiffFromCli(details.filePath, cliOutcome);
|
|
26955
26939
|
}
|
|
26956
26940
|
if (tool.correlationId) {
|
|
26957
26941
|
await config.getMessageBus().publish({
|
|
26958
|
-
type:
|
|
26942
|
+
type: "tool-confirmation-response" /* TOOL_CONFIRMATION_RESPONSE */,
|
|
26959
26943
|
correlationId: tool.correlationId,
|
|
26960
|
-
confirmed: outcome !==
|
|
26944
|
+
confirmed: outcome !== "cancel" /* Cancel */,
|
|
26961
26945
|
requiresUserConfirmation: false,
|
|
26962
26946
|
outcome,
|
|
26963
26947
|
payload
|
|
@@ -26976,7 +26960,7 @@ var ToolActionsProvider = (props) => {
|
|
|
26976
26960
|
);
|
|
26977
26961
|
const cancel = (0, import_react43.useCallback)(
|
|
26978
26962
|
async (callId) => {
|
|
26979
|
-
await confirm(callId,
|
|
26963
|
+
await confirm(callId, "cancel" /* Cancel */);
|
|
26980
26964
|
},
|
|
26981
26965
|
[confirm]
|
|
26982
26966
|
);
|
|
@@ -28243,7 +28227,7 @@ var ExitPlanModeDialog = ({
|
|
|
28243
28227
|
{
|
|
28244
28228
|
questions: [
|
|
28245
28229
|
{
|
|
28246
|
-
type:
|
|
28230
|
+
type: "choice" /* CHOICE */,
|
|
28247
28231
|
header: "Approval",
|
|
28248
28232
|
question: planContent,
|
|
28249
28233
|
options: [
|
|
@@ -28264,9 +28248,9 @@ var ExitPlanModeDialog = ({
|
|
|
28264
28248
|
onSubmit: (answers) => {
|
|
28265
28249
|
const answer = answers["0"];
|
|
28266
28250
|
if (answer === "Yes, automatically accept edits" /* Auto */) {
|
|
28267
|
-
onApprove(
|
|
28251
|
+
onApprove("autoEdit" /* AUTO_EDIT */);
|
|
28268
28252
|
} else if (answer === "Yes, manually accept edits" /* Manual */) {
|
|
28269
|
-
onApprove(
|
|
28253
|
+
onApprove("default" /* DEFAULT */);
|
|
28270
28254
|
} else if (answer) {
|
|
28271
28255
|
onFeedback(answer);
|
|
28272
28256
|
}
|
|
@@ -28472,7 +28456,7 @@ ${deceptiveUrlWarnings.map(
|
|
|
28472
28456
|
);
|
|
28473
28457
|
(0, import_react48.useEffect)(() => {
|
|
28474
28458
|
if (isCancelling) {
|
|
28475
|
-
handleConfirm(
|
|
28459
|
+
handleConfirm("cancel" /* Cancel */);
|
|
28476
28460
|
}
|
|
28477
28461
|
}, [isCancelling, handleConfirm]);
|
|
28478
28462
|
const handleSelect = (0, import_react48.useCallback)(
|
|
@@ -28485,19 +28469,19 @@ ${deceptiveUrlWarnings.map(
|
|
|
28485
28469
|
if (!confirmationDetails.isModifying) {
|
|
28486
28470
|
options2.push({
|
|
28487
28471
|
label: "Allow once",
|
|
28488
|
-
value:
|
|
28472
|
+
value: "proceed_once" /* ProceedOnce */,
|
|
28489
28473
|
key: "Allow once"
|
|
28490
28474
|
});
|
|
28491
28475
|
if (isTrustedFolder) {
|
|
28492
28476
|
options2.push({
|
|
28493
28477
|
label: "Allow for this session",
|
|
28494
|
-
value:
|
|
28478
|
+
value: "proceed_always" /* ProceedAlways */,
|
|
28495
28479
|
key: "Allow for this session"
|
|
28496
28480
|
});
|
|
28497
28481
|
if (allowPermanentApproval) {
|
|
28498
28482
|
options2.push({
|
|
28499
28483
|
label: "Allow for this file in all future sessions",
|
|
28500
|
-
value:
|
|
28484
|
+
value: "proceed_always_and_save" /* ProceedAlwaysAndSave */,
|
|
28501
28485
|
key: "Allow for this file in all future sessions"
|
|
28502
28486
|
});
|
|
28503
28487
|
}
|
|
@@ -28505,119 +28489,119 @@ ${deceptiveUrlWarnings.map(
|
|
|
28505
28489
|
if (!config.getIdeMode() || !isDiffingEnabled) {
|
|
28506
28490
|
options2.push({
|
|
28507
28491
|
label: "Modify with external editor",
|
|
28508
|
-
value:
|
|
28492
|
+
value: "modify_with_editor" /* ModifyWithEditor */,
|
|
28509
28493
|
key: "Modify with external editor"
|
|
28510
28494
|
});
|
|
28511
28495
|
}
|
|
28512
28496
|
options2.push({
|
|
28513
28497
|
label: "No, suggest changes (esc)",
|
|
28514
|
-
value:
|
|
28498
|
+
value: "cancel" /* Cancel */,
|
|
28515
28499
|
key: "No, suggest changes (esc)"
|
|
28516
28500
|
});
|
|
28517
28501
|
}
|
|
28518
28502
|
} else if (confirmationDetails.type === "sandbox_expansion") {
|
|
28519
28503
|
options2.push({
|
|
28520
28504
|
label: "Allow once",
|
|
28521
|
-
value:
|
|
28505
|
+
value: "proceed_once" /* ProceedOnce */,
|
|
28522
28506
|
key: "Allow once"
|
|
28523
28507
|
});
|
|
28524
28508
|
if (isTrustedFolder) {
|
|
28525
28509
|
options2.push({
|
|
28526
28510
|
label: "Allow for this session",
|
|
28527
|
-
value:
|
|
28511
|
+
value: "proceed_always" /* ProceedAlways */,
|
|
28528
28512
|
key: "Allow for this session"
|
|
28529
28513
|
});
|
|
28530
28514
|
if (allowPermanentApproval) {
|
|
28531
28515
|
options2.push({
|
|
28532
28516
|
label: "Allow for all future sessions",
|
|
28533
|
-
value:
|
|
28517
|
+
value: "proceed_always_and_save" /* ProceedAlwaysAndSave */,
|
|
28534
28518
|
key: "Allow for all future sessions"
|
|
28535
28519
|
});
|
|
28536
28520
|
}
|
|
28537
28521
|
}
|
|
28538
28522
|
options2.push({
|
|
28539
28523
|
label: "No, suggest changes (esc)",
|
|
28540
|
-
value:
|
|
28524
|
+
value: "cancel" /* Cancel */,
|
|
28541
28525
|
key: "No, suggest changes (esc)"
|
|
28542
28526
|
});
|
|
28543
28527
|
} else if (confirmationDetails.type === "exec") {
|
|
28544
28528
|
options2.push({
|
|
28545
28529
|
label: "Allow once",
|
|
28546
|
-
value:
|
|
28530
|
+
value: "proceed_once" /* ProceedOnce */,
|
|
28547
28531
|
key: "Allow once"
|
|
28548
28532
|
});
|
|
28549
28533
|
if (isTrustedFolder) {
|
|
28550
28534
|
options2.push({
|
|
28551
28535
|
label: `Allow for this session`,
|
|
28552
|
-
value:
|
|
28536
|
+
value: "proceed_always" /* ProceedAlways */,
|
|
28553
28537
|
key: `Allow for this session`
|
|
28554
28538
|
});
|
|
28555
28539
|
if (allowPermanentApproval) {
|
|
28556
28540
|
options2.push({
|
|
28557
28541
|
label: `Allow this command for all future sessions`,
|
|
28558
|
-
value:
|
|
28542
|
+
value: "proceed_always_and_save" /* ProceedAlwaysAndSave */,
|
|
28559
28543
|
key: `Allow for all future sessions`
|
|
28560
28544
|
});
|
|
28561
28545
|
}
|
|
28562
28546
|
}
|
|
28563
28547
|
options2.push({
|
|
28564
28548
|
label: "No, suggest changes (esc)",
|
|
28565
|
-
value:
|
|
28549
|
+
value: "cancel" /* Cancel */,
|
|
28566
28550
|
key: "No, suggest changes (esc)"
|
|
28567
28551
|
});
|
|
28568
28552
|
} else if (confirmationDetails.type === "info") {
|
|
28569
28553
|
options2.push({
|
|
28570
28554
|
label: "Allow once",
|
|
28571
|
-
value:
|
|
28555
|
+
value: "proceed_once" /* ProceedOnce */,
|
|
28572
28556
|
key: "Allow once"
|
|
28573
28557
|
});
|
|
28574
28558
|
if (isTrustedFolder) {
|
|
28575
28559
|
options2.push({
|
|
28576
28560
|
label: "Allow for this session",
|
|
28577
|
-
value:
|
|
28561
|
+
value: "proceed_always" /* ProceedAlways */,
|
|
28578
28562
|
key: "Allow for this session"
|
|
28579
28563
|
});
|
|
28580
28564
|
if (allowPermanentApproval) {
|
|
28581
28565
|
options2.push({
|
|
28582
28566
|
label: "Allow for all future sessions",
|
|
28583
|
-
value:
|
|
28567
|
+
value: "proceed_always_and_save" /* ProceedAlwaysAndSave */,
|
|
28584
28568
|
key: "Allow for all future sessions"
|
|
28585
28569
|
});
|
|
28586
28570
|
}
|
|
28587
28571
|
}
|
|
28588
28572
|
options2.push({
|
|
28589
28573
|
label: "No, suggest changes (esc)",
|
|
28590
|
-
value:
|
|
28574
|
+
value: "cancel" /* Cancel */,
|
|
28591
28575
|
key: "No, suggest changes (esc)"
|
|
28592
28576
|
});
|
|
28593
28577
|
} else if (confirmationDetails.type === "mcp") {
|
|
28594
28578
|
options2.push({
|
|
28595
28579
|
label: "Allow once",
|
|
28596
|
-
value:
|
|
28580
|
+
value: "proceed_once" /* ProceedOnce */,
|
|
28597
28581
|
key: "Allow once"
|
|
28598
28582
|
});
|
|
28599
28583
|
if (isTrustedFolder) {
|
|
28600
28584
|
options2.push({
|
|
28601
28585
|
label: "Allow tool for this session",
|
|
28602
|
-
value:
|
|
28586
|
+
value: "proceed_always_tool" /* ProceedAlwaysTool */,
|
|
28603
28587
|
key: "Allow tool for this session"
|
|
28604
28588
|
});
|
|
28605
28589
|
options2.push({
|
|
28606
28590
|
label: "Allow all server tools for this session",
|
|
28607
|
-
value:
|
|
28591
|
+
value: "proceed_always_server" /* ProceedAlwaysServer */,
|
|
28608
28592
|
key: "Allow all server tools for this session"
|
|
28609
28593
|
});
|
|
28610
28594
|
if (allowPermanentApproval) {
|
|
28611
28595
|
options2.push({
|
|
28612
28596
|
label: "Allow tool for all future sessions",
|
|
28613
|
-
value:
|
|
28597
|
+
value: "proceed_always_and_save" /* ProceedAlwaysAndSave */,
|
|
28614
28598
|
key: "Allow tool for all future sessions"
|
|
28615
28599
|
});
|
|
28616
28600
|
}
|
|
28617
28601
|
}
|
|
28618
28602
|
options2.push({
|
|
28619
28603
|
label: "No, suggest changes (esc)",
|
|
28620
|
-
value:
|
|
28604
|
+
value: "cancel" /* Cancel */,
|
|
28621
28605
|
key: "No, suggest changes (esc)"
|
|
28622
28606
|
});
|
|
28623
28607
|
}
|
|
@@ -28662,7 +28646,7 @@ ${deceptiveUrlWarnings.map(
|
|
|
28662
28646
|
const isSafeToPersist = confirmationDetails.type === "info" || confirmationDetails.type === "edit" || confirmationDetails.type === "mcp";
|
|
28663
28647
|
if (isSafeToPersist && settings.merged.security.autoAddToPolicyByDefault) {
|
|
28664
28648
|
const alwaysAndSaveIndex = options2.findIndex(
|
|
28665
|
-
(o) => o.value ===
|
|
28649
|
+
(o) => o.value === "proceed_always_and_save" /* ProceedAlwaysAndSave */
|
|
28666
28650
|
);
|
|
28667
28651
|
if (alwaysAndSaveIndex !== -1) {
|
|
28668
28652
|
initialIndex2 = alwaysAndSaveIndex;
|
|
@@ -28678,10 +28662,10 @@ ${deceptiveUrlWarnings.map(
|
|
|
28678
28662
|
{
|
|
28679
28663
|
questions: confirmationDetails.questions,
|
|
28680
28664
|
onSubmit: (answers) => {
|
|
28681
|
-
handleConfirm(
|
|
28665
|
+
handleConfirm("proceed_once" /* ProceedOnce */, { answers });
|
|
28682
28666
|
},
|
|
28683
28667
|
onCancel: () => {
|
|
28684
|
-
handleConfirm(
|
|
28668
|
+
handleConfirm("cancel" /* Cancel */);
|
|
28685
28669
|
},
|
|
28686
28670
|
width: terminalWidth,
|
|
28687
28671
|
availableHeight: availableBodyContentHeight()
|
|
@@ -28702,19 +28686,19 @@ ${deceptiveUrlWarnings.map(
|
|
|
28702
28686
|
planPath: confirmationDetails.planPath,
|
|
28703
28687
|
getPreferredEditor,
|
|
28704
28688
|
onApprove: (approvalMode) => {
|
|
28705
|
-
handleConfirm(
|
|
28689
|
+
handleConfirm("proceed_once" /* ProceedOnce */, {
|
|
28706
28690
|
approved: true,
|
|
28707
28691
|
approvalMode
|
|
28708
28692
|
});
|
|
28709
28693
|
},
|
|
28710
28694
|
onFeedback: (feedback) => {
|
|
28711
|
-
handleConfirm(
|
|
28695
|
+
handleConfirm("proceed_once" /* ProceedOnce */, {
|
|
28712
28696
|
approved: false,
|
|
28713
28697
|
feedback
|
|
28714
28698
|
});
|
|
28715
28699
|
},
|
|
28716
28700
|
onCancel: () => {
|
|
28717
|
-
handleConfirm(
|
|
28701
|
+
handleConfirm("cancel" /* Cancel */);
|
|
28718
28702
|
},
|
|
28719
28703
|
width: terminalWidth,
|
|
28720
28704
|
availableHeight: availableBodyContentHeight()
|
|
@@ -28791,7 +28775,7 @@ ${deceptiveUrlWarnings.map(
|
|
|
28791
28775
|
);
|
|
28792
28776
|
let bodyContentHeight = availableBodyContentHeight();
|
|
28793
28777
|
let warnings = null;
|
|
28794
|
-
const isAutoEdit = config.getApprovalMode() ===
|
|
28778
|
+
const isAutoEdit = config.getApprovalMode() === "autoEdit" /* AUTO_EDIT */;
|
|
28795
28779
|
if (containsRedirection && !isAutoEdit) {
|
|
28796
28780
|
const safeWidth = Math.max(terminalWidth, 1);
|
|
28797
28781
|
const noteLength = REDIRECTION_WARNING_NOTE_LABEL.length + REDIRECTION_WARNING_NOTE_TEXT.length;
|
|
@@ -30971,7 +30955,7 @@ function validateAuthMethodWithSettings(authType, settings) {
|
|
|
30971
30955
|
if (settings.merged.security.auth.useExternal) {
|
|
30972
30956
|
return null;
|
|
30973
30957
|
}
|
|
30974
|
-
if (authType ===
|
|
30958
|
+
if (authType === "gemini-api-key" /* USE_GEMINI */) {
|
|
30975
30959
|
return null;
|
|
30976
30960
|
}
|
|
30977
30961
|
return validateAuthMethod(authType);
|
|
@@ -31023,7 +31007,7 @@ var useAuthCommand = (settings, config, initialAuthError = null, initialAccountS
|
|
|
31023
31007
|
}
|
|
31024
31008
|
return;
|
|
31025
31009
|
}
|
|
31026
|
-
if (authType ===
|
|
31010
|
+
if (authType === "gemini-api-key" /* USE_GEMINI */) {
|
|
31027
31011
|
const key = await reloadApiKey();
|
|
31028
31012
|
if (!key) {
|
|
31029
31013
|
setAuthState("awaiting_api_key_input" /* AwaitingApiKeyInput */);
|
|
@@ -31098,31 +31082,31 @@ function AuthDialog({
|
|
|
31098
31082
|
let items = [
|
|
31099
31083
|
{
|
|
31100
31084
|
label: "Sign in with Google",
|
|
31101
|
-
value:
|
|
31102
|
-
key:
|
|
31085
|
+
value: "oauth-personal" /* LOGIN_WITH_GOOGLE */,
|
|
31086
|
+
key: "oauth-personal" /* LOGIN_WITH_GOOGLE */
|
|
31103
31087
|
},
|
|
31104
31088
|
...process.env["CLOUD_SHELL"] === "true" ? [
|
|
31105
31089
|
{
|
|
31106
31090
|
label: "Use Cloud Shell user credentials",
|
|
31107
|
-
value:
|
|
31108
|
-
key:
|
|
31091
|
+
value: "compute-default-credentials" /* COMPUTE_ADC */,
|
|
31092
|
+
key: "compute-default-credentials" /* COMPUTE_ADC */
|
|
31109
31093
|
}
|
|
31110
31094
|
] : process.env["GEMINI_CLI_USE_COMPUTE_ADC"] === "true" ? [
|
|
31111
31095
|
{
|
|
31112
31096
|
label: "Use metadata server application default credentials",
|
|
31113
|
-
value:
|
|
31114
|
-
key:
|
|
31097
|
+
value: "compute-default-credentials" /* COMPUTE_ADC */,
|
|
31098
|
+
key: "compute-default-credentials" /* COMPUTE_ADC */
|
|
31115
31099
|
}
|
|
31116
31100
|
] : [],
|
|
31117
31101
|
{
|
|
31118
31102
|
label: "Use Gemini API Key",
|
|
31119
|
-
value:
|
|
31120
|
-
key:
|
|
31103
|
+
value: "gemini-api-key" /* USE_GEMINI */,
|
|
31104
|
+
key: "gemini-api-key" /* USE_GEMINI */
|
|
31121
31105
|
},
|
|
31122
31106
|
{
|
|
31123
31107
|
label: "Vertex AI",
|
|
31124
|
-
value:
|
|
31125
|
-
key:
|
|
31108
|
+
value: "vertex-ai" /* USE_VERTEX_AI */,
|
|
31109
|
+
key: "vertex-ai" /* USE_VERTEX_AI */
|
|
31126
31110
|
}
|
|
31127
31111
|
];
|
|
31128
31112
|
if (settings.merged.security.auth.enforcedType) {
|
|
@@ -31144,9 +31128,9 @@ function AuthDialog({
|
|
|
31144
31128
|
return item.value === defaultAuthType;
|
|
31145
31129
|
}
|
|
31146
31130
|
if (process.env["GEMINI_API_KEY"]) {
|
|
31147
|
-
return item.value ===
|
|
31131
|
+
return item.value === "gemini-api-key" /* USE_GEMINI */;
|
|
31148
31132
|
}
|
|
31149
|
-
return item.value ===
|
|
31133
|
+
return item.value === "oauth-personal" /* LOGIN_WITH_GOOGLE */;
|
|
31150
31134
|
});
|
|
31151
31135
|
if (settings.merged.security.auth.enforcedType) {
|
|
31152
31136
|
initialAuthIndex = 0;
|
|
@@ -31157,19 +31141,19 @@ function AuthDialog({
|
|
|
31157
31141
|
return;
|
|
31158
31142
|
}
|
|
31159
31143
|
if (authType) {
|
|
31160
|
-
if (authType ===
|
|
31144
|
+
if (authType === "oauth-personal" /* LOGIN_WITH_GOOGLE */) {
|
|
31161
31145
|
setAuthContext({ requiresRestart: true });
|
|
31162
31146
|
} else {
|
|
31163
31147
|
setAuthContext({});
|
|
31164
31148
|
}
|
|
31165
31149
|
await clearCachedCredentialFile();
|
|
31166
31150
|
settings.setValue(scope, "security.auth.selectedType", authType);
|
|
31167
|
-
if (authType ===
|
|
31151
|
+
if (authType === "oauth-personal" /* LOGIN_WITH_GOOGLE */ && config.isBrowserLaunchSuppressed()) {
|
|
31168
31152
|
setExiting(true);
|
|
31169
31153
|
setTimeout(relaunchApp, 100);
|
|
31170
31154
|
return;
|
|
31171
31155
|
}
|
|
31172
|
-
if (authType ===
|
|
31156
|
+
if (authType === "gemini-api-key" /* USE_GEMINI */) {
|
|
31173
31157
|
setAuthState("awaiting_api_key_input" /* AwaitingApiKeyInput */);
|
|
31174
31158
|
return;
|
|
31175
31159
|
}
|
|
@@ -31919,11 +31903,11 @@ var PrivacyNoticeText = ({
|
|
|
31919
31903
|
}) => {
|
|
31920
31904
|
const authType = config.getContentGeneratorConfig()?.authType;
|
|
31921
31905
|
switch (authType) {
|
|
31922
|
-
case
|
|
31906
|
+
case "gemini-api-key" /* USE_GEMINI */:
|
|
31923
31907
|
return /* @__PURE__ */ (0, import_jsx_runtime86.jsx)(GeminiPrivacyNotice, { onExit });
|
|
31924
|
-
case
|
|
31908
|
+
case "vertex-ai" /* USE_VERTEX_AI */:
|
|
31925
31909
|
return /* @__PURE__ */ (0, import_jsx_runtime86.jsx)(CloudPaidPrivacyNotice, { onExit });
|
|
31926
|
-
case
|
|
31910
|
+
case "oauth-personal" /* LOGIN_WITH_GOOGLE */:
|
|
31927
31911
|
default:
|
|
31928
31912
|
return /* @__PURE__ */ (0, import_jsx_runtime86.jsx)(CloudFreePrivacyNotice, { config, onExit });
|
|
31929
31913
|
}
|
|
@@ -31964,7 +31948,7 @@ function ProQuotaDialog({
|
|
|
31964
31948
|
value: "retry_always",
|
|
31965
31949
|
key: "retry_always"
|
|
31966
31950
|
},
|
|
31967
|
-
...authType ===
|
|
31951
|
+
...authType === "oauth-personal" /* LOGIN_WITH_GOOGLE */ && !isUltra ? [
|
|
31968
31952
|
{
|
|
31969
31953
|
label: "Upgrade for higher limits",
|
|
31970
31954
|
value: "upgrade",
|
|
@@ -32968,7 +32952,7 @@ function ModelDialog({ onClose }) {
|
|
|
32968
32952
|
const useGemini31 = config?.getGemini31LaunchedSync?.() ?? false;
|
|
32969
32953
|
const useGemini31FlashLite = config?.getGemini31FlashLiteLaunchedSync?.() ?? false;
|
|
32970
32954
|
const selectedAuthType = settings.merged.security.auth.selectedType;
|
|
32971
|
-
const useCustomToolModel = useGemini31 && selectedAuthType ===
|
|
32955
|
+
const useCustomToolModel = useGemini31 && selectedAuthType === "gemini-api-key" /* USE_GEMINI */;
|
|
32972
32956
|
const manualModelSelected = (0, import_react65.useMemo)(() => {
|
|
32973
32957
|
if (config?.getExperimentalDynamicModelConfiguration?.() === true && config.modelConfigService) {
|
|
32974
32958
|
const def = config.modelConfigService.getModelDefinition(preferredModel);
|
|
@@ -34698,22 +34682,22 @@ var ApprovalModeIndicator = ({
|
|
|
34698
34682
|
const cycleHint = formatCommand("app.cycleApprovalMode" /* CYCLE_APPROVAL_MODE */);
|
|
34699
34683
|
const yoloHint = formatCommand("app.toggleYolo" /* TOGGLE_YOLO */);
|
|
34700
34684
|
switch (approvalMode) {
|
|
34701
|
-
case
|
|
34685
|
+
case "autoEdit" /* AUTO_EDIT */:
|
|
34702
34686
|
textColor = theme.status.warning;
|
|
34703
34687
|
textContent = "auto-accept edits";
|
|
34704
34688
|
subText = allowPlanMode ? `${cycleHint} to plan` : `${cycleHint} to manual`;
|
|
34705
34689
|
break;
|
|
34706
|
-
case
|
|
34690
|
+
case "plan" /* PLAN */:
|
|
34707
34691
|
textColor = theme.status.success;
|
|
34708
34692
|
textContent = "plan";
|
|
34709
34693
|
subText = `${cycleHint} to manual`;
|
|
34710
34694
|
break;
|
|
34711
|
-
case
|
|
34695
|
+
case "yolo" /* YOLO */:
|
|
34712
34696
|
textColor = theme.status.error;
|
|
34713
34697
|
textContent = "YOLO";
|
|
34714
34698
|
subText = yoloHint;
|
|
34715
34699
|
break;
|
|
34716
|
-
case
|
|
34700
|
+
case "default" /* DEFAULT */:
|
|
34717
34701
|
default:
|
|
34718
34702
|
textColor = theme.text.accent;
|
|
34719
34703
|
textContent = "";
|
|
@@ -34756,10 +34740,10 @@ function initializeConsoleStore() {
|
|
|
34756
34740
|
globalConsoleMessages = [];
|
|
34757
34741
|
globalErrorCount = 0;
|
|
34758
34742
|
notifyListeners();
|
|
34759
|
-
coreEvents.off(
|
|
34760
|
-
coreEvents.off(
|
|
34761
|
-
coreEvents.on(
|
|
34762
|
-
coreEvents.on(
|
|
34743
|
+
coreEvents.off("console-log" /* ConsoleLog */, handleConsoleLog);
|
|
34744
|
+
coreEvents.off("output" /* Output */, handleOutput);
|
|
34745
|
+
coreEvents.on("console-log" /* ConsoleLog */, handleConsoleLog);
|
|
34746
|
+
coreEvents.on("output" /* Output */, handleOutput);
|
|
34763
34747
|
}
|
|
34764
34748
|
function notifyListeners() {
|
|
34765
34749
|
for (const listener of listeners) {
|
|
@@ -36876,7 +36860,7 @@ function usePromptCompletion({
|
|
|
36876
36860
|
{ model: "prompt-completion" },
|
|
36877
36861
|
contents,
|
|
36878
36862
|
signal,
|
|
36879
|
-
|
|
36863
|
+
"utility_autocomplete" /* UTILITY_AUTOCOMPLETE */
|
|
36880
36864
|
);
|
|
36881
36865
|
if (signal.aborted) {
|
|
36882
36866
|
return;
|
|
@@ -38430,9 +38414,9 @@ var InputPrompt = ({
|
|
|
38430
38414
|
onSuggestionsVisibilityChange(shouldShowSuggestions);
|
|
38431
38415
|
}
|
|
38432
38416
|
}, [shouldShowSuggestions, onSuggestionsVisibilityChange]);
|
|
38433
|
-
const showAutoAcceptStyling = !shellModeActive && approvalMode ===
|
|
38434
|
-
const showYoloStyling = !shellModeActive && approvalMode ===
|
|
38435
|
-
const showPlanStyling = !shellModeActive && approvalMode ===
|
|
38417
|
+
const showAutoAcceptStyling = !shellModeActive && approvalMode === "autoEdit" /* AUTO_EDIT */;
|
|
38418
|
+
const showYoloStyling = !shellModeActive && approvalMode === "yolo" /* YOLO */;
|
|
38419
|
+
const showPlanStyling = !shellModeActive && approvalMode === "plan" /* PLAN */;
|
|
38436
38420
|
let statusColor;
|
|
38437
38421
|
let statusText = "";
|
|
38438
38422
|
if (shellModeActive) {
|
|
@@ -38692,7 +38676,7 @@ var ConfigInitDisplay = ({
|
|
|
38692
38676
|
let connected = 0;
|
|
38693
38677
|
const connecting = [];
|
|
38694
38678
|
for (const [name, client] of clients.entries()) {
|
|
38695
|
-
if (client.getStatus() ===
|
|
38679
|
+
if (client.getStatus() === "connected" /* CONNECTED */) {
|
|
38696
38680
|
connected++;
|
|
38697
38681
|
} else {
|
|
38698
38682
|
connecting.push(name);
|
|
@@ -38714,9 +38698,9 @@ var ConfigInitDisplay = ({
|
|
|
38714
38698
|
);
|
|
38715
38699
|
}
|
|
38716
38700
|
};
|
|
38717
|
-
coreEvents.on(
|
|
38701
|
+
coreEvents.on("mcp-client-update" /* McpClientUpdate */, onChange);
|
|
38718
38702
|
return () => {
|
|
38719
|
-
coreEvents.off(
|
|
38703
|
+
coreEvents.off("mcp-client-update" /* McpClientUpdate */, onChange);
|
|
38720
38704
|
};
|
|
38721
38705
|
}, [initialMessage]);
|
|
38722
38706
|
return /* @__PURE__ */ (0, import_jsx_runtime120.jsx)(Box_default, { marginTop: 1, children: /* @__PURE__ */ (0, import_jsx_runtime120.jsxs)(Text, { children: [
|
|
@@ -38935,7 +38919,7 @@ var Composer = ({ isFocused = true }) => {
|
|
|
38935
38919
|
(item) => item.type === "tool_group"
|
|
38936
38920
|
).some(
|
|
38937
38921
|
(item) => item.tools.some(
|
|
38938
|
-
(tool) => tool.status ===
|
|
38922
|
+
(tool) => tool.status === "awaiting_approval" /* AwaitingApproval */
|
|
38939
38923
|
)
|
|
38940
38924
|
),
|
|
38941
38925
|
[uiState.pendingHistoryItems]
|
|
@@ -38964,16 +38948,16 @@ var Composer = ({ isFocused = true }) => {
|
|
|
38964
38948
|
const showRawMarkdownIndicator = !uiState.renderMarkdown;
|
|
38965
38949
|
let modeBleedThrough = null;
|
|
38966
38950
|
switch (showApprovalModeIndicator) {
|
|
38967
|
-
case
|
|
38951
|
+
case "yolo" /* YOLO */:
|
|
38968
38952
|
modeBleedThrough = { text: "YOLO", color: theme.status.error };
|
|
38969
38953
|
break;
|
|
38970
|
-
case
|
|
38954
|
+
case "plan" /* PLAN */:
|
|
38971
38955
|
modeBleedThrough = { text: "plan", color: theme.status.success };
|
|
38972
38956
|
break;
|
|
38973
|
-
case
|
|
38957
|
+
case "autoEdit" /* AUTO_EDIT */:
|
|
38974
38958
|
modeBleedThrough = { text: "auto edit", color: theme.status.warning };
|
|
38975
38959
|
break;
|
|
38976
|
-
case
|
|
38960
|
+
case "default" /* DEFAULT */:
|
|
38977
38961
|
modeBleedThrough = null;
|
|
38978
38962
|
break;
|
|
38979
38963
|
default:
|
|
@@ -39620,7 +39604,7 @@ var useShellCommandProcessor = (addItemToHistory, setPendingHistoryItem, onExec,
|
|
|
39620
39604
|
callId,
|
|
39621
39605
|
name: SHELL_COMMAND_NAME,
|
|
39622
39606
|
description: rawQuery,
|
|
39623
|
-
status:
|
|
39607
|
+
status: "executing" /* Executing */,
|
|
39624
39608
|
isClientInitiated: true,
|
|
39625
39609
|
resultDisplay: "",
|
|
39626
39610
|
confirmationDetails: void 0
|
|
@@ -39740,24 +39724,24 @@ var useShellCommandProcessor = (addItemToHistory, setPendingHistoryItem, onExec,
|
|
|
39740
39724
|
mainContent = result.output.trim() || "(Command produced no output)";
|
|
39741
39725
|
}
|
|
39742
39726
|
let finalOutput = mainContent;
|
|
39743
|
-
let finalStatus =
|
|
39727
|
+
let finalStatus = "success" /* Success */;
|
|
39744
39728
|
if (result.error) {
|
|
39745
|
-
finalStatus =
|
|
39729
|
+
finalStatus = "error" /* Error */;
|
|
39746
39730
|
finalOutput = `${result.error.message}
|
|
39747
39731
|
${finalOutput}`;
|
|
39748
39732
|
} else if (result.aborted) {
|
|
39749
|
-
finalStatus =
|
|
39733
|
+
finalStatus = "cancelled" /* Cancelled */;
|
|
39750
39734
|
finalOutput = `Command was cancelled.
|
|
39751
39735
|
${finalOutput}`;
|
|
39752
39736
|
} else if (result.backgrounded) {
|
|
39753
|
-
finalStatus =
|
|
39737
|
+
finalStatus = "success" /* Success */;
|
|
39754
39738
|
finalOutput = `Command moved to background (PID: ${result.pid}). Output hidden. Press Ctrl+B to view.`;
|
|
39755
39739
|
} else if (result.signal) {
|
|
39756
|
-
finalStatus =
|
|
39740
|
+
finalStatus = "error" /* Error */;
|
|
39757
39741
|
finalOutput = `Command terminated by signal: ${result.signal}.
|
|
39758
39742
|
${finalOutput}`;
|
|
39759
39743
|
} else if (result.exitCode !== 0) {
|
|
39760
|
-
finalStatus =
|
|
39744
|
+
finalStatus = "error" /* Error */;
|
|
39761
39745
|
finalOutput = `Command exited with code ${result.exitCode}.
|
|
39762
39746
|
${finalOutput}`;
|
|
39763
39747
|
}
|
|
@@ -39775,7 +39759,7 @@ ${finalOutput}`;
|
|
|
39775
39759
|
status: finalStatus,
|
|
39776
39760
|
resultDisplay: finalOutput
|
|
39777
39761
|
};
|
|
39778
|
-
if (finalStatus !==
|
|
39762
|
+
if (finalStatus !== "cancelled" /* Cancelled */) {
|
|
39779
39763
|
addItemToHistory(
|
|
39780
39764
|
{
|
|
39781
39765
|
type: "tool_group",
|
|
@@ -40754,7 +40738,7 @@ function useQuotaAndFallback({
|
|
|
40754
40738
|
error.retryDelayMs ? `Access resets at ${getResetTimeMessage(error.retryDelayMs)}.` : null,
|
|
40755
40739
|
`/stats model for usage details`,
|
|
40756
40740
|
`/model to switch models.`,
|
|
40757
|
-
contentGeneratorConfig?.authType ===
|
|
40741
|
+
contentGeneratorConfig?.authType === "oauth-personal" /* LOGIN_WITH_GOOGLE */ ? `/auth to switch to API key.` : null
|
|
40758
40742
|
].filter(Boolean);
|
|
40759
40743
|
message = messageLines.join("\n");
|
|
40760
40744
|
} else if (error instanceof ModelNotFoundError) {
|
|
@@ -40942,7 +40926,7 @@ var useEditorSettings = (loadedSettings, setEditorError, addItem) => {
|
|
|
40942
40926
|
);
|
|
40943
40927
|
setEditorError(null);
|
|
40944
40928
|
setIsEditorDialogOpen(false);
|
|
40945
|
-
coreEvents.emit(
|
|
40929
|
+
coreEvents.emit("editor-selected" /* EditorSelected */, { editor: editorType });
|
|
40946
40930
|
} catch (error) {
|
|
40947
40931
|
setEditorError(`Failed to set editor preference: ${error}`);
|
|
40948
40932
|
}
|
|
@@ -40951,7 +40935,7 @@ var useEditorSettings = (loadedSettings, setEditorError, addItem) => {
|
|
|
40951
40935
|
);
|
|
40952
40936
|
const exitEditorDialog = (0, import_react96.useCallback)(() => {
|
|
40953
40937
|
setIsEditorDialogOpen(false);
|
|
40954
|
-
coreEvents.emit(
|
|
40938
|
+
coreEvents.emit("editor-selected" /* EditorSelected */, { editor: void 0 });
|
|
40955
40939
|
}, []);
|
|
40956
40940
|
return {
|
|
40957
40941
|
isEditorDialogOpen,
|
|
@@ -41306,7 +41290,7 @@ var useSlashCommandProcessor = (config, settings, addItem, clearItems, loadHisto
|
|
|
41306
41290
|
canonicalPath: resolvedCommandPath
|
|
41307
41291
|
} = parseSlashCommand(trimmed, commands);
|
|
41308
41292
|
if (!commandToExecute) {
|
|
41309
|
-
const isMcpLoading = config?.getMcpClientManager()?.getDiscoveryState() ===
|
|
41293
|
+
const isMcpLoading = config?.getMcpClientManager()?.getDiscoveryState() === "in_progress" /* IN_PROGRESS */;
|
|
41310
41294
|
if (isMcpLoading) {
|
|
41311
41295
|
setIsProcessing(true);
|
|
41312
41296
|
if (addToHistory) {
|
|
@@ -41474,7 +41458,7 @@ var useSlashCommandProcessor = (config, settings, addItem, clearItems, loadHisto
|
|
|
41474
41458
|
onConfirm: async (resolvedOutcome) => {
|
|
41475
41459
|
resolve3({
|
|
41476
41460
|
outcome: resolvedOutcome,
|
|
41477
|
-
approvedCommands: resolvedOutcome ===
|
|
41461
|
+
approvedCommands: resolvedOutcome === "cancel" /* Cancel */ ? [] : result.commandsToConfirm
|
|
41478
41462
|
});
|
|
41479
41463
|
}
|
|
41480
41464
|
};
|
|
@@ -41482,7 +41466,7 @@ var useSlashCommandProcessor = (config, settings, addItem, clearItems, loadHisto
|
|
|
41482
41466
|
callId,
|
|
41483
41467
|
name: "Expansion",
|
|
41484
41468
|
description: "Command expansion needs shell access",
|
|
41485
|
-
status:
|
|
41469
|
+
status: "awaiting_approval" /* AwaitingApproval */,
|
|
41486
41470
|
isClientInitiated: true,
|
|
41487
41471
|
resultDisplay: void 0,
|
|
41488
41472
|
confirmationDetails
|
|
@@ -41493,7 +41477,7 @@ var useSlashCommandProcessor = (config, settings, addItem, clearItems, loadHisto
|
|
|
41493
41477
|
});
|
|
41494
41478
|
});
|
|
41495
41479
|
setPendingItem(null);
|
|
41496
|
-
if (outcome ===
|
|
41480
|
+
if (outcome === "cancel" /* Cancel */ || !approvedCommands || approvedCommands.length === 0) {
|
|
41497
41481
|
addItem(
|
|
41498
41482
|
{
|
|
41499
41483
|
type: "info" /* INFO */,
|
|
@@ -41503,7 +41487,7 @@ var useSlashCommandProcessor = (config, settings, addItem, clearItems, loadHisto
|
|
|
41503
41487
|
);
|
|
41504
41488
|
return { type: "handled" };
|
|
41505
41489
|
}
|
|
41506
|
-
if (outcome ===
|
|
41490
|
+
if (outcome === "proceed_always" /* ProceedAlways */) {
|
|
41507
41491
|
setSessionShellAllowlist(
|
|
41508
41492
|
(prev) => /* @__PURE__ */ new Set([...prev, ...approvedCommands])
|
|
41509
41493
|
);
|
|
@@ -41980,7 +41964,7 @@ function mapToDisplay(toolOrTools, options = {}) {
|
|
|
41980
41964
|
let description;
|
|
41981
41965
|
let renderOutputAsMarkdown = false;
|
|
41982
41966
|
const displayName = call.tool?.displayName ?? call.request.name;
|
|
41983
|
-
if (call.status ===
|
|
41967
|
+
if (call.status === "error" /* Error */) {
|
|
41984
41968
|
description = JSON.stringify(call.request.args);
|
|
41985
41969
|
} else {
|
|
41986
41970
|
description = call.invocation.getDescription();
|
|
@@ -42002,27 +41986,27 @@ function mapToDisplay(toolOrTools, options = {}) {
|
|
|
42002
41986
|
let progress = void 0;
|
|
42003
41987
|
let progressTotal = void 0;
|
|
42004
41988
|
switch (call.status) {
|
|
42005
|
-
case
|
|
41989
|
+
case "success" /* Success */:
|
|
42006
41990
|
resultDisplay = call.response.resultDisplay;
|
|
42007
41991
|
outputFile = call.response.outputFile;
|
|
42008
41992
|
break;
|
|
42009
|
-
case
|
|
42010
|
-
case
|
|
41993
|
+
case "error" /* Error */:
|
|
41994
|
+
case "cancelled" /* Cancelled */:
|
|
42011
41995
|
resultDisplay = call.response.resultDisplay;
|
|
42012
41996
|
break;
|
|
42013
|
-
case
|
|
41997
|
+
case "awaiting_approval" /* AwaitingApproval */:
|
|
42014
41998
|
correlationId = call.correlationId;
|
|
42015
41999
|
confirmationDetails = call.confirmationDetails;
|
|
42016
42000
|
break;
|
|
42017
|
-
case
|
|
42001
|
+
case "executing" /* Executing */:
|
|
42018
42002
|
resultDisplay = call.liveOutput;
|
|
42019
42003
|
ptyId = call.pid;
|
|
42020
42004
|
progressMessage = call.progressMessage;
|
|
42021
42005
|
progress = call.progress;
|
|
42022
42006
|
progressTotal = call.progressTotal;
|
|
42023
42007
|
break;
|
|
42024
|
-
case
|
|
42025
|
-
case
|
|
42008
|
+
case "scheduled" /* Scheduled */:
|
|
42009
|
+
case "validating" /* Validating */:
|
|
42026
42010
|
break;
|
|
42027
42011
|
default: {
|
|
42028
42012
|
const exhaustiveCheck = call;
|
|
@@ -42091,7 +42075,7 @@ function useToolScheduler(onComplete, config, getPreferredEditor) {
|
|
|
42091
42075
|
const handler = (event) => {
|
|
42092
42076
|
const isRoot = event.schedulerId === ROOT_SCHEDULER_ID;
|
|
42093
42077
|
const hasExecuting = event.toolCalls.some(
|
|
42094
|
-
(tc) => tc.status ===
|
|
42078
|
+
(tc) => tc.status === "executing" /* Executing */ || (tc.status === "success" /* Success */ || tc.status === "error" /* Error */) && "tailToolCallRequest" in tc && tc.tailToolCallRequest != null
|
|
42095
42079
|
);
|
|
42096
42080
|
if (hasExecuting) {
|
|
42097
42081
|
setLastToolOutputTime(Date.now());
|
|
@@ -42100,7 +42084,7 @@ function useToolScheduler(onComplete, config, getPreferredEditor) {
|
|
|
42100
42084
|
const prevCalls = prev[event.schedulerId] ?? [];
|
|
42101
42085
|
const prevCallIds = new Set(prevCalls.map((tc) => tc.request.callId));
|
|
42102
42086
|
const filteredToolCalls = isRoot ? event.toolCalls : event.toolCalls.filter(
|
|
42103
|
-
(tc) => tc.status ===
|
|
42087
|
+
(tc) => tc.status === "awaiting_approval" /* AwaitingApproval */ || prevCallIds.has(tc.request.callId)
|
|
42104
42088
|
);
|
|
42105
42089
|
if (!isRoot && filteredToolCalls.length === 0 && prevCalls.length === 0) {
|
|
42106
42090
|
return prev;
|
|
@@ -42112,9 +42096,9 @@ function useToolScheduler(onComplete, config, getPreferredEditor) {
|
|
|
42112
42096
|
};
|
|
42113
42097
|
});
|
|
42114
42098
|
};
|
|
42115
|
-
messageBus.subscribe(
|
|
42099
|
+
messageBus.subscribe("tool-calls-update" /* TOOL_CALLS_UPDATE */, handler);
|
|
42116
42100
|
return () => {
|
|
42117
|
-
messageBus.unsubscribe(
|
|
42101
|
+
messageBus.unsubscribe("tool-calls-update" /* TOOL_CALLS_UPDATE */, handler);
|
|
42118
42102
|
};
|
|
42119
42103
|
}, [messageBus, internalAdaptToolCalls]);
|
|
42120
42104
|
const schedule = (0, import_react102.useCallback)(
|
|
@@ -42186,8 +42170,8 @@ function adaptToolCalls(coreCalls, prevTracked) {
|
|
|
42186
42170
|
const prev = prevMap.get(coreCall.request.callId);
|
|
42187
42171
|
const responseSubmittedToGemini = prev?.responseSubmittedToGemini ?? false;
|
|
42188
42172
|
let status = coreCall.status;
|
|
42189
|
-
if ((status ===
|
|
42190
|
-
status =
|
|
42173
|
+
if ((status === "success" /* Success */ || status === "error" /* Error */) && "tailToolCallRequest" in coreCall && coreCall.tailToolCallRequest != null) {
|
|
42174
|
+
status = "executing" /* Executing */;
|
|
42191
42175
|
}
|
|
42192
42176
|
return {
|
|
42193
42177
|
...coreCall,
|
|
@@ -42218,7 +42202,7 @@ function getBackgroundedToolInfo(toolCall) {
|
|
|
42218
42202
|
};
|
|
42219
42203
|
}
|
|
42220
42204
|
function isBackgroundableExecutingToolCall(toolCall) {
|
|
42221
|
-
return toolCall.status ===
|
|
42205
|
+
return toolCall.status === "executing" /* Executing */ && typeof toolCall.pid === "number";
|
|
42222
42206
|
}
|
|
42223
42207
|
function showCitations(settings) {
|
|
42224
42208
|
const enabled = settings.merged.ui.showCitations;
|
|
@@ -42228,14 +42212,14 @@ function showCitations(settings) {
|
|
|
42228
42212
|
return true;
|
|
42229
42213
|
}
|
|
42230
42214
|
function calculateStreamingState(isResponding, toolCalls) {
|
|
42231
|
-
if (toolCalls.some((tc) => tc.status ===
|
|
42215
|
+
if (toolCalls.some((tc) => tc.status === "awaiting_approval" /* AwaitingApproval */)) {
|
|
42232
42216
|
return "waiting_for_confirmation" /* WaitingForConfirmation */;
|
|
42233
42217
|
}
|
|
42234
42218
|
const isAnyToolActive = toolCalls.some((tc) => {
|
|
42235
|
-
if (tc.status ===
|
|
42219
|
+
if (tc.status === "executing" /* Executing */ || tc.status === "scheduled" /* Scheduled */ || tc.status === "validating" /* Validating */) {
|
|
42236
42220
|
return true;
|
|
42237
42221
|
}
|
|
42238
|
-
if (tc.status ===
|
|
42222
|
+
if (tc.status === "success" /* Success */ || tc.status === "error" /* Error */ || tc.status === "cancelled" /* Cancelled */) {
|
|
42239
42223
|
return !tc.responseSubmittedToGemini;
|
|
42240
42224
|
}
|
|
42241
42225
|
return false;
|
|
@@ -42288,9 +42272,9 @@ var useGeminiStream = (geminiClient, history, addItem, config, settings, onDebug
|
|
|
42288
42272
|
const handleRetryAttempt = (payload) => {
|
|
42289
42273
|
setRetryStatus(payload);
|
|
42290
42274
|
};
|
|
42291
|
-
coreEvents.on(
|
|
42275
|
+
coreEvents.on("retry-attempt" /* RetryAttempt */, handleRetryAttempt);
|
|
42292
42276
|
return () => {
|
|
42293
|
-
coreEvents.off(
|
|
42277
|
+
coreEvents.off("retry-attempt" /* RetryAttempt */, handleRetryAttempt);
|
|
42294
42278
|
};
|
|
42295
42279
|
}, []);
|
|
42296
42280
|
const [
|
|
@@ -42407,12 +42391,12 @@ var useGeminiStream = (geminiClient, history, addItem, config, settings, onDebug
|
|
|
42407
42391
|
const tc = toolCalls[i];
|
|
42408
42392
|
if (pushedToolCallIdsRef.current.has(tc.request.callId)) continue;
|
|
42409
42393
|
if (tc.status === "success" || tc.status === "error" || tc.status === "cancelled") {
|
|
42410
|
-
const isAgent = tc.tool?.kind ===
|
|
42394
|
+
const isAgent = tc.tool?.kind === "agent" /* Agent */;
|
|
42411
42395
|
if (isAgent) {
|
|
42412
42396
|
let contigAgentsComplete = true;
|
|
42413
42397
|
for (let j = i + 1; j < toolCalls.length; j++) {
|
|
42414
42398
|
const nextTc = toolCalls[j];
|
|
42415
|
-
if (nextTc.tool?.kind ===
|
|
42399
|
+
if (nextTc.tool?.kind === "agent" /* Agent */) {
|
|
42416
42400
|
if (nextTc.status !== "success" && nextTc.status !== "error" && nextTc.status !== "cancelled") {
|
|
42417
42401
|
contigAgentsComplete = false;
|
|
42418
42402
|
break;
|
|
@@ -42492,9 +42476,9 @@ var useGeminiStream = (geminiClient, history, addItem, config, settings, onDebug
|
|
|
42492
42476
|
const anyVisibleInPending = remainingTools.some((tc) => {
|
|
42493
42477
|
const displayName = tc.tool?.displayName ?? tc.request.name;
|
|
42494
42478
|
let hasResultDisplay = false;
|
|
42495
|
-
if (tc.status ===
|
|
42479
|
+
if (tc.status === "success" /* Success */ || tc.status === "error" /* Error */ || tc.status === "cancelled" /* Cancelled */) {
|
|
42496
42480
|
hasResultDisplay = !!tc.response?.resultDisplay;
|
|
42497
|
-
} else if (tc.status ===
|
|
42481
|
+
} else if (tc.status === "executing" /* Executing */) {
|
|
42498
42482
|
hasResultDisplay = !!tc.liveOutput;
|
|
42499
42483
|
}
|
|
42500
42484
|
if (shouldHideToolCall({
|
|
@@ -42546,7 +42530,7 @@ var useGeminiStream = (geminiClient, history, addItem, config, settings, onDebug
|
|
|
42546
42530
|
prevActiveShellPtyIdRef.current = activeShellPtyId;
|
|
42547
42531
|
}, [activeShellPtyId, addItem, setIsResponding]);
|
|
42548
42532
|
(0, import_react103.useEffect)(() => {
|
|
42549
|
-
if (config.getApprovalMode() ===
|
|
42533
|
+
if (config.getApprovalMode() === "yolo" /* YOLO */ && streamingState === "idle" /* Idle */) {
|
|
42550
42534
|
const lastUserMessageIndex = history.findLastIndex(
|
|
42551
42535
|
(item) => item.type === "user" /* USER */
|
|
42552
42536
|
);
|
|
@@ -42631,7 +42615,7 @@ var useGeminiStream = (geminiClient, history, addItem, config, settings, onDebug
|
|
|
42631
42615
|
if (tool.name === SHELL_COMMAND_NAME) {
|
|
42632
42616
|
return {
|
|
42633
42617
|
...tool,
|
|
42634
|
-
status:
|
|
42618
|
+
status: "cancelled" /* Cancelled */,
|
|
42635
42619
|
resultDisplay: tool.resultDisplay
|
|
42636
42620
|
};
|
|
42637
42621
|
}
|
|
@@ -42687,7 +42671,7 @@ var useGeminiStream = (geminiClient, history, addItem, config, settings, onDebug
|
|
|
42687
42671
|
let localQueryToSendToGemini = null;
|
|
42688
42672
|
if (typeof query === "string") {
|
|
42689
42673
|
const trimmedQuery = query.trim();
|
|
42690
|
-
await logger?.logMessage(
|
|
42674
|
+
await logger?.logMessage("user" /* USER */, trimmedQuery);
|
|
42691
42675
|
if (!shellModeActive) {
|
|
42692
42676
|
const slashCommandResult = isSlashCommand(trimmedQuery) ? await handleSlashCommand(trimmedQuery) : false;
|
|
42693
42677
|
if (slashCommandResult) {
|
|
@@ -42843,7 +42827,7 @@ var useGeminiStream = (geminiClient, history, addItem, config, settings, onDebug
|
|
|
42843
42827
|
if (pendingHistoryItemRef.current) {
|
|
42844
42828
|
if (pendingHistoryItemRef.current.type === "tool_group") {
|
|
42845
42829
|
const updatedTools = pendingHistoryItemRef.current.tools.map(
|
|
42846
|
-
(tool) => tool.status ===
|
|
42830
|
+
(tool) => tool.status === "validating" /* Validating */ || tool.status === "scheduled" /* Scheduled */ || tool.status === "awaiting_approval" /* AwaitingApproval */ || tool.status === "executing" /* Executing */ ? { ...tool, status: "cancelled" /* Cancelled */ } : tool
|
|
42847
42831
|
);
|
|
42848
42832
|
const pendingItem = {
|
|
42849
42833
|
...pendingHistoryItemRef.current,
|
|
@@ -43089,15 +43073,15 @@ var useGeminiStream = (geminiClient, history, addItem, config, settings, onDebug
|
|
|
43089
43073
|
let geminiMessageBuffer = "";
|
|
43090
43074
|
const toolCallRequests = [];
|
|
43091
43075
|
for await (const event of stream) {
|
|
43092
|
-
if (event.type !==
|
|
43076
|
+
if (event.type !== "thought" /* Thought */ && thoughtRef.current !== null) {
|
|
43093
43077
|
setThought(null);
|
|
43094
43078
|
}
|
|
43095
43079
|
switch (event.type) {
|
|
43096
|
-
case
|
|
43080
|
+
case "thought" /* Thought */:
|
|
43097
43081
|
setLastGeminiActivityTime(Date.now());
|
|
43098
43082
|
handleThoughtEvent(event.value, userMessageTimestamp);
|
|
43099
43083
|
break;
|
|
43100
|
-
case
|
|
43084
|
+
case "content" /* Content */:
|
|
43101
43085
|
setLastGeminiActivityTime(Date.now());
|
|
43102
43086
|
geminiMessageBuffer = handleContentEvent(
|
|
43103
43087
|
event.value,
|
|
@@ -43105,16 +43089,16 @@ var useGeminiStream = (geminiClient, history, addItem, config, settings, onDebug
|
|
|
43105
43089
|
userMessageTimestamp
|
|
43106
43090
|
);
|
|
43107
43091
|
break;
|
|
43108
|
-
case
|
|
43092
|
+
case "tool_call_request" /* ToolCallRequest */:
|
|
43109
43093
|
toolCallRequests.push(event.value);
|
|
43110
43094
|
break;
|
|
43111
|
-
case
|
|
43095
|
+
case "user_cancelled" /* UserCancelled */:
|
|
43112
43096
|
handleUserCancelledEvent(userMessageTimestamp);
|
|
43113
43097
|
break;
|
|
43114
|
-
case
|
|
43098
|
+
case "error" /* Error */:
|
|
43115
43099
|
handleErrorEvent(event.value, userMessageTimestamp);
|
|
43116
43100
|
break;
|
|
43117
|
-
case
|
|
43101
|
+
case "agent_execution_stopped" /* AgentExecutionStopped */:
|
|
43118
43102
|
handleAgentExecutionStoppedEvent(
|
|
43119
43103
|
event.value.reason,
|
|
43120
43104
|
userMessageTimestamp,
|
|
@@ -43122,7 +43106,7 @@ var useGeminiStream = (geminiClient, history, addItem, config, settings, onDebug
|
|
|
43122
43106
|
event.value.contextCleared
|
|
43123
43107
|
);
|
|
43124
43108
|
break;
|
|
43125
|
-
case
|
|
43109
|
+
case "agent_execution_blocked" /* AgentExecutionBlocked */:
|
|
43126
43110
|
handleAgentExecutionBlockedEvent(
|
|
43127
43111
|
event.value.reason,
|
|
43128
43112
|
userMessageTimestamp,
|
|
@@ -43130,35 +43114,35 @@ var useGeminiStream = (geminiClient, history, addItem, config, settings, onDebug
|
|
|
43130
43114
|
event.value.contextCleared
|
|
43131
43115
|
);
|
|
43132
43116
|
break;
|
|
43133
|
-
case
|
|
43117
|
+
case "chat_compressed" /* ChatCompressed */:
|
|
43134
43118
|
handleChatCompressionEvent(event.value, userMessageTimestamp);
|
|
43135
43119
|
break;
|
|
43136
|
-
case
|
|
43137
|
-
case
|
|
43120
|
+
case "tool_call_confirmation" /* ToolCallConfirmation */:
|
|
43121
|
+
case "tool_call_response" /* ToolCallResponse */:
|
|
43138
43122
|
break;
|
|
43139
|
-
case
|
|
43123
|
+
case "max_session_turns" /* MaxSessionTurns */:
|
|
43140
43124
|
handleMaxSessionTurnsEvent();
|
|
43141
43125
|
break;
|
|
43142
|
-
case
|
|
43126
|
+
case "context_window_will_overflow" /* ContextWindowWillOverflow */:
|
|
43143
43127
|
handleContextWindowWillOverflowEvent(
|
|
43144
43128
|
event.value.estimatedRequestTokenCount,
|
|
43145
43129
|
event.value.remainingTokenCount
|
|
43146
43130
|
);
|
|
43147
43131
|
break;
|
|
43148
|
-
case
|
|
43132
|
+
case "finished" /* Finished */:
|
|
43149
43133
|
handleFinishedEvent(event, userMessageTimestamp);
|
|
43150
43134
|
break;
|
|
43151
|
-
case
|
|
43135
|
+
case "citation" /* Citation */:
|
|
43152
43136
|
handleCitationEvent(event.value, userMessageTimestamp);
|
|
43153
43137
|
break;
|
|
43154
|
-
case
|
|
43138
|
+
case "model_info" /* ModelInfo */:
|
|
43155
43139
|
handleChatModelEvent(event.value, userMessageTimestamp);
|
|
43156
43140
|
break;
|
|
43157
|
-
case
|
|
43141
|
+
case "loop_detected" /* LoopDetected */:
|
|
43158
43142
|
loopDetectedRef.current = true;
|
|
43159
43143
|
break;
|
|
43160
|
-
case
|
|
43161
|
-
case
|
|
43144
|
+
case "retry" /* Retry */:
|
|
43145
|
+
case "invalid_stream" /* InvalidStream */:
|
|
43162
43146
|
break;
|
|
43163
43147
|
default: {
|
|
43164
43148
|
const unreachable = event;
|
|
@@ -43199,7 +43183,7 @@ var useGeminiStream = (geminiClient, history, addItem, config, settings, onDebug
|
|
|
43199
43183
|
const submitQuery = (0, import_react103.useCallback)(
|
|
43200
43184
|
async (query, options, prompt_id) => runInDevTraceSpan(
|
|
43201
43185
|
{
|
|
43202
|
-
operation: options?.isContinuation ?
|
|
43186
|
+
operation: options?.isContinuation ? "system_prompt" /* SystemPrompt */ : "user_prompt" /* UserPrompt */
|
|
43203
43187
|
},
|
|
43204
43188
|
async ({ metadata: spanMetadata }) => {
|
|
43205
43189
|
spanMetadata.input = query;
|
|
@@ -43358,7 +43342,7 @@ var useGeminiStream = (geminiClient, history, addItem, config, settings, onDebug
|
|
|
43358
43342
|
);
|
|
43359
43343
|
const handleApprovalModeChange = (0, import_react103.useCallback)(
|
|
43360
43344
|
async (newApprovalMode) => {
|
|
43361
|
-
if (previousApprovalModeRef.current ===
|
|
43345
|
+
if (previousApprovalModeRef.current === "plan" /* PLAN */ && newApprovalMode !== "plan" /* PLAN */ && streamingState === "idle" /* Idle */) {
|
|
43362
43346
|
if (geminiClient) {
|
|
43363
43347
|
try {
|
|
43364
43348
|
await geminiClient.addHistory({
|
|
@@ -43381,11 +43365,11 @@ var useGeminiStream = (geminiClient, history, addItem, config, settings, onDebug
|
|
|
43381
43365
|
}
|
|
43382
43366
|
}
|
|
43383
43367
|
previousApprovalModeRef.current = newApprovalMode;
|
|
43384
|
-
if (newApprovalMode ===
|
|
43368
|
+
if (newApprovalMode === "yolo" /* YOLO */ || newApprovalMode === "autoEdit" /* AUTO_EDIT */) {
|
|
43385
43369
|
let awaitingApprovalCalls = toolCalls.filter(
|
|
43386
43370
|
(call) => call.status === "awaiting_approval" && !call.request.forcedAsk
|
|
43387
43371
|
);
|
|
43388
|
-
if (newApprovalMode ===
|
|
43372
|
+
if (newApprovalMode === "autoEdit" /* AUTO_EDIT */) {
|
|
43389
43373
|
awaitingApprovalCalls = awaitingApprovalCalls.filter(
|
|
43390
43374
|
(call) => EDIT_TOOL_NAMES.has(call.request.name)
|
|
43391
43375
|
);
|
|
@@ -43394,11 +43378,11 @@ var useGeminiStream = (geminiClient, history, addItem, config, settings, onDebug
|
|
|
43394
43378
|
if (call.correlationId) {
|
|
43395
43379
|
try {
|
|
43396
43380
|
await config.getMessageBus().publish({
|
|
43397
|
-
type:
|
|
43381
|
+
type: "tool-confirmation-response" /* TOOL_CONFIRMATION_RESPONSE */,
|
|
43398
43382
|
correlationId: call.correlationId,
|
|
43399
43383
|
confirmed: true,
|
|
43400
43384
|
requiresUserConfirmation: false,
|
|
43401
|
-
outcome:
|
|
43385
|
+
outcome: "proceed_once" /* ProceedOnce */
|
|
43402
43386
|
});
|
|
43403
43387
|
} catch (error) {
|
|
43404
43388
|
debugLogger.warn(
|
|
@@ -43476,14 +43460,14 @@ var useGeminiStream = (geminiClient, history, addItem, config, settings, onDebug
|
|
|
43476
43460
|
);
|
|
43477
43461
|
if (isLowErrorVerbosity) {
|
|
43478
43462
|
suppressedToolErrorCountRef.current += geminiTools.filter(
|
|
43479
|
-
(tc) => tc.status ===
|
|
43463
|
+
(tc) => tc.status === "error" /* Error */
|
|
43480
43464
|
).length;
|
|
43481
43465
|
}
|
|
43482
43466
|
if (geminiTools.length === 0) {
|
|
43483
43467
|
return;
|
|
43484
43468
|
}
|
|
43485
43469
|
const stopExecutionTool = geminiTools.find(
|
|
43486
|
-
(tc) => tc.response.errorType ===
|
|
43470
|
+
(tc) => tc.response.errorType === "stop_execution" /* STOP_EXECUTION */
|
|
43487
43471
|
);
|
|
43488
43472
|
if (stopExecutionTool && stopExecutionTool.response.error) {
|
|
43489
43473
|
maybeAddSuppressedToolErrorNote();
|
|
@@ -43500,7 +43484,7 @@ var useGeminiStream = (geminiClient, history, addItem, config, settings, onDebug
|
|
|
43500
43484
|
return;
|
|
43501
43485
|
}
|
|
43502
43486
|
const allToolsCancelled = geminiTools.every(
|
|
43503
|
-
(tc) => tc.status ===
|
|
43487
|
+
(tc) => tc.status === "cancelled" /* Cancelled */
|
|
43504
43488
|
);
|
|
43505
43489
|
if (allToolsCancelled) {
|
|
43506
43490
|
if (!turnCancelledRef.current) {
|
|
@@ -43582,7 +43566,7 @@ var useGeminiStream = (geminiClient, history, addItem, config, settings, onDebug
|
|
|
43582
43566
|
return;
|
|
43583
43567
|
}
|
|
43584
43568
|
const restorableToolCalls = toolCalls.filter(
|
|
43585
|
-
(toolCall) => EDIT_TOOL_NAMES.has(toolCall.request.name) && toolCall.status ===
|
|
43569
|
+
(toolCall) => EDIT_TOOL_NAMES.has(toolCall.request.name) && toolCall.status === "awaiting_approval" /* AwaitingApproval */
|
|
43586
43570
|
);
|
|
43587
43571
|
if (restorableToolCalls.length > 0) {
|
|
43588
43572
|
if (!gitService) {
|
|
@@ -46049,7 +46033,7 @@ function useMessageQueue({
|
|
|
46049
46033
|
var import_react110 = __toESM(require_react(), 1);
|
|
46050
46034
|
function useMcpStatus(config) {
|
|
46051
46035
|
const [discoveryState, setDiscoveryState] = (0, import_react110.useState)(
|
|
46052
|
-
() => config.getMcpClientManager()?.getDiscoveryState() ??
|
|
46036
|
+
() => config.getMcpClientManager()?.getDiscoveryState() ?? "not_started" /* NOT_STARTED */
|
|
46053
46037
|
);
|
|
46054
46038
|
const [mcpServerCount, setMcpServerCount] = (0, import_react110.useState)(
|
|
46055
46039
|
() => config.getMcpClientManager()?.getMcpServerCount() ?? 0
|
|
@@ -46062,12 +46046,12 @@ function useMcpStatus(config) {
|
|
|
46062
46046
|
setMcpServerCount(manager.getMcpServerCount());
|
|
46063
46047
|
}
|
|
46064
46048
|
};
|
|
46065
|
-
coreEvents.on(
|
|
46049
|
+
coreEvents.on("mcp-client-update" /* McpClientUpdate */, onChange);
|
|
46066
46050
|
return () => {
|
|
46067
|
-
coreEvents.off(
|
|
46051
|
+
coreEvents.off("mcp-client-update" /* McpClientUpdate */, onChange);
|
|
46068
46052
|
};
|
|
46069
46053
|
}, [config]);
|
|
46070
|
-
const isMcpReady = discoveryState ===
|
|
46054
|
+
const isMcpReady = discoveryState === "completed" /* COMPLETED */ || discoveryState === "not_started" /* NOT_STARTED */ && mcpServerCount === 0;
|
|
46071
46055
|
return {
|
|
46072
46056
|
discoveryState,
|
|
46073
46057
|
mcpServerCount,
|
|
@@ -46094,7 +46078,7 @@ function useApprovalModeIndicator({
|
|
|
46094
46078
|
(key) => {
|
|
46095
46079
|
let nextApprovalMode;
|
|
46096
46080
|
if (keyMatchers["app.toggleYolo" /* TOGGLE_YOLO */](key)) {
|
|
46097
|
-
if (config.isYoloModeDisabled() && config.getApprovalMode() !==
|
|
46081
|
+
if (config.isYoloModeDisabled() && config.getApprovalMode() !== "yolo" /* YOLO */) {
|
|
46098
46082
|
if (addItem) {
|
|
46099
46083
|
let text = "You cannot enter YOLO mode since it is disabled in your settings.";
|
|
46100
46084
|
const adminSettings = config.getRemoteAdminSettings();
|
|
@@ -46112,21 +46096,21 @@ function useApprovalModeIndicator({
|
|
|
46112
46096
|
}
|
|
46113
46097
|
return;
|
|
46114
46098
|
}
|
|
46115
|
-
nextApprovalMode = config.getApprovalMode() ===
|
|
46099
|
+
nextApprovalMode = config.getApprovalMode() === "yolo" /* YOLO */ ? "default" /* DEFAULT */ : "yolo" /* YOLO */;
|
|
46116
46100
|
} else if (keyMatchers["app.cycleApprovalMode" /* CYCLE_APPROVAL_MODE */](key)) {
|
|
46117
46101
|
const currentMode = config.getApprovalMode();
|
|
46118
46102
|
switch (currentMode) {
|
|
46119
|
-
case
|
|
46120
|
-
nextApprovalMode =
|
|
46103
|
+
case "default" /* DEFAULT */:
|
|
46104
|
+
nextApprovalMode = "autoEdit" /* AUTO_EDIT */;
|
|
46121
46105
|
break;
|
|
46122
|
-
case
|
|
46123
|
-
nextApprovalMode = allowPlanMode ?
|
|
46106
|
+
case "autoEdit" /* AUTO_EDIT */:
|
|
46107
|
+
nextApprovalMode = allowPlanMode ? "plan" /* PLAN */ : "default" /* DEFAULT */;
|
|
46124
46108
|
break;
|
|
46125
|
-
case
|
|
46126
|
-
nextApprovalMode =
|
|
46109
|
+
case "plan" /* PLAN */:
|
|
46110
|
+
nextApprovalMode = "default" /* DEFAULT */;
|
|
46127
46111
|
break;
|
|
46128
|
-
case
|
|
46129
|
-
nextApprovalMode =
|
|
46112
|
+
case "yolo" /* YOLO */:
|
|
46113
|
+
nextApprovalMode = "autoEdit" /* AUTO_EDIT */;
|
|
46130
46114
|
break;
|
|
46131
46115
|
default:
|
|
46132
46116
|
}
|
|
@@ -46519,11 +46503,11 @@ var useHookDisplayState = () => {
|
|
|
46519
46503
|
removeHook();
|
|
46520
46504
|
}
|
|
46521
46505
|
};
|
|
46522
|
-
coreEvents.on(
|
|
46523
|
-
coreEvents.on(
|
|
46506
|
+
coreEvents.on("hook-start" /* HookStart */, handleHookStart);
|
|
46507
|
+
coreEvents.on("hook-end" /* HookEnd */, handleHookEnd);
|
|
46524
46508
|
return () => {
|
|
46525
|
-
coreEvents.off(
|
|
46526
|
-
coreEvents.off(
|
|
46509
|
+
coreEvents.off("hook-start" /* HookStart */, handleHookStart);
|
|
46510
|
+
coreEvents.off("hook-end" /* HookEnd */, handleHookEnd);
|
|
46527
46511
|
activeTimeouts.forEach(clearTimeout);
|
|
46528
46512
|
activeTimeouts.clear();
|
|
46529
46513
|
};
|
|
@@ -47320,7 +47304,7 @@ var AppContainer = (props) => {
|
|
|
47320
47304
|
}
|
|
47321
47305
|
setConfigInitialized(true);
|
|
47322
47306
|
startupProfiler.flush(config);
|
|
47323
|
-
const sessionStartSource = resumedSessionData ?
|
|
47307
|
+
const sessionStartSource = resumedSessionData ? "resume" /* Resume */ : "startup" /* Startup */;
|
|
47324
47308
|
const result = await config.getHookSystem()?.fireSessionStartEvent(sessionStartSource);
|
|
47325
47309
|
if (result) {
|
|
47326
47310
|
if (result.systemMessage) {
|
|
@@ -47356,7 +47340,7 @@ var AppContainer = (props) => {
|
|
|
47356
47340
|
);
|
|
47357
47341
|
const ideClient = await IdeClient.getInstance();
|
|
47358
47342
|
await ideClient.disconnect();
|
|
47359
|
-
await config?.getHookSystem()?.fireSessionEndEvent(
|
|
47343
|
+
await config?.getHookSystem()?.fireSessionEndEvent("exit" /* Exit */);
|
|
47360
47344
|
});
|
|
47361
47345
|
}, [config, resumedSessionData]);
|
|
47362
47346
|
(0, import_react124.useEffect)(
|
|
@@ -47374,11 +47358,11 @@ var AppContainer = (props) => {
|
|
|
47374
47358
|
resetTime: payload.resetTime
|
|
47375
47359
|
});
|
|
47376
47360
|
};
|
|
47377
|
-
coreEvents.on(
|
|
47378
|
-
coreEvents.on(
|
|
47361
|
+
coreEvents.on("model-changed" /* ModelChanged */, handleModelChanged);
|
|
47362
|
+
coreEvents.on("quota-changed" /* QuotaChanged */, handleQuotaChanged);
|
|
47379
47363
|
return () => {
|
|
47380
|
-
coreEvents.off(
|
|
47381
|
-
coreEvents.off(
|
|
47364
|
+
coreEvents.off("model-changed" /* ModelChanged */, handleModelChanged);
|
|
47365
|
+
coreEvents.off("quota-changed" /* QuotaChanged */, handleQuotaChanged);
|
|
47382
47366
|
};
|
|
47383
47367
|
}, [config]);
|
|
47384
47368
|
(0, import_react124.useEffect)(() => {
|
|
@@ -47391,16 +47375,16 @@ var AppContainer = (props) => {
|
|
|
47391
47375
|
const handleAgentsDiscovered = (payload) => {
|
|
47392
47376
|
setNewAgents(payload.agents);
|
|
47393
47377
|
};
|
|
47394
|
-
coreEvents.on(
|
|
47395
|
-
coreEvents.on(
|
|
47396
|
-
coreEvents.on(
|
|
47378
|
+
coreEvents.on("settings-changed" /* SettingsChanged */, handleSettingsChanged);
|
|
47379
|
+
coreEvents.on("admin-settings-changed" /* AdminSettingsChanged */, handleAdminSettingsChanged);
|
|
47380
|
+
coreEvents.on("agents-discovered" /* AgentsDiscovered */, handleAgentsDiscovered);
|
|
47397
47381
|
return () => {
|
|
47398
|
-
coreEvents.off(
|
|
47382
|
+
coreEvents.off("settings-changed" /* SettingsChanged */, handleSettingsChanged);
|
|
47399
47383
|
coreEvents.off(
|
|
47400
|
-
|
|
47384
|
+
"admin-settings-changed" /* AdminSettingsChanged */,
|
|
47401
47385
|
handleAdminSettingsChanged
|
|
47402
47386
|
);
|
|
47403
|
-
coreEvents.off(
|
|
47387
|
+
coreEvents.off("agents-discovered" /* AgentsDiscovered */, handleAgentsDiscovered);
|
|
47404
47388
|
};
|
|
47405
47389
|
}, [settings]);
|
|
47406
47390
|
const { errorCount, clearErrorCount } = useErrorCount();
|
|
@@ -47466,11 +47450,11 @@ var AppContainer = (props) => {
|
|
|
47466
47450
|
exitEditorDialog
|
|
47467
47451
|
} = useEditorSettings(settings, setEditorError, historyManager.addItem);
|
|
47468
47452
|
(0, import_react124.useEffect)(() => {
|
|
47469
|
-
coreEvents.on(
|
|
47470
|
-
coreEvents.on(
|
|
47453
|
+
coreEvents.on("external-editor-closed" /* ExternalEditorClosed */, handleEditorClose);
|
|
47454
|
+
coreEvents.on("request-editor-selection" /* RequestEditorSelection */, openEditorDialog);
|
|
47471
47455
|
return () => {
|
|
47472
|
-
coreEvents.off(
|
|
47473
|
-
coreEvents.off(
|
|
47456
|
+
coreEvents.off("external-editor-closed" /* ExternalEditorClosed */, handleEditorClose);
|
|
47457
|
+
coreEvents.off("request-editor-selection" /* RequestEditorSelection */, openEditorDialog);
|
|
47474
47458
|
};
|
|
47475
47459
|
}, [handleEditorClose, openEditorDialog]);
|
|
47476
47460
|
(0, import_react124.useEffect)(() => {
|
|
@@ -47538,7 +47522,7 @@ var AppContainer = (props) => {
|
|
|
47538
47522
|
errorVerbosity: settings.merged.ui.errorVerbosity
|
|
47539
47523
|
});
|
|
47540
47524
|
const isAuthDialogOpen = authState === "updating" /* Updating */;
|
|
47541
|
-
const isAuthenticating = authState === "unauthenticated" /* Unauthenticated */ && settings.merged.security.auth.selectedType !==
|
|
47525
|
+
const isAuthenticating = authState === "unauthenticated" /* Unauthenticated */ && settings.merged.security.auth.selectedType !== "gemini-api-key" /* USE_GEMINI */;
|
|
47542
47526
|
const isGeminiClientInitialized = config.getGeminiClient()?.isInitialized();
|
|
47543
47527
|
const { loadHistoryForResume, isResuming } = useSessionResume({
|
|
47544
47528
|
config,
|
|
@@ -47566,7 +47550,7 @@ var AppContainer = (props) => {
|
|
|
47566
47550
|
async (authType, scope) => {
|
|
47567
47551
|
if (authType) {
|
|
47568
47552
|
const previousAuthType = config.getContentGeneratorConfig()?.authType ?? "unknown";
|
|
47569
|
-
if (authType ===
|
|
47553
|
+
if (authType === "oauth-personal" /* LOGIN_WITH_GOOGLE */) {
|
|
47570
47554
|
setAuthContext({ requiresRestart: true });
|
|
47571
47555
|
} else {
|
|
47572
47556
|
setAuthContext({});
|
|
@@ -47594,7 +47578,7 @@ var AppContainer = (props) => {
|
|
|
47594
47578
|
);
|
|
47595
47579
|
return;
|
|
47596
47580
|
}
|
|
47597
|
-
if (authType ===
|
|
47581
|
+
if (authType === "oauth-personal" /* LOGIN_WITH_GOOGLE */ && config.isBrowserLaunchSuppressed()) {
|
|
47598
47582
|
writeToStdout(`
|
|
47599
47583
|
----------------------------------------------------------------
|
|
47600
47584
|
Logging in with Google... Restarting Gemini CLI to continue.
|
|
@@ -47619,7 +47603,7 @@ Logging in with Google... Restarting Gemini CLI to continue.
|
|
|
47619
47603
|
}
|
|
47620
47604
|
await saveApiKey(apiKey);
|
|
47621
47605
|
await reloadApiKey();
|
|
47622
|
-
await config.refreshAuth(
|
|
47606
|
+
await config.refreshAuth("gemini-api-key" /* USE_GEMINI */);
|
|
47623
47607
|
setAuthState("authenticated" /* Authenticated */);
|
|
47624
47608
|
} catch (e) {
|
|
47625
47609
|
onAuthError(
|
|
@@ -47644,7 +47628,7 @@ Logging in with Google... Restarting Gemini CLI to continue.
|
|
|
47644
47628
|
`Authentication is enforced to be ${settings.merged.security.auth.enforcedType}, but you are currently using ${settings.merged.security.auth.selectedType}.`
|
|
47645
47629
|
);
|
|
47646
47630
|
} else if (settings.merged.security.auth.selectedType && !settings.merged.security.auth.useExternal) {
|
|
47647
|
-
if (settings.merged.security.auth.selectedType ===
|
|
47631
|
+
if (settings.merged.security.auth.selectedType === "gemini-api-key" /* USE_GEMINI */) {
|
|
47648
47632
|
return;
|
|
47649
47633
|
}
|
|
47650
47634
|
const error = validateAuthMethod(
|
|
@@ -47763,9 +47747,9 @@ Logging in with Google... Restarting Gemini CLI to continue.
|
|
|
47763
47747
|
}
|
|
47764
47748
|
});
|
|
47765
47749
|
};
|
|
47766
|
-
coreEvents.on(
|
|
47750
|
+
coreEvents.on("consent-request" /* ConsentRequest */, handleConsentRequest);
|
|
47767
47751
|
return () => {
|
|
47768
|
-
coreEvents.off(
|
|
47752
|
+
coreEvents.off("consent-request" /* ConsentRequest */, handleConsentRequest);
|
|
47769
47753
|
};
|
|
47770
47754
|
}, []);
|
|
47771
47755
|
const performMemoryRefresh = (0, import_react124.useCallback)(async () => {
|
|
@@ -48368,7 +48352,7 @@ ${queuedText}` : queuedText;
|
|
|
48368
48352
|
if (keyMatchers["app.showErrorDetails" /* SHOW_ERROR_DETAILS */](key)) {
|
|
48369
48353
|
if (settings.merged.general.devtools) {
|
|
48370
48354
|
void (async () => {
|
|
48371
|
-
const { toggleDevToolsPanel } = await import("./devtoolsService-
|
|
48355
|
+
const { toggleDevToolsPanel } = await import("./devtoolsService-QTW7GHQP.js");
|
|
48372
48356
|
await toggleDevToolsPanel(
|
|
48373
48357
|
config,
|
|
48374
48358
|
showErrorDetails,
|
|
@@ -48569,10 +48553,10 @@ ${queuedText}` : queuedText;
|
|
|
48569
48553
|
);
|
|
48570
48554
|
}
|
|
48571
48555
|
};
|
|
48572
|
-
coreEvents.on(
|
|
48556
|
+
coreEvents.on("user-feedback" /* UserFeedback */, handleUserFeedback);
|
|
48573
48557
|
coreEvents.drainBacklogs();
|
|
48574
48558
|
return () => {
|
|
48575
|
-
coreEvents.off(
|
|
48559
|
+
coreEvents.off("user-feedback" /* UserFeedback */, handleUserFeedback);
|
|
48576
48560
|
};
|
|
48577
48561
|
}, [historyManager]);
|
|
48578
48562
|
const nightly = props.version.includes("nightly");
|
|
@@ -48670,9 +48654,9 @@ ${queuedText}` : queuedText;
|
|
|
48670
48654
|
const handleMemoryChanged = (result) => {
|
|
48671
48655
|
setGeminiMdFileCount(result.fileCount);
|
|
48672
48656
|
};
|
|
48673
|
-
coreEvents.on(
|
|
48657
|
+
coreEvents.on("memory-changed" /* MemoryChanged */, handleMemoryChanged);
|
|
48674
48658
|
return () => {
|
|
48675
|
-
coreEvents.off(
|
|
48659
|
+
coreEvents.off("memory-changed" /* MemoryChanged */, handleMemoryChanged);
|
|
48676
48660
|
};
|
|
48677
48661
|
}, []);
|
|
48678
48662
|
(0, import_react124.useEffect)(() => {
|