Add privacy notice slash command (#2059)

This commit is contained in:
Tommaso Sciortino
2025-06-27 12:07:38 -07:00
committed by GitHub
parent 4fbffdf617
commit a2a46c7c67
13 changed files with 468 additions and 15 deletions

View File

@@ -76,6 +76,7 @@ export const useSlashCommandProcessor = (
toggleCorgiMode: () => void,
showToolDescriptions: boolean = false,
setQuittingMessages: (message: HistoryItem[]) => void,
openPrivacyNotice: () => void,
) => {
const session = useSessionStats();
const gitService = useMemo(() => {
@@ -254,6 +255,13 @@ export const useSlashCommandProcessor = (
openEditorDialog();
},
},
{
name: 'privacy',
description: 'display the privacy notice',
action: (_mainCommand, _subCommand, _args) => {
openPrivacyNotice();
},
},
{
name: 'stats',
altName: 'usage',
@@ -1022,6 +1030,7 @@ export const useSlashCommandProcessor = (
setQuittingMessages,
pendingCompressionItemRef,
setPendingCompressionItem,
openPrivacyNotice,
]);
const handleSlashCommand = useCallback(