Explorar el Código

tui: lower paste summary threshold to trigger on shorter content

Dax Raad hace 9 meses
padre
commit
37e564139f
Se han modificado 1 ficheros con 4 adiciones y 1 borrados
  1. 4 1
      packages/opencode/src/cli/cmd/tui/component/prompt/index.tsx

+ 4 - 1
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]`