feat: 完成一大波类型修复, 虽然 any 很多

This commit is contained in:
claude-code-best
2026-03-31 23:43:39 +08:00
parent dd9cd782a7
commit 91f77ea571
55 changed files with 156 additions and 81 deletions

View File

@@ -231,14 +231,14 @@ export async function getErrorLogByIndex(
async function loadLogList(path: string): Promise<LogOption[]> {
let files: Awaited<ReturnType<typeof readdir>>
try {
files = await readdir(path, { withFileTypes: true })
files = await readdir(path, { withFileTypes: true }) as any
} catch {
logError(new Error(`No logs found at ${path}`))
return []
}
const logData = await Promise.all(
files.map(async (file, i) => {
const fullPath = join(path, file.name)
const fullPath = join(path, file.name as string)
const content = await readFile(fullPath, { encoding: 'utf8' })
const messages = jsonParse(content) as SerializedMessage[]
const firstMessage = messages[0]