diff --git a/packages/opencode/src/cli/cmd/tui/component/prompt/index.tsx b/packages/opencode/src/cli/cmd/tui/component/prompt/index.tsx index 12f054683..d876a1ad7 100644 --- a/packages/opencode/src/cli/cmd/tui/component/prompt/index.tsx +++ b/packages/opencode/src/cli/cmd/tui/component/prompt/index.tsx @@ -503,12 +503,16 @@ export function Prompt(props: PromptProps) { event.preventDefault() return } - event.preventDefault() const pastedContent = event.text.trim() - if (!pastedContent) return - const lineCount = (pastedContent.match(/\n/g)?.length ?? 0) + 1 + + if (lineCount <= 5) { + return + } + + event.preventDefault() + const currentOffset = input.visualCursor.offset const virtualText = `[Pasted ~${lineCount} lines]` const textToInsert = virtualText + " "