Job description summarizer#100
Conversation
👷 Deploy request for career-zen pending review.Visit the deploys page to approve it
|
|
@paratha14 is attempting to deploy a commit to the Aniruddha Adak's projects Team on Vercel. A member of the Team first needs to authorize it. |
There was a problem hiding this comment.
Pull request overview
Adds a JD Summarizer feature that uses Gemini to extract 5 key requirements from a pasted job description and shows them in an animated, dismissible UI panel on the home page.
Changes:
- Added
summarizeJobDescription()in the Gemini helper to prompt for 5 core requirements and parse JSON output. - Added a new server action
summarizeJD()to call the Gemini summarizer and return a success/error union. - Updated
page.tsxwith a “Summarize” button, loading state, and animated summary panel with dismiss control.
Reviewed changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated 4 comments.
| File | Description |
|---|---|
src/lib/gemini.ts |
Adds Gemini-based JD summarization + JSON parsing for requirements output. |
src/app/actions/summarize.ts |
New server action wrapper for JD summarization results/errors. |
src/app/page.tsx |
UI wiring: summarize trigger, loading state, animated requirements panel + dismiss. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| <button | ||
| type="button" | ||
| onClick={() => setJdSummary(null)} | ||
| className="text-slate-500 hover:text-slate-300 transition-colors" |
| export async function summarizeJD(jobDescription: string): Promise< | ||
| { success: true; data: string[] } | { success: false; error: string } | ||
| > { | ||
| if (!jobDescription || jobDescription.trim().length < 50) { | ||
| return { success: false, error: "Job description is too short to summarize." }; | ||
| } | ||
|
|
||
| try { | ||
| const requirements = await summarizeJobDescription(jobDescription); | ||
| return { success: true, data: requirements }; |
| const response = await generateContentWithRetry(ai, { | ||
| model: "gemini-3-flash-preview", | ||
| contents: prompt, | ||
| }); | ||
|
|
||
| const text = (response.text ?? "").replace(/```json/g, "").replace(/```/g, "").trim(); | ||
| const parsed = JSON.parse(text) as { requirements: string[] }; | ||
| return parsed.requirements; |
| const res = await summarizeJD(jobDescription); | ||
| setIsSummarizing(false); | ||
| if (res.success) { | ||
| setJdSummary(res.data); | ||
| } else { | ||
| showToast(res.error, 'error'); |
Hey @paratha14, this is a wonderful solution. Thank you so much for your amazing contributions. |



Description/Context
Added a JD Summarizer feature that extracts the 5 most important requirements from any job description using AI, displaying them as clean bullet points in an animated panel — giving users instant clarity without replacing the full JD used for analysis.
Files changed:
gemini.ts— AddedsummarizeJD()function to extract key requirements via Geminisummarize.ts(new) — Server action that callssummarizeJD()and returns results to the clientpage.tsx— Added Summarize button, animated summary panel, dismiss functionality, and related state/handlerType of Change
Visuals (if applicable)
Checklist before requesting a review
npm run lint.