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",
|
"name": "@continuedev/cli",
|
||||||
"version": "1.3.1",
|
"version": "1.3.2",
|
||||||
"lockfileVersion": 3,
|
"lockfileVersion": 3,
|
||||||
"requires": true,
|
"requires": true,
|
||||||
"packages": {
|
"packages": {
|
||||||
"": {
|
"": {
|
||||||
"name": "@continuedev/cli",
|
"name": "@continuedev/cli",
|
||||||
"version": "1.3.1",
|
"version": "1.3.2",
|
||||||
"license": "Apache-2.0",
|
"license": "Apache-2.0",
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@continuedev/config-yaml": "^1.0.96",
|
"@continuedev/config-yaml": "^1.0.96",
|
||||||
|
|
|
||||||
|
|
@ -33,6 +33,8 @@ export async function handleSlashCommands(
|
||||||
) ?? []),
|
) ?? []),
|
||||||
].join("\n");
|
].join("\n");
|
||||||
return { output: helpMessage };
|
return { output: helpMessage };
|
||||||
|
case "clear":
|
||||||
|
return { clear: true, output: "Chat history cleared" };
|
||||||
case "exit":
|
case "exit":
|
||||||
return { exit: true, output: "Goodbye!" };
|
return { exit: true, output: "Goodbye!" };
|
||||||
case "login":
|
case "login":
|
||||||
|
|
@ -83,4 +85,4 @@ export async function handleSlashCommands(
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|
@ -51,6 +51,7 @@ const UserInput: React.FC<UserInputProps> = ({
|
||||||
const getSlashCommands = () => {
|
const getSlashCommands = () => {
|
||||||
const systemCommands = [
|
const systemCommands = [
|
||||||
{ name: "help", description: "Show help message" },
|
{ name: "help", description: "Show help message" },
|
||||||
|
{ name: "clear", description: "Clear the chat history" },
|
||||||
{ name: "exit", description: "Exit the chat" },
|
{ name: "exit", description: "Exit the chat" },
|
||||||
{ name: "login", description: "Authenticate with your account" },
|
{ name: "login", description: "Authenticate with your account" },
|
||||||
{ name: "logout", description: "Sign out of your current session" },
|
{ name: "logout", description: "Sign out of your current session" },
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue