mirror of
https://github.com/google-gemini/gemini-cli.git
synced 2026-04-30 15:04:16 -07:00
Enhance debug profiler to track tree framerate and dispatch errors (#10502)
This commit is contained in:
@@ -139,6 +139,7 @@ export const AppContainer = (props: AppContainerProps) => {
|
||||
);
|
||||
const [isProcessing, setIsProcessing] = useState<boolean>(false);
|
||||
const [embeddedShellFocused, setEmbeddedShellFocused] = useState(false);
|
||||
const [showDebugProfiler, setShowDebugProfiler] = useState(false);
|
||||
|
||||
const [geminiMdFileCount, setGeminiMdFileCount] = useState<number>(
|
||||
initializationResult.geminiMdFileCount,
|
||||
@@ -175,6 +176,11 @@ export const AppContainer = (props: AppContainerProps) => {
|
||||
[],
|
||||
);
|
||||
|
||||
const toggleDebugProfiler = useCallback(
|
||||
() => setShowDebugProfiler((prev) => !prev),
|
||||
[],
|
||||
);
|
||||
|
||||
// Helper to determine the effective model, considering the fallback state.
|
||||
const getEffectiveModel = useCallback(() => {
|
||||
if (config.isInFallbackMode()) {
|
||||
@@ -460,6 +466,7 @@ Logging in with Google... Please restart Gemini CLI to continue.
|
||||
},
|
||||
setDebugMessage,
|
||||
toggleCorgiMode: () => setCorgiMode((prev) => !prev),
|
||||
toggleDebugProfiler,
|
||||
dispatchExtensionStateUpdate,
|
||||
addConfirmUpdateExtensionRequest,
|
||||
}),
|
||||
@@ -476,6 +483,7 @@ Logging in with Google... Please restart Gemini CLI to continue.
|
||||
dispatchExtensionStateUpdate,
|
||||
openPermissionsDialog,
|
||||
addConfirmUpdateExtensionRequest,
|
||||
toggleDebugProfiler,
|
||||
],
|
||||
);
|
||||
|
||||
@@ -1146,6 +1154,7 @@ Logging in with Google... Please restart Gemini CLI to continue.
|
||||
extensionsUpdateState,
|
||||
activePtyId,
|
||||
embeddedShellFocused,
|
||||
showDebugProfiler,
|
||||
}),
|
||||
[
|
||||
isThemeDialogOpen,
|
||||
@@ -1226,6 +1235,7 @@ Logging in with Google... Please restart Gemini CLI to continue.
|
||||
activePtyId,
|
||||
historyManager,
|
||||
embeddedShellFocused,
|
||||
showDebugProfiler,
|
||||
],
|
||||
);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user