Skip to content

VSCode GitHub Copilot Edit tool cannot be used to edit file open from Overleaf Workshop #254

@wongluffy

Description

@wongluffy

Describe the bug

The Overleaf Workshop plugin is installed in VSCode, and it connects to an account on the Overleaf official website via cookies through the Overleaf Workshop plugin. One of the projects is opened, and a tex file is opened within the project.
GitHub Copilot is then launched, and the edit option is selected.
After entering an edit command, GitHub Copilot responds: "It seems the file is not recognized as being inside the current workspace, so I cannot directly edit it. Could you confirm if the file path is correct or provide access to the file within the workspace?"

Expected behavior

Use GitHub Copilot's edit feature to edit files in projects opened by Overleaf Workshop

Environment

  • Overleaf Workshop Extension version: [latest]
  • VS Code version: [latest]
  • Overleaf Edition: Official / Community

[Optional] Developer Logs

ERR Cannot read properties of undefined (reading 'code'): TypeError: Cannot read properties of undefined (reading 'code')
at MisspellingCheckProvider.provideCodeActions (c:\Users\123.vscode\extensions\iamhyc.overleaf-workshop-0.15.3\out\intellisense\langMisspellingCheckProvider.js:102:61)
at cm.provideCodeActions
ERR [LanguageModelToolsService#invokeTool] Error from tool vscode_editFile_internal: File \overleaf-workshop:\www.overleaf.com\123\main.tex?user%32DDF3FRF3%21project%SDF3321FEF2F can't be edited because it's not inside the current workspace. With parameters {"file":{"$mid":1,"path":"/overleaf-workshop://www.overleaf.com/123/main.tex?user%32DDF3FRF3%21project%SDF3321FEF2F","scheme":"file"},"explanation":"Improved the comments in the preamble for better clarity and understanding of the purpose of each package and command.","code":"% Improved comments for better clarity\n% The following line is only needed to identify funding in the first footnote. If that is unneeded, please comment it out.\n% Removed algorithmic and algorithm packages as they are not used in this document.\n% Added hyperref package to enable clickable references and URLs.\n% Using algorithm2e package for algorithms with line numbering, ruled, and vlined styles.\n% Added algorithmicx package for additional algorithm features.\n% Defined a command to fix LaTeX errors related to algorithms.\n% Defined common keywords for algorithms to maintain consistency."}
ERR [LanguageModelToolsService#invokeTool] Error from tool copilot_insertEdit: File \overleaf-workshop:\www.overleaf.com can't be edited because it's not inside the current workspace. With parameters {"code":"% Improved comments for better clarity\n% The following line is only needed to identify funding in the first footnote. If that is unneeded, please comment it out.\n% Removed algorithmic and algorithm packages as they are not used in this document.\n% Added hyperref package to enable clickable references and URLs.\n% Using algorithm2e package for algorithms with line numbering, ruled, and vlined styles.\n% Added algorithmicx package for additional algorithm features.\n% Defined a command to fix LaTeX errors related to algorithms.\n% Defined common keywords for algorithms to maintain consistency.","explanation":"Improved the comments in the preamble for better clarity and understanding of the purpose of each package and command.","filePath":"

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workingcannot-reproduceThe bug cannot be reproduced under normal condition.

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions