feat(unstable): Add optional userCode to URL elicitation messages#1281
feat(unstable): Add optional userCode to URL elicitation messages#1281anvilpete wants to merge 1 commit into
Conversation
This allows the client UI to expose a code to the user for device code auth (with a click-to-copy button, for example).
| "description": "The URL to direct the user to.", | ||
| "format": "uri", | ||
| "type": "string" | ||
| }, |
There was a problem hiding this comment.
should we maybe include some text description into the elicitation schema? Then agent can provide any instructions there
There was a problem hiding this comment.
@anna239 do you mean in addition to the existing message field in the top-level elicitation request? If so, how would this new field differ?
There was a problem hiding this comment.
oh, I've overlooked message for some reason, then the question is: why can't it be included in the message?
There was a problem hiding this comment.
No worries!
It's useful to also have a field that semantically means "this is the code that the user needs to copy/paste", so the client can provide affordances to help (styling, click-to-copy button, etc.).
There was a problem hiding this comment.
Thinking about this one some more... I am also wondering what is wrong with just using the message?
Currently agents are already doing something like this that use these in a generic string message with markdown formatting.
There was a problem hiding this comment.
That's a good point, updating the message docs to make it clear that it can/should be markdown-formatted would help. I had assumed it was a plain text field.
But I think it's still useful for the client to know the userCode. A "click-to-copy" affordance needs this, for example, and at the moment this requires a regex on the message, which is far from ideal.
This is similar to how the url field provides semantic information to the client about the elicitation, rather than relying only on the opaque message string.
Still, if you both think this isn't useful, then I'm also happy to drop it.
This allows the client UI to expose a code to the user for device code auth (with a click-to-copy button, for example).