Skip to content

Dev to main#8

Merged
langowarny merged 4 commits into
mainfrom
dev
Feb 21, 2026
Merged

Dev to main#8
langowarny merged 4 commits into
mainfrom
dev

Conversation

@langowarny

Copy link
Copy Markdown
Collaborator

#7 merge

…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
@langowarny langowarny self-assigned this Feb 21, 2026
@langowarny langowarny added the enhancement New feature or request label Feb 21, 2026
@langowarny langowarny merged commit 6fe57b2 into main Feb 21, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant