How to use DVT AI Assistant for revision control in VS Code

Overview

This video explains how DVT AI Assistant can help with revision control: generate a commit message for staged changes directly in the Source Control view, fine‑tune the message and summarize incoming changes in the AI Assistant Chat. It also illustrates how you can easily adapt the predefined blueprints built for Git to any version‑control system, with a particular example for Perforce.

Details

Introduction

DVT AI Assistant can help streamline your revision control workflows in the DVT IDE.

In this example, we've just added a new signal and propagated it across multiple levels of the design hierarchy. As you can see, the change spans across quite a few files in our project.

Generate commit message from the git Source Control view

Let's stage these changes and click the Generate commit message using DVT AI Assistant button, located directly in the Source Control view. Notice how the commit message box gets populated with a context‑aware description of our modifications.

Refine commit message and summmarize incoming changes in the AI Assistant Chat view

If you want to further finetune the message, open the AI Assistant commands list and select Generate commit message (in chat). Here, in the AI Assistant Chat, you can iterate until the output meets your expectations.

Now let's commit and push. As you can see, it looks like there are some incoming changes from the remote, and we get the typical "non-fast-forward" error

To quickly understand the incoming changes and assess if conflicts are likely to appear you can run Summarize remote changes ahead of current commit.

Customize predefined blueprints for your own workflow

You can easily adapt the built-in blueprints to your own workflow. For instance, you can use equivalent commands for other revision control systems.

Let's switch to this other project that uses Perforce. First, we run Edit Predefined Blueprint. Then, in the chat view we ask the AI Assistant to adapt the blueprint for Perforce. Once the changes are done we can simply run the modified blueprint as shown earlier.