GeezerVisonThe World Wide Web, restored to 800 pixels of glory. | |||||||||||
| Home|About|Gaming cabinet|Archives|How it works|Starter sites | |||||||||||
GeezerVison is showing github.com — feat(plugin commands): allows for code execution on plugin registered slash commands by spoons-and-mirrors · Pull Request #4411 · anomalyco/opencode Conversation
|
|
YES! I was just about to do this feature request. I reaaaaally hope this get merged! |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
f1dc981 to
3e15a39
Compare
f8ee907 to
6a9856d
Compare
840e61b to
63696ee
Compare
74e3d5e to
ae96976
Compare
ae96976 to
a0f2d19
Compare
7a00b05 to
b5511f7
Compare
|
Added support for command drop-in in command/ folder as suggested by #5305 |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
|
Hi @spoons-and-mirrors Thanks for making that happen, seems that a few cleanups still needed to pass tests and solve merge conflicts. While it is really powerful to run commands directly from the TUI (I know that I suggested that myself) but the more I think about it a better approach could be to run these server side. This way these slash commands can be triggered from any client (including the new desktop client) what are you thoughts here? Could need more work to make that happen |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
|
hey @malhashemi, this implementation does run server side. The TUI just wraps around it calling sdk.client.session.command(). as for the merge conflicts, they happen quite alot in this repo heh, I will get to it at some point. |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was an error while loading. Please reload this page.
|
@spoons-and-mirrors a question that just came to mind, would this work with desktop or any custom WebUI like CodeNomad, not that I use any of these, but was just thinking about how would this register. Could be already working there but would be nice to verify if you are doing any manual testing. additionally does it support sending arguments? something like |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
|
Yes to both. Can work with other clients, passes args |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
|
@spoons-and-mirrors how are we looking with this one? if you are too busy I'd be happy to help if you grant write access |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was an error while loading. Please reload this page.
|
I have a somewhat less invasive alternative, that allows plugins to hook a If they want to do something, they are free to react as they please, and they can add a Usage is a little weirder, as the plugin still has to register a custom command normally, even if it only intends to handle the actual command itself & not inject it into the session. Very interested to see something afforded to plugin devs, however this goes. |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was an error while loading. Please reload this page.
|
yeah that's a valid point command.execute.before could be just enough... I have it in this PR also #6478 I think you're right tho, this approach is overkill and probably more invasive than it needs, Aiden had some reservations about it as well, shuv also had a go at implementing this but went with an invasive way too if I remember correctly |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
|
Yes, please! Me want, gimme! |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
|
all the pieces are already in opencode to do this now, with the latest addition being #9267 |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was an error while loading. Please reload this page.
Successfully merging this pull request may close these issues.
There was an error while loading. Please reload this page.