- All Implemented Interfaces:
Serializable,Comparable<CopilotClientMode>,Constable
Selects the defaulting strategy used by
CopilotClient.- Since:
- 1.3.0
-
Nested Class Summary
Nested classes/interfaces inherited from class java.lang.Enum
Enum.EnumDesc<E extends Enum<E>> -
Enum Constant Summary
Enum ConstantsEnum ConstantDescriptionUses defaults equivalent to GitHub Copilot CLI.Disables optional features by default. -
Method Summary
Modifier and TypeMethodDescriptionstatic CopilotClientModeReturns the enum constant of this class with the specified name.static CopilotClientMode[]values()Returns an array containing the constants of this enum class, in the order they are declared.Methods inherited from class java.lang.Enum
compareTo, describeConstable, equals, getDeclaringClass, hashCode, name, ordinal, toString, valueOf
-
Enum Constant Details
-
EMPTY
Disables optional features by default. The app must explicitly opt into anything it needs. Required for any scenario where CLI-like ambient behavior is unsafe (e.g., multi-user servers).When this mode is selected:
- The client constructor requires
CopilotClientOptions.getCopilotHome()orCopilotClientOptions.getCliUrl()to be set. SessionConfig.getAvailableTools()must be supplied on every session — no tools are exposed by default.session.createalways setstoolFilterPrecedence: "excluded"so the allowlist and denylist compose naturally.- The SDK injects safe defaults for ambient session features (telemetry, custom instructions, plugins, environment context, etc.).
- The client constructor requires
-
COPILOT_CLI
Uses defaults equivalent to GitHub Copilot CLI. The default. Useful when building a coding agent that shares sessions with Copilot CLI.Do not use this mode for server-based multi-user applications — the default coding agent has tools and capabilities that operate across sessions and can access the host OS environment.
-
-
Method Details
-
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
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 nameNullPointerException- if the argument is null
-