mirror of
https://github.com/MoonshotAI/kimi-code.git
synced 2026-08-22 07:05:41 +00:00
Move the slash menu's open/items/active state, the filter logic, and item selection out of Composer into useSlashMenu. The composable takes the text ref, textarea ref, autosize, a skills getter, and the emit/history-push callbacks as deps. The composer keeps the keydown orchestration (arrow keys, Enter/Tab, Escape) because it also juggles the mention menu and history recall; it consumes the returned open/items/active refs directly and calls update/select. The destructured refs are aliased back to the original names so the rest of the component is unchanged. Composer.vue: 2058 -> 2035 lines. Adds unit tests for useSlashMenu. No behavior change. |
||
|---|---|---|
| .. | ||
| kimi-code | ||
| kimi-web | ||
| vis | ||