feat: Persistent "Always Allow" policies with granular shell & MCP support (#14737)

Co-authored-by: gemini-code-assist[bot] <176961590+gemini-code-assist[bot]@users.noreply.github.com>
This commit is contained in:
Allen Hutchison
2025-12-12 13:45:39 -08:00
committed by GitHub
parent d2a1a45646
commit 5f298c17d7
18 changed files with 431 additions and 21 deletions

View File

@@ -114,6 +114,11 @@ export const ToolConfirmationMessage: React.FC<
value: ToolConfirmationOutcome.ProceedAlways,
key: 'Yes, allow always',
});
options.push({
label: 'Yes, allow always and save to policy',
value: ToolConfirmationOutcome.ProceedAlwaysAndSave,
key: 'Yes, allow always and save to policy',
});
}
if (!config.getIdeMode() || !isDiffingEnabled) {
options.push({
@@ -145,6 +150,11 @@ export const ToolConfirmationMessage: React.FC<
value: ToolConfirmationOutcome.ProceedAlways,
key: `Yes, allow always ...`,
});
options.push({
label: `Yes, allow always and save to policy`,
value: ToolConfirmationOutcome.ProceedAlwaysAndSave,
key: `Yes, allow always and save to policy`,
});
}
options.push({
label: 'No, suggest changes (esc)',
@@ -164,6 +174,11 @@ export const ToolConfirmationMessage: React.FC<
value: ToolConfirmationOutcome.ProceedAlways,
key: 'Yes, allow always',
});
options.push({
label: 'Yes, allow always and save to policy',
value: ToolConfirmationOutcome.ProceedAlwaysAndSave,
key: 'Yes, allow always and save to policy',
});
}
options.push({
label: 'No, suggest changes (esc)',
@@ -190,6 +205,11 @@ export const ToolConfirmationMessage: React.FC<
value: ToolConfirmationOutcome.ProceedAlwaysServer,
key: `Yes, always allow all tools from server "${mcpProps.serverName}"`,
});
options.push({
label: `Yes, allow always tool "${mcpProps.toolName}" and save to policy`,
value: ToolConfirmationOutcome.ProceedAlwaysAndSave,
key: `Yes, allow always tool "${mcpProps.toolName}" and save to policy`,
});
}
options.push({
label: 'No, suggest changes (esc)',