-
Notifications
You must be signed in to change notification settings - Fork 2.2k
feat: to #2767, support verbose and compact mode swither with ctrl-o #2770
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
b9c17d1
6fd29b6
8d1866c
1d639c9
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -16,13 +16,15 @@ import { isNarrowWidth } from '../utils/isNarrowWidth.js'; | |
| import { useUIState } from '../contexts/UIStateContext.js'; | ||
| import { useConfig } from '../contexts/ConfigContext.js'; | ||
| import { useVimMode } from '../contexts/VimModeContext.js'; | ||
|
Comment on lines
17
to
18
Collaborator
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. [Suggestion] Suggested fix: import { VerboseModeProvider } from '../contexts/VerboseModeContext.js';
// In renderWithWidth, wrap Footer:
<VerboseModeProvider value={{ verboseMode: true, frozenSnapshot: null }}>
{/* ... existing providers ... */}
<Footer />
</VerboseModeProvider>
// Add test:
it('does not show verbose label when verboseMode is false', () => {
// render with verboseMode: false, assert 'verbose' not in output
});Reviewed by glm-5.1 via Qwen Code /review |
||
| import { useVerboseMode } from '../contexts/VerboseModeContext.js'; | ||
| import { ApprovalMode } from '@qwen-code/qwen-code-core'; | ||
| import { t } from '../../i18n/index.js'; | ||
|
|
||
| export const Footer: React.FC = () => { | ||
| const uiState = useUIState(); | ||
| const config = useConfig(); | ||
| const { vimEnabled, vimMode } = useVimMode(); | ||
| const { verboseMode } = useVerboseMode(); | ||
|
|
||
| const { promptTokenCount, showAutoAcceptIndicator } = { | ||
| promptTokenCount: uiState.sessionStats.lastPromptTokenCount, | ||
|
|
@@ -93,6 +95,12 @@ export const Footer: React.FC = () => { | |
| ), | ||
| }); | ||
| } | ||
| if (verboseMode) { | ||
| rightItems.push({ | ||
| key: 'verbose', | ||
| node: <Text color={theme.text.accent}>{t('verbose')}</Text>, | ||
| }); | ||
| } | ||
| return ( | ||
| <Box | ||
| justifyContent="space-between" | ||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,5 +1,5 @@ | ||
| // Vitest Snapshot v1, https://vitest.dev/guide/snapshot.html | ||
|
|
||
| exports[`<Footer /> > footer rendering (golden snapshots) > renders complete footer on narrow terminal > complete-footer-narrow 1`] = `" ? for shortcuts 0.1% used"`; | ||
| exports[`<Footer /> > footer rendering (golden snapshots) > renders complete footer on narrow terminal > complete-footer-narrow 1`] = `" ? for shortcuts 0.1% used | verbose"`; | ||
|
|
||
| exports[`<Footer /> > footer rendering (golden snapshots) > renders complete footer on wide terminal > complete-footer-wide 1`] = `" ? for shortcuts 0.1% context used"`; | ||
| exports[`<Footer /> > footer rendering (golden snapshots) > renders complete footer on wide terminal > complete-footer-wide 1`] = `" ? for shortcuts 0.1% context used | verbose"`; |
Uh oh!
There was an error while loading. Please reload this page.