summaryrefslogtreecommitdiffhomepage
path: root/internal
diff options
context:
space:
mode:
authorKujtim Hoxha <[email protected]>2025-04-09 20:04:44 +0200
committerKujtim Hoxha <[email protected]>2025-04-09 20:04:44 +0200
commit65055c7687bc1ddd4e44dd146821b0e622eb5675 (patch)
treec56fab859942ee9c01438f219fe6bca913c16970 /internal
parent2af1bbb82852ebebb59ef431e5362c0f3993e5a0 (diff)
downloadopencode-65055c7687bc1ddd4e44dd146821b0e622eb5675.tar.gz
opencode-65055c7687bc1ddd4e44dd146821b0e622eb5675.zip
minor fixes
Diffstat (limited to 'internal')
-rw-r--r--internal/llm/provider/anthropic.go3
-rw-r--r--internal/tui/components/core/status.go2
-rw-r--r--internal/tui/components/repl/sessions.go1
3 files changed, 3 insertions, 3 deletions
diff --git a/internal/llm/provider/anthropic.go b/internal/llm/provider/anthropic.go
index fbecbd43c..88b874806 100644
--- a/internal/llm/provider/anthropic.go
+++ b/internal/llm/provider/anthropic.go
@@ -5,6 +5,7 @@ import (
"encoding/json"
"errors"
"fmt"
+ "io"
"strings"
"time"
@@ -236,7 +237,7 @@ func (a *anthropicProvider) StreamResponse(ctx context.Context, messages []messa
}
err := stream.Err()
- if err == nil {
+ if err == nil || errors.Is(err, io.EOF) {
return
}
diff --git a/internal/tui/components/core/status.go b/internal/tui/components/core/status.go
index d2f14ad00..d67bdb7a6 100644
--- a/internal/tui/components/core/status.go
+++ b/internal/tui/components/core/status.go
@@ -68,7 +68,7 @@ func (m statusCmp) View() string {
}
// Truncate message if it's longer than available width
msg := m.info.Msg
- availWidth := m.availableFooterMsgWidth() - 3 // Account for ellipsis
+ availWidth := m.availableFooterMsgWidth() - 10
if len(msg) > availWidth && availWidth > 0 {
msg = msg[:availWidth] + "..."
}
diff --git a/internal/tui/components/repl/sessions.go b/internal/tui/components/repl/sessions.go
index d47c2a19e..093337b18 100644
--- a/internal/tui/components/repl/sessions.go
+++ b/internal/tui/components/repl/sessions.go
@@ -123,7 +123,6 @@ func (i *sessionsCmp) Update(msg tea.Msg) (tea.Model, tea.Cmd) {
case tea.KeyMsg:
switch {
case key.Matches(msg, sessionKeyMapValue.Select):
- i.app.Logger.PersistInfo("Session selected")
selected := i.list.SelectedItem()
if selected == nil {
return i, nil