pub struct SessionWorkingDirectoryContext {
pub base_commit: Option<String>,
pub branch: Option<String>,
pub cwd: String,
pub git_root: Option<String>,
pub head_commit: Option<String>,
pub host_type: Option<SessionWorkingDirectoryContextHostType>,
pub repository: Option<String>,
pub repository_host: Option<String>,
}Expand description
Updated working directory and git context. Emitted as the new payload of session.context_changed.
Experimental. This type is part of an experimental wire-protocol surface and may change or be removed in future SDK or CLI releases.
Fields§
§base_commit: Option<String>Merge-base commit SHA (fork point from the remote default branch)
branch: Option<String>Current git branch name
cwd: StringCurrent working directory path
git_root: Option<String>Root directory of the git repository, resolved via git rev-parse
head_commit: Option<String>Head commit of the current git branch
host_type: Option<SessionWorkingDirectoryContextHostType>Hosting platform type of the repository
repository: Option<String>Repository identifier derived from the git remote URL (“owner/name” for GitHub, “org/project/repo” for Azure DevOps)
repository_host: Option<String>Raw host string from the git remote URL (e.g. “github.com”, “dev.azure.com”)
Trait Implementations§
Source§impl Clone for SessionWorkingDirectoryContext
impl Clone for SessionWorkingDirectoryContext
Source§fn clone(&self) -> SessionWorkingDirectoryContext
fn clone(&self) -> SessionWorkingDirectoryContext
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Default for SessionWorkingDirectoryContext
impl Default for SessionWorkingDirectoryContext
Source§fn default() -> SessionWorkingDirectoryContext
fn default() -> SessionWorkingDirectoryContext
Returns the “default value” for a type. Read more
Source§impl<'de> Deserialize<'de> for SessionWorkingDirectoryContext
impl<'de> Deserialize<'de> for SessionWorkingDirectoryContext
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Auto Trait Implementations§
impl Freeze for SessionWorkingDirectoryContext
impl RefUnwindSafe for SessionWorkingDirectoryContext
impl Send for SessionWorkingDirectoryContext
impl Sync for SessionWorkingDirectoryContext
impl Unpin for SessionWorkingDirectoryContext
impl UnsafeUnpin for SessionWorkingDirectoryContext
impl UnwindSafe for SessionWorkingDirectoryContext
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