hataraku
Version:
An autonomous coding agent for building AI-powered development tools. The name "Hataraku" (働く) means "to work" in Japanese.
24 lines • 772 B
JavaScript
;
Object.defineProperty(exports, "__esModule", { value: true });
exports.formatToolResponse = formatToolResponse;
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