use super::ClaudeCommand;
impl ClaudeCommand {
#[inline]
#[must_use]
pub fn with_auto_approve_tools( mut self, approve: bool ) -> Self {
self.auto_approve_tools = Some( approve );
self
}
#[inline]
#[must_use]
pub fn with_action_mode( mut self, mode: crate::types::ActionMode ) -> Self {
self.action_mode = Some( mode );
self
}
#[inline]
#[must_use]
pub fn with_log_level( mut self, level: crate::types::LogLevel ) -> Self {
self.log_level = Some( level );
self
}
#[inline]
#[must_use]
pub fn with_temperature( mut self, temperature: f64 ) -> Self {
self.temperature = Some( temperature );
self
}
#[inline]
#[must_use]
pub fn with_skip_permissions( mut self, skip: bool ) -> Self {
self.skip_permissions = skip;
self
}
#[inline]
#[must_use]
pub fn with_allowed_tools<I, S>( mut self, tools: I ) -> Self
where
I: IntoIterator<Item = S>,
S: Into<String>,
{
let collected : Vec<String> = tools.into_iter().map( Into::into ).collect();
if !collected.is_empty() {
self.args.push( "--allowedTools".to_string() );
self.args.extend( collected );
}
self
}
#[inline]
#[must_use]
pub fn with_disallowed_tools<I, S>( mut self, tools: I ) -> Self
where
I: IntoIterator<Item = S>,
S: Into<String>,
{
let collected : Vec<String> = tools.into_iter().map( Into::into ).collect();
if !collected.is_empty() {
self.args.push( "--disallowedTools".to_string() );
self.args.extend( collected );
}
self
}
#[inline]
#[must_use]
pub fn with_tools<I, S>( mut self, tools: I ) -> Self
where
I: IntoIterator<Item = S>,
S: Into<String>,
{
let collected : Vec<String> = tools.into_iter().map( Into::into ).collect();
if !collected.is_empty() {
self.args.push( "--tools".to_string() );
self.args.extend( collected );
}
self
}
}