Private
Public Access
1
0

tui: revamp footer (some more)

Simplified layout logic, reorganized elements
This commit is contained in:
2024-10-01 03:38:15 +00:00
parent bb48bc9abd
commit 93c2fb3d1e
6 changed files with 148 additions and 110 deletions

View File

@@ -122,17 +122,21 @@ func (m *Model) executeToolCalls(toolCalls []api.ToolCall) tea.Cmd {
func (m *Model) promptLLM() tea.Cmd {
m.state = pendingResponse
m.spinner = getSpinner()
m.replyCursor.Blink = false
m.startTime = time.Now()
m.elapsed = 0
m.tokenCount = 0
return func() tea.Msg {
resp, err := m.App.Prompt(m.App.Messages, m.chatReplyChunks, m.stopSignal)
if err != nil {
return msgChatResponseError{ Err: err }
}
return msgChatResponse(resp)
}
return tea.Batch(
m.spinner.Tick,
func() tea.Msg {
resp, err := m.App.Prompt(m.App.Messages, m.chatReplyChunks, m.stopSignal)
if err != nil {
return msgChatResponseError{Err: err}
}
return msgChatResponse(resp)
},
)
}