标签: github-copilot

Co-pilot 在 Visual Studio 2022“ReturnKeyCommandArgs”上无法正常工作?

我在 Visual Studio 2022 上安装副驾驶时遇到问题,我正在运行稳定的社区版本,当然,我还运行带有扩展的版本。但是,我已经尝试禁用卸载所有扩展,但它仍然无法按应有的方式工作。Co-pilot 在 Visual Studio Code 上运行良好,这是我唯一遇到问题的 Visual Studio 2022。

我得到的确切异常如下:

[Error] An error occurred for 'ReturnKeyCommandArgs': StreamJsonRpc.RemoteInvocationException: Request getCompletions failed with message: The operation was aborted.
   at StreamJsonRpc.JsonRpc.<InvokeCoreAsync>d__143`1.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at GitHub.Copilot.CopilotCommandHandler.<>c__DisplayClass32_0.<<ExecuteCommandCore>b__0>d.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at Microsoft.VisualStudio.Shell.VsTaskLibraryHelper.<>c__DisplayClass35_0.<<FileAndForget>b__0>d.MoveNext()

( A lot of …
Run Code Online (Sandbox Code Playgroud)

c# visual-studio-2022 github-copilot

5
推荐指数
0
解决办法
783
查看次数

Visual Studio 为 cshtml 文件中的每个按键写入 4 个字符

我正在 Visual Studio 中处理 .cshtml 文件,打开文件后的第一秒一切似乎都很正常,但在我写了一些字母后,Visual Studio 开始为每个按下的键写入 4 个字符...\n发生错误时的输出示例

\n

我正在使用 Visual Studio 2022 V17.2.5(社区版)、ASP.NET Framework V4.6.1 并使用 Razor 页面。假设它是一个错误,我将其作为一个错误报告给 Microsoft \xc2\xbf 有没有人遇到同样的问题并提供解决方案来解决它?

\n

这是整个 .cshtml 文件:

\n
@model CataRefacciones\n@using SCORE.Helpers\n@using SCORE.Models\n@using X.PagedList\n\n@{\n    string idTipos = "ListaTipos";\n    var listaTipos = (IEnumerable<SelectListItem>)ViewBag.ListaDeTipos;\n    string idCodigos = "ListaCodigos";\n    var listaCodigoSAT = (IEnumerable<SelectListItem>)ViewBag.ListaDeCodigos;\n    string idMarcas = "ListaMarcas";\n    var listaMarcas = (IEnumerable<SelectListItem>)SCOREEntitiesHelper.ListaMarcasRefacciones();\n    var listaUniAlmacenaje = (IEnumerable<SelectListItem>)ViewBag.ListaUniAlmacenaje;\n    string CodigoSAT = Model.CODSAT.ToString();\n    bool esVistaCreacion = ViewBag.AccionStd == CataAcciones.AccionesStd.Agregar;\n\n    // Necesitamos guardar la lista de modelos, guardaremos …
Run Code Online (Sandbox Code Playgroud)

c# asp.net razor github-copilot

5
推荐指数
1
解决办法
1501
查看次数

如何使用 GitHub Copilot 处理多个文件?

我正在寻找探索 GitHub Copilot。我没有深入的编码经验,而且我几个月前才毕业。我计划建立一个小型网站来探索 GitHub copilot 提供的功能。

当我为副驾驶添加注释以生成代码时,它没有生成所需的代码。在 html 文件中,我评论说我想创建带有故障动画的文本和包含标题、导航图标的部分,并循环播放视频。它无法生成我想要的代码。那么,如何将它用于也需要引用其他文件(.css 或 .js 文件)的代码。我仍在学习前端,因为我在 C、C++ 和 Core Java 方面拥有最丰富的经验。

github visual-studio-code github-copilot

5
推荐指数
1
解决办法
2916
查看次数

如何在 VS Code 中禁用 GitHub Copilot?

我查看了 GitHub 网站,它说要单击屏幕底部的 git 图标,但我没有。有没有其他方法可以禁用这个烦人的通知:

错误弹出窗口的屏幕截图

它说:

GitHub Copilot 无法连接到服务器。扩展激活失败:“找不到 GitHub Copilot 的访问权限。”

github visual-studio-code github-copilot

4
推荐指数
1
解决办法
1万
查看次数

GitHub Copilot 命令不起作用并显示错误

我安装 GitHub Copilot 只是为了测试。但是,这些命令都不起作用。

例如,如果我尝试 CTRL + Enter,则会收到此错误消息:

找不到命令“github.copilot.generate”

我正在尝试使用 JS 文件。

我安装了最新的 Visual Code 和 Copilot。

github github-copilot

3
推荐指数
3
解决办法
3998
查看次数

3
推荐指数
1
解决办法
1976
查看次数

Android Studio:插件 GitHub Copiolot 中出现异常 (1.2.13.2776)

尝试在 Android Studio 中安装并运行 GitHub Copilot 插件。我收到以下错误:

java.lang.NoSuchMethodError: 'com.intellij.ui.dsl.builder.Row com.intellij.ui.dsl.builder.Panel.row$default(com.intellij.ui.dsl.builder.Panel, javax.swing.JLabel, kotlin.jvm.functions.Function1, int, java.lang.Object)'
    at com.github.copilot.github.DeviceLoginForm.descriptionPanel(DeviceLoginForm.kt:60)
    at com.github.copilot.github.DeviceLoginForm.access$descriptionPanel(DeviceLoginForm.kt:18)
    at com.github.copilot.github.DeviceLoginForm$deviceLoginPanel$container$1.invoke(DeviceLoginForm.kt:29)
    at com.github.copilot.github.DeviceLoginForm$deviceLoginPanel$container$1.invoke(DeviceLoginForm.kt:27)
    at com.intellij.ui.dsl.builder.BuilderKt.panel(builder.kt:19)
    at com.github.copilot.ui.component.Panel.panelBuilder(Panel.kt:9)
    at com.github.copilot.github.DeviceLoginForm.deviceLoginPanel(DeviceLoginForm.kt:27)
    at com.github.copilot.github.DeviceLoginForm.<init>(DeviceLoginForm.kt:22)
    at com.github.copilot.github.DeviceLoginDialog.createCenterPanel(DeviceLoginDialog.java:65)
    at com.intellij.openapi.ui.DialogWrapper.init(DialogWrapper.java:1296)
    at com.github.copilot.github.DeviceLoginDialog.showDeviceLogin(DeviceLoginDialog.java:30)
    at com.github.copilot.lang.agent.AgentGitHubService.loginInteractive(AgentGitHubService.java:108)
    at com.github.copilot.github.GitHubService.lambda$showLoginNotification$0(GitHubService.java:62)
    at com.intellij.notification.NotificationAction.lambda$createSimpleExpiring$2(NotificationAction.java:62)
    at com.intellij.notification.NotificationAction$Simple.actionPerformed(NotificationAction.java:96)
    at com.intellij.notification.NotificationAction.actionPerformed(NotificationAction.java:33)
    at com.intellij.openapi.actionSystem.ex.ActionUtil.doPerformActionOrShowPopup(ActionUtil.java:315)
    at com.intellij.openapi.actionSystem.ex.ActionUtil.lambda$performActionDumbAwareWithCallbacks$4(ActionUtil.java:294)
    at com.intellij.openapi.actionSystem.ex.ActionUtil.performDumbAwareWithCallbacks(ActionUtil.java:337)
    at com.intellij.openapi.actionSystem.ex.ActionUtil.performActionDumbAwareWithCallbacks(ActionUtil.java:294)
    at com.intellij.openapi.fileEditor.impl.IdeUiServiceImpl.performActionDumbAwareWithCallbacks(IdeUiServiceImpl.java:109)
    at com.intellij.notification.Notification.fire(Notification.java:288)
    at com.intellij.notification.impl.NotificationsManagerImpl.lambda$createAction$11(NotificationsManagerImpl.java:841)
    at com.intellij.ui.components.labels.LinkLabel.doClick(LinkLabel.java:174)
    at com.intellij.ui.components.labels.LinkLabel.doClick(LinkLabel.java:388)
    at com.intellij.ui.components.labels.LinkLabel$MyMouseHandler.mouseReleased(LinkLabel.java:361)
    at java.desktop/java.awt.Component.processMouseEvent(Unknown Source)
    at java.desktop/javax.swing.JComponent.processMouseEvent(Unknown Source)
    at java.desktop/java.awt.Component.processEvent(Unknown Source)
    at java.desktop/java.awt.Container.processEvent(Unknown Source)
    at java.desktop/java.awt.Component.dispatchEventImpl(Unknown …
Run Code Online (Sandbox Code Playgroud)

android android-studio github-copilot

3
推荐指数
1
解决办法
400
查看次数

副驾驶错误“对话请求出错。请检查日志以了解更多详细信息”

我在 VS code 中安装了 copilot 扩展并在线激活了我的会员资格。我在 VS code 中看到聊天区域,但每当我键入问题时,我都会收到响应“对话请求出错。请检查日志以获取更多详细信息。” 当我检查日志时,我只看到以下内容:

2023-09-22 14:58:18.699 [info] update#setState idle
2023-09-22 14:58:19.398 [info] WSL is not installed, so could not detect WSL profiles
2023-09-22 14:58:48.711 [info] update#setState checking for updates
2023-09-22 14:58:48.929 [info] update#setState idle
Run Code Online (Sandbox Code Playgroud)

我安装 WSL 只是为了尝试是否可以解决问题,但没有成功。有谁知道如何让副驾驶工作吗?

visual-studio-code github-copilot

3
推荐指数
1
解决办法
1977
查看次数

Android co Pilot 根据评论生成

我尝试了 android kotlin co Pilot,当我编写函数名称时它可以工作 - 它建议生成结果。

它还建议完成 kotlin 代码行。

但它不会根据 kotlin 中的注释或 XML 中的注释生成代码,就像那篇媒体文章中那样。

https://miro.medium.com/v2/resize:fit:828/1*4efMJaP9P9jQUqq2jAXQqQ.gif

https://thatrohit.medium.com/power-up-your-android-development-with-github-copilot-957829eadf0f

android intellij-idea kotlin android-studio github-copilot

2
推荐指数
1
解决办法
1187
查看次数

VSCode 未添加具有正确设置的右括号

我的 vscode 编辑器设置为自动添加右括号/圆括号但不添加它们。这是一个最近才开始的新问题。有没有其他人在全局 vscode 设置中遇到过这个问题?

json typescript visual-studio-code vscode-settings github-copilot

1
推荐指数
1
解决办法
221
查看次数

编辑 Python 时,GitHub Coptilot 在 NeoVim 中不起作用

我有 Arch Linux,因此安装了最新的 NeoVim 版本(目前为 0.7.0)。大约一个月后,我开始使用 GitHub Copilot,它在Bash、SH、JS等中运行良好。昨天我想用Python重写一些程序,但Copilot不起作用。在不同的文件和语言中尝试过——在任何地方都可以工作,但Python不行!:Copilot status显示“副驾驶:已启用且在线”,但没有给出任何建议。:Copilot panel显示“合成 0/10 解决方案(隐藏重复项)”:Copilot log不包含任何内容。我记得前段时间它按预期工作,但现在却不行了。我不知道为什么会发生这种情况。作为 Arch 用户,我拒绝 VisualStudio Code 和其他 IDE,更喜欢在终端中工作。有什么可以帮忙的吗?

编辑:刚刚发现打开一个没有.py打印的文件#!/usr/bin/env python3适用于 Copilot,但在这种情况下没有语法突出显示。重新打开会:edit添加颜色但会破坏 Copilot

python archlinux neovim github-copilot

1
推荐指数
1
解决办法
1988
查看次数