tui: lower paste summary threshold to trigger on shorter content

This commit is contained in:
Dax Raad
2025-11-05 12:32:13 -05:00
parent ee8b81269b
commit 37e564139f

View File

@@ -650,7 +650,10 @@ export function Prompt(props: PromptProps) {
} catch {} } catch {}
const lineCount = (pastedContent.match(/\n/g)?.length ?? 0) + 1 const lineCount = (pastedContent.match(/\n/g)?.length ?? 0) + 1
if (lineCount >= 5 && !sync.data.config.experimental?.disable_paste_summary) { if (
(lineCount >= 3 || pastedContent.length > 150) &&
!sync.data.config.experimental?.disable_paste_summary
) {
event.preventDefault() event.preventDefault()
const currentOffset = input.visualCursor.offset const currentOffset = input.visualCursor.offset
const virtualText = `[Pasted ~${lineCount} lines]` const virtualText = `[Pasted ~${lineCount} lines]`