codecompanion.nvim icon indicating copy to clipboard operation
codecompanion.nvim copied to clipboard

Fix OpenAI-compatible adapter for API providers that allow nil content fields in deltas

Open reissbaker opened this issue 3 months ago • 0 comments

Description

This PR makes sure to handle nil content fields in deltas that some API providers return for some deltas. This fixes #445!

(I also renamed the OpenAICompatible adapter to OpenAICompatible.Adapter instead of Gemini.Adapter — I assume the previous name was a copy/paste error.)

Related Issue(s)

#445

Screenshots

Screenshot of the CodeCompanion chat buffer working and correctly showing the CodeCompanion header for assistant responses:

image

Checklist

  • [x] I've read the CONTRIBUTING guidelines and have adhered to them in this PR
  • [ ] I've updated the README and ran the make docs command (this seems unnecessary since it's just a bugfix?)

reissbaker avatar Nov 18 '24 23:11 reissbaker