pub struct Context {
pub cwd: PathBuf,
pub agent_dir: PathBuf,
pub project_dir: PathBuf,
pub project_trusted: bool,
pub mode: Mode,
pub ui: Arc<dyn ExtensionUi>,
pub tools: Tools,
pub cancel: CancellationToken,
pub session: WeakSession,
}Expand description
What an extension can reach while handling an event or command.
Fields§
§cwd: PathBufThe session’s working directory.
agent_dir: PathBufThe agent directory.
project_dir: PathBufThe directory the session’s project files come from: the working directory unless the run names another.
project_trusted: boolWhether the project’s resources are trusted.
mode: ModeThe mode.
ui: Arc<dyn ExtensionUi>Dialogs and notifications.
tools: ToolsThe session’s tools.
cancel: CancellationTokenCancelled when the current run is aborted.
session: WeakSessionThe session, for extensions that act on it later.
Trait Implementations§
Auto Trait Implementations§
impl !RefUnwindSafe for Context
impl !UnwindSafe for Context
impl Freeze for Context
impl Send for Context
impl Sync for Context
impl Unpin for Context
impl UnsafeUnpin for Context
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