Skip to content
Prev Previous commit
Next Next commit
refinements
  • Loading branch information
JayadityaGit committed Aug 27, 2025
commit 7c7cb5adc443b51eacd9bb6e275dad414f53a841
6 changes: 3 additions & 3 deletions packages/cli/src/ui/components/InputPrompt.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -138,10 +138,10 @@ export const InputPrompt: React.FC<InputPromptProps> = ({
if (shellModeActive) {
shellHistory.addCommandToHistory(submittedValue);
}
onSubmit(submittedValue);
// Clear the buffer *after* calling onSubmit to prevent potential re-submission
// Clear the buffer *before* calling onSubmit to prevent potential re-submission
// if onSubmit triggers a re-render while the buffer still holds the old value.
buffer.setText('');
onSubmit(submittedValue);
resetCompletionState();
resetReverseSearchCompletionState();
},
Expand Down Expand Up @@ -829,4 +829,4 @@ export const InputPrompt: React.FC<InputPromptProps> = ({
)}
</>
);
};
};
7 changes: 3 additions & 4 deletions packages/cli/src/ui/components/ProQuotaDialog.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
import type React from 'react';
import { Box, Text } from 'ink';
import { RadioButtonSelect } from './shared/RadioButtonSelect.js';
import { Colors } from '../colors.js';

interface ProQuotaDialogProps {
currentModel: string;
Expand Down Expand Up @@ -38,11 +39,9 @@ export function ProQuotaDialog({
<Box
borderStyle="round"
flexDirection="column"
paddingX={2}
paddingY={1}
minWidth={80}
paddingX={1}
>
<Text bold color="yellow">
<Text bold color={Colors.AccentYellow}>
Pro quota limit reached for {currentModel}.
</Text>
<Box marginTop={1}>
Expand Down
4 changes: 2 additions & 2 deletions packages/cli/src/ui/components/messages/InfoMessage.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ interface InfoMessageProps {
}

export const InfoMessage: React.FC<InfoMessageProps> = ({ text }) => {
const prefix = '';
const prefix = '';
const prefixWidth = prefix.length;

return (
Expand All @@ -29,4 +29,4 @@ export const InfoMessage: React.FC<InfoMessageProps> = ({ text }) => {
</Box>
</Box>
);
};
};