Repository navigation
v5.39.0
Added
-
PromptInputgets inline paste pills — the same onesComposergained in
5.38.0, built on the same code (react-fancy#32, asked for by Genie 2, whose chat
composer this is).<PromptInput budgetTokens={200_000} pasteThreshold={500} pasteImages previewChars={30} onSubmit={(text, attachments) => send(text, attachments)} />
- A paste of
pasteThreshold+ characters becomesPasted text · N characters
where it was pasted, on a line of its own. Clicking it puts the full text
back right there; hovering shows the first and lastpreviewChars. pasteImages: a pasted image becomes an inlinePasted image Npill AND
arrives inonSubmit's attachments with its File, in message order. The text
marks where it sat as[Pasted image N].onSubmitreceives every text pill expanded where it sits — never a marker —
and a message that is only a paste can be sent.- The send contract is unchanged: Ctrl/⌘+Enter sends, plain Enter is a
newline, and the/and@pickers, drop-to-attach and the file picker all
work in the inline editor exactly as in the textarea. renderPastePreviewandpasteClassNamesrestyle the pills and popover.
Asked for as chips beside the input carried as
text/plainattachments; built
inline instead, to the owner's own spec given against screenshots of this
composer. The text still reaches the model — positioned where the person put it. - A paste of
-
A quieter
PromptInputfooter, each part opt-in:attachButton="icon"— paperclip only, with an accessible name and a tooltip.sendButton="icon"— a compact send button whose tooltip carries the shortcut
(Send · Ctrl+Enter), replacing the inline kbd hint.meter="near-limit"— hidden until usage passesmeterShowAt(0.75), muted
untilmeterWarnAt(0.9), warning colour past it.meter="hidden"never
shows it.usedTokens— the caller's REAL usage (an agent's context, say). The
meter shows it plus the draft's estimate; before, it could only estimate the
draft as length ÷charsPerToken, which is why a host had to fake the budget.
Handles:
data-react-fancy-prompt-input-attach,-send,-meter(with
data-level:ok/caution/warn/muted).
Changed
ComposerandPromptInputnow share one implementation of inline paste
pills (useInlinePaste), so the two cannot disagree about what a pill means.
No behaviour change toComposer; all its tests pass untouched.Composer's internal inline pill moved to its own file. No behaviour or API
change; its props were being read asComposer's by the showcase's docs
coverage check.
What you must DO: nothing. Every option defaults to the old behaviour: no
pasteThreshold or pasteImages means the textarea you had, and the footer is
unchanged unless you ask.