mirror of
https://github.com/claude-code-best/claude-code.git
synced 2026-06-18 14:25:51 +00:00
feat: 完成一大波类型修复, 虽然 any 很多
This commit is contained in:
@@ -249,7 +249,7 @@ export function getParentCacheSuppressReason(
|
||||
// The fork re-processes the parent's output (never cached) plus its own prompt.
|
||||
const outputTokens = usage.output_tokens ?? 0
|
||||
|
||||
return inputTokens + cacheWriteTokens + outputTokens >
|
||||
return (inputTokens as number) + (cacheWriteTokens as number) + (outputTokens as number) >
|
||||
MAX_PARENT_UNCACHED_TOKENS
|
||||
? 'cache_cold'
|
||||
: null
|
||||
@@ -344,12 +344,12 @@ export async function generateSuggestion(
|
||||
if (textBlock?.type === 'text') {
|
||||
const suggestion = textBlock.text.trim()
|
||||
if (suggestion) {
|
||||
return { suggestion, generationRequestId }
|
||||
return { suggestion: textBlock.text.trim() as string, generationRequestId }
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return { suggestion: null, generationRequestId }
|
||||
return { suggestion: null as string | null, generationRequestId }
|
||||
}
|
||||
|
||||
export function shouldFilterSuggestion(
|
||||
|
||||
Reference in New Issue
Block a user