feat(frontend): add streaming progress bar for schedule creation#276
Merged
Conversation
- Add github.com/hrygo/hotplex dependency - Replace ai/agents/runner with hotplex.Engine wrapper - Define CCRunner as wrapper around hotplex.Engine - Preserve DivineSense-specific types (Config, SessionStatsData, etc.) - Maintain backward compatibility with existing APIs - Remove ~1500 lines of internal runner code - Delete obsolete test scripts Closes #274
…unnerConfig - Add StopSessionByConversationID method for convenience - Remove unused AllowedPaths and ForbiddenPaths from CCRunnerConfig - Add documentation comments for CCRunnerConfig
- Add PhaseProgress.tsx component with 4-stage progress indicator - Add phaseConfig.ts with phase definitions and helper functions - Enhance StreamingFeedback.tsx to show real-time progress - Add i18n translations for phase labels (en/zh-Hans) Implements: #269
Owner
Author
Code reviewFound 1 issue:
divinesense/web/src/components/ScheduleQuickInput/phaseConfig.ts Lines 54 to 57 in 8e960b2 The PR adds these keys: Fix: Add to both locale files:
🤖 Generated with Claude Code - If this code review was useful, please react with 👍. Otherwise, react with 👎. |
Backend sends plain text for thinking/answer events, not JSON. parseEvent now handles both formats gracefully. Refs #269
SCHEDULE agent is used for quick schedule creation via ScheduleQuickInput, which doesn't need conversation title generation. Refs #269
- Revert incorrect backend agentType check - Pass isTempConversation=true to skip conversation/block creation - This properly fixes the issue at the root cause Refs #269
Check IsTempConversation flag in handleConversationStart to avoid creating unnecessary conversations for temporary chat sessions. Refs #269
- Check tool_name in tool_use events to correctly identify phases - schedule_add → create phase - schedule_query/find_free_time → check phase Refs #269
When user-specified time is occupied, LLM should call find_free_time to find available slots instead of asking user via text. Refs #269
FindAllFreeSlots now skips time slots that are in the past when the date is today. This prevents returning unavailable slots. Refs #269
Add additional filtering to remove any slots that start before now, ensuring strict no time travel policy. Refs #269
Add concrete example showing: query conflict -> find_free_time -> schedule_add to ensure LLM understands the auto-creation workflow. Refs #269
- Add phase labels under each node for clarity - Enlarge nodes (w-10 h-10) for better visibility - Add status description with event details - Add completed i18n key - Improve visual feedback with icons and colors Refs #269
Previously iterated backwards which returned phase 0 if last event was answer. Now iterates forward to find the last valid phase. Refs #269
Event data is JSON format, not plain text. Parse JSON to get tool_name. Refs #269
- Remove duplicate PhaseProgress component definition - Extract magic numbers to constants (MAX_PHASE, PREVIEW_MAX_LENGTH) - Add extractToolName helper for parsing tool names - Simplify string truncation logic Refs #269
Owner
Author
Code reviewNo issues found. Checked for bugs and CLAUDE.md compliance. 🤖 Generated with Claude Code - If this code review was useful, please react with 👍. Otherwise, react with 👎. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
为日程创建流程添加 4 阶段流式进度条,实时展示 AI 处理进度(理解意图 → 解析时间 → 检查冲突 → 创建日程)
Resolves #269
Changes
前端 (StreamingFeedback)
PhaseProgress.tsx:4 阶段进度条组件(带标签、动画、状态图标)phaseConfig.ts:阶段配置和辅助函数StreamingFeedback.tsx:集成进度条和状态文字显示schedule.phase.*和schedule.ai.*后端修复
isTempConversation处理:前端传递isTempConversation=true,后端正确跳过会话创建handleConversationStart:检查IsTempConversation跳过临时会话find_free_time:严格过滤过去时间段(时光不回溯)Agent Prompt 优化
Test plan