refactor: system prompt sections + docs/tests
This commit is contained in:
@@ -23,6 +23,30 @@ describe("buildAgentSystemPrompt", () => {
|
||||
expect(prompt).not.toContain("Owner numbers:");
|
||||
});
|
||||
|
||||
it("omits extended sections in minimal prompt mode", () => {
|
||||
const prompt = buildAgentSystemPrompt({
|
||||
workspaceDir: "/tmp/clawd",
|
||||
promptMode: "minimal",
|
||||
ownerNumbers: ["+123"],
|
||||
skillsPrompt:
|
||||
"<available_skills>\n <skill>\n <name>demo</name>\n </skill>\n</available_skills>",
|
||||
heartbeatPrompt: "ping",
|
||||
toolNames: ["message", "memory_search"],
|
||||
extraSystemPrompt: "Subagent details",
|
||||
});
|
||||
|
||||
expect(prompt).not.toContain("## User Identity");
|
||||
expect(prompt).not.toContain("## Skills");
|
||||
expect(prompt).not.toContain("## Memory Recall");
|
||||
expect(prompt).not.toContain("## Reply Tags");
|
||||
expect(prompt).not.toContain("## Messaging");
|
||||
expect(prompt).not.toContain("## Silent Replies");
|
||||
expect(prompt).not.toContain("## Heartbeats");
|
||||
expect(prompt).toContain("## Subagent Context");
|
||||
expect(prompt).not.toContain("## Group Chat Context");
|
||||
expect(prompt).toContain("Subagent details");
|
||||
});
|
||||
|
||||
it("adds reasoning tag hint when enabled", () => {
|
||||
const prompt = buildAgentSystemPrompt({
|
||||
workspaceDir: "/tmp/clawd",
|
||||
|
||||
Reference in New Issue
Block a user