diff options
| author | Dax Raad <[email protected]> | 2025-11-05 12:32:13 -0500 |
|---|---|---|
| committer | Dax Raad <[email protected]> | 2025-11-05 12:32:23 -0500 |
| commit | 37e564139fc1b46a66f916280a3baf3e3e399bf2 (patch) | |
| tree | 4cf5823d3114ad84f5c9d36e9a7727c42fa1e781 | |
| parent | ee8b81269bdd40dde0987e7796ae0ebcd8ebc3ab (diff) | |
| download | opencode-37e564139fc1b46a66f916280a3baf3e3e399bf2.tar.gz opencode-37e564139fc1b46a66f916280a3baf3e3e399bf2.zip | |
tui: lower paste summary threshold to trigger on shorter content
| -rw-r--r-- | packages/opencode/src/cli/cmd/tui/component/prompt/index.tsx | 5 |
1 files changed, 4 insertions, 1 deletions
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 d66b8e0a3..c3ae1407d 100644 --- a/packages/opencode/src/cli/cmd/tui/component/prompt/index.tsx +++ b/packages/opencode/src/cli/cmd/tui/component/prompt/index.tsx @@ -650,7 +650,10 @@ export function Prompt(props: PromptProps) { } catch {} 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() const currentOffset = input.visualCursor.offset const virtualText = `[Pasted ~${lineCount} lines]` |
