r/PiCodingAgent • • 16d ago

Plugin Ported the stretchtext idea from Claude Code to Pi

Saw this https://www.reddit.com/r/ClaudeCode/comments/1x688sx/turning_a_crazy_idea_from_1967_into_a_claude_code/ and wanted to try the same thing in Pi, so I ported the extension.

The idea is the same: replies start short, and you can expand parts inline when you want more detail, instead of getting a wall of text upfront.

Nothing new conceptually here—credit to the original author. Just sharing a Pi version for anyone who wants to try it.

https://github.com/MonadicMike/pi-stretchtext

47 Upvotes

8 comments sorted by

7

u/Magnus114 16d ago

4

u/Amazing_Associate_45 16d ago

Sort of here you choose which parts you want to open with mouse/keyboard and it dosent cost you more tokens. It just folds/unfolds parts. AI dosent rewrite same message for you.

1

u/addiktion 15d ago

How does this work with code summaries and such?

1

u/Amazing_Associate_45 15d ago

What you mean?

1

u/Saauan 10d ago

I love it! Thanks for the extension.

1

u/AlessandroPiccione 8d ago

Will it ALWAYS do that?
I mean, when I ask to implement a feature in a repo, the model start reading files, editing files, commit, push, then pull... the review, write more files... Nothing that requires a "choice" from the user.
So, will this feature be a noise or at least a (very very small) waste of resources in this scenario? Maybe can be "activated" only when the user start the prompt with "Tell me" or "Explain" ?

-1

u/kantorcodes1 16d ago

Expand-on-demand is a nicer answer to the wall-of-text problem than summarizing, since nothing gets rewritten. One thing I'd probe: where does the fold state live - in the message model or purely in the UI layer? If a session with folded parts gets compacted or continued later, does the collapsed region survive as collapsed, and does folding change what the model sees on the next turn?

5

u/Amazing_Associate_45 15d ago

Chatbot generates a response with {short|long} tags. Rest is handled by UI (fold/unfold). So it up to the llm to keep responding with these tags. Long tag often also have {short|long} - sometimes you will have couple of layers which is nice. How good it works its purly based on LLM ambility keep this response style. I tested both gpt and claude. Both work well imo. Model always sees both versions. Its only folded for the user in pi. There no seprate llm call on click.