optimize edit-tool rendering (#463)

Co-authored-by: opencode <noreply@opencode.ai>
Co-authored-by: Adam <2363879+adamdotdevin@users.noreply.github.com>
This commit is contained in:
Gal Schlezinger
2025-06-28 14:01:10 +03:00
committed by GitHub
parent 7b394b91e2
commit f618e569ab
4 changed files with 88 additions and 9 deletions

View File

@@ -16,6 +16,7 @@ import (
"github.com/sst/opencode/internal/layout"
"github.com/sst/opencode/internal/styles"
"github.com/sst/opencode/internal/theme"
"github.com/sst/opencode/internal/util"
)
type MessagesComponent interface {
@@ -121,9 +122,13 @@ func (m *messagesComponent) renderView() {
return
}
measure := util.Measure("messages.renderView")
defer measure("messageCount", len(m.app.Messages))
t := theme.CurrentTheme()
blocks := make([]string, 0)
previousBlockType := none
for _, message := range m.app.Messages {
var content string
var cached bool