1
1
Fork
You've already forked kurama
0

bug: large pasted text is truncated or not sent in the prompt #17

Closed
opened 2026年07月10日 16:24:25 +02:00 by andeerc · 1 comment

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.
## 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.
Author
Owner
Copy link

Update from user: The text that is typed after pasting is sent correctly, but the pasted text itself is entirely missing. This strongly points to the TUI's bracketed paste handler or the extarea's paste processing logic dropping the payload silently, rather than a generic API limit dropping the whole message.

Update from user: The text that is typed *after* pasting is sent correctly, but the pasted text itself is entirely missing. This strongly points to the TUI's bracketed paste handler or the extarea's paste processing logic dropping the payload silently, rather than a generic API limit dropping the whole message.
Sign in to join this conversation.
No Branch/Tag specified
main
v1.0.1
v1.0.0
v0.1.4
v0.1.3
v0.1.2
v0.1.1
v0.0.3
v0.0.2
v0.0.1
Labels
Clear labels
No items
No labels
Milestone
Clear milestone
No items
No milestone
Projects
Clear projects
No items
No project
Assignees
Clear assignees
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
andeerc/kurama#17
Reference in a new issue
andeerc/kurama
No description provided.
Delete branch "%!s()"

Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?