Skip to content

Commit

Permalink
Merge pull request #10 from Treblle/feature/ai-ready
Browse files Browse the repository at this point in the history
🧠  Adding AI Readiness
  • Loading branch information
JustSteveKing authored Apr 8, 2024
2 parents be4cb2b + 31c0f5e commit 0c6e941
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 0c6e941

Please sign in to comment.