diff options
| author | shrutip90 <[email protected]> | 2025-08-08 11:02:27 -0700 |
|---|---|---|
| committer | GitHub <[email protected]> | 2025-08-08 18:02:27 +0000 |
| commit | 34b5dc7f289dc9af0a87d3a795e681d2415da3c9 (patch) | |
| tree | 9f4b52a13c26a27ccd0eed28715362ee2ded0b65 /packages/cli/src/ui/App.tsx | |
| parent | 3af4913ef3f00de71744de551a568aa713a3beec (diff) | |
Add FolderTrustDialog that shows on launch and enables folderTrust setting (#5815)
Diffstat (limited to 'packages/cli/src/ui/App.tsx')
| -rw-r--r-- | packages/cli/src/ui/App.tsx | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/packages/cli/src/ui/App.tsx b/packages/cli/src/ui/App.tsx index 58a40b93..9550faa2 100644 --- a/packages/cli/src/ui/App.tsx +++ b/packages/cli/src/ui/App.tsx @@ -22,6 +22,7 @@ import { useGeminiStream } from './hooks/useGeminiStream.js'; import { useLoadingIndicator } from './hooks/useLoadingIndicator.js'; import { useThemeCommand } from './hooks/useThemeCommand.js'; import { useAuthCommand } from './hooks/useAuthCommand.js'; +import { useFolderTrust } from './hooks/useFolderTrust.js'; import { useEditorSettings } from './hooks/useEditorSettings.js'; import { useSlashCommandProcessor } from './hooks/slashCommandProcessor.js'; import { useAutoAcceptIndicator } from './hooks/useAutoAcceptIndicator.js'; @@ -36,6 +37,7 @@ import { ThemeDialog } from './components/ThemeDialog.js'; import { AuthDialog } from './components/AuthDialog.js'; import { AuthInProgress } from './components/AuthInProgress.js'; import { EditorSettingsDialog } from './components/EditorSettingsDialog.js'; +import { FolderTrustDialog } from './components/FolderTrustDialog.js'; import { ShellConfirmationDialog } from './components/ShellConfirmationDialog.js'; import { Colors } from './colors.js'; import { loadHierarchicalGeminiMemory } from '../config/config.js'; @@ -240,6 +242,9 @@ const App = ({ config, settings, startupWarnings = [], version }: AppProps) => { handleThemeHighlight, } = useThemeCommand(settings, setThemeError, addItem); + const { isFolderTrustDialogOpen, handleFolderTrustSelect } = + useFolderTrust(settings); + const { isAuthDialogOpen, openAuthDialog, @@ -905,6 +910,8 @@ const App = ({ config, settings, startupWarnings = [], version }: AppProps) => { description="If you select Yes, we'll install an extension that allows the CLI to access your open files and display diffs directly in VS Code." onComplete={handleIdePromptComplete} /> + ) : isFolderTrustDialogOpen ? ( + <FolderTrustDialog onSelect={handleFolderTrustSelect} /> ) : shellConfirmationRequest ? ( <ShellConfirmationDialog request={shellConfirmationRequest} /> ) : isThemeDialogOpen ? ( |
