MCPcopy Create free account
hub / github.com/github/copilot-sdk / HandlePendingCommand

Method HandlePendingCommand

go/rpc/zrpc.go:13935–13952  ·  view source on GitHub ↗

HandlePendingCommand reports completion of a pending client-handled slash command. RPC method: session.commands.handlePendingCommand. Parameters: Pending command request ID and an optional error if the client handler failed. Returns: Indicates whether the pending client-handled command was comple

(ctx context.Context, params *CommandsHandlePendingCommandRequest)

Source from the content-addressed store, hash-verified

13933//
13934// Returns: Indicates whether the pending client-handled command was completed successfully.
13935func (a *CommandsAPI) HandlePendingCommand(ctx context.Context, params *CommandsHandlePendingCommandRequest) (*CommandsHandlePendingCommandResult, error) {
13936 req := map[string]any{"sessionId": a.sessionID}
13937 if params != nil {
13938 if params.Error != nil {
13939 req["error"] = *params.Error
13940 }
13941 req["requestId"] = params.RequestID
13942 }
13943 raw, err := a.client.Request(ctx, "session.commands.handlePendingCommand", req)
13944 if err != nil {
13945 return nil, err
13946 }
13947 var result CommandsHandlePendingCommandResult
13948 if err := json.Unmarshal(raw, &result); err != nil {
13949 return nil, err
13950 }
13951 return &result, nil
13952}
13953
13954// Invokes a slash command in the session.
13955//

Callers 2

Calls 1

RequestMethod · 0.45

Tested by 1