kyd-shared-badge 0.3.207 → 0.3.209
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/package.json +8 -8
- package/src/SharedBadgeDisplay.tsx +6 -2
- package/src/types.ts +20 -4
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "kyd-shared-badge",
|
|
3
|
-
"version": "0.3.
|
|
3
|
+
"version": "0.3.209",
|
|
4
4
|
"private": false,
|
|
5
5
|
"main": "./src/index.ts",
|
|
6
6
|
"module": "./src/index.ts",
|
|
@@ -19,18 +19,18 @@
|
|
|
19
19
|
"react-dom": "^19.0.0"
|
|
20
20
|
},
|
|
21
21
|
"dependencies": {
|
|
22
|
-
"@ai-sdk/openai": "2.0.
|
|
23
|
-
"@aws-sdk/client-s3": "3.
|
|
24
|
-
"@aws-sdk/client-ses": "3.
|
|
25
|
-
"@aws-sdk/lib-dynamodb": "3.
|
|
26
|
-
"@aws-sdk/s3-request-presigner": "3.
|
|
22
|
+
"@ai-sdk/openai": "2.0.101",
|
|
23
|
+
"@aws-sdk/client-s3": "3.1015.0",
|
|
24
|
+
"@aws-sdk/client-ses": "3.1015.0",
|
|
25
|
+
"@aws-sdk/lib-dynamodb": "3.1015.0",
|
|
26
|
+
"@aws-sdk/s3-request-presigner": "3.1015.0",
|
|
27
27
|
"@chatscope/chat-ui-kit-react": "2.1.1",
|
|
28
28
|
"@chatscope/chat-ui-kit-styles": "1.4.0",
|
|
29
29
|
"@knowyourdeveloper/react-bubble-chart": "1.0.8",
|
|
30
30
|
"@knowyourdeveloper/react-gauge-component": "1.1.30",
|
|
31
31
|
"@radix-ui/react-slot": "1.2.3",
|
|
32
32
|
"@radix-ui/react-tooltip": "1.2.8",
|
|
33
|
-
"ai": "5.0.
|
|
33
|
+
"ai": "5.0.159",
|
|
34
34
|
"class-variance-authority": "0.7.1",
|
|
35
35
|
"framer-motion": "12.23.24",
|
|
36
36
|
"i18n-iso-countries": "7.14.0",
|
|
@@ -54,7 +54,7 @@
|
|
|
54
54
|
"@types/react-dom": "19.1.7",
|
|
55
55
|
"@vitejs/plugin-react": "5.1.4",
|
|
56
56
|
"jsdom": "28.1.0",
|
|
57
|
-
"rollup": "4.
|
|
57
|
+
"rollup": "4.60.0",
|
|
58
58
|
"vite-tsconfig-paths": "6.1.1",
|
|
59
59
|
"vitest": "4.0.18"
|
|
60
60
|
}
|
|
@@ -335,6 +335,10 @@ const SharedBadgeDisplay = ({ badgeData, chatProps, headless, selfCheck = false,
|
|
|
335
335
|
// Local state for expanding long role descriptions
|
|
336
336
|
const [showFullRoleDescription, setShowFullRoleDescription] = useState(false);
|
|
337
337
|
const rec = assessmentResult?.recommendations;
|
|
338
|
+
const recommendationRoleName = (assessmentResult?.enterprise_match?.role?.name || '').trim();
|
|
339
|
+
const recommendationsTitle = recommendationRoleName
|
|
340
|
+
? `Evidence Recommendations for ${recommendationRoleName}`
|
|
341
|
+
: 'Evidence Recommendations';
|
|
338
342
|
|
|
339
343
|
return (
|
|
340
344
|
<div className={`${wrapperMaxWidth} mx-auto`}>
|
|
@@ -419,14 +423,14 @@ const SharedBadgeDisplay = ({ badgeData, chatProps, headless, selfCheck = false,
|
|
|
419
423
|
</div>
|
|
420
424
|
)}
|
|
421
425
|
<div>
|
|
422
|
-
<Reveal headless={isHeadless} as={'h4'} offsetY={8} className={'text-2xl font-semibold mb-3'} style={{ color: 'var(--text-main)' }}>
|
|
426
|
+
<Reveal headless={isHeadless} as={'h4'} offsetY={8} className={'text-2xl font-semibold mb-3'} style={{ color: 'var(--text-main)' }}>{recommendationsTitle}</Reveal>
|
|
423
427
|
<Reveal headless={isHeadless}>
|
|
424
428
|
<div className={'space-y-3'}>
|
|
425
429
|
{rec?.summary ? (
|
|
426
430
|
<div className={'text-sm'} style={{ color: 'var(--text-secondary)' }}>{rec.summary}</div>
|
|
427
431
|
) : null}
|
|
428
432
|
{Array.isArray(rec?.bullet_points) && (rec?.bullet_points?.length || 0) > 0 ? (
|
|
429
|
-
<ul className={'list-disc pl-5 text-sm'} style={{ color: 'var(--text-secondary)' }}>
|
|
433
|
+
<ul className={'list-disc pl-5 space-y-3 text-sm'} style={{ color: 'var(--text-secondary)' }}>
|
|
430
434
|
{rec?.bullet_points?.map((bp, idx) => (
|
|
431
435
|
<li key={idx}>{bp}</li>
|
|
432
436
|
))}
|
package/src/types.ts
CHANGED
|
@@ -207,14 +207,30 @@ export interface EnterpriseUseCases {
|
|
|
207
207
|
note?: string;
|
|
208
208
|
}
|
|
209
209
|
|
|
210
|
+
export type RecommendationPriority = 'High' | 'Medium' | 'Low';
|
|
211
|
+
|
|
212
|
+
export type RecommendationItem = {
|
|
213
|
+
title: string;
|
|
214
|
+
priority: RecommendationPriority;
|
|
215
|
+
source: string;
|
|
216
|
+
recommendation: string;
|
|
217
|
+
evidence: string;
|
|
218
|
+
why_this_matters: string;
|
|
219
|
+
what_to_do_next: string;
|
|
220
|
+
expected_outcome: string;
|
|
221
|
+
};
|
|
222
|
+
|
|
223
|
+
export type Recommendations = {
|
|
224
|
+
summary?: string;
|
|
225
|
+
bullet_points?: string[];
|
|
226
|
+
items?: RecommendationItem[];
|
|
227
|
+
};
|
|
228
|
+
|
|
210
229
|
|
|
211
230
|
export interface AssessmentResult {
|
|
212
231
|
final_percent: number;
|
|
213
232
|
report_summary?: string;
|
|
214
|
-
recommendations:
|
|
215
|
-
summary?: string;
|
|
216
|
-
bullet_points?: string[];
|
|
217
|
-
};
|
|
233
|
+
recommendations: Recommendations;
|
|
218
234
|
developer_trust_explanation?: string;
|
|
219
235
|
industry_considerations?: string;
|
|
220
236
|
|