mirror of
https://github.com/NousResearch/hermes-agent.git
synced 2026-05-05 02:31:47 +00:00
fix(tui): render explicit prompt gap
Reserve the composer prompt gap as layout instead of relying on terminal handling of trailing spaces.
This commit is contained in:
parent
456955c2e4
commit
10fcd620d2
3 changed files with 50 additions and 9 deletions
|
|
@ -53,6 +53,10 @@ export function inputVisualHeight(value: string, columns: number) {
|
|||
return cursorLayout(value, value.length, columns).line + 1
|
||||
}
|
||||
|
||||
export function composerPromptWidth(promptText: string) {
|
||||
return Math.max(1, stringWidth(promptText)) + 1
|
||||
}
|
||||
|
||||
export function stableComposerColumns(totalCols: number, promptWidth: number) {
|
||||
// Physical render/wrap width. Always reserve outer composer padding and
|
||||
// prompt prefix. Only reserve the transcript scrollbar gutter when the
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue