Skip to content

An async version of RequestPermission? #12

@brianhuster

Description

@brianhuster

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions