Provide Context

Providing Code to the AI Assistant

Dr. SecDim indexes your codebase to automatically retrieve the most relevant context. This is achieved through a combination of embeddings-based retrieval and keyword search.

To provide the codebase for analysis, write your prompt followed by @Codebase. This sends the selected source files along with your prompt to Dr. SecDim for analysis.

dr secdim codebase context

For example, asking "Explain the challenge @Codebase" will generate the following result:

dr secdim codebase context result

Selecting Parts of the Code

The highlighted code you select by pressing Cmd/Ctrl + L will be included in your prompt along with your input. This is the only section of code provided to Dr. SecDim unless you highlight additional sections.

  1. Select a part of the source code.

  2. Press Cmd/Ctrl + L.

  3. The selected source code is attached to the prompt.

  4. Ask your question.

Active File

You can include the currently open file as context by pressing Opt/Alt + Enter when sending your request. Remember, the prompt cannot be empty.

Specific File

You can include a specific file from your current workspace as context by typing @Files and selecting the file.

Specific Folder

You can include a folder from your current workspace as context by typing @Folder and selecting the directory. This works similarly to @Codebase but only includes files within the selected folder.

Terminal Contents

You can include the contents of the terminal in your IDE as context by typing @Terminal.