mirror of
https://github.com/claude-code-best/claude-code.git
synced 2026-06-15 21:05:51 +00:00
feat: 问就是封包
This commit is contained in:
@@ -159,7 +159,7 @@ export async function authLogin({
|
||||
|
||||
const orgResult = await validateForceLoginOrg()
|
||||
if (!orgResult.valid) {
|
||||
process.stderr.write(orgResult.message + '\n')
|
||||
process.stderr.write((orgResult as { valid: false; message: string }).message + '\n')
|
||||
process.exit(1)
|
||||
}
|
||||
|
||||
@@ -209,7 +209,7 @@ export async function authLogin({
|
||||
|
||||
const orgResult = await validateForceLoginOrg()
|
||||
if (!orgResult.valid) {
|
||||
process.stderr.write(orgResult.message + '\n')
|
||||
process.stderr.write((orgResult as { valid: false; message: string }).message + '\n')
|
||||
process.exit(1)
|
||||
}
|
||||
|
||||
|
||||
@@ -178,9 +178,9 @@ export async function mcpListHandler(): Promise<void> {
|
||||
// biome-ignore lint/suspicious/noConsole:: intentional console output
|
||||
console.log(`${name}: ${server.url} - ${status}`);
|
||||
} else if (!server.type || server.type === 'stdio') {
|
||||
const args = Array.isArray(server.args) ? server.args : [];
|
||||
const args = Array.isArray((server as any).args) ? (server as any).args : [];
|
||||
// biome-ignore lint/suspicious/noConsole:: intentional console output
|
||||
console.log(`${name}: ${server.command} ${args.join(' ')} - ${status}`);
|
||||
console.log(`${name}: ${(server as any).command} ${args.join(' ')} - ${status}`);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1243,7 +1243,7 @@ function runHeadlessStreaming(
|
||||
uuid: crumb.uuid,
|
||||
timestamp: crumb.timestamp,
|
||||
isReplay: true,
|
||||
} satisfies SDKUserMessageReplay)
|
||||
} as SDKUserMessageReplay)
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1980,7 +1980,7 @@ function runHeadlessStreaming(
|
||||
parent_tool_use_id: null,
|
||||
uuid: c.uuid as string,
|
||||
isReplay: true,
|
||||
} satisfies SDKUserMessageReplay)
|
||||
} as SDKUserMessageReplay)
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -2265,8 +2265,8 @@ function runHeadlessStreaming(
|
||||
output.enqueue({
|
||||
type: 'system' as const,
|
||||
subtype: 'files_persisted' as const,
|
||||
files: result.persistedFiles,
|
||||
failed: result.failedFiles,
|
||||
files: (result as any).persistedFiles,
|
||||
failed: (result as any).failedFiles,
|
||||
processed_at: new Date().toISOString(),
|
||||
uuid: randomUUID(),
|
||||
session_id: getSessionId(),
|
||||
|
||||
@@ -375,7 +375,7 @@ export class CCRClient {
|
||||
if (!result.ok) {
|
||||
throw new RetryableError(
|
||||
'client event POST failed',
|
||||
result.retryAfterMs,
|
||||
(result as any).retryAfterMs,
|
||||
)
|
||||
}
|
||||
},
|
||||
@@ -398,7 +398,7 @@ export class CCRClient {
|
||||
if (!result.ok) {
|
||||
throw new RetryableError(
|
||||
'internal event POST failed',
|
||||
result.retryAfterMs,
|
||||
(result as any).retryAfterMs,
|
||||
)
|
||||
}
|
||||
},
|
||||
@@ -427,7 +427,7 @@ export class CCRClient {
|
||||
'delivery batch',
|
||||
)
|
||||
if (!result.ok) {
|
||||
throw new RetryableError('delivery POST failed', result.retryAfterMs)
|
||||
throw new RetryableError('delivery POST failed', (result as any).retryAfterMs)
|
||||
}
|
||||
},
|
||||
baseDelayMs: 500,
|
||||
|
||||
Reference in New Issue
Block a user