Refactor configuration and enhance AI capabilities

Updated .env.example to improve clarity and added new configuration options for memory and reliability settings. Refactored main.py to streamline the bot's entry point and improved error handling. Enhanced README to reflect new features and command structure. Removed deprecated cmd_zip_skill and skills_creator modules to clean up the codebase. Updated AIClient and MemorySystem for better performance and flexibility in handling user interactions.
This commit is contained in:
Mimikko-zeus
2026-03-03 21:56:33 +08:00
parent 726d41ad79
commit a754e7843f
72 changed files with 1607 additions and 5015 deletions

View File

@@ -10,16 +10,14 @@ from src.handlers.message_handler_ai import MessageHandler
def _handler() -> MessageHandler:
fake_bot = SimpleNamespace(robot=SimpleNamespace(id="test_bot"))
fake_bot = SimpleNamespace(robot=SimpleNamespace(id="test_bot", name="TestBot"))
return MessageHandler(fake_bot)
def test_plain_text_removes_markdown_link_url():
handler = _handler()
text = "参考 [Wikipedia](https://en.wikipedia.org/wiki/Wikipedia) 获取详情。"
result = handler._plain_text(text)
assert "Wikipedia" in result
assert "http" not in result.lower()
@@ -27,9 +25,7 @@ def test_plain_text_removes_markdown_link_url():
def test_plain_text_removes_bare_url():
handler = _handler()
text = "访问 https://example.com/path?a=1 或 www.example.org 查看。"
result = handler._plain_text(text)
assert "http" not in result.lower()
assert "www." not in result.lower()
assert "[链接已省略]" in result