Feat: preload lcp model

This commit is contained in:
Grail Finder
2025-12-17 13:03:40 +03:00
parent 35851647a1
commit d73c3abd6b
2 changed files with 63 additions and 1 deletions

9
tui.go
View File

@@ -89,6 +89,7 @@ var (
[yellow]Alt+4[white]: edit msg role
[yellow]Alt+5[white]: toggle system and tool messages display
[yellow]Alt+6[white]: toggle status line visibility
[yellow]Alt+9[white]: warm up (load) selected llama.cpp model
=== scrolling chat window (some keys similar to vim) ===
[yellow]arrows up/down and j/k[white]: scroll up and down
@@ -1235,6 +1236,14 @@ func init() {
toggleShellMode()
return nil
}
if event.Key() == tcell.KeyRune && event.Modifiers() == tcell.ModAlt && event.Rune() == '9' {
// Warm up (load) the currently selected model
go warmUpModel()
if err := notifyUser("model warmup", "loading model: "+chatBody.Model); err != nil {
logger.Debug("failed to notify user", "error", err)
}
return nil
}
// cannot send msg in editMode or botRespMode
if event.Key() == tcell.KeyEscape && !editMode && !botRespMode {
msgText := textArea.GetText()