Skip to content

pi-usage-extension crash when terminal not wide enough #10

@markokocic

Description

@markokocic

When running /usage on Windows in the terminal window that is not wide enough, I get the following error, that also kills the whole pi process.

file:///C:/Users/marko/AppData/Roaming/npm/node_modules/@mariozechner/pi-coding-agent/node_modules/@mariozechner/pi-tui/dist/tui.js:854
                throw new Error(errorMsg);
                ^

Error: Rendered line 45 exceeds terminal width (86 > 51).

This is likely caused by a custom TUI component not truncating its output.
Use visibleWidth() to measure and truncateToWidth() to truncate lines.

Debug log written to: C:\Users\marko\.pi\agent\pi-crash.log
    at TUI.doRender (file:///C:/Users/marko/AppData/Roaming/npm/node_modules/@mariozechner/pi-coding-agent/node_modules/@mariozechner/pi-tui/dist/tui.js:854:23)
    at file:///C:/Users/marko/AppData/Roaming/npm/node_modules/@mariozechner/pi-coding-agent/node_modules/@mariozechner/pi-tui/dist/tui.js:281:18
    at process.processTicksAndRejections (node:internal/process/task_queues:85:11)

Node.js v24.10.0

C:\Users\marko>

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions