chore: generate

This commit is contained in:
opencode-agent[bot] 2026-06-25 14:56:25 +00:00
commit ddbc8d3b75
20 changed files with 169 additions and 97 deletions

View file

@ -107,11 +107,10 @@ export default function StatsModel() {
const modelName = createMemo(() => catalogEntry()?.name ?? stats()?.model ?? modelParam() ?? i18n.t("model.fallback"))
const labName = createMemo(() => formatCatalogLabName(catalogEntry()?.lab ?? stats()?.provider ?? labParam()))
const modelTitle = createMemo(() => i18n.t("model.title", { model: modelName() }))
const modelDescription = createMemo(
() => i18n.t("model.description", { model: modelName() }),
)
const modelDescription = createMemo(() => i18n.t("model.description", { model: modelName() }))
const modelPath = createMemo(
() => `/data/${catalogEntry()?.id ?? [labParam(), stats()?.slug ?? modelParam()].filter((part) => part.length > 0).join("/")}`,
() =>
`/data/${catalogEntry()?.id ?? [labParam(), stats()?.slug ?? modelParam()].filter((part) => part.length > 0).join("/")}`,
)
const modelUrl = createMemo(() => localizedUrl(language.locale(), modelPath()))
const statsUnfurlUrl = new URL(statsUnfurlPath, localizedUrl("en", "/data/")).toString()
@ -261,17 +260,10 @@ function ModelHero(props: { data: StatsModelData | null; catalog: ModelCatalogEn
<span data-slot="model-id-tag">{modelId()}</span>
</div>
<h1>{props.catalog?.name ?? props.data?.model ?? i18n.t("model.fallback")}</h1>
<Show
when={props.data}
fallback={
<p>{i18n.t("model.catalogFallback")}</p>
}
>
<Show when={props.data} fallback={<p>{i18n.t("model.catalogFallback")}</p>}>
{(data) => (
<p>
{data().rank === null
? i18n.t("model.unranked")
: i18n.t("model.ranked", { rank: data().rank ?? "" })}{" "}
{data().rank === null ? i18n.t("model.unranked") : i18n.t("model.ranked", { rank: data().rank ?? "" })}{" "}
{i18n.t("model.observedVolume", { share: formatPercent(data().tokenShare) })}
</p>
)}
@ -322,8 +314,14 @@ function ModelCatalogPanel(props: { data: ModelCatalogEntry }) {
return (
<aside data-component="model-catalog" aria-label={i18n.t("model.facts")}>
<div data-slot="model-catalog-grid">
<CatalogDatum label={i18n.t("model.context")} value={formatCatalogLimit(props.data.limit?.context, i18n.t("home.unknown"))} />
<CatalogDatum label={i18n.t("model.output")} value={formatCatalogLimit(props.data.limit?.output, i18n.t("home.unknown"))} />
<CatalogDatum
label={i18n.t("model.context")}
value={formatCatalogLimit(props.data.limit?.context, i18n.t("home.unknown"))}
/>
<CatalogDatum
label={i18n.t("model.output")}
value={formatCatalogLimit(props.data.limit?.output, i18n.t("home.unknown"))}
/>
<CatalogDatum
label={i18n.t("model.knowledge")}
value={formatCatalogDate(props.data.knowledge, language.tag(language.locale()), i18n.t("home.unknown"))}
@ -332,7 +330,10 @@ function ModelCatalogPanel(props: { data: ModelCatalogEntry }) {
label={i18n.t("model.release")}
value={formatCatalogDate(props.data.releaseDate, language.tag(language.locale()), i18n.t("home.unknown"))}
/>
<CatalogDatum label={i18n.t("model.inputs")} value={formatCatalogModalities(props.data.modalities.input, i18n)} />
<CatalogDatum
label={i18n.t("model.inputs")}
value={formatCatalogModalities(props.data.modalities.input, i18n)}
/>
</div>
</aside>
)
@ -360,9 +361,21 @@ function ModelOverview(props: { data: StatsModelData | null }) {
>
{(data) => (
<div data-component="model-metric-grid">
<MetricCard label={i18n.t("model.tokens")} value={formatTokens(data().totals.tokens)} detail={i18n.t("model.lastTwoMonths")} />
<MetricCard label={i18n.t("model.uniqueUsers")} value={formatUsers(data().totals.uniqueUsers)} detail={i18n.t("model.lastTwoMonths")} />
<MetricCard label={i18n.t("model.sessions")} value={formatInteger(data().totals.sessions)} detail={i18n.t("model.completedSessions")} />
<MetricCard
label={i18n.t("model.tokens")}
value={formatTokens(data().totals.tokens)}
detail={i18n.t("model.lastTwoMonths")}
/>
<MetricCard
label={i18n.t("model.uniqueUsers")}
value={formatUsers(data().totals.uniqueUsers)}
detail={i18n.t("model.lastTwoMonths")}
/>
<MetricCard
label={i18n.t("model.sessions")}
value={formatInteger(data().totals.sessions)}
detail={i18n.t("model.completedSessions")}
/>
<MetricCard
label={i18n.t("model.tokenShare")}
value={formatPercent(data().tokenShare)}
@ -388,7 +401,9 @@ function ModelUsageSection(props: { data: ModelUsagePoint[] }) {
<SectionTitle title={i18n.t("nav.usage")} description={i18n.t("model.usageDescription")} />
<Show
when={props.data.some((item) => item.tokens > 0)}
fallback={<ModelEmptyState title={i18n.t("model.noUsageTitle")} description={i18n.t("model.noUsageDescription")} />}
fallback={
<ModelEmptyState title={i18n.t("model.noUsageTitle")} description={i18n.t("model.noUsageDescription")} />
}
>
<ModelColumnChart data={props.data} metric="tokens" ariaLabel={i18n.t("model.dailyTokenChart")} />
</Show>
@ -400,10 +415,7 @@ function ModelUsersSection(props: { data: ModelUsagePoint[] }) {
const i18n = useI18n()
return (
<section id="users" data-section="model-panel">
<SectionTitle
title={i18n.t("model.uniqueUsers")}
description={i18n.t("model.usersDescription")}
/>
<SectionTitle title={i18n.t("model.uniqueUsers")} description={i18n.t("model.usersDescription")} />
<Show
when={props.data.some((item) => item.users > 0)}
fallback={
@ -541,12 +553,19 @@ function ModelEfficiencySection(props: { data: StatsModelData | null; catalog: M
<Show
when={props.data}
fallback={
<ModelEmptyState title={i18n.t("model.noEfficiencyTitle")} description={i18n.t("model.noEfficiencyDescription")} />
<ModelEmptyState
title={i18n.t("model.noEfficiencyTitle")}
description={i18n.t("model.noEfficiencyDescription")}
/>
}
>
{(data) => (
<div data-component="model-metric-grid" data-variant="dense">
<MetricCard label={i18n.t("model.cost")} value={formatMoney(data().totals.cost)} detail={i18n.t("model.totalSpend")} />
<MetricCard
label={i18n.t("model.cost")}
value={formatMoney(data().totals.cost)}
detail={i18n.t("model.totalSpend")}
/>
<MetricCard
label={i18n.t("model.costPerMillion")}
value={
@ -564,7 +583,11 @@ function ModelEfficiencySection(props: { data: StatsModelData | null; catalog: M
value={formatTokens(data().totals.tokensPerSession)}
detail={i18n.t("model.average")}
/>
<MetricCard label={i18n.t("model.cacheRatio")} value={formatPercent(data().totals.cacheRatio)} detail={i18n.t("model.inputTokens")} />
<MetricCard
label={i18n.t("model.cacheRatio")}
value={formatPercent(data().totals.cacheRatio)}
detail={i18n.t("model.inputTokens")}
/>
</div>
)}
</Show>
@ -602,9 +625,7 @@ function ModelGeoBreakdownSection(props: { data: Record<UsageRange, CountryEntry
<SectionTitle title={i18n.t("nav.geoBreakdown")} description={i18n.t("model.geoDescription")} />
<Show
when={data().length > 0}
fallback={
<ModelEmptyState title={i18n.t("model.noGeoTitle")} description={i18n.t("model.noGeoDescription")} />
}
fallback={<ModelEmptyState title={i18n.t("model.noGeoTitle")} description={i18n.t("model.noGeoDescription")} />}
>
<div data-component="geo-breakdown">
<div data-slot="geo-map-panel">
@ -769,7 +790,9 @@ function ModelPeersSection(props: { data: StatsModelData | null }) {
<SectionTitle title={i18n.t("nav.peers")} description={i18n.t("model.peersDescription")} />
<Show
when={props.data?.peers.length}
fallback={<ModelEmptyState title={i18n.t("model.noPeersTitle")} description={i18n.t("model.noPeersDescription")} />}
fallback={
<ModelEmptyState title={i18n.t("model.noPeersTitle")} description={i18n.t("model.noPeersDescription")} />
}
>
<ol data-component="model-peer-list">
<For each={props.data?.peers ?? []}>

View file

@ -62,9 +62,7 @@ export default function StatsLab() {
const [themePreference, setThemePreference] = createSignal<ThemePreference>("system")
const labName = createMemo(() => lab()?.name ?? formatCatalogLabName(labParam()))
const labTitle = createMemo(() => i18n.t("lab.title", { lab: labName() }))
const labDescription = createMemo(
() => i18n.t("lab.description", { lab: labName() }),
)
const labDescription = createMemo(() => i18n.t("lab.description", { lab: labName() }))
const labPath = createMemo(() => `/data/${lab()?.id ?? labParam()}`)
const labUrl = createMemo(() => localizedUrl(language.locale(), labPath()))
const statsUnfurlUrl = new URL(statsUnfurlPath, localizedUrl("en", "/data/")).toString()
@ -212,7 +210,9 @@ function LabHero(props: { lab: ModelCatalogLab; stats: StatsLabData | null }) {
{props.stats
? i18n.t("lab.shareOfUsage", { share: formatPercent(props.stats.tokenShare) })
: latest()
? i18n.t("lab.latestRelease", { date: formatCatalogDate(latest(), language.tag(language.locale()), i18n.t("home.unknown")) })
? i18n.t("lab.latestRelease", {
date: formatCatalogDate(latest(), language.tag(language.locale()), i18n.t("home.unknown")),
})
: i18n.t("lab.usageAfterActivity")}
</p>
</div>
@ -240,12 +240,7 @@ function LabUsageSection(props: { lab: ModelCatalogLab; data: StatsLabData | nul
</p>
<Show
when={usage().some((item) => item.tokens > 0)}
fallback={
<LabEmptyState
title={i18n.t("lab.noUsageTitle")}
description={i18n.t("lab.noUsageDescription")}
/>
}
fallback={<LabEmptyState title={i18n.t("lab.noUsageTitle")} description={i18n.t("lab.noUsageDescription")} />}
>
<div
data-component="model-usage-chart"

View file

@ -216,8 +216,7 @@ function Hero(props: { updatedAt: string | null }) {
if (
formatUpdatedAtLabel(
formatUpdatedAtParts(props.updatedAt, nextTimeZone, language.tag(language.locale()), i18n.t("home.justNow")),
) ===
formatUpdatedAtLabel(updatedAtParts("UTC"))
) === formatUpdatedAtLabel(updatedAtParts("UTC"))
)
return
const timeouts: number[] = []
@ -993,7 +992,9 @@ function LeaderboardCard(props: {
data-component="leader-card"
data-size={props.size}
data-active={props.active ? "true" : undefined}
href={language.route(`${import.meta.env.BASE_URL}${modelSlug(props.entry.provider)}/${modelSlug(props.entry.model)}`)}
href={language.route(
`${import.meta.env.BASE_URL}${modelSlug(props.entry.provider)}/${modelSlug(props.entry.model)}`,
)}
role="listitem"
tabIndex={0}
aria-label={`${String(props.entry.rank).padStart(2, "0")} ${props.entry.model} ${i18n.t("chart.byAuthor", { author: props.entry.author })}`}
@ -1110,7 +1111,9 @@ function MarketShareSection(props: { data: StatsHomeData["market"] }) {
<p>
<span>[*]</span>
<strong>
{inspecting() ? formatMarketDate(activeDay(), i18n.t("home.noData")) : formatMarketRange(data(), i18n.t("home.noData"))}
{inspecting()
? formatMarketDate(activeDay(), i18n.t("home.noData"))
: formatMarketRange(data(), i18n.t("home.noData"))}
</strong>
</p>
<div hidden>
@ -1311,7 +1314,9 @@ function GeoBreakdownSection(props: { data: StatsHomeData["country"] }) {
{(country) => (
<div data-slot="geo-active-country">
<span>#{String(country().rank).padStart(2, "0")}</span>
<strong>{formatCountryName(country().country, language.tag(language.locale()), i18n.t("home.unknown"))}</strong>
<strong>
{formatCountryName(country().country, language.tag(language.locale()), i18n.t("home.unknown"))}
</strong>
<p>
<b>{formatGeoTokens(country().tokens)}</b>
<em>{formatGeoShare(country().share)}</em>
@ -1444,7 +1449,9 @@ function GeoCountryList(props: {
>
<span>{String(country.rank).padStart(2, "0")}</span>
<i />
<strong>{formatCountryName(country.country, language.tag(language.locale()), i18n.t("home.unknown"))}</strong>
<strong>
{formatCountryName(country.country, language.tag(language.locale()), i18n.t("home.unknown"))}
</strong>
<em>{formatGeoTokens(country.tokens)}</em>
<b>{formatGeoShare(country.share)}</b>
</button>
@ -1661,9 +1668,7 @@ function CacheRatioSection(props: { data: StatsHomeData["cacheRatio"] }) {
<SectionTitle title={i18n.t("home.cacheRatioTitle")} description={i18n.t("home.cacheRatioDescription")} />
<Show
when={visible().length > 0}
fallback={
<EmptyState title={i18n.t("home.noCacheTitle")} description={i18n.t("home.noCacheDescription")} />
}
fallback={<EmptyState title={i18n.t("home.noCacheTitle")} description={i18n.t("home.noCacheDescription")} />}
>
<CacheRatioChart data={visible()} activeIndex={selectedIndex()} onActiveIndexChange={setActiveIndex} />
</Show>
@ -1790,10 +1795,7 @@ function SessionCostSection(props: { data: StatsHomeData["sessionCost"] }) {
<Show
when={visible().length > 0}
fallback={
<EmptyState
title={i18n.t("home.noSessionCostTitle")}
description={i18n.t("home.noSessionCostDescription")}
/>
<EmptyState title={i18n.t("home.noSessionCostTitle")} description={i18n.t("home.noSessionCostDescription")} />
}
>
<SessionCostChart data={visible()} activeIndex={selectedIndex()} onActiveIndexChange={setActiveIndex} />

View file

@ -102,7 +102,11 @@ export function Header(props: { githubStars: string; links?: readonly HeaderLink
return (
<header data-component="top" data-menu-open={menuOpen() ? "true" : undefined}>
<div data-slot="header-bar">
<a data-slot="brand" href={localHref(props.brandHref ?? import.meta.env.BASE_URL)} aria-label={i18n.t("header.brandLabel")}>
<a
data-slot="brand"
href={localHref(props.brandHref ?? import.meta.env.BASE_URL)}
aria-label={i18n.t("header.brandLabel")}
>
<DataWordmark />
</a>
<nav data-component="section-nav" aria-label={i18n.t("header.sectionNavLabel")}>
@ -147,7 +151,12 @@ export function Header(props: { githubStars: string; links?: readonly HeaderLink
</button>
</div>
</div>
<nav id="stats-mobile-nav" data-slot="mobile-menu" aria-label={i18n.t("header.sectionNavLabel")} hidden={!menuOpen()}>
<nav
id="stats-mobile-nav"
data-slot="mobile-menu"
aria-label={i18n.t("header.sectionNavLabel")}
hidden={!menuOpen()}
>
<a
data-slot="mobile-menu-item"
data-variant="github"
@ -303,9 +312,7 @@ function FooterLanguageSwitcher() {
if (href !== current) window.location.assign(href)
}}
>
<For each={language.locales}>
{(locale) => <option value={locale}>{language.label(locale)}</option>}
</For>
<For each={language.locales}>{(locale) => <option value={locale}>{language.label(locale)}</option>}</For>
</select>
</label>
)
@ -422,7 +429,12 @@ function SubscribeModal(props: { onClose: () => void }) {
<div data-slot="modal-panel">
<div data-slot="modal-brand">
<img data-slot="modal-logo" src={opencodeWordmarkDark} alt="OpenCode" />
<button data-slot="modal-close" type="button" aria-label={i18n.t("modal.closeNewsletter")} onClick={props.onClose}>
<button
data-slot="modal-close"
type="button"
aria-label={i18n.t("modal.closeNewsletter")}
onClick={props.onClose}
>
<svg width="16" height="16" viewBox="0 0 16 16" fill="none" aria-hidden="true">
<path d="M4.44 4.44L11.56 11.56M11.56 4.44L4.44 11.56" stroke="currentColor" />
</svg>
@ -499,7 +511,11 @@ function FooterColumn(props: {
<nav aria-label={props.title}>
<For each={props.links}>
{(link) => (
<a href={props.localHref(link.href)} target={link.href.startsWith("http") ? "_blank" : undefined} rel="noreferrer">
<a
href={props.localHref(link.href)}
target={link.href.startsWith("http") ? "_blank" : undefined}
rel="noreferrer"
>
{link.label}
</a>
)}