Repository navigation
Conversation
Fixes anomalyco#47345 The plugin manager dialog already lists, toggles, and installs plugins, but neither of its two commands declared a slashName, so it was only reachable via the command palette. - plugins.list -> /plugins, alias /plugin - plugins.install -> /plugin-install
Contributor
|
Automated PR Cleanup Thank you for contributing to opencode. Due to the high volume of PRs from users and AI agents, we periodically close older PRs using automated criteria so maintainers can focus review time on the most active and community-supported contributions. This PR was closed because it matched the following cleanup criteria:
PRs created within the last month are not affected by this cleanup. If you believe this PR was closed incorrectly, or if you are still actively working on it, please leave a comment explaining why it should be reopened. A maintainer can review and reopen it if appropriate. Thanks again for taking the time to contribute. |
1 task done
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.
Issue for this PR
Closes #47345
Type of change
What does this PR do?
Adds slash names to the two plugin manager commands so the dialog is reachable by typing.
The plugin manager in
packages/tui/src/feature-plugins/system/plugins.tsxalready lists built-in and external plugins, toggles them withspace, and installs npm plugins with local/global scope. But neitherplugins.listnorplugins.installdeclared aslashName, and both keybinds default tonone(packages/tui/src/config/keybind.ts:226-227). So the only way in was to open the palette and scroll, or configure a keybind by hand.Every sibling dialog already has one:
/mcps,/agents,/models,/skills,/themes,/status,/variants,/workspaces. Plugins were the only management dialog without.plugins.list->/plugins, alias/pluginplugins.install->/plugin-install/pluginsmatches the existing plural convention./pluginis the alias because that is the name Claude Code users reach for, and it is the specific ask in #23800 and #7716 (both closed into the marketplace megaissue #28696, but the UI they wanted already shipped, only the entry point was missing).Why it works:
useCommandSlashes()inpackages/tui/src/keymap.tsx:260-290builds the slash list by readingcommand.slashNameandcommand.slashAliasesoff every reachablepalette-namespace command. These two commands were alreadynamespace: "palette", so declaring the fields is all that was needed. No new UI, no API change, no behavior change to the dialog, keybinds, or palette entries.I checked for collisions across all
slashName,slashAliases, and session-routeslash: { name }values first.plugins,plugin, andplugin-installare all unused.How did you verify your code works?
Added
packages/tui/test/feature-plugins/plugins-commands.test.ts, which invokes the real plugin'stui()with a recording keymap and asserts on the registered commands (no mocking of the plugin itself).Confirmed the test actually catches the regression: with my
plugins.tsxchange stashed it goes 3 fail / 0 pass, and with it restored 3 pass / 0 fail.cd packages/tui && bun test-> 196 pass, 1 skip, 0 failcd packages/tui && bun typecheck-> cleancd packages/opencode && bun test test/cli/tui/plugin-toggle.test.ts test/cli/tui/plugin-install.test.ts test/config/tui.test.ts-> 38 pass, 3 skip, 0 failprettier --checkandoxlintcleanAlso updated
packages/opencode/specs/tui-plugins.mdto record the slash names, and added a short "Manage plugins from the TUI" section to the plugins doc, since the manager was not documented anywhere.Screenshots / recordings
No visual change. The dialogs are unchanged; this only adds a new way to invoke them.
/pluginsopens the same manager thatplugins.listalready opened from the palette.Checklist