mirror of
https://github.com/ollama/ollama.git
synced 2025-03-29 11:11:47 +01:00
[fix] /bye and /exit are now treated as prefixes (#2381)
* [fix] /bye and /exit are now treated as prefixes instead of being treated as entire lines which doesn't align with the way the rest of the commands are treated * Update cmd/interactive.go Fixing whitespace --------- Co-authored-by: Jeffrey Morgan <jmorganca@gmail.com>
This commit is contained in:
parent
a9bc1e1c37
commit
ce0c95d097
@ -470,7 +470,7 @@ func generateInteractive(cmd *cobra.Command, opts runOptions) error {
|
|||||||
} else {
|
} else {
|
||||||
usage()
|
usage()
|
||||||
}
|
}
|
||||||
case line == "/exit", line == "/bye":
|
case strings.HasPrefix(line, "/exit"), strings.HasPrefix(line, "/bye"):
|
||||||
return nil
|
return nil
|
||||||
case strings.HasPrefix(line, "/"):
|
case strings.HasPrefix(line, "/"):
|
||||||
args := strings.Fields(line)
|
args := strings.Fields(line)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user