-
Notifications
You must be signed in to change notification settings - Fork 906
feat(tui): include terminal width in status_line.command payload #2478
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -25,6 +25,12 @@ export interface StatusLinePayload { | |
| maxContextTokens: number; | ||
| sessionId: string; | ||
| version: string; | ||
| /** | ||
| * Terminal width in columns, so the command can lay out full-width | ||
| * (left/right-justified) status lines. Piped stdio has no TTY, so | ||
| * `process.stdout.columns` is unavailable to the command. | ||
| */ | ||
| width: number; | ||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
This adds a user-visible field to the published CLI's AGENTS.md reference: AGENTS.md:L83-L83 Useful? React with 👍 / 👎. |
||
| } | ||
|
|
||
| export function runStatusLineCommand( | ||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
In the production layout,
mountFooter()wraps this component inGutterContainer(1, 1), whoserender()subtracts both gutters before calling the child, so a 120-column terminal passes118here and the command receives"width":118. This contradicts the new field's documented terminal-column semantics and makes scripts that need the actual terminal dimensions calculate against the wrong value; preserve the outer width separately rather than forwarding the component's inner content width.Useful? React with 👍 / 👎.