mirror of
https://github.com/dogkeeper886/ollama37.git
synced 2025-12-10 15:57:04 +00:00
chore: upgrade to gods v2
gods v2 uses go generics rather than interfaces which simplifies the code considerably
This commit is contained in:
@@ -120,11 +120,11 @@ func (i *Instance) Readline() (string, error) {
|
||||
if i.History.Pos == i.History.Size() {
|
||||
currentLineBuf = []rune(buf.String())
|
||||
}
|
||||
buf.Replace(i.History.Prev())
|
||||
buf.Replace([]rune(i.History.Prev()))
|
||||
}
|
||||
case KeyDown:
|
||||
if i.History.Pos < i.History.Size() {
|
||||
buf.Replace(i.History.Next())
|
||||
buf.Replace([]rune(i.History.Next()))
|
||||
if i.History.Pos == i.History.Size() {
|
||||
buf.Replace(currentLineBuf)
|
||||
}
|
||||
@@ -220,7 +220,7 @@ func (i *Instance) Readline() (string, error) {
|
||||
case CharEnter, CharCtrlJ:
|
||||
output := buf.String()
|
||||
if output != "" {
|
||||
i.History.Add([]rune(output))
|
||||
i.History.Add(output)
|
||||
}
|
||||
buf.MoveToEnd()
|
||||
fmt.Println()
|
||||
|
||||
Reference in New Issue
Block a user