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 client tags #415

Draft
wants to merge 2 commits into
base: master
Choose a base branch
from
Draft

Conversation

progval
Copy link
Contributor

@progval progval commented May 22, 2020

These are two new client tags, to allow autocompletion of bot commands.

It's not yet implemented and some parts are not written yet, but I'd like your opinions on this

rendered view

@progval progval marked this pull request as draft May 22, 2020 08:20
@slingamn
Copy link
Contributor

From out-of-band discussion about how this should interact with transient / no-store TAGMSG (context on ircv3/ircv3-ideas#68), a suggestion:

  1. Make ! the transient tag prefix
  2. Accordingly, rename the draft versions of these tags +!draft/autocomplete-request and +!draft/autocomplete-reply, and the final versions +!autocomplete-request and +!autocomplete-reply

An alternative suggestion was to make all TAGMSG transient by default, and add a new tag that can be attached to messages that should be stored. I weakly prefer using a prefix, but I'm very open to being convinced otherwise.

progval added a commit to progval/Limnoria that referenced this pull request Aug 29, 2020
This plugin implements the first version of
ircv3/ircv3-specifications#415
@progval
Copy link
Contributor Author

progval commented Aug 29, 2020

I wrote a quick implementation of this as a Limnoria plugin; if client devs want to try it, I have a bot on testnet.oragono.io named Limnoria (and also in channel #limnoria) so you can send commands like @+draft/autocomplete-request=whoa TAGMSG limnoria

@jwheare jwheare added this to the Roadmap milestone Feb 24, 2021
@jwheare
Copy link
Member

jwheare commented Feb 25, 2021

I think to build a useful client implementation of this, I'd need to have a way to know that a nick is a bot that accepts commands, with what prefix, and that it can respond to autocomplete requests. Is that something you imagine being solved by metadata?

@progval
Copy link
Contributor Author

progval commented Feb 25, 2021

In private, it shouldn't be an issue to always send a request.

In channels, it remains to be decided. I see three options:

  1. always send autocomplete requests to channels when pressing TAB doesn't have a match in the nick list (cons: potentially spammy + privacy issues?)

  2. assume bots accept the same commands as PRIVMSG #channel :botnick: command and PRIVMSG botnick :command, so the client can send autocomplete requests in private even when typing a message in a channel.
    (cons: this is not true for all bots (eg. eggdrop) + you can't use short prefixes like ! or @)

  3. using channel metadata (cons: more complex + depends on a pending spec)

@jwheare
Copy link
Member

jwheare commented Feb 25, 2021

It's still not clear how a client can detect whether a private message is to a bot at all, and the privacy implications of that are a non-starter for me.

@progval
Copy link
Contributor Author

progval commented Feb 25, 2021

In private they don't need to detect the message is to a bot, they can send completion requests systematically

@jwheare
Copy link
Member

jwheare commented Feb 25, 2021

Right, sending auto completion requests to every user that I have a private message conversation with is a privacy non-starter.

@DanielOaks
Copy link
Member

In terms of detecting a bot at all, Insp has the BOT=<modechar> isupport token which, when enabled, adds a B to the WHO flags of the user: inspircd/inspircd@31815ed , we've implemented this as well in ergochat/ergo#1117 . I'm not sure whether any other servers implement this or if Insp came up with it though.

@progval
Copy link
Contributor Author

progval commented Feb 25, 2021

@jwheare I get there are privacy issues, but how is it different to send completion requests to "anyone" vs "anyone who says they are a bot"?

@jwheare
Copy link
Member

jwheare commented Feb 25, 2021

For sure, there is an added risk of spoofing/intercepting. That's not an argument in favour of just spamming it to everyone though.

Maybe the solution from a client-implementation perspective is to require quite explicit user interaction to activate this thing.

@progval
Copy link
Contributor Author

progval commented Feb 25, 2021

Yes, indeed, that sounds like the right solution in PMs.

As an alternative to metadata, what about making bots send a tag to say "hey I am a bot, please offer the autocompletion dialog"? (similarly to what OTR does with its magic whitespaces)

@progval
Copy link
Contributor Author

progval commented Feb 25, 2021

Hmm forget it, that's an ugly hack.

@DanielOaks That sounds like a good idea. IIRC, Unreal has a +B mode too, and makes it visible in whois (335, RPL_WHOISBOT). So if we combine both, it would work for channels (via WHOX) and PMs (via WHOIS)

@DanielOaks
Copy link
Member

It looks like Unreal, Insp, and us all do the BOT isupport token, and then expose it with RPL_WHOISBOT and in the WHO flags, so yeah. We should probably write it as a spec if nobody else has already.

@jwheare
Copy link
Member

jwheare commented Feb 25, 2021

I think I'm going to pass on implementation support for this as it stands. We can add this back to the roadmap if support picks up from other devs.

@jwheare jwheare removed this from the Roadmap milestone Feb 25, 2021

Clients will probably want to send an autocomplete-request when a user triggers
the client's nick completion mechanism (usually the tab key) and there is no
matching nick, or their own command completion mechanism.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

How should this look on mobile? Usually clients present a list of auto-complete suggestions while the user is typing.

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

Successfully merging this pull request may close these issues.

None yet

6 participants