on main help sign in
fix(ui): increase paste lines threshold (#1937)

Signed-off-by: Carlos Alexandro Becker <caarlos0@users.noreply.github.com>

commit158f7a957cb8438324335c97783805b28ee3b18c authorCarlos Alexandro Becker <caarlos0@users.noreply.github.com> dateWed 21 Jan 2026, 17:18 (9 months ago) parent1ff0a53
1 file changed+4−2
internal/ui/model/ui.go+4−2
internal/ui/model/ui.go+4−2
@@ -56,6 +56,9 @@ const (
5656 compactModeHeightBreakpoint = 30
5757)
5858
59+// If pasted text has more than 2 newlines, treat it as a file attachment.
60+const pasteLinesThreshold = 10
61+
5962// Session details panel max height.
6063const sessionDetailsMaxHeight = 20
6164
@@ -2680,8 +2683,7 @@ func (m *UI) handlePasteMsg(msg tea.PasteMsg) tea.Cmd {
26802683 return nil
26812684 }
26822685
2683− // If pasted text has more than 2 newlines, treat it as a file attachment.
2684− if strings.Count(msg.Content, "\n") > 2 {
2686+ if strings.Count(msg.Content, "\n") > pasteLinesThreshold {
26852687 return func() tea.Msg {
26862688 content := []byte(msg.Content)
26872689 if int64(len(content)) > common.MaxAttachmentSize {