Skip to content

Commit 2f7dfc2

Browse files
committed
Fix formatting
1 parent 890b1c4 commit 2f7dfc2

File tree

2 files changed

+7
-7
lines changed

2 files changed

+7
-7
lines changed

src/components/Messages/ToolMessage.tsx

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -37,10 +37,7 @@ function isBashTool(toolName: string, args: unknown): args is BashToolArgs {
3737
// Type guard for file_read tool
3838
function isFileReadTool(toolName: string, args: unknown): args is FileReadToolArgs {
3939
return (
40-
toolName === "file_read" &&
41-
typeof args === "object" &&
42-
args !== null &&
43-
"filePath" in args
40+
toolName === "file_read" && typeof args === "object" && args !== null && "filePath" in args
4441
);
4542
}
4643

src/components/tools/FileReadToolCall.tsx

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -117,13 +117,16 @@ function formatFileSize(bytes: number): string {
117117
return `${(bytes / (1024 * 1024)).toFixed(1)}MB`;
118118
}
119119

120-
export const FileReadToolCall: React.FC<FileReadToolCallProps> = ({ args, result, status = "pending" }) => {
120+
export const FileReadToolCall: React.FC<FileReadToolCallProps> = ({
121+
args,
122+
result,
123+
status = "pending",
124+
}) => {
121125
const { expanded, toggleExpanded } = useToolExpansion(false);
122126
const [copied, setCopied] = useState(false);
123127

124128
const filePath = args.filePath;
125-
const tokenCount =
126-
result?.success ? estimateTokens(result.content) : null;
129+
const tokenCount = result?.success ? estimateTokens(result.content) : null;
127130

128131
const handleCopyContent = async () => {
129132
if (result?.success) {

0 commit comments

Comments
 (0)