Focus is the part of your code that your conversation in Chat centers around. It could be an entire file or just a few lines of code.
Current File Focus uses the current file you're working on.
Sectum AI automatically sets your currently opened file as Focus. You can also choose your Focus manually by typing @
or clicking on @
, and selecting Current File
.
Secondary Focus
When choosing Current File Focus, you have to choose a Secondary Focus option. The Secondary Focus refines the context for Chat's responses.
When using Current File Focus, there are two options for Secondary Focus:
Selected Lines: Manually select lines in your code to set as the focus for your request.
Component: Select specific code components from the bottom right part of the chatbox. The components consist of functions, methods and classes automatically detected from the current file.
Using Current File Focus
Add Focus: Type @
or click on @
, and select Current File
.
Choose Secondary Focus: From the dropdown list on the bottom right on the chatbox, choose between Selected Lines or Component based on your requirement.
Execute a Command: Type in your desired command (/ask
, /docstring
, etc) followed by your question or request.
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.
/quick-test
Automatically generate unit tests.
/test-suite
Get step-by-step examples to create a test suite.
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-suite
or /quick-test
for automated generation of test cases tailored to your selected code.
Selected Lines Focus