Skip to content

Commit e302343

Browse files
committed
refactor(models): rename model-colors.ts to consts.ts
1 parent 5ef97b2 commit e302343

File tree

3 files changed

+20
-2
lines changed

3 files changed

+20
-2
lines changed
Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
export const PROVIDER_COLORS: Record<string, string> = {
2+
anthropic: '#D97757',
3+
openai: '#E8E8E8',
4+
google: '#4285F4',
5+
xai: '#555555',
6+
mistral: '#F7D046',
7+
groq: '#F55036',
8+
cerebras: '#6D5BF7',
9+
deepseek: '#4D6BFE',
10+
fireworks: '#FF6D3A',
11+
bedrock: '#FF9900',
12+
}
13+
14+
const DEFAULT_COLOR = '#888888'
15+
16+
export function getProviderColor(providerId: string): string {
17+
return PROVIDER_COLORS[providerId] ?? DEFAULT_COLOR
18+
}

apps/sim/app/(landing)/models/components/model-comparison-charts.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
import type { ComponentType } from 'react'
44
import { useMemo } from 'react'
55
import Link from 'next/link'
6-
import { getProviderColor } from '@/app/(landing)/models/components/model-colors'
6+
import { getProviderColor } from '@/app/(landing)/models/components/consts'
77
import type { CatalogModel } from '@/app/(landing)/models/utils'
88
import {
99
formatPrice,

apps/sim/app/(landing)/models/components/model-timeline-chart.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
import { useMemo } from 'react'
44
import Link from 'next/link'
5-
import { getProviderColor } from '@/app/(landing)/models/components/model-colors'
5+
import { getProviderColor } from '@/app/(landing)/models/components/consts'
66
import type { CatalogModel } from '@/app/(landing)/models/utils'
77

88
function formatShortDate(date: string): string {

0 commit comments

Comments
 (0)