#[non_exhaustive]pub struct SessionInfo {
pub session_id: SessionId,
pub cwd: PathBuf,
pub additional_directories: Vec<PathBuf>,
pub title: Option<String>,
pub updated_at: Option<String>,
pub meta: Option<Map<String, Value>>,
}Expand description
Information about a session returned by session/list
Fields (Non-exhaustive)§
This struct is marked as non-exhaustive
Struct { .. } syntax; cannot be matched against without a wildcard ..; and struct update syntax will not work.session_id: SessionIdUnique identifier for the session
cwd: PathBufThe working directory for this session. Must be an absolute path.
additional_directories: Vec<PathBuf>Additional workspace roots reported for this session. Each path must be absolute.
When present, this is the complete ordered additional-root list reported by the Agent. Omitted and empty values are equivalent: the response reports no additional roots.
title: Option<String>Human-readable title for the session
updated_at: Option<String>ISO 8601 timestamp of last activity
meta: Option<Map<String, Value>>The _meta property is reserved by ACP to allow clients and agents to attach additional metadata to their interactions. Implementations MUST NOT make assumptions about values at these keys.
See protocol docs: Extensibility
Implementations§
Source§impl SessionInfo
impl SessionInfo
pub fn new( session_id: impl Into<SessionId>, cwd: impl Into<PathBuf>, ) -> SessionInfo
Sourcepub fn additional_directories(
self,
additional_directories: Vec<PathBuf>,
) -> SessionInfo
pub fn additional_directories( self, additional_directories: Vec<PathBuf>, ) -> SessionInfo
Additional workspace roots reported for this session. Each path must be absolute.
Sourcepub fn title(self, title: impl IntoOption<String>) -> SessionInfo
pub fn title(self, title: impl IntoOption<String>) -> SessionInfo
Human-readable title for the session
Sourcepub fn updated_at(self, updated_at: impl IntoOption<String>) -> SessionInfo
pub fn updated_at(self, updated_at: impl IntoOption<String>) -> SessionInfo
ISO 8601 timestamp of last activity
Sourcepub fn meta(self, meta: impl IntoOption<Map<String, Value>>) -> SessionInfo
pub fn meta(self, meta: impl IntoOption<Map<String, Value>>) -> SessionInfo
The _meta property is reserved by ACP to allow clients and agents to attach additional metadata to their interactions. Implementations MUST NOT make assumptions about values at these keys.
See protocol docs: Extensibility
Trait Implementations§
Source§impl Clone for SessionInfo
impl Clone for SessionInfo
Source§fn clone(&self) -> SessionInfo
fn clone(&self) -> SessionInfo
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for SessionInfo
impl Debug for SessionInfo
Source§impl<'de> Deserialize<'de> for SessionInfo
impl<'de> Deserialize<'de> for SessionInfo
Source§fn deserialize<__D>(
__deserializer: __D,
) -> Result<SessionInfo, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(
__deserializer: __D,
) -> Result<SessionInfo, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
Source§impl JsonSchema for SessionInfo
impl JsonSchema for SessionInfo
Source§fn schema_id() -> Cow<'static, str>
fn schema_id() -> Cow<'static, str>
Source§fn json_schema(generator: &mut SchemaGenerator) -> Schema
fn json_schema(generator: &mut SchemaGenerator) -> Schema
Source§fn inline_schema() -> bool
fn inline_schema() -> bool
$ref keyword. Read moreSource§impl PartialEq for SessionInfo
impl PartialEq for SessionInfo
Source§fn eq(&self, other: &SessionInfo) -> bool
fn eq(&self, other: &SessionInfo) -> bool
self and other values to be equal, and is used by ==.