Merge pull request #37 from continuedev/fix-clear
fix: add /clear command to clear chat history
This commit is contained in:
commit
fb47c52b1e
2 changed files with 4 additions and 1 deletions
|
|
@ -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;
|
||||
}
|
||||
}
|
||||
|
|
@ -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" },
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue