From f63be0a4082ee62695fa3aab192f5f6401b2fb40 Mon Sep 17 00:00:00 2001
From: Adrian Machado
Date: Mon, 25 Sep 2023 12:37:48 -0700
Subject: [PATCH] Cleanup Summary UI
---
apps/api/src/lib/rating.ts | 2 +-
apps/web/src/app/report/[id]/report-summary.tsx | 4 ++--
apps/web/src/components/DetailedScoreSection/index.tsx | 1 +
3 files changed, 4 insertions(+), 3 deletions(-)
diff --git a/apps/api/src/lib/rating.ts b/apps/api/src/lib/rating.ts
index e251143..e44f3e3 100644
--- a/apps/api/src/lib/rating.ts
+++ b/apps/api/src/lib/rating.ts
@@ -85,7 +85,7 @@ const getOpenAiLongSummary = async (issueSummary: object) => {
},
{
role: "user",
- content: `Here's a summary of issues found in an OpenAPI file. The format is a JSON, where the first level indicates the severity of the issue (the lower the key, the more severe), the second level is the name of the issue. These mostly match up to existing spectral rulesets, so you can infer what the issue is. The third level contains the number of occurrences of that issue.\n\nI would like a succinct summary of the issues and advice on how to fix them. Focus on the most common issues and the highest severity. Keep the tone casual and playful, and a bit snarky. Also, no bullet points. Maximum of 3 issues please. Rank by severity and then occurrences.\n\nHere's the issue summary\n ${JSON.stringify(
+ content: `Here's a summary of issues found in an OpenAPI file. The format is a JSON, where the first level indicates the severity of the issue (the lower the key, the more severe), the second level is the name of the issue. These mostly match up to existing spectral rulesets, so you can infer what the issue is. The third level contains the number of occurrences of that issue.\n\nI would like a succinct summary of the issues and advice on how to fix them. Focus on the most common issues and the highest severity. Keep the tone casual and playful, and a bit snarky. Do not insult the user or API creator or the API. Also, no bullet points. Maximum of 3 issues please. Rank by severity and then occurrences.\n\nHere's the issue summary\n ${JSON.stringify(
issueSummary,
)}`,
},
diff --git a/apps/web/src/app/report/[id]/report-summary.tsx b/apps/web/src/app/report/[id]/report-summary.tsx
index ecd8e01..4e23eba 100644
--- a/apps/web/src/app/report/[id]/report-summary.tsx
+++ b/apps/web/src/app/report/[id]/report-summary.tsx
@@ -27,10 +27,10 @@ const ReportSummary = ({
{isExpanded ? longSummary : shortSummary}