diff --git a/frontend/src/app/pages/Dashboard/canvas/DashboardEmptyState.tsx b/frontend/src/app/pages/Dashboard/canvas/DashboardEmptyState.tsx index 7f2fee9d..6ed7c5ba 100644 --- a/frontend/src/app/pages/Dashboard/canvas/DashboardEmptyState.tsx +++ b/frontend/src/app/pages/Dashboard/canvas/DashboardEmptyState.tsx @@ -2,7 +2,7 @@ import React from 'react'; import Box from '@mui/material/Box'; import Typography from '@mui/material/Typography'; import { motion, AnimatePresence } from 'framer-motion'; -import { Search, Hammer, PenLine, GraduationCap, ArrowLeft } from 'lucide-react'; +import { Search, Hammer, PenLine, GraduationCap, ArrowLeft, ArrowRight } from 'lucide-react'; import type { LucideIcon } from 'lucide-react'; import type { ClaudeTokens } from '@/shared/styles/claudeTokens'; import { useDashboardActive } from '@/shared/hooks/useDashboardActive'; @@ -73,6 +73,7 @@ const DashboardEmptyState: React.FC<{ const canRun = useAppSelector((s) => hasFreeTrialActive(s) || hasModelConnected(s)); const [launching, setLaunching] = React.useState(false); const [expanded, setExpanded] = React.useState(null); + const [intent, setIntent] = React.useState(''); const currentCategory = STARTER_CATEGORIES.find((cat) => cat.id === expanded); const currentPrompts = currentCategory?.prompts ?? []; @@ -96,6 +97,21 @@ const DashboardEmptyState: React.FC<{ onLaunch(prompt, mode, model); }; + // Personalized path: wrap the user's own words into a "be my team" brief so one + // agent immediately produces real, tailored artifacts (plain language, no questions + // back, so a non-dev sees value in seconds). One session = one free run. + const launchIntent = () => { + const v = intent.trim(); + if (!v || launching || !onLaunch) return; + setLaunching(true); + const brief = + `Here's what I'm working on: ${v}. ` + + `Be my AI team and just get going, no questions back. Look into it, then make me ` + + `2-3 concrete things I can use right now (a quick research brief, a first draft, a simple plan), ` + + `and finish with what you'd tackle next. Keep it practical and plain.`; + onLaunch(brief, mode, model); + }; + return ( + {/* Personalized path: their own words put a tailored team to work. The generic + chips below stay for when they're not sure what they want yet. */} + + ) => setIntent(e.target.value)} + onKeyDown={(e: React.KeyboardEvent) => { if (e.key === 'Enter') launchIntent(); }} + placeholder="Tell me what you're working on, I'll put a team on it" + disabled={launching} + sx={{ + flex: 1, minWidth: 0, + border: 'none', outline: 'none', background: 'transparent', + color: c.text.primary, fontSize: '0.98rem', fontFamily: 'inherit', + py: 0.9, + '&::placeholder': { color: c.text.ghost }, + }} + /> + + + + {expanded === null ? (