feat: 类型修复

This commit is contained in:
claude-code-best
2026-03-31 21:46:46 +08:00
parent c4d92178b7
commit 2c759fe6fa
6 changed files with 38 additions and 19 deletions

View File

@@ -1058,6 +1058,7 @@ class Project {
entrypoint: getEntrypoint(),
cwd: getCwd(),
sessionId,
timestamp: new Date().toISOString(),
version: VERSION,
gitBranch,
slug,
@@ -2225,7 +2226,7 @@ export function checkResumeConsistency(chain: Message[]): void {
for (let i = chain.length - 1; i >= 0; i--) {
const m = chain[i]!
if (m.type !== 'system' || m.subtype !== 'turn_duration') continue
const expected = m.messageCount
const expected = m.messageCount as number | undefined
if (expected === undefined) return
// `i` is the 0-based index of the checkpoint in the reconstructed chain.
// The checkpoint was appended AFTER messageCount messages, so its own