mirror of
https://github.com/QwenLM/qwen-code.git
synced 2026-04-29 20:20:57 +00:00
Initial auto-fixing of linting errors.
- This is the result of runing `npm lint -- -fix`
This commit is contained in:
parent
cb30351403
commit
e0339993ae
20 changed files with 37 additions and 50 deletions
|
|
@ -5,8 +5,7 @@ interface FooterProps {
|
|||
queryLength: number;
|
||||
}
|
||||
|
||||
const Footer: React.FC<FooterProps> = ({ queryLength }) => {
|
||||
return (
|
||||
const Footer: React.FC<FooterProps> = ({ queryLength }) => (
|
||||
<Box marginTop={1} justifyContent="space-between">
|
||||
<Box minWidth={15}>
|
||||
<Text color="gray">{queryLength === 0 ? '? for shortcuts' : ''}</Text>
|
||||
|
|
@ -14,6 +13,5 @@ const Footer: React.FC<FooterProps> = ({ queryLength }) => {
|
|||
<Text color="blue">Gemini</Text>
|
||||
</Box>
|
||||
);
|
||||
};
|
||||
|
||||
export default Footer;
|
||||
|
|
|
|||
|
|
@ -7,8 +7,7 @@ interface HeaderProps {
|
|||
cwd: string;
|
||||
}
|
||||
|
||||
const Header: React.FC<HeaderProps> = ({ cwd }) => {
|
||||
return (
|
||||
const Header: React.FC<HeaderProps> = ({ cwd }) => (
|
||||
<>
|
||||
{/* Static Header Art */}
|
||||
<Box marginBottom={1}>
|
||||
|
|
@ -35,6 +34,5 @@ const Header: React.FC<HeaderProps> = ({ cwd }) => {
|
|||
</Box>
|
||||
</>
|
||||
);
|
||||
};
|
||||
|
||||
export default Header;
|
||||
|
|
|
|||
|
|
@ -17,9 +17,9 @@ interface HistoryDisplayProps {
|
|||
const HistoryDisplay: React.FC<HistoryDisplayProps> = ({
|
||||
history,
|
||||
onSubmit,
|
||||
}) => {
|
||||
}) =>
|
||||
// No grouping logic needed here anymore
|
||||
return (
|
||||
(
|
||||
<Box flexDirection="column">
|
||||
{history.map((item) => (
|
||||
<Box key={item.id} marginBottom={1}>
|
||||
|
|
@ -36,7 +36,7 @@ const HistoryDisplay: React.FC<HistoryDisplayProps> = ({
|
|||
</Box>
|
||||
))}
|
||||
</Box>
|
||||
);
|
||||
};
|
||||
)
|
||||
;
|
||||
|
||||
export default HistoryDisplay;
|
||||
|
|
|
|||
|
|
@ -32,6 +32,6 @@ const InputPrompt: React.FC<InputPromptProps> = ({
|
|||
</Box>
|
||||
</Box>
|
||||
);
|
||||
};
|
||||
}
|
||||
|
||||
export default InputPrompt;
|
||||
|
|
|
|||
|
|
@ -2,8 +2,7 @@ import React from 'react';
|
|||
import { Box, Text } from 'ink';
|
||||
import { UI_WIDTH } from '../constants.js';
|
||||
|
||||
const Tips: React.FC = () => {
|
||||
return (
|
||||
const Tips: React.FC = () => (
|
||||
<Box flexDirection="column" marginBottom={1} width={UI_WIDTH}>
|
||||
<Text>Tips for getting started:</Text>
|
||||
<Text>
|
||||
|
|
@ -17,6 +16,5 @@ const Tips: React.FC = () => {
|
|||
<Text>4. Be specific for the best results.</Text>
|
||||
</Box>
|
||||
);
|
||||
};
|
||||
|
||||
export default Tips;
|
||||
|
|
|
|||
|
|
@ -20,8 +20,7 @@ const ToolGroupMessage: React.FC<ToolGroupMessageProps> = ({
|
|||
|
||||
return (
|
||||
<Box flexDirection="column" borderStyle="round" borderColor={borderColor}>
|
||||
{toolCalls.map((tool) => {
|
||||
return (
|
||||
{toolCalls.map((tool) => (
|
||||
<React.Fragment key={tool.callId}>
|
||||
<ToolMessage
|
||||
key={tool.callId} // Use callId as the key
|
||||
|
|
@ -38,8 +37,7 @@ const ToolGroupMessage: React.FC<ToolGroupMessageProps> = ({
|
|||
></ToolConfirmationMessage>
|
||||
)}
|
||||
</React.Fragment>
|
||||
);
|
||||
})}
|
||||
))}
|
||||
{/* Optional: Add padding below the last item if needed,
|
||||
though ToolMessage already has some vertical space implicitly */}
|
||||
{/* {tools.length > 0 && <Box height={1} />} */}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue