pub struct Session { /* private fields */ }Implementations§
Source§impl Session
impl Session
pub fn discovered_models_cached<F>( &self, discover: F, ) -> Result<CachedModelsDiscovery, String>
pub fn set_activity_hook( &self, hook: Box<dyn Fn(Option<&str>, SurfaceState) + Send + Sync>, )
pub fn start(runner: Box<dyn PromptRunner>, model: String) -> Session
pub fn start_with<F>(model: String, build_runner: F) -> Session
pub fn start_with_log<F>( model: String, log_path: Option<PathBuf>, build_runner: F, ) -> Result<Session, String>
pub fn start_with_log_io<F>( model: String, log_path: Option<PathBuf>, err: &mut dyn Write, build_runner: F, ) -> Result<Session, String>
pub fn try_start_with_log_io<F>( model: String, log_path: Option<PathBuf>, err: &mut dyn Write, build_runner: F, ) -> Result<Session, String>
pub fn try_start_with_log_and_resume_io<F>( model: String, log_path: Option<PathBuf>, resume_memory: ResumeMemoryState, err: &mut dyn Write, build_runner: F, ) -> Result<Session, String>
pub fn approver(&self) -> Arc<SurfaceApprover> ⓘ
pub fn has_pending_publish(&self, request: &str) -> bool
pub fn has_pending_land(&self, request: &str) -> bool
pub fn answer_approval( &self, id: &str, answer: ApprovalAnswer, ) -> Result<u64, AnswerError>
pub fn stop_run(&self)
pub fn mark_seen(&self)
pub fn set_attachments_root(&self, dir: PathBuf)
pub fn attachments_root(&self) -> Option<PathBuf>
pub fn submit( &self, text: &str, attachments: Vec<Attachment>, ) -> Result<u64, String>
pub fn submit_with_attachments( &self, text: &str, reports: Vec<Attachment>, file_attachments: Vec<QueuedAttachment>, pastes: Vec<Paste>, ) -> Result<u64, String>
pub fn submit_peer( &self, from_name: &str, from_repository: &str, text: &str, ) -> Result<PeerDelivery, String>
pub fn try_begin_reload(&self) -> Result<(), &'static str>
pub fn is_reloading(&self) -> bool
pub fn run_shell( &self, root: PathBuf, command: &str, mcp: Option<Arc<McpManager>>, ) -> Result<ShellCommandResult, ShellRunError>
pub fn run_shell_with_timeout( &self, root: PathBuf, command: &str, timeout: Duration, mcp: Option<Arc<McpManager>>, ) -> Result<ShellCommandResult, ShellRunError>
pub fn entries_after(&self, after: u64, wait: Duration) -> Vec<Entry>
pub fn info(&self) -> SessionInfo
pub fn set_model(&self, model: &str) -> Result<(), String>
pub fn set_effort(&self, effort: Option<&str>) -> Result<(), String>
pub fn record_decision( &self, run: &str, action: &str, note: Option<&str>, conversation_message: Option<&str>, ) -> Result<u64, String>
pub fn queue_for_request( &self, request_id: &str, text: &str, ) -> Result<u64, String>
pub fn record_error(&self, message: &str) -> u64
Trait Implementations§
Auto Trait Implementations§
impl Forget for Session
impl Freeze for Session
impl Move for Session
impl RefUnwindSafe for Sessionwhere
Atomic<usize>: RefUnwindSafe,
Mutex<SessionState>: RefUnwindSafe,
Mutex<Option<Arc<dyn Fn(Option<&str>, SurfaceState) + Sync + Send>>>: RefUnwindSafe,
Mutex<()>: RefUnwindSafe,
Mutex<Option<Vec<(String, Result<Vec<ModelInfo>, String>)>>>: RefUnwindSafe,
Condvar: RefUnwindSafe,
impl Send for Session
impl Sync for Session
impl Unpin for Session
impl UnsafeUnpin for Sessionwhere
*const ArcInner<SessionGuard> is !null: UnsafeUnpin,
PhantomData<ArcInner<SessionGuard>>: UnsafeUnpin,
impl UnwindSafe for Sessionwhere
Arc<SessionGuard>: UnwindSafe,
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