From 426229f1c665832930ec90a54316968831c6fa2e Mon Sep 17 00:00:00 2001 From: Kujtim Hoxha Date: Fri, 25 Jul 2025 18:58:17 +0200 Subject: [PATCH] chore: small fix --- internal/tui/components/chat/chat.go | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/internal/tui/components/chat/chat.go b/internal/tui/components/chat/chat.go index 211808b88b1291ed2359dc137e14d1eeea8f2c14..d994c1ffd608ba42eeabb01a510c6a04fe67a2df 100644 --- a/internal/tui/components/chat/chat.go +++ b/internal/tui/components/chat/chat.go @@ -501,7 +501,8 @@ func (m *messageListCmp) convertAssistantMessage(msg message.Message, toolResult // If this tool call is the agent tool, fetch nested tool calls if tc.Name == agent.AgentToolName { nestedMessages, _ := m.app.Messages.List(context.Background(), tc.ID) - nestedUIMessages := m.convertMessagesToUI(nestedMessages, make(map[string]message.ToolResult)) + nestedToolResultMap := m.buildToolResultMap(nestedMessages) + nestedUIMessages := m.convertMessagesToUI(nestedMessages, nestedToolResultMap) nestedToolCalls := make([]messages.ToolCallCmp, 0, len(nestedUIMessages)) for _, nestedMsg := range nestedUIMessages { if toolCall, ok := nestedMsg.(messages.ToolCallCmp); ok {