mirror of
https://github.com/claude-code-best/claude-code.git
synced 2026-06-18 06:15:51 +00:00
feat: 完成一大波类型修复, 虽然 any 很多
This commit is contained in:
@@ -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]
|
||||
|
||||
Reference in New Issue
Block a user