Skip to content
This repository has been archived by the owner on Dec 16, 2021. It is now read-only.

Mention-handler-style component for scripting API #255

Open
avahe-kellenberger opened this issue Feb 28, 2020 · 2 comments
Open

Mention-handler-style component for scripting API #255

avahe-kellenberger opened this issue Feb 28, 2020 · 2 comments
Labels
enhancement New feature or request

Comments

@avahe-kellenberger
Copy link
Collaborator

What do you want

I'd like to have a component similar to the current mention handler for scripting use.

I would use such component for searching for text in the client.
For example, it could be populated with a list of friends names. We could use the fuzzy-finder to quickly narrow down the results, select a name, then be switched to the friends list layout to message that person.

This could also be used to search for servers, channels, certain text within the recent chat history, search all channels at once, etc. The script could then use the search result to perform some action involving the text.

Why

It would be an extremely useful tool, like having fzf built into cordless and being scriptable.

Implementation hints

Make the mention handler a modular component which takes a list of text and outputs a single result, using the built-in fuzzy finding algorithm in cordless.

We may also want to make it even more modular, and allow for the scripting interface to supply its own matching algorithm instead of using cordless' internal algorithm.

@Bios-Marcel
Copy link
Owner

so, you want a kind of commandline with an entity (member, user, friend, channel, server) selector?
E.g. that'd have to b added to the cli at the bottom? and those commands shall be forwarded to the JS api?

@avahe-kellenberger
Copy link
Collaborator Author

Pretty much. We can reuse the code from the mention handler, since it's exactly the type of behavior I'm looking for

@Bios-Marcel Bios-Marcel added the enhancement New feature or request label Nov 24, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants