minor fixes
commit65055c7687bc1ddd4e44dd146821b0e622eb5675
authorKujtim Hoxha <kujtimii.h@gmail.com>
dateWed 9 Apr 2025, 20:04 (2 years ago)
parent2af1bbb
internal/llm/provider/anthropic.go+2−1
@@ -5,6 +5,7 @@ import (
55 "encoding/json"
66 "errors"
77 "fmt"
8+ "io"
89 "strings"
910 "time"
1011
@@ -236,7 +237,7 @@ func (a *anthropicProvider) StreamResponse(ctx context.Context, messages []messa
236237 }
237238
238239 err := stream.Err()
239− if err == nil {
240+ if err == nil || errors.Is(err, io.EOF) {
240241 return
241242 }
242243
internal/tui/components/core/status.go+1−1
@@ -68,7 +68,7 @@ func (m statusCmp) View() string {
6868 }
6969 // Truncate message if it's longer than available width
7070 msg := m.info.Msg
71− availWidth := m.availableFooterMsgWidth() - 3 // Account for ellipsis
71+ availWidth := m.availableFooterMsgWidth() - 10
7272 if len(msg) > availWidth && availWidth > 0 {
7373 msg = msg[:availWidth] + "..."
7474 }
internal/tui/components/repl/sessions.go−1
@@ -123,7 +123,6 @@ func (i *sessionsCmp) Update(msg tea.Msg) (tea.Model, tea.Cmd) {
123123 case tea.KeyMsg:
124124 switch {
125125 case key.Matches(msg, sessionKeyMapValue.Select):
126− i.app.Logger.PersistInfo("Session selected")
127126 selected := i.list.SelectedItem()
128127 if selected == nil {
129128 return i, nil