Hijack agent-shell-resume-session to use the session picker#11
Draft
timvisher wants to merge 1 commit into
Draft
Hijack agent-shell-resume-session to use the session picker#11timvisher wants to merge 1 commit into
timvisher wants to merge 1 commit into
Conversation
Repurpose agent-shell-resume-session from an ID-prompt command into a session-picker entry point that calls agent-shell--start with :session-strategy 'prompt. Add a :show-session-id keyword to agent-shell--start that buffer-locally sets agent-shell-show-session-id, so users with an ID in hand can find it via their completion framework's fuzzy matching even when the variable is off globally. Closes agent-shell-ufm. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
M-x agent-shell-resume-sessionused to read a session ID string from the minibuffer — a UX that only worked if you already had the exact ID in your clipboard. The picker thatagent-shell-session-strategy='promptopens is strictly more useful: it lists known sessions and lets the completion framework do fuzzy matching. So this branch repurposesagent-shell-resume-sessionto callagent-shell--startwith:session-strategy 'prompt, dropping the ID-prompt path entirely.Users who do have a session ID in hand aren't worse off — the picker now force-shows session IDs (overriding
agent-shell-show-session-idbuffer-locally) so the ID is part of the candidate text that vertico/ivy/etc. will match against. That's done via a new:show-session-idkeyword onagent-shell--startthat sets the variable buffer-locally on the new shell, mirroring how:session-strategyis already plumbed through.No tests added — this is a single dispatch change on an interactive entry point with no new logic to regress against. README features list updated.
Checklist
I've filed a feature request/discussion for a new feature.N/A (tracked in private bd)I'm making visual changes, so I'm including screenshots so you can view and discuss.N/AI've added tests where applicable.N/AM-x checkdocandM-x byte-compile-file.