claude: prefix prompt with Clawd identity

This commit is contained in:
Peter Steinberger
2025-11-25 06:41:27 +01:00
parent a331bd5ea1
commit 0adc0ed7a6
3 changed files with 17 additions and 4 deletions

View File

@@ -389,7 +389,8 @@ describe("config and templating", () => {
const argv = runSpy.mock.calls[0][0];
expect(argv[0]).toBe("claude");
expect(argv.at(-1)).toBe("hi");
expect(argv.at(-1)).toContain("You are Clawd (Claude)");
expect(argv.at(-1)).toMatch(/hi$/);
// The helper should auto-add print and output format flags without disturbing the prompt position.
expect(argv.includes("-p") || argv.includes("--print")).toBe(true);
const outputIdx = argv.findIndex(
@@ -454,7 +455,9 @@ describe("config and templating", () => {
);
expect(result?.text).toBe("Sure! What's up?");
});
const argv = runSpy.mock.calls[0][0];
expect(argv.at(-1)).toContain("You are Clawd (Claude)");
});
it("serializes command auto-replies via the queue", async () => {
let active = 0;