@@ -133,7 +133,7 @@ var parts = []struct {
133133 view : func (m BuildModel , s * strings.Builder ) {
134134 s .WriteString ("\n " )
135135 if m .build != nil {
136- buildObj := NewBuildObject (m .build )
136+ buildObj := NewBuild (m .build )
137137 languages := buildObj .Languages ()
138138 // Target rows with colors
139139 for _ , target := range languages {
@@ -173,11 +173,11 @@ var parts = []struct {
173173 },
174174}
175175
176- func ViewBuildPipeline (build * stainless.BuildObject , target stainless.Target , downloads map [stainless.Target ]struct {
176+ func ViewBuildPipeline (build * stainless.Build , target stainless.Target , downloads map [stainless.Target ]struct {
177177 status string
178178 path string
179179}) string {
180- buildObj := NewBuildObject (build )
180+ buildObj := NewBuild (build )
181181 buildTarget := buildObj .BuildTarget (target )
182182 if buildTarget == nil {
183183 return ""
@@ -240,15 +240,15 @@ func ViewStepSymbol(status, conclusion string) string {
240240 }
241241}
242242
243- func ViewDiagnosticIcon (level stainless.BuildDiagnosticListResponseLevel ) string {
243+ func ViewDiagnosticIcon (level stainless.BuildDiagnosticLevel ) string {
244244 switch level {
245- case stainless .BuildDiagnosticListResponseLevelFatal :
245+ case stainless .BuildDiagnosticLevelFatal :
246246 return lipgloss .NewStyle ().Foreground (lipgloss .Color ("1" )).Bold (true ).Render ("💀" )
247- case stainless .BuildDiagnosticListResponseLevelError :
247+ case stainless .BuildDiagnosticLevelError :
248248 return lipgloss .NewStyle ().Foreground (lipgloss .Color ("1" )).Render ("❌" )
249- case stainless .BuildDiagnosticListResponseLevelWarning :
249+ case stainless .BuildDiagnosticLevelWarning :
250250 return lipgloss .NewStyle ().Foreground (lipgloss .Color ("3" )).Render ("⚠️" )
251- case stainless .BuildDiagnosticListResponseLevelNote :
251+ case stainless .BuildDiagnosticLevelNote :
252252 return lipgloss .NewStyle ().Foreground (lipgloss .Color ("6" )).Render ("ℹ️" )
253253 default :
254254 return lipgloss .NewStyle ().Foreground (lipgloss .Color ("8" )).Render ("•" )
@@ -309,23 +309,23 @@ func renderMarkdown(content string) string {
309309 return strings .Trim (rendered , "\n " )
310310}
311311
312- func countDiagnosticsBySeverity (diagnostics []stainless.BuildDiagnosticListResponse ) (fatal , errors , warnings , notes int ) {
312+ func countDiagnosticsBySeverity (diagnostics []stainless.BuildDiagnostic ) (fatal , errors , warnings , notes int ) {
313313 for _ , diag := range diagnostics {
314314 switch diag .Level {
315- case stainless .BuildDiagnosticListResponseLevelFatal :
315+ case stainless .BuildDiagnosticLevelFatal :
316316 fatal ++
317- case stainless .BuildDiagnosticListResponseLevelError :
317+ case stainless .BuildDiagnosticLevelError :
318318 errors ++
319- case stainless .BuildDiagnosticListResponseLevelWarning :
319+ case stainless .BuildDiagnosticLevelWarning :
320320 warnings ++
321- case stainless .BuildDiagnosticListResponseLevelNote :
321+ case stainless .BuildDiagnosticLevelNote :
322322 notes ++
323323 }
324324 }
325325 return
326326}
327327
328- func ViewDiagnosticsPrint (diagnostics []stainless.BuildDiagnosticListResponse ) string {
328+ func ViewDiagnosticsPrint (diagnostics []stainless.BuildDiagnostic ) string {
329329 var s strings.Builder
330330
331331 if len (diagnostics ) > 0 {
@@ -373,6 +373,8 @@ func ViewDiagnosticsPrint(diagnostics []stainless.BuildDiagnosticListResponse) s
373373 sub .WriteString (fmt .Sprintf ("%s %s\n " , levelIcon , codeStyle .Render (diag .Code )))
374374 sub .WriteString (fmt .Sprintf ("%s\n " , renderMarkdown (diag .Message )))
375375
376+ sub .WriteString (fmt .Sprintf ("%s\n " , renderMarkdown (diag .Message )))
377+
376378 // Show source references if available
377379 if diag .OasRef != "" {
378380 refStyle := lipgloss .NewStyle ().Foreground (lipgloss .Color ("8" ))
0 commit comments