Finds similar code in selected files with semantic embeddings, so you can refactor and DRY up your codebase.
- Run
Code Dryer: Dry - Select files
- See similarity results
Code Dryer extracts functions, classes, and top-level code chunks from the files you select, computes embeddings for each chunk, and finds nearest neighbor matches so you can refactor them and stay DRY.
- Extracts symbols and top-level code chunks
- Computes and caches embeddings per workspace
- Performs cosine nearest neighbor search for similarity
- Shows results in a simple similarities view
- Install dependencies:
npm install- Press
F5to open the Extension Development Host, then run theCode Dryer: Drycommand and select files.
In a large codebase, it isn't always easy to find similar code sections that could be refactored. With Code Dryer, you can quickly identify these sections and DRY up your code.
- Embeddings are stored in the extension global storage (per workspace).