mirror of
https://github.com/claude-code-best/claude-code.git
synced 2026-06-18 22:35:51 +00:00
style: 完成所有文件的lint
This commit is contained in:
@@ -267,7 +267,9 @@ export function truncateHeadForPTLRetry(
|
||||
let acc = 0
|
||||
dropCount = 0
|
||||
for (const g of groups) {
|
||||
acc += roughTokenCountEstimationForMessages(g as Parameters<typeof roughTokenCountEstimationForMessages>[0])
|
||||
acc += roughTokenCountEstimationForMessages(
|
||||
g as Parameters<typeof roughTokenCountEstimationForMessages>[0],
|
||||
)
|
||||
dropCount++
|
||||
if (acc >= tokenGap) break
|
||||
}
|
||||
@@ -762,7 +764,7 @@ export async function compactConversation(
|
||||
context.setStreamMode?.('requesting')
|
||||
context.setResponseLength?.(() => 0)
|
||||
context.onCompactProgress?.({ type: 'compact_end' })
|
||||
context.setSDKStatus?.("" as SDKStatus)
|
||||
context.setSDKStatus?.('' as SDKStatus)
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1105,7 +1107,7 @@ export async function partialCompactConversation(
|
||||
context.setStreamMode?.('requesting')
|
||||
context.setResponseLength?.(() => 0)
|
||||
context.onCompactProgress?.({ type: 'compact_end' })
|
||||
context.setSDKStatus?.("" as SDKStatus)
|
||||
context.setSDKStatus?.('' as SDKStatus)
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1333,8 +1335,18 @@ async function streamCompactSummary({
|
||||
let next = await streamIter.next()
|
||||
|
||||
while (!next.done) {
|
||||
const event = next.value as StreamEvent | AssistantMessage | SystemAPIErrorMessage
|
||||
const streamEvent = event as { type: string; event: { type: string; content_block: { type: string }; delta: { type: string; text: string } } }
|
||||
const event = next.value as
|
||||
| StreamEvent
|
||||
| AssistantMessage
|
||||
| SystemAPIErrorMessage
|
||||
const streamEvent = event as {
|
||||
type: string
|
||||
event: {
|
||||
type: string
|
||||
content_block: { type: string }
|
||||
delta: { type: string; text: string }
|
||||
}
|
||||
}
|
||||
|
||||
if (
|
||||
!hasStartedStreaming &&
|
||||
|
||||
Reference in New Issue
Block a user