feat: 全部类型问题解决

This commit is contained in:
claude-code-best
2026-04-11 10:24:00 +08:00
parent 7088fe3c8b
commit 6a70056910
135 changed files with 671 additions and 503 deletions

View File

@@ -105,12 +105,12 @@ export function extractTitleText(m: Message): string | undefined {
if (m.type !== 'user' || m.isMeta || m.toolUseResult || m.isCompactSummary)
return undefined
if (m.origin && (m.origin as { kind?: string }).kind !== 'human') return undefined
const content = m.message.content
const content = m.message!.content
let raw: string | undefined
if (typeof content === 'string') {
raw = content
} else {
for (const block of content) {
for (const block of content ?? []) {
if (block.type === 'text') {
raw = block.text
break