summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorDax Raad <[email protected]>2025-09-11 02:31:28 -0400
committerDax Raad <[email protected]>2025-09-11 02:31:28 -0400
commitaa9ebe5d7cf0a188166e4af8e6245bf3161dca9f (patch)
tree00e8e1d18a05350c3b35ab39ba3aab33103e4b05
parent4c94753eda3714176a29c651e4bd43c5ff079c14 (diff)
downloadopencode-aa9ebe5d7cf0a188166e4af8e6245bf3161dca9f.tar.gz
opencode-aa9ebe5d7cf0a188166e4af8e6245bf3161dca9f.zip
ignore: compacting
-rw-r--r--packages/tui/internal/app/app.go14
-rw-r--r--packages/tui/internal/components/chat/editor.go2
2 files changed, 12 insertions, 4 deletions
diff --git a/packages/tui/internal/app/app.go b/packages/tui/internal/app/app.go
index 85b21165c..4a891f282 100644
--- a/packages/tui/internal/app/app.go
+++ b/packages/tui/internal/app/app.go
@@ -7,6 +7,7 @@ import (
"path/filepath"
"slices"
"strings"
+ "time"
"log/slog"
@@ -653,12 +654,12 @@ func getDefaultModel(
}
func (a *App) IsBusy() bool {
- if a.Session.Time.Compacting > 0 {
- return true
- }
if len(a.Messages) == 0 {
return false
}
+ if a.IsCompacting() {
+ return true
+ }
lastMessage := a.Messages[len(a.Messages)-1]
if casted, ok := lastMessage.Info.(opencode.AssistantMessage); ok {
return casted.Time.Completed == 0
@@ -666,6 +667,13 @@ func (a *App) IsBusy() bool {
return false
}
+func (a *App) IsCompacting() bool {
+ if time.Since(time.UnixMilli(int64(a.Session.Time.Compacting))) < time.Second*30 {
+ return true
+ }
+ return false
+}
+
func (a *App) HasAnimatingWork() bool {
for _, msg := range a.Messages {
switch casted := msg.Info.(type) {
diff --git a/packages/tui/internal/components/chat/editor.go b/packages/tui/internal/components/chat/editor.go
index 121993927..dd24dcf15 100644
--- a/packages/tui/internal/components/chat/editor.go
+++ b/packages/tui/internal/components/chat/editor.go
@@ -385,7 +385,7 @@ func (m *editorComponent) Content() string {
} else if m.app.IsBusy() {
keyText := m.getInterruptKeyText()
status := "working"
- if m.app.Session.Time.Compacting > 0 {
+ if m.app.IsCompacting() {
status = "compacting"
}
if m.app.CurrentPermission.ID != "" {