fix: simplify isCLIUserMessage function by removing unnecessary checks

This commit is contained in:
mingholy.lmh
2025-11-06 16:04:59 +08:00
parent 38ea6e1c74
commit 33016a1822

View File

@@ -406,12 +406,7 @@ export type CLIMessage =
export function isCLIUserMessage(msg: any): msg is CLIUserMessage {
return (
msg &&
typeof msg === 'object' &&
msg.type === 'user' &&
'message' in msg &&
'session_id' in msg &&
'parent_tool_use_id' in msg
msg && typeof msg === 'object' && msg.type === 'user' && 'message' in msg
);
}