Is your feature request related to a problem?
The current status line is hardcoded to only use the first line of script output:
const trimmed = stdout.trim().split('\n')[0] || '';
This prevents users from displaying richer status information, such as:
- Context usage with a visual progress bar
- System metrics (CPU, memory) on separate rows
- Rate limit countdown timers
- Environment context (Node/Python versions)
Describe the solution you'd like
- Remove the
split('\n')[0] hard limit — allow the full stdout to be used
- Track output line count — count how many lines the script produces
- Clear before re-render — use ANSI escape sequences to erase old lines before writing new ones:
\x1b[N A # cursor up N lines
\x1b[J # erase from cursor to end of screen
- Keep horizontal truncation —
wrap="truncate" should remain for long single lines
Reference implementation
This approach is already used in Claude Code's status line rendering (packages/core/src/bridge/bridgeUI.ts):
let statusLineCount = 0
function clearStatusLines() {
if (statusLineCount <= 0) return
write(`\x1b[${statusLineCount}A`) // cursor up N lines
write('\x1b[J') // erase to end of screen
statusLineCount = 0
}
function writeStatus(text: string) {
write(text)
statusLineCount += countVisualLines(text)
}
Suggested approach for Qwen Code
const [lineCount, setLineCount] = useState(0)
function renderStatusLine(output: string) {
if (lineCount > 0) {
process.stdout.write(`\x1b[${lineCount}A`)
process.stdout.write('\x1b[J')
}
const lines = output.split('\n').filter(Boolean)
setLineCount(lines.length)
lines.forEach(line => process.stdout.write(line + '\n'))
}
Additional context
The single-line limitation was added during the original PR review as a layout safeguard. Multi-line support would make the feature more flexible without breaking existing single-line scripts.
Willing to submit a PR? Yes, if maintainers are open to this direction.
Is your feature request related to a problem?
The current status line is hardcoded to only use the first line of script output:
This prevents users from displaying richer status information, such as:
Describe the solution you'd like
split('\n')[0]hard limit — allow the full stdout to be usedwrap="truncate"should remain for long single linesReference implementation
This approach is already used in Claude Code's status line rendering (
packages/core/src/bridge/bridgeUI.ts):Suggested approach for Qwen Code
Additional context
The single-line limitation was added during the original PR review as a layout safeguard. Multi-line support would make the feature more flexible without breaking existing single-line scripts.
Willing to submit a PR? Yes, if maintainers are open to this direction.