pub struct ChatSession {
pub version: u32,
pub session_id: Option<String>,
pub creation_date: i64,
pub last_message_date: i64,
pub is_imported: bool,
pub initial_location: String,
pub custom_title: Option<String>,
pub requester_username: Option<String>,
pub requester_avatar_icon_uri: Option<Value>,
pub responder_username: Option<String>,
pub responder_avatar_icon_uri: Option<Value>,
pub requests: Vec<ChatRequest>,
}Expand description
VS Code Chat Session (version 3 format)
Fields§
§version: u32Session format version
session_id: Option<String>Unique session identifier (may not be present in file, use filename)
creation_date: i64Creation timestamp (milliseconds)
last_message_date: i64Last message timestamp (milliseconds)
is_imported: boolWhether this session was imported
initial_location: StringInitial location (panel, terminal, notebook, editor)
custom_title: Option<String>Custom title set by user
requester_username: Option<String>Requester username
requester_avatar_icon_uri: Option<Value>Requester avatar URI
responder_username: Option<String>Responder username
responder_avatar_icon_uri: Option<Value>Responder avatar URI
requests: Vec<ChatRequest>Chat requests/messages
Implementations§
Source§impl ChatSession
impl ChatSession
Sourcepub fn get_session_id(&self) -> String
pub fn get_session_id(&self) -> String
Get the session ID (from field or will need to be set from filename)
Sourcepub fn title(&self) -> String
pub fn title(&self) -> String
Get the title for this session (from custom_title or first message)
Sourcepub fn request_count(&self) -> usize
pub fn request_count(&self) -> usize
Get the request count
Sourcepub fn timestamp_range(&self) -> Option<(i64, i64)>
pub fn timestamp_range(&self) -> Option<(i64, i64)>
Get the timestamp range of requests
Trait Implementations§
Source§impl Clone for ChatSession
impl Clone for ChatSession
Source§fn clone(&self) -> ChatSession
fn clone(&self) -> ChatSession
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for ChatSession
impl Debug for ChatSession
Source§impl<'de> Deserialize<'de> for ChatSession
impl<'de> Deserialize<'de> for ChatSession
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
Source§impl From<ChatSession> for GenericSession
impl From<ChatSession> for GenericSession
Source§fn from(session: ChatSession) -> Self
fn from(session: ChatSession) -> Self
Converts to this type from the input type.
Source§impl From<GenericSession> for ChatSession
impl From<GenericSession> for ChatSession
Source§fn from(generic: GenericSession) -> Self
fn from(generic: GenericSession) -> Self
Converts to this type from the input type.
Auto Trait Implementations§
impl Freeze for ChatSession
impl RefUnwindSafe for ChatSession
impl Send for ChatSession
impl Sync for ChatSession
impl Unpin for ChatSession
impl UnwindSafe for ChatSession
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> 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>
Converts
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>
Converts
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