pub struct GeminiSession {
pub session_id: String,
pub project_hash: String,
pub start_time: String,
pub last_updated: String,
pub kind: Option<String>,
}Expand description
Top-level session metadata line of a Gemini CLI chat log.
Current Gemini CLI writes chats as JSONL event streams under
~/.gemini/tmp/<project>/chats/session-*.jsonl. The very first line is a
pure session-meta record:
{"sessionId":"...","projectHash":"...","startTime":"...","lastUpdated":"...","kind":"main"}Subsequent lines are individual assistant / user / info events that the
parser handles one-by-one as plain Values (see
parse_gemini_events), so this struct only needs to capture the
identifiers found on that opening meta line. Legacy single-object
exports (chats/<session>.json with an inline messages array) are no
longer supported — the filesystem filter ignores .json entirely.
Fields§
§session_id: StringSession identifier.
project_hash: StringHash identifying the project the session belongs to.
start_time: StringISO-8601 session start time.
last_updated: StringISO-8601 timestamp of the last update to the session.
kind: Option<String>Present on JSONL session-meta records (e.g. "main"), but not
required — older CLI builds occasionally omit it.
Trait Implementations§
Source§impl Clone for GeminiSession
impl Clone for GeminiSession
Source§fn clone(&self) -> GeminiSession
fn clone(&self) -> GeminiSession
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 GeminiSession
impl Debug for GeminiSession
Source§impl<'de> Deserialize<'de> for GeminiSession
impl<'de> Deserialize<'de> for GeminiSession
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>,
Auto Trait Implementations§
impl Freeze for GeminiSession
impl RefUnwindSafe for GeminiSession
impl Send for GeminiSession
impl Sync for GeminiSession
impl Unpin for GeminiSession
impl UnsafeUnpin for GeminiSession
impl UnwindSafe for GeminiSession
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> DeserializeOwned for Twhere
T: for<'de> Deserialize<'de>,
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>
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