tui: revamp footer (some more)
Simplified layout logic, reorganized elements
This commit is contained in:
@@ -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)
|
||||
},
|
||||
)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user