Cody is an AI code assistant that is designed to help developers write code and find answers to their coding questions. It utilizes Sourcegraph's code graph and Large Language Models (LLMs) to provide assistance. Cody has the ability to read through your entire codebase and other external resources like open-source code and StackOverflow questions to offer suggestions and answers based on prior knowledge.Some key features of Cody include:1. Chatbot that knows your code: Cody can write code and answer questions related to your project's codebase, following your coding standards and architecture better than other AI chatbots.2. Fixup code: Cody can interactively write and refactor code based on quick natural-language instructions provided by the developer.3. Recipes: Cody can generate unit tests, documentation, and more, considering the context of your entire codebase.4. Experimental completions: Cody can provide suggestions as you code.Cody can be used in various ways, such as through the Cody app, as an editor extension for VS Code and JetBrains, or by connecting it to a Sourcegraph enterprise instance. Developers can chat with Cody in the editor or the Sourcegraph sidebar to ask questions or provide fixup instructions. Cody will provide responses based on the code files it has read, and if it gives incorrect answers, feedback can be shared to help improve its accuracy.Overall, Cody aims to reduce toil and enhance developers' productivity by providing reliable code assistance and answering coding queries based on its extensive knowledge base.
F.A.Q (20)
Sourcegraph Cody, referred to as Cody, is an AI code assistant designed to assist developers in their coding processes. It provides support in writing codes and answering coding queries by perusing the developers' code base and additional coding graph resources.
Cody utilizes Sourcegraph's code graph and Large Language Models (LLMs) to enhance its tasks of providing assistance for coding queries and suggesting modifications. The code graph informs it about the coding structure and interconnections, and the LLMs equip it with extensive linguistic understanding to analyze, understand, and communicate around coding contexts and terminologies.
Cody differs from other AI chatbots as it has the capability to understand the codebase of your project. It understands and follows coding standards and architecture which sets it apart from other chatbots. Rather than operating based on generic programming principles, it takes a more personalized approach for each project.
Cody interacts with the code by understanding natural language instructions provided by the developer. It will then perform the required edits in response to the instructions. Examples of fixup responses include factoring out common helper functions, using imported CSS module's class names or extracting a list item to a separate React component.
Yes, Cody can generate unit tests and documentation. This is done with full awareness of the entire codebase which enables contextually relevant and comprehensive outputs. Developers can select a particular code and ask Cody to generate unit tests or documentation based on the selected code.
Experimental completions in Cody refers to the feature where Cody provides suggestions while the developer is still coding. This is possible due to Cody's ability to understand and interpret the code that is being written.
Cody is highly versatile and can be used in several ways. It can be used via the Cody app, as an editor extension within VS Code and JetBrains, or by connecting it to a Sourcegraph enterprise instance. Developers can communicate with Cody directly within the editor or through the Sourcegraph sidebar.
Cody can be integrated with various platforms including VS Code, JetBrains, and Sourcegraph.com. Developers can use the Cody app or connect it with an existing Sourcegraph enterprise instance.
When Cody provides incorrect answers, developers have the option of providing feedback, helping to improve the system's accuracy. All feedback helps Cody to improve its understanding and be more precise for future queries and fixes.
Cody enhances developer productivity by reducing toil and engaging in tedious tasks. By providing insightful coding assistance and answering coding queries based on its extensive knowledge base, developers save precious time that can be invested in more meaningful and complex tasks.
Cody reads through the entire codebase of the project, external resources like open-source code, StackOverflow questions and other related information to offer suggestions and answers. This leads to more informed assistance based on prior knowledge.
Cody understands and follows the coding standards and architecture specific to your project. How this works is it reads through your entire code base and therefore knows your project-specific conventions, codes and architecture.
Yes, Cody can generate code. When asked a certain question or provided natural language instructions, Cody can write the appropriate code in response. The AI relies on the understanding of your project’s specifics, language models and code graph data to generate the code.
Developers can provide fixup instructions to Cody via natural language commands. Once the applicable code is selected, developers can use the command 'Cody: Fixup' and provide their specific instructions. For example, 'Factor out any common helper functions' or 'Use the imported CSS module's class names', and Cody will make the needed corrections.
Yes, Cody can be used in JetBrains. Cody is available as an editor extension and can be connected to a Sourcegraph enterprise instance, the Cody app, or Sourcegraph.com.
A Sourcegraph enterprise instance is essential for running Cody. Developers can connect Cody to a Sourcegraph enterprise instance to enable Cody's capabilities within their coding environment, making it seamless and efficient to interact with. Moreover, doing so expands Cody’s comprehension by adding in the instance’s specific code graph data.
Cody aids with coding queries by analyzing the codebase and related resources, detecting possible issues or queries developers might have. It then suggests solutions based on its extensive knowledge base and its understanding of the code graph. Moreover, when developers ask specific questions or provide instructions, Cody provides appropriate code or implimentations.
Yes, Cody works in real-time. As you code, Cody is constantly analysing and interpreting your actions. This capacity allows Cody to provide suggestions and fixes while you are still coding.
Cody accepts feedback in terms of correctness of its responses. If Cody provides an incorrect answer or solution, developers have the option to share feedback and highlight the discrepancies, thereby improving Cody's learning and precision for future references.
Sourcegraph's code graph is an extensive record of the code's structure and relation. It provides a graphical representation of how different aspects of the codebase interact and communicate with each other. Cody uses this code graph to understand the codebase and provide better and more contextual support to developers.