fix(agent): keep the no-MCP system prompt cacheable

Co-authored-by: GeneralTony007 <144252170+GeneralTony007@users.noreply.github.com>
This commit is contained in:
simple-mindedandGeneralTony007 authored and GitHub committed 2026-12-02 18:26:27 +05:30
1 parent d80b85ae0d
commit 01a0ce9fbb
1 file changed
+4 -3
+4 -3
View File
@@ -26,10 +26,11 @@ func TestSkillIndexBlock_Empty(t *testing.T) {
if got := SkillIndexBlock(nil); got != "" {
t.Fatalf("no skills must render nothing, got %q", got)
}
// An agent without skills keeps its previous prompt byte-for-byte.
// An agent without skills keeps its previous prompt byte-for-byte, and the
// unchanged prompt is exactly what the cache breakpoint covers (#809).
sys, boundary := deferredSystem("SYS", DeferredInfo{})
if len(sys) != 1 || sys[0] != "SYS" || boundary != 0 {
t.Fatalf("expected [SYS],0 — got %v,%d", sys, boundary)
if len(sys) != 1 || sys[0] != "SYS" || boundary != 1 {
t.Fatalf("expected [SYS],1 — got %v,%d", sys, boundary)
}
}