- Right-click in your code file.
- Select "Generate Documentation" from the context menu.
- On Mac: Press
Shift + Command + D - On Windows/Linux: Press
Shift + Ctrl + D
To customize the AI generation of the "Generate Documentation" command, you can modify the dev-docs.json file in your project root.
- Open
dev-docs.jsonin your project root. - Locate the
aisection in the JSON. - Customize the following properties:
{
"ai": {
"internalTypeFilters": ["class", "method", "function"],
"codeFilters": ["async function", "export default"],
"nameFilters": ["handleSubmit", "render"],
"contextPrompt": "your custom prompt or path to prompt template",
"defaultLength": "3-5 Sentences"
}
}internalTypeFilters: Array of symbol types to include in documentation.codeFilters: Array of code patterns to filter for documentation.nameFilters: Array of function or method names to specifically target.contextPrompt: Custom prompt for AI generation or path to a prompt template file.defaultLength: Desired length of generated documentation.
By adjusting these properties, you can fine-tune the AI-generated documentation to better suit your project's needs.