Skip to content

Commit 6ea09b2

Browse files
committed
fix: update default persona file spec and tool permisions strings
1 parent 72f54d2 commit 6ea09b2

File tree

2 files changed

+24
-12
lines changed

2 files changed

+24
-12
lines changed

server/aws-lsp-codewhisperer/src/language-server/agenticChat/tools/mcp/mcpEventHandler.ts

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -881,7 +881,7 @@ export class McpEventHandler {
881881
toolsWithPermissions.forEach(item => {
882882
const toolName = item.tool.toolName
883883
const currentPermission = this.#getCurrentPermission(item.permission)
884-
// For Built-in server, use a special function that doesn't include the 'Disable' option
884+
// For Built-in server, use a special function that doesn't include the 'Deny' option
885885
const permissionOptions = this.#buildPermissionOptions(item.permission)
886886

887887
filterOptions.push({
@@ -902,11 +902,11 @@ export class McpEventHandler {
902902
*/
903903
#getCurrentPermission(permission: string): string {
904904
if (permission === McpPermissionType.alwaysAllow) {
905-
return 'Always run'
905+
return 'Always allow'
906906
} else if (permission === McpPermissionType.deny) {
907-
return 'Disable'
907+
return 'Deny'
908908
} else {
909-
return 'Ask to run'
909+
return 'Ask'
910910
}
911911
}
912912

@@ -917,15 +917,15 @@ export class McpEventHandler {
917917
const permissionOptions: PermissionOption[] = []
918918

919919
if (currentPermission !== McpPermissionType.alwaysAllow) {
920-
permissionOptions.push({ label: 'Always run', value: McpPermissionType.alwaysAllow })
920+
permissionOptions.push({ label: 'Always allow', value: McpPermissionType.alwaysAllow })
921921
}
922922

923923
if (currentPermission !== McpPermissionType.ask) {
924-
permissionOptions.push({ label: 'Ask to run', value: McpPermissionType.ask })
924+
permissionOptions.push({ label: 'Ask', value: McpPermissionType.ask })
925925
}
926926

927927
if (currentPermission !== McpPermissionType.deny) {
928-
permissionOptions.push({ label: 'Disable', value: McpPermissionType.deny })
928+
permissionOptions.push({ label: 'Deny', value: McpPermissionType.deny })
929929
}
930930

931931
return permissionOptions

server/aws-lsp-codewhisperer/src/language-server/agenticChat/tools/mcp/mcpUtils.ts

Lines changed: 17 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -134,11 +134,23 @@ const DEFAULT_PERSONA_RAW = `{
134134
],
135135
"toolPerms": {
136136
"builtIn": {
137-
"execute_bash": "alwaysAllow",
138-
"fs_read": "alwaysAllow",
139-
"fs_write": "ask",
140-
"report_issue": "alwaysAllow",
141-
"use_aws": "alwaysAllow"
137+
"execute_bash": {
138+
"alwaysAllow": [
139+
{
140+
"preset": "readOnly"
141+
}
142+
]
143+
},
144+
"fs_read": "alwaysAllow",
145+
"fs_write": "ask",
146+
"report_issue": "alwaysAllow",
147+
"use_aws": {
148+
"alwaysAllow": [
149+
{
150+
"preset": "readOnly"
151+
}
152+
]
153+
}
142154
}
143155
},
144156
"context": {

0 commit comments

Comments
 (0)