pub struct ProjectKnowledge {
pub project_root: String,
pub project_hash: String,
pub facts: Vec<KnowledgeFact>,
pub patterns: Vec<ProjectPattern>,
pub history: Vec<ConsolidatedInsight>,
pub updated_at: DateTime<Utc>,
}Fields§
§project_root: String§project_hash: String§facts: Vec<KnowledgeFact>§patterns: Vec<ProjectPattern>§history: Vec<ConsolidatedInsight>§updated_at: DateTime<Utc>Implementations§
Source§impl ProjectKnowledge
impl ProjectKnowledge
pub fn new(project_root: &str) -> Self
pub fn remember( &mut self, category: &str, key: &str, value: &str, session_id: &str, confidence: f32, )
pub fn recall(&self, query: &str) -> Vec<&KnowledgeFact>
pub fn recall_by_category(&self, category: &str) -> Vec<&KnowledgeFact>
pub fn add_pattern( &mut self, pattern_type: &str, description: &str, examples: Vec<String>, session_id: &str, )
pub fn consolidate(&mut self, summary: &str, session_ids: Vec<String>)
pub fn remove_fact(&mut self, category: &str, key: &str) -> bool
pub fn format_summary(&self) -> String
pub fn save(&self) -> Result<(), String>
pub fn load(project_root: &str) -> Option<Self>
pub fn load_or_create(project_root: &str) -> Self
Trait Implementations§
Source§impl Clone for ProjectKnowledge
impl Clone for ProjectKnowledge
Source§fn clone(&self) -> ProjectKnowledge
fn clone(&self) -> ProjectKnowledge
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 ProjectKnowledge
impl Debug for ProjectKnowledge
Source§impl<'de> Deserialize<'de> for ProjectKnowledge
impl<'de> Deserialize<'de> for ProjectKnowledge
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 ProjectKnowledge
impl RefUnwindSafe for ProjectKnowledge
impl Send for ProjectKnowledge
impl Sync for ProjectKnowledge
impl Unpin for ProjectKnowledge
impl UnsafeUnpin for ProjectKnowledge
impl UnwindSafe for ProjectKnowledge
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