Smart Paste ​
Command Name: aide.smartPaste
Use AI to intelligently recognize code or images from the clipboard and perform format conversion, then paste it into the current editor.
This feature can significantly enhance development efficiency, especially when dealing with cross-language or cross-framework code conversions.
WARNING
This feature requires AI model support for function_call capability.
The image reading feature requires enabling the aide.readClipboardImage configuration. The AI model must also support image reading. We recommend using the gpt-4o model.
Scenarios:
- As a
CVengineer not satisfied with the status quo, you desire a smarter paste function. - Smart Paste will intelligently recognize clipboard content and automatically convert it.
- Copying
JSONand pasting into aTypeScriptfile will automatically generate type definitions. - Copying
HTMLand pasting into aFlutterfile will automatically convert it into aFlutter Widget. - Copying a
Pythonfunction and pasting into aRustfile will automatically generate the correspondingRustfunction. - Copying a design draft screenshot and pasting into
Vue/React/Fluttercode will automatically generate the correspondingUIcode. - Copying a database design diagram and pasting into an
SQLfile will automatically generate the relevantSQLcode. - More features await your imagination...
Usage:
- Copy code from somewhere else to the clipboard.
- Place the cursor at the desired location in the editor. (This position will affect the paste result)
- Right-click and select
✨ Aide: Smart Paste.
Examples:
- From
JSONtoTypeScriptType
Suppose you have the following JSON data:
{
"name": "John",
"age": 30,
"isAdmin": true
}Copy it to the clipboard, then use the Smart Paste feature in a TypeScript file, and Aide will automatically convert it into a TypeScript type definition:
type User = {
name: string
age: number
isAdmin: boolean
}- From
TailwindCSS HTMLtoFlutter Widget
Suppose you have the following TailwindCSS HTML code:
<div class="bg-blue-500 text-white p-4">Hello, World!</div>Copy it to the clipboard, then use the Smart Paste feature in a Flutter file, and Aide will automatically convert it into a Flutter Widget:
Container(
color: Colors.blue,
padding: EdgeInsets.all(16),
child: Text(
'Hello, World!',
style: TextStyle(color: Colors.white),
),
)Related Configuration:
- You can customize whether certain scenarios can read clipboard images as AI context by configuring
aide.readClipboardImage.