style: 完成所有文件的lint

This commit is contained in:
claude-code-best
2026-05-01 21:39:30 +08:00
parent d136872cc9
commit 6182015005
1333 changed files with 68255 additions and 77882 deletions

View File

@@ -1,7 +1,7 @@
import type { ToolUseBlockParam } from '@anthropic-ai/sdk/resources/index.mjs'
import { useMemo } from 'react'
import { findToolByName, type Tool, type Tools } from '../../../Tool.js'
import type { buildMessageLookups } from '../../../utils/messages.js'
import type { ToolUseBlockParam } from '@anthropic-ai/sdk/resources/index.mjs';
import { useMemo } from 'react';
import { findToolByName, type Tool, type Tools } from '../../../Tool.js';
import type { buildMessageLookups } from '../../../utils/messages.js';
export function useGetToolFromMessages(
toolUseID: string,
@@ -9,14 +9,14 @@ export function useGetToolFromMessages(
lookups: ReturnType<typeof buildMessageLookups>,
): { tool: Tool; toolUse: ToolUseBlockParam } | null {
return useMemo(() => {
const toolUse = lookups.toolUseByToolUseID.get(toolUseID)
const toolUse = lookups.toolUseByToolUseID.get(toolUseID);
if (!toolUse) {
return null
return null;
}
const tool = findToolByName(tools, toolUse.name)
const tool = findToolByName(tools, toolUse.name);
if (!tool) {
return null
return null;
}
return { tool, toolUse }
}, [toolUseID, lookups, tools])
return { tool, toolUse };
}, [toolUseID, lookups, tools]);
}