Skip to content

aide.expertCodeEnhancerPromptList ​

This configuration allows you to customize the AI prompt list for expert code enhancement.

With these prompts, you can specify how to optimize and refactor your code. Prompts can be customized to match specific files based on file path patterns.

Prompt Configuration Fields:

FieldDescriptionRequiredDefault
matchFile path matching pattern, supports glob syntax. The prompt will only be displayed if the current file path matches.No"**/*"
titleTitle of the prompt, displayed in the selection list.Yes
promptContent of the prompt, describing the optimization operation needed.Yes
sortSorting weight, the smaller the number, the higher it ranks.No1000
autoContextWhether to enable automatic context support. When enabled, AI will also read files potentially related to the current file before processing the code. Defaults to false. Requires the function_call feature.Nofalse

Usage Example:

json
{
  "aide.expertCodeEnhancerPromptList": [
    {
      "match": ["**/*.sql", "**/*Repository.{java,kt,scala,cs,py,js,ts}"],
      "title": "Optimize Database Queries",
      "prompt": "Analyze and optimize the database queries in the following code. Focus on improving query performance, reducing unnecessary joins, optimizing indexing suggestions, and ensuring efficient data retrieval patterns.",
      "autoContext": true
    },
    {
      "match": ["**/*.vue", "**/*.tsx", "**/*.jsx"],
      "title": "Split Into Smaller Components",
      "prompt": "Analyze the following code and split it into smaller, more manageable components. Focus on identifying reusable parts, separating concerns, and improving overall component structure. Provide the refactored code.",
      "autoContext": true
    },
    {
      "match": "**/*",
      "title": "Optimize Using DRY Principles",
      "prompt": "Refactor the following code to eliminate redundancy and improve maintainability by applying the DRY (Don't Repeat Yourself) principle. Identify repeated code patterns and abstract them into reusable functions or classes as appropriate.",
      "autoContext": false
    }
  ]
}

Released under the MIT License.