mirror of
https://github.com/claude-code-best/claude-code.git
synced 2026-06-18 06:15:51 +00:00
feat: 完成一大波类型修复, 虽然 any 很多
This commit is contained in:
@@ -35,7 +35,7 @@ export function extractConversationText(messages: Message[]): string {
|
||||
for (const msg of messages) {
|
||||
if (msg.type !== 'user' && msg.type !== 'assistant') continue
|
||||
if ('isMeta' in msg && msg.isMeta) continue
|
||||
if ('origin' in msg && msg.origin && msg.origin.kind !== 'human') continue
|
||||
if ('origin' in msg && (msg as any).origin && (msg as any).origin.kind !== 'human') continue
|
||||
const content = msg.message.content
|
||||
if (typeof content === 'string') {
|
||||
parts.push(content)
|
||||
@@ -111,7 +111,7 @@ export async function generateSessionTitle(
|
||||
},
|
||||
})
|
||||
|
||||
const text = extractTextContent(result.message.content)
|
||||
const text = extractTextContent(result.message.content as any)
|
||||
|
||||
const parsed = titleSchema().safeParse(safeParseJSON(text))
|
||||
const title = parsed.success ? parsed.data.title.trim() || null : null
|
||||
|
||||
Reference in New Issue
Block a user