Overleaf-Workshop icon indicating copy to clipboard operation
Overleaf-Workshop copied to clipboard

Failed to parse Overleaf project name with square brackets ([]) in VSCode extension

Open LaureatePoet opened this issue 6 months ago • 5 comments

Describe the bug

When connecting to an Overleaf project whose project name contains square brackets (e.g., project[example]), the Overleaf Workshop VSCode extension fails to parse the project correctly. This causes Copilot chat and other extension features to malfunction or report errors related to file system provider parsing.

Expected behavior

The extension should correctly handle and parse Overleaf project names that include square brackets ([]) or other special characters, allowing all features such as Copilot chat to work normally regardless of project naming.

How To Reproduce

  1. Create or use an Overleaf project with a name that includes square brackets, for example: test[abc].
  2. Connect to this project using the Overleaf Workshop VSCode extension.
  3. Attempt to use Copilot chat or perform normal operations.
  4. Observe that an error is reported, such as:

    Failed to parse file system provider for uri: "overleaf-workshop://example.com?user=*******&project=******" or that chat/features do not work as expected.

Environment

  • Overleaf Workshop Extension version: 0.15.4
  • VS Code version: 1.101.2
  • Overleaf Edition: Official , Community

LaureatePoet avatar Jul 03 '25 04:07 LaureatePoet

The PR #284 is merged, thanks for your contribution!

iamhyc avatar Jul 08 '25 14:07 iamhyc

I've re-tested this issue with the latest version, v0.15.5, and I can confirm that my previous PR did not fix the problem. The bug still exists. When connecting to an Overleaf project with a name containing square brackets (e.g., test[abc]), the extension fails to parse the project URI correctly.

LaureatePoet avatar Jul 10 '25 04:07 LaureatePoet

@LaureatePoet Sorry I may have no time to test this. Maybe @QianrenLi can help reproduce the case.

iamhyc avatar Jul 10 '25 13:07 iamhyc

I've re-tested this issue with the latest version, v0.15.5, and I can confirm that my previous PR did not fix the problem. The bug still exists. When connecting to an Overleaf project with a name containing square brackets (e.g., test[abc]), the extension fails to parse the project URI correctly.

Hi, @LaureatePoet, thank you for the report. Since I hadn't used Copilot for a while, I reinstalled it (v1.342.0). In a test project named test[abc], autocompletion appears to be working. Could you share more details about the expected behavior in normal operations that you mentioned to be failed?

QianrenLi avatar Jul 11 '25 07:07 QianrenLi

Hello,

To clarify, the issue is not that "Copilot's autocomplete feature has an error."

The problem is with Copilot Chat. If you try to use the chat feature, you'll find that you cannot start a conversation.

Furthermore, if you attempt to configure Copilot Chat, you will receive the following error: "Unable to resolve file system provider for relative file path: "overleaf-workshop://www.overleaf.com?user=********&project=********"

Image

LaureatePoet avatar Jul 11 '25 08:07 LaureatePoet