Giter Site home page Giter Site logo

Comments (30)

manateelazycat avatar manateelazycat commented on July 2, 2024 1

我已经在README加入了代理说明, 感谢大佬

from lsp-bridge.

vinurs avatar vinurs commented on July 2, 2024 1

抱歉,前段时间一直忙别的事情,这个就暂时搁置了
今天晚上有空就看了一下这个问题,目前先查出了一个原因:那就是 copilot-node-server 版本的问题,我一般比较喜欢用最新的库,因此我安装的时候

npm install -g copilot-node-server

我对比了一下 lsp-bridge 跟 copilot.el 这两个插件发送给 copilot 的参数,我发现差别不大;但是 copilot.el 会在 emacs 的配置目录下面自己安装一个 copilot-node-server ,因此我就试着在 lsp-bridge里面就直接用这个库来进行启动,成功了^_^

而 copilot.el 里面默认用的版本是 1.14.0,现在我换回了 1.14.0,已经可以正常使用了

npm install -g [email protected]

CleanShot 2024-05-27 at 00 56 45@2x
目前用最新的库的话,在这一步会失败,原因我暂时也还没不知道

        editor_info = {'editorInfo': {'name': 'Emacs', 'version': '28.0'},
                       'editorPluginInfo': {'name': 'lsp-bridge', 'version': '0.0.1'},
                       'networkProxy': epc_arg_transformer(self.proxy)}
        self.sender.send_request('setEditorInfo', editor_info, generate_request_id())

这段代码之后,我把接收到的信息打印出来,就是下面的这段

--- [00:09:56.906998] {'jsonrpc': '2.0', 'id': 49309, 'error': {'code': -32002, 'message': 'Agent service not initialized.'}}

from lsp-bridge.

manateelazycat avatar manateelazycat commented on July 2, 2024 1

我暂时推送了一个补丁到README 82a6f1e

避免这个问题坑到更多人

from lsp-bridge.

manateelazycat avatar manateelazycat commented on July 2, 2024

@kongds Can you help review this issue ? Thanks. ;)

from lsp-bridge.

kongds avatar kongds commented on July 2, 2024

可能是没法访问github的关系,我这边可以正常登录。可以用proxy试试

from lsp-bridge.

vinurs avatar vinurs commented on July 2, 2024

有其它的方法确认不?因为我的Emacs里面是有代理相关的配置的

(setq url-gateway-method 'socks)
(setq url-proxy-services
      '(("http"     . "127.0.0.1:7890")
       ("https"     . "127.0.0.1:7890")))
(setq socks-server '("Default server" "127.0.0.1" 7890 5))

然后我用 eww 访问了一下 google是可以的
CleanShot 2024-04-29 at 13 31 54@2x

from lsp-bridge.

kongds avatar kongds commented on July 2, 2024

因该需要用lsp-bridge的这个参数acm-backend-copilot-network-proxy来设置,具体可以看帮助

或者用setenv也行

(setenv "https_proxy" "http://127.0.0.1:7890")
(setenv "http_proxy" "http://127.0.0.1:7890") 

from lsp-bridge.

vinurs avatar vinurs commented on July 2, 2024

我直接这样尝试设置了一下,还是不行

(setenv "https_proxy" "http://127.0.0.1:7890")
(setenv "http_proxy" "http://127.0.0.1:7890")
(setq acm-backend-copilot-network-proxy '(:host "127.0.0.1" :port 7890))

这个问题也是最近才出现的,我之前一直用的好好的,配置啥的都没变过

from lsp-bridge.

kongds avatar kongds commented on July 2, 2024

这个的设置应该需要restart lsp-bridge才会生效,可以在(lsp-bridge-restart-process)之后试试

from lsp-bridge.

vinurs avatar vinurs commented on July 2, 2024

试了一下,还是不行,同样的报错

from lsp-bridge.

manateelazycat avatar manateelazycat commented on July 2, 2024

试了一下,还是不行,同样的报错

你是不是代理不靠谱啊。 ;)

from lsp-bridge.

vinurs avatar vinurs commented on July 2, 2024

试了一下,还是不行,同样的报错

你是不是代理不靠谱啊。 ;)

这个我也无法确认靠谱不靠谱,我访问其它的都蛮正常的

from lsp-bridge.

manateelazycat avatar manateelazycat commented on July 2, 2024

试了一下,还是不行,同样的报错

你是不是代理不靠谱啊。 ;)

这个我也无法确认靠谱不靠谱,我访问其它的都蛮正常的

github 和 ssh 的代理一般都需要好的代理, 我自己的代理, 美国的就没法 git push, 但是日本的服务器就可以了, 建议多多切换一下代理服务器, 最好用透明代理。

from lsp-bridge.

vinurs avatar vinurs commented on July 2, 2024

我安装了一下 vscode,然后在里面安装了一下 copilot 的插件,然后连接了我的github的账号,我看是可以补全的,这是不是可以排除我网络的问题了?
CleanShot 2024-04-29 at 15 19 37@2x

from lsp-bridge.

manateelazycat avatar manateelazycat commented on July 2, 2024

不能确定啊, 我平常不用 copilot 插件

from lsp-bridge.

vinurs avatar vinurs commented on July 2, 2024

CleanShot 2024-05-03 at 05 36 32@2x
我下载了一个gh命令行,然后在命令行下面是可以登录 copilot 的

from lsp-bridge.

vinurs avatar vinurs commented on July 2, 2024

@kongds 我看日志里面有这个,这是表示没有走代理么?
CleanShot 2024-05-03 at 05 51 46@2x

from lsp-bridge.

manateelazycat avatar manateelazycat commented on July 2, 2024

@vinurs 你的系统是配置的全局透明代理吗?

from lsp-bridge.

vinurs avatar vinurs commented on July 2, 2024

@manateelazycat 对的,我用的clashx pro,然出站模式是选的 按照规则 来进行判断

from lsp-bridge.

manateelazycat avatar manateelazycat commented on July 2, 2024

@vinurs 我感觉是代理配置的问题哈, 暂时关闭issue, 如果有新的线索欢迎 re-open 这个issue, 或者发送PR, 感谢反馈

from lsp-bridge.

vinurs avatar vinurs commented on July 2, 2024
diff --git a/core/copilot.py b/core/copilot.py
index a63c2c8..fead47a 100644
--- a/core/copilot.py
+++ b/core/copilot.py
@@ -246,6 +246,9 @@ class Copilot:
         self.sender.send_request('signInInitiate', {'dummy': "signInInitiate"}, self.wait_id)
         while self.wait_id is not None:
             time.sleep(0.1)
+
+        log_time(self.wait_response)
+
         result = self.wait_response['result']
         if result['status'] == 'AlreadySignedIn':
             message_emacs(f'Already signed in as {result["user"]}')

我在这里加了一句打印语句,错误原因如下,但是我不知道该如何继续调试下去了,大佬指点一下

--- [09:05:10.190130] {'jsonrpc': '2.0', 'id': 8238, 'error': {'code': -32002, 'message': 'Agent service not initialized.'}}

from lsp-bridge.

manateelazycat avatar manateelazycat commented on July 2, 2024

你付费了吗?我记得这个是要付费的

from lsp-bridge.

vinurs avatar vinurs commented on July 2, 2024

你这么一问我想起来,我之前的账号没有续费,换了一个账号续费的,难道本地还有啥记录什么的?

from lsp-bridge.

manateelazycat avatar manateelazycat commented on July 2, 2024

不知道呀, 以前也有朋友调试了半天登录不上去, 发现是没有付费导致的。

from lsp-bridge.

vinurs avatar vinurs commented on July 2, 2024

CleanShot 2024-05-15 at 17 28 24@2x
https://github.com/copilot-emacs/copilot.el
我试了一下这个插件,是可以正常登录的

from lsp-bridge.

manateelazycat avatar manateelazycat commented on July 2, 2024

@vinurs 大佬, 看着是 lsp-bridge 的bug, 能帮忙提交一个补丁吗? 我没有买 copilot

from lsp-bridge.

CnsMaple avatar CnsMaple commented on July 2, 2024

Same problem and none of the ai assistants are available in Windows, super problematic!

from lsp-bridge.

manateelazycat avatar manateelazycat commented on July 2, 2024

I don't use copilot, please help to send PR

from lsp-bridge.

vinurs avatar vinurs commented on July 2, 2024

稍微验证了一下,从 [email protected] 就不行了

from lsp-bridge.

manateelazycat avatar manateelazycat commented on July 2, 2024

能否改代码,我们现在固定在某个版本,等以后再升级?

from lsp-bridge.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.