feat:测试bug修改
This commit is contained in:
@@ -551,10 +551,10 @@ def handle_generate_base_plan_ws(data):
|
||||
MultiAgentTaskCRUD.update_generation_id(db, task_id, generation_id)
|
||||
MultiAgentTaskCRUD.update_status(db, task_id, TaskStatus.GENERATING)
|
||||
else:
|
||||
# 创建新任务
|
||||
MultiAgentTaskCRUD.create(
|
||||
# 创建新任务(如果 task_id 为 None,会自动生成新的)
|
||||
created_task = MultiAgentTaskCRUD.create(
|
||||
db=db,
|
||||
task_id=task_id, # 使用已有的 task_id,不生成新的
|
||||
task_id=task_id, # 如果为 None 则自动生成新的
|
||||
user_id=user_id,
|
||||
query=incoming_data.get("General Goal", ""),
|
||||
agents_info=AgentBoard or [],
|
||||
@@ -563,6 +563,8 @@ def handle_generate_base_plan_ws(data):
|
||||
agent_scores=None,
|
||||
result=None,
|
||||
)
|
||||
# 使用实际创建的任务 ID(可能是新生成的)
|
||||
task_id = created_task.task_id
|
||||
MultiAgentTaskCRUD.update_generation_id(db, task_id, generation_id)
|
||||
MultiAgentTaskCRUD.update_status(db, task_id, TaskStatus.GENERATING)
|
||||
|
||||
|
||||
@@ -242,8 +242,9 @@ async function handleSearch() {
|
||||
// 可能是WebSocket旧格式或REST API格式
|
||||
outlineData = response.data
|
||||
currentGenerationId.value = response.generation_id || ''
|
||||
currentTaskID.value = ''
|
||||
console.log('📋 直接格式: generation_id:', currentGenerationId.value)
|
||||
// 从 response.data 中获取 task_id(REST API 格式)
|
||||
currentTaskID.value = response.data?.task_id || response.task_id || ''
|
||||
console.log('📋 直接格式: generation_id:', currentGenerationId.value, 'TaskID:', currentTaskID.value)
|
||||
} else {
|
||||
outlineData = response
|
||||
currentGenerationId.value = ''
|
||||
|
||||
Reference in New Issue
Block a user