From bc7afbee59c2cb614bc67675b59ca331bc446a79 Mon Sep 17 00:00:00 2001 From: Costin Stroie Date: Thu, 7 May 2026 17:15:12 +0300 Subject: [PATCH] fix: apply golines formatting to context.go Co-Authored-By: Claude Sonnet 4.6 --- pkg/agent/context.go | 24 +++++++++++++++--------- 1 file changed, 15 insertions(+), 9 deletions(-) diff --git a/pkg/agent/context.go b/pkg/agent/context.go index 69dba7cae..15cc47598 100644 --- a/pkg/agent/context.go +++ b/pkg/agent/context.go @@ -706,17 +706,23 @@ func (cb *ContextBuilder) BuildMessagesFromPrompt(req PromptBuildRequest) []prov if !skipForTools && !skipForSubsequent { if skillsSummary := cb.skillsLoader.BuildSkillsSummary(); skillsSummary != "" { catalogPart := PromptPart{ - ID: "capability.skill_catalog", - Layer: PromptLayerCapability, - Slot: PromptSlotSkillCatalog, - Source: PromptSource{ID: PromptSourceSkillCatalog, Name: "skill:index"}, - Title: "skill catalog", - Content: fmt.Sprintf("# Skills\n\nThe following skills extend your capabilities. To use a skill, read its SKILL.md file using the read_file tool.\n\n%s", skillsSummary), - Stable: true, - Cache: PromptCacheEphemeral, + ID: "capability.skill_catalog", + Layer: PromptLayerCapability, + Slot: PromptSlotSkillCatalog, + Source: PromptSource{ID: PromptSourceSkillCatalog, Name: "skill:index"}, + Title: "skill catalog", + Content: fmt.Sprintf( + "# Skills\n\nThe following skills extend your capabilities. To use a skill, read its SKILL.md file using the read_file tool.\n\n%s", + skillsSummary, + ), + Stable: true, + Cache: PromptCacheEphemeral, } stringParts = append(stringParts, catalogPart.Content) - contentBlocks = append(contentBlocks, promptContentBlock(catalogPart, &providers.CacheControl{Type: "ephemeral"})) + contentBlocks = append( + contentBlocks, + promptContentBlock(catalogPart, &providers.CacheControl{Type: "ephemeral"}), + ) } }