Support inline form elicitation - #816
Conversation
b3c5b40 to
1caeba5
Compare
|
Existing discussion #792 |
|
Thank you for the PR. Not sure if you've seen the existing #797? While I'm appreciative of the extents that #816 goes (ie. extending acp.el to accommodate for scopling/lifetime), #797 has a much smaller scope (less code for me to maintain). I'm keen to land #797 and iterate on that as needed to improve the feature. I understand this is unlikely the outcome you expected. Sorry. edit: typos |
|
I'm fine with maintaining a fork. I cannot use # 797 at all. I have seen #797 , it only supports question dialogs in turns and it's modal, in clear violation of the protocol. I'm using elicitations to ask for confirmation when resuming a chat, so there are no turns yet at that time. |
Interesting. Can you share more about your workflow? Examples? |
I write a general coding agent harness https://github.com/friendly-machines-com/loki in python using only the python stdlib (0 other Python dependencies). It supports (modern only) terminal emulators and can run as a TUI program, console program (headless), and ACP. When using loki-acp, it works fine, but eventually the user would resume an existing chat. If you want to see the non-acp version first (easier to set up):
An attack scenario is that otherwise an attacker could edit chat logs (which are inside random project directories) and edit them to swap out the chat endpoint (the llm model endpoint) for theirs and wait for the credentials to arrive the next time the user does loki resume. If you actually try to do this, the easiest way is to set up some env vars like That means the user's wrapper scripts that set those env vars up and start loki should at least use There is a separate I actively run this in emacs using agent-shell patched with this #816 , and with a org-latex preview so I get answers in beautifully typeset mathematics :)
You can infer this was resumed ( There are other use cases for this elicitation without being inside turns--for example it can happen that the access token's lifetime is over and needs to be refreshed and the refresh fails in a way where the refresh was sent from the user's machine but maybe (or not) arrived at the model provider. Now what? Did it arrive or not? This is a distributed systems problem and needs the user to be annoyed and then active -> needs elicitation. |


Checklist
M-x checkdocandM-x byte-compile-file.Requires xenodium/acp.el#28 mainly because we need an outgoing request’s assigned JSON-RPC ID before transmission, so a request-scoped elicitation can be tied to--and cancelled with--its actual owning request.
There's also an alternative implementation of agent-shell elicitation in #797 but: