Skip to content

Conversation

@ariane-emory
Copy link
Contributor

@ariane-emory ariane-emory commented Nov 28, 2025

Resolves #4847.

This PR adds a new messages_last_user command that scrolls/jumps the TUI viewport to the last message sent by the user.

This improves ergonomics and UX by providing the user with a way to easily jump back to the last message, which is helpful when the model has generated several screens full of output and they'd like to review it, which can occur frequently when the user is paying attention to another window or steps AFK while the model works. Having a dedicated command for this purpose that can be invoked with a single keystroke is more ergonomic than using the session timeline, which can accomplish the same goal but requires more keystrokes to do so.

The command is not currently bound to any key by default, leaving it up to the user to bind it to their preferred key in their opencode.jsonc, but I'm open to adding some default keybinding if a maintainer has a suggestion as to what key they think is appropriate.

…and names, no default keybinding (leave it up to the user)
- Added messages_last_user field to KeybindsConfig in types.gen.ts
- This field was missing from the generated SDK, causing CI to fail
- Field corresponds to the new 'Jump to last user message' command
@ariane-emory ariane-emory marked this pull request as draft November 28, 2025 15:05
@ariane-emory ariane-emory marked this pull request as ready for review November 28, 2025 15:39
@ariane-emory
Copy link
Contributor Author

Upon further consideration, I concluded that this probably should have a default keybinding. Since the obvious choice of <leader>l was already in use, I decided to go with <leader>p for now: 'p' seemed like a reasonable mnemonic for the idea of 'previous (user) message' that should be easy to remember.

I'd be happy to change it to any other available key or go back to not having a default keybinding if y'all think that would be preferable.

@ariane-emory
Copy link
Contributor Author

As requested by @rekram1-node, no default keybinding is added for this command, leaving it for users to assign their own preferred keybinding if they so choose.

@rekram1-node rekram1-node merged commit 921b980 into anomalyco:dev Dec 3, 2025
3 checks passed
@ariane-emory ariane-emory deleted the feat/messages-last-user-command branch December 3, 2025 19:25
shuv1337 added a commit to Latitudes-Dev/shuvcode that referenced this pull request Dec 4, 2025
* ignore: update download stats 2025-12-03

* ignore: docs & style

* chore: format code

* add retry case for grok resource exhausted

* feat: experimental.primary_tools, allow user to set the tools that should only be available to primary agents (anomalyco#4913)

Co-authored-by: GitHub Action <action@github.com>

* fix: bunfs path on windows (anomalyco#5011)

* feat: add messages_last_user command to scroll TUI to last user message (implements anomalyco#4847) (anomalyco#4855)

Co-authored-by: GitHub Action <action@github.com>
Co-authored-by: Aiden Cline <63023139+rekram1-node@users.noreply.github.com>

* ci: add pr review

* ci: make review only fire on non draft pr creation

* zen: usage graph respect light/dark mode

* ci: tweak review cmd

* ci: review ready for review action

* feat: add tool_details keybind w/ no default (anomalyco#4976)

Co-authored-by: Aiden Cline <63023139+rekram1-node@users.noreply.github.com>

* ci: review tweak

* zen: fix chart loading

closes anomalyco#5030

* core: add provider test coverage for upcoming refactor

Add comprehensive test suite for Provider module to ensure safe
refactoring of provider internals. Tests cover:
- Provider loading from env vars and config
- Provider filtering (disabled_providers, enabled_providers)
- Model whitelist/blacklist
- Model aliasing and custom providers
- getModel, getProvider, closest, defaultModel functions

Also adds Env module for instance-scoped environment variable access,
enabling isolated test environments without global state pollution.

* core: refactor provider and model system (anomalyco#5033)

Co-authored-by: opencode-agent[bot] <opencode-agent[bot]@users.noreply.github.com>
Co-authored-by: thdxr <thdxr@users.noreply.github.com>

* bump opentui

* Update Nix flake.lock and hashes

* fix: dax typo

* fix: compaction type issue

* fix: provider id issue

* ci: add note about iife

* docs: remove outdated theme section as system theme is now added back (anomalyco#5041)

* feat: Enhance DeepSeek reasoning content handling (anomalyco#4975)

Co-authored-by: Aiden Cline <aidenpcline@gmail.com>

* release: v1.0.130

* sync: record last synced tag v1.0.130

Fixed type error in prompt.ts: model.modelID -> model.id

---------

Co-authored-by: GitHub Action <action@github.com>
Co-authored-by: Aiden Cline <aidenpcline@gmail.com>
Co-authored-by: Spoon <212802214+spoons-and-mirrors@users.noreply.github.com>
Co-authored-by: Luke Parker <10430890+Hona@users.noreply.github.com>
Co-authored-by: Ariane Emory <97994360+ariane-emory@users.noreply.github.com>
Co-authored-by: Aiden Cline <63023139+rekram1-node@users.noreply.github.com>
Co-authored-by: Frank <frank@sst.dev>
Co-authored-by: Dax Raad <d@ironbay.co>
Co-authored-by: Dax <mail@thdxr.com>
Co-authored-by: opencode-agent[bot] <opencode-agent[bot]@users.noreply.github.com>
Co-authored-by: thdxr <thdxr@users.noreply.github.com>
Co-authored-by: Jack Bisceglia <57922742+jackbisceglia@users.noreply.github.com>
Co-authored-by: Jakub Matjanowski <k.matjanowski@gmail.com>
Co-authored-by: opencode <opencode@sst.dev>
shuv1337 added a commit to Latitudes-Dev/shuvcode that referenced this pull request Dec 4, 2025
* ignore: update download stats 2025-12-03

* ignore: docs & style

* chore: format code

* add retry case for grok resource exhausted

* feat: experimental.primary_tools, allow user to set the tools that should only be available to primary agents (anomalyco#4913)

Co-authored-by: GitHub Action <action@github.com>

* fix: bunfs path on windows (anomalyco#5011)

* feat: add messages_last_user command to scroll TUI to last user message (implements anomalyco#4847) (anomalyco#4855)

Co-authored-by: GitHub Action <action@github.com>
Co-authored-by: Aiden Cline <63023139+rekram1-node@users.noreply.github.com>

* ci: add pr review

* ci: make review only fire on non draft pr creation

* zen: usage graph respect light/dark mode

* ci: tweak review cmd

* ci: review ready for review action

* feat: add tool_details keybind w/ no default (anomalyco#4976)

Co-authored-by: Aiden Cline <63023139+rekram1-node@users.noreply.github.com>

* ci: review tweak

* zen: fix chart loading

closes anomalyco#5030

* core: add provider test coverage for upcoming refactor

Add comprehensive test suite for Provider module to ensure safe
refactoring of provider internals. Tests cover:
- Provider loading from env vars and config
- Provider filtering (disabled_providers, enabled_providers)
- Model whitelist/blacklist
- Model aliasing and custom providers
- getModel, getProvider, closest, defaultModel functions

Also adds Env module for instance-scoped environment variable access,
enabling isolated test environments without global state pollution.

* core: refactor provider and model system (anomalyco#5033)

Co-authored-by: opencode-agent[bot] <opencode-agent[bot]@users.noreply.github.com>
Co-authored-by: thdxr <thdxr@users.noreply.github.com>

* bump opentui

* Update Nix flake.lock and hashes

* fix: dax typo

* fix: compaction type issue

* fix: provider id issue

* ci: add note about iife

* docs: remove outdated theme section as system theme is now added back (anomalyco#5041)

* feat: Enhance DeepSeek reasoning content handling (anomalyco#4975)

Co-authored-by: Aiden Cline <aidenpcline@gmail.com>

* release: v1.0.130

* zen: fix chart loading

* chore: format code

* fix: TypeError: undefined is not an object

* release: v1.0.131

* sync: record last synced tag v1.0.131

---------

Co-authored-by: GitHub Action <action@github.com>
Co-authored-by: Aiden Cline <aidenpcline@gmail.com>
Co-authored-by: Spoon <212802214+spoons-and-mirrors@users.noreply.github.com>
Co-authored-by: Luke Parker <10430890+Hona@users.noreply.github.com>
Co-authored-by: Ariane Emory <97994360+ariane-emory@users.noreply.github.com>
Co-authored-by: Aiden Cline <63023139+rekram1-node@users.noreply.github.com>
Co-authored-by: Frank <frank@sst.dev>
Co-authored-by: Dax Raad <d@ironbay.co>
Co-authored-by: Dax <mail@thdxr.com>
Co-authored-by: opencode-agent[bot] <opencode-agent[bot]@users.noreply.github.com>
Co-authored-by: thdxr <thdxr@users.noreply.github.com>
Co-authored-by: Jack Bisceglia <57922742+jackbisceglia@users.noreply.github.com>
Co-authored-by: Jakub Matjanowski <k.matjanowski@gmail.com>
Co-authored-by: opencode <opencode@sst.dev>
spmurrayzzz pushed a commit to spmurrayzzz/opencode that referenced this pull request Dec 5, 2025
…ge (implements anomalyco#4847) (anomalyco#4855)

Co-authored-by: GitHub Action <action@github.com>
Co-authored-by: Aiden Cline <63023139+rekram1-node@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[FEATURE]: add a command to scroll back to the user's last message

3 participants