feat: configurable paste collapse thresholds (TUI + CLI)#24990
feat: configurable paste collapse thresholds (TUI + CLI)#24990kylekahraman wants to merge 1 commit into
Conversation
d2f6a7c to
5161bd2
Compare
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
5161bd2 to
78742de
Compare
|
Thanks for the heads-up — I checked #8491 and the other prior attempts. Not a true duplicate. #8491 only touches Scope comparison:
Im happy to converge on |
|
Closing in favor of #8491 — I'll add TUI frontend support to that PR. The TUI plumbing is the novel part here (config.get full → applyDisplay → patchUiState → composer) and it belongs on the same branch that already has the CLI half. |
|
Re-opening — no response from iRonin on #8491 in 7 days. This PR covers CLI + TUI, both paste paths (bracketed + fallback). |
Adds two new config keys for controlling paste collapse behavior:
paste_collapse_threshold(default:5) — number of lines above which a bracketed paste gets collapsed to a file reference in both the TUI and CLI. Set to0to disable.paste_collapse_threshold_fallback(default:0, disabled) — same threshold for the fallback heuristic used by terminals without bracketed paste support. Defaults to disabled because the fallback is destructive (replaces the entire buffer rather than appending).Changes
hermes_cli/config.py_config_versionto 24cli.py5ui-tui/src/config/limits.tsLARGE_PASTEnow line-only, default 5ui-tui/src/app/useComposerState.tspasteCollapseLinesfrom uiStoreui-tui/src/app/useConfigSync.ts_pasteCollapseLinesFromConfig()helper wired intoapplyDisplayui-tui/src/app/uiStore.tspasteCollapseLines: 5defaultui-tui/src/app/interfaces.tspasteCollapseLines: numberin UiStateui-tui/src/gatewayTypes.tspaste_collapse_threshold?: numberin ConfigFullResponseRelated