Skip to content

feat: configurable paste collapse thresholds (TUI + CLI)#29723

Closed
kylekahraman wants to merge 1 commit into
NousResearch:mainfrom
kylekahraman:paste-collapse
Closed

feat: configurable paste collapse thresholds (TUI + CLI)#29723
kylekahraman wants to merge 1 commit into
NousResearch:mainfrom
kylekahraman:paste-collapse

Conversation

@kylekahraman

Copy link
Copy Markdown
Contributor

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

Re-opened as a fresh PR — previous #24990 was closed to coordinate with #8491 but got no response in 7 days.

Changes

File Change
cli.py Both paste handlers read from config instead of hardcoded 5
hermes_cli/config.py Added config keys + bumped _config_version to 24
ui-tui/src/config/limits.ts LARGE_PASTE now line-only, default 5
ui-tui/src/app/useComposerState.ts Reads pasteCollapseLines from uiStore
ui-tui/src/app/useConfigSync.ts _pasteCollapseLinesFromConfig() helper wired into applyDisplay
ui-tui/src/app/uiStore.ts pasteCollapseLines: 5 default
ui-tui/src/app/interfaces.ts pasteCollapseLines: number in UiState
ui-tui/src/gatewayTypes.ts paste_collapse_threshold?: number in ConfigFullResponse

Closes #5626

Adds two new config keys:
- paste_collapse_threshold (default: 5) — line count threshold for
  bracketed paste collapse in both TUI and CLI
- paste_collapse_threshold_fallback (default: 0, disabled) — same for
  the fallback heuristic in terminals without bracketed paste support

TUI frontend reads these from config.get full via applyDisplay/patchUiState.
CLI reads from self.config at paste-handling time.

Closes NousResearch#5626
Related: NousResearch#5623
@alt-glitch alt-glitch added type/feature New feature or request comp/tui Terminal UI (ui-tui/ + tui_gateway/) comp/cli CLI entry point, hermes_cli/, setup wizard P3 Low — cosmetic, nice to have labels May 21, 2026
@alt-glitch

Copy link
Copy Markdown
Collaborator

This is a duplicate of #8491 — both implement configurable paste collapse thresholds closing #5626. This PR uses default 5; #8491 uses default 25. Please coordinate with the author of #8491 to consolidate.

@kylekahraman

Copy link
Copy Markdown
Contributor Author

Already tried coordinating — closed #24990 on May 13 specifically to consolidate with #8491 and offered TUI frontend help. iRonin hasn't responded in 7 days.

This PR covers both CLI and TUI (4 extra files: useComposerState.ts, useConfigSync.ts, uiStore.ts, interfaces.ts + gatewayTypes.ts) that #8491 doesn't include.

Happy to contribute those TUI changes to #8491 if that's preferred, or keep this PR — whichever path, someone with merge access needs to make the call since iRonin isn't responding.

teknium1 added a commit that referenced this pull request May 25, 2026
Required by CI author validation after salvaging PR #29723.
@kylekahraman kylekahraman deleted the paste-collapse branch May 25, 2026 13:31
daletkc pushed a commit to daletkc/hermes-agent that referenced this pull request May 25, 2026
Required by CI author validation after salvaging PR NousResearch#29723.
bridge25 pushed a commit to bridge25/hermes-agent that referenced this pull request May 27, 2026
Required by CI author validation after salvaging PR NousResearch#29723.
mathias3 pushed a commit to mathias3/hermes-agent that referenced this pull request May 28, 2026
Required by CI author validation after salvaging PR NousResearch#29723.
Bryce-huang pushed a commit to wbkunlun/hermes-agent that referenced this pull request May 29, 2026
Required by CI author validation after salvaging PR NousResearch#29723.

#AI commit#
mosaiq-systems pushed a commit to mosaiq-systems/hermes-agent that referenced this pull request May 29, 2026
Required by CI author validation after salvaging PR NousResearch#29723.
gweeteve pushed a commit to gweeteve/hermes-agent that referenced this pull request Jun 2, 2026
Required by CI author validation after salvaging PR NousResearch#29723.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

comp/cli CLI entry point, hermes_cli/, setup wizard 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

2 participants