@@ -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 {