mirror of
https://github.com/google-gemini/gemini-cli.git
synced 2026-07-01 05:36:46 -07:00
fix(core): resolve context initialization mismatch and ensure spread-safety
- Added unit tests to verify AgentLoopContext spread-safety in Config. - Restored AgentLoopContext abstraction in ShellTool, WebFetchTool, and WebSearchTool constructors. - Removed redundant defensive optional chaining on config properties in UI and policy logic. - Updated PR title to follow Conventional Commits.
This commit is contained in:
@@ -88,14 +88,13 @@ export const ToolConfirmationMessage: React.FC<
|
||||
const settings = useSettings();
|
||||
const allowPermanentApproval =
|
||||
settings.merged.security.enablePermanentToolApproval &&
|
||||
(config?.getDisableAlwaysAllow ? !config.getDisableAlwaysAllow() : true);
|
||||
!config.getDisableAlwaysAllow();
|
||||
|
||||
const handlesOwnUI =
|
||||
confirmationDetails.type === 'ask_user' ||
|
||||
confirmationDetails.type === 'exit_plan_mode';
|
||||
const isTrustedFolder =
|
||||
config?.isTrustedFolder?.() &&
|
||||
(config?.getDisableAlwaysAllow ? !config.getDisableAlwaysAllow() : true);
|
||||
config.isTrustedFolder() && !config.getDisableAlwaysAllow();
|
||||
|
||||
const handleConfirm = useCallback(
|
||||
(outcome: ToolConfirmationOutcome, payload?: ToolConfirmationPayload) => {
|
||||
|
||||
Reference in New Issue
Block a user