Skip to content

Conversation

@dev4s
Copy link

@dev4s dev4s commented Jan 10, 2026

feat: Plugin Commands - Allow plugin tools to be exposed as slash commands

Summary

This PR adds a new experimental feature that allows plugin tools to optionally appear as slash commands in the autocomplete, with support for direct execution (without AI processing).

Problem

Currently, plugin tools can only be invoked by the AI. Users cannot directly invoke plugin functionality from the command input without going through the AI, which:

  • Adds latency and token costs for simple operations
  • Requires AI involvement for tasks that don't need it
  • Limits plugin utility for status checks, statistics, and other quick queries

Backwards Compatibility

  • Fully backwards compatible - Existing plugins work unchanged
  • command defaults to false, so existing tools remain AI-only
  • Feature is behind experimental.pluginCommands flag
  • Plugin tools are still registered in ToolRegistry regardless of command setting

Related Issues

This PR also includes a fix for plugin tool registration timing (ToolRegistry.state() now initializes after Plugin.init() in bootstrap.ts).

@github-actions
Copy link
Contributor

Hey! Your PR title [FEATURE] plugin commands doesn't follow conventional commit format.

Please update it to start with one of:

  • feat: or feat(scope): new feature
  • fix: or fix(scope): bug fix
  • docs: or docs(scope): documentation changes
  • chore: or chore(scope): maintenance tasks
  • refactor: or refactor(scope): code refactoring
  • test: or test(scope): adding or updating tests

Where scope is the package name (e.g., app, desktop, opencode).

See CONTRIBUTING.md for details.

@github-actions
Copy link
Contributor

The following comment was made by an LLM, it may be inaccurate:

I found a potentially related PR:

Related PR:

This PR appears to be addressing a very similar feature - allowing plugin registered slash commands to execute code. This is closely related to the current PR #7563, which adds plugin commands with direct execution capabilities. These PRs may be addressing the same or overlapping functionality, so they should be compared to ensure no duplicate efforts.

@dev4s dev4s changed the title [FEATURE] plugin commands feat(opencode) plugin commands Jan 10, 2026
@PhilippPolterauer
Copy link

i would really love seeing one of these plugin command PRs merged!

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.

2 participants