mirror of
https://github.com/MoonshotAI/kimi-code.git
synced 2026-07-21 07:04:22 +00:00
* feat(web): auto-grow composer and add expandable editing mode - Grow the chat textarea with its content up to a 1/4-viewport cap. - Add an expand toggle above the send button for a taller editor; in that mode Enter inserts a newline and Cmd/Ctrl+Enter or the button sends, then the editor collapses back. * fix(web): reset expanded composer state on session change The composer instance is reused across sessions (not keyed by session id), so the expanded preference leaked into the next session's draft, leaving it stuck in the tall editor with Enter inserting newlines. Collapse back when the active session changes. * fix(web): match expand-toggle threshold to theme resting height The modern/kimi global theme overrides the composer min-height to 40px (the scoped default is 56px), so a hard-coded 56px threshold kept the expand toggle hidden until a third line under the default theme. Read the computed min-height from the element instead. * fix(web): recompute expand-toggle visibility after collapsing While expanded the computed min-height is 70vh, so a multi-line draft measured there sets isGrown=false. Collapsing did not recompute it, hiding the toggle even though the collapsed draft was still multi-line. Recompute growth after every toggle via a shared helper. The expanded state itself is unchanged and stays at 70vh until toggled or sent. * fix(web): collapse expanded editor on slash-command submit Known slash commands return early from handleSubmit, above the post-send collapse, so sending an expanded /goal, /btw, /compact, or skill command left an empty 70vh editor. Collapse in the slash-command path too. * fix(web): refocus textarea after toggling expand Clicking the expand toggle leaves focus on the button, so subsequent keystrokes do not reach the textarea and Enter would activate the button again instead of inserting a newline. Return focus to the textarea after toggling. * fix(web): refit textarea when collapsing after image-only sends When the expanded editor collapses on an image-only send, the text is already empty so the draft watcher never re-runs autosize; the textarea kept the inline height measured at 70vh and the collapsed cap left an oversized empty box. Route all send/steer collapses through a helper that re-runs autosize after the 70vh min-height is removed. --------- Co-authored-by: liruifengv <liruifeng1024@gmail.com> |
||
|---|---|---|
| .. | ||
| kimi-code | ||
| kimi-web | ||
| vis | ||