Skip to content

Discrepancy in how resourcePath is parsed and the two llm tools #408

@DonJayamanne

Description

@DonJayamanne
  • In get tool, we look at Projects and get the workspace path related to the project root
  • In install tool, we parse the Uri as is

Based on the description for both tools, the resourcePath is identital.

Also, there's no need to have an optional type for resourcePath in the types as the validation is performed by Copilot, i.e. its not possible for this to be empty.
I.e. the following is not required

        const workspacePath = parameters.resourcePath ? Uri.file(parameters.resourcePath) : undefined;
        if (!workspacePath) {
            throw new Error('Invalid input: workspacePath is required');
        }
..
        if (parameters.resourcePath === undefined || parameters.resourcePath === '') {
            throw new Error('Invalid input: resourcePath is required');
        }

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions