pub struct VTCodeConfig {Show 40 fields
pub default_primary_agent: String,
pub features: FeaturesConfig,
pub file_opener: FileOpener,
pub notify: Vec<String>,
pub history: HistoryConfig,
pub tui: TuiConfig,
pub agent: AgentConfig,
pub auth: AuthConfig,
pub tools: ToolsConfig,
pub commands: CommandsConfig,
pub permissions: PermissionsConfig,
pub runtime_agent_permissions: Option<AgentPermissionsConfig>,
pub workspace_lifecycle_hooks: Option<WorkspaceLifecycleHooks>,
pub security: SecurityConfig,
pub sandbox: SandboxConfig,
pub ui: UiConfig,
pub chat: ChatConfig,
pub pty: PtyConfig,
pub debug: DebugConfig,
pub context: ContextFeaturesConfig,
pub telemetry: TelemetryConfig,
pub optimization: OptimizationConfig,
pub syntax_highlighting: SyntaxHighlightingConfig,
pub timeouts: TimeoutsConfig,
pub automation: AutomationConfig,
pub subagents: SubagentRuntimeLimits,
pub prompt_cache: PromptCachingConfig,
pub mcp: McpClientConfig,
pub webmcp: WebmcpConfig,
pub acp: AgentClientProtocolConfig,
pub hooks: HooksConfig,
pub model: ModelConfig,
pub provider: ProviderConfig,
pub skills: SkillsConfig,
pub custom_providers: Vec<CustomProviderConfig>,
pub provider_overrides: BTreeMap<String, ProviderOverrideConfig>,
pub providers_whitelist: Vec<String>,
pub output_style: OutputStyleConfig,
pub dotfile_protection: DotfileProtectionConfig,
pub workspace: WorkspaceConfig,
}Expand description
Main configuration structure for VT Code
Fields§
§default_primary_agent: StringPrimary agent selected at startup when no session override is active.
features: FeaturesConfigCodex-compatible top-level feature flags ([features] table).
file_opener: FileOpenerCodex-compatible clickable citation URI scheme.
notify: Vec<String>External notification command invoked for supported events.
history: HistoryConfigCodex-compatible local history persistence controls.
tui: TuiConfigCodex-compatible TUI settings.
agent: AgentConfigAgent-wide settings
auth: AuthConfigAuthentication configuration for OAuth flows
tools: ToolsConfigTool execution policies
commands: CommandsConfigUnix command permissions
permissions: PermissionsConfigPermission system settings (resolution, audit logging, caching)
runtime_agent_permissions: Option<AgentPermissionsConfig>Runtime-only agent permission policy supplied by derived child agents.
workspace_lifecycle_hooks: Option<WorkspaceLifecycleHooks>Runtime-only snapshot of lifecycle hook commands sourced from
workspace-controlled configuration layers, populated by ConfigManager
at load time. Workspace-controlled hooks require explicit user approval
before execution; see WorkspaceLifecycleHooks.
security: SecurityConfigSecurity settings
sandbox: SandboxConfigSandbox settings for command execution isolation
ui: UiConfigUI settings
chat: ChatConfigChat settings
pty: PtyConfigPTY settings
debug: DebugConfigDebug and tracing settings
context: ContextFeaturesConfigContext features (e.g., Decision Ledger)
telemetry: TelemetryConfigTelemetry configuration (logging, trajectory)
optimization: OptimizationConfigPerformance optimization settings
syntax_highlighting: SyntaxHighlightingConfigSyntax highlighting configuration
timeouts: TimeoutsConfigTimeout ceilings and UI warning thresholds
automation: AutomationConfigAutomation configuration
subagents: SubagentRuntimeLimitsSubagent runtime configuration
prompt_cache: PromptCachingConfigPrompt cache configuration (local + provider integration)
mcp: McpClientConfigModel Context Protocol configuration
webmcp: WebmcpConfigAuthenticated browser editor bridge configuration
acp: AgentClientProtocolConfigAgent Client Protocol configuration
hooks: HooksConfigLifecycle hooks configuration
model: ModelConfigModel-specific behavior configuration
provider: ProviderConfigProvider-specific configuration
skills: SkillsConfigSkills system configuration (Agent Skills spec)
custom_providers: Vec<CustomProviderConfig>Extra OpenAI-compatible endpoints for the model picker. Define in user or system config only.
provider_overrides: BTreeMap<String, ProviderOverrideConfig>Built-in provider overrides for model lists and endpoint configuration.
Maps provider key (e.g., “opencode-zen”, “opencode-go”) to override config that extends the provider’s hardcoded model list with custom models, and optionally overrides the base URL or API key env var.
providers_whitelist: Vec<String>Restrict which providers may be used.
When non-empty, only providers listed here are visible in the model picker, selectable at first-run, and instantiable at runtime. Empty (the default) means all built-in and custom providers are available.
output_style: OutputStyleConfigOutput style configuration
dotfile_protection: DotfileProtectionConfigDotfile protection configuration
workspace: WorkspaceConfigWorkspace-level configuration controls
Implementations§
Source§impl VTCodeConfig
impl VTCodeConfig
Sourcepub fn bootstrap_project<P: AsRef<Path>>(
workspace: P,
force: bool,
) -> Result<Vec<String>>
pub fn bootstrap_project<P: AsRef<Path>>( workspace: P, force: bool, ) -> Result<Vec<String>>
Bootstrap project with config + gitignore
Source§impl VTCodeConfig
impl VTCodeConfig
pub fn validate(&self) -> Result<()>
Sourcepub fn persistent_memory_enabled(&self) -> bool
pub fn persistent_memory_enabled(&self) -> bool
Returns true when the persistent memory subsystem is enabled.
The top-level features.memories flag is the global master switch.
agent.persistent_memory.enabled then enables repository-scoped storage.
Sourcepub fn memories_enabled(&self) -> bool
pub fn memories_enabled(&self) -> bool
Returns true when the memories subsystem is enabled for injection.
Memories are active when the subsystem is enabled and memories.use_memories
is true.
Sourcepub fn should_generate_memories(&self) -> bool
pub fn should_generate_memories(&self) -> bool
Returns true when completed threads should be stored as memory inputs.
Sourcepub fn custom_provider(&self, name: &str) -> Option<&CustomProviderConfig>
pub fn custom_provider(&self, name: &str) -> Option<&CustomProviderConfig>
Look up a custom provider by its stable key.
Sourcepub fn configured_api_key_env(&self, name: &str) -> Option<String>
pub fn configured_api_key_env(&self, name: &str) -> Option<String>
Return the explicitly configured credential key for a provider.
Custom-provider identities take precedence over built-in provider overrides. A missing result means callers should use the provider’s built-in default or the agent-wide fallback.
Sourcepub fn provider_display_name(&self, provider_key: &str) -> String
pub fn provider_display_name(&self, provider_key: &str) -> String
Get the display name for any provider key, falling back to the raw key if no custom provider matches.
Trait Implementations§
Source§impl Clone for VTCodeConfig
impl Clone for VTCodeConfig
Source§impl Debug for VTCodeConfig
impl Debug for VTCodeConfig
Source§impl Default for VTCodeConfig
impl Default for VTCodeConfig
Source§impl<'de> Deserialize<'de> for VTCodeConfig
impl<'de> Deserialize<'de> for VTCodeConfig
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Source§impl JsonSchema for VTCodeConfig
impl JsonSchema for VTCodeConfig
Source§fn schema_id() -> Cow<'static, str>
fn schema_id() -> Cow<'static, str>
Source§fn json_schema(generator: &mut SchemaGenerator) -> Schema
fn json_schema(generator: &mut SchemaGenerator) -> Schema
Source§fn inline_schema() -> bool
fn inline_schema() -> bool
$ref keyword. Read more