Blog AI/ML Developing GitLab Duo: A roundup of recent Chat enhancements
Published on: July 10, 2024
6 min read

Developing GitLab Duo: A roundup of recent Chat enhancements

Discover the latest improvements to GitLab Duo Chat, including a new integration, prompt cancellation, and architectural upgrades.

gitlab duo - new cover

GitLab is committed to continuously improving GitLab Duo Chat, our AI assistant, to meet the evolving needs of our users. Here are some recent enhancements that will streamline your workflow and boost productivity.

Discover the future of AI-driven software development with our GitLab 17 virtual launch event. Watch today!

Vulnerability Explanation: A new integration

We've reached a significant milestone in the evolution of Chat: the integration of GitLab Duo Vulnerability Explanation. This marks the first feature from our GitLab Duo platform to be integrated into Chat by a team outside of the AI group, showcasing the collaborative spirit and cross-functional capabilities at GitLab.

Key highlights of this integration:

  • Swift execution: The team moved from a spike to implementation in just three weeks, demonstrating agility and execution.
  • Cross-team collaboration: This integration was led by teams outside the AI group, paving the way for more diverse feature integrations in the future.
  • Enhanced security insights: Users will soon be able to leverage Chat to gain deeper understanding of vulnerabilities detected in their projects.

This integration represents a significant step forward in making Chat an even more powerful and versatile tool for developers, particularly in the realm of security.

Enhanced context awareness

We've made significant strides in improving Chat's context awareness, making it more intelligent and helpful in various scenarios.

Always-available knowledge

GitLab Duo Chat always has access to:

  • GitLab documentation
  • General programming and coding knowledge

It's crucial to understand that Chat does not have unrestricted access to your entire GitLab instance or codebase. It only processes the specific information you provide in your query or what's immediately relevant to your current view in the GitLab UI or IDE.

We're continuously working to expand Chat's contextual awareness to include more types of content, always with a focus on user privacy and data security. This gradual expansion aims to make Chat an even more powerful assistant for your development workflow while maintaining appropriate data access boundaries.

Expanded contextual knowledge

GitLab Duo Chat now has a better understanding of the context you're working in, both in the GitLab UI and IDEs. Here's a breakdown of what Chat is aware of.

In the GitLab UI:

  • Epics - Chat understands when you refer to "this epic" or use the epic's URL.
  • Issues - Similar to epics, Chat recognizes "this issue" or the issue's URL.
  • Code files - When viewing a single file, Chat can interpret requests about "this code" or "this file".

In IDEs:

  • Selected code - Chat can analyze code you've selected when you ask about "this code" or "this file".
  • Epics and issues - Chat can understand context when you provide the URL.

Additionally, when using slash commands like /explain, /refactor, or /tests in IDEs, Chat has access to the selected code.

Screenshot of GitLab Duo Chat window

Chat history and caching

GitLab Duo Chat retains the last 50 messages in the chat history. This history expires three days after last use. Closing your browser or IDE will not permanently delete your chat history within this timeframe, but it's important to note that long-term persistence of chat data is not currently supported.

Prompt cancellation: Stop responses on demand

One of the most anticipated features is now available: prompt cancellation. Users can now cancel ongoing prompts in Chat on GitLab.com, giving you more control over your interactions.

  • Available now: This feature has been rolled out on GitLab.com.
  • Coming soon: This feature will be available for self-managed instances in our next release. GitLab Dedicated users will receive it in the monthly upgrade.
  • Work in progress: Integration for editor extensions - follow along in the issue.

This enhancement allows you to stop a response if you've sent a prompt too early or had a change of thought while waiting. It's a small but powerful feature that can save you time and frustration.

To cancel a prompt in GitLab Duo Chat, follow these steps:

  1. Open GitLab Duo Chat on GitLab.com.
  2. Start typing a prompt or question such as What is this issue about?.

Screen showing the start of how to cancel prompts in GitLab Duo Chat

  1. After sending the prompt, if you wish to cancel the response, look for the new "Cancel" button that appears while Chat is generating a response.

Screenshot of Chat with Cancel button

  1. Click the "Cancel" button to immediately stop the response generation.

Screenshot showing response stopped

Architectural improvements

Behind the scenes, we've been working on architectural improvements to make GitLab Duo Chat more robust and efficient:

  • Moving to Language Server Protocol (LSP): This effort improves the integration of Chat with various development environments.
  • GitLab Language Server is an experimental TypeScript project that provides a common interface for IDE extensions to build GitLab functionality. It currently supports GitLab Duo Code Suggestions and upcoming will support GitLab Duo Chat.

While this change primarily affects the underlying architecture, users may notice:

  • Improved responsiveness and performance when using Chat across different IDEs and editors.
  • More consistent behavior of Chat features across various development environments.
  • Enhanced ability to add new features and improvements in the future.

Check out our introduction to how GitLab Language Server powers Code Suggestions in this video walkthrough:

What's next?

We're continuously improving GitLab Duo Chat. Here are some highlights:

  • We're in the process of migrating our AI features to Claude 3.5 Sonnet. This upgrade will bring improved performance and capabilities to Chat and other AI-powered features.
  • We're actively working on enabling Chat to work with custom, self-hosted models. This will allow organizations to use their own AI models with Chat, providing more control over the AI's knowledgebase and potentially improving performance for domain-specific tasks.
  • We're currently finishing the synchronization of messages across all clients, including WebUI, to ensure seamless communication and keep all your clients in sync, enhancing your collaboration experience.
  • We’re migrating the “Summarize Comments” feature to Chat. You'll be able to summarize multiple comments on an issue directly within Chat, helping you quickly understand the main points and key takeaways from discussions, thereby improving your collaborative experience.

We look forward to hearing your feedback on these enhancements. Stay tuned for more updates as we continue to evolve GitLab Duo Chat.

Find out even more about how we are developing GitLab Duo with our ongoing series.

We want to hear from you

Enjoyed reading this blog post or have questions or feedback? Share your thoughts by creating a new topic in the GitLab community forum. Share your feedback

Ready to get started?

See what your team could do with a unified DevSecOps Platform.

Get free trial

Find out which plan works best for your team

Learn about pricing

Learn about what GitLab can do for your team

Talk to an expert