Enum Class AgentMode

java.lang.Object
java.lang.Enum<AgentMode>
com.github.copilot.rpc.AgentMode
All Implemented Interfaces:
Serializable, Comparable<AgentMode>, Constable

public enum AgentMode extends Enum<AgentMode>
The UI mode the agent is in for a given turn.

Set on MessageOptions.setAgentMode(AgentMode) to send a message in a specific mode; defaults to the session's current mode when unset.

Since:
1.0.0
See Also:
  • Enum Constant Details

    • INTERACTIVE

      public static final AgentMode INTERACTIVE
      The agent is responding interactively to the user.
    • PLAN

      public static final AgentMode PLAN
      The agent is preparing a plan before making changes.
    • AUTOPILOT

      public static final AgentMode AUTOPILOT
      The agent is working autonomously toward task completion.
    • SHELL

      public static final AgentMode SHELL
      The agent is in shell-focused UI mode.
  • Method Details

    • values

      public static AgentMode[] values()
      Returns an array containing the constants of this enum class, in the order they are declared.
      Returns:
      an array containing the constants of this enum class, in the order they are declared
    • valueOf

      public static AgentMode valueOf(String name)
      Returns the enum constant of this class with the specified name. The string must match exactly an identifier used to declare an enum constant in this class. (Extraneous whitespace characters are not permitted.)
      Parameters:
      name - the name of the enum constant to be returned.
      Returns:
      the enum constant with the specified name
      Throws:
      IllegalArgumentException - if this enum class has no constant with the specified name
      NullPointerException - if the argument is null
    • getValue

      public String getValue()
      Returns the JSON value for this agent mode.
      Returns:
      the string value used in JSON serialization
    • fromValue

      public static AgentMode fromValue(String value)
      Deserializes a JSON string value into the corresponding AgentMode enum constant.
      Parameters:
      value - the JSON string value
      Returns:
      the matching AgentMode, or null if value is null
      Throws:
      IllegalArgumentException - if the value does not match any known agent mode