feat: 问就是封包

This commit is contained in:
claude-code-best
2026-03-31 23:32:58 +08:00
parent d7a729ca68
commit dd9cd782a7
67 changed files with 423 additions and 172 deletions

View File

@@ -337,7 +337,7 @@ function renderToolUseProgressMessage(tool: Tool, tools: Tools, lookups: ReturnT
columns: number;
rows: number;
}): React.ReactNode {
const toolProgressMessages = progressMessagesForMessage.filter((msg): msg is ProgressMessage<ToolProgressData> => msg.data.type !== 'hook_progress');
const toolProgressMessages = progressMessagesForMessage.filter((msg): msg is ProgressMessage<ToolProgressData> => (msg.data as { type?: string }).type !== 'hook_progress');
try {
const toolMessages = tool.renderToolUseProgressMessage?.(toolProgressMessages, {
tools,

View File

@@ -40,8 +40,6 @@ const NULL_RENDERING_TYPES = [
'auto_mode',
'auto_mode_exit',
'output_token_usage',
'pen_mode_enter',
'pen_mode_exit',
'verify_plan_reminder',
'current_session_memory',
'compaction_reminder',
@@ -65,6 +63,6 @@ export function isNullRenderingAttachment(
): boolean {
return (
msg.type === 'attachment' &&
NULL_RENDERING_ATTACHMENT_TYPES.has(msg.attachment.type)
NULL_RENDERING_ATTACHMENT_TYPES.has(msg.attachment.type as Attachment['type'])
)
}