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
// Task descriptions are Tiptap HTML, so an "empty" one is "" or "<p></p>"
const EXCERPT_MAX_LENGTH = 200;
export function toPlainText(html?: string | null): string {
if (!html) return "";
return html
.replace(/<[^>]+>/g, " ")
.replace(/ /g, " ")
.replace(/</g, "<")
.replace(/>/g, ">")
.replace(/"/g, '"')
.replace(/'/g, "'")
.replace(/&/g, "&")
.replace(/\s+/g, " ")
.trim();
}
export function hasDescription(html?: string | null): boolean {
return toPlainText(html).length > 0;
}
export function getDescriptionExcerpt(html?: string | null): string {
const text = toPlainText(html);
if (text.length <= EXCERPT_MAX_LENGTH) return text;
return `${text.slice(0, EXCERPT_MAX_LENGTH).trimEnd()}…`;
}