What is Sourcegraph Cody?
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.
How does Cody utilize Sourcegraph's code graph and Large Language Models?
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.
What makes Cody different from other AI chatbots?
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.
How can Cody interactively write and refactor code?
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.
Can Cody generate unit tests and documentation?
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.
What are experimental completions in Cody?
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.
How can Cody be used in various ways?
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.
What platforms can Cody be integrated with?
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.
What happens when Cody provides incorrect answers?
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.
How can Cody enhance developer productivity?
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.
What kind of resources does Cody read to offer suggestions and answers?
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.
How does Cody follow coding standards and architecture?
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.
Can Cody generate code?
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.
How can I provide fixup instructions to Cody?
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.
Can Cody be used in JetBrains?
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.
What is the significance of Sourcegraph enterprise instance?
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.
How does Cody assist with coding queries and suggestions?
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.
Does Cody work in real-time?
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.
What kind of feedback does Cody accept?
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.
What is Sourcegraph's code graph?
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.