新增AI会话系统

This commit is contained in:
2025-10-29 23:56:57 +08:00
parent a893e54166
commit b247c57bbe
7 changed files with 761 additions and 0 deletions

View File

@@ -64,6 +64,10 @@ class CommandParser:
'.赠送': 'gift',
'.送': 'gift',
# AI对话系统
'.ai': 'ai_chat',
'.aiconfig': 'ai_chat',
# 帮助
'.help': 'help',
'.帮助': 'help',
@@ -100,6 +104,12 @@ class CommandParser:
# 返回游戏类型和完整指令
return game_type, content
# 特殊处理:.ai 和 .aiconfig 指令支持参数
if content.startswith('.ai '):
return 'ai_chat', content
if content.startswith('.aiconfig '):
return 'ai_chat', content
# 没有匹配的指令
logger.debug(f"未识别的指令: {content}")
return None