Add keybindable commands to navigate between user messages
Closes #5077
Implements configurable keybinds to jump between user messages in chat.
- Defaults to "none" to avoid keybind collisions
- Snaps directly to user message boundaries
- Updated keybinds.mdx documentation
This is awesome!!
I would add default to <leader>+up and <leader>+down.
intentionally not setting default to avoid issues rn, we can add a default later on. Some keybind stuff is in flux rn
/review
@will-marella This should probably include a check similar to !part.synthetic && !part.ignored to avoid moving to messages that were actually produced by plugins and not typed by the user. Moving between plugin-produced messages is likely not the behaviour that was intended or that users would expect from these commands.
@will-marella This should probably include a check similar to
!part.synthetic && !part.ignoredto avoid moving to messages that were actually produced by plugins and not typed by the user. Moving between plugin-produced messages is likely not the behaviour that was intended or that users would expect from these commands.
This filter is now added with the same logic as messages_last_user
/review
Rebased on latest dev and addressed all code review feedback:
Typed dialog parameter with ReturnType<typeof useDialog> Used non-mutating reverse with spread operator Refactored to guard clause pattern to deduplicate dialog.clear() while avoiding else per style guide
Note: Pushed with --no-verify due to typecheck errors in upstream packages unrelated to this PR. My changes typecheck cleanly when checked in isolation.
/review
lgtm