fix: diff bg lines and codex last message (#186)

This commit is contained in:
Copilot
2026-02-05 22:38:54 +00:00
committed by GitHub
parent b0fe1a8a59
commit c864b3533f
2 changed files with 14 additions and 6 deletions
@@ -1578,16 +1578,22 @@ func (m *Manager) flushMessageBuffer(execution *AgentExecution) string {
}
}
// If we have remaining content and an active streaming message, append it
// If we have remaining message content, publish it
trimmedMessage := strings.TrimSpace(agentMessage)
if trimmedMessage != "" && currentMsgID != "" {
// Publish final append to the streaming message
m.publishStreamingMessageFinal(execution, currentMsgID, trimmedMessage)
if trimmedMessage != "" {
if currentMsgID != "" {
// Publish final append to the streaming message
m.publishStreamingMessageFinal(execution, currentMsgID, trimmedMessage)
} else {
// No streaming message exists yet - create one with all the content
// This happens when message content has no newlines (never triggered streaming)
m.publishStreamingMessage(execution, trimmedMessage)
}
// Return empty since we've already handled it via streaming
return ""
}
return trimmedMessage
return ""
}
// publishStreamingMessageFinal publishes the final chunk of a streaming message.
+3 -1
View File
@@ -452,7 +452,9 @@ export const DiffViewer = memo(function DiffViewer({
lineDiffType: 'word',
overflow: wordWrap ? 'wrap' : 'scroll',
unsafeCSS: `
* {
/* Make container backgrounds transparent, but NOT diff line backgrounds
* Only target the root container and specific UI elements, not the diff content itself */
[data-diffs-root] {
background: transparent !important;
}