aide.aiCommand ​
This configuration allows you to customize the template used for the ✨ Aide: Ask AI
command execution. The template can include some variables:
Template Parameters:
Parameter | Description | Output Example |
---|---|---|
#{filesRelativePath} | Variable for file paths | "./src/index.ts" "./src/utils.ts" |
#{filesFullPath} | Variable for full paths | "/project/src/index.ts" "/project/src/utils.ts" |
#{question} | Variable for user query | "What is the purpose of this code?" |
#{content} | Variable for file content |
|
Usage Example:
Default Template:
By default, the template is blank, and you'll need to provide a custom template.
Example:
It is recommended to use the
aider (a highly regarded command-line AI tool)
command to ask AI questions about the selected files.If you want to open a new terminal window each time to ask a question to
aider
, you can use the following template:plaintextaider #{filesRelativePath}
If you prefer to manually start
aider
and then add files manually, you can setaide.aiCommandCopyBeforeRun
totrue
andaide.aiCommandAutoRun
tofalse
. Then, use the following template:plaintext/add #{filesRelativePath}
This way, you can copy commands like
/add ./src/aaa.ts ./src/bbb.ts
and paste them into theaider
terminal window each time.