mirror of
https://github.com/claude-code-best/claude-code.git
synced 2026-06-18 22:35:51 +00:00
style: 完成所有文件的lint
This commit is contained in:
@@ -1,22 +1,17 @@
|
||||
import { relative } from 'path'
|
||||
import * as React from 'react'
|
||||
import { getCwd } from 'src/utils/cwd.js'
|
||||
import { Box, Text } from '@anthropic/ink'
|
||||
import { MessageResponse } from './MessageResponse.js'
|
||||
import { relative } from 'path';
|
||||
import * as React from 'react';
|
||||
import { getCwd } from 'src/utils/cwd.js';
|
||||
import { Box, Text } from '@anthropic/ink';
|
||||
import { MessageResponse } from './MessageResponse.js';
|
||||
|
||||
type Props = {
|
||||
file_path: string
|
||||
operation: 'write' | 'update'
|
||||
style?: 'condensed'
|
||||
verbose: boolean
|
||||
}
|
||||
file_path: string;
|
||||
operation: 'write' | 'update';
|
||||
style?: 'condensed';
|
||||
verbose: boolean;
|
||||
};
|
||||
|
||||
export function FileEditToolUseRejectedMessage({
|
||||
file_path,
|
||||
operation,
|
||||
style,
|
||||
verbose,
|
||||
}: Props): React.ReactNode {
|
||||
export function FileEditToolUseRejectedMessage({ file_path, operation, style, verbose }: Props): React.ReactNode {
|
||||
const text = (
|
||||
<Box flexDirection="row">
|
||||
<Text color="subtle">User rejected {operation} to </Text>
|
||||
@@ -24,12 +19,12 @@ export function FileEditToolUseRejectedMessage({
|
||||
{verbose ? file_path : relative(getCwd(), file_path)}
|
||||
</Text>
|
||||
</Box>
|
||||
)
|
||||
);
|
||||
|
||||
// For condensed style, just show the text
|
||||
if (style === 'condensed' && !verbose) {
|
||||
return <MessageResponse>{text}</MessageResponse>
|
||||
return <MessageResponse>{text}</MessageResponse>;
|
||||
}
|
||||
|
||||
return <MessageResponse>{text}</MessageResponse>
|
||||
return <MessageResponse>{text}</MessageResponse>;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user