@@ -12,6 +12,7 @@ import (
12 "github.com/charmbracelet/catwalk/pkg/catwalk"
12 "github.com/charmbracelet/catwalk/pkg/catwalk"
13 "github.com/charmbracelet/lipgloss/v2"
13 "github.com/charmbracelet/lipgloss/v2"
14 "github.com/charmbracelet/x/ansi"
14 "github.com/charmbracelet/x/ansi"
15+ "github.com/charmbracelet/x/exp/ordered"
15 "github.com/google/uuid"
16 "github.com/google/uuid"
17 "github.com/atotto/clipboard"
18 "github.com/atotto/clipboard"
@@ -271,7 +272,7 @@ func (m *messageCmp) renderThinkingContent() string {
273 fullContent := content.String()
274 fullContent := content.String()
274− height := util.Clamp(lipgloss.Height(fullContent), 1, 10)
275+ height := ordered.Clamp(lipgloss.Height(fullContent), 1, 10)
275 m.thinkingViewport.SetHeight(height)
276 m.thinkingViewport.SetHeight(height)
276 m.thinkingViewport.SetWidth(m.textWidth())
277 m.thinkingViewport.SetWidth(m.textWidth())
277 m.thinkingViewport.SetContent(fullContent)
278 m.thinkingViewport.SetContent(fullContent)
@@ -344,7 +345,7 @@ func (m *messageCmp) GetSize() (int, int) {
345// SetSize updates the width of the message component for text wrapping
346// SetSize updates the width of the message component for text wrapping
346func (m *messageCmp) SetSize(width int, height int) tea.Cmd {
347func (m *messageCmp) SetSize(width int, height int) tea.Cmd {
347− m.width = util.Clamp(width, 1, 120)
348+ m.width = ordered.Clamp(width, 1, 120)
348 m.thinkingViewport.SetWidth(m.width - 4)
349 m.thinkingViewport.SetWidth(m.width - 4)
349 return nil
350 return nil