Dev to main#8
Merged
Merged
Conversation
…ents - Simplified error messages in agent and session service creation functions for clarity. - Enhanced session management by replacing string error checks with specific error type checks. - Introduced validation methods for PII categories, safety levels, task statuses, and knowledge categories to ensure consistency. - Updated channel handling in the application to utilize type-safe constants for better maintainability. - Refactored token estimation logic to delegate to a centralized method for improved accuracy and readability. - Removed deprecated token estimation code to streamline the memory management module.
- Updated `session.Message.Role` to use `types.MessageRole` for improved type safety across the application. - Refactored `parseDeliveryTarget` to return `types.ChannelType`, eliminating string casts in channel handling. - Changed confidence fields in various structures to `types.Confidence`, enhancing consistency in confidence level management. - Modified `KnowledgeEntry.Category` to utilize `knowledge.KnowledgeCategory`, ensuring a single source of truth for knowledge categories. - Ensured all changes maintain backward compatibility and do not require database migrations.
- Changed the `ByCategory` field in `LearningStats` from `map[string]int` to `map[entlearning.Category]int` for improved type safety. - Updated the `GetLearningStats` method to populate the `ByCategory` map using the `Category` field directly, eliminating string casting. - Modified the test for learning statistics to reflect the new enum type usage, ensuring consistency and correctness in category handling. - Added documentation to specify the requirement for using enum types in the `ByCategory` field.
…error Feature/refactoring const enum error
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
#7 merge