mirror of
https://github.com/claude-code-best/claude-code.git
synced 2026-06-22 00:05:51 +00:00
style: 完成所有文件的lint
This commit is contained in:
@@ -1,19 +1,19 @@
|
||||
import React from 'react'
|
||||
import { MessageResponse } from 'src/components/MessageResponse.js'
|
||||
import { Text } from '@anthropic/ink'
|
||||
import { jsonStringify } from 'src/utils/slowOperations.js'
|
||||
import type { Input, Output } from './ConfigTool.js'
|
||||
import React from 'react';
|
||||
import { MessageResponse } from 'src/components/MessageResponse.js';
|
||||
import { Text } from '@anthropic/ink';
|
||||
import { jsonStringify } from 'src/utils/slowOperations.js';
|
||||
import type { Input, Output } from './ConfigTool.js';
|
||||
|
||||
export function renderToolUseMessage(input: Partial<Input>): React.ReactNode {
|
||||
if (!input.setting) return null
|
||||
if (!input.setting) return null;
|
||||
if (input.value === undefined) {
|
||||
return <Text dimColor>Getting {input.setting}</Text>
|
||||
return <Text dimColor>Getting {input.setting}</Text>;
|
||||
}
|
||||
return (
|
||||
<Text dimColor>
|
||||
Setting {input.setting} to {jsonStringify(input.value)}
|
||||
</Text>
|
||||
)
|
||||
);
|
||||
}
|
||||
|
||||
export function renderToolResultMessage(content: Output): React.ReactNode {
|
||||
@@ -22,7 +22,7 @@ export function renderToolResultMessage(content: Output): React.ReactNode {
|
||||
<MessageResponse>
|
||||
<Text color="error">Failed: {content.error}</Text>
|
||||
</MessageResponse>
|
||||
)
|
||||
);
|
||||
}
|
||||
if (content.operation === 'get') {
|
||||
return (
|
||||
@@ -31,18 +31,17 @@ export function renderToolResultMessage(content: Output): React.ReactNode {
|
||||
<Text bold>{content.setting}</Text> = {jsonStringify(content.value)}
|
||||
</Text>
|
||||
</MessageResponse>
|
||||
)
|
||||
);
|
||||
}
|
||||
return (
|
||||
<MessageResponse>
|
||||
<Text>
|
||||
Set <Text bold>{content.setting}</Text> to{' '}
|
||||
<Text bold>{jsonStringify(content.newValue)}</Text>
|
||||
Set <Text bold>{content.setting}</Text> to <Text bold>{jsonStringify(content.newValue)}</Text>
|
||||
</Text>
|
||||
</MessageResponse>
|
||||
)
|
||||
);
|
||||
}
|
||||
|
||||
export function renderToolUseRejectedMessage(): React.ReactNode {
|
||||
return <Text color="warning">Config change rejected</Text>
|
||||
return <Text color="warning">Config change rejected</Text>;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user