eca icon indicating copy to clipboard operation
eca copied to clipboard

Ask user question tool

Open noctuid opened this issue 9 months ago • 10 comments

To upvote this issue, give it a thumbs up. See this list for the most upvoted issues.

Copilot can ask questions to the user in plan mode. For example, when creating a brand new application it might prompt for what frontend framework to use with a few options the user can select, or they can put in their own.

Why have this instead of just having the LLM ask and the user answer in the next message?

  • It could propose quickly selectable options (e.g. with completion or single key presses in emacs) or allow the user to input an answer if the user doesn't want any of the proposed options
  • Potential savings for services that bill by request where tool calls are cheaper or free

noctuid avatar Mar 03 '26 00:03 noctuid

yeah it should not be hard to support a tool for that in plan agent, since we have custom editor integration we could display that niceli somehow. Just wonder how this will fit on system prompt of plan agent or if needs any more changes, WDYT @zikajk ?

ericdallo avatar Mar 03 '26 12:03 ericdallo

Yup. This is high on my backlog. But I’ve heard it might actually be counterproductive because it prompts the LLM to second-guess itself and inflates the context. I want to look into it a bit more and run some tests, but for now, I’m still planning on adding it.

@ericdallo I think it can be part of PLAN and CODE agent system instructions (conditionally, if the tool is enabled).

zikajk avatar Mar 03 '26 16:03 zikajk

because it prompts the LLM to second-guess itself and inflates the context

Yeah I think I would only want to use it when planning or if I (or a skill) explicitly asked for the tool to be used in a specific case.

It would be nice if the new display could be used by other tools as well, e.g. the edit file tool. In the github copilot cli, you can reject an edit and provide feedback inline, and you can keep repeatedly doing that until all edits are how you want them without increasing the number of premium requests used.

noctuid avatar Mar 04 '26 22:03 noctuid

ECA already supports reject with a feedback, this would be just a UI change, we can think on this after having the tool, but I think the current UI + shortcuts are quite enough for other tools

ericdallo avatar Mar 05 '26 12:03 ericdallo

I was thinking about this from a cost perspective. Eca does let you reject with feedback currently, but it uses at least 1 extra premium request per feedback, whereas with copilot CLI I can provide feedback over and over without consuming any additional requests. This would also affect other providers that bill by request and offer discounted tool calls.

noctuid avatar Mar 06 '26 22:03 noctuid

@noctuid makes sense, with this tool, it should behave equal to copilot as it would be just a tool response, so not count as a premium request. But indeed a good use case for copilot @zikajk

ericdallo avatar Mar 08 '26 15:03 ericdallo

That’s interesting. If I understand correctly, the trick is that instead of sending a request to the LLM after rejecting a tool, you just provide the reason why it failed right away in the tool response. Smart...

Personally, I don’t see much of a connection to the ask-user-tool, where you’d have X options and an input, whereas in this case, it would just be that single input.

I’d probably create a separate ticket for this.

The question is the UX -> would it be better to have another action, or should we always require a reason and keep the current behavior if it's empty? It might need some thought—I’ve noticed that in certain situations, I’d actually prefer it if rejecting a tool didn't hand control back to me, which is actually somewhat related.

How does this work in Copilot CLI? What if you want to cancel the tool call and discuss something completely unrelated (which consumes the premium request, right?)

zikajk avatar Mar 08 '26 18:03 zikajk

In copilot, they actually all use the same UI. It can also ask you a question without options. Since they will be different in eca though, I added https://github.com/editor-code-assistant/eca/issues/348. In any case, the main connection is in both cases being able to provide feedback/steering without consuming multiple premium requests.

Here is what it looks like in copilot.

Command confirmation: Image

Options or input your own: Image

Open ended question: Image

Edit file prompt:

Image

The question is the UX -> would it be better to have another action, or should we always require a reason and keep the current behavior if it's empty? It might need some thought—I’ve noticed that in certain situations, I’d actually prefer it if rejecting a tool didn't hand control back to me, which is actually somewhat related.

How does this work in Copilot CLI? What if you want to cancel the tool call and discuss something completely unrelated (which consumes the premium request, right?)

Escape will cancel everything (same key that will cancel normally). It won't let you hit enter on the reason/answer option if it is empty. Escape will consume another premium request. Technically you can put something totally unrelated into the feedback and continue on the same premium request though.

For eca emacs, I want to use my global keybinding for eca-chat-stop-prompt if I wanted to return control totally to me. As for what options to show, I think it would make more sense to have cancel as a completely separate option. If the user selected reject with feedback, I'd imagine it shouldn't let them put in an empty reason. I think in most cases you would want to explain why, but if you think there are cases where you would want it to continue even without an explanation, I guess that could be a third option.

noctuid avatar Mar 09 '26 20:03 noctuid

One other thing I should mention is that pi has a lot of nice plugins for this that do a few extra things:

  • allow batching multiple questions to ask at once
  • even if you preselect one of the options, lets you add a note (e.g. if you want to slightly adjust the option or provide more detailed instructions)

noctuid avatar Apr 12 '26 12:04 noctuid

Implemented this, we support options, optionally, free form answers, I will adapt some eca flows like login to use this feature as well.

Image

ericdallo avatar Apr 14 '26 20:04 ericdallo