Fix subagent audit bugs: optimistic state rollback, reactive surfing state sync, Tailwind classes, JSON parsing, null checks, and popup intervals
This commit is contained in:
@@ -221,7 +221,8 @@ Extract the following fields accurately and output JSON:
|
||||
};
|
||||
|
||||
const { text, providerUsed } = await generateTextWithLLMFallback(prompt, schema, llmConfig);
|
||||
const parsedData = JSON.parse(text || "{}");
|
||||
const cleanJson = (text || "{}").replace(/```json/gi, '').replace(/```/g, '').trim();
|
||||
const parsedData = JSON.parse(cleanJson || "{}");
|
||||
res.json({ success: true, data: parsedData, providerUsed });
|
||||
} catch (error: any) {
|
||||
console.error("Error parsing job URL:", error);
|
||||
@@ -455,8 +456,8 @@ Candidate Criteria:
|
||||
- Excluded Companies: ${excludedCompanies.join(", ")}
|
||||
|
||||
Candidate Profile:
|
||||
- Skills: ${userProfile.skills?.join(", ")}
|
||||
- Summary: ${userProfile.summary}
|
||||
- Skills: ${userProfile?.skills?.join(", ") || "Cybersecurity, Python, Incident Response"}
|
||||
- Summary: ${userProfile?.summary || "Cybersecurity & IT Specialist"}
|
||||
|
||||
List of Jobs to Evaluate:
|
||||
${JSON.stringify(jobFeeds)}
|
||||
@@ -943,8 +944,11 @@ app.post("/api/local/data", (req, res) => {
|
||||
try { store = JSON.parse(fs.readFileSync(DATA_FILE, "utf-8") || "{}"); } catch (e) {}
|
||||
}
|
||||
if (key) {
|
||||
if (items !== undefined) store[key] = { items };
|
||||
if (profile !== undefined) store[key] = { profile };
|
||||
store[key] = {
|
||||
...(store[key] || {}),
|
||||
...(items !== undefined && { items }),
|
||||
...(profile !== undefined && { profile })
|
||||
};
|
||||
}
|
||||
fs.writeFileSync(DATA_FILE, JSON.stringify(store, null, 2));
|
||||
res.json({ success: true });
|
||||
|
||||
Reference in New Issue
Block a user