Enhance connection handling and add lunar date compatibility

- Updated `ConnectionHandler` to include a flag for managing connection closure after chat.
- Introduced a backward-compatible alias for retrieving the current lunar date, ensuring compatibility with existing functionality.
This commit is contained in:
lapy 2026-06-13 14:27:38 +01:00
parent 8b5835820c
commit cc3f4f53f6
2 changed files with 7 additions and 1 deletions

View file

@ -171,8 +171,9 @@ class ConnectionHandler:
self.cmd_exit = self.config["exit_commands"]
# 是否在聊天结束后关闭连接
# Close the connection after chat when requested.
self.close_after_chat = False
self.is_exiting = False
self.load_function_plugin = False
self.intent_type = "nointent"

View file

@ -49,6 +49,11 @@ def get_current_date_formatted() -> str:
return "Failed to get date"
def get_current_lunar_date() -> str:
"""Backward-compatible alias; western builds use formatted Gregorian date."""
return get_current_date_formatted()
def get_current_time_info() -> tuple:
"""
Get current time information