@google/gemini-cli 0.36.0-preview.6 → 0.36.0-preview.7
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-QTNBTOHX.js → chunk-2RCLDWUX.js} +5 -4
- package/bundle/{chunk-4P6XQ35T.js → chunk-APAYS2LE.js} +5 -4
- package/bundle/{chunk-PDW366WH.js → chunk-EHC7O4TG.js} +84 -28
- package/bundle/{chunk-U2JBMR75.js → chunk-GDBDMLKR.js} +83 -27
- package/bundle/{chunk-PXG3YTLU.js → chunk-MYI75E6G.js} +20 -6
- package/bundle/{chunk-OE54FCNN.js → chunk-NYCY3Q2B.js} +102 -17
- package/bundle/{chunk-5JYGJANN.js → chunk-QTVUHTZR.js} +5 -4
- package/bundle/{chunk-HLML5SVJ.js → chunk-S2IQOR7T.js} +15 -6
- package/bundle/{chunk-I3Z6XPMI.js → chunk-VA3P26WZ.js} +84 -28
- package/bundle/{chunk-NBSN2ZY6.js → chunk-YTGZ6CSI.js} +5 -4
- package/bundle/{core-NSYWNIRO.js → core-BHH4RB6L.js} +2 -2
- package/bundle/{devtoolsService-MQCND52T.js → devtoolsService-4QGIZO5B.js} +3 -3
- package/bundle/{devtoolsService-2I6GE4QG.js → devtoolsService-GJALET3B.js} +3 -3
- package/bundle/{devtoolsService-FPXH5TOL.js → devtoolsService-Q6LGZKTJ.js} +3 -3
- package/bundle/{devtoolsService-3NAUMYXJ.js → devtoolsService-STAWBGOY.js} +3 -3
- package/bundle/{dist-2L2ZZ6UU.js → dist-SWQPYLLV.js} +2 -2
- package/bundle/{dist-ECE6U2CF.js → dist-YHAAIIZP.js} +2 -2
- package/bundle/{dist-JYBWVV27.js → dist-YOBWJF52.js} +2 -2
- package/bundle/docs/reference/configuration.md +25 -1
- package/bundle/gemini.js +7 -7
- package/bundle/{interactiveCli-T2GH3MML.js → interactiveCli-B6Y3UISW.js} +197 -211
- package/bundle/{interactiveCli-HNW3RGAN.js → interactiveCli-HYY2W6AF.js} +197 -211
- package/bundle/{interactiveCli-NZ7FBLY6.js → interactiveCli-MEBWWWE7.js} +197 -211
- package/bundle/{interactiveCli-MKWLBXZL.js → interactiveCli-YJFA3P4G.js} +197 -211
- package/bundle/{memoryDiscovery-JXHCZBWK.js → memoryDiscovery-BQGYT4OD.js} +1 -1
- package/bundle/{memoryDiscovery-VQKOP6YW.js → memoryDiscovery-FCEPFZ3M.js} +1 -1
- package/bundle/node_modules/@google/gemini-cli-devtools/package.json +1 -1
- package/bundle/{oauth2-provider-CD23TXNI.js → oauth2-provider-DLPX23GY.js} +2 -2
- package/bundle/{oauth2-provider-3IFRA7CZ.js → oauth2-provider-IGY3DL3D.js} +2 -2
- package/bundle/{oauth2-provider-Q3ET7DXL.js → oauth2-provider-MKUXMD5I.js} +2 -2
- package/bundle/{oauth2-provider-TMPMYL3F.js → oauth2-provider-TIKPJAVU.js} +2 -2
- package/package.json +1 -1
|
@@ -181,7 +181,7 @@ import {
|
|
|
181
181
|
widestLineFromStyledChars,
|
|
182
182
|
wordBreakStyledChars,
|
|
183
183
|
wrapStyledChars
|
|
184
|
-
} from "./chunk-
|
|
184
|
+
} from "./chunk-2RCLDWUX.js";
|
|
185
185
|
import {
|
|
186
186
|
ApiKeyUpdatedEvent,
|
|
187
187
|
AsyncFzf,
|
|
@@ -290,10 +290,9 @@ import {
|
|
|
290
290
|
validatePlanContent,
|
|
291
291
|
validatePlanPath,
|
|
292
292
|
writeToStdout
|
|
293
|
-
} from "./chunk-
|
|
293
|
+
} from "./chunk-NYCY3Q2B.js";
|
|
294
294
|
import {
|
|
295
295
|
ACTIVATE_SKILL_TOOL_NAME,
|
|
296
|
-
ASK_USER_TOOL_NAME,
|
|
297
296
|
ChangeAuthRequestedError,
|
|
298
297
|
DEFAULT_GEMINI_FLASH_LITE_MODEL,
|
|
299
298
|
DEFAULT_GEMINI_FLASH_MODEL,
|
|
@@ -329,7 +328,7 @@ import {
|
|
|
329
328
|
safeJsonToMarkdown,
|
|
330
329
|
shortenPath,
|
|
331
330
|
tildeifyPath
|
|
332
|
-
} from "./chunk-
|
|
331
|
+
} from "./chunk-MYI75E6G.js";
|
|
333
332
|
import "./chunk-664ZODQF.js";
|
|
334
333
|
import "./chunk-RJTRUG2J.js";
|
|
335
334
|
import "./chunk-IUUIT4SU.js";
|
|
@@ -20948,14 +20947,14 @@ function useMouseContext() {
|
|
|
20948
20947
|
return context;
|
|
20949
20948
|
}
|
|
20950
20949
|
function useMouse(handler, { isActive = true } = {}) {
|
|
20951
|
-
const { subscribe, unsubscribe } = useMouseContext();
|
|
20950
|
+
const { subscribe: subscribe2, unsubscribe } = useMouseContext();
|
|
20952
20951
|
(0, import_react12.useEffect)(() => {
|
|
20953
20952
|
if (!isActive) {
|
|
20954
20953
|
return;
|
|
20955
20954
|
}
|
|
20956
|
-
|
|
20955
|
+
subscribe2(handler);
|
|
20957
20956
|
return () => unsubscribe(handler);
|
|
20958
|
-
}, [isActive, handler,
|
|
20957
|
+
}, [isActive, handler, subscribe2, unsubscribe]);
|
|
20959
20958
|
}
|
|
20960
20959
|
function MouseProvider({
|
|
20961
20960
|
children,
|
|
@@ -20966,7 +20965,7 @@ function MouseProvider({
|
|
|
20966
20965
|
const { stdin } = use_stdin_default();
|
|
20967
20966
|
const subscribers = (0, import_react12.useRef)(/* @__PURE__ */ new Set()).current;
|
|
20968
20967
|
const lastClickRef = (0, import_react12.useRef)(null);
|
|
20969
|
-
const
|
|
20968
|
+
const subscribe2 = (0, import_react12.useCallback)(
|
|
20970
20969
|
(handler) => {
|
|
20971
20970
|
subscribers.add(handler);
|
|
20972
20971
|
},
|
|
@@ -21046,24 +21045,24 @@ function MouseProvider({
|
|
|
21046
21045
|
};
|
|
21047
21046
|
}, [stdin, mouseEventsEnabled, subscribers, debugKeystrokeLogging]);
|
|
21048
21047
|
const contextValue = (0, import_react12.useMemo)(
|
|
21049
|
-
() => ({ subscribe, unsubscribe }),
|
|
21050
|
-
[
|
|
21048
|
+
() => ({ subscribe: subscribe2, unsubscribe }),
|
|
21049
|
+
[subscribe2, unsubscribe]
|
|
21051
21050
|
);
|
|
21052
21051
|
return /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(MouseContext.Provider, { value: contextValue, children });
|
|
21053
21052
|
}
|
|
21054
21053
|
|
|
21055
21054
|
// packages/cli/src/ui/hooks/useMouse.ts
|
|
21056
21055
|
function useMouse2(onMouseEvent, { isActive }) {
|
|
21057
|
-
const { subscribe, unsubscribe } = useMouseContext();
|
|
21056
|
+
const { subscribe: subscribe2, unsubscribe } = useMouseContext();
|
|
21058
21057
|
(0, import_react13.useEffect)(() => {
|
|
21059
21058
|
if (!isActive) {
|
|
21060
21059
|
return;
|
|
21061
21060
|
}
|
|
21062
|
-
|
|
21061
|
+
subscribe2(onMouseEvent);
|
|
21063
21062
|
return () => {
|
|
21064
21063
|
unsubscribe(onMouseEvent);
|
|
21065
21064
|
};
|
|
21066
|
-
}, [isActive, onMouseEvent,
|
|
21065
|
+
}, [isActive, onMouseEvent, subscribe2, unsubscribe]);
|
|
21067
21066
|
}
|
|
21068
21067
|
|
|
21069
21068
|
// packages/cli/src/ui/contexts/ScrollProvider.tsx
|
|
@@ -24032,7 +24031,7 @@ var ToolGroupMessage = ({
|
|
|
24032
24031
|
) : void 0;
|
|
24033
24032
|
const contentWidth = terminalWidth - TOOL_MESSAGE_HORIZONTAL_MARGIN;
|
|
24034
24033
|
const isExplicitClosingSlice = allToolCalls.length === 0;
|
|
24035
|
-
if (visibleToolCalls.length === 0 &&
|
|
24034
|
+
if (visibleToolCalls.length === 0 && !isExplicitClosingSlice) {
|
|
24036
24035
|
return null;
|
|
24037
24036
|
}
|
|
24038
24037
|
const content = /* @__PURE__ */ (0, import_jsx_runtime33.jsxs)(
|
|
@@ -24108,7 +24107,7 @@ var ToolGroupMessage = ({
|
|
|
24108
24107
|
We have to keep the bottom border separate so it doesn't get
|
|
24109
24108
|
drawn over by the sticky header directly inside it.
|
|
24110
24109
|
*/
|
|
24111
|
-
(visibleToolCalls.length > 0 || borderBottomOverride !== void 0) && /* @__PURE__ */ (0, import_jsx_runtime33.jsx)(
|
|
24110
|
+
(visibleToolCalls.length > 0 || borderBottomOverride !== void 0) && borderBottomOverride !== false && /* @__PURE__ */ (0, import_jsx_runtime33.jsx)(
|
|
24112
24111
|
Box_default,
|
|
24113
24112
|
{
|
|
24114
24113
|
height: 0,
|
|
@@ -24574,7 +24573,7 @@ var Section = ({ title, children }) => /* @__PURE__ */ (0, import_jsx_runtime41.
|
|
|
24574
24573
|
/* @__PURE__ */ (0, import_jsx_runtime41.jsx)(Text, { bold: true, color: theme.text.primary, children: title }),
|
|
24575
24574
|
children
|
|
24576
24575
|
] });
|
|
24577
|
-
var buildModelRows = (models, config, quotas, useGemini3_1 = false, useCustomToolModel = false) => {
|
|
24576
|
+
var buildModelRows = (models, config, quotas, useGemini3_1 = false, useGemini3_1FlashLite = false, useCustomToolModel = false) => {
|
|
24578
24577
|
const getBaseModelName = (name) => name.replace("-001", "");
|
|
24579
24578
|
const usedModelNames = new Set(
|
|
24580
24579
|
Object.keys(models).map(getBaseModelName).map((name) => getDisplayString(name, config))
|
|
@@ -24595,7 +24594,12 @@ var buildModelRows = (models, config, quotas, useGemini3_1 = false, useCustomToo
|
|
|
24595
24594
|
};
|
|
24596
24595
|
});
|
|
24597
24596
|
const quotaRows = quotas?.buckets?.filter(
|
|
24598
|
-
(b) => b.modelId && isActiveModel(
|
|
24597
|
+
(b) => b.modelId && isActiveModel(
|
|
24598
|
+
b.modelId,
|
|
24599
|
+
useGemini3_1,
|
|
24600
|
+
useGemini3_1FlashLite,
|
|
24601
|
+
useCustomToolModel
|
|
24602
|
+
) && !usedModelNames.has(getDisplayString(b.modelId, config))
|
|
24599
24603
|
).map((bucket) => ({
|
|
24600
24604
|
key: bucket.modelId,
|
|
24601
24605
|
modelName: getDisplayString(bucket.modelId, config),
|
|
@@ -24619,6 +24623,7 @@ var ModelUsageTable = ({
|
|
|
24619
24623
|
pooledLimit,
|
|
24620
24624
|
pooledResetTime,
|
|
24621
24625
|
useGemini3_1,
|
|
24626
|
+
useGemini3_1FlashLite,
|
|
24622
24627
|
useCustomToolModel
|
|
24623
24628
|
}) => {
|
|
24624
24629
|
const { stdout } = use_stdout_default();
|
|
@@ -24628,6 +24633,7 @@ var ModelUsageTable = ({
|
|
|
24628
24633
|
config,
|
|
24629
24634
|
quotas,
|
|
24630
24635
|
useGemini3_1,
|
|
24636
|
+
useGemini3_1FlashLite,
|
|
24631
24637
|
useCustomToolModel
|
|
24632
24638
|
);
|
|
24633
24639
|
if (rows.length === 0) {
|
|
@@ -24913,6 +24919,7 @@ var StatsDisplay = ({
|
|
|
24913
24919
|
const settings = useSettings();
|
|
24914
24920
|
const config = useConfig();
|
|
24915
24921
|
const useGemini3_1 = config.getGemini31LaunchedSync?.() ?? false;
|
|
24922
|
+
const useGemini3_1FlashLite = config.getGemini31FlashLiteLaunchedSync?.() ?? false;
|
|
24916
24923
|
const useCustomToolModel = useGemini3_1 && config.getContentGeneratorConfig().authType === "gemini-api-key" /* USE_GEMINI */;
|
|
24917
24924
|
const pooledRemaining = quotaStats?.remaining;
|
|
24918
24925
|
const pooledLimit = quotaStats?.limit;
|
|
@@ -25042,6 +25049,7 @@ var StatsDisplay = ({
|
|
|
25042
25049
|
pooledLimit,
|
|
25043
25050
|
pooledResetTime,
|
|
25044
25051
|
useGemini3_1,
|
|
25052
|
+
useGemini3_1FlashLite,
|
|
25045
25053
|
useCustomToolModel
|
|
25046
25054
|
}
|
|
25047
25055
|
),
|
|
@@ -27738,13 +27746,7 @@ var ChoiceQuestionView = ({
|
|
|
27738
27746
|
const overhead = HEADER_HEIGHT2 + TITLE_MARGIN + FOOTER_HEIGHT2;
|
|
27739
27747
|
const listHeight = availableHeight ? Math.max(1, availableHeight - overhead) : void 0;
|
|
27740
27748
|
const reservedListHeight = Math.min(selectionItems.length * 2, 6);
|
|
27741
|
-
const questionHeightLimit = listHeight && !isAlternateBuffer ? question.unconstrainedHeight ? Math.max(1, listHeight - selectionItems.length * 2) : Math.
|
|
27742
|
-
15,
|
|
27743
|
-
Math.max(
|
|
27744
|
-
1,
|
|
27745
|
-
listHeight - Math.max(DIALOG_PADDING, reservedListHeight)
|
|
27746
|
-
)
|
|
27747
|
-
) : void 0;
|
|
27749
|
+
const questionHeightLimit = listHeight && !isAlternateBuffer ? question.unconstrainedHeight ? Math.max(1, listHeight - selectionItems.length * 2) : Math.max(1, listHeight - Math.max(DIALOG_PADDING, reservedListHeight)) : void 0;
|
|
27748
27750
|
const maxItemsToShow = listHeight && (!isAlternateBuffer || availableHeight !== void 0) ? Math.min(
|
|
27749
27751
|
selectionItems.length,
|
|
27750
27752
|
Math.max(
|
|
@@ -32947,6 +32949,7 @@ function ModelDialog({ onClose }) {
|
|
|
32947
32949
|
const preferredModel = config?.getModel() || DEFAULT_GEMINI_MODEL_AUTO;
|
|
32948
32950
|
const shouldShowPreviewModels = config?.getHasAccessToPreviewModel();
|
|
32949
32951
|
const useGemini31 = config?.getGemini31LaunchedSync?.() ?? false;
|
|
32952
|
+
const useGemini31FlashLite = config?.getGemini31FlashLiteLaunchedSync?.() ?? false;
|
|
32950
32953
|
const selectedAuthType = settings.merged.security.auth.selectedType;
|
|
32951
32954
|
const useCustomToolModel = useGemini31 && selectedAuthType === "gemini-api-key" /* USE_GEMINI */;
|
|
32952
32955
|
const manualModelSelected = (0, import_react65.useMemo)(() => {
|
|
@@ -32961,6 +32964,7 @@ function ModelDialog({ onClose }) {
|
|
|
32961
32964
|
PREVIEW_GEMINI_MODEL,
|
|
32962
32965
|
PREVIEW_GEMINI_3_1_MODEL,
|
|
32963
32966
|
PREVIEW_GEMINI_3_1_CUSTOM_TOOLS_MODEL,
|
|
32967
|
+
PREVIEW_GEMINI_3_1_FLASH_LITE_MODEL,
|
|
32964
32968
|
PREVIEW_GEMINI_FLASH_MODEL
|
|
32965
32969
|
];
|
|
32966
32970
|
if (manualModels.includes(preferredModel)) {
|
|
@@ -33037,7 +33041,6 @@ function ModelDialog({ onClose }) {
|
|
|
33037
33041
|
return list;
|
|
33038
33042
|
}, [config, shouldShowPreviewModels, manualModelSelected, useGemini31]);
|
|
33039
33043
|
const manualOptions = (0, import_react65.useMemo)(() => {
|
|
33040
|
-
const isFreeTier = config?.getUserTier() === UserTierId.FREE;
|
|
33041
33044
|
if (config?.getExperimentalDynamicModelConfiguration?.() === true && config.modelConfigService) {
|
|
33042
33045
|
const list2 = Object.entries(
|
|
33043
33046
|
config.modelConfigService.getModelDefinitions?.() ?? {}
|
|
@@ -33046,19 +33049,19 @@ function ModelDialog({ onClose }) {
|
|
|
33046
33049
|
if (m.isPreview && !shouldShowPreviewModels) return false;
|
|
33047
33050
|
if (m.tier === "auto") return false;
|
|
33048
33051
|
if (!hasAccessToProModel && m.tier === "pro") return false;
|
|
33049
|
-
if (m.tier === "flash-lite" && m.isPreview && !isFreeTier)
|
|
33050
|
-
return false;
|
|
33051
33052
|
if (id === PREVIEW_GEMINI_3_1_MODEL && !useGemini31) return false;
|
|
33052
|
-
if (id === PREVIEW_GEMINI_3_1_FLASH_LITE_MODEL && !
|
|
33053
|
+
if (id === PREVIEW_GEMINI_3_1_FLASH_LITE_MODEL && !useGemini31FlashLite)
|
|
33053
33054
|
return false;
|
|
33054
33055
|
return true;
|
|
33055
33056
|
}).map(([id, m]) => {
|
|
33056
33057
|
const resolvedId = config.modelConfigService.resolveModelId(id, {
|
|
33057
33058
|
useGemini3_1: useGemini31,
|
|
33059
|
+
useGemini3_1FlashLite: useGemini31FlashLite,
|
|
33058
33060
|
useCustomTools: useCustomToolModel
|
|
33059
33061
|
});
|
|
33060
33062
|
const titleId = config.modelConfigService.resolveModelId(id, {
|
|
33061
|
-
useGemini3_1: useGemini31
|
|
33063
|
+
useGemini3_1: useGemini31,
|
|
33064
|
+
useGemini3_1FlashLite: useGemini31FlashLite
|
|
33062
33065
|
});
|
|
33063
33066
|
return {
|
|
33064
33067
|
value: resolvedId,
|
|
@@ -33105,7 +33108,7 @@ function ModelDialog({ onClose }) {
|
|
|
33105
33108
|
key: PREVIEW_GEMINI_FLASH_MODEL
|
|
33106
33109
|
}
|
|
33107
33110
|
];
|
|
33108
|
-
if (
|
|
33111
|
+
if (useGemini31FlashLite) {
|
|
33109
33112
|
previewOptions.push({
|
|
33110
33113
|
value: PREVIEW_GEMINI_3_1_FLASH_LITE_MODEL,
|
|
33111
33114
|
title: getDisplayString(PREVIEW_GEMINI_3_1_FLASH_LITE_MODEL),
|
|
@@ -33121,6 +33124,7 @@ function ModelDialog({ onClose }) {
|
|
|
33121
33124
|
}, [
|
|
33122
33125
|
shouldShowPreviewModels,
|
|
33123
33126
|
useGemini31,
|
|
33127
|
+
useGemini31FlashLite,
|
|
33124
33128
|
useCustomToolModel,
|
|
33125
33129
|
hasAccessToProModel,
|
|
33126
33130
|
config
|
|
@@ -34720,144 +34724,99 @@ var import_react71 = __toESM(require_react(), 1);
|
|
|
34720
34724
|
|
|
34721
34725
|
// packages/cli/src/ui/hooks/useConsoleMessages.ts
|
|
34722
34726
|
var import_react70 = __toESM(require_react(), 1);
|
|
34723
|
-
|
|
34724
|
-
|
|
34725
|
-
|
|
34726
|
-
|
|
34727
|
-
|
|
34728
|
-
|
|
34729
|
-
|
|
34730
|
-
|
|
34731
|
-
|
|
34732
|
-
|
|
34733
|
-
|
|
34734
|
-
|
|
34735
|
-
|
|
34736
|
-
|
|
34737
|
-
|
|
34738
|
-
|
|
34739
|
-
|
|
34740
|
-
|
|
34741
|
-
|
|
34742
|
-
|
|
34727
|
+
var MAX_CONSOLE_MESSAGES = 1e3;
|
|
34728
|
+
var globalConsoleMessages = [];
|
|
34729
|
+
var globalErrorCount = 0;
|
|
34730
|
+
var listeners = /* @__PURE__ */ new Set();
|
|
34731
|
+
var messageQueue = [];
|
|
34732
|
+
var timeoutId = null;
|
|
34733
|
+
function initializeConsoleStore() {
|
|
34734
|
+
if (timeoutId) {
|
|
34735
|
+
clearTimeout(timeoutId);
|
|
34736
|
+
timeoutId = null;
|
|
34737
|
+
}
|
|
34738
|
+
messageQueue = [];
|
|
34739
|
+
globalConsoleMessages = [];
|
|
34740
|
+
globalErrorCount = 0;
|
|
34741
|
+
notifyListeners();
|
|
34742
|
+
coreEvents.off("console-log" /* ConsoleLog */, handleConsoleLog);
|
|
34743
|
+
coreEvents.off("output" /* Output */, handleOutput);
|
|
34744
|
+
coreEvents.on("console-log" /* ConsoleLog */, handleConsoleLog);
|
|
34745
|
+
coreEvents.on("output" /* Output */, handleOutput);
|
|
34746
|
+
}
|
|
34747
|
+
function notifyListeners() {
|
|
34748
|
+
for (const listener of listeners) {
|
|
34749
|
+
listener();
|
|
34750
|
+
}
|
|
34751
|
+
}
|
|
34752
|
+
function processQueue() {
|
|
34753
|
+
if (messageQueue.length === 0) return;
|
|
34754
|
+
const newMessages = [...globalConsoleMessages];
|
|
34755
|
+
for (const queuedMessage of messageQueue) {
|
|
34756
|
+
if (queuedMessage.type === "error") {
|
|
34757
|
+
globalErrorCount++;
|
|
34758
|
+
}
|
|
34759
|
+
const prev = newMessages[newMessages.length - 1];
|
|
34760
|
+
if (prev && prev.type === queuedMessage.type && prev.content === queuedMessage.content) {
|
|
34761
|
+
newMessages[newMessages.length - 1] = {
|
|
34762
|
+
...prev,
|
|
34763
|
+
count: prev.count + 1
|
|
34764
|
+
};
|
|
34765
|
+
} else {
|
|
34766
|
+
newMessages.push({ ...queuedMessage, count: 1 });
|
|
34743
34767
|
}
|
|
34744
|
-
case "CLEAR":
|
|
34745
|
-
return [];
|
|
34746
|
-
default:
|
|
34747
|
-
return state;
|
|
34748
34768
|
}
|
|
34769
|
+
globalConsoleMessages = newMessages.length > MAX_CONSOLE_MESSAGES ? newMessages.slice(-MAX_CONSOLE_MESSAGES) : newMessages;
|
|
34770
|
+
messageQueue = [];
|
|
34771
|
+
timeoutId = null;
|
|
34772
|
+
notifyListeners();
|
|
34749
34773
|
}
|
|
34774
|
+
function handleNewMessage(message) {
|
|
34775
|
+
messageQueue.push(message);
|
|
34776
|
+
if (!timeoutId) {
|
|
34777
|
+
timeoutId = setTimeout(processQueue, 50);
|
|
34778
|
+
}
|
|
34779
|
+
}
|
|
34780
|
+
function subscribe(listener) {
|
|
34781
|
+
listeners.add(listener);
|
|
34782
|
+
return () => {
|
|
34783
|
+
listeners.delete(listener);
|
|
34784
|
+
};
|
|
34785
|
+
}
|
|
34786
|
+
function getConsoleMessagesSnapshot() {
|
|
34787
|
+
return globalConsoleMessages;
|
|
34788
|
+
}
|
|
34789
|
+
function getErrorCountSnapshot() {
|
|
34790
|
+
return globalErrorCount;
|
|
34791
|
+
}
|
|
34792
|
+
var handleConsoleLog = (payload) => {
|
|
34793
|
+
let content = payload.content;
|
|
34794
|
+
const MAX_CONSOLE_MSG_LENGTH = 1e4;
|
|
34795
|
+
if (content.length > MAX_CONSOLE_MSG_LENGTH) {
|
|
34796
|
+
content = content.slice(0, MAX_CONSOLE_MSG_LENGTH) + `... [Truncated ${content.length - MAX_CONSOLE_MSG_LENGTH} characters]`;
|
|
34797
|
+
}
|
|
34798
|
+
handleNewMessage({
|
|
34799
|
+
type: payload.type,
|
|
34800
|
+
content,
|
|
34801
|
+
count: 1
|
|
34802
|
+
});
|
|
34803
|
+
};
|
|
34804
|
+
var handleOutput = (payload) => {
|
|
34805
|
+
let content = typeof payload.chunk === "string" ? payload.chunk : new TextDecoder().decode(payload.chunk);
|
|
34806
|
+
const MAX_OUTPUT_CHUNK_LENGTH = 1e4;
|
|
34807
|
+
if (content.length > MAX_OUTPUT_CHUNK_LENGTH) {
|
|
34808
|
+
content = content.slice(0, MAX_OUTPUT_CHUNK_LENGTH) + `... [Truncated ${content.length - MAX_OUTPUT_CHUNK_LENGTH} characters]`;
|
|
34809
|
+
}
|
|
34810
|
+
handleNewMessage({ type: "log", content, count: 1 });
|
|
34811
|
+
};
|
|
34750
34812
|
function useConsoleMessages() {
|
|
34751
|
-
|
|
34752
|
-
const messageQueueRef = (0, import_react70.useRef)([]);
|
|
34753
|
-
const timeoutRef = (0, import_react70.useRef)(null);
|
|
34754
|
-
const isProcessingRef = (0, import_react70.useRef)(false);
|
|
34755
|
-
const processQueue = (0, import_react70.useCallback)(() => {
|
|
34756
|
-
if (messageQueueRef.current.length > 0) {
|
|
34757
|
-
isProcessingRef.current = true;
|
|
34758
|
-
const messagesToProcess = messageQueueRef.current;
|
|
34759
|
-
messageQueueRef.current = [];
|
|
34760
|
-
(0, import_react70.startTransition)(() => {
|
|
34761
|
-
dispatch({ type: "ADD_MESSAGES", payload: messagesToProcess });
|
|
34762
|
-
});
|
|
34763
|
-
}
|
|
34764
|
-
timeoutRef.current = null;
|
|
34765
|
-
}, []);
|
|
34766
|
-
const handleNewMessage = (0, import_react70.useCallback)(
|
|
34767
|
-
(message) => {
|
|
34768
|
-
messageQueueRef.current.push(message);
|
|
34769
|
-
if (!isProcessingRef.current && !timeoutRef.current) {
|
|
34770
|
-
timeoutRef.current = setTimeout(processQueue, 50);
|
|
34771
|
-
}
|
|
34772
|
-
},
|
|
34773
|
-
[processQueue]
|
|
34774
|
-
);
|
|
34775
|
-
(0, import_react70.useEffect)(() => {
|
|
34776
|
-
isProcessingRef.current = false;
|
|
34777
|
-
if (messageQueueRef.current.length > 0 && !timeoutRef.current) {
|
|
34778
|
-
timeoutRef.current = setTimeout(processQueue, 50);
|
|
34779
|
-
}
|
|
34780
|
-
}, [consoleMessages, processQueue]);
|
|
34781
|
-
(0, import_react70.useEffect)(() => {
|
|
34782
|
-
const handleConsoleLog = (payload) => {
|
|
34783
|
-
let content = payload.content;
|
|
34784
|
-
const MAX_CONSOLE_MSG_LENGTH = 1e4;
|
|
34785
|
-
if (content.length > MAX_CONSOLE_MSG_LENGTH) {
|
|
34786
|
-
content = content.slice(0, MAX_CONSOLE_MSG_LENGTH) + `... [Truncated ${content.length - MAX_CONSOLE_MSG_LENGTH} characters]`;
|
|
34787
|
-
}
|
|
34788
|
-
handleNewMessage({
|
|
34789
|
-
type: payload.type,
|
|
34790
|
-
content,
|
|
34791
|
-
count: 1
|
|
34792
|
-
});
|
|
34793
|
-
};
|
|
34794
|
-
const handleOutput = (payload) => {
|
|
34795
|
-
let content = typeof payload.chunk === "string" ? payload.chunk : new TextDecoder().decode(payload.chunk);
|
|
34796
|
-
const MAX_OUTPUT_CHUNK_LENGTH = 1e4;
|
|
34797
|
-
if (content.length > MAX_OUTPUT_CHUNK_LENGTH) {
|
|
34798
|
-
content = content.slice(0, MAX_OUTPUT_CHUNK_LENGTH) + `... [Truncated ${content.length - MAX_OUTPUT_CHUNK_LENGTH} characters]`;
|
|
34799
|
-
}
|
|
34800
|
-
handleNewMessage({ type: "log", content, count: 1 });
|
|
34801
|
-
};
|
|
34802
|
-
coreEvents.on("console-log" /* ConsoleLog */, handleConsoleLog);
|
|
34803
|
-
coreEvents.on("output" /* Output */, handleOutput);
|
|
34804
|
-
return () => {
|
|
34805
|
-
coreEvents.off("console-log" /* ConsoleLog */, handleConsoleLog);
|
|
34806
|
-
coreEvents.off("output" /* Output */, handleOutput);
|
|
34807
|
-
};
|
|
34808
|
-
}, [handleNewMessage]);
|
|
34809
|
-
const clearConsoleMessages = (0, import_react70.useCallback)(() => {
|
|
34810
|
-
if (timeoutRef.current) {
|
|
34811
|
-
clearTimeout(timeoutRef.current);
|
|
34812
|
-
timeoutRef.current = null;
|
|
34813
|
-
}
|
|
34814
|
-
messageQueueRef.current = [];
|
|
34815
|
-
isProcessingRef.current = true;
|
|
34816
|
-
(0, import_react70.startTransition)(() => {
|
|
34817
|
-
dispatch({ type: "CLEAR" });
|
|
34818
|
-
});
|
|
34819
|
-
}, []);
|
|
34820
|
-
(0, import_react70.useEffect)(
|
|
34821
|
-
() => () => {
|
|
34822
|
-
if (timeoutRef.current) {
|
|
34823
|
-
clearTimeout(timeoutRef.current);
|
|
34824
|
-
}
|
|
34825
|
-
},
|
|
34826
|
-
[]
|
|
34827
|
-
);
|
|
34828
|
-
return { consoleMessages, clearConsoleMessages };
|
|
34813
|
+
return (0, import_react70.useSyncExternalStore)(subscribe, getConsoleMessagesSnapshot);
|
|
34829
34814
|
}
|
|
34830
34815
|
function useErrorCount() {
|
|
34831
|
-
const
|
|
34832
|
-
(state, action) => {
|
|
34833
|
-
switch (action) {
|
|
34834
|
-
case "INCREMENT":
|
|
34835
|
-
return state + 1;
|
|
34836
|
-
case "CLEAR":
|
|
34837
|
-
return 0;
|
|
34838
|
-
default:
|
|
34839
|
-
return state;
|
|
34840
|
-
}
|
|
34841
|
-
},
|
|
34842
|
-
0
|
|
34843
|
-
);
|
|
34844
|
-
(0, import_react70.useEffect)(() => {
|
|
34845
|
-
const handleConsoleLog = (payload) => {
|
|
34846
|
-
if (payload.type === "error") {
|
|
34847
|
-
(0, import_react70.startTransition)(() => {
|
|
34848
|
-
dispatch("INCREMENT");
|
|
34849
|
-
});
|
|
34850
|
-
}
|
|
34851
|
-
};
|
|
34852
|
-
coreEvents.on("console-log" /* ConsoleLog */, handleConsoleLog);
|
|
34853
|
-
return () => {
|
|
34854
|
-
coreEvents.off("console-log" /* ConsoleLog */, handleConsoleLog);
|
|
34855
|
-
};
|
|
34856
|
-
}, []);
|
|
34816
|
+
const errorCount = (0, import_react70.useSyncExternalStore)(subscribe, getErrorCountSnapshot);
|
|
34857
34817
|
const clearErrorCount = (0, import_react70.useCallback)(() => {
|
|
34858
|
-
|
|
34859
|
-
|
|
34860
|
-
});
|
|
34818
|
+
globalErrorCount = 0;
|
|
34819
|
+
notifyListeners();
|
|
34861
34820
|
}, []);
|
|
34862
34821
|
return { errorCount, clearErrorCount };
|
|
34863
34822
|
}
|
|
@@ -34867,7 +34826,7 @@ var import_jsx_runtime113 = __toESM(require_jsx_runtime(), 1);
|
|
|
34867
34826
|
var iconBoxWidth = 3;
|
|
34868
34827
|
var DetailedMessagesDisplay = ({ maxHeight, width, hasFocus }) => {
|
|
34869
34828
|
const scrollableListRef = (0, import_react71.useRef)(null);
|
|
34870
|
-
const
|
|
34829
|
+
const consoleMessages = useConsoleMessages();
|
|
34871
34830
|
const config = useConfig();
|
|
34872
34831
|
const messages = (0, import_react71.useMemo)(() => {
|
|
34873
34832
|
if (config.getDebugMode()) {
|
|
@@ -36960,11 +36919,11 @@ function usePromptCompletion({
|
|
|
36960
36919
|
clearGhostText
|
|
36961
36920
|
]);
|
|
36962
36921
|
(0, import_react79.useEffect)(() => {
|
|
36963
|
-
const
|
|
36922
|
+
const timeoutId2 = setTimeout(
|
|
36964
36923
|
handlePromptCompletion,
|
|
36965
36924
|
PROMPT_COMPLETION_DEBOUNCE_MS
|
|
36966
36925
|
);
|
|
36967
|
-
return () => clearTimeout(
|
|
36926
|
+
return () => clearTimeout(timeoutId2);
|
|
36968
36927
|
}, [buffer.text, buffer.cursor, handlePromptCompletion]);
|
|
36969
36928
|
(0, import_react79.useEffect)(() => {
|
|
36970
36929
|
const currentText = buffer.text.trim();
|
|
@@ -38681,20 +38640,20 @@ var InputPrompt = ({
|
|
|
38681
38640
|
var import_jsx_runtime119 = __toESM(require_jsx_runtime(), 1);
|
|
38682
38641
|
var MAX_DISPLAYED_QUEUED_MESSAGES = 3;
|
|
38683
38642
|
var QueuedMessageDisplay = ({
|
|
38684
|
-
messageQueue
|
|
38643
|
+
messageQueue: messageQueue2
|
|
38685
38644
|
}) => {
|
|
38686
|
-
if (
|
|
38645
|
+
if (messageQueue2.length === 0) {
|
|
38687
38646
|
return null;
|
|
38688
38647
|
}
|
|
38689
38648
|
return /* @__PURE__ */ (0, import_jsx_runtime119.jsxs)(Box_default, { flexDirection: "column", marginTop: 1, children: [
|
|
38690
38649
|
/* @__PURE__ */ (0, import_jsx_runtime119.jsx)(Box_default, { paddingLeft: 2, children: /* @__PURE__ */ (0, import_jsx_runtime119.jsx)(Text, { dimColor: true, children: "Queued (press \u2191 to edit):" }) }),
|
|
38691
|
-
|
|
38650
|
+
messageQueue2.slice(0, MAX_DISPLAYED_QUEUED_MESSAGES).map((message, index) => {
|
|
38692
38651
|
const preview = message.replace(/\s+/g, " ");
|
|
38693
38652
|
return /* @__PURE__ */ (0, import_jsx_runtime119.jsx)(Box_default, { paddingLeft: 4, width: "100%", children: /* @__PURE__ */ (0, import_jsx_runtime119.jsx)(Text, { dimColor: true, wrap: "truncate", children: preview }) }, index);
|
|
38694
38653
|
}),
|
|
38695
|
-
|
|
38654
|
+
messageQueue2.length > MAX_DISPLAYED_QUEUED_MESSAGES && /* @__PURE__ */ (0, import_jsx_runtime119.jsx)(Box_default, { paddingLeft: 4, children: /* @__PURE__ */ (0, import_jsx_runtime119.jsxs)(Text, { dimColor: true, children: [
|
|
38696
38655
|
"... (+",
|
|
38697
|
-
|
|
38656
|
+
messageQueue2.length - MAX_DISPLAYED_QUEUED_MESSAGES,
|
|
38698
38657
|
" more)"
|
|
38699
38658
|
] }) })
|
|
38700
38659
|
] });
|
|
@@ -40404,7 +40363,7 @@ function TerminalProvider({ children }) {
|
|
|
40404
40363
|
const { stdout } = use_stdout_default();
|
|
40405
40364
|
const subscribers = (0, import_react93.useRef)(/* @__PURE__ */ new Set()).current;
|
|
40406
40365
|
const bufferRef = (0, import_react93.useRef)("");
|
|
40407
|
-
const
|
|
40366
|
+
const subscribe2 = (0, import_react93.useCallback)(
|
|
40408
40367
|
(handler) => {
|
|
40409
40368
|
subscribers.add(handler);
|
|
40410
40369
|
},
|
|
@@ -40422,14 +40381,14 @@ function TerminalProvider({ children }) {
|
|
|
40422
40381
|
unsubscribe(handler);
|
|
40423
40382
|
resolve3();
|
|
40424
40383
|
};
|
|
40425
|
-
|
|
40384
|
+
subscribe2(handler);
|
|
40426
40385
|
TerminalCapabilityManager.queryBackgroundColor(stdout);
|
|
40427
40386
|
setTimeout(() => {
|
|
40428
40387
|
unsubscribe(handler);
|
|
40429
40388
|
resolve3();
|
|
40430
40389
|
}, 100);
|
|
40431
40390
|
}),
|
|
40432
|
-
[stdout,
|
|
40391
|
+
[stdout, subscribe2, unsubscribe]
|
|
40433
40392
|
);
|
|
40434
40393
|
(0, import_react93.useEffect)(() => {
|
|
40435
40394
|
const handleData = (data) => {
|
|
@@ -40459,7 +40418,7 @@ function TerminalProvider({ children }) {
|
|
|
40459
40418
|
return /* @__PURE__ */ (0, import_jsx_runtime132.jsx)(
|
|
40460
40419
|
TerminalContext.Provider,
|
|
40461
40420
|
{
|
|
40462
|
-
value: { subscribe, unsubscribe, queryTerminalBackground },
|
|
40421
|
+
value: { subscribe: subscribe2, unsubscribe, queryTerminalBackground },
|
|
40463
40422
|
children
|
|
40464
40423
|
}
|
|
40465
40424
|
);
|
|
@@ -42514,8 +42473,24 @@ var useGeminiStream = (geminiClient, history, addItem, config, settings, onDebug
|
|
|
42514
42473
|
const allPushed = toolCalls.length > 0 && toolCalls.every((tc) => pushedToolCallIds.has(tc.request.callId));
|
|
42515
42474
|
const anyVisibleInHistory = pushedToolCallIds.size > 0;
|
|
42516
42475
|
const anyVisibleInPending = remainingTools.some((tc) => {
|
|
42517
|
-
const
|
|
42518
|
-
|
|
42476
|
+
const displayName = tc.tool?.displayName ?? tc.request.name;
|
|
42477
|
+
let hasResultDisplay = false;
|
|
42478
|
+
if (tc.status === "success" /* Success */ || tc.status === "error" /* Error */ || tc.status === "cancelled" /* Cancelled */) {
|
|
42479
|
+
hasResultDisplay = !!tc.response?.resultDisplay;
|
|
42480
|
+
} else if (tc.status === "executing" /* Executing */) {
|
|
42481
|
+
hasResultDisplay = !!tc.liveOutput;
|
|
42482
|
+
}
|
|
42483
|
+
if (shouldHideToolCall({
|
|
42484
|
+
displayName,
|
|
42485
|
+
status: tc.status,
|
|
42486
|
+
approvalMode: tc.approvalMode,
|
|
42487
|
+
hasResultDisplay,
|
|
42488
|
+
parentCallId: tc.request.parentCallId
|
|
42489
|
+
})) {
|
|
42490
|
+
return false;
|
|
42491
|
+
}
|
|
42492
|
+
const displayStatus = mapCoreStatusToDisplayStatus(tc.status);
|
|
42493
|
+
if (displayStatus === "Confirming" /* Confirming */) {
|
|
42519
42494
|
return false;
|
|
42520
42495
|
}
|
|
42521
42496
|
return true;
|
|
@@ -45476,14 +45451,14 @@ var TimeoutError = class extends Error {
|
|
|
45476
45451
|
// node_modules/ky/distribution/utils/timeout.js
|
|
45477
45452
|
async function timeout(request, init, abortController, options) {
|
|
45478
45453
|
return new Promise((resolve3, reject) => {
|
|
45479
|
-
const
|
|
45454
|
+
const timeoutId2 = setTimeout(() => {
|
|
45480
45455
|
if (abortController) {
|
|
45481
45456
|
abortController.abort();
|
|
45482
45457
|
}
|
|
45483
45458
|
reject(new TimeoutError(request));
|
|
45484
45459
|
}, options.timeout);
|
|
45485
45460
|
void options.fetch(request, init).then(resolve3).catch(reject).then(() => {
|
|
45486
|
-
clearTimeout(
|
|
45461
|
+
clearTimeout(timeoutId2);
|
|
45487
45462
|
});
|
|
45488
45463
|
});
|
|
45489
45464
|
}
|
|
@@ -45496,10 +45471,10 @@ async function delay(ms, { signal }) {
|
|
|
45496
45471
|
signal.addEventListener("abort", abortHandler, { once: true });
|
|
45497
45472
|
}
|
|
45498
45473
|
function abortHandler() {
|
|
45499
|
-
clearTimeout(
|
|
45474
|
+
clearTimeout(timeoutId2);
|
|
45500
45475
|
reject(signal.reason);
|
|
45501
45476
|
}
|
|
45502
|
-
const
|
|
45477
|
+
const timeoutId2 = setTimeout(() => {
|
|
45503
45478
|
signal?.removeEventListener("abort", abortHandler);
|
|
45504
45479
|
resolve3();
|
|
45505
45480
|
}, ms);
|
|
@@ -46009,7 +45984,7 @@ function useMessageQueue({
|
|
|
46009
45984
|
submitQuery,
|
|
46010
45985
|
isMcpReady
|
|
46011
45986
|
}) {
|
|
46012
|
-
const [
|
|
45987
|
+
const [messageQueue2, setMessageQueue] = (0, import_react109.useState)([]);
|
|
46013
45988
|
const addMessage = (0, import_react109.useCallback)((message) => {
|
|
46014
45989
|
const trimmedMessage = message.trim();
|
|
46015
45990
|
if (trimmedMessage.length > 0) {
|
|
@@ -46020,20 +45995,20 @@ function useMessageQueue({
|
|
|
46020
45995
|
setMessageQueue([]);
|
|
46021
45996
|
}, []);
|
|
46022
45997
|
const getQueuedMessagesText = (0, import_react109.useCallback)(() => {
|
|
46023
|
-
if (
|
|
46024
|
-
return
|
|
46025
|
-
}, [
|
|
45998
|
+
if (messageQueue2.length === 0) return "";
|
|
45999
|
+
return messageQueue2.join("\n\n");
|
|
46000
|
+
}, [messageQueue2]);
|
|
46026
46001
|
const popAllMessages = (0, import_react109.useCallback)(() => {
|
|
46027
|
-
if (
|
|
46002
|
+
if (messageQueue2.length === 0) {
|
|
46028
46003
|
return void 0;
|
|
46029
46004
|
}
|
|
46030
|
-
const allMessages =
|
|
46005
|
+
const allMessages = messageQueue2.join("\n\n");
|
|
46031
46006
|
setMessageQueue([]);
|
|
46032
46007
|
return allMessages;
|
|
46033
|
-
}, [
|
|
46008
|
+
}, [messageQueue2]);
|
|
46034
46009
|
(0, import_react109.useEffect)(() => {
|
|
46035
|
-
if (isConfigInitialized && streamingState === "idle" /* Idle */ && isMcpReady &&
|
|
46036
|
-
const combinedMessage =
|
|
46010
|
+
if (isConfigInitialized && streamingState === "idle" /* Idle */ && isMcpReady && messageQueue2.length > 0) {
|
|
46011
|
+
const combinedMessage = messageQueue2.join("\n\n");
|
|
46037
46012
|
setMessageQueue([]);
|
|
46038
46013
|
submitQuery(combinedMessage);
|
|
46039
46014
|
}
|
|
@@ -46041,11 +46016,11 @@ function useMessageQueue({
|
|
|
46041
46016
|
isConfigInitialized,
|
|
46042
46017
|
streamingState,
|
|
46043
46018
|
isMcpReady,
|
|
46044
|
-
|
|
46019
|
+
messageQueue2,
|
|
46045
46020
|
submitQuery
|
|
46046
46021
|
]);
|
|
46047
46022
|
return {
|
|
46048
|
-
messageQueue,
|
|
46023
|
+
messageQueue: messageQueue2,
|
|
46049
46024
|
addMessage,
|
|
46050
46025
|
clearQueue,
|
|
46051
46026
|
getQueuedMessagesText,
|
|
@@ -46518,11 +46493,11 @@ var useHookDisplayState = () => {
|
|
|
46518
46493
|
});
|
|
46519
46494
|
};
|
|
46520
46495
|
if (remaining > 0) {
|
|
46521
|
-
const
|
|
46496
|
+
const timeoutId2 = setTimeout(() => {
|
|
46522
46497
|
removeHook();
|
|
46523
|
-
activeTimeouts.delete(
|
|
46498
|
+
activeTimeouts.delete(timeoutId2);
|
|
46524
46499
|
}, remaining);
|
|
46525
|
-
activeTimeouts.add(
|
|
46500
|
+
activeTimeouts.add(timeoutId2);
|
|
46526
46501
|
} else {
|
|
46527
46502
|
removeHook();
|
|
46528
46503
|
}
|
|
@@ -46639,7 +46614,7 @@ var LoginWithGoogleRestartDialog = ({
|
|
|
46639
46614
|
var import_react118 = __toESM(require_react(), 1);
|
|
46640
46615
|
function useTerminalTheme(handleThemeSelect, config, refreshStatic) {
|
|
46641
46616
|
const settings = useSettings();
|
|
46642
|
-
const { subscribe, unsubscribe, queryTerminalBackground } = useTerminalContext();
|
|
46617
|
+
const { subscribe: subscribe2, unsubscribe, queryTerminalBackground } = useTerminalContext();
|
|
46643
46618
|
(0, import_react118.useEffect)(() => {
|
|
46644
46619
|
if (settings.merged.ui.autoThemeSwitching === false) {
|
|
46645
46620
|
return;
|
|
@@ -46684,7 +46659,7 @@ function useTerminalTheme(handleThemeSelect, config, refreshStatic) {
|
|
|
46684
46659
|
refreshStatic();
|
|
46685
46660
|
}
|
|
46686
46661
|
};
|
|
46687
|
-
|
|
46662
|
+
subscribe2(handleTerminalBackground);
|
|
46688
46663
|
return () => {
|
|
46689
46664
|
clearInterval(pollIntervalId);
|
|
46690
46665
|
unsubscribe(handleTerminalBackground);
|
|
@@ -46695,7 +46670,7 @@ function useTerminalTheme(handleThemeSelect, config, refreshStatic) {
|
|
|
46695
46670
|
settings.merged.ui.terminalBackgroundPollingInterval,
|
|
46696
46671
|
config,
|
|
46697
46672
|
handleThemeSelect,
|
|
46698
|
-
|
|
46673
|
+
subscribe2,
|
|
46699
46674
|
unsubscribe,
|
|
46700
46675
|
queryTerminalBackground,
|
|
46701
46676
|
refreshStatic
|
|
@@ -47318,7 +47293,6 @@ var AppContainer = (props) => {
|
|
|
47318
47293
|
const app = use_app_default();
|
|
47319
47294
|
const { stats: sessionStats } = useSessionStats();
|
|
47320
47295
|
const branchName = useGitBranchName(config.getTargetDir());
|
|
47321
|
-
const mainControlsRef = (0, import_react124.useRef)(null);
|
|
47322
47296
|
const rootUiRef = (0, import_react124.useRef)(null);
|
|
47323
47297
|
const lastTitleRef = (0, import_react124.useRef)(null);
|
|
47324
47298
|
const staticExtraHeight = 3;
|
|
@@ -47968,7 +47942,7 @@ Logging in with Google... Restarting Gemini CLI to continue.
|
|
|
47968
47942
|
);
|
|
47969
47943
|
const { isMcpReady } = useMcpStatus(config);
|
|
47970
47944
|
const {
|
|
47971
|
-
messageQueue,
|
|
47945
|
+
messageQueue: messageQueue2,
|
|
47972
47946
|
addMessage,
|
|
47973
47947
|
clearQueue,
|
|
47974
47948
|
getQueuedMessagesText,
|
|
@@ -48078,7 +48052,7 @@ ${queuedText}` : queuedText;
|
|
|
48078
48052
|
}
|
|
48079
48053
|
void submitQuery(submittedValue);
|
|
48080
48054
|
} else {
|
|
48081
|
-
if (isIdle && !isMcpOrConfigReady &&
|
|
48055
|
+
if (isIdle && !isMcpOrConfigReady && messageQueue2.length === 0) {
|
|
48082
48056
|
coreEvents.emitFeedback(
|
|
48083
48057
|
"info",
|
|
48084
48058
|
!isConfigInitialized ? "Initializing... Prompts will be queued." : "Waiting for MCP servers to initialize... Slash commands are still available and prompts will be queued."
|
|
@@ -48096,7 +48070,7 @@ ${queuedText}` : queuedText;
|
|
|
48096
48070
|
slashCommands,
|
|
48097
48071
|
isMcpReady,
|
|
48098
48072
|
streamingState,
|
|
48099
|
-
|
|
48073
|
+
messageQueue2.length,
|
|
48100
48074
|
pendingHistoryItems,
|
|
48101
48075
|
config,
|
|
48102
48076
|
constrainHeight,
|
|
@@ -48124,16 +48098,27 @@ ${queuedText}` : queuedText;
|
|
|
48124
48098
|
]);
|
|
48125
48099
|
const { handleInput: vimHandleInput } = useVim(buffer, handleFinalSubmit);
|
|
48126
48100
|
const isInputActive = !initError && !isProcessing && !isResuming && (streamingState === "idle" /* Idle */ || streamingState === "responding" /* Responding */ || streamingState === "waiting_for_confirmation" /* WaitingForConfirmation */) && !proQuotaRequest;
|
|
48101
|
+
const observerRef = (0, import_react124.useRef)(null);
|
|
48127
48102
|
const [controlsHeight, setControlsHeight] = (0, import_react124.useState)(0);
|
|
48128
|
-
(0, import_react124.
|
|
48129
|
-
if (
|
|
48130
|
-
|
|
48131
|
-
|
|
48132
|
-
|
|
48133
|
-
|
|
48134
|
-
|
|
48103
|
+
const mainControlsRef = (0, import_react124.useCallback)((node) => {
|
|
48104
|
+
if (observerRef.current) {
|
|
48105
|
+
observerRef.current.disconnect();
|
|
48106
|
+
observerRef.current = null;
|
|
48107
|
+
}
|
|
48108
|
+
if (node) {
|
|
48109
|
+
const observer = new ResizeObserver((entries) => {
|
|
48110
|
+
const entry = entries[0];
|
|
48111
|
+
if (entry) {
|
|
48112
|
+
const roundedHeight = Math.round(entry.contentRect.height);
|
|
48113
|
+
setControlsHeight(
|
|
48114
|
+
(prev) => roundedHeight !== prev ? roundedHeight : prev
|
|
48115
|
+
);
|
|
48116
|
+
}
|
|
48117
|
+
});
|
|
48118
|
+
observer.observe(node);
|
|
48119
|
+
observerRef.current = observer;
|
|
48135
48120
|
}
|
|
48136
|
-
}, [
|
|
48121
|
+
}, []);
|
|
48137
48122
|
const availableTerminalHeight = Math.max(
|
|
48138
48123
|
0,
|
|
48139
48124
|
terminalHeight - controlsHeight - backgroundShellHeight - 1
|
|
@@ -48366,7 +48351,7 @@ ${queuedText}` : queuedText;
|
|
|
48366
48351
|
if (keyMatchers["app.showErrorDetails" /* SHOW_ERROR_DETAILS */](key)) {
|
|
48367
48352
|
if (settings.merged.general.devtools) {
|
|
48368
48353
|
void (async () => {
|
|
48369
|
-
const { toggleDevToolsPanel } = await import("./devtoolsService-
|
|
48354
|
+
const { toggleDevToolsPanel } = await import("./devtoolsService-STAWBGOY.js");
|
|
48370
48355
|
await toggleDevToolsPanel(
|
|
48371
48356
|
config,
|
|
48372
48357
|
showErrorDetails,
|
|
@@ -48762,7 +48747,7 @@ ${queuedText}` : queuedText;
|
|
|
48762
48747
|
currentWittyPhrase,
|
|
48763
48748
|
historyRemountKey,
|
|
48764
48749
|
activeHooks,
|
|
48765
|
-
messageQueue,
|
|
48750
|
+
messageQueue: messageQueue2,
|
|
48766
48751
|
queueErrorMessage,
|
|
48767
48752
|
showApprovalModeIndicator,
|
|
48768
48753
|
allowPlanMode,
|
|
@@ -48885,7 +48870,7 @@ ${queuedText}` : queuedText;
|
|
|
48885
48870
|
currentWittyPhrase,
|
|
48886
48871
|
historyRemountKey,
|
|
48887
48872
|
activeHooks,
|
|
48888
|
-
|
|
48873
|
+
messageQueue2,
|
|
48889
48874
|
queueErrorMessage,
|
|
48890
48875
|
showApprovalModeIndicator,
|
|
48891
48876
|
allowPlanMode,
|
|
@@ -49126,6 +49111,7 @@ ${queuedText}` : queuedText;
|
|
|
49126
49111
|
var import_jsx_runtime137 = __toESM(require_jsx_runtime(), 1);
|
|
49127
49112
|
var SLOW_RENDER_MS = 200;
|
|
49128
49113
|
async function startInteractiveUI(config, settings, startupWarnings, workspaceRoot = process.cwd(), resumedSessionData, initializationResult) {
|
|
49114
|
+
initializeConsoleStore();
|
|
49129
49115
|
const useAlternateBuffer2 = shouldEnterAlternateScreen(
|
|
49130
49116
|
isAlternateBufferEnabled(config),
|
|
49131
49117
|
config.getScreenReader()
|