-
Notifications
You must be signed in to change notification settings - Fork 2.9k
fix(cli): optimize large paste performance and add progress indicator #6506
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
2f4c2b8
8048de7
6ca48ef
4f07479
fe0f747
257d83b
78a40ea
2922f66
e1d97ee
6ca0c1c
3dbc788
2d8055e
eac6b50
431b1b6
bb13420
a717d8f
6a3647a
3c92255
b4fbe53
8d18426
68c7cbc
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 |
|---|---|---|
|
|
@@ -25,13 +25,31 @@ import { GeminiSpinner } from './GeminiRespondingSpinner.js'; | |
| import { GoalPill, useFooterGoalState } from './GoalPill.js'; | ||
| import { CronPill, useFooterCronTaskCount } from './CronPill.js'; | ||
| import { t } from '../../i18n/index.js'; | ||
| import { useKeypressContext } from '../contexts/KeypressContext.js'; | ||
| import { StreamingState } from '../types.js'; | ||
|
|
||
| import type { PasteProgress } from '../contexts/KeypressContext.js'; | ||
|
|
||
| const PasteProgressBar: React.FC<{ progress: PasteProgress }> = ({ | ||
| progress, | ||
| }) => { | ||
|
LaZzyMan marked this conversation as resolved.
|
||
| const { receivedBytes } = progress; | ||
| const kb = receivedBytes / 1024; | ||
| const label = kb >= 1 ? `${kb.toFixed(0)} KB` : `${receivedBytes} B`; | ||
|
|
||
| return ( | ||
| <Text dimColor> | ||
| {t('Pasting…')} {label} | ||
| </Text> | ||
| ); | ||
| }; | ||
|
|
||
| export const Footer: React.FC = () => { | ||
| const uiState = useUIState(); | ||
| const config = useConfig(); | ||
| const settings = useSettings(); | ||
| const { vimEnabled, vimMode } = useVimModeState(); | ||
| const { pasteProgress } = useKeypressContext(); | ||
| const { | ||
| lines: statusLineLines, | ||
| useThemeColors, | ||
|
|
@@ -83,6 +101,8 @@ export const Footer: React.FC = () => { | |
| <Text color={theme.status.warning}>{t('Press Ctrl+D again to exit.')}</Text> | ||
| ) : uiState.showEscapePrompt ? ( | ||
| <Text color={theme.text.secondary}>{t('Press Esc again to clear.')}</Text> | ||
| ) : pasteProgress.active ? ( | ||
| <PasteProgressBar progress={pasteProgress} /> | ||
|
Comment on lines
+104
to
+105
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] — qwen3.7-max via Qwen Code /review |
||
| ) : uiState.rewindEscPending ? ( | ||
| <Text color={theme.text.secondary}> | ||
| {t('Press Esc again to rewind conversation.')} | ||
|
|
||
Uh oh!
There was an error while loading. Please reload this page.