promptInput wraps bubbles/textarea with an atomic-chip model. A large paste collapses into a single inline label [Pasted text +N lines] that acts as one character for cursor moves and deletion; the original text lives in store, keyed by id, and is expanded back by Value() on LLM submission.
| 25 | // character for cursor moves and deletion; the original text lives in store, |
| 26 | // keyed by id, and is expanded back by Value() on LLM submission. |
| 27 | type promptInput struct { |
| 28 | ta textarea.Model |
| 29 | store map[int]chipContent |
| 30 | spans []chipSpan |
| 31 | nextID int |
| 32 | } |
| 33 | |
| 34 | // chipContent is the payload behind a chip, kept in store by id so the visible |
| 35 | // label can collapse while the real text survives for Value() and replay. |
nothing calls this directly
no outgoing calls
no test coverage detected