Update pkg/providers/github_copilot_provider.go

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
This commit is contained in:
Zihang Xu 2026-02-22 15:07:58 +08:00 committed by GitHub
parent e610e938e2
commit 919b2094f1
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -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{ content, err := p.session.Send(ctx, copilot.MessageOptions{
Prompt: string(fullcontent), Prompt: string(fullcontent),