{"version":3,"file":"system-prompt-regions.test.d.ts","sourceRoot":"","sources":["../../src/core/system-prompt-regions.test.ts"],"names":[],"mappings":"","sourcesContent":["import { afterEach, describe, expect, it, vi } from \"vitest\";\nimport { buildSystemPrompt, buildSystemPromptRegions } from \"./system-prompt.js\";\n\nafterEach(() => {\n\tvi.useRealTimers();\n});\n\ndescribe(\"system prompt cache regions\", () => {\n\tit(\"keeps date and host paths outside the stable prefix\", () => {\n\t\tvi.useFakeTimers();\n\t\tvi.setSystemTime(new Date(\"2026-08-02T00:00:00Z\"));\n\t\tconst first = buildSystemPromptRegions({ cwd: process.cwd(), selectedTools: [\"write\", \"read\"] });\n\t\tvi.setSystemTime(new Date(\"2026-08-03T00:00:00Z\"));\n\t\tconst second = buildSystemPromptRegions({ cwd: process.cwd(), selectedTools: [\"read\", \"write\"] });\n\n\t\texpect(first.stablePrefix).toBe(second.stablePrefix);\n\t\texpect(first.stablePrefix).not.toContain(\"Current date:\");\n\t\texpect(first.dynamicSuffix).toContain(\"Current date: 2026-08-02\");\n\t\texpect(second.dynamicSuffix).toContain(\"Current date: 2026-08-03\");\n\t\texpect(first.dynamicSuffix).toContain(\"- working directory:\");\n\t});\n\n\tit(\"preserves the complete compatibility prompt for direct callers\", () => {\n\t\tconst regions = buildSystemPromptRegions({ customPrompt: \"stable custom\", cwd: \"/tmp/project\" });\n\t\tconst complete = buildSystemPrompt({ customPrompt: \"stable custom\", cwd: \"/tmp/project\" });\n\n\t\texpect(complete).toBe(`${regions.stablePrefix}\\n\\n${regions.dynamicSuffix}`);\n\t});\n});\n"]}