The open source coding agent.
TypeScript
fix: log display
adamdottvf7849c2d59d3
diff --git a/internal/tui/components/logs/details.go b/internal/tui/components/logs/details.goindex 631bb97b379..701361bb4a0 100644--- a/internal/tui/components/logs/details.go+++ b/internal/tui/components/logs/details.go@@ -1,6 +1,8 @@package logsimport (+ "bytes"+ "encoding/json""fmt""strings""time"@@ -96,6 +98,15 @@ func (i *detailCmp) updateContent() {valueStyle := lipgloss.NewStyle().Foreground(t.Text())for key, value := range i.currentLog.Attributes {+ // if value is JSON, render it with indentation+ if strings.HasPrefix(value, "{") {+ var indented bytes.Buffer+ if err := json.Indent(&indented, []byte(value), "", " "); err != nil {+ indented.WriteString(value)+ }+ value = indented.String()+ }+attrLine := fmt.Sprintf("%s: %s",keyStyle.Render(key),valueStyle.Render(value),diff --git a/internal/tui/components/logs/table.go b/internal/tui/components/logs/table.goindex 5632d163c1b..fa701adeeb2 100644--- a/internal/tui/components/logs/table.go+++ b/internal/tui/components/logs/table.go@@ -81,7 +81,6 @@ func (i *tableCmp) Update(msg tea.Msg) (tea.Model, tea.Cmd) {return i, i.fetchLogs()case pubsub.Event[logging.Log]:- // Only handle created eventsif msg.Type == logging.EventLogCreated {// Add the new log to our listi.logs = append([]logging.Log{msg.Payload}, i.logs...)