fix: trim gen2D slide content to prevent overflow beyond header/footer
Deploy Slides / build-and-deploy (push) Successful in 1m16s
Deploy Slides / build-and-deploy (push) Successful in 1m16s
- Reduce Item count per slide: pipeline 4→3, solution 4→2, highlights 6→4 - Remove tech-stack architecture layering Item (moved to tech-stack grid) - Simplify eino-graph: shorter Go code, 3 Items→2 - Simplify prompt-agent: smaller mermaid, shorter Item text - Simplify async-task: merge 3 Items→2, remove footer - Simplify data-model: merge 4 grid items→2 - Simplify architecture: reduce ASCII diagram from 38 to 20 lines - Simplify dedup-ws: remove JSON code block, shorter Items - Simplify deployment: smaller mermaid, shorter Items - Simplify problem: shorter Item text, remove bullet lists - Simplify style-system: fix typo, shorter Item text
This commit is contained in:
@@ -3,30 +3,9 @@
|
||||
两项关键的工程优化
|
||||
|
||||
<Item title="🔍 请求去重(Request Dedup)">
|
||||
|
||||
- **策略**:`hash(prompt + assetType + params)` 生成唯一键
|
||||
- **存储**:`sync.Map` 内存缓存,TTL 自动过期
|
||||
- **逻辑**:相同参数的并发请求自动合并,返回已有 `taskId`
|
||||
- **效果**:避免重复生成,节省 API 调用成本,提升用户体验
|
||||
|
||||
`hash(prompt + assetType + params)` 生成唯一键,`sync.Map` 内存缓存。相同参数并发请求自动合并,返回已有 `taskId`,节省 API 调用成本。
|
||||
</Item>
|
||||
|
||||
<Item title="📡 WebSocket 实时推送">
|
||||
|
||||
- 用户建立 `ws://host/api/v1/tasks/:taskId/ws` 连接
|
||||
- 管线各阶段执行时推送实时状态消息:
|
||||
|
||||
```json
|
||||
{
|
||||
"type": "progress",
|
||||
"stage": "asset_generator",
|
||||
"progress": 45,
|
||||
"message": "正在生成素材..."
|
||||
}
|
||||
```
|
||||
|
||||
- 质检重试时推送额外信息:重试次数、重试原因
|
||||
- 管线完成时推送最终结果:素材 URL、元数据
|
||||
- **兼容方案**:同时支持 HTTP 轮询(`GET /api/v1/tasks/:taskId`)
|
||||
|
||||
建立 `ws://host/api/v1/tasks/:taskId/ws` 连接,管线各阶段推送进度、质检重试信息、最终结果。同时兼容 HTTP 轮询方案。
|
||||
</Item>
|
||||
|
||||
Reference in New Issue
Block a user