jupyter-ai
jupyter-ai copied to clipboard
Improve type safety for persona loading error tracking
trafficstars
In PR #1397, we introduced error tracking for persona loading failures using untyped dictionaries. This reduces type safety compared to the previous typed implementation. We should replace the dictionary approach with a proper dataclass to improve type safety and IDE support.
Additional improvements:
- Add ClassVar annotation to _ep_persona_classes since it's shared across instances
- Remove unused line 202: item.get("module") which fetches but doesn't use the value