pub enum EditingMode {
Edit,
Plan,
Agent,
}Expand description
Default editing mode for agent startup (Codex-inspired workflow)
Controls the initial mode when a session starts. This is a configuration
enum for default_editing_mode in vtcode.toml. At runtime, the mode can be
cycled (Edit → Plan → Agent → Edit) via Shift+Tab or /plan, /agent commands.
Inspired by OpenAI Codex’s emphasis on structured planning before execution, but provider-agnostic (works with Gemini, Anthropic, OpenAI, xAI, DeepSeek, etc.)
Variants§
Edit
Full tool access - can read, write, execute commands (default) Use for: Implementation, bug fixes, feature development
Plan
Read-only exploration - mutating tools blocked
Use for: Planning, research, architecture analysis
Agent can write plans to .vtcode/plans/ but not modify code
Agent
Autonomous agent mode - full tool access with reduced HITL prompts Use for: Long-running autonomous tasks with minimal interruption
Implementations§
Source§impl EditingMode
impl EditingMode
Sourcepub fn as_str(self) -> &'static str
pub fn as_str(self) -> &'static str
Return the textual representation for configuration and display
Sourcepub fn allowed_values() -> &'static [&'static str]
pub fn allowed_values() -> &'static [&'static str]
Enumerate the allowed configuration values for validation
Sourcepub fn can_modify_files(self) -> bool
pub fn can_modify_files(self) -> bool
Check if this mode allows file modifications
Sourcepub fn can_execute_commands(self) -> bool
pub fn can_execute_commands(self) -> bool
Check if this mode allows command execution
Sourcepub fn is_read_only(self) -> bool
pub fn is_read_only(self) -> bool
Check if this is read-only planning mode
Sourcepub fn is_autonomous(self) -> bool
pub fn is_autonomous(self) -> bool
Check if this is autonomous agent mode (reduced HITL)
Trait Implementations§
Source§impl Clone for EditingMode
impl Clone for EditingMode
Source§fn clone(&self) -> EditingMode
fn clone(&self) -> EditingMode
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for EditingMode
impl Debug for EditingMode
Source§impl Default for EditingMode
impl Default for EditingMode
Source§fn default() -> EditingMode
fn default() -> EditingMode
Source§impl<'de> Deserialize<'de> for EditingMode
impl<'de> Deserialize<'de> for EditingMode
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 Display for EditingMode
impl Display for EditingMode
Source§impl JsonSchema for EditingMode
impl JsonSchema for EditingMode
Source§fn schema_name() -> String
fn schema_name() -> String
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 is_referenceable() -> bool
fn is_referenceable() -> bool
$ref keyword. Read moreSource§impl PartialEq for EditingMode
impl PartialEq for EditingMode
Source§impl Serialize for EditingMode
impl Serialize for EditingMode
impl Copy for EditingMode
impl Eq for EditingMode
impl StructuralPartialEq for EditingMode
Auto Trait Implementations§
impl Freeze for EditingMode
impl RefUnwindSafe for EditingMode
impl Send for EditingMode
impl Sync for EditingMode
impl Unpin for EditingMode
impl UnwindSafe for EditingMode
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key and return true if they are equal.