Merge pull request #275 from getcompanion-ai/prompt

prompt
This commit is contained in:
Hari 2026-03-09 16:33:06 -04:00 committed by GitHub
commit 7f72ee175d
6 changed files with 86 additions and 44 deletions

View file

@ -282,11 +282,9 @@ describe("browser tool", () => {
it("mentions browser in the default system prompt", () => {
const prompt = buildSystemPrompt();
expect(prompt).toContain("- browser: Browse the web:");
expect(prompt).toContain(
"- browser: Open websites, inspect pages with snapshot, click/fill/wait, take screenshots, and save/load browser state",
);
expect(prompt).toContain(
"Use browser for website tasks. Open the page, use snapshot to inspect interactive elements, then click, fill, wait, or screenshot as needed",
"Browser: snapshot before interacting with elements",
);
});
});

View file

@ -270,9 +270,9 @@ describe("skills", () => {
const introText = result.substring(0, xmlStart);
expect(introText).toContain(
"The following skills provide specialized instructions",
"Skills are specialized instructions for specific tasks",
);
expect(introText).toContain("Use the read tool to load a skill's file");
expect(introText).toContain("Do not load skills speculatively");
});
it("should escape XML special characters", () => {

View file

@ -10,7 +10,7 @@ describe("buildSystemPrompt", () => {
skills: [],
});
expect(prompt).toContain("Tools:\n(none)");
expect(prompt).toContain("# Tools\n\n(none)");
});
test("shows file paths guideline even with no tools", () => {
@ -20,7 +20,7 @@ describe("buildSystemPrompt", () => {
skills: [],
});
expect(prompt).toContain("Show file paths");
expect(prompt).toContain("Show file path");
});
});
@ -95,7 +95,7 @@ describe("buildSystemPrompt", () => {
skills: [],
});
expect(prompt).toContain("SOUL.md** is who you are");
expect(prompt).toContain("SOUL.md** is who you are. Embody it");
expect(prompt).toContain("## /tmp/project/SOUL.md");
});
@ -110,7 +110,7 @@ describe("buildSystemPrompt", () => {
skills: [],
});
expect(prompt).toContain("USER.md** is what you know about your user");
expect(prompt).toContain("USER.md** is what you know about your human");
expect(prompt).toContain("Likes coffee.");
});
});