The open source coding agent.
TypeScript
feat: better queued visual
adamdotdevin08a83b73372b
diff --git a/packages/tui/internal/components/chat/message.go b/packages/tui/internal/components/chat/message.goindex c72ad6e244f..46dd02d14a8 100644--- a/packages/tui/internal/components/chat/message.go+++ b/packages/tui/internal/components/chat/message.go@@ -211,6 +211,7 @@ func renderText(width int,extra string,isThinking bool,+ isQueued bool,fileParts []opencode.FilePart,agentParts []opencode.AgentPart,toolCalls ...opencode.ToolPart,@@ -331,6 +332,10 @@ func renderText(wrappedText := ansi.WordwrapWc(styledText, width-6, " ")wrappedText = strings.ReplaceAll(wrappedText, "\u2011", "-")content = base.Width(width - 6).Render(wrappedText)+ if isQueued {+ queuedStyle := styles.NewStyle().Background(t.Accent()).Foreground(t.BackgroundPanel()).Bold(true).Padding(0, 1)+ content = queuedStyle.Render("QUEUED") + "\n\n" + content+ }}timestamp := ts.@@ -400,12 +405,16 @@ func renderText(switch message.(type) {case opencode.UserMessage:+ borderColor := t.Secondary()+ if isQueued {+ borderColor = t.Accent()+ }return renderContentBlock(app,content,width,WithTextColor(t.Text()),- WithBorderColor(t.Secondary()),+ WithBorderColor(borderColor),)case opencode.AssistantMessage:if isThinking {diff --git a/packages/tui/internal/components/chat/messages.go b/packages/tui/internal/components/chat/messages.goindex ec7735d589a..1c6bce904a5 100644--- a/packages/tui/internal/components/chat/messages.go+++ b/packages/tui/internal/components/chat/messages.go@@ -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{},)