Cody for VS Code v0.12 release

Kalan Chan, Tim Lucas, Beatrix Woo

Cody for VS Code v0.12 is now available and includes improved unit test generation, customizable chat pre-instructions, new custom command documentation, a new claude-instant-infill autocomplete model, and a new sign in experience.

Improved unit test generation (/test)

Unit test generation now better detects your testing framework, adds any dependency imports as needed, and includes the necessary stubs and test setup code:

Screenshot of an improved unit test

Chat pre-instructions

We’ve added a new cody.chat.preInstruction setting you can use instruct Cody at the beginning of every chat. For example, to have Cody output TypeScript you would set the pre-instruction to Prefer TypeScript over JavaScript:

Screenshot of chat output with a pre-instruction set

To set a pre-instruction, in your VS Code user or workspace settings configure the cody.chat.preInstruction setting.

New custom commands documentation and menu improvements

We added new documentation for the experimental custom commands feature:

Screenshot of the new custom Commands documentation

The "New Custom Command…" menu has been updated and allows you to choose where to save your new command, and a button for showing the generated JSON.

Screenshot of the New Custom Command menu save location Screenshot of the New Custom Command menu JSON button

Insert at cursor no longer replaces selection

When you use the "Insert at Cursor" button in Cody’s chat view and have code selected in your editor, the code will be inserted before your selection instead of replacing the selected code.

New claude-instant-infill autocomplete model

We've migrated to an all-new claude-instant-infill autocomplete model that can produce higher quality autocompletions using the context of surrounding code. For example, it performs better at autocompleting function documentation, and suggesting variable names that are not already in use. This new model is enabled by default.

Code graph context for autocomplete

We've added experimental code graph context fetching support for autocomplete. This is a complete reimagining of context retrieval for autocomplete, and uses the underlying language server and temporal heuristics (recently viewed symbols) to populate the context for autocomplete suggestions. It’s currently supports JavaScript, TypeScript, and Go, and we'll be testing how it performs against embeddings and local keyword context.

Manually request an autocomplete

In cases where autocompletions don't automatically trigger, you can now request them manually using opt + \ on Mac, or alt + \ on Windows and Linux.

New sign in experience

For new users, you can now sign in to Cody directly using a Github, Gitlab or Google account:

Screenshot of the new sign in page

Changelog

See the changelog and GitHub releases for a complete list of changes.

Thank you

Cody is open source, and wouldn’t be what it is without our amazing contributors 💖 A big thank you to everyone who contributed, filed issues, and sent us feedback.


To get started with Cody, install it from the VS Code Marketplace.

Get Cody, the AI coding assistant

Cody makes it easy to write, fix, and maintain code.