mirror of
https://github.com/aljazceru/opencode.git
synced 2026-01-06 01:14:52 +01:00
fix: assistant message footer styles
This commit is contained in:
@@ -220,17 +220,17 @@ func renderText(
|
|||||||
var content string
|
var content string
|
||||||
switch casted := message.(type) {
|
switch casted := message.(type) {
|
||||||
case opencode.AssistantMessage:
|
case opencode.AssistantMessage:
|
||||||
bg := t.Background()
|
backgroundColor = t.Background()
|
||||||
if isThinking {
|
if isThinking {
|
||||||
bg = t.BackgroundPanel()
|
backgroundColor = t.BackgroundPanel()
|
||||||
}
|
}
|
||||||
ts = time.UnixMilli(int64(casted.Time.Created))
|
ts = time.UnixMilli(int64(casted.Time.Created))
|
||||||
if casted.Time.Completed > 0 {
|
if casted.Time.Completed > 0 {
|
||||||
ts = time.UnixMilli(int64(casted.Time.Completed))
|
ts = time.UnixMilli(int64(casted.Time.Completed))
|
||||||
}
|
}
|
||||||
content = util.ToMarkdown(text, width, bg)
|
content = util.ToMarkdown(text, width, backgroundColor)
|
||||||
if isThinking {
|
if isThinking {
|
||||||
content = styles.NewStyle().Background(bg).Foreground(t.TextMuted()).Render("Thinking") + "\n\n" + content
|
content = styles.NewStyle().Background(backgroundColor).Foreground(t.TextMuted()).Render("Thinking") + "\n\n" + content
|
||||||
}
|
}
|
||||||
case opencode.UserMessage:
|
case opencode.UserMessage:
|
||||||
ts = time.UnixMilli(int64(casted.Time.Created))
|
ts = time.UnixMilli(int64(casted.Time.Created))
|
||||||
|
|||||||
Reference in New Issue
Block a user