Summary
When pasting a very large block of text (e.g. a large log file or a big chunk of code) into the chat prompt, the text is not sent correctly to the model. The text is either truncated, discarded, or causes the prompt input to fail silently.
Steps to Reproduce
- Copy a very large block of text to the clipboard (e.g. 500+ lines of logs).
- Paste it into the Nibble chat prompt.
- Press enter to send.
- Observe that the model does not receive the full text, or the prompt fails to send it entirely.
Expected Behavior
- The chat input should accept large blocks of pasted text without arbitrary limits.
- The full pasted text should be sent to the LLM (subject only to the LLM's context window limits, not TUI input limits).
Possible Causes
- The underlying
charm.land/bubbles/v2/textarea component might have a default CharLimit configured that is too low.
- There might be an issue with how terminal bracketed paste mode handles extremely large payloads before the buffer flushes.
- The message construction logic might be trimming or dropping payloads that exceed a certain byte size before sending to the provider.
Notes
- This is a critical usability issue, as users frequently need to paste large stack traces or code snippets for the agent to analyse.
- Check the initialization of the
textarea.Model in the UI codebase and ensure CharLimit is set to 0 (unlimited) or a very high value.
## Summary
When pasting a very large block of text (e.g. a large log file or a big chunk of code) into the chat prompt, the text is not sent correctly to the model. The text is either truncated, discarded, or causes the prompt input to fail silently.
## Steps to Reproduce
1. Copy a very large block of text to the clipboard (e.g. 500+ lines of logs).
2. Paste it into the Nibble chat prompt.
3. Press enter to send.
4. Observe that the model does not receive the full text, or the prompt fails to send it entirely.
## Expected Behavior
- The chat input should accept large blocks of pasted text without arbitrary limits.
- The full pasted text should be sent to the LLM (subject only to the LLM's context window limits, not TUI input limits).
## Possible Causes
- The underlying `charm.land/bubbles/v2/textarea` component might have a default `CharLimit` configured that is too low.
- There might be an issue with how terminal bracketed paste mode handles extremely large payloads before the buffer flushes.
- The message construction logic might be trimming or dropping payloads that exceed a certain byte size before sending to the provider.
## Notes
- This is a critical usability issue, as users frequently need to paste large stack traces or code snippets for the agent to analyse.
- Check the initialization of the `textarea.Model` in the UI codebase and ensure `CharLimit` is set to `0` (unlimited) or a very high value.