MCPcopy Create free account
hub / github.com/AnukarOP/claude-code-leaked / isToolUseRequestMessage

Function isToolUseRequestMessage

source code/utils/messages.ts:831–839  ·  view source on GitHub ↗
(
  message: Message,
)

Source from the content-addressed store, hash-verified

829}
830
831export function isToolUseRequestMessage(
832 message: Message,
833): message is ToolUseRequestMessage {
834 return (
835 message.type === 'assistant' &&
836 // Note: stop_reason === 'tool_use' is unreliable -- it's not always set correctly
837 message.message.content.some(_ => _.type === 'tool_use')
838 )
839}
840
841type ToolUseResultMessage = NormalizedUserMessage & {
842 message: { content: [ToolResultBlockParam] }

Callers 1

reorderMessagesInUIFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected