Prompt text input truncated in TUI
Describe the bug Entering input in TUI mode truncates text exceeding 400 chars.
Setup Please complete the following information along with version numbers, if applicable.
- OS: Ubuntu 24.10
- Shell: bash
- Terminal Emulator: st
- Terminal Multiplexer: tmux
To Reproduce Steps to reproduce the behavior:
- Open mods in TUI mode (
modswithout arguments) - Either paste, write or enter in editor a content which exceeds 400 characters
- Content is truncated in input field to 400 chars. The exceeding chars are removed and not included in prompt sent to AI
Source Code Just paste in TUI: https://www.lipsum.com/feed/html
Expected behavior Text input is not limited to any amount of characters or at least is limited to max-input-chars from mods settings.
Additional context
This doesn't seem to be related to max-input-chars settings, as value there was generous (in my setup max-input-chars: 392000)
Could this be related to gum write ?
It seems to be related to the number of lines (Max 99 lines) when I use gum write.
I am not sure if mods uses the same mecanism...
How to reproduce with gum write:
seq 1 102 | gum write
You will see it stops at line 99 and you cannot add more lines with Ctrl-J
When I copy 102 lines in my clipboard (seq 1 102 | clip.exe from WSL) and then starts mods and press Ctrl-E to start the editor and paste those 102 lines, save and exit my editor, mods only show the first 99 lines.
I think this is related to this: https://github.com/charmbracelet/huh/issues/501
How do we get this latest update into mods?