Skip to content

fix(paste): respect paste_collapse_threshold from config, default 25#8491

Open
iRonin wants to merge 1 commit into
NousResearch:mainfrom
iRonin:ironin/prompt-display-fix
Open

fix(paste): respect paste_collapse_threshold from config, default 25#8491
iRonin wants to merge 1 commit into
NousResearch:mainfrom
iRonin:ironin/prompt-display-fix

Conversation

@iRonin

@iRonin iRonin commented Apr 12, 2026

Copy link
Copy Markdown
Contributor

Makes paste collapse threshold configurable via display.paste_collapse_threshold (default 25) instead of hardcoded value.

Closes #5626

Both paste handlers (bracketed paste and fallback text-change)
hardcoded the collapse threshold to 5 lines, ignoring the
paste_collapse_threshold config value entirely.

Now reads self._paste_collapse_threshold from config (default 25)
so pastes under the threshold stay inline as text.
@alt-glitch alt-glitch added type/feature New feature or request P3 Low — cosmetic, nice to have comp/tui Terminal UI (ui-tui/ + tui_gateway/) labels Apr 28, 2026
@kylekahraman

Copy link
Copy Markdown
Contributor

I closed #24990 in favor of this one. I have the TUI frontend plumbing ready (config.get full → applyDisplay → patchUiState → uiStore → composer) — same approach used for other display configs like indicatorStyle and streaming.

Happy to either:

  • Open a PR against your fork branch with the TUI changes
  • Push commits directly to ironin/prompt-display-fix if you add me as a contributor

Also fine adjusting the default to whatever number the maintainers prefer — the key thing is it being configurable at all.

TUI changes needed (4 files + type plumbing):

  • ui-tui/src/config/limits.ts — change LARGE_PASTE default from { chars: 8000, lines: 80 } to line-only
  • ui-tui/src/app/useComposerState.ts — read threshold from uiStore instead of hardcoded constant
  • ui-tui/src/app/useConfigSync.ts_pasteCollapseLinesFromConfig() helper wired into applyDisplay
  • ui-tui/src/app/uiStore.ts + ui-tui/src/app/interfaces.ts + ui-tui/src/gatewayTypes.ts — type plumbing

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

comp/tui Terminal UI (ui-tui/ + tui_gateway/) P3 Low — cosmetic, nice to have type/feature New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

feat: configurable paste collapse thresholds + input scroll indicators

3 participants