Commit Graph
3 Commits
Author SHA1 Message Date
xiaoli-cli-bot 0d27f2b774 feat: add /manual command + fix cross-engine command routing
- /manual → switch to manual engine (CLI + TUI)
- /manual status → run manual engine sub-commands
- /manual restart → restart manual terminal
- /engine.manual status → now works from any engine (not just manual)
- Fixed handle_engine_command to route to correct engine by name
2026-04-29 20:04:40 +08:00
shuiyu1123 f142e3bae8 删除文件 scheduler_tasks.json 2026-04-29 10:26:01 +00:00
shuiyu1123 6de5c6f202 feat: Function Calling 兼容
新增 xcli_core/fc_tools.py:
- MCP 定义 → OpenAI FC 格式转换
- FC 响应解析 (tool_calls 提取)
- 自动收集所有插件 FC 定义
- 400 错误自动降级为普通模式

引擎层改动 (openai_engine + ollama_engine):
- generate_response 新增 tools 参数
- 请求体自动注入 tools/tool_choice
- 响应检测 tool_calls 并返回 FC 标记
- 对话历史支持 tool 角色消息和 assistant.tool_calls
- _build_messages_with_history 兼容 FC 消息格式

cli_core.py 集成:
- _handle_fc_response: FC 响应 → 工具执行 → 结果回传
- _execute_tool_by_name: FC 调用路径的安全检查+工具分发
- process_conversation 循环自动处理 FC 工具调用
- TUI/CLI 双模式 FC 支持
2026-04-27 00:29:34 +08:00