Conversation
Introduce the following: 1. New command `agent-shell-viewport-pin-page` for use in `agent-shell-viewport-view-mode`. This command will open the currently viewed page in a read-only mode in some other window (in `special-mode` so you can quit with "q"). This is useful for referencing previous turns without the constant need to switch between pages or manually copy/pasting output. 2. Custom variable `agent-shell-viewport-pin-page-switch-buffer-function`. The function used to display the pinned page. Defaults to `#'display-buffer`. 3. Map `agent-shell-viewport-pin-page` to `"d"` in `agent-shell-viewport-view-mode-map`. 4. Display this binding in the help page of viewport view mode.
|
Also to note: I regenerated the README's "Customizations" and "Commands" by running the source blocks in there. I glanced at the output to make sure it looks good (it does) but I did not do a deep comparison of those changes - so there may be more commands/variables added in those blocks than just the new ones if the README was stale. |
|
Thanks for the PR. We have something somewhat similar by pressing |
|
Heyo, thank you for checking this out.
Is the text copied this way included in the actual reply to the agent or is it automatically excluded? If not excluded it seems inefficient if my purpose is just to reference prior pages. Also, the fonts + markdown rendering is not done through this method. Collapse-able sections are expanded. Either way I still prefer it to be copied to another buffer in another window for ease of reference. The UX is a bit nicer if you are pinning multiple windows though, it allows the user to quickly pin several pages and organize them to their liking (through display buffer alist or through the custom variable). Perhaps this could be better integrated with the method you suggest though? |
Introduce the following:
New command
agent-shell-viewport-pin-pagefor use inagent-shell-viewport-view-mode. This command will open the currently viewed page in a read-only mode in some other window (inspecial-modeso you can quit with "q"). This is useful for referencing previous turns without the constant need to switch between pages or manually copy/pasting output.Custom variable
agent-shell-viewport-pin-page-switch-buffer-function. The function used to display the pinned page. Defaults to#'display-buffer.Map
agent-shell-viewport-pin-pageto"d"inagent-shell-viewport-view-mode-map.Display this binding in the help page of viewport view mode.
I understand if you don't wish to merge this, it could be implemented in another package. But it is a really small amount of code for something I think is essential for any serious usage of viewport mode (Unless there is some alternative workflow I am missing). Thank you for considering!
Demo
pin-demo.webm
Thank you for contributing to agent-shell!
Checklist
M-x checkdocandM-x byte-compile-file.