diff --git a/cmd/interactive.go b/cmd/interactive.go index 12c31052..5673fda0 100644 --- a/cmd/interactive.go +++ b/cmd/interactive.go @@ -94,6 +94,7 @@ func generateInteractive(cmd *cobra.Command, opts runOptions) error { fmt.Fprintln(os.Stderr, " /show Show model information") fmt.Fprintln(os.Stderr, " /load Load a session or model") fmt.Fprintln(os.Stderr, " /save Save your current session") + fmt.Fprintln(os.Stderr, " /clear Clear session context") fmt.Fprintln(os.Stderr, " /bye Exit") fmt.Fprintln(os.Stderr, " /?, /help Help for a command") fmt.Fprintln(os.Stderr, " /? shortcuts Help for keyboard shortcuts") @@ -280,6 +281,10 @@ func generateInteractive(cmd *cobra.Command, opts runOptions) error { } fmt.Printf("Created new model '%s'\n", args[1]) continue + case strings.HasPrefix(line, "/clear"): + opts.Messages = []api.Message{} + fmt.Println("Cleared session context") + continue case strings.HasPrefix(line, "/set"): args := strings.Fields(line) if len(args) > 1 {