Enhance simulation functionality and frontend components for improved user experience

- Updated the simulation API to include a new 'force' parameter, allowing users to restart simulations while cleaning up previous logs.
- Enhanced the simulation status detail retrieval to include all actions and platform-specific actions for better monitoring.
- Introduced a new SimulationRunView component to manage the simulation process, providing a clear interface for users to start and monitor simulations.
- Improved the Step3Simulation component with detailed logging and progress indicators, ensuring users receive real-time updates during the simulation.
- Added new API endpoints for retrieving simulation posts and actions, enhancing the overall functionality and user engagement.
This commit is contained in:
666ghj
2025-12-12 14:44:10 +08:00
parent aad01f0252
commit f8a58819fa
8 changed files with 2024 additions and 74 deletions

View File

@@ -155,14 +155,19 @@ const handleNextStep = (params = {}) => {
addLog('使用自动配置的模拟轮数')
}
// TODO: 调用 startSimulation API 并跳转到 Step 3
// 可以在这里调用 /api/simulation/start 接口
// const startParams = {
// simulation_id: currentSimulationId.value,
// ...(params.maxRounds && { max_rounds: params.maxRounds })
// }
// 构建路由参数
const routeParams = {
name: 'SimulationRun',
params: { simulationId: currentSimulationId.value }
}
alert(`Step 3: 开始模拟 - Coming soon...\n${params.maxRounds ? `轮数: ${params.maxRounds}` : '使用自动配置轮数'}`)
// 如果有自定义轮数,通过 query 参数传递
if (params.maxRounds) {
routeParams.query = { maxRounds: params.maxRounds }
}
// 跳转到 Step 3 页面
router.push(routeParams)
}
// --- Data Logic ---