mirror of
https://github.com/claude-code-best/claude-code.git
synced 2026-06-17 13:55:50 +00:00
Fix type (#1242)
* 完善所有用到的type对象,并添加中文注释 * 补充遗失的type * 修复claude-for-chrome-mcp中的type和interface类型缺失 * 完善注释
This commit is contained in:
@@ -1,6 +1,7 @@
|
||||
import type {
|
||||
ComputerUseHostAdapter,
|
||||
Logger,
|
||||
LoggerDetail,
|
||||
} from '@ant/computer-use-mcp/types'
|
||||
import { format } from 'util'
|
||||
import { logForDebugging } from '../debug.js'
|
||||
@@ -10,20 +11,20 @@ import { getChicagoEnabled, getChicagoSubGates } from './gates.js'
|
||||
import { requireComputerUseSwift } from './swiftLoader.js'
|
||||
|
||||
class DebugLogger implements Logger {
|
||||
silly(message: string, ...args: unknown[]): void {
|
||||
logForDebugging(format(message, ...args), { level: 'debug' })
|
||||
silly(message: string, detail?: LoggerDetail): void {
|
||||
logForDebugging(format(message, detail ?? ''), { level: 'debug' })
|
||||
}
|
||||
debug(message: string, ...args: unknown[]): void {
|
||||
logForDebugging(format(message, ...args), { level: 'debug' })
|
||||
debug(message: string, detail?: LoggerDetail): void {
|
||||
logForDebugging(format(message, detail ?? ''), { level: 'debug' })
|
||||
}
|
||||
info(message: string, ...args: unknown[]): void {
|
||||
logForDebugging(format(message, ...args), { level: 'info' })
|
||||
info(message: string, detail?: LoggerDetail): void {
|
||||
logForDebugging(format(message, detail ?? ''), { level: 'info' })
|
||||
}
|
||||
warn(message: string, ...args: unknown[]): void {
|
||||
logForDebugging(format(message, ...args), { level: 'warn' })
|
||||
warn(message: string, detail?: LoggerDetail): void {
|
||||
logForDebugging(format(message, detail ?? ''), { level: 'warn' })
|
||||
}
|
||||
error(message: string, ...args: unknown[]): void {
|
||||
logForDebugging(format(message, ...args), { level: 'error' })
|
||||
error(message: string, detail?: LoggerDetail): void {
|
||||
logForDebugging(format(message, detail ?? ''), { level: 'error' })
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user