fix: add /clear command to clear chat history

This commit is contained in:
Nate 2025-07-15 23:04:27 -07:00
parent 48caae9e13
commit 378273239b
3 changed files with 6 additions and 3 deletions

4
package-lock.json generated
View file

@ -1,12 +1,12 @@
{
"name": "@continuedev/cli",
"version": "1.3.1",
"version": "1.3.2",
"lockfileVersion": 3,
"requires": true,
"packages": {
"": {
"name": "@continuedev/cli",
"version": "1.3.1",
"version": "1.3.2",
"license": "Apache-2.0",
"dependencies": {
"@continuedev/config-yaml": "^1.0.96",

View file

@ -33,6 +33,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":
@ -83,4 +85,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" },