Skip to content

Commit

Permalink
:feature: Adding AI Readiness
Browse files Browse the repository at this point in the history
  • Loading branch information
JustSteveKing committed Apr 8, 2024
1 parent be4cb2b commit 31c0f5e
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 0 deletions.
1 change: 1 addition & 0 deletions pkg/types/insights.go
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ type Report struct {
TotalEndpoints int `json:"total_endpoints"`
CreatedAt string `json:"created_at"`
ScorePercentage int `json:"score_percentage"`
AIReady bool `json:"is_ai_ready"`
Grade string `json:"grade"`
Industry Industry `json:"industry,omitempty"`
Categories []Category `json:"categories"`
Expand Down
6 changes: 6 additions & 0 deletions pkg/views/insights.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ package views

import (
"fmt"

"github.com/pterm/pterm"
"github.com/treblle/treblle-cli/pkg/styles"
"github.com/treblle/treblle-cli/pkg/types"
Expand Down Expand Up @@ -49,6 +50,11 @@ func ShowInsightsDetails(apiResponse *types.ApiResponse) {
prefixPrinter.Println(
pterm.NewStyle(pterm.FgLightWhite).Sprint(apiResponse.Report.ScorePercentage),
)

prefixPrinter.Prefix.Text = "AI Ready"
prefixPrinter.Println(
pterm.NewStyle(pterm.FgLightWhite).Sprint(apiResponse.Report.AIReady),
)
}

func ShowInsightsTechnologyDiscovery(apiResponse *types.ApiResponse) {
Expand Down

0 comments on commit 31c0f5e

Please sign in to comment.