在vscode中选择左上角文件-首选项-设置进入以下页面

选择扩展-GitHub Copilot,点击在settings.json中编辑

将settings.json文件替换为以下代码

{
    "remote.SSH.remotePlatform": {
        "xx.xx.xx.xx": "linux"//替换成自己的远程IP地址
    },
    "remote.extensionKind": {
        "pub.name": [
            "ui"
        ],
        "GitHub.copilot": ["workspace"],
        "GitHub.copilot-chat": ["ui"]
    },
    "github.copilot.nextEditSuggestions.enabled": true,
    "github.copilot.chat.agent.thinkingTool": true,
    "github.copilot.enable": {
        "*": true,
        "plaintext": false,
        "markdown": true
    },
    "github.copilot.advanced": {
        "debug.overrideEngine": "copilot-codex",
        "debug.testOverrideProxyUrl": "",
        "debug.overrideProxyUrl": ""
    }
}

这时候远程服务器上的就可以登录了,但是我这里显示工作区不对,再点击左上角文件-将文件夹添加到工作区,实测可以使用agent模式编辑远程服务器文件。

Logo

魔乐社区(Modelers.cn) 是一个中立、公益的人工智能社区,提供人工智能工具、模型、数据的托管、展示与应用协同服务,为人工智能开发及爱好者搭建开放的学习交流平台。社区通过理事会方式运作,由全产业链共同建设、共同运营、共同享有,推动国产AI生态繁荣发展。

更多推荐