Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Autocomplete bots commands #1086

Closed
kernicPanel opened this issue Oct 13, 2015 · 21 comments
Closed

Autocomplete bots commands #1086

kernicPanel opened this issue Oct 13, 2015 · 21 comments
Assignees
Labels
Milestone

Comments

@kernicPanel
Copy link

My idea is to autocomplete commands and subcommands with help strings from hubot scripts.
I think it would be great to have this feature.

I'm looking for working on this, but I don't know where to start as I've never worked with meteor before.
Maybe someone can guide me a little bit ?

Want to back this issue? Post a bounty on it! We accept bounties via Bountysource.

@kernicPanel
Copy link
Author

I've found client/views/app/messagePopupConfig.coffee and client/views/app/messagePopupConfig.html where I copied popupSlashCommands parts, and added client/views/app/messagePopupHubotCommand.html
I think I begin to understand how popup complete works.

But now I want to silently send "help" message to every user connected, and store the response to build the hubot command collection.
Any idea on how to do this ?

@kernicPanel kernicPanel changed the title Autocomplete hubot/rocketbot commands and subcommands [Dev Help] Autocomplete hubot/rocketbot commands and subcommands Oct 13, 2015
@geekgonecrazy
Copy link
Contributor

@kernicPanel I've been thinking about this very idea. I don't think sending a message would be most efficient way of doing this. I think we need a method on the server hubot can call directly to register its methods.

So this would require an addition here in a package likely. Then in the adapter after connection gather commands and call the method to register the commands

I'd gladly collaborate on this with you. I'd love to have this functionality in

@kernicPanel
Copy link
Author

@geekgonecrazy Of course using help seems ugly, I've thinked about the same implementation as you.
But using help will allow autocompletion of any bot, as help is (almost?) always implemented in them.
I think it would be more flexible approach, and a far more interesting feature for Rocket.Chat.

@kernicPanel kernicPanel changed the title [Dev Help] Autocomplete hubot/rocketbot commands and subcommands [Dev Help] Autocomplete (any?) bots commands and subcommands Oct 14, 2015
@geekgonecrazy
Copy link
Contributor

@kernicPanel I would agree.. But any bot made for Rocket.Chat is going to have to have an adapter wrote for it. Its just one more call to write in the adapter.

This will also allow the bot reloading with more commands to tell Rocket.Chat it has more commands with out pinging it at some interval.

@kernicPanel
Copy link
Author

OK, I get your point.
Can you provide me some tech guidance to get this done ?

@geekgonecrazy
Copy link
Contributor

@kernicPanel alright i've started a bit on this.

https://github.com/RocketChat/Rocket.Chat/compare/bot-autocomplete
https://github.com/RocketChat/hubot-rocketchat/compare/send-autocomplete

I've got a bit left to do. Use the bots name as part of the autocomplete, as well as getting updated commands from the server when the bot informs it.

@kernicPanel
Copy link
Author

Thank you @geekgonecrazy I see how it works now.

@geekgonecrazy
Copy link
Contributor

@kernicPanel Feel free to contribute. :) let me know if you start working on it. I'll probably be working on it tomorrow again :)

@kernicPanel
Copy link
Author

@geekgonecrazy
Yes, I started, but I'm having trouble with basic things I guess.
But I'll continue to work on it, and learn from my mistakes.
I'm mot sure I'll be able to PR something for now.
Can I direct message you on demo.rocket.chat if I have precise questions ?

@timgrossmann
Copy link

@kernicPanel @geekgonecrazy Are there any updates or alternative implementations of this?

@geekgonecrazy
Copy link
Contributor

geekgonecrazy commented May 23, 2017

@timgrossmann Afraid I haven't made any progress.

My idea was that we'd have a method the bot could call to register all of its methods. It should be fairly straight forward. Not exactly easy, but pretty straight forward.

We already have our hubot adapter able to call any method it has permission to. So this work would really be here on the server side to write the method.

I would assume these would have to expire at some point also incase the bot went offline; we wouldn't want the entries for it to remain forever.

@geekgonecrazy
Copy link
Contributor

geekgonecrazy commented May 23, 2017

@graywolf336 for integrations this could also be a really great thing to have. So they could register commands via their integration. This might already be possible now that the RocketChat object is available to the integrations? (Might be a matter of streamlining it?)

@graywolf336
Copy link
Contributor

That's already on the to do list 👍 will be added in the next month or so

@mfilotto
Copy link

mfilotto commented Sep 5, 2017

@graywolf336 Do you have added the feature yet ?

@jezschaj
Copy link

jezschaj commented Dec 5, 2017

@geekgonecrazy Hi, I was just interested if the autocomplete function was implemented as feature or you are still working on it. I can definitely see the usefulness of the concept.

@geekgonecrazy
Copy link
Contributor

Rocket.Chat Apps will likely help make this a more realistic possibility. As it will allow runtime registration of slash commands

@timkinnane timkinnane changed the title [Dev Help] Autocomplete (any?) bots commands and subcommands Autocomplete bots commands Mar 20, 2018
@timkinnane
Copy link
Contributor

This can be progressed with new updates to the new js.SDK that will be used in the next version of the Hubot adapter.

I would propose adding a method in the adapter/SDK like registerCommand that would run on startup against all the commands within a Hubot instance (drawn from each scripts inline header docs - existing functionality in Hubot), that would call a counterpart server method to populate the auto completion handler. This would require an issue on the SDK too, but we can keep this one to track the platform support side.

@timkinnane timkinnane self-assigned this Mar 20, 2018
@geekgonecrazy
Copy link
Contributor

https://github.com/RocketChat/hubot-rocketchat/pull/71/files I started to do that here. Doing exactly as you said. :)

Rocket.Chat apps are now able to do this so the commands should actually all be ready here in the rest and real time api. Its all up to the bot side now :)

@kernicPanel
Copy link
Author

I don't use Rocket.Chat anymore, but I'm really happy to see this coming.
Thanks @geekgonecrazy for your work :)

@geekgonecrazy geekgonecrazy removed their assignment Apr 12, 2018
@marceloschmidt marceloschmidt added this to the Mid-term milestone Apr 12, 2018
@graywolf336
Copy link
Contributor

Related: #7445

@hugocostadev
Copy link
Contributor

It was added

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

10 participants