CodeReview/backend/app/api/v1/endpoints
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
..
__init__.py refactor: 重构项目结构,将前端和后端代码分离到独立目录 2025-11-26 21:11:12 +08:00
agent_tasks.py feat(agent): enhance streaming with in-memory event manager and fallback polling 2025-12-12 10:39:32 +08:00
auth.py refactor: 重构项目结构,将前端和后端代码分离到独立目录 2025-11-26 21:11:12 +08:00
config.py feat: 添加敏感信息加密存储功能 2025-11-28 17:51:17 +08:00
database.py fix: 修复时间显示问题,使用带时区的UTC时间 2025-12-09 17:47:34 +08:00
embedding_config.py feat(agent): implement Agent audit module with LangGraph integration 2025-12-11 19:09:10 +08:00
members.py feat(agent): implement streaming support for agent events and enhance UI components 2025-12-11 20:33:46 +08:00
projects.py feat(file-selection): add custom exclude patterns for file filtering 2025-12-10 18:46:33 +08:00
prompts.py feat(prompts-scan): integrate prompt templates and audit rules into scan and analysis workflows 2025-12-09 23:03:08 +08:00
rules.py fix(rules): fix unicode encoding error in rule set export filename 2025-12-10 17:43:56 +08:00
scan.py feat(file-selection): add custom exclude patterns for file filtering 2025-12-10 18:46:33 +08:00
tasks.py fix: 修复时间显示问题,使用带时区的UTC时间 2025-12-09 17:47:34 +08:00
users.py feat(agent): implement streaming support for agent events and enhance UI components 2025-12-11 20:33:46 +08:00