You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
feat: Claude AI intelligence layer — real reasoning on every dashboard element
Architecture: Anthropic SDK (claude-sonnet-4-6) wired into the dashboard
as a server-side intelligence layer. Every piece of text the user sees
can be AI-interpreted — not templates, real Claude reasoning.
AI endpoints:
- POST /api/ai/interpret — explain proposals, positions, approval reasoning
- POST /api/ai/chat — real conversational AI with full portfolio context
- POST /api/ai/screenshot — Claude vision extracts holdings from broker screenshots
Briefing API upgraded:
- Headline generated by Claude (personalized to portfolio state + market)
- Proposal context generated by Claude (personalized risk/reward explanation)
- Graceful fallback to templates when Claude API is unavailable
Dashboard upgrades:
- Real AI chat panel (replaces fake keyword matcher)
"Why these stocks?" → Claude answers with your specific portfolio context
- Quick-question buttons that auto-send to Claude
- "Claude is thinking..." indicator
- "Powered by Claude" label for transparency
Cost: ~$0.01-0.03 per AI call (Sonnet). ~$0.10 per full page load.
Note: Current API key has hit workspace limit (resets Apr 1).
Fallback templates work seamlessly when Claude API is unavailable.
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
// Headline — real Claude AI generates the briefing
59
60
letheadline: string;
60
-
if(portfolio.positions.length>0&&pendingCount>0){
61
-
headline=`${greeting}. You have ${portfolio.positions.length} open position${portfolio.positions.length>1 ? "s" : ""} and ${pendingCount} new opportunit${pendingCount>1 ? "ies" : "y"} to review.`;
62
-
}elseif(pendingCount>0){
63
-
headline=`${greeting}. I found ${pendingCount} opportunit${pendingCount>1 ? "ies" : "y"} for you to review.`;
64
-
}elseif(portfolio.positions.length>0){
65
-
headline=`${greeting}. Your ${portfolio.positions.length} position${portfolio.positions.length>1 ? "s are" : " is"} open. No new opportunities today.`;
66
-
}else{
67
-
headline=`${greeting}. Markets are quiet. No actions taken, no new opportunities.`;
0 commit comments