CodeReview/backend/app/api
lintsinghua 147dfbaf5e feat(agent): enhance streaming with in-memory event manager and fallback polling
- Implement dual-mode streaming: prioritize in-memory EventManager for running tasks with thinking_token support
- Add fallback to database polling for completed tasks without thinking_token replay capability
- Introduce SSE event formatter utility for consistent event serialization across streaming modes
- Add 10ms micro-delay for thinking_token events to ensure proper TCP packet separation and frontend incremental rendering
- Refactor stream_agent_with_thinking endpoint to support both runtime and historical event streaming
- Update event filtering logic to handle both in-memory and database event sources
- Improve logging with debug markers for thinking_token tracking and stream mode selection
- Optimize polling intervals: 0.3s for running tasks, 2.0s for completed tasks
- Reduce idle timeout from 10 minutes to 1 minute for completed task streams
- Update frontend useAgentStream hook to handle unified event format from dual-mode streaming
- Enhance AgentAudit UI to properly display streamed events from both sources
2025-12-12 10:39:32 +08:00
..
v1 feat(agent): enhance streaming with in-memory event manager and fallback polling 2025-12-12 10:39:32 +08:00
__init__.py refactor: 重构项目结构,将前端和后端代码分离到独立目录 2025-11-26 21:11:12 +08:00
deps.py refactor: 重构项目结构,将前端和后端代码分离到独立目录 2025-11-26 21:11:12 +08:00