fix: fix Go formatting in context.go

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
KoheiYamashita 2026-02-21 04:20:44 +09:00
parent 1e5d740bf2
commit 961c54b375

View file

@ -314,8 +314,8 @@ func (cb *ContextBuilder) GetSkillsInfo() map[string]interface{} {
// to a preceding message with 'tool_calls'" after compression or cancellation. // to a preceding message with 'tool_calls'" after compression or cancellation.
func sanitizeToolMessages(history []providers.Message) []providers.Message { func sanitizeToolMessages(history []providers.Message) []providers.Message {
// Pass 1: collect IDs present in each direction // Pass 1: collect IDs present in each direction
toolCallIDs := make(map[string]bool) // IDs declared by assistant tool_calls toolCallIDs := make(map[string]bool) // IDs declared by assistant tool_calls
toolRespIDs := make(map[string]bool) // IDs present as tool responses toolRespIDs := make(map[string]bool) // IDs present as tool responses
for _, msg := range history { for _, msg := range history {
if msg.Role == "assistant" && len(msg.ToolCalls) > 0 { if msg.Role == "assistant" && len(msg.ToolCalls) > 0 {