mirror of
https://github.com/google-gemini/gemini-cli.git
synced 2026-04-18 01:00:39 -07:00
feat: Add markdown toggle (alt+m) to switch between rendered and raw… (#10383)
Co-authored-by: Jacob Richman <jacob314@gmail.com>
This commit is contained in:
@@ -793,6 +793,7 @@ Logging in with Google... Please restart Gemini CLI to continue.
|
||||
const [showErrorDetails, setShowErrorDetails] = useState<boolean>(false);
|
||||
const [showToolDescriptions, setShowToolDescriptions] =
|
||||
useState<boolean>(false);
|
||||
const [renderMarkdown, setRenderMarkdown] = useState<boolean>(true);
|
||||
|
||||
const [ctrlCPressedOnce, setCtrlCPressedOnce] = useState(false);
|
||||
const ctrlCTimerRef = useRef<NodeJS.Timeout | null>(null);
|
||||
@@ -973,6 +974,13 @@ Logging in with Google... Please restart Gemini CLI to continue.
|
||||
if (Object.keys(mcpServers || {}).length > 0) {
|
||||
handleSlashCommand(newValue ? '/mcp desc' : '/mcp nodesc');
|
||||
}
|
||||
} else if (keyMatchers[Command.TOGGLE_MARKDOWN](key)) {
|
||||
setRenderMarkdown((prev) => {
|
||||
const newValue = !prev;
|
||||
// Force re-render of static content
|
||||
refreshStatic();
|
||||
return newValue;
|
||||
});
|
||||
} else if (
|
||||
keyMatchers[Command.TOGGLE_IDE_CONTEXT_DETAIL](key) &&
|
||||
config.getIdeMode() &&
|
||||
@@ -1011,6 +1019,7 @@ Logging in with Google... Please restart Gemini CLI to continue.
|
||||
activePtyId,
|
||||
embeddedShellFocused,
|
||||
settings.merged.general?.debugKeystrokeLogging,
|
||||
refreshStatic,
|
||||
],
|
||||
);
|
||||
|
||||
@@ -1139,6 +1148,7 @@ Logging in with Google... Please restart Gemini CLI to continue.
|
||||
filteredConsoleMessages,
|
||||
ideContextState,
|
||||
showToolDescriptions,
|
||||
renderMarkdown,
|
||||
ctrlCPressedOnce,
|
||||
ctrlDPressedOnce,
|
||||
showEscapePrompt,
|
||||
@@ -1221,6 +1231,7 @@ Logging in with Google... Please restart Gemini CLI to continue.
|
||||
filteredConsoleMessages,
|
||||
ideContextState,
|
||||
showToolDescriptions,
|
||||
renderMarkdown,
|
||||
ctrlCPressedOnce,
|
||||
ctrlDPressedOnce,
|
||||
showEscapePrompt,
|
||||
|
||||
Reference in New Issue
Block a user