darrenburns / elia

A snappy, keyboard-centric terminal user interface for interacting with large language models. Chat with ChatGPT, Claude, Llama 3, Phi 3, Mistral, Gemma and more.
Apache License 2.0
1.88k stars 116 forks source link

Fix datetime timezone reference and improve asynchronous handling #44

Closed CharlesCNorton closed 2 months ago

CharlesCNorton commented 6 months ago

Summary: This pull request addresses a few minor issues and improvements in the Elia class implementation for the chat application.

Changes:

  1. Fixed datetime timezone reference:

    • Corrected datetime.UTC to datetime.timezone.utc to ensure the proper timezone is used for timestamps.
  2. Improved asynchronous handling:

    • Added await to push_screen and pop_screen methods to maintain asynchronous behavior and ensure that screens are handled correctly within the app's lifecycle.
  3. Code clarity and formatting:

    • Made minor formatting adjustments and improved comments for better readability and maintainability.

Impact:

Please review the changes and provide feedback. Thank you!

darrenburns commented 2 months ago

thanks!