Skip to main content

Using GitHub Copilot Chat in your IDE

You can start using GitHub Copilot Chat by installing the extension in your preferred environment.

Important:

Todos los usuarios con una suscripción de GitHub Copilot Individual pueden acceder a GitHub Copilot Chat en el IDE.

Los propietarios de organizaciones o empresas con una suscripción Copilot Business o Copilot Enterprise, pueden decidir si desean conceder acceso a GitHub Copilot Chat en el IDE , y - con una suscripción Copilot Enterprise - GitHub.com.

About GitHub Copilot Chat and Visual Studio Code

GitHub Copilot Chat es una interfaz de chat que te permite hacer preguntas relacionadas con la codificación y responderlas directamente dentro de un IDE compatible. Copilot Chat puede ayudarte con diversas tareas relacionadas con la codificación, como ofrecerte sugerencias de código, proporcionar descripciones en lenguaje natural de un fragmento de la funcionalidad y el propósito del código, generar pruebas unitarias para tu código y proponer correcciones de errores en el código. Para obtener más información, vea «About GitHub Copilot Chat in your IDE».

Si tiene una suscripción de GitHub Copilot Enterprise, también puede usar GitHub Copilot Chat en GitHub.com, en función de la configuración de la organización o de la empresa. Para obtener más información, vea «Using GitHub Copilot Chat in GitHub.com».

Prerequisites

  • Para usar GitHub Copilot Chat, debes tener una suscripción de GitHub Copilot activa. Para obtener más información, vea «Acerca de la facturación de GitHub Copilot».

  • To use GitHub Copilot Chat in Visual Studio Code, you must have the latest version of Visual Studio Code installed. For more information, see the Visual Studio Code download page.

  • To use GitHub Copilot Chat in Visual Studio Code, you must be signed into Visual Studio Code with the same GitHub ID that has access to GitHub Copilot.

Enabling or disabling GitHub Copilot Chat

Nota: Si tiene una suscripción de GitHub Copilot Individual, se le concederá acceso de manera automática a GitHub Copilot Chat.

GitHub Copilot Chat está disponible para todas las organizaciones y empresas que tienen una suscripción activa GitHub Copilot Business o GitHub Copilot Enterprise. Puede habilitar o deshabilitar Copilot in the CLI para su organización o empresa en la página de configuración de Copilot.

Si Copilot Chat está habilitado o deshabilitado en el nivel empresarial, las organizaciones de la empresa no pueden invalidar la configuración.

Habilitación o deshabilitación de GitHub Copilot Chat en el nivel de organización

  1. En la esquina superior derecha de GitHub.com, selecciona la foto de perfil y luego haz clic en Sus organizaciones.

    Captura de pantalla del menú desplegable en la imagen de perfil de @octocat. "Sus organizaciones" se destaca en naranja oscuro.

  2. Junto a la organización, haga clic en Settings.

  3. En la sección "Código, planificación y automatización" de la barra lateral, haga clic en Copilot y, a continuación, haga clic en Directivas.

  4. A la derecha de Copilot Chat en el IDE, seleccione el menú desplegable y, luego, haga clic en Habilitado o Deshabilitado.

Habilitación o deshabilitación de GitHub Copilot Chat en el nivel de empresa

  1. En la barra lateral de la cuenta de empresa, haz clic en Directivas.
  2. En " Directivas", haz clic en Copilot.
  3. A la derecha de Copilot Chat en el IDE, seleccione el menú desplegable y, luego, elija la opción adecuada.
    • Haga clic en Permitido para habilitar GitHub Copilot Chat para todas las organizaciones de su empresa.
    • Haga clic en Bloqueado para deshabilitar GitHub Copilot Chat para todas las organizaciones de su empresa.
    • Haz clic en Sin directiva para permitir que cada organización de tu empresa establezca su propia directiva.

Installing the GitHub Copilot Chat extension in Visual Studio Code

To use GitHub Copilot Chat, you must first install the GitHub Copilot Chat extension for Visual Studio Code.

  1. In Visual Studio Code, open the Extensions view by clicking the Extensions icon in the activity bar on the left side of the Visual Studio Code window.

    Screenshot of the extensions icon in the Activity Bar.

  2. In the "Search Extensions in Marketplace" search box, search for the GitHub Copilot Chat extension, then click Install.

    Screenshot of the GitHub Copilot Chat extension in the Extensions Marketplace.

  3. In the Visual Studio Code window, click Reload required to update Visual Studio Code.

  4. If you are prompted to sign in by a toast notification in the bottom right corner of Visual Studio Code, click Sign in to GitHub. Sign in with the same GitHub ID that has a license for GitHub Copilot, or is assigned a seat for GitHub Copilot through an organization.

  5. Follow the prompts in Visual Studio Code and on GitHub in your browser to complete the sign in and authentication process.

  6. To confirm that GitHub Copilot Chat has been successfully installed, in the activity bar on the left side of the Visual Studio Code window, click the Copilot Chat icon to open the Copilot Chat chat window.

    Screenshot of the Copilot Chat icon in the Activity Bar.

Note: If you experience authentication issues after installing the extension, see "Solución de problemas con GitHub Copilot Chat en IDE."

Asking your first question

GitHub Copilot Chat está pensado para responder exclusivamente preguntas relacionadas con la codificación que formulas en lenguaje natural. Por ejemplo, puedes pedirle a GitHub Copilot Chat que te ayude a escribir una función que devuelva la suma de dos números.

  1. In the Visual Studio Code activity bar, click the Copilot Chat icon to open the Copilot Chat chat window.

    Screenshot of the Copilot Chat icon in the Activity Bar.

  2. At the bottom of the Copilot Chat window, in the Ask Copilot or type / for commands text box, type a coding-related question, then press Enter. For example, type "How do I write a function that returns the sum of two numbers?".

  3. Copilot Chat will process your question and provide an answer, with code suggestions when appropriate, in the chat window.

    If your question is outside the scope of GitHub Copilot Chat, it will tell you and may suggest an alternative question to ask.

  4. Optionally, if Copilot Chat suggests a follow-up question above the Ask Copilot or type / for commands text box, click the follow-up question to ask it.

Using code suggestions from GitHub Copilot Chat

When Copilot Chat provides code suggestions, you have a few options for how to use them.

  1. In the Copilot Chat window, to show the options for a code suggestion, hover over the suggestion.

    Screenshot of code suggestion options in the Copilot Chat window.

  2. Choose one of the options for using the code suggestion.

    • To copy the code suggestion to your clipboard, click the Copy icon.
    • To insert the code suggestion into your code at the current location of your cursor, click the Insert at Cursor icon.
    • To view additional options, click the ... icon.
      • To create a new file and insert the suggestion into it, click Insert Into New File.
      • To run the code suggestion in the Visual Studio Code terminal, click Run in Terminal.

Asking GitHub Copilot Chat questions about your code

Copilot Chat can provide answers and support with a wide range of coding related topics.

  1. In Visual Studio Code, open the file you want Copilot Chat to help you with.

  2. In the activity bar, click the Copilot Chat icon to open the Copilot Chat chat window.

  3. Para hacer una pregunta sobre el código que está visible actualmente en el editor, escriba #editor seguido de la pregunta.

    Por ejemplo, podría escribir #editor what does this code do? para pedir a Copilot Chat una descripción de la finalidad del código.

    Use el comando #editor en cualquier lugar de la pregunta para indicar a Copilot Chat que se centre en el código que está visible actualmente en el editor.

  4. Si un único método está visible en su totalidad en el editor, puede pedir a Copilot Chat que genere una prueba unitaria para el método escribiendo Write a unit test for the method in the #editor.

    Como alternativa, seleccione el código para el que desea generar una prueba unitaria y, después, pregunte a Copilot lo siguiente: #selection write a unit test for this code.

    El comando #selection garantiza que Copilot se centra en el código seleccionado al responder a una pregunta.

  5. Para corregir un error en algún fragmento de código, seleccione el código en el editor y, a continuación, pregunte a Copilot lo siguiente: #selection fix the bug in this code.

  6. Para hacer que Copilot se centre en uno o varios archivos específicos al formular una pregunta, use el comando #file.

    1. En la ventana Copilot, escriba #file y haga clic en Entrar. Esto abrirá la paleta Quick Open en la parte superior del editor.
    2. Seleccione en la lista de archivos abiertos recientemente o busque el archivo en el que desea centrarse y selecciónelo.
    3. Escriba su pregunta. Por ejemplo, #file:app.js What does this file do?.

    Puede usar el comando #file varias veces en su pregunta para que Copilot se centre en más de un archivo.

Note: To find out about other special commands you can use with Copilot Chat, enter /help in the chat input box. For more information on slash commands, see Using Copilot Chat in VS Code in the VS Code documentation.

Sharing feedback about GitHub Copilot Chat

To share feedback about Copilot Chat, you can use the share feedback button in the Copilot Chat window.

  1. At the top of the Copilot Chat window, click the ellipsis (...), then click Send Chat Feedback.
  2. In your browser, in the vscode-copilot-release repository, click New issue.
  3. Choose one of the options that are displayed:
    • To open an issue to report a bug, click Bug report for GitHub Copilot Chat.
    • To open an issue to request a feature, click Feature request for GitHub Copilot Chat.
    • To report a security vulnerability, click Report a security vulnerability.
    • To ask a question in a discussion, click Questions.

Further reading

Important:

Todos los usuarios con una suscripción de GitHub Copilot Individual pueden acceder a GitHub Copilot Chat en el IDE.

Los propietarios de organizaciones o empresas con una suscripción Copilot Business o Copilot Enterprise, pueden decidir si desean conceder acceso a GitHub Copilot Chat en el IDE , y - con una suscripción Copilot Enterprise - GitHub.com.

About GitHub Copilot Chat and Visual Studio

GitHub Copilot Chat es una interfaz de chat que te permite hacer preguntas relacionadas con la codificación y responderlas directamente dentro de un IDE compatible. Copilot Chat puede ayudarte con diversas tareas relacionadas con la codificación, como ofrecerte sugerencias de código, proporcionar descripciones en lenguaje natural de un fragmento de la funcionalidad y el propósito del código, generar pruebas unitarias para tu código y proponer correcciones de errores en el código. Para obtener más información, vea «About GitHub Copilot Chat in your IDE».

Si tiene una suscripción de GitHub Copilot Enterprise, también puede usar GitHub Copilot Chat en GitHub.com, en función de la configuración de la organización o de la empresa. Para obtener más información, vea «Using GitHub Copilot Chat in GitHub.com».

For more information about using GitHub Copilot Chat in Visual Studio, see the Visual Studio Copilot Chat documentation.

Prerequisites

  • Para usar GitHub Copilot Chat, debes tener una suscripción de GitHub Copilot activa. Para obtener más información, vea «Acerca de la facturación de GitHub Copilot».

  • To use GitHub Copilot Chat with Visual Studio, you must be running Visual Studio 2022 version 17.8 or higher. For more information, see the Visual Studio GitHub Copilot documentation.

  • To use GitHub Copilot Chat with Visual Studio, you must be signed into Visual Studio with the same GitHub ID that has access to GitHub Copilot.

Enabling or disabling GitHub Copilot Chat

Nota: Si tiene una suscripción de GitHub Copilot Individual, se le concederá acceso de manera automática a GitHub Copilot Chat.

GitHub Copilot Chat está disponible para todas las organizaciones y empresas que tienen una suscripción activa GitHub Copilot Business o GitHub Copilot Enterprise. Puede habilitar o deshabilitar Copilot in the CLI para su organización o empresa en la página de configuración de Copilot.

Si Copilot Chat está habilitado o deshabilitado en el nivel empresarial, las organizaciones de la empresa no pueden invalidar la configuración.

Habilitación o deshabilitación de GitHub Copilot Chat en el nivel de organización

  1. En la esquina superior derecha de GitHub.com, selecciona la foto de perfil y luego haz clic en Sus organizaciones.

    Captura de pantalla del menú desplegable en la imagen de perfil de @octocat. "Sus organizaciones" se destaca en naranja oscuro.

  2. Junto a la organización, haga clic en Settings.

  3. En la sección "Código, planificación y automatización" de la barra lateral, haga clic en Copilot y, a continuación, haga clic en Directivas.

  4. A la derecha de Copilot Chat en el IDE, seleccione el menú desplegable y, luego, haga clic en Habilitado o Deshabilitado.

Habilitación o deshabilitación de GitHub Copilot Chat en el nivel de empresa

  1. En la barra lateral de la cuenta de empresa, haz clic en Directivas.
  2. En " Directivas", haz clic en Copilot.
  3. A la derecha de Copilot Chat en el IDE, seleccione el menú desplegable y, luego, elija la opción adecuada.
    • Haga clic en Permitido para habilitar GitHub Copilot Chat para todas las organizaciones de su empresa.
    • Haga clic en Bloqueado para deshabilitar GitHub Copilot Chat para todas las organizaciones de su empresa.
    • Haz clic en Sin directiva para permitir que cada organización de tu empresa establezca su propia directiva.

Installing the GitHub Copilot Chat extension in Visual Studio

With Visual Studio version 17.10 Preview 3 or later, you can install a single extension that combines GitHub Copilot and GitHub Copilot Chat. If you use Visual Studio 17.8 or 17.9, you must install the GitHub Copilot and GitHub Copilot Chat extensions separately. The GitHub Copilot extension is a prerequisite for using GitHub Copilot Chat. For more information about the Visual Studio 17.10 Preview 3 release, see the Visual Studio Release Notes in the Microsoft documentation.

Installing the combined Copilot and Copilot Chat extension in Visual Studio for versions 17.10 Preview 3 and later

  1. Download the latest preview version of Visual Studio 2022 17.10 from Visual Studio Release Notes in the Microsoft documentation.

  2. Follow the on-screen instructions to install Visual Studio.

  3. When Visual Studio Installer launches, select the workloads you require, and then under "Installation details", expand the Individual components details and select GitHub Copilot.

    Screenshot of the Visual Studio Installer. The GitHub Copilot component is highlighted with an orange outline.

  4. In the bottom-right corner of Visual Studio Installer, click Modify.

  5. When the modification is complete, close the Visual Studio Installer and launch Visual Studio.

  6. Optionally, to modify the installation or add more components, launch Visual Studio Installer from the Windows Start menu.

    • To the right of your installed version of Visual Studio, click Modify.
    • Make your desired changes, and in the bottom right corner click Modify again to apply them.

Installing the GitHub Copilot Chat extension in Visual Studio for versions 17.8 and 17.9

To use GitHub Copilot Chat with Visual Studio, you must install the Visual Studio extension.

Para un método de instalación alternativo, también puede usar las instrucciones de Microsoft para instalar la extensión GitHub Copilot. Para obtener más información, consulte Instrucciones de instalación en la documentación de Microsoft.

  1. En la barra de menús de Visual Studio, haz clic en Extensiones y, luego, en Administrar extensiones.

    Captura de pantalla de la barra de menús en Visual Studio. El menú "Extensiones" está abierto y la opción "Administrar extensiones" aparece resaltada con un contorno naranja.

  2. In the "Manage Extensions" window, click Visual Studio Marketplace, search for "GitHub Copilot Chat", then click Download.

  3. Cierra la ventana "Administrar extensiones" y, a continuación, cierra y vuelve a iniciar Visual Studio.

Note: If you experience authentication issues after installing the extension, see "Solución de problemas con GitHub Copilot Chat en IDE."

Asking your first question

GitHub Copilot Chat está pensado para responder exclusivamente preguntas relacionadas con la codificación que formulas en lenguaje natural. Por ejemplo, puedes pedirle a GitHub Copilot Chat que te ayude a escribir una función que devuelva la suma de dos números.

  1. En la barra de menús de Visual Studio, para iniciar Copilot Chat, haga clic en Ver y, luego, en GitHub Copilot Chat.

  2. At the bottom of the Copilot Chat window, in the Ask Copilot: Type / for commands and # to reference text box, type a coding related question, then press Enter. For example, type "How do I write a function that returns the sum of two numbers?".

    Note: If your question is outside the scope of GitHub Copilot Chat, it will tell you and may suggest an alternative question to ask.

  3. If Copilot Chat offers a code suggestion that you want to use, click the Copy icon to copy the code suggestion to your clipboard.

  4. Optionally, if Copilot Chat suggests a follow-up question under your last answer, click the follow-up question to ask it.

Asking GitHub Copilot Chat questions about your code

Copilot Chat can provide answers and support with a wide range of coding related topics.

  1. In Visual Studio, open the file you want Copilot Chat to help you with.

  2. En la barra de menús de Visual Studio, para iniciar Copilot Chat, haga clic en Ver y, luego, en GitHub Copilot Chat.

  3. Para hacer una pregunta sobre el código que está visible actualmente en el editor, escriba #editor seguido de la pregunta.

    Por ejemplo, podría escribir #editor what does this code do? para pedir a Copilot Chat una descripción de la finalidad del código.

    Use el comando #editor en cualquier lugar de la pregunta para indicar a Copilot Chat que se centre en el código que está visible actualmente en el editor.

  4. Si un único método está visible en su totalidad en el editor, puede pedir a Copilot Chat que genere una prueba unitaria para el método escribiendo Write a unit test for the method in the #editor.

    Como alternativa, seleccione el código para el que desea generar una prueba unitaria y, después, pregunte a Copilot lo siguiente: #selection write a unit test for this code.

    El comando #selection garantiza que Copilot se centra en el código seleccionado al responder a una pregunta.

  5. Para corregir un error en algún fragmento de código, seleccione el código en el editor y, a continuación, pregunte a Copilot lo siguiente: #selection fix the bug in this code.

  6. Para hacer que Copilot se centre en uno o varios archivos específicos al formular una pregunta, use el comando #file.

    1. En la ventana Copilot, escriba #file y haga clic en Entrar. Esto abrirá la paleta Quick Open en la parte superior del editor.
    2. Seleccione en la lista de archivos abiertos recientemente o busque el archivo en el que desea centrarse y selecciónelo.
    3. Escriba su pregunta. Por ejemplo, #file:app.js What does this file do?.

    Puede usar el comando #file varias veces en su pregunta para que Copilot se centre en más de un archivo.

Note: To find out about other special commands you can use with Copilot Chat, enter /help in the chat input box. For more information on slash commands, see Get better answers by setting the context for GitHub Copilot Chat in Visual Studio in the Visual Studio documentation.

Sharing feedback about GitHub Copilot Chat

To share feedback about Copilot Chat, you can use the Send feedback button in Visual Studio. For more information on providing feedback for Visual Studio, see the Visual Studio Feedback documentation.

  1. In the top right corner of the Visual Studio window, click the Send feedback button.

    Screenshot of the share feedback button in Visual Studio.

  2. Choose the option that best describes your feedback.

    • To report a bug, click Report a problem.
    • To request a feature, click Suggest a feature.

Further reading

Important:

Todos los usuarios con una suscripción de GitHub Copilot Individual pueden acceder a GitHub Copilot Chat en el IDE.

Los propietarios de organizaciones o empresas con una suscripción Copilot Business o Copilot Enterprise, pueden decidir si desean conceder acceso a GitHub Copilot Chat en el IDE , y - con una suscripción Copilot Enterprise - GitHub.com.

About GitHub Copilot Chat and JetBrains

GitHub Copilot Chat es una interfaz de chat que te permite hacer preguntas relacionadas con la codificación y responderlas directamente dentro de un IDE compatible. Copilot Chat puede ayudarte con diversas tareas relacionadas con la codificación, como ofrecerte sugerencias de código, proporcionar descripciones en lenguaje natural de un fragmento de la funcionalidad y el propósito del código, generar pruebas unitarias para tu código y proponer correcciones de errores en el código. Para obtener más información, vea «About GitHub Copilot Chat in your IDE».

Si tiene una suscripción de GitHub Copilot Enterprise, también puede usar GitHub Copilot Chat en GitHub.com, en función de la configuración de la organización o de la empresa. Para obtener más información, vea «Using GitHub Copilot Chat in GitHub.com».

Prerequisites

  • Para usar GitHub Copilot Chat, debes tener una suscripción de GitHub Copilot activa. Para obtener más información, vea «Acerca de la facturación de GitHub Copilot».

  • To use GitHub Copilot Chat in JetBrains, you must have a compatible JetBrains IDE installed. Copilot Chat is compatible with the following IDEs:

    • IntelliJ IDEA (Ultimate, Community, Educational)
    • Android Studio
    • AppCode
    • CLion
    • DataGrip
    • DataSpell
    • GoLand
    • MPS
    • PhpStorm
    • PyCharm (Professional, Community, Educational)
    • Rider
    • RubyMine
    • RustRover
    • WebStorm

    For more information, see the JetBrains IDEs tool finder.

Enabling or disabling GitHub Copilot Chat

Note: If you have a GitHub Copilot Individual subscription, you are automatically granted access to GitHub Copilot Chat.

GitHub Copilot Chat is available to all organizations and enterprises that have an active GitHub Copilot Business or GitHub Copilot Enterprise license. You can enable or disable GitHub Copilot Chat for your organization or enterprise in the GitHub Copilot settings page.

If Copilot Chat is enabled or disabled at the enterprise level, organizations within the enterprise cannot override the setting.

Enabling or disabling GitHub Copilot Chat at the organization level

  1. En la esquina superior derecha de GitHub.com, selecciona la foto de perfil y luego haz clic en Sus organizaciones.

    Captura de pantalla del menú desplegable en la imagen de perfil de @octocat. "Sus organizaciones" se destaca en naranja oscuro.

  2. Junto a la organización, haga clic en Settings.

  3. In the "Code, planning, and automation" section of the sidebar, click Copilot, and then click Policies.

  4. To the right of Copilot Chat in the IDE, select the dropdown menu, and then click Enabled or Disabled.

Enabling or disabling GitHub Copilot Chat at the enterprise level

  1. En la barra lateral de la cuenta de empresa, haz clic en Directivas.
  2. En " Directivas", haz clic en Copilot.
  3. To the right of Copilot Chat in the IDE, select the dropdown menu, and then choose the appropriate option.
    • Click Allowed to enable Copilot Chat for all organizations under your enterprise.
    • Click Blocked to disable Copilot Chat for all organizations under your enterprise.
    • Click No policy to allow each organization under your enterprise to set their own policy.

Installing or updating the GitHub Copilot plugin in JetBrains

To use Copilot Chat in a JetBrains IDE, you must install or update the GitHub Copilot plugin. If you have not yet installed the GitHub Copilot plugin, follow the steps in "Installing the GitHub Copilot plugin in your JetBrains IDE." If you have already installed the GitHub Copilot plugin, follow the steps in "Updating the GitHub Copilot plugin in JetBrains."

The following procedures will guide you through installing or updating the GitHub Copilot plugin in IntelliJ IDEA. Steps to install the plugin in another supported IDE may differ.

Installing the GitHub Copilot plugin in your JetBrains IDE

Para usar GitHub Copilot en un IDE de JetBrains, hay que instalar el complemento GitHub Copilot.

  1. En el IDE de JetBrains, en el menú Archivo para Windows o bajo el nombre del IDE para Mac (por ejemplo, PyCharm o IntelliJ), haz clic en Configuración para Windows o Preferencias para Mac.

  2. En el menú izquierdo del cuadro de diálogo Configuración/Preferencias, haz clic en Complementos.

  3. En la parte superior del cuadro de diálogo Configuración/Preferencias, haz clic en Marketplace. En la barra de búsqueda, busca GitHub Copilot y haz clic en Instalar.

    Captura de pantalla de la ventana "Preferencias". La pestaña con la etiqueta "Marketplace" aparece resaltada con un contorno naranja. En una lista de resultados de búsqueda, el complemento "GitHub Copilot" instalado está marcado por una casilla activada.

  4. Después de instalar GitHub Copilot, haz clic en Reiniciar IDE.

  5. Una vez reiniciado el IDE de JetBrains, haz clic en el menú Herramientas. Haz clic en GitHub Copilot y, a continuación, haz clic en Iniciar sesión en GitHub .

    Captura de pantalla del menú "Herramientas" expandido y el submenú "GitHub Copilot". La opción "Iniciar sesión en GitHub" aparece resaltada en azul.

  6. En el cuadro de diálogo "Iniciar sesión en GitHub", para copiar el código del dispositivo y abrir la ventana de activación del dispositivo, haz clic en Copiar y abrir.

    Captura de pantalla del cuadro de diálogo "Iniciar sesión en GitHub". Se muestra un código de dispositivo encima de un botón con la etiqueta "Copiar y abrir".

  7. Se abrirá una ventana de activación del dispositivo en el explorador. Pega el código del dispositivo y haz clic en Continuar.

  8. GitHub solicitará los permisos necesarios para GitHub Copilot. Para aprobar estos permisos, haz clic en Autorizar complemento GitHub Copilot .

  9. Una vez aprobados los permisos, el IDE de JetBrains mostrará una confirmación. Para empezar a usar GitHub Copilot, haz clic en Aceptar.

Updating the GitHub Copilot plugin in JetBrains

  1. En el IDE de JetBrains, en el menú Archivo para Windows o bajo el nombre del IDE para Mac (por ejemplo, PyCharm o IntelliJ), haz clic en Configuración para Windows o Preferencias para Mac.
  2. In the left-side menu of the Settings/Preferences dialog box, click Plugins.
  3. At the top of the Settings/Preferences dialog box, click Installed. In the search bar, search for GitHub Copilot, then click Update.
  4. After GitHub Copilot is updated, quit and relaunch your JetBrains IDE.

Asking your first question

GitHub Copilot Chat está pensado para responder exclusivamente preguntas relacionadas con la codificación que formulas en lenguaje natural. Por ejemplo, puedes pedirle a GitHub Copilot Chat que te ayude a escribir una función que devuelva la suma de dos números.

  1. At the right side of the JetBrains IDE window, click the Copilot Chat icon to open the Copilot Chat window.

    Screenshot of the Copilot Chat icon in the Activity Bar.

  2. At the bottom of the Copilot Chat window, in the Ask Copilot a question or type / for commands text box, type a coding related question, then press Enter. For example, type "How do I write a function that returns the sum of two numbers?".

  3. Copilot Chat will process your question and provide an answer, with code suggestions when appropriate, in the chat window.

    If your question is outside the scope of GitHub Copilot Chat, it will tell you and may suggest an alternative question to ask.

  4. Optionally, if Copilot Chat suggests a follow-up question above the Ask Copilot a question or type / for commands text box, click the follow-up question to ask it.

Asking GitHub Copilot Chat questions about your code

Copilot Chat can provide answers and support with a wide range of coding-related topics.

  1. In your JetBrains IDE, open the file you want Copilot Chat to help you with.
  2. Ask Copilot Chat a question about the file you have open. For example:
    • To generate a description of the file's purpose, ask a question like, "What does this file do?"
    • To generate a unit test for the file, type a request like, "Write a unit test for this file." Alternatively, highlight the code you want to generate a unit test for, then ask a question like, "Write a unit test for this code."
    • To generate a fix for a bug in the file, type a request like, "Fix this bug."
  3. Optionally, you can prompt Copilot Chat to perform predefined tasks with slash commands. To see a list of all available slash commands and their definitions, in the Ask Copilot a question or type / for commands text box, type /.

Sharing feedback about GitHub Copilot Chat

To share feedback about Copilot Chat, you can use the share feedback link in JetBrains.

  1. At the right side of the JetBrains IDE window, click the Copilot Chat icon to open the Copilot Chat window.

    Screenshot of the Copilot Chat icon in the Activity Bar.

  2. At the top of the Copilot Chat window, click the share feedback link.

    Screenshot of the share feedback link in the Copilot Chat window.

Further reading