on main help sign in
chore: small fix
commit426229f1c665832930ec90a54316968831c6fa2e authorKujtim Hoxha <kujtimii.h@gmail.com> dateFri 25 Jul 2025, 18:58 (1 year ago) parent683bcae
1 file changed+2−1
internal/tui/components/chat/chat.go+2−1
internal/tui/components/chat/chat.go+2−1
@@ -501,7 +501,8 @@ func (m *messageListCmp) convertAssistantMessage(msg message.Message, toolResult
501501 // If this tool call is the agent tool, fetch nested tool calls
502502 if tc.Name == agent.AgentToolName {
503503 nestedMessages, _ := m.app.Messages.List(context.Background(), tc.ID)
504− nestedUIMessages := m.convertMessagesToUI(nestedMessages, make(map[string]message.ToolResult))
504+ nestedToolResultMap := m.buildToolResultMap(nestedMessages)
505+ nestedUIMessages := m.convertMessagesToUI(nestedMessages, nestedToolResultMap)
505506 nestedToolCalls := make([]messages.ToolCallCmp, 0, len(nestedUIMessages))
506507 for _, nestedMsg := range nestedUIMessages {
507508 if toolCall, ok := nestedMsg.(messages.ToolCallCmp); ok {