A React Native app for the ultimate thinking partner.

fix(api): construct content for tool calls from tool_call data

- Tool call messages now construct content from tool_call.name and arguments
- Tool return messages extract content from tool_return field
- Fixes empty tool call display when API doesn't provide content field

+13 -1
+13 -1
src/api/lettaApi.ts
··· 603 603 role = 'tool'; 604 604 } 605 605 606 - // Get content - for reasoning messages, content is the reasoning text 606 + // Get content - construct from tool call if needed 607 607 let content: string = message.content || message.reasoning || ''; 608 + 609 + // For tool call messages, construct content from tool_call data if content is empty 610 + if ((type === 'tool_call_message' || type === 'tool_call') && !content && toolCall) { 611 + const name = toolCall.name || 'tool'; 612 + const args = toolCall.arguments || '{}'; 613 + content = `${name}(${args})`; 614 + } 615 + 616 + // For tool return messages, use the tool_return or tool_response value 617 + if ((type === 'tool_return_message' || type === 'tool_response') && !content && toolReturn) { 618 + content = typeof toolReturn === 'string' ? toolReturn : (toolReturn.tool_return || toolReturn.content || ''); 619 + } 608 620 609 621 return { 610 622 id: message.id,