在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

欢迎加入DeepSeek 技术社区。在这里,你可以找到志同道合的朋友,共同探索AI技术的奥秘。

更多推荐