summaryrefslogtreecommitdiffhomepage
path: root/packages/tui/internal/components/chat/message.go
diff options
context:
space:
mode:
authorTimo Clasen <[email protected]>2025-08-19 22:30:54 +0200
committerGitHub <[email protected]>2025-08-19 15:30:54 -0500
commit4913ee6afdb29d9ffbc27fd417aabbf35aaf1749 (patch)
tree250c358ec7ff889a891a340980f618dade8c2197 /packages/tui/internal/components/chat/message.go
parentc59ded82b3374b5f11e7c5f1eaee4b27346f697c (diff)
downloadopencode-4913ee6afdb29d9ffbc27fd417aabbf35aaf1749.tar.gz
opencode-4913ee6afdb29d9ffbc27fd417aabbf35aaf1749.zip
fix(TUI): make it less shimmer (#2076)
Diffstat (limited to 'packages/tui/internal/components/chat/message.go')
-rw-r--r--packages/tui/internal/components/chat/message.go8
1 files changed, 7 insertions, 1 deletions
diff --git a/packages/tui/internal/components/chat/message.go b/packages/tui/internal/components/chat/message.go
index 65c476e15..9a1531fb0 100644
--- a/packages/tui/internal/components/chat/message.go
+++ b/packages/tui/internal/components/chat/message.go
@@ -213,6 +213,7 @@ func renderText(
extra string,
isThinking bool,
isQueued bool,
+ shimmer bool,
fileParts []opencode.FilePart,
agentParts []opencode.AgentPart,
toolCalls ...opencode.ToolPart,
@@ -234,7 +235,12 @@ func renderText(
}
content = util.ToMarkdown(text, width, backgroundColor)
if isThinking {
- label := util.Shimmer("Thinking...", backgroundColor, t.TextMuted(), t.Accent())
+ var label string
+ if shimmer {
+ label = util.Shimmer("Thinking...", backgroundColor, t.TextMuted(), t.Accent())
+ } else {
+ label = styles.NewStyle().Background(backgroundColor).Foreground(t.TextMuted()).Render("Thinking...")
+ }
label = styles.NewStyle().Background(backgroundColor).Width(width - 6).Render(label)
content = label + "\n\n" + content
} else if strings.TrimSpace(text) == "Generating..." {