[go: up one dir, main page]

Skip to content

Web Agentic Chat URL + Page Title Context

What does this MR do and why?

References

This change improves how GitLab's AI chat feature understands the context of where users are when they ask questions.

Previously, the system only included specific resource data (like issue or merge request details) when available. Now it always includes basic page information - the current URL and page title - as foundational context, and then adds any additional resource data on top of that.

The change also removes some backend code that was tracking AI resources in certain controllers, suggesting a shift toward handling this context differently - likely moving the responsibility to the frontend chat component itself rather than the server-side controllers.

In practical terms, this means the AI assistant will have better awareness of what page the user is on when they ask questions, which should help it provide more relevant and contextual responses. For example, if someone asks "what is this?" while viewing a specific merge request, the AI will know both the page URL and title, plus any specific details about that merge request.

The other big improvement is that we only add minimal additional Context vs now where we inject all the time into the context already a JSON blob of the currently. Which adds a lot of tokens which slows down the responses especially on larger items. Now it will retrieve through its tools content if needed.

This also enables immediately asking questions about Current Files and current epic.

Screenshots or screen recordings

CleanShot_2025-10-16_at_20.39.40_2x CleanShot_2025-10-16_at_20.42.03_2x CleanShot_2025-10-16_at_20.43.27_2x CleanShot_2025-10-16_at_20.45.21_2x

Before After
CleanShot_2025-10-16_at_20.26.06_2x CleanShot_2025-10-16_at_20.26.24_2x

How to set up and validate locally

  1. Use agentic chat and validate that we send current_gitlab_page_url and current_gitlab_page_title as part of the additional context xml info and not full json blobs anymore

MR acceptance checklist

Evaluate this MR against the MR acceptance checklist. It helps you analyze changes to reduce risks in quality, performance, reliability, security, and maintainability.

Edited by Tim Zallmann

Merge request reports

Loading