Merge pull request #37 from continuedev/fix-clear

fix: add /clear command to clear chat history
This commit is contained in:
Nate Sesti 2025-07-16 00:14:50 -07:00 • committed by GitHub
commit fb47c52b1e
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 4 additions and 1 deletions

View file

@ -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;
}
}

View file

@ -51,6 +51,7 @@ const UserInput: React.FC<UserInputProps> = ({
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" },