[全量] 初始化项目代码、配置、文档及Agent协同harness

This commit is contained in:
2026-04-02 11:36:05 +08:00
parent 0553309cdf
commit 87e571d9ec
1133 changed files with 221948 additions and 0 deletions

View File

@@ -0,0 +1,16 @@
from server.db.session import with_session
import uuid
from server.db.models.conversation_model import ConversationModel
@with_session
def add_conversation_to_db(session, chat_type, name="", conversation_id=None):
"""
新增聊天记录
"""
if not conversation_id:
conversation_id = uuid.uuid4().hex
c = ConversationModel(id=conversation_id, chat_type=chat_type, name=name)
session.add(c)
return c.id