Fix compilation errors in Layer 4 caching

- Remove unused RelationshipInference import from base.rs
- Add Parse error variant to MemoryError enum
- Replace num_minutes() with num_seconds() / 60 (chrono compatibility)

Fixes compatibility with different chrono versions.
This commit is contained in:
Claude
2025-11-06 10:02:27 +00:00
parent 2579312029
commit 49f41c1b44
3 changed files with 6 additions and 3 deletions

View File

@@ -530,7 +530,7 @@ impl MemoryStore {
.map_err(|e| MemoryError::Parse(e.to_string()))?
.with_timezone(&Utc);
let age_minutes = (Utc::now() - cached_at).num_minutes();
let age_minutes = (Utc::now() - cached_at).num_seconds() / 60;
if age_minutes < Self::RELATIONSHIP_CACHE_DURATION_MINUTES {
let relationship: super::relationship::RelationshipInference =
@@ -582,7 +582,7 @@ impl MemoryStore {
.map_err(|e| MemoryError::Parse(e.to_string()))?
.with_timezone(&Utc);
let age_minutes = (Utc::now() - cached_at).num_minutes();
let age_minutes = (Utc::now() - cached_at).num_seconds() / 60;
if age_minutes < Self::RELATIONSHIP_CACHE_DURATION_MINUTES {
let relationships: Vec<super::relationship::RelationshipInference> =