diff --git a/Create user-facing docs from your codebase.md b/Create user-facing docs from your codebase.md new file mode 100644 index 000000000..cc883a616 --- /dev/null +++ b/Create user-facing docs from your codebase.md @@ -0,0 +1,53 @@ + + + # How to Use and Customize the "Populate External Docs" Command in the VS Code Extension + +## Step 1: Access the Command + +1. Open your VS Code workspace +2. Press `Cmd+Shift+P` (Mac) or `Ctrl+Shift+P` (Windows/Linux) to open the command palette +3. Type "Populate External Docs" and select the command + + +## Step 2: Customizing Generation with dev-docs.json + +To customize the documentation generation, modify the `dev-docs.json` file in your project root: + +1. Create or open `dev-docs.json` +2. Add an `ai` object with customization options + +Example `dev-docs.json`: + +```json +{ + "ai": { + "internalTypeFilters": ["class", "method", "function"], + "codeFilters": [], + "nameFilters": [], + "docSubFolder": "api/", + "merge": true, + "externalDocPrompt": "Generate comprehensive API documentation" + } +} +``` + +Key customization options: + +- `internalTypeFilters`: Specify which code elements to document +- `docSubFolder`: Set the output folder for generated docs +- `merge`: Combine multiple elements into a single document +- `externalDocPrompt`: Customize the AI prompt for doc generation + +The `generateBySymbols` function in `src/AiServices.ts` uses these settings to generate documentation. + +## Step 3: Review and Edit + +After running the command: + +1. Check the `docs` folder (or your specified `docSubFolder`) for generated files +2. Review and edit the generated content as needed +3. Commit changes to your repository + +By following these steps and customizing the `dev-docs.json`, you can efficiently generate and manage external documentation for your project using the VS Code extension. + + \ No newline at end of file