Redundant checks and exception handling are removed to streamline code paths, making embedding normalization, user memory retrieval, and LLM response decoding more concise and maintainable while preserving error propagation at higher levels.
Skip detection and embedding-related methods are now asynchronous, allowing
non-blocking execution and better concurrency; embedding function wrappers
and initialization routines are updated to support async/await, and
shared skip detector caching is adapted accordingly. These changes are
necessary to ensure compatibility with async embedding functions, prevent
blocking the event loop, and improve scalability and responsiveness in
high-concurrency environments.
Adds an "Intermediate" status level between "Basic" and "Detailed" to provide
summaries and key details, updates all relevant mappings and usages to support
this new level, and adjusts default verbosity for status messages to improve
clarity and reduce noise for users who do not require full diagnostics.
Eliminate unused or redundant valve options such as max_message_chars,
relaxed_semantic_threshold_multiplier, and enable_llm_reranking to
streamline configuration, clarify that llm_reranking_trigger_multiplier
disables reranking when set to 0.0, and update documentation and code to
reflect these changes for improved maintainability and user clarity.
Allowing skip_category_margin to be set in Filter enables dynamic
adjustment of skip detection sensitivity, improving flexibility for
different deployment scenarios.
Eliminates the "Intermediate" status level for message verbosity, consolidating to "Basic" and "Detailed" for clarity and simplicity; updates all related mappings, enums, and status emission calls to reflect this streamlined approach, reducing confusion and improving maintainability.
Category descriptions are made more comprehensive and precise to improve classification accuracy, the skip margin is adjusted for better thresholding, and skip state caching is now performed before early returns to ensure consistent cache updates regardless of skip conditions. The user message extraction logic is also improved for robustness.
Introduce status_emit_level to control status message verbosity, allowing
users to select Basic, Intermediate, or Detailed output; refactor all
status emission calls to respect this setting, improving clarity and
customizability of system feedback for different user needs.
The SKIP_CATEGORY_MARGIN constant is raised from 0.10 to 0.15 to make skip
category classification more selective, reducing false positives by requiring
a higher margin above personal similarity.
Removes redundant try/except blocks and input validation in several
methods to simplify logic and improve readability. Moves error handling
to higher levels where appropriate. Adds a skip state cache to track
when memory operations should be skipped, improving efficiency by
avoiding repeated skip checks. Cleans up batch operation execution and
cache clearing to include the new skip state. These changes reduce
unnecessary code complexity and improve maintainability, while also
optimizing memory operation flow and cache management.
refactor(skip-detection): condense and generalize personal category descriptions for maintainability and easier updates
fix(constants): lower SKIP_CATEGORY_MARGIN from 0.20 to 0.10 to reduce false positives in skip classification
refactor(skip-detection): clarify logging for skip/allow decisions and threshold calculation for better traceability
refactor: use consistent double-quote style for operator and code-ending character lists
fix(filter): ensure embeddings are normalized before use in skip detector to improve classification accuracy
Non-personal category descriptions are now more comprehensive and organized by topic, improving the classifier's ability to detect impersonal content. Personal category descriptions are condensed into broader, clearer categories, making them easier to maintain and update. The SKIP_CATEGORY_MARGIN is reduced to make the skip detector less aggressive, addressing previous false positives. Logging is improved for easier debugging and understanding of skip decisions. Embedding normalization is enforced to ensure consistent similarity calculations.
2025-10-28 17:23:20 +03:00
3 changed files with 335 additions and 345 deletions
File diff suppressed because it is too large
Load Diff
Reference in New Issue
Block a user
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.