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
Address generateObject deprecation
Khuram Niaz94a143e97925
diff --git a/src/components/profile/AiResumeReviewSection.tsx b/src/components/profile/AiResumeReviewSection.tsxindex 1f5bc1e..38b3d49 100644--- a/src/components/profile/AiResumeReviewSection.tsx+++ b/src/components/profile/AiResumeReviewSection.tsx@@ -194,7 +194,7 @@ const AiResumeReviewSection = ({ resume }: AiSectionProps) => {</TooltipTrigger><TooltipContent className="max-w-xs"><p className="font-semibold mb-1">- Phase 2: Consolidated Multi-Agent System+ Consolidated Multi-Agent System</p><p className="text-xs mb-2">Uses 2 specialized AI agents working together:@@ -204,7 +204,7 @@ const AiResumeReviewSection = ({ resume }: AiSectionProps) => {<li>• Feedback Agent (actionable recommendations)</li></ul><p className="text-xs mt-2 text-green-500">- ✨ 40-50% faster, same accuracy+ ✨ Slower but refined response</p></TooltipContent></Tooltip>diff --git a/src/lib/ai/multi-agent/shared/agent-executor.ts b/src/lib/ai/multi-agent/shared/agent-executor.tsindex 0513698..5e84ef3 100644--- a/src/lib/ai/multi-agent/shared/agent-executor.ts+++ b/src/lib/ai/multi-agent/shared/agent-executor.ts@@ -7,7 +7,7 @@* - Ollama result normalization*/-import { generateObject } from "ai";+import { generateText, Output } from "ai";import {AnalysisResult,FeedbackResult,@@ -33,14 +33,14 @@ export async function executeAgents(const [rawAnalysis, rawFeedback] = await Promise.all([withTimeout(runWithRetry(async () => {- const { object } = await generateObject({+ const { output } = await generateText({model,- schema: analysis.schema,+ output: Output.object({ schema: analysis.schema }),system: analysis.systemPrompt,prompt: analysis.prompt,temperature: analysis.temperature,});- return object;+ return output;}, "Analysis Agent"),AGENT_TIMEOUT_MS,"Analysis Agent"@@ -48,14 +48,14 @@ export async function executeAgents(withTimeout(runWithRetry(async () => {- const { object } = await generateObject({+ const { output } = await generateText({model,- schema: feedback.schema,+ output: Output.object({ schema: feedback.schema }),system: feedback.systemPrompt,prompt: feedback.prompt,temperature: feedback.temperature,});- return object;+ return output;}, "Feedback Agent"),AGENT_TIMEOUT_MS,"Feedback Agent"diff --git a/src/lib/ai/tools/semantic-extraction.ts b/src/lib/ai/tools/semantic-extraction.tsindex 8850343..4658ce8 100644--- a/src/lib/ai/tools/semantic-extraction.ts+++ b/src/lib/ai/tools/semantic-extraction.ts@@ -4,7 +4,7 @@* Provider-aware prompts for Ollama vs Cloud optimization*/-import { generateObject } from "ai";+import { generateText, Output } from "ai";import { getModel, ProviderType } from "../providers";import {SemanticKeywordSchema,@@ -55,27 +55,27 @@ export async function extractSemanticKeywords(contextHint?: string): Promise<SemanticKeywordExtraction> {const model = getModel(provider, modelName);- const schema = isOllamaProvider(provider)- ? OllamaSemanticKeywordSchema- : SemanticKeywordSchema;const prompt = getKeywordPrompt(provider, text, contextHint);try {- const { object } = await generateObject({+ if (isOllamaProvider(provider)) {+ const { output } = await generateText({+ model,+ output: Output.object({ schema: OllamaSemanticKeywordSchema }),+ prompt,+ temperature: 0.1,+ });+ return normalizeKeywordExtraction(output);+ }++ const { output } = await generateText({model,- schema,+ output: Output.object({ schema: SemanticKeywordSchema }),prompt,temperature: 0.1,});- // Normalize Ollama result to full schema format- if (isOllamaProvider(provider)) {- return normalizeKeywordExtraction(- object as OllamaSemanticKeywordExtraction- );- }-- return object as SemanticKeywordExtraction;+ return output;} catch (error) {console.error("Semantic keyword extraction failed:", error);throw new AIUnavailableError("keyword extraction");@@ -102,25 +102,27 @@ export async function analyzeActionVerbs(modelName: string = "llama3.2"): Promise<ActionVerbAnalysis> {const model = getModel(provider, modelName);- const schema = isOllamaProvider(provider)- ? OllamaActionVerbSchema- : ActionVerbAnalysisSchema;const prompt = getVerbPrompt(provider, text);try {- const { object } = await generateObject({+ if (isOllamaProvider(provider)) {+ const { output } = await generateText({+ model,+ output: Output.object({ schema: OllamaActionVerbSchema }),+ prompt,+ temperature: 0.2,+ });+ return normalizeActionVerbAnalysis(output);+ }++ const { output } = await generateText({model,- schema,+ output: Output.object({ schema: ActionVerbAnalysisSchema }),prompt,temperature: 0.2,});- // Normalize Ollama result to full schema format- if (isOllamaProvider(provider)) {- return normalizeActionVerbAnalysis(object as OllamaActionVerbAnalysis);- }-- return object as ActionVerbAnalysis;+ return output;} catch (error) {console.error("Action verb analysis failed:", error);throw new AIUnavailableError("action verb analysis");@@ -149,26 +151,28 @@ export async function performSemanticSkillMatch(modelName: string = "llama3.2"): Promise<SemanticSkillMatch> {const model = getModel(provider, modelName);- const schema = isOllamaProvider(provider)- ? OllamaSkillMatchSchema- : SemanticSkillMatchSchema;const prompt = getSkillMatchPrompt(provider, resumeText, jobText);try {- const { object } = await generateObject({+ if (isOllamaProvider(provider)) {+ const { output } = await generateText({+ model,+ output: Output.object({ schema: OllamaSkillMatchSchema }),+ prompt,+ temperature: 0.2,+ });+ return normalizeSkillMatch(output);+ }++ const { output } = await generateText({model,- schema,+ output: Output.object({ schema: SemanticSkillMatchSchema }),prompt,temperature: 0.2,});- // Normalize Ollama result to full schema format- if (isOllamaProvider(provider)) {- return normalizeSkillMatch(object as OllamaSkillMatch);- }-// Post-process cloud result to remove empty strings and duplicates- const cloudResult = object as SemanticSkillMatch;+ const cloudResult = output;const cleanedResult = {exact_matches: cloudResult.exact_matches.filter((match) =>diff --git a/src/lib/ai/tools/semantic-similarity.ts b/src/lib/ai/tools/semantic-similarity.tsindex d896635..e40801c 100644--- a/src/lib/ai/tools/semantic-similarity.ts+++ b/src/lib/ai/tools/semantic-similarity.ts@@ -3,7 +3,7 @@* Complete semantic understanding of resume-job fit, replacing keyword overlap*/-import { generateObject } from "ai";+import { generateText, Output } from "ai";import { getModel, ProviderType } from "../providers";import {SemanticSimilaritySchema,@@ -42,25 +42,27 @@ export async function calculateSemanticSimilarity(modelName: string = "llama3.2"): Promise<SemanticSimilarityResult> {const model = getModel(provider, modelName);- const schema = isOllamaProvider(provider)- ? OllamaSemanticSimilaritySchema- : SemanticSimilaritySchema;const prompt = getSimilarityPrompt(provider, resumeText, jobDescription);try {- const { object } = await generateObject({+ if (isOllamaProvider(provider)) {+ const { output } = await generateText({+ model,+ output: Output.object({ schema: OllamaSemanticSimilaritySchema }),+ prompt,+ temperature: 0.2,+ });+ return normalizeSemanticSimilarity(output);+ }++ const { output } = await generateText({model,- schema,+ output: Output.object({ schema: SemanticSimilaritySchema }),prompt,temperature: 0.2,});- // Normalize Ollama result to full schema format- if (isOllamaProvider(provider)) {- return normalizeSemanticSimilarity(object as OllamaSemanticSimilarity);- }-- return object as SemanticSimilarityResult;+ return output;} catch (error) {console.error("Semantic similarity calculation failed:", error);throw new AIUnavailableError("similarity calculation");