Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions src/pkg/agent/plugins/compat_oai/generate.go
Original file line number Diff line number Diff line change
Expand Up @@ -244,11 +244,11 @@ func (g *ModelGenerator) Generate(ctx context.Context, req *ai.ModelRequest, han

// concatenateContent concatenates text content into a single string
func (g *ModelGenerator) concatenateContent(parts []*ai.Part) string {
content := ""
var b []byte
for _, part := range parts {
content += part.Text
b = append(b, part.Text...)
}
return content
return string(b)
}

// generateStream generates a streaming model response
Expand Down
9 changes: 6 additions & 3 deletions src/pkg/cli/client/byoc/gcp/byoc.go
Original file line number Diff line number Diff line change
Expand Up @@ -842,15 +842,18 @@ func LogEntryToString(logEntry *loggingpb.LogEntry) (string, string, error) {
}

func LogEntriesToString(logEntries []*loggingpb.LogEntry) string {
result := ""
var sb strings.Builder
for _, logEntry := range logEntries {
logTimestamp, msg, err := LogEntryToString(logEntry)
if err != nil {
continue
}
result += logTimestamp + " " + msg + "\n"
sb.WriteString(logTimestamp)
sb.WriteString(" ")
sb.WriteString(msg)
sb.WriteString("\n")
}
return result
return sb.String()
}

func (b *ByocGcp) query(ctx context.Context, query string) ([]*loggingpb.LogEntry, error) {
Expand Down
9 changes: 6 additions & 3 deletions src/pkg/cli/client/byoc/parse.go
Original file line number Diff line number Diff line change
Expand Up @@ -27,11 +27,14 @@ type PulumiState struct {
func (ps PulumiState) String() string {
var org, pending string
if len(ps.Pending) != 0 {
pending = " (pending"
var b strings.Builder
b.WriteString(" (pending")
for _, p := range ps.Pending {
pending += " " + strconv.Quote(p)
b.WriteString(" ")
b.WriteString(strconv.Quote(p))
}
pending += ")"
b.WriteString(")")
pending = b.String()
}
if ps.DefangOrg != "" {
org = " {" + string(ps.DefangOrg) + "}"
Expand Down
Loading