pub enum SessionTarget {
Default,
Named(String),
Session(SessionSlot),
FreshInProject {
slot: SessionSlot,
cwd: Option<PathBuf>,
},
}Expand description
What crate::Workspace::get_agent_handle should hand back.
Variants§
Default
The lead of the fallback project: the alphabetically-first project overall.
Named(String)
Open the lead of the project whose name matches the given
string in forge.toml. Errors with ProjectNotFound if no
such name exists.
Session(SessionSlot)
A specific session slot, resumed under the id the store holds
for it. Used by the click-to-resume flow in the Projects pane
and by Workspace::spawn_session.
FreshInProject
Spawn a FRESH session in slot’s project, bypassing the
lead-resume path. Used by the workers MCP so a worker is always
a brand-new session, not a resume of the project’s existing
lead. The caller has already recorded the id it minted for the
slot, so the child adopts exactly that one.
cwd is the tree the fresh session runs in when the spawn
pointed it somewhere other than the project’s own path (a
worker’s own cwd); None is the project path, exactly as
before.
Trait Implementations§
Source§impl Clone for SessionTarget
impl Clone for SessionTarget
Auto Trait Implementations§
impl Freeze for SessionTarget
impl RefUnwindSafe for SessionTarget
impl Send for SessionTarget
impl Sync for SessionTarget
impl Unpin for SessionTarget
impl UnsafeUnpin for SessionTarget
impl UnwindSafe for SessionTarget
Blanket Implementations§
§impl<T> AnySync for T
impl<T> AnySync for T
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
impl<S, T> Duplex<S> for Twhere
T: FromSample<S> + ToSample<S>,
§impl<S> FromSample<S> for S
impl<S> FromSample<S> for S
fn from_sample_(s: S) -> S
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more