Skip to content

fix(chat-client): workspace checks for permission cards #1089

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 8 commits into from
Apr 23, 2025

Conversation

ashishrp-aws
Copy link
Contributor

@ashishrp-aws ashishrp-aws commented Apr 23, 2025

Problem

Permission check cards are appearing for all the files inside workspace. This is happening due to regresion in workspace.getTextDocument failure which works only for open documents on editor.

Solution

  • Fixing workspace check for all tools with lsp.

License

By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.

@ashishrp-aws ashishrp-aws requested a review from a team as a code owner April 23, 2025 17:43
@Hweinstock
Copy link
Contributor

This test might also need to be updated. I believe it was relying on the old utility which is no longer used.

should not require acceptance if fsPath is inside the workspace:

      AssertionError [ERR_ASSERTION]: Expected requiresAcceptance to be false for a path inside the workspace
      + expected - actual

      -true
      +false
      
      at Context.<anonymous> (src/language-server/agenticChat/tools/fsRead.test.ts:135:16)

@ashishrp-aws
Copy link
Contributor Author

fixing test and corrected it for comments

@Hweinstock
Copy link
Contributor

LGTM, will merge once CI passes.

@Hweinstock Hweinstock merged commit bdecb10 into aws:main Apr 23, 2025
6 checks passed
@ashishrp-aws ashishrp-aws deleted the fix-workspace-permission-checks branch May 5, 2025 19:40
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants