Skip to main content

VTCodeConfig

Struct VTCodeConfig 

Source
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: String

Primary agent selected at startup when no session override is active.

§features: FeaturesConfig

Codex-compatible top-level feature flags ([features] table).

§file_opener: FileOpener

Codex-compatible clickable citation URI scheme.

§notify: Vec<String>

External notification command invoked for supported events.

§history: HistoryConfig

Codex-compatible local history persistence controls.

§tui: TuiConfig

Codex-compatible TUI settings.

§agent: AgentConfig

Agent-wide settings

§auth: AuthConfig

Authentication configuration for OAuth flows

§tools: ToolsConfig

Tool execution policies

§commands: CommandsConfig

Unix command permissions

§permissions: PermissionsConfig

Permission 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: SecurityConfig

Security settings

§sandbox: SandboxConfig

Sandbox settings for command execution isolation

§ui: UiConfig

UI settings

§chat: ChatConfig

Chat settings

§pty: PtyConfig

PTY settings

§debug: DebugConfig

Debug and tracing settings

§context: ContextFeaturesConfig

Context features (e.g., Decision Ledger)

§telemetry: TelemetryConfig

Telemetry configuration (logging, trajectory)

§optimization: OptimizationConfig

Performance optimization settings

§syntax_highlighting: SyntaxHighlightingConfig

Syntax highlighting configuration

§timeouts: TimeoutsConfig

Timeout ceilings and UI warning thresholds

§automation: AutomationConfig

Automation configuration

§subagents: SubagentRuntimeLimits

Subagent runtime configuration

§prompt_cache: PromptCachingConfig

Prompt cache configuration (local + provider integration)

§mcp: McpClientConfig

Model Context Protocol configuration

§webmcp: WebmcpConfig

Authenticated browser editor bridge configuration

§acp: AgentClientProtocolConfig

Agent Client Protocol configuration

§hooks: HooksConfig

Lifecycle hooks configuration

§model: ModelConfig

Model-specific behavior configuration

§provider: ProviderConfig

Provider-specific configuration

§skills: SkillsConfig

Skills 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: OutputStyleConfig

Output style configuration

§dotfile_protection: DotfileProtectionConfig

Dotfile protection configuration

§workspace: WorkspaceConfig

Workspace-level configuration controls

Implementations§

Source§

impl VTCodeConfig

Source

pub fn bootstrap_project<P: AsRef<Path>>( workspace: P, force: bool, ) -> Result<Vec<String>>

Bootstrap project with config + gitignore

Source

pub fn bootstrap_project_with_options<P: AsRef<Path>>( workspace: P, force: bool, use_home_dir: bool, ) -> Result<Vec<String>>

Bootstrap project with config + gitignore, with option to create in home directory

Source

pub fn create_sample_config<P: AsRef<Path>>(output: P) -> Result<()>

Create sample configuration file

Source§

impl VTCodeConfig

Source

pub fn validate(&self) -> Result<()>

Source

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.

Source

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.

Source

pub fn should_generate_memories(&self) -> bool

Returns true when completed threads should be stored as memory inputs.

Source

pub fn custom_provider(&self, name: &str) -> Option<&CustomProviderConfig>

Look up a custom provider by its stable key.

Source

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.

Source

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

Source§

fn clone(&self) -> Self

Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Debug for VTCodeConfig

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl Default for VTCodeConfig

Source§

fn default() -> Self

Returns the “default value” for a type. Read more
Source§

impl<'de> Deserialize<'de> for VTCodeConfig

Source§

fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>
where __D: Deserializer<'de>,

Deserialize this value from the given Serde deserializer. Read more
Source§

impl JsonSchema for VTCodeConfig

Source§

fn schema_name() -> Cow<'static, str>

The name of the generated JSON Schema. Read more
Source§

fn schema_id() -> Cow<'static, str>

Returns a string that uniquely identifies the schema produced by this type. Read more
Source§

fn json_schema(generator: &mut SchemaGenerator) -> Schema

Generates a JSON Schema for this type. Read more
Source§

fn inline_schema() -> bool

Whether JSON Schemas generated for this type should be included directly in parent schemas, rather than being re-used where possible using the $ref keyword. Read more
Source§

impl Serialize for VTCodeConfig

Source§

fn serialize<__S>(&self, __serializer: __S) -> Result<__S::Ok, __S::Error>
where __S: Serializer,

Serialize this value into the given Serde serializer. Read more

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> DeserializeOwned for T
where T: for<'de> Deserialize<'de>,

Source§

impl<T> DynClone for T
where T: Clone,

Source§

fn __clone_box(&self, _: Private) -> *mut ()

Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T> FromRef<T> for T
where T: Clone,

Source§

fn from_ref(input: &T) -> T

Converts to this type from a reference to the input type.
Source§

impl<A, B, T> HttpServerConnExec<A, B> for T
where B: Body,

Source§

impl<T> Instrument for T

Source§

fn instrument(self, span: Span) -> Instrumented<Self> ⓘ

Instruments this type with the provided Span, returning an Instrumented wrapper. Read more
Source§

fn in_current_span(self) -> Instrumented<Self> ⓘ

Instruments this type with the current Span, returning an Instrumented wrapper. Read more
Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> Pointable for T

Source§

const ALIGN: usize

The alignment of pointer.
Source§

type Init = T

The type for initializers.
Source§

unsafe fn init(init: <T as Pointable>::Init) -> usize

Initializes a with the given initializer. Read more
Source§

unsafe fn deref<'a>(ptr: usize) -> &'a T

Dereferences the given pointer. Read more
Source§

unsafe fn deref_mut<'a>(ptr: usize) -> &'a mut T

Mutably dereferences the given pointer. Read more
Source§

unsafe fn drop(ptr: usize)

Drops the object pointed to by the given pointer. Read more
Source§

impl<T> PolicyExt for T
where T: ?Sized,

Source§

fn and<P, B, E>(self, other: P) -> And<T, P>
where T: Sized + Policy<B, E>, P: Policy<B, E>,

Create a new Policy that returns Action::Follow only if self and other return Action::Follow. Read more
Source§

fn or<P, B, E>(self, other: P) -> Or<T, P>
where T: Sized + Policy<B, E>, P: Policy<B, E>,

Create a new Policy that returns Action::Follow if either self or other returns Action::Follow. Read more
Source§

impl<T> Same for T

Source§

type Output = T

Should always be Self
Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = !

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, !>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
Source§

impl<T> WithSubscriber for T

Source§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self> ⓘ
where S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a WithDispatch wrapper. Read more
Source§

fn with_current_subscriber(self) -> WithDispatch<Self> ⓘ

Attaches the current default Subscriber to this type, returning a WithDispatch wrapper. Read more