mirror of
https://github.com/google-gemini/gemini-cli.git
synced 2026-03-17 01:21:10 -07:00
Check folder trust before allowing add directory (#12652)
This commit is contained in:
@@ -77,6 +77,7 @@ export const useSlashCommandProcessor = (
|
||||
actions: SlashCommandProcessorActions,
|
||||
extensionsUpdateState: Map<string, ExtensionUpdateStatus>,
|
||||
isConfigInitialized: boolean,
|
||||
setCustomDialog: (dialog: React.ReactNode | null) => void,
|
||||
) => {
|
||||
const session = useSessionStats();
|
||||
const [commands, setCommands] = useState<readonly SlashCommand[] | undefined>(
|
||||
@@ -215,6 +216,7 @@ export const useSlashCommandProcessor = (
|
||||
dispatchExtensionStateUpdate: actions.dispatchExtensionStateUpdate,
|
||||
addConfirmUpdateExtensionRequest:
|
||||
actions.addConfirmUpdateExtensionRequest,
|
||||
removeComponent: () => setCustomDialog(null),
|
||||
},
|
||||
session: {
|
||||
stats: session.stats,
|
||||
@@ -239,6 +241,7 @@ export const useSlashCommandProcessor = (
|
||||
sessionShellAllowlist,
|
||||
reloadCommands,
|
||||
extensionsUpdateState,
|
||||
setCustomDialog,
|
||||
],
|
||||
);
|
||||
|
||||
@@ -505,6 +508,10 @@ export const useSlashCommandProcessor = (
|
||||
true,
|
||||
);
|
||||
}
|
||||
case 'custom_dialog': {
|
||||
setCustomDialog(result.component);
|
||||
return { type: 'handled' };
|
||||
}
|
||||
default: {
|
||||
const unhandled: never = result;
|
||||
throw new Error(
|
||||
@@ -578,6 +585,7 @@ export const useSlashCommandProcessor = (
|
||||
setSessionShellAllowlist,
|
||||
setIsProcessing,
|
||||
setConfirmationRequest,
|
||||
setCustomDialog,
|
||||
],
|
||||
);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user