{t.title}
-{t.description}
-diff --git a/.github/sync-models/publish.sh b/.github/sync-models/publish.sh index 246ca78c..a6b240ac 100755 --- a/.github/sync-models/publish.sh +++ b/.github/sync-models/publish.sh @@ -86,7 +86,11 @@ if [[ $safe == false && -n $pr ]]; then [[ $(auto_enabled "$pr") == false ]] || fail "Auto-merge is still enabled for #$pr" fi -title="chore(sync): update $target catalog" +if [[ $target == catalog ]]; then + title="chore(sync): update model catalog" +else + title="chore(sync): update $target catalog" +fi tree=$("${git[@]}" write-tree) # Reuse an identical remote commit to avoid restarting CI on every scheduled run. remote=$("${git[@]}" ls-remote origin "refs/heads/$branch") diff --git a/apps/site/src/components/Catalogue.astro b/apps/site/src/components/Catalogue.astro index d459bb30..f6306e54 100644 --- a/apps/site/src/components/Catalogue.astro +++ b/apps/site/src/components/Catalogue.astro @@ -1,131 +1,130 @@ --- import '@fontsource-variable/noto-sans'; -import { catalog } from '@lmspeed/models-publish'; -import { - type Locale, - localePath, - locales, - messages, - siteUrl, -} from '../lib/catalogue'; +import { type Locale, localePath, locales, markdownPath, messages, type Section, siteUrl } from '../lib/catalogue'; +import { glyphs } from '../lib/glyphs'; import '../styles/catalogue.css'; +import DevelopersDirectory from './DevelopersDirectory.astro'; +import DirectoryLinks from './DirectoryLinks.astro'; +import HelpDialog from './HelpDialog.astro'; +import Icon from './Icon.astro'; +import LocaleLinks from './LocaleLinks.astro'; import ModelsDirectory from './ModelsDirectory.astro'; import ProvidersDirectory from './ProvidersDirectory.astro'; interface Props { - locale?: Locale; + locale: Locale; + section: Section; } -const { locale = 'en' } = Astro.props; +const { locale, section } = Astro.props; const t = messages[locale]; -const canonical = `${siteUrl}${localePath(locale)}`; -const counts = catalog.api.counts; -const snippets = { - HTTP: `curl ${siteUrl}/v2/models/openai/gpt-5.json -curl ${siteUrl}/v2/providers/openai.json -curl ${siteUrl}/v2/api.json`, - 'JavaScript / TypeScript': `import { Client } from '@lmspeed/models'; - -const client = new Client(); -const model = await client.fetchModel('openai/gpt-5'); -const provider = await client.fetchProvider('openai'); -const catalog = await client.refresh();`, -}; +const canonical = `${siteUrl}${localePath(locale, section)}`; +const title = `${section === 'models' ? t.title : t[section]} · LMSpeed Models`; +const description = section === 'models' ? t.description : `${t[section]} · ${t.description}`; +const ogLocales = { en: 'en_US', zh: 'zh_CN', ru: 'ru_RU' }; +const github = 'https://github.com/LMSpeed/models'; ---
- -{t.description}
-