You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
feat(tui): add /edit-last command to open last assistant message in external editor #11598
When LLM responses are long, it is helpful to open them in an external editor (vim/nvim/code) to read and understand better. Currently, users have to scroll through long responses in the terminal, which can be difficult to navigate.
Proposed Solution
Add a /edit-last slash command that:
Opens the last assistant message in the external editor configured via VISUAL or EDITOR environment variable
Allows users to edit the content if needed
Loads the edited content back into the input prompt
Users can then press Enter to send the edited message
Use Cases
Reading long code explanations or documentation generated by the AI
Editing or refining AI responses before sending follow-up questions
Better navigation of multi-page responses using familiar editor keybindings
Copying specific sections from the response more easily
Requirements
Users must have VISUAL or EDITOR environment variable set:
export EDITOR=vim # or nvim, nano, code, etc.export VISUAL=nvim # takes precedence over EDITOR
Implementation Notes
Command should only be visible when editor is configured
Should handle edge cases (no assistant messages, no text content)
Should detect if changes were made (show "No changes made" if not)
Should detect empty content after editing
Alternatives Considered
Copy to clipboard and manually open editor (more steps)
Built-in pager (less familiar than user's preferred editor)
Export entire session (overkill for single message editing)
Activity
github-actions commentedon Apr 3, 2026
To stay organized issues are automatically closed after 90 days of no activity. If the issue is still relevant please open a new one.