GitLab Chat Follow Up - Fix API URL
What does this MR do and why?
Fixes bug with API using a relative path rather than an absolute path.
note: Api.buildURL() handles gon.relative_url_root
.
Screenshots or screen recordings
N/A
How to set up and validate locally
- Ensure you are on GitLab Ultimate with a valid license
- Enable Feature Flags:
Feature.enable(:openai_experimentation)
andFeature.enable(:tanuki_bot)
- Ensure the New navigation is enabled. You can enable it by clicking your User profile photo in the top right and toggle the switch
- Click the help link in the bottom left of the new Sidebar navigation
- Click Ask the GitLab Chat link
- Open network tab and then send request to GitLab Chat (note: the API request will likely fail 500 as it isn't easily setup for GDK yet)
- Ensure network request goes to
${PATH}/-/llm/tanuki_bot/ask
- Go to a page that has a path (IE. a Project)
- Follow same steps as above and ensure the network request goes to
${PATH}/-/llm/tanuki_bot/ask
, ignoring the UI path
MR acceptance checklist
This checklist encourages us to confirm any changes have been analyzed to reduce risks in quality, performance, reliability, security, and maintainability.
-
I have evaluated the MR acceptance checklist for this MR.