MCPcopy Index your code
hub / github.com/github/copilot-sdk / Request

Method Request

go/rpc/zrpc.go:14077–14092  ·  view source on GitHub ↗

Requests host-driven completion items for the current composer input. Returns an empty list when the host has no items or does not support completions. RPC method: session.completions.request. Parameters: Request host-driven completions for the current composer input. Returns: Host-driven complet

(ctx context.Context, params *CompletionsRequestRequest)

Source from the content-addressed store, hash-verified

14075// Returns: Host-driven completion items for the current composer input. Empty when the host
14076// returns no items or does not support completions.
14077func (a *CompletionsAPI) Request(ctx context.Context, params *CompletionsRequestRequest) (*CompletionsRequestResult, error) {
14078 req := map[string]any{"sessionId": a.sessionID}
14079 if params != nil {
14080 req["offset"] = params.Offset
14081 req["text"] = params.Text
14082 }
14083 raw, err := a.client.Request(ctx, "session.completions.request", req)
14084 if err != nil {
14085 return nil, err
14086 }
14087 var result CompletionsRequestResult
14088 if err := json.Unmarshal(raw, &result); err != nil {
14089 return nil, err
14090 }
14091 return &result, nil
14092}
14093
14094// Experimental: EventLogAPI contains experimental APIs that may change or be removed.
14095type EventLogAPI sessionAPI

Callers 15

_build_httpx_requestFunction · 0.45
send_requestMethod · 0.45
SendMethod · 0.45
GetEventsMethod · 0.45
DisconnectMethod · 0.45
AbortMethod · 0.45
CreateSessionMethod · 0.45
ListSessionsMethod · 0.45
GetSessionMetadataMethod · 0.45
DeleteSessionMethod · 0.45
GetLastSessionIDMethod · 0.45

Calls

no outgoing calls

Tested by 1

send_requestMethod · 0.36