pub struct ReplSession {Show 17 fields
pub repo_root: PathBuf,
pub gate: Option<String>,
pub model: String,
pub context_strategy: String,
pub container: Option<String>,
pub max_turns: usize,
pub max_gates: usize,
pub rollback: bool,
pub converse: bool,
pub dispatch_cmd: Option<String>,
pub fold_budget: Option<usize>,
pub sandbox: String,
pub network: String,
pub allow_read: Vec<PathBuf>,
pub pass_env: Vec<String>,
pub state: State,
pub session_id: String,
/* private fields */
}Expand description
Active state and parameters of an ongoing session.
Fields§
§repo_root: PathBuf§gate: Option<String>§model: String§context_strategy: String§container: Option<String>§max_turns: usize§max_gates: usize§rollback: bool§converse: bool§dispatch_cmd: Option<String>§fold_budget: Option<usize>§sandbox: String§network: String§allow_read: Vec<PathBuf>§pass_env: Vec<String>§state: State§session_id: StringImplementations§
Source§impl ReplSession
impl ReplSession
Sourcepub fn try_new(config: &ReplConfig) -> Result<Self, String>
pub fn try_new(config: &ReplConfig) -> Result<Self, String>
Creates a new ReplSession initialized with the given ReplConfig.
Sourcepub fn try_new_with_approver(
config: &ReplConfig,
approver: Option<Arc<dyn Approver>>,
) -> Result<Self, String>
pub fn try_new_with_approver( config: &ReplConfig, approver: Option<Arc<dyn Approver>>, ) -> Result<Self, String>
Creates a new ReplSession initialized with the given ReplConfig and optional approver.
Sourcepub fn private_tmpdir(&self) -> Option<&Path>
pub fn private_tmpdir(&self) -> Option<&Path>
Returns the private temporary directory created for this session, if any.
Sourcepub fn new(config: &ReplConfig) -> Self
pub fn new(config: &ReplConfig) -> Self
Creates a new ReplSession initialized with the given ReplConfig.
pub fn task_config_for_prompt(&self, prompt: &str) -> TaskConfig
Trait Implementations§
Source§impl Drop for ReplSession
impl Drop for ReplSession
Auto Trait Implementations§
impl Forget for ReplSession
impl Freeze for ReplSessionwhere
*const u8 is !null: Freeze,
PhantomData<u8>: Freeze,
PhantomData<PathBuf>: Freeze,
PhantomData<String>: Freeze,
PhantomData<Message>: Freeze,
PhantomData<UserPart>: Freeze,
impl Move for ReplSession
impl RefUnwindSafe for ReplSession
impl Send for ReplSession
impl Sync for ReplSession
impl Unpin for ReplSession
impl UnsafeUnpin for ReplSessionwhere
*const u8 is !null: UnsafeUnpin,
PhantomData<u8>: UnsafeUnpin,
PhantomData<PathBuf>: UnsafeUnpin,
PhantomData<String>: UnsafeUnpin,
PhantomData<Message>: UnsafeUnpin,
PhantomData<UserPart>: UnsafeUnpin,
impl UnwindSafe for ReplSession
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
Mutably borrows from an owned value. Read more