Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 0 additions & 16 deletions pkg/tui/components/messages/messages.go
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
package messages

import (
"os"
"slices"
"strconv"
"strings"
Expand Down Expand Up @@ -121,9 +120,6 @@ type model struct {
selectedMessageIndex int // Index of selected message (-1 = no selection)
focused bool // Whether the messages component is focused

// Debug layout mode - highlights truncated lines with red background
debugLayout bool

// Inline editing state
inlineEditMsgIndex int // Index of message being edited (-1 = not editing)
inlineEditSessionPos int // Session position for branching
Expand Down Expand Up @@ -156,7 +152,6 @@ func newModel(width, height int, sessionState *service.SessionState) *model {
scrollview: sv,
selectedMessageIndex: -1,
inlineEditMsgIndex: -1,
debugLayout: os.Getenv("DOCKER_AGENT_EXPERIMENTAL_DEBUG_LAYOUT") == "1" || os.Getenv("CAGENT_EXPERIMENTAL_DEBUG_LAYOUT") == "1",
renderDirty: true,
}
}
Expand Down Expand Up @@ -530,17 +525,6 @@ func (m *model) View() string {
visibleLines = m.applySelectionHighlight(visibleLines, startLine)
}

// Apply debug layout highlighting for truncated lines
if m.debugLayout {
contentWidth := m.contentWidth()
for i, line := range visibleLines {
if ansi.StringWidth(line) > contentWidth {
truncated := ansi.Truncate(line, contentWidth, "")
visibleLines[i] = styles.BaseStyle.Background(styles.Error).Render(ansi.Strip(truncated))
}
}
}

// Sync scroll state and delegate rendering to scrollview which guarantees
// fixed-width padding, pinned scrollbar, and exact height.
m.scrollview.SetContent(m.renderedLines, m.totalScrollableHeight())
Expand Down
Loading