mirror of
https://github.com/google-gemini/gemini-cli.git
synced 2026-04-30 06:54:15 -07:00
feat(cli): Add permissions command to modify trust settings (#8792)
This commit is contained in:
@@ -157,6 +157,16 @@ export const AppContainer = (props: AppContainerProps) => {
|
||||
config.getWorkingDir(),
|
||||
);
|
||||
|
||||
const [isPermissionsDialogOpen, setPermissionsDialogOpen] = useState(false);
|
||||
const openPermissionsDialog = useCallback(
|
||||
() => setPermissionsDialogOpen(true),
|
||||
[],
|
||||
);
|
||||
const closePermissionsDialog = useCallback(
|
||||
() => setPermissionsDialogOpen(false),
|
||||
[],
|
||||
);
|
||||
|
||||
// Helper to determine the effective model, considering the fallback state.
|
||||
const getEffectiveModel = useCallback(() => {
|
||||
if (config.isInFallbackMode()) {
|
||||
@@ -424,6 +434,7 @@ Logging in with Google... Please restart Gemini CLI to continue.
|
||||
openEditorDialog,
|
||||
openPrivacyNotice: () => setShowPrivacyNotice(true),
|
||||
openSettingsDialog,
|
||||
openPermissionsDialog,
|
||||
quit: (messages: HistoryItem[]) => {
|
||||
setQuittingMessages(messages);
|
||||
setTimeout(async () => {
|
||||
@@ -445,6 +456,7 @@ Logging in with Google... Please restart Gemini CLI to continue.
|
||||
setShowPrivacyNotice,
|
||||
setCorgiMode,
|
||||
setExtensionsUpdateState,
|
||||
openPermissionsDialog,
|
||||
],
|
||||
);
|
||||
|
||||
@@ -985,6 +997,7 @@ Logging in with Google... Please restart Gemini CLI to continue.
|
||||
!!loopDetectionConfirmationRequest ||
|
||||
isThemeDialogOpen ||
|
||||
isSettingsDialogOpen ||
|
||||
isPermissionsDialogOpen ||
|
||||
isAuthenticating ||
|
||||
isAuthDialogOpen ||
|
||||
isEditorDialogOpen ||
|
||||
@@ -999,6 +1012,7 @@ Logging in with Google... Please restart Gemini CLI to continue.
|
||||
const uiState: UIState = useMemo(
|
||||
() => ({
|
||||
history: historyManager.history,
|
||||
historyManager,
|
||||
isThemeDialogOpen,
|
||||
themeError,
|
||||
isAuthenticating,
|
||||
@@ -1012,6 +1026,7 @@ Logging in with Google... Please restart Gemini CLI to continue.
|
||||
debugMessage,
|
||||
quittingMessages,
|
||||
isSettingsDialogOpen,
|
||||
isPermissionsDialogOpen,
|
||||
slashCommands,
|
||||
pendingSlashCommandHistoryItems,
|
||||
commandContext,
|
||||
@@ -1074,7 +1089,6 @@ Logging in with Google... Please restart Gemini CLI to continue.
|
||||
embeddedShellFocused,
|
||||
}),
|
||||
[
|
||||
historyManager.history,
|
||||
isThemeDialogOpen,
|
||||
themeError,
|
||||
isAuthenticating,
|
||||
@@ -1088,6 +1102,7 @@ Logging in with Google... Please restart Gemini CLI to continue.
|
||||
debugMessage,
|
||||
quittingMessages,
|
||||
isSettingsDialogOpen,
|
||||
isPermissionsDialogOpen,
|
||||
slashCommands,
|
||||
pendingSlashCommandHistoryItems,
|
||||
commandContext,
|
||||
@@ -1147,6 +1162,7 @@ Logging in with Google... Please restart Gemini CLI to continue.
|
||||
currentModel,
|
||||
extensionsUpdateState,
|
||||
activePtyId,
|
||||
historyManager,
|
||||
embeddedShellFocused,
|
||||
],
|
||||
);
|
||||
@@ -1162,6 +1178,7 @@ Logging in with Google... Please restart Gemini CLI to continue.
|
||||
exitEditorDialog,
|
||||
exitPrivacyNotice: () => setShowPrivacyNotice(false),
|
||||
closeSettingsDialog,
|
||||
closePermissionsDialog,
|
||||
setShellModeActive,
|
||||
vimHandleInput,
|
||||
handleIdePromptComplete,
|
||||
@@ -1184,6 +1201,7 @@ Logging in with Google... Please restart Gemini CLI to continue.
|
||||
handleEditorSelect,
|
||||
exitEditorDialog,
|
||||
closeSettingsDialog,
|
||||
closePermissionsDialog,
|
||||
setShellModeActive,
|
||||
vimHandleInput,
|
||||
handleIdePromptComplete,
|
||||
|
||||
Reference in New Issue
Block a user