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:
@@ -101,7 +101,7 @@ export class ExitPlanModeScanner {
|
||||
ingest(newEvents: SDKMessage[]): ScanResult {
|
||||
for (const m of newEvents) {
|
||||
if (m.type === 'assistant') {
|
||||
for (const block of m.message.content) {
|
||||
for (const block of (m as any).message.content) {
|
||||
if (block.type !== 'tool_use') continue
|
||||
const tu = block as ToolUseBlock
|
||||
if (tu.name === EXIT_PLAN_MODE_V2_TOOL_NAME) {
|
||||
@@ -109,7 +109,7 @@ export class ExitPlanModeScanner {
|
||||
}
|
||||
}
|
||||
} else if (m.type === 'user') {
|
||||
const content = m.message.content
|
||||
const content = (m as any).message.content
|
||||
if (!Array.isArray(content)) continue
|
||||
for (const block of content) {
|
||||
if (block.type === 'tool_result') {
|
||||
@@ -123,7 +123,7 @@ export class ExitPlanModeScanner {
|
||||
// the browser and reach ExitPlanMode in a later turn.
|
||||
// Only error subtypes (error_during_execution, error_max_turns,
|
||||
// etc.) mean the session is actually dead.
|
||||
this.terminated = { subtype: m.subtype }
|
||||
this.terminated = { subtype: m.subtype as string }
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user