feat: better queued visual

This commit is contained in:
adamdotdevin
2025-08-15 06:55:16 -05:00
parent 79a4e35a74
commit 08a83b7337
2 changed files with 17 additions and 5 deletions

View File

@@ -373,10 +373,8 @@ func (m *messagesComponent) renderView() tea.Cmd {
)
author := m.app.Config.Username
if casted.ID > lastAssistantMessage {
author += " [queued]"
}
key := m.cache.GenerateKey(casted.ID, part.Text, width, files, author)
isQueued := casted.ID > lastAssistantMessage
key := m.cache.GenerateKey(casted.ID, part.Text, width, files, author, isQueued)
content, cached = m.cache.Get(key)
if !cached {
content = renderText(
@@ -388,6 +386,7 @@ func (m *messagesComponent) renderView() tea.Cmd {
width,
files,
false,
isQueued,
fileParts,
agentParts,
)
@@ -463,6 +462,7 @@ func (m *messagesComponent) renderView() tea.Cmd {
width,
"",
false,
false,
[]opencode.FilePart{},
[]opencode.AgentPart{},
toolCallParts...,
@@ -479,6 +479,7 @@ func (m *messagesComponent) renderView() tea.Cmd {
width,
"",
false,
false,
[]opencode.FilePart{},
[]opencode.AgentPart{},
toolCallParts...,
@@ -558,6 +559,7 @@ func (m *messagesComponent) renderView() tea.Cmd {
width,
"",
true,
false,
[]opencode.FilePart{},
[]opencode.AgentPart{},
)
@@ -591,6 +593,7 @@ func (m *messagesComponent) renderView() tea.Cmd {
width,
"",
false,
false,
[]opencode.FilePart{},
[]opencode.AgentPart{},
)