Problem
Currently, the method RequestPermission of struct acp.Client has to return the user choice, or it must be synchronous. This makes it very hard to implement an UI for this (not CLI), because the UI must not block so that users can select their choice. And I'm not even sure if the SDK allows that method to run in another goroutine.
Solution
I think there should be a AsyncRequestPermission that
- has request ID in its params
- Doesn't return user choice
And a function SendPermissionChoice that send user choice with request ID to the ACP server
@ThomasK33
Problem
Currently, the method
RequestPermissionof structacp.Clienthas to return the user choice, or it must be synchronous. This makes it very hard to implement an UI for this (not CLI), because the UI must not block so that users can select their choice. And I'm not even sure if the SDK allows that method to run in another goroutine.Solution
I think there should be a
AsyncRequestPermissionthatAnd a function
SendPermissionChoicethat send user choice with request ID to the ACP server@ThomasK33