Job application tracker and AI-powered job search assistant. Helps job seekers manage their search journey with AI resume review, job matching, task logging, and application analytics, all while keeping your data private.
TypeScript ai-agentai-resume-analyzerapplication-trackerapplication-tracking-systematscareerjob-applicationjob-automationjob-huntingjob-searchjob-seeker-toolsjob-trackerjob-trackingjobsearchjobseekersmcpollamaresumeresume-reviewself-hosted
replace n/a with empty string in convertResume func
Khuram Niaz49d78d4efc5f
diff --git a/package-lock.json b/package-lock.jsonindex 804730f..5bb5b72 100644--- a/package-lock.json+++ b/package-lock.json@@ -1,12 +1,12 @@{"name": "jobsync",- "version": "0.1.0",+ "version": "0.2.0","lockfileVersion": 3,"requires": true,"packages": {"": {"name": "jobsync",- "version": "0.1.0",+ "version": "0.2.0","dependencies": {"@ai-sdk/deepseek": "^2.0.4","@ai-sdk/openai": "^3.0.2",diff --git a/src/utils/ai.utils.ts b/src/utils/ai.utils.tsindex c102350..40c1bb4 100644--- a/src/utils/ai.utils.ts+++ b/src/utils/ai.utils.ts@@ -10,7 +10,7 @@ import {import { AiProvider } from "@/models/ai.model";const removeHtmlTags = (description: string | undefined): string => {- if (!description) return "N/A";+ if (!description) return "";return (description@@ -20,8 +20,9 @@ const removeHtmlTags = (description: string | undefined): string => {.replace(/<\/(li|p|div|br)[^>]*>/gi, "\n").replace(/<br\s*\/?>/gi, "\n")// Remove all remaining HTML tags- .replace(/<[^>]+>/g, "")+ .replace(/<[^>]+>/g, " ")// Clean up excessive whitespace while preserving structure+ .replace(/\s+/g, " ").replace(/\n\s*\n/g, "\n").trim());@@ -135,27 +136,30 @@ export const convertResumeToText = (resume: Resume): Promise<string> => {return new Promise((resolve) => {const formatContactInfo = (contactInfo?: ContactInfo) => {if (!contactInfo) return "";- return `- Name: ${contactInfo.firstName} ${contactInfo.lastName}- Headline: ${contactInfo.headline}- Email: ${contactInfo.email || "N/A"}- Phone: ${contactInfo.phone || "N/A"}- Address: ${contactInfo.address || "N/A"}- `;+ const parts = [+ `Name: ${contactInfo.firstName} ${contactInfo.lastName}`,+ contactInfo.headline ? `Headline: ${contactInfo.headline}` : "",+ contactInfo.email ? `Email: ${contactInfo.email}` : "",+ contactInfo.phone ? `Phone: ${contactInfo.phone}` : "",+ contactInfo.address ? `Address: ${contactInfo.address}` : "",+ ].filter(Boolean);+ return parts.join("\n");};const formatWorkExperiences = (workExperiences?: WorkExperience[]) => {if (!workExperiences || workExperiences.length === 0) return "";return workExperiences- .map(- (experience) => `- Company: ${experience.Company.label}- Job Title: ${experience.jobTitle.label}- Location: ${experience.location.label}- Description: ${removeHtmlTags(experience.description)}- `- )- .join("\n");+ .map((experience) => {+ const desc = removeHtmlTags(experience.description);+ const parts = [+ `Company: ${experience.Company.label}`,+ `Job Title: ${experience.jobTitle.label}`,+ `Location: ${experience.location.label}`,+ desc ? `Description: ${desc}` : "",+ ].filter(Boolean);+ return parts.join("\n");+ })+ .join("\n\n");};// Start Date: ${experience.startDate.toLocaleDateString().split("T")[0]}// End Date: ${@@ -166,25 +170,19 @@ export const convertResumeToText = (resume: Resume): Promise<string> => {const formatEducation = (educations?: Education[]) => {if (!educations || educations.length === 0) return "";- return (- educations- .map(- (education) => `- Institution: ${education.institution}- Degree: ${education.degree}- Field of Study: ${education.fieldOfStudy}- Location: ${education.location.label}- Description: ${removeHtmlTags(education.description)}- `- )- // Start Date: ${education.startDate.toLocaleDateString().split("T")[0]}- // End Date: ${- // education.endDate- // ? education.endDate.toLocaleDateString().split("T")[0]- // : "N/A"- // }- .join("\n")- );+ return educations+ .map((education) => {+ const desc = removeHtmlTags(education.description);+ const parts = [+ `Institution: ${education.institution}`,+ `Degree: ${education.degree}`,+ `Field of Study: ${education.fieldOfStudy}`,+ `Location: ${education.location.label}`,+ desc ? `Description: ${desc}` : "",+ ].filter(Boolean);+ return parts.join("\n");+ })+ .join("\n\n");};const formatResumeSections = (sections?: ResumeSection[]) => {