pub struct Initialize {
pub init_type: InitializeType,
pub any_workspace_path: String,
pub initial_files_to_read: Vec<String>,
pub task_id_to_resume: String,
pub mode_name: ModeName,
pub thread_id: String,
pub code_writer_config: Option<CodeWriterConfig>,
}Expand description
Parameters for initializing the shell environment
This struct represents the parameters needed to initialize or update the shell environment. It is used by the Initialize tool, which must be called before any other shell tools.
Fields§
§init_type: InitializeTypeInitialization type, indicating the purpose of the call
FirstCall: Initial setup for a new conversationUserAskedModeChange: User requested to change the mode during a conversationResetShell: Reset the shell if it’s not working properlyUserAskedChangeWorkspace: User requested to change the workspace during a conversation
any_workspace_path: StringPath to the workspace directory or file
This can be an absolute path or a path relative to the current directory. If it’s a file, the parent directory will be used as the workspace. If it doesn’t exist and is an absolute path, it will be created. If it’s a relative path and doesn’t exist, an error will be returned.
initial_files_to_read: Vec<String>List of files to read initially
These files can be absolute paths or paths relative to the workspace. They will be read and their contents provided in the response.
task_id_to_resume: StringID of a task to resume
If provided during a first_call, the task with this ID will be resumed.
This allows continuing a conversation from a previous session.
mode_name: ModeNameMode name for the shell environment
wcgw: Full permissions (default)architect: Restricted permissions, read-onlycode_writer: Custom permissions for code writing
thread_id: StringID of the thread session
If not provided for a first_call, a new ID will be generated.
This ID must be included in all subsequent tool calls.
code_writer_config: Option<CodeWriterConfig>Configuration for code_writer mode
Only used when mode_name is “code_writer”.
Specifies allowed commands and file globs for writing/editing.
Trait Implementations§
Source§impl Clone for Initialize
impl Clone for Initialize
Source§fn clone(&self) -> Initialize
fn clone(&self) -> Initialize
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for Initialize
impl Debug for Initialize
Source§impl<'de> Deserialize<'de> for Initialize
impl<'de> Deserialize<'de> for Initialize
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 Initialize
impl JsonSchema for Initialize
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 moreAuto Trait Implementations§
impl Freeze for Initialize
impl RefUnwindSafe for Initialize
impl Send for Initialize
impl Sync for Initialize
impl Unpin for Initialize
impl UnsafeUnpin for Initialize
impl UnwindSafe for Initialize
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<T> Downcast for Twhere
T: Any,
impl<T> Downcast for Twhere
T: Any,
Source§fn into_any(self: Box<T>) -> Box<dyn Any>
fn into_any(self: Box<T>) -> Box<dyn Any>
Box<dyn Trait> (where Trait: Downcast) to Box<dyn Any>. Box<dyn Any> can
then be further downcast into Box<ConcreteType> where ConcreteType implements Trait.Source§fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
Rc<Trait> (where Trait: Downcast) to Rc<Any>. Rc<Any> can then be
further downcast into Rc<ConcreteType> where ConcreteType implements Trait.Source§fn as_any(&self) -> &(dyn Any + 'static)
fn as_any(&self) -> &(dyn Any + 'static)
&Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &Any’s vtable from &Trait’s.Source§fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
&mut Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &mut Any’s vtable from &mut Trait’s.Source§impl<T> DowncastSync for T
impl<T> DowncastSync for T
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more