Skip to content

Commit 7d2140d

Browse files
committed
refactor: rename tools_compatible to compatible_tools across codebase for consistency
1 parent 17bac85 commit 7d2140d

9 files changed

Lines changed: 13 additions & 13 deletions

File tree

src/components/BreakEvenCalculator.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ interface PlanData {
1919
categories: string[];
2020
student_discount: boolean;
2121
startup_credits: boolean;
22-
tools_compatible: string[];
22+
compatible_tools: string[];
2323
community_score?: number;
2424
latency?: {
2525
average_ms?: number;

src/components/ComparisonMatrix.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ interface PlanData {
1919
categories: string[];
2020
student_discount: boolean;
2121
startup_credits: boolean;
22-
tools_compatible: string[];
22+
compatible_tools: string[];
2323
community_score?: number;
2424
latency?: {
2525
average_ms?: number;
@@ -44,7 +44,7 @@ const COMPARISON_ROWS: { key: string; label: string; getValue: (p: PlanData) =>
4444
{ key: 'tpm', label: 'Tokens/min', getValue: p => p.limits.tokens_per_minute ? `${(p.limits.tokens_per_minute / 1000).toFixed(0)}K` : '—' },
4545
{ key: 'daily', label: 'Daily Message Limit', getValue: p => p.limits.daily_message_limit?.toString() || '—' },
4646
{ key: 'features', label: 'Features', getValue: p => p.features.join(', ') || '—' },
47-
{ key: 'tools', label: 'Tool Compatibility', getValue: p => p.tools_compatible.join(', ') || '—' },
47+
{ key: 'tools', label: 'Tool Compatibility', getValue: p => p.compatible_tools.join(', ') || '—' },
4848
{ key: 'student', label: 'Student Discount', getValue: p => p.student_discount ? '✅ Yes' : '❌ No' },
4949
{ key: 'community', label: 'Community Score', getValue: p => p.community_score != null ? `${p.community_score}/100` : '—' },
5050
{ key: 'latency', label: 'Avg Latency', getValue: p => p.latency?.average_ms ? `${p.latency.average_ms}ms` : '—' },

src/components/CompatibilityMatrix.astro

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ const compatibilityData = allPlans
2323
provider: plan.data.provider,
2424
badge: plan.data.badge,
2525
compatibility: matrixTools.map(tool => {
26-
const isNative = plan.data.tools_compatible.includes(tool.slug);
26+
const isNative = plan.data.compatible_tools.includes(tool.slug);
2727
// Check if this tool lists this plan as compatible
2828
const toolData = allTools.find(t => t.data.slug === tool.slug);
2929
const isViaPlugin = toolData?.data.plans_compatible.includes(plan.data.slug) && !isNative;

src/components/FilterBar.astro

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ const { plans } = Astro.props;
77
88
const allProviders = [...new Set(plans.map(p => p.provider))].sort();
99
const allCategories = [...new Set(plans.flatMap(p => p.categories))].sort();
10-
const allTools = [...new Set(plans.flatMap(p => p.tools_compatible))].sort();
10+
const allTools = [...new Set(plans.flatMap(p => p.compatible_tools))].sort();
1111
1212
const PRICE_RANGES = [
1313
{ value: 'all', label: 'All Prices' },

src/components/RecommendationWizard.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ interface PlanData {
1919
categories: string[];
2020
student_discount: boolean;
2121
startup_credits: boolean;
22-
tools_compatible: string[];
22+
compatible_tools: string[];
2323
community_score?: number;
2424
latency?: {
2525
average_ms?: number;

src/pages/compare.astro

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ const planData = allPlans.map(plan => ({
2727
categories: plan.data.categories,
2828
student_discount: plan.data.student_discount,
2929
startup_credits: plan.data.startup_credits,
30-
tools_compatible: plan.data.tools_compatible,
30+
compatible_tools: plan.data.compatible_tools,
3131
community_score: plan.data.community_score ?? undefined,
3232
latency: plan.data.latency ? {
3333
average_ms: plan.data.latency.average_ms,

src/pages/plans/[slug].astro

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ const serializedPlans = allPlans.map(p => ({
3838
categories: p.data.categories,
3939
student_discount: p.data.student_discount,
4040
startup_credits: p.data.startup_credits,
41-
tools_compatible: p.data.tools_compatible,
41+
compatible_tools: p.data.compatible_tools,
4242
community_score: p.data.community_score ?? undefined,
4343
latency: p.data.latency ? {
4444
average_ms: p.data.latency.average_ms,
@@ -313,11 +313,11 @@ const getUptimeColor = (pct?: number) => {
313313
)}
314314

315315
<!-- Tool Compatibility -->
316-
{planData.tools_compatible.length > 0 && (
316+
{planData.compatible_tools.length > 0 && (
317317
<div class="bg-base-100 rounded-2xl border border-base-300 shadow-sm p-6">
318318
<h2 class="text-lg font-bold mb-3">Compatible Tools</h2>
319319
<div class="flex flex-wrap gap-2">
320-
{planData.tools_compatible.map((tool) => (
320+
{planData.compatible_tools.map((tool) => (
321321
<a href={`/tools/${tool}/`} class="badge badge-outline badge-sm hover:badge-primary transition-colors duration-200 cursor-pointer">{tool}</a>
322322
))}
323323
</div>

src/pages/plans/index.astro

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ const planDataForFilter = allPlans.map(plan => ({
3131
categories: plan.data.categories,
3232
student_discount: plan.data.student_discount,
3333
startup_credits: plan.data.startup_credits,
34-
tools_compatible: plan.data.tools_compatible,
34+
compatible_tools: plan.data.compatible_tools,
3535
community_score: plan.data.community_score ?? undefined,
3636
community_score: plan.data.community_score ?? undefined,
3737
latency: plan.data.latency ? {
@@ -96,7 +96,7 @@ const planDataForFilter = allPlans.map(plan => ({
9696
data-badge={plan.data.badge}
9797
data-provider={plan.data.provider}
9898
data-categories={plan.data.categories.join(',')}
99-
data-tools={plan.data.tools_compatible.join(',')}
99+
data-tools={plan.data.compatible_tools.join(',')}
100100
data-student={plan.data.student_discount ? 'true' : 'false'}
101101
data-startup={plan.data.startup_credits ? 'true' : 'false'}
102102
>

src/pages/tools/[slug].astro

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ const t = tool.data;
1717
1818
const allPlans = await getCollection('plans');
1919
// Find plans compatible with this tool
20-
const compatiblePlans = allPlans.filter(p => p.data.tools_compatible.includes(t.slug));
20+
const compatiblePlans = allPlans.filter(p => p.data.compatible_tools.includes(t.slug));
2121
---
2222

2323
<BaseLayout

0 commit comments

Comments
 (0)