Current File Focus

Focus is the part of your code that your conversation in Qodo Gen Chat centers around. It could be an entire file, function, method, or just a few lines of code.

Current File Focus uses the current file you're working on as Focus. Qodo Gen automatically sets your currently opened file as Focus.

How to set Focus

To choose Focus, click Select focus on the bottom left of the chatbox.

Usually, your Focus is automatically set to the file you currently have open. In this case, you can manually set it by clicking the file name in the bottom left corner of the chatbox.

For example, in this screenshot, you can set your Focus by clicking index.ts in the bottom left.

You can then select which component you'd like Qodo Gen to focus on:

  • Entire file or component, like a function or method.

  • Selected Lines: Select lines in your code editor. They will automatically be set as Focus.

Use Qodo Gen Chat with Focus

After setting Focus, you can ask Qodo Gen any question or enter a command.

The AI models behind Qodo Gen Chat will use the selected Focus to respond to your query accurately and in relation to the focused file, ensuring solutions that are relevant to your codebase.

Commands

Current File Focus supports the following commands:

  • /ask

    Ask any free-text question about your code.

  • /docstring

    Automatically generate docstrings.

  • /enhance

    Beautify and clean your code.

  • /explain

    Understand how the selected code works.

  • /find-on-github

    Find relevant open-source code on GitHub.

  • /generate-best-practices Generate a best-practices.md file.

  • /improve

    Get suggestions to improve your code.

  • /test

    Automatically generate an entire test suite or just a few tests.

Learn more about Commands and how to use them in the Commands documentation page.

Usage Examples

  • Code Understanding and Documentation: Use /explain or /docstring for in-depth understanding and documentation of specific functions or classes.

  • Code Quality Improvement: Employ /enhance or /improve to refine your code with best practices, optimizations, and security enhancements.

  • Test Suite Generation: Leverage /test for automated generation of test cases tailored to your selected code.

Last updated

Was this helpful?