Repository navigation
feat(rex): Ask pickers in Rex's command palette - #54
Merged
Merged
Conversation
Open Document, Choose Agent and Change Voice now ask with rex.ui.pick (Rex control API 17+): folders open in place, a path or link can be typed, and recent documents lead. When no app can show the prompt, leaf's terminal popover opens as before. Remote sessions keep the popover, since files and agents live on the host. leaf prints the rows as JSON for the plugin: - leaf open --list DIR [--recent] - leaf voices --list (built-in voices after 6s without Microsoft's list) - leaf agents --list / --set NAME|any Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
There was a problem hiding this comment.
All reported issues were addressed across 4 files
Reply with feedback, questions, or to request a fix.
View guided diff | Turn on auto-fix | Re-trigger cubic
- Open Document opens leaf's home screen when the first listing fails (the pane's folder is gone, say); a bad typed path keeps the folder shown and puts the reason in the title. - Choose Agent and Change Voice check rex.ui.pick before listing, so an older Rex goes straight to the popover without waiting on the voice list, and fall back to the popover when listing fails. - Rows for paths that aren't UTF-8 are left out: the id Rex sends back couldn't name them. A non-UTF-8 folder reports that instead. Co-Authored-By: Claude Opus 5.5 <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.
Rex's control API 17 lets a Lua action ask in the command palette (
rex.ui.pick). Open Document, Choose Agent and Change Voice now ask there..., folders and documents. Picking a folder opens it in place; a typed path or link opens directly.leaf agents --set.unsupported/failedorrex.uiis missing. Cancel and timeout do nothing;busyreports an error.New commands for the plugin (JSON on stdout):
leaf open --list DIR [--recent]→{kind: "folder", dir, title, items}or{kind: "document", target}leaf voices --list(built-in voices if Microsoft's list takes over 6s)leaf agents --list,leaf agents --set NAME|anyTesting
cargo testpasses; new tests insrc/palette.rs.rex config checkpasses on the plugin.unsupported, so the popover fallback ran. The palette path is untested until the app supports prompts.🤖 Generated with Claude Code
Summary by cubic
Open Document, Choose Agent and Change Voice now ask in Rex's command palette (
rex.ui.pick, add-on API 17) instead of leaf's terminal popover. The popover still opens when no app can show the prompt or the list command fails, and for remote sessions, since files and agents live on the host. Cancel and timeout do nothing; a busy prompt reports an error.New commands (JSON on stdout for the plugin):
leaf open --list DIR [--recent]lists a folder or resolves to a document; recent documents come first, picking a folder opens it in place, and typed paths or links open directly.leaf agents --listandleaf agents --set NAME|anylist installed agents and save the pick.leaf voices --listlists voices, using the built-ins if Microsoft's list takes over 6 seconds.Fallbacks
rex.ui.pickbefore listing, so an older Rex goes straight to the popover without waiting on the voice list; a failed listing falls back too.Written for commit e0914a7. Summary will update on new commits.