Closed leigaol closed 2 months ago
This pull request modifies a feature or fixes a bug, but it does not include a changelog entry. All pull requests that introduce new features or bug fixes must have a corresponding changelog item describing the changes.
unit test failures are not relevant to this PR
/retryBuilds
think it failed because of this test case involved in this change
559 passing (20s)
17 pending
1 failing
1) editorContext
getFileRelativePath
Should return relative path:
Error: / has incorrect permissions. Expected rwx, found r-x & r-x (ambiguous). [InvalidPermissions] (isOwner: false; mode: drwxr-xr-x 0 0)
+ expected - actual
-r-x
+*wx
at /codebuild/output/src2683340588/src/github.com/aws/aws-toolkit-vscode/packages/core/src/shared/fs/fs.ts:58:15
at async /codebuild/output/src2683340588/src/github.com/aws/aws-toolkit-vscode/packages/core/src/shared/fs/fs.ts:55:19
at async /codebuild/output/src2683340588/src/github.com/aws/aws-toolkit-vscode/packages/core/src/shared/fs/fs.ts:50:23
at async /codebuild/output/src2683340588/src/github.com/aws/aws-toolkit-vscode/packages/core/src/shared/fs/fs.ts:55:19
at async /codebuild/output/src2683340588/src/github.com/aws/aws-toolkit-vscode/packages/core/src/shared/fs/fs.ts:50:23
at async toFile (/codebuild/output/src2683340588/src/github.com/aws/aws-toolkit-vscode/packages/core/src/test/testUtil.ts:31:5)
at async openATextEditorWithText (/codebuild/output/src2683340588/src/github.com/aws/aws-toolkit-vscode/packages/core/src/test/testUtil.ts:344:5)
at async Context.<anonymous> (test/unit/codewhisperer/util/editorContext.test.ts:100:28)
deleteTestTempDirs: deleted 49 test temp dirs
Error: 1 tests failed.
think it failed because of this test case involved in this change
559 passing (20s) 17 pending 1 failing 1) editorContext getFileRelativePath Should return relative path: Error: / has incorrect permissions. Expected rwx, found r-x & r-x (ambiguous). [InvalidPermissions] (isOwner: false; mode: drwxr-xr-x 0 0) + expected - actual -r-x +*wx at /codebuild/output/src2683340588/src/github.com/aws/aws-toolkit-vscode/packages/core/src/shared/fs/fs.ts:58:15 at async /codebuild/output/src2683340588/src/github.com/aws/aws-toolkit-vscode/packages/core/src/shared/fs/fs.ts:55:19 at async /codebuild/output/src2683340588/src/github.com/aws/aws-toolkit-vscode/packages/core/src/shared/fs/fs.ts:50:23 at async /codebuild/output/src2683340588/src/github.com/aws/aws-toolkit-vscode/packages/core/src/shared/fs/fs.ts:55:19 at async /codebuild/output/src2683340588/src/github.com/aws/aws-toolkit-vscode/packages/core/src/shared/fs/fs.ts:50:23 at async toFile (/codebuild/output/src2683340588/src/github.com/aws/aws-toolkit-vscode/packages/core/src/test/testUtil.ts:31:5) at async openATextEditorWithText (/codebuild/output/src2683340588/src/github.com/aws/aws-toolkit-vscode/packages/core/src/test/testUtil.ts:344:5) at async Context.<anonymous> (test/unit/codewhisperer/util/editorContext.test.ts:100:28) deleteTestTempDirs: deleted 49 test temp dirs Error: 1 tests failed.
fixed
Problem
Inline completion quality can be improved by passing the relative path instead of file name.
Solution
In the inline API request payload, we send relative path instead of file name.
No user facing change log item is added. The service controls what is sent for generation, this change will not have immediate customer impact.
License: I confirm that my contribution is made under the terms of the Apache 2.0 license.