pub struct Episode {Show 15 fields
pub id: Uuid,
pub created_at: DateTime<Utc>,
pub project: Option<String>,
pub summary: String,
pub task_type: String,
pub outcome: EpisodeOutcome,
pub files_modified: Vec<String>,
pub errors_resolved: Vec<ErrorResolution>,
pub tags: Vec<String>,
pub intent_id: Option<Uuid>,
pub delta_id: Option<Uuid>,
pub commit_sha: Option<String>,
pub utility: f64,
pub helpful_count: u32,
pub feedback_count: u32,
}Expand description
An episode captures a coding experience for future reference
Fields§
§id: UuidUnique identifier
created_at: DateTime<Utc>When the episode was captured
project: Option<String>Project this episode belongs to
summary: StringBrief summary of what was accomplished
task_type: StringType of task (bugfix, feature, refactor, etc.)
outcome: EpisodeOutcomeOutcome of the episode
files_modified: Vec<String>Files that were modified
errors_resolved: Vec<ErrorResolution>Errors encountered and how they were resolved
Domain tags for categorization
intent_id: Option<Uuid>Associated intent ID (if any)
delta_id: Option<Uuid>Associated delta ID (if any)
commit_sha: Option<String>Git commit SHA (if committed)
utility: f64Utility score (updated by feedback and propagation)
helpful_count: u32Number of times this episode was helpful
feedback_count: u32Total number of feedback events
Implementations§
Source§impl Episode
impl Episode
Sourcepub fn new(summary: String, task_type: String, outcome: EpisodeOutcome) -> Self
pub fn new(summary: String, task_type: String, outcome: EpisodeOutcome) -> Self
Create a new episode
Sourcepub fn with_project(self, project: String) -> Self
pub fn with_project(self, project: String) -> Self
Set the project
Sourcepub fn with_files(self, files: Vec<String>) -> Self
pub fn with_files(self, files: Vec<String>) -> Self
Set files modified
Sourcepub fn with_errors(self, errors: Vec<ErrorResolution>) -> Self
pub fn with_errors(self, errors: Vec<ErrorResolution>) -> Self
Set errors resolved
Set tags
Sourcepub fn with_intent(self, intent_id: Uuid) -> Self
pub fn with_intent(self, intent_id: Uuid) -> Self
Set intent ID
Sourcepub fn with_delta(self, delta_id: Uuid) -> Self
pub fn with_delta(self, delta_id: Uuid) -> Self
Set delta ID
Sourcepub fn with_commit(self, sha: String) -> Self
pub fn with_commit(self, sha: String) -> Self
Set commit SHA
Sourcepub fn to_embedding_text(&self) -> String
pub fn to_embedding_text(&self) -> String
Build text representation for embedding
Trait Implementations§
Source§impl<'de> Deserialize<'de> for Episode
impl<'de> Deserialize<'de> for Episode
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
Auto Trait Implementations§
impl Freeze for Episode
impl RefUnwindSafe for Episode
impl Send for Episode
impl Sync for Episode
impl Unpin for Episode
impl UnsafeUnpin for Episode
impl UnwindSafe for Episode
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,
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>
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