-
Notifications
You must be signed in to change notification settings - Fork 80
feat(amazonq): add in-context permission update for built-in tools #2062
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
base: feat/builtintools-p2
Are you sure you want to change the base?
feat(amazonq): add in-context permission update for built-in tools #2062
Conversation
…lue in perm fill with all tools
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
High level, can we create seperate PRs for adding auto-approve back and in-context permission update? I feel like auto-approve will not likely needed even in the future, but in-context perm change will be. this way we can easily pick up and merge later.
chat-client/package.json
Outdated
@@ -27,7 +27,7 @@ | |||
"@aws/chat-client-ui-types": "^0.1.56", | |||
"@aws/language-server-runtimes": "^0.2.121", | |||
"@aws/language-server-runtimes-types": "^0.1.50", | |||
"@aws/mynah-ui": "^4.36.2" | |||
"@aws/mynah-ui": "../../mynah-ui" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is there some mynah changes that not yet released?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
yeah, it just got merged this morning. Im still waiting for the release today
@@ -448,7 +448,7 @@ export class McpManager { | |||
*/ | |||
public isToolDisabled(server: string, tool: string): boolean { | |||
// built-in tools cannot be disabled | |||
if (server === 'builtIn') { | |||
if (server === 'Built-in') { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
why are we changing this?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
if I change everything to builtIn --> the serverName shown on the MCP page will be builtIn instead of Built-in
try { | ||
await McpManager.instance.updateServerPermission(serverName, perm) | ||
// if the new permission is asks --> only update permission, dont continue | ||
if (new_permission === 'ask') { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Are we missing the handle of deny here? what happen if customer change to deny, updateServerPermission will remove this tool from agent context.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ah correct, this was previously for built-in tools, that why I did not handle it. I did separate mcp tools in-context, I can raise a PR for that separately. I have this on that branch
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
actually, I also have this feature branch that is having in-context for MCP: https://github.com/aws/language-servers/tree/feat/in-context-permission-mcp. Im waiting for mynah-ui release to raise a PR
Problem
Auto-approve feature got reverted. We need to enable it back along with P2 changes
Solution
Add back auto-approve
Fixed P0/P1:
Added P2:
Screenshots
Note: Text will be change in the future
License
By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.