Skip to content

feat(tui): expose plugin manager as /plugins slash command - #47347

Closed
rsmets wants to merge 1 commit into
anomalyco:devfrom
rsmets:plugins-slash-command
Closed

rsmets wants to merge 1 commit into
anomalyco:devfrom
rsmets:plugins-slash-command

Conversation

@rsmets

@rsmets rsmets commented Sep 4, 2026

Copy link
Copy Markdown

Issue for this PR

Closes #47345

Type of change

  • Bug fix
  • New feature
  • Refactor / code improvement
  • Documentation

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.tsx already lists built-in and external plugins, toggles them with space, and installs npm plugins with local/global scope. But neither plugins.list nor plugins.install declared a slashName, and both keybinds default to none (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 /plugin
  • plugins.install -> /plugin-install

/plugins matches the existing plural convention. /plugin is 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() in packages/tui/src/keymap.tsx:260-290 builds the slash list by reading command.slashName and command.slashAliases off every reachable palette-namespace command. These two commands were already namespace: "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-route slash: { name } values first. plugins, plugin, and plugin-install are all unused.

How did you verify your code works?

Added packages/tui/test/feature-plugins/plugins-commands.test.ts, which invokes the real plugin's tui() 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.tsx change 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 fail
  • cd packages/tui && bun typecheck -> clean
  • cd 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 fail
  • prettier --check and oxlint clean

Also updated packages/opencode/specs/tui-plugins.md to 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. /plugins opens the same manager that plugins.list already opened from the palette.

Checklist

  • I have tested my changes locally
  • I have not included unrelated changes in this PR

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
@github-actions

github-actions Bot commented Oct 4, 2026

Copy link
Copy Markdown
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:

  • The PR was created more than 1 month ago
  • The PR had fewer than 2 positive reactions
  • Positive reactions are counted as thumbs-up, heart, celebration, or rocket reactions on the PR

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[FEATURE]: expose the plugin manager as a /plugins slash command

1 participant