ai icon indicating copy to clipboard operation
ai copied to clipboard

Bug: repo name is being empty

Open a0m0rajab opened this issue 1 year ago • 1 comments

Describe the bug

Sometimes the repo name is being empty in the bubble chat in the extension. this is happening due the repo name detector logic we have in this line of code:

const repoName = window.location.href.split("/").pop() ?? "";

This is happening when the URL has a slash at the end of it.

Steps to reproduce

  1. go to https://github.com/ahmadbilaldev/langui/
  2. check the network when you use the AI chat

Browsers

No response

Additional context (Is this in dev or production?)

No response

Code of Conduct

  • [X] I agree to follow this project's Code of Conduct

Contributing Docs

  • [ ] I agree to follow this project's Contribution Docs

a0m0rajab avatar Nov 18 '23 20:11 a0m0rajab