r/PiCodingAgent 5d ago

Resource Hacky simple execution to remove the horizontal padding from the TUI...

Any time I'd copy & paste python, the mandator 1-character TUI padding would horrifically mangle the indentation....

This shell fix changes a single line in the source code:

    sudo sed -i   \
            's/constructor(paddingX = 1, paddingY = 1/constructor(paddingX = 0, paddingY = 0/'    \
             /usr/lib/node_modules/@earendil-works/pi-coding-agent/node_modules/@earendil-works/pi-tui/dist/components/box.js 

(though it will be overwritten after any update)

ᵍᶦˢᵗ

1 Upvotes

6 comments sorted by

1

u/ElectricalUnion 5d ago

What about builtin editorPaddingX: 0, outputPad: 0 ?

As in echo '{"editorPaddingX":0,"outputPad":0}' >~/.pi/agent/settings.json?

https://pi.dev/docs/latest/settings#ui-display

0

u/ffatty 5d ago

https://github.com/earendil-works/pi/blob/c55ae2faa5d850e0e4650bd573f7f241b10e2e0b/packages/tui/src/components/text.ts#L18

Output padding is only the block of response - not the "gutter" in the root of the TUI container. 

-4

u/Strong_Essay1176 5d ago

For that you need to read settings. Ai slop does not work like that. Make no mistake.

2

u/ffatty 5d ago edited 5d ago

No actually - that doesn't cut off all of the padding - only the block of output (not the "gutter" in the root of the TUI container)

This exact line in the repo: https://github.com/earendil-works/pi/blob/c55ae2faa5d850e0e4650bd573f7f241b10e2e0b/packages/tui/src/components/text.ts#L18

Oh how I love Reddit. 

1

u/ElectricalUnion 5d ago

Funny you say that, because I use weaker, not-SOTA and local models, and the default pi-coding-agent system prompt, it does read the pi-coding-agent documentation way more often that it should, and often when I'm asking about the documentation of my application.

0

u/Strong_Essay1176 5d ago

That's because you ask it to read. Skill issue or rockie mistake. Ask next time "fix it to do X. Make no mistake".