Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Incompatible with latest copilot-node-server #344

Open
DamienCassou opened this issue Oct 15, 2024 · 7 comments
Open

Incompatible with latest copilot-node-server #344

DamienCassou opened this issue Oct 15, 2024 · 7 comments

Comments

@DamienCassou
Copy link
Contributor

DamienCassou commented Oct 15, 2024

https://github.com/jfcherng/copilot-node-server released 1.41.0. The main JS file changed from agent.js to language-server.js in 1.34.0. This makes copilot.el incompatible with the latest version.

@chesterroh
Copy link

M-x copilot-install-server doesn't complete at all because of this. :)

@jordangarrison
Copy link

M-x copilot-install-server doesn't complete at all because of this. :)

I no longer have the copilot-install-server command available at all 😅

@eval-exec
Copy link

eval-exec commented Oct 30, 2024

Hello, I submitted a PR to solve this.
You can patch copilot.el by: #346
By this patch, I tried, it worked on latest node copilot-node-server (1.41.0) https://www.npmjs.com/package/copilot-node-server

Sad, it not work on latest copilot-node-server:
copilot-agent started successfully, but code completion not work.

(:jsonrpc "2.0" :method "textDocument/didChange" :params
  (:textDocument
	(:uri "file:///home/exec/.config/emacs/elisp/copilot.el" :version
	  4)
	:contentChanges
	[(:range
	   (:start (:line 18 :character 0) :end (:line 19 :character 0))
	   :text "")]))
[jsonrpc] e[21:39:59.154] --> getCompletions[5] 
(:jsonrpc "2.0" :id 5 :method "getCompletions" :params
  (:doc
	(:version 4 :tabSize 4 :indentSize 2 :insertSpaces :json-false
	  :path "/home/exec/.config/emacs/elisp/copilot.el" :uri
	  "file:///home/exec/.config/emacs/elisp/copilot.el" :relativePath
	  "copilot.el" :languageId "emacs-lisp" :position
	  (:line 18 :character 0))))
[jsonrpc] e[21:39:59.162] <-- getCompletions[5] 
(:jsonrpc "2.0" :id 5 :error
  (:code -32002 :message "Agent service not initialized."))
[jsonrpc] i[21:39:59.162] [5] error -32002 ignored: Agent service not initialized. ignored

@chesterroh
Copy link

M-x copilot-install-server doesn't complete at all because of this. :)

I no longer have the copilot-install-server command available at all 😅

my problem was just a path problem. Simply emacs didn't find a 'npx' command accordingly. Thanks for claude-sonnet, I was able to solve the problem.

exec-path-from-shell package solved mine.

(use-package exec-path-from-shell
:ensure t
:if (memq window-system '(mac ns x))
:config
(exec-path-from-shell-initialize))

@eval-exec
Copy link

M-x copilot-install-server doesn't complete at all because of this. :)

I no longer have the copilot-install-server command available at all 😅

my problem was just a path problem. Simply emacs didn't find a 'npx' command accordingly. Thanks for claude-sonnet, I was able to solve the problem.

exec-path-from-shell package solved mine.

(use-package exec-path-from-shell
:ensure t
:if (memq window-system '(mac ns x))
:config
(exec-path-from-shell-initialize))

After you use 1.41.0 copilot-node-server, does copilot-completion work well?

@chesterroh
Copy link

M-x copilot-install-server doesn't complete at all because of this. :)

I no longer have the copilot-install-server command available at all 😅

my problem was just a path problem. Simply emacs didn't find a 'npx' command accordingly. Thanks for claude-sonnet, I was able to solve the problem.
exec-path-from-shell package solved mine.
(use-package exec-path-from-shell
:ensure t
:if (memq window-system '(mac ns x))
:config
(exec-path-from-shell-initialize))

After you use 1.41.0 copilot-node-server, does copilot-completion work well?

didn't try it yet. but I suspect it's mainly because of the script name change? from agent.js to langauge-server.js ? Did you try this?

@eval-exec
Copy link

eval-exec commented Nov 3, 2024 via email

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants