mirror of
https://github.com/QwenLM/qwen-code.git
synced 2026-04-29 12:11:09 +00:00
feat: to #2767, support verbose and compact mode swither with ctrl-o
This commit is contained in:
parent
1b1a029fd7
commit
b9c17d13ff
17 changed files with 166 additions and 45 deletions
|
|
@ -13,6 +13,7 @@ import { useUIState } from '../contexts/UIStateContext.js';
|
|||
import { useAppContext } from '../contexts/AppContext.js';
|
||||
import { AppHeader } from './AppHeader.js';
|
||||
import { DebugModeNotification } from './DebugModeNotification.js';
|
||||
import { useVerboseMode } from '../contexts/VerboseModeContext.js';
|
||||
|
||||
// Limit Gemini messages to a very high number of lines to mitigate performance
|
||||
// issues in the worst case if we somehow get an enormous response from Gemini.
|
||||
|
|
@ -23,6 +24,7 @@ const MAX_GEMINI_MESSAGE_LINES = 65536;
|
|||
export const MainContent = () => {
|
||||
const { version } = useAppContext();
|
||||
const uiState = useUIState();
|
||||
const { frozenSnapshot } = useVerboseMode();
|
||||
const {
|
||||
pendingHistoryItems,
|
||||
terminalWidth,
|
||||
|
|
@ -57,21 +59,26 @@ export const MainContent = () => {
|
|||
</Static>
|
||||
<OverflowProvider>
|
||||
<Box flexDirection="column">
|
||||
{pendingHistoryItems.map((item, i) => (
|
||||
<HistoryItemDisplay
|
||||
key={i}
|
||||
availableTerminalHeight={
|
||||
uiState.constrainHeight ? availableTerminalHeight : undefined
|
||||
}
|
||||
terminalWidth={terminalWidth}
|
||||
mainAreaWidth={mainAreaWidth}
|
||||
item={{ ...item, id: 0 }}
|
||||
isPending={true}
|
||||
isFocused={!uiState.isEditorDialogOpen}
|
||||
activeShellPtyId={uiState.activePtyId}
|
||||
embeddedShellFocused={uiState.embeddedShellFocused}
|
||||
/>
|
||||
))}
|
||||
{(frozenSnapshot ?? pendingHistoryItems).map((item, i) => {
|
||||
const isFrozen = frozenSnapshot !== null;
|
||||
return (
|
||||
<HistoryItemDisplay
|
||||
key={i}
|
||||
availableTerminalHeight={
|
||||
uiState.constrainHeight ? availableTerminalHeight : undefined
|
||||
}
|
||||
terminalWidth={terminalWidth}
|
||||
mainAreaWidth={mainAreaWidth}
|
||||
item={{ ...item, id: 0 }}
|
||||
isPending={true}
|
||||
isFocused={isFrozen ? false : !uiState.isEditorDialogOpen}
|
||||
activeShellPtyId={isFrozen ? undefined : uiState.activePtyId}
|
||||
embeddedShellFocused={
|
||||
isFrozen ? false : uiState.embeddedShellFocused
|
||||
}
|
||||
/>
|
||||
);
|
||||
})}
|
||||
<ShowMoreLines constrainHeight={uiState.constrainHeight} />
|
||||
</Box>
|
||||
</OverflowProvider>
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue