pub enum SessionFilter {
Show 15 variants
ByStatus(SessionStatus),
ByTypeName(String),
HasTag(String),
CreatedAfter(Timestamp),
CreatedBefore(Timestamp),
UpdatedAfter(Timestamp),
UpdatedBefore(Timestamp),
NameContains(String),
HasParent,
WithParent(SessionId),
IsRoot,
And(Vec<SessionFilter>),
Or(Vec<SessionFilter>),
Not(Box<SessionFilter>),
All,
}Expand description
Filter for querying sessions.
Filters can be combined using SessionFilter::And for complex queries.
§Example
use thulp_workspace::{SessionFilter, SessionStatus};
// Find active conversation sessions
let filter = SessionFilter::And(vec![
SessionFilter::ByStatus(SessionStatus::Active),
SessionFilter::ByTypeName("conversation".to_string()),
]);Variants§
ByStatus(SessionStatus)
Match sessions with the given status.
ByTypeName(String)
Match sessions by type name (e.g., “conversation”, “teacher_demo”).
HasTag(String)
Match sessions that have a specific tag.
CreatedAfter(Timestamp)
Match sessions created after the given timestamp.
CreatedBefore(Timestamp)
Match sessions created before the given timestamp.
UpdatedAfter(Timestamp)
Match sessions updated after the given timestamp.
UpdatedBefore(Timestamp)
Match sessions updated before the given timestamp.
NameContains(String)
Match sessions where the name contains the given text.
HasParent
Match sessions that have a parent session.
WithParent(SessionId)
Match sessions with a specific parent session ID.
IsRoot
Match sessions that are root sessions (no parent).
And(Vec<SessionFilter>)
Combine multiple filters with AND logic.
Or(Vec<SessionFilter>)
Combine multiple filters with OR logic.
Not(Box<SessionFilter>)
Negate a filter.
All
Match all sessions.
Implementations§
Source§impl SessionFilter
impl SessionFilter
Sourcepub fn and(self, other: SessionFilter) -> SessionFilter
pub fn and(self, other: SessionFilter) -> SessionFilter
Create an AND filter from two filters.
Sourcepub fn or(self, other: SessionFilter) -> SessionFilter
pub fn or(self, other: SessionFilter) -> SessionFilter
Create an OR filter from two filters.
Sourcepub fn negate(self) -> SessionFilter
pub fn negate(self) -> SessionFilter
Negate this filter.
Sourcepub fn conversations() -> Self
pub fn conversations() -> Self
Create a filter for conversation sessions.
Sourcepub fn teacher_demos() -> Self
pub fn teacher_demos() -> Self
Create a filter for teacher demo sessions.
Sourcepub fn evaluations() -> Self
pub fn evaluations() -> Self
Create a filter for evaluation sessions.
Sourcepub fn refinements() -> Self
pub fn refinements() -> Self
Create a filter for refinement sessions.
Sourcepub fn agent_sessions() -> Self
pub fn agent_sessions() -> Self
Create a filter for agent sessions.
Trait Implementations§
Source§impl Clone for SessionFilter
impl Clone for SessionFilter
Source§fn clone(&self) -> SessionFilter
fn clone(&self) -> SessionFilter
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more