fix: polish ai agent and command palette

This commit is contained in:
Amruth Pillai
2026-07-04 20:24:39 +02:00
parent 3e96605d4c
commit 82d961241e
14 changed files with 387 additions and 13 deletions
+23 -1
View File
@@ -1,5 +1,5 @@
import { describe, expect, it } from "vitest";
import { buildAgentDraftResumeName, buildUniqueAgentDraftSlug } from "./resume";
import { buildAgentDraftResumeName, buildUniqueAgentDraftSlug, normalizeAgentResumePatchOperations } from "./resume";
describe("agent resume setup helpers", () => {
it("names duplicated resumes as AI drafts", () => {
@@ -14,3 +14,25 @@ describe("agent resume setup helpers", () => {
);
});
});
describe("normalizeAgentResumePatchOperations", () => {
it("prefixes shorthand standard section paths without touching custom section paths", () => {
const result = normalizeAgentResumePatchOperations(
{
sections: {
experience: {},
education: {},
},
},
[
{ op: "replace", path: "/experience/items/0/description", value: "Updated" },
{ op: "copy", from: "/education/items/0", path: "/customSections/0/items/-" },
],
);
expect(result).toEqual([
{ op: "replace", path: "/sections/experience/items/0/description", value: "Updated" },
{ op: "copy", from: "/sections/education/items/0", path: "/customSections/0/items/-" },
]);
});
});