Added date guard for career coach.

This commit is contained in:
Josh 2025-06-18 11:36:39 +00:00
parent 3f9ecfd74c
commit 47819493cc

View File

@ -60,6 +60,26 @@ NO extra commentary. The JSON will be stored as milestones.`.trim(),
Return **ONLY** valid JSON in the **same structure** (title, date, description, impacts[{}], tasks[{}]) for a Job-Search roadmap. TODAY = ${isoToday}
**Every milestone.date must be >= TODAY** NO extra text.`.trim(),
aiGrowth: ({ role, skills, goals }) => `
You are my personal career coach.
Goal Help me **grow with AI** in the role of ${role}.
Context
Current skills: ${skills || "N/A"}
Career goals : ${goals || "N/A"}
INSTRUCTIONS
1. List the top 23 tasks in this role already touched by AI.
2. For each task:
How to *collaborate* with AI tools (save time / raise quality)
One upskilling step that boosts the users uniquely-human edge
3. Surface any adjacent, AI-created roles that fit the user.
4. End with a 90-day action plan (bullets, with dates).
Tone: supportive, opportunity-focused.
Length 400 words.
`.trim(),
interview: `
You are an expert interview coach.
Ask one behavioural or technical question, wait for the user's reply,
@ -233,6 +253,25 @@ I'm here to support you with personalized coaching. What would you like to focus
return;
}
/* ---------- NEW: AI-growth quick action ---------- */
if (type === "aiGrowth") {
const note = {
role : "assistant",
content: "Sure! Lets map out how you can *partner* with AI in this career…"
};
const hiddenSystem = {
role : "system",
content: QUICK_PROMPTS.aiGrowth({
role : scenarioRow?.career_name || "your role",
goals : scenarioRow?.career_goals || ""
})
};
const updated = [...messages, note, hiddenSystem];
setMessages([...messages, note]);
callAi(updated);
return;
}
/* networking / jobSearch unchanged */
const note = {
role: "assistant",
@ -275,6 +314,13 @@ I'm here to support you with personalized coaching. What would you like to focus
>
Interview Help
</button>
<button
onClick={() => triggerQuickAction("aiGrowth")}
disabled={loading}
className="bg-teal-600 hover:bg-teal-700 text-white px-3 py-1 rounded"
>
AI Growth Plan
</button>
{/* pushes Edit Goals to the far right */}
<div className="flex-grow"></div>