From 919b2094f13db6a1227aa09e3dc99b87022c1dc6 Mon Sep 17 00:00:00 2001 From: Zihang Xu Date: Sun, 22 Feb 2026 15:07:58 +0800 Subject: [PATCH] Update pkg/providers/github_copilot_provider.go Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> --- pkg/providers/github_copilot_provider.go | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/pkg/providers/github_copilot_provider.go b/pkg/providers/github_copilot_provider.go index b2442b6d5..fa67363f6 100644 --- a/pkg/providers/github_copilot_provider.go +++ b/pkg/providers/github_copilot_provider.go @@ -69,7 +69,10 @@ func (p *GitHubCopilotProvider) Chat( }) } - fullcontent, _ := json.Marshal(out) + fullcontent, err := json.Marshal(out) + if err != nil { + return nil, fmt.Errorf("failed to marshal messages: %w", err) + } content, err := p.session.Send(ctx, copilot.MessageOptions{ Prompt: string(fullcontent),