on main help sign in
chore: small fix
426229fKujtim Hoxha
internal/tui/components/chat/chat.go+2−1
@@ -501,7 +501,8 @@ func (m *messageListCmp) convertAssistantMessage(msg message.Message, toolResult
501 // If this tool call is the agent tool, fetch nested tool calls
501 // If this tool call is the agent tool, fetch nested tool calls
502 if tc.Name == agent.AgentToolName {
502 if tc.Name == agent.AgentToolName {
503 nestedMessages, _ := m.app.Messages.List(context.Background(), tc.ID)
503 nestedMessages, _ := m.app.Messages.List(context.Background(), tc.ID)
504+ nestedToolResultMap := m.buildToolResultMap(nestedMessages)
504− nestedUIMessages := m.convertMessagesToUI(nestedMessages, make(map[string]message.ToolResult))
505+ nestedUIMessages := m.convertMessagesToUI(nestedMessages, nestedToolResultMap)
505 nestedToolCalls := make([]messages.ToolCallCmp, 0, len(nestedUIMessages))
506 nestedToolCalls := make([]messages.ToolCallCmp, 0, len(nestedUIMessages))
506 for _, nestedMsg := range nestedUIMessages {
507 for _, nestedMsg := range nestedUIMessages {
507 if toolCall, ok := nestedMsg.(messages.ToolCallCmp); ok {
508 if toolCall, ok := nestedMsg.(messages.ToolCallCmp); ok {