mirror of
https://github.com/claude-code-best/claude-code.git
synced 2026-06-19 06:45:50 +00:00
style: 完成所有文件的lint
This commit is contained in:
@@ -1,23 +1,19 @@
|
||||
import React from 'react'
|
||||
import { BLACK_CIRCLE } from '../constants/figures.js'
|
||||
import React from 'react';
|
||||
import { BLACK_CIRCLE } from '../constants/figures.js';
|
||||
|
||||
import { Box, Text } from '@anthropic/ink'
|
||||
import { useBlink } from '../hooks/useBlink.js'
|
||||
import { Box, Text } from '@anthropic/ink';
|
||||
import { useBlink } from '../hooks/useBlink.js';
|
||||
|
||||
type Props = {
|
||||
isError: boolean
|
||||
isUnresolved: boolean
|
||||
shouldAnimate: boolean
|
||||
}
|
||||
isError: boolean;
|
||||
isUnresolved: boolean;
|
||||
shouldAnimate: boolean;
|
||||
};
|
||||
|
||||
export function ToolUseLoader({
|
||||
isError,
|
||||
isUnresolved,
|
||||
shouldAnimate,
|
||||
}: Props): React.ReactNode {
|
||||
const [ref, isBlinking] = useBlink(shouldAnimate)
|
||||
export function ToolUseLoader({ isError, isUnresolved, shouldAnimate }: Props): React.ReactNode {
|
||||
const [ref, isBlinking] = useBlink(shouldAnimate);
|
||||
|
||||
const color = isUnresolved ? undefined : isError ? 'error' : 'success'
|
||||
const color = isUnresolved ? undefined : isError ? 'error' : 'success';
|
||||
|
||||
// WARNING: The code here and in AssistantToolUseMessage is particularly
|
||||
// sensitive to what *should* just be trivial refactorings. A `<dim>x</dim>`
|
||||
@@ -30,10 +26,8 @@ export function ToolUseLoader({
|
||||
return (
|
||||
<Box ref={ref} minWidth={2}>
|
||||
<Text color={color} dimColor={isUnresolved}>
|
||||
{!shouldAnimate || isBlinking || isError || !isUnresolved
|
||||
? BLACK_CIRCLE
|
||||
: ' '}
|
||||
{!shouldAnimate || isBlinking || isError || !isUnresolved ? BLACK_CIRCLE : ' '}
|
||||
</Text>
|
||||
</Box>
|
||||
)
|
||||
);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user