diff --git a/README.md b/README.md index 0387805..b531393 100644 --- a/README.md +++ b/README.md @@ -219,6 +219,8 @@ Application Options: -q, --scrape_question= Search question using Jina AI -e, --seed= Seed to be used for LMM generation --dry-run Show what would be sent to the model without actually sending it + -w, --wipecontext= Wipe context + -W, --wipesession= Wipe session --version Print current version Help Options: diff --git a/cli/cli.go b/cli/cli.go index a031fe2..a47d354 100644 --- a/cli/cli.go +++ b/cli/cli.go @@ -100,6 +100,18 @@ func Cli(version string) (message string, err error) { return } + // if the wipe context flag is set, run the wipe context function + if currentFlags.WipeContext != "" { + err = fabricDb.Contexts.Delete(currentFlags.WipeContext) + return + } + + // if the wipe session flag is set, run the wipe session function + if currentFlags.WipeSession != "" { + err = fabricDb.Sessions.Delete(currentFlags.WipeSession) + return + } + // if the interactive flag is set, run the interactive function // if currentFlags.Interactive { // interactive.Interactive() diff --git a/cli/flags.go b/cli/flags.go index b205f1a..de44719 100644 --- a/cli/flags.go +++ b/cli/flags.go @@ -45,6 +45,8 @@ type Flags struct { ScrapeQuestion string `short:"q" long:"scrape_question" description:"Search question using Jina AI"` Seed int `short:"e" long:"seed" description:"Seed to be used for LMM generation"` DryRun bool `long:"dry-run" description:"Show what would be sent to the model without actually sending it"` + WipeContext string `short:"w" long:"wipecontext" description:"Wipe context"` + WipeSession string `short:"W" long:"wipesession" description:"Wipe session"` Version bool `long:"version" description:"Print current version"` }