UNPKG

hataraku

Version:

An autonomous coding agent for building AI-powered development tools. The name "Hataraku" (働く) means "to work" in Japanese.

21 lines 653 B
export function formatToolResponse(response) { if (typeof response === 'string') { return response; } // Handle array of message blocks return response.map(block => { switch (block.type) { case 'text': return block.text; case 'image': return `[Image: ${block.image_url.url}]`; case 'tool_use': return `[Tool Use: ${block.tool_name}]`; case 'tool_result': return `[Tool Result: ${block.result}]`; default: return ''; } }).join('\n'); } //# sourceMappingURL=format.js.map