copilot-emacs / copilot.el

An unofficial Copilot plugin for Emacs.
MIT License
1.72k stars 122 forks source link

Bugfix/diagnose on unloaded buffer #177

Closed emil-vdw closed 10 months ago

emil-vdw commented 10 months ago

Fix the error caused by copilot-diagnose as reported in #171 by:

  1. Activating copilot-mode for the current buffer if not already active.
  2. Make sure that the current buffer is loaded by the agent (didOpen notification has been sent).
  3. Use the current buffer's URI when making the test request instead of using an empty string as the URI.