MCPcopy Create free account
hub / github.com/codehamr/codehamr / promptInput

Struct promptInput

internal/tui/prompt.go:27–32  ·  view source on GitHub ↗

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.

Source from the content-addressed store, hash-verified

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.
27type 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.

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected