Current File Focus
Last updated
Was this helpful?
Last updated
Was this helpful?
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.
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: Manually select lines in your code to set as 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.
Current File Focus supports the following commands:
Ask any free-text question about your code.
Automatically generate docstrings.
Beautify and clean your code.
Understand how the selected code works.
Find relevant open-source code on GitHub.
/generate-best-practices
Generate a best-practices.md
file.
Get suggestions to improve your code.
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.
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.