Private
Public Access
1
0

Cleaned up assistant cursor handling

This commit is contained in:
2024-06-21 05:52:59 +00:00
parent 3fde58b77d
commit c30e652103
2 changed files with 13 additions and 13 deletions

View File

@@ -93,7 +93,7 @@ func (m Model) Update(msg tea.Msg) (Model, tea.Cmd) {
// append chunk to existing message
m.setMessageContents(last, m.messages[last].Content+msg.Content)
} else {
// use chunk in new message
// use chunk in a new message
m.addMessage(api.Message{
Role: api.MessageRoleAssistant,
Content: msg.Content,
@@ -177,6 +177,8 @@ func (m Model) Update(msg tea.Msg) (Model, tea.Cmd) {
case cursor.BlinkMsg:
if m.state == pendingResponse {
// ensure we show the updated "wait for response" cursor blink state
last := len(m.messages)-1
m.messageCache[last] = m.renderMessage(last)
m.updateContent()
}
case msgConversationPersisted: