feat(tui): make prompt size responsive and configurable#28255
Conversation
|
Thanks for updating your PR! It now meets our contributing guidelines. 👍 |
a02ffc8 to
be3306c
Compare
|
I think this introduces a regression for the prompt input width, now it is much wider which is a change from our existing styling |
The wider prompt is intentional, that's the core change this PR makes (along with allowing it to grow longer as well). The goal is for the prompt to grow within reasonable bounds with the terminal rather than staying capped at a fairly narrow width. The behavior is configurable as well. Happy to clarify anything about the approach if it's helpful. |
be3306c to
590b520
Compare
|
That first option (what this PR does) looks pretty ugly to me, ill check w/ team. I'm totally game for making the box configurable but i dont think we should be changing the default size to this |
|
Yeah talked w/ team we don't want to change the default behaviors here |
|
would you be open to adding the adaptive width behind an option in and, any concerns with the expanded vertical space also in this PR? |
|
i think the vertical spacing one is prolly fine |
590b520 to
8b8e874
Compare
|
Ok, left vertical spacing as-is in this change. Updated horizontal to not change the default behavior but instead provide an opt-in in {
"prompt": {
"max_width": "auto"
}
}
// Resolves to max(75, floor(terminal_width * 0.7)).or |
|
/review |


Issue for this PR
Related to #14670
Type of change
What does this PR do?
tui.json(settingprompt.max_height) instead of being hard-capped at 6 lines.tui.json(settingprompt.max_width) for users who want a wider/responsive prompt. This is opt-in via config.To enable responsive width, add to
tui.json:{ "prompt": { "max_width": "auto", "max_height": "auto" } }autoforprompt.max_widthresolves tomax(75, floor(terminal_width * 0.7)), or you can set a fixed numeric value.How did you verify your code works?
bun --cwd packages/opencode typecheckgit diff --checkbun turbo typecheckScreenshots / recordings
Checklist