Commit Graph

21 Commits

Author SHA1 Message Date
MarkLo127 9c0a9819e6 Implement Plan A1: Fast Mode Analysis
Features:
- Add analysis_mode parameter (fast/deep) to AnalysisRequest
- Fast mode (15-25 min): Disables investment and risk debates (max_debate_rounds=0)
- Deep mode (60 min): Default mode with debates enabled
- Update backend TradingService to handle analysis_mode
- Add analysis_mode form field to frontend with dropdown selector
- Update TypeScript interfaces to include analysis_mode

Changes:
- backend/app/models/schemas.py: Add analysis_mode field to AnalysisRequest
- backend/app/services/trading_service.py: Handle analysis_mode in create_config()
- backend/app/api/routes.py: Pass analysis_mode parameter to run_analysis()
- frontend/components/analysis/AnalysisForm.tsx: Add analysis_mode dropdown (fast/deep)
- frontend/lib/types.ts: Add analysis_mode to AnalysisRequest interface

When users select "fast mode", the system will:
1. Skip investment debate (max_debate_rounds = 0)
2. Skip risk debate (max_risk_discuss_rounds = 0)
3. Reduce analysis time from ~60 minutes to ~15-25 minutes
4. Still run all analyst reports with proper 500-1000 word counts
5. Provide initial decision without debate refinement

Co-Authored-By: Claude Haiku 4.5 <noreply@anthropic.com>
2026-03-12 21:33:23 +08:00
MarkLo127 92c2a84b83 2026-03-10 17:00:32 +08:00
MarkLo 16e513a921 新增英文語系支援 2025-12-24 01:20:33 +08:00
MarkLo c4fc8904eb 2025-12-20 07:41:05 +08:00
MarkLo 803885305a 2025-12-16 19:03:58 +08:00
MarkLo cf4aaa09b1 feat: auto-save reports + fix PDF download from history
1. Auto-save reports when page closes:
   - Added beforeunload handler to auto-save analysis to history
   - Saves to local IndexedDB and cloud (if authenticated)
   - Prevents data loss if user accidentally closes the page

2. Fix PDF download from history page:
   - Made taskId optional in DownloadReports component
   - Added direct mode: can pass reports data directly
   - Updated backend to support both task-based and direct-data modes
   - History reports now have download PDF option available
2025-12-14 03:21:59 +08:00
MarkLo da7d05ecc9 2025-12-12 05:30:04 +08:00
MarkLo 482d8fa6aa 2025-12-11 15:00:30 +08:00
MarkLo a51b31dc21 2025-12-11 00:37:19 +08:00
MarkLo 63ac0668ac 2025-11-25 02:13:52 +08:00
MarkLo 02b83a6ddd 2025-11-23 07:31:00 +08:00
MarkLo 91ad37412b 2025-11-23 03:14:49 +08:00
MarkLo d42c22c5ce 2025-11-21 23:28:52 +08:00
MarkLo 2a188004c1 2025-11-21 13:30:13 +08:00
MarkLo d3ab03ccd9 2025-11-21 13:16:04 +08:00
MarkLo 7300ae8b50 2025-11-21 03:43:42 +08:00
MarkLo 44fd92850d 2025-11-20 23:19:22 +08:00
MarkLo 03dde27de1 2025-11-20 22:56:35 +08:00
MarkLo 0fd7df06dd 2025-11-20 22:46:48 +08:00
MarkLo 0a203fa475 2025-11-20 22:36:58 +08:00
MarkLo 2872f18b47 2025-11-20 21:56:47 +08:00