fix: add /clear command to clear chat history
This commit is contained in:
parent
48caae9e13
commit
378273239b
3 changed files with 6 additions and 3 deletions
4
package-lock.json
generated
4
package-lock.json
generated
|
|
@ -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",
|
||||
|
|
|
|||
|
|
@ -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;
|
||||
}
|
||||
}
|
||||
|
|
@ -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