mirror of
https://github.com/NousResearch/hermes-agent.git
synced 2026-07-07 13:02:07 +00:00
First step of decomposing the ChatBar god component (composer/index.tsx). Pull the self-contained *sizing* engine — stacked/inline layout + the measured-height CSS vars the thread reads for clearance — into composer/hooks/use-composer-metrics.ts. The hook owns: the media-query `narrow`, `expanded`/`tight`, the 8px height bucketing (so per-keystroke growth never invalidates the tree's computed style), the ResizeObserver, the popout re-sync, and the CSS-var cleanup. ChatBar now just calls `useComposerMetrics(...)` and consumes `stacked`. Behaviour-preserving (no keystroke/IME/contentEditable path touched): code moved verbatim. Deliberately a low-risk first slice on the app's most fragile file; the draft/state-engine spine is the next, dogfood-heavy step (see desktop-composer-plan.md). |
||
|---|---|---|
| .. | ||
| bootstrap-installer | ||
| desktop | ||
| shared | ||