MCPcopy Create free account
hub / github.com/codeaashu/claude-code / getToolResultIDs

Function getToolResultIDs

src/utils/messages.ts:1098–1113  ·  view source on GitHub ↗
(normalizedMessages: NormalizedMessage[])

Source from the content-addressed store, hash-verified

1096}
1097
1098export function getToolResultIDs(normalizedMessages: NormalizedMessage[]): {
1099 [toolUseID: string]: boolean
1100} {
1101 return Object.fromEntries(
1102 normalizedMessages.flatMap(_ =>
1103 _.type === 'user' && _.message.content[0]?.type === 'tool_result'
1104 ? [
1105 [
1106 _.message.content[0].tool_use_id,
1107 _.message.content[0].is_error ?? false,
1108 ],
1109 ]
1110 : ([] as [string, boolean][]),
1111 ),
1112 )
1113}
1114
1115export function getSiblingToolUseIDs(
1116 message: NormalizedMessage,

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected