Gets the current agent interaction mode. RPC method: session.mode.get. Returns: The session mode the agent is operating in
(ctx context.Context)
| 15241 | // |
| 15242 | // Returns: The session mode the agent is operating in |
| 15243 | func (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 | // |