pub struct ReplSession {Show 19 fields
pub repo_root: PathBuf,
pub gate: Option<String>,
pub model: String,
pub cached_models: Vec<ModelInfo>,
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 conversation_start_lines: Option<[String; 3]>,
pub state: State,
pub session_id: String,
/* private fields */
}Expand description
Active state and parameters of an ongoing REPL session.
Fields§
§repo_root: PathBuf§gate: Option<String>§model: String§cached_models: Vec<ModelInfo>§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>§conversation_start_lines: Option<[String; 3]>§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 ReplSession
impl Move for ReplSession
impl RefUnwindSafe for ReplSession
impl Send for ReplSession
impl Sync for ReplSession
impl Unpin for ReplSession
impl UnsafeUnpin for ReplSession
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