mirror of
https://github.com/ollama/ollama.git
synced 2025-04-07 11:28:17 +02:00
ctrl+c on empty line exits (#135)
This commit is contained in:
parent
3b135ac963
commit
55b5f5dc34
@ -276,6 +276,10 @@ func generateInteractive(cmd *cobra.Command, model string) error {
|
||||
case errors.Is(err, io.EOF):
|
||||
return nil
|
||||
case errors.Is(err, readline.ErrInterrupt):
|
||||
if line == "" {
|
||||
return nil
|
||||
}
|
||||
|
||||
continue
|
||||
case err != nil:
|
||||
return err
|
||||
|
Loading…
x
Reference in New Issue
Block a user