jupyter-ai icon indicating copy to clipboard operation
jupyter-ai copied to clipboard

Improve type safety for persona loading error tracking

Open dlqqq opened this issue 4 months ago • 0 comments
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

dlqqq avatar Jun 28 '25 00:06 dlqqq