From 158f7a957cb8438324335c97783805b28ee3b18c Mon Sep 17 00:00:00 2001 From: Carlos Alexandro Becker Date: Wed, 21 Jan 2026 17:18:21 -0300 Subject: [PATCH] fix(ui): increase paste lines threshold (#1937) Signed-off-by: Carlos Alexandro Becker --- internal/ui/model/ui.go | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/internal/ui/model/ui.go b/internal/ui/model/ui.go index 5b33117771717e5c4b84d31fabe7d2f238ca4b95..e26b9c437655b06a87f7998125940a8f6ad04443 100644 --- a/internal/ui/model/ui.go +++ b/internal/ui/model/ui.go @@ -56,6 +56,9 @@ const ( compactModeHeightBreakpoint = 30 ) +// If pasted text has more than 2 newlines, treat it as a file attachment. +const pasteLinesThreshold = 10 + // Session details panel max height. const sessionDetailsMaxHeight = 20 @@ -2680,8 +2683,7 @@ func (m *UI) handlePasteMsg(msg tea.PasteMsg) tea.Cmd { return nil } - // If pasted text has more than 2 newlines, treat it as a file attachment. - if strings.Count(msg.Content, "\n") > 2 { + if strings.Count(msg.Content, "\n") > pasteLinesThreshold { return func() tea.Msg { content := []byte(msg.Content) if int64(len(content)) > common.MaxAttachmentSize {