Extracted from #39. Today every keystroke dispatches through the global useChat reducer and persists a single global draft via the state bridge, re-rendering the whole chat tree.
Make InputArea own its value locally (onSend(content, chips) replaces value/onChange), and persist drafts per session via the existing bridge getState/setState (debounced, swapped on session switch, with legacy single-draft fallback). Ride-alongs from #39: useFilePicker React 19 ref-typing fix and the textarea autosize style-thrash fix.
Size: M | Depends on: nothing (touches useChat's sendMessage signature, so sequence around #61) | Tier: 2
Extracted from #39. Today every keystroke dispatches through the global useChat reducer and persists a single global draft via the state bridge, re-rendering the whole chat tree.
Make InputArea own its value locally (onSend(content, chips) replaces value/onChange), and persist drafts per session via the existing bridge getState/setState (debounced, swapped on session switch, with legacy single-draft fallback). Ride-alongs from #39: useFilePicker React 19 ref-typing fix and the textarea autosize style-thrash fix.
Size: M | Depends on: nothing (touches useChat's sendMessage signature, so sequence around #61) | Tier: 2