mirror of
https://github.com/claude-code-best/claude-code.git
synced 2026-06-18 22:35:51 +00:00
Fix type (#1242)
* 完善所有用到的type对象,并添加中文注释 * 补充遗失的type * 修复claude-for-chrome-mcp中的type和interface类型缺失 * 完善注释
This commit is contained in:
@@ -2,6 +2,7 @@ import {
|
||||
type ClaudeForChromeContext,
|
||||
createClaudeForChromeMcpServer,
|
||||
type Logger,
|
||||
type LoggerDetail,
|
||||
type PermissionMode,
|
||||
} from '@ant/claude-for-chrome-mcp'
|
||||
import { initializeAnalyticsSink } from '../../services/analytics/sink.js'
|
||||
@@ -276,19 +277,19 @@ export async function runClaudeInChromeMcpServer(): Promise<void> {
|
||||
}
|
||||
|
||||
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