feat: Handle openUrl notification for Agentic Chat

Description

Handle link clicks in the Agentic chat. It gets notification from the LS and uses VSCode API to open link externally.

Why we have openLink and openUrl: We use openLink notification with href parameter in the Duo Chat. Though the better naming would be openUrl with url param. We implement this better naming in the Agentic Chat but the Duo Chat still uses the openLink. I could have renamed the notification in the Duo Chat but it would break other extensions or they'd need to update. I could use openLink in the Agentic Chat but now seems a good opportunity to make things right. Other extension will have their integration time and can rename it then.

Related Issues

gitlab-org/editor-extensions/gitlab-lsp#1073 (closed)

How has this been tested?

  1. Link this LS MR in the extension built from this branch
  2. Ask Agentic chat to generate a clickable link to GitLab. Note that only internal instance links are clickable - the rest are sanitised for security reasons
  3. Click the link. VSCode will show a confirmation popup about opening a link.

What CHANGELOG entry will this MR create?

  • fix: Bug fix fixes - a user-facing issue in production - included in changelog
  • feature: New feature - a user-facing change which adds functionality - included in changelog
  • BREAKING CHANGE: (fix or feature that would cause existing functionality to change) - should bump major version, mentioned in the changelog
  • None - other non-user-facing changes
Edited by Olena Horal-Koretska

Merge request reports

Loading
Loading