mirror of
https://github.com/samvallad33/vestige.git
synced 2026-05-09 15:52:37 +02:00
chore: license AGPL-3.0, zero clippy warnings, CHANGELOG through v1.6.0
License: - Replace MIT/Apache-2.0 with AGPL-3.0-only across all crates and npm packages - Replace LICENSE file with official GNU AGPL-3.0 text - Remove LICENSE-MIT and LICENSE-APACHE Code quality: - Fix all 44 clippy warnings (zero remaining) - Collapsible if statements, redundant closures, manual Option::map - Remove duplicate #[allow(dead_code)] attributes in deprecated tool modules - Add Default impl for CognitiveEngine - Replace manual sort_by with sort_by_key Documentation: - Update CHANGELOG with v1.2.0, v1.3.0, v1.5.0, v1.6.0 entries - Update README with v1.6.0 highlights and accurate stats (52K lines, 1100+ tests) - Add fastembed-rs/ to .gitignore - Add fastembed-rs to workspace exclude 1115 tests passing, zero warnings, RUSTFLAGS="-Dwarnings" clean.
This commit is contained in:
parent
495a88331f
commit
ce520bb246
40 changed files with 953 additions and 424 deletions
|
|
@ -402,6 +402,7 @@ pub struct IntentDetector {
|
|||
}
|
||||
|
||||
/// A pattern that suggests a specific intent
|
||||
#[allow(clippy::type_complexity)]
|
||||
struct IntentPattern {
|
||||
/// Name of the pattern
|
||||
name: String,
|
||||
|
|
|
|||
|
|
@ -216,8 +216,8 @@ impl KnowledgeEdge {
|
|||
|
||||
/// Check if the edge was valid at a given time
|
||||
pub fn was_valid_at(&self, time: DateTime<Utc>) -> bool {
|
||||
let after_start = self.valid_from.map_or(true, |from| time >= from);
|
||||
let before_end = self.valid_until.map_or(true, |until| time < until);
|
||||
let after_start = self.valid_from.is_none_or(|from| time >= from);
|
||||
let before_end = self.valid_until.is_none_or(|until| time < until);
|
||||
after_start && before_end
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1691,6 +1691,7 @@ impl HippocampalIndex {
|
|||
}
|
||||
|
||||
/// Recursively collect associations
|
||||
#[allow(clippy::only_used_in_recursion)]
|
||||
fn collect_associations(
|
||||
&self,
|
||||
indices: &HashMap<String, MemoryIndex>,
|
||||
|
|
@ -1874,6 +1875,7 @@ pub struct MigrationResult {
|
|||
|
||||
impl HippocampalIndex {
|
||||
/// Migrate a KnowledgeNode to indexed format
|
||||
#[allow(clippy::too_many_arguments)]
|
||||
pub fn migrate_node(
|
||||
&self,
|
||||
node_id: &str,
|
||||
|
|
|
|||
|
|
@ -738,6 +738,7 @@ impl Default for PredictiveMemoryConfig {
|
|||
}
|
||||
|
||||
/// The main predictive memory engine
|
||||
#[allow(clippy::type_complexity)]
|
||||
pub struct PredictiveMemory {
|
||||
/// User behavior model
|
||||
user_model: Arc<RwLock<UserModel>>,
|
||||
|
|
|
|||
|
|
@ -1049,7 +1049,9 @@ impl IntentionParser {
|
|||
|
||||
/// Extract content from text, removing trigger keywords
|
||||
fn extract_content(&self, _text_lower: &str, original: &str, keyword: &str) -> String {
|
||||
let content = original
|
||||
|
||||
|
||||
original
|
||||
.replace(keyword, "")
|
||||
.replace(&keyword.to_uppercase(), "")
|
||||
.replace("remind me to ", "")
|
||||
|
|
@ -1057,9 +1059,7 @@ impl IntentionParser {
|
|||
.replace("remind me ", "")
|
||||
.replace("Remind me ", "")
|
||||
.trim()
|
||||
.to_string();
|
||||
|
||||
content
|
||||
.to_string()
|
||||
}
|
||||
|
||||
/// Extract entity names from text
|
||||
|
|
|
|||
|
|
@ -1890,7 +1890,7 @@ impl Storage {
|
|||
let all_embeddings = self.get_all_embeddings()?;
|
||||
let n = all_embeddings.len();
|
||||
|
||||
if n < 2 || n > 2000 {
|
||||
if !(2..=2000).contains(&n) {
|
||||
return Ok(0);
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue