Repository navigation
Add a Rex module for browsing and resuming sessions - #266
Merged
Merged
Conversation
Rex has no plugin manager: a plugin is a Lua module beside init.lua. memex now ships one (rex/memex.lua, embedded in the binary) and `memex rex install` writes it to Rex's config directory. Its actions mirror the herdr plugin: a session palette zoomed over the focused pane, a "recent here" palette, a desk tab, a sidebar toggle, resume-last, index, and web. Inside a Rex terminal, resuming a session from the TUI or `memex rex resume[-last]` opens a new Rex tab (or split, via `rex_resume`) with the resume command typed into its shell, or focuses the terminal already running that session. Session selection is shared with the herdr path.
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.
Adds Rex support alongside the herdr plugin.
Rex has no plugin manager. A plugin is a Lua module that
init.lualoads withrequire(the rex-worktrunk pattern). memex ships one atrex/memex.lua, embedded in the binary, andmemex rex installwrites it beside Rex'sinit.lua. It never editsinit.lua; it prints the lines to add.Actions (they mirror the herdr plugin; all appear in Rex's command palette under "memex"):
memex_palette: the TUI zoomed over the focused pane. Quitting it restores the layout.memex_here: the palette filtered to the focused terminal's repo.memex_desk: amemextab, reused when one is already open.memex_sidebar: a split beside the focused pane, or closes it if one is open.memex_resume_last,memex_index,memex_web.Resume inside Rex. When memex runs in a Rex terminal (
REX_SESSIONis set), resuming from the TUI, or with the hiddenmemex rex resume[-last], works like this:initial_input. The shell stays open after the agent exits, as with herdr'spane run.rex_resume = "tab" | "split" | "off"in memex'sconfig.tomlchanges where sessions open.memex herdr resume[-last](resume_target).Rex-specific choices:
memex, which would otherwise match an agent resumed from the memex repo.Checked:
src/rex.rsand amemex rex installintegration test (tests/rex_cli.rs) pass, along withcli_surface.rex config check(7 actions).memex rex resume-lastopened a tab running the resume command, and a second run focused that tab.memex_palette, loaded throughinit.lua, opened the TUI zoomed over the pane.