diff --git a/src/slashCommands.ts b/src/slashCommands.ts index d5ab68f27..060225605 100644 --- a/src/slashCommands.ts +++ b/src/slashCommands.ts @@ -34,6 +34,8 @@ export async function handleSlashCommands( ) ?? []), ].join("\n"); return { output: helpMessage }; + case "clear": + return { clear: true, output: "Chat history cleared" }; case "exit": return { exit: true, output: "Goodbye!" }; case "login": @@ -97,4 +99,4 @@ export async function handleSlashCommands( } } return null; -} +} \ No newline at end of file diff --git a/src/ui/UserInput.tsx b/src/ui/UserInput.tsx index 0283f2ec2..8921b9aa6 100644 --- a/src/ui/UserInput.tsx +++ b/src/ui/UserInput.tsx @@ -51,6 +51,7 @@ const UserInput: React.FC = ({ const getSlashCommands = () => { const systemCommands = [ { name: "help", description: "Show help message" }, + { name: "clear", description: "Clear the chat history" }, { name: "exit", description: "Exit the chat" }, { name: "login", description: "Authenticate with your account" }, { name: "logout", description: "Sign out of your current session" },