feat: 优化飞书集成、知识库、Agent、工单管理及AI建议功能,统一前端对话字体样式并移除工单模板文件。

This commit is contained in:
zhaojie
2026-02-11 22:53:08 +08:00
parent f8f3738134
commit d0dd18342f
31 changed files with 1384 additions and 211 deletions

View File

@@ -49,8 +49,7 @@ def trigger_sample_action():
"""触发示例动作"""
try:
from src.web.service_manager import service_manager
import asyncio
result = asyncio.run(service_manager.get_agent_assistant().trigger_sample_actions())
result = service_manager.get_agent_assistant().trigger_sample_actions_sync()
return jsonify(result)
except Exception as e:
return jsonify({"error": str(e)}), 500
@@ -163,13 +162,12 @@ def agent_chat():
agent_assistant = service_manager.get_agent_assistant()
# 模拟Agent处理实际应该调用真正的Agent处理逻辑
import asyncio
result = asyncio.run(agent_assistant.process_message_agent(
result = agent_assistant.process_message_agent_sync(
message=message,
user_id=context.get('user_id', 'admin'),
work_order_id=None,
enable_proactive=True
))
)
return jsonify({
"success": True,
@@ -215,8 +213,7 @@ def execute_agent_tool():
if not tool_name:
return jsonify({"error": "缺少工具名称tool"}), 400
import asyncio
result = asyncio.run(service_manager.get_agent_assistant().agent_core.tool_manager.execute_tool(tool_name, parameters))
result = service_manager.get_agent_assistant().agent_core.tool_manager.execute_tool_sync(tool_name, parameters)
return jsonify(result)
except Exception as e:
return jsonify({"error": str(e)}), 500