mirror of
https://github.com/QwenLM/qwen-code.git
synced 2025-12-20 16:57:46 +00:00
Initial auto-fixing of linting errors.
- This is the result of runing `npm lint -- -fix`
This commit is contained in:
committed by
N. Taylor Mullen
parent
cb30351403
commit
e0339993ae
@@ -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} />} */}
|
||||
|
||||
@@ -3,8 +3,7 @@ import { useInput } from 'ink';
|
||||
import { GeminiClient } from '../../core/gemini-client.js';
|
||||
import { type Chat, type PartListUnion } from '@google/genai';
|
||||
import { HistoryItem } from '../types.js';
|
||||
import { processGeminiStream } from '../../core/gemini-stream.js';
|
||||
import { StreamingState } from '../../core/gemini-stream.js';
|
||||
import { processGeminiStream , StreamingState } from '../../core/gemini-stream.js';
|
||||
|
||||
const addHistoryItem = (
|
||||
setHistory: React.Dispatch<React.SetStateAction<HistoryItem[]>>,
|
||||
|
||||
@@ -197,7 +197,7 @@ export class MarkdownRenderer {
|
||||
* @param text The full markdown string to render.
|
||||
* @returns An array of React nodes representing markdown blocks.
|
||||
*/
|
||||
public static render(text: string): React.ReactNode[] {
|
||||
static render(text: string): React.ReactNode[] {
|
||||
if (!text) return [];
|
||||
|
||||
const lines = text.split('\n');
|
||||
|
||||
Reference in New Issue
Block a user