Uh oh!
There was an error while loading. Please reload this page.
feat(core): add plugin-registered slash commands to the command list - #10261
feat(core): add plugin-registered slash commands to the command list#10261nsoufian wants to merge 2 commits into
Conversation
Thanks for your contribution! This PR doesn't have a linked issue. All PRs must reference an existing issue. Please:
See CONTRIBUTING.md for details. |
The following comment was made by an LLM, it may be inaccurate: Based on my search, I found a potentially related PR: Potential Duplicate:
This PR appears to address the same core feature: adding plugin command registration. It's referenced multiple times across different search queries for plugin command functionality. I'd recommend reviewing PR #7563 to understand if this is an earlier attempt at the same feature that may have been closed, superseded, or needs rebasing against the current |
f1ae801 to
08fa7f7CompareClosing this pull request because it has had no updates for more than 60 days. If you plan to continue working on it, feel free to reopen or open a new PR. |
Closes#10262
What does this PR do?
Currently, plugin authors have no way to interact with users through the OpenCode interface. Plugins cannot:
This PR addresses these limitations by introducing plugin-registered slash commands.
How it works
Plugins can now define commands that appear in the slash command list. When invoked, these commands execute plugin-defined logic and persist the output as session messages—no LLM involvement required.
Example
Benefits
How did you verify your code works?
bun test --cwd packages/opencode test/command/plugin-commands.test.ts)/toggle on, and confirmed output persists in the session