Skip to main content

Ask Question

To get insights or assistance with code in a GitHub repository, you can use the Devgen . Here’s how to ask questions using Devgen:

  1. Open the GitHub repository in Chrome.
  2. Click the Devgen logo to open the side panel.
  3. In the Devgen side panel, type your question to receive relevant information and guidance related to the code in the repository.
devgen
tip

If there is no index available for the repository, you’ll need to set up the index first. This enables Devgen to access and analyze the repository’s content for more accurate answers.

Ask Questions with Quotes

Devgen makes it easy to ask questions about specific parts of the code, documentation, or configuration files by quoting content:

  1. In the GitHub repository, select the code, documentation, or configuration text you want to ask about.
  2. Right-click the selected content and choose Add xxx.
  3. The selected content will appear in the Devgen input box in the side panel, where you can add an additional question or context.

Example: If you select a function definition in the code and add it to Devgen, you can then ask, “Can you explain what this function does?” or “What are some potential issues with this code?”

Best Practices

For the best results when asking questions in Devgen, follow these guidelines:

  1. Be Specific: Clearly specify what you want to know. Rather than asking "What does this code do?", try asking, "What is the purpose of the calculateTotal() function in Invoice.js?"

  2. Add Context: Mention relevant files, functions, or sections in the repository. For example, "How does fetchData in apiUtils.js handle error responses?"

  3. Break Down Questions: If your question covers a large codebase or complex functionality, consider asking about smaller sections one at a time.

  4. Regularly Update Index: For actively updated repositories, refresh the index in Devgen periodically to ensure it includes the latest code changes.

Usage Cases

Here are some scenarios where Devgen in the Chrome side panel can be particularly useful:

  1. Code Explanation: If you’re exploring a new project, ask Devgen for explanations of specific functions, classes, or files, such as "What does the userAuth.js module do?"

  2. Troubleshooting: If you're encountering issues, describe the problem in Devgen. It can help identify potential sources of the issue within the repository and suggest possible solutions.

  3. Dependency Analysis: For complex codebases, Devgen can help trace dependencies. Ask something like, "What dependencies does dashboard.js rely on?"

  4. Refactoring Suggestions: If you're considering refactoring, Devgen can point out sections that might need optimization or cleanup, which is especially useful for maintaining large or older codebases.

  5. Documentation Support: Devgen can assist in gathering details about functions, classes, and modules to streamline documentation efforts.