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

Method Get

go/rpc/zrpc.go:15243–15254  ·  view source on GitHub ↗

Gets the current agent interaction mode. RPC method: session.mode.get. Returns: The session mode the agent is operating in

(ctx context.Context)

Source from the content-addressed store, hash-verified

15241//
15242// Returns: The session mode the agent is operating in
15243func (a *ModeAPI) Get(ctx context.Context) (*SessionMode, error) {
15244 req := map[string]any{"sessionId": a.sessionID}
15245 raw, err := a.client.Request(ctx, "session.mode.get", req)
15246 if err != nil {
15247 return nil, err
15248 }
15249 var result SessionMode
15250 if err := json.Unmarshal(raw, &result); err != nil {
15251 return nil, err
15252 }
15253 return &result, nil
15254}
15255
15256// Sets the current agent interaction mode.
15257//

Callers 5

getTraceContextFunction · 0.45
fetchCLIVersionFromRepoFunction · 0.45
downloadCLIBinaryFunction · 0.45
downloadCLILicenseFunction · 0.45

Calls 1

RequestMethod · 0.45

Tested by 1