import "./index.css" import { createAsync, query, redirect } from "@solidjs/router" import { Title, Meta } from "@solidjs/meta" import { For, createMemo, createSignal, onCleanup, onMount } from "solid-js" //import { HttpHeader } from "@solidjs/start" import goLogoLight from "../../asset/go-ornate-light.svg" import goLogoDark from "../../asset/go-ornate-dark.svg" import { EmailSignup } from "~/component/email-signup" import { Faq } from "~/component/faq" import { Legal } from "~/component/legal" import { Footer } from "~/component/footer" import { Header } from "~/component/header" import { config } from "~/config" import { getLastSeenWorkspaceID } from "../workspace/common" import { IconMiniMax, IconZai } from "~/component/icon" import { useI18n } from "~/context/i18n" import { useLanguage } from "~/context/language" import { LocaleLinks } from "~/component/locale-links" const checkLoggedIn = query(async () => { "use server" return await getLastSeenWorkspaceID().catch(() => undefined) }, "checkLoggedIn.get") function LimitsGraph(props: { href: string }) { let root!: HTMLElement const [visible, setVisible] = createSignal(false) const i18n = useI18n() onMount(() => { if (typeof IntersectionObserver === "undefined") return setVisible(true) const observer = new IntersectionObserver( (entries) => { const entry = entries[0] if (!entry?.isIntersecting) return setVisible(true) observer.disconnect() }, { threshold: 0.35 }, ) observer.observe(root) onCleanup(() => observer.disconnect()) }) const free = 200 const models = [ { id: "glm", name: "GLM-5", req: 1150, d: "120ms" }, { id: "kimi", name: "Kimi K2.5", req: 1850, d: "240ms" }, { id: "minimax", name: "MiniMax M2.5", req: 20000, d: "360ms" }, ] const w = 720 const h = 220 const left = 40 const right = 60 const top = 18 const bottom = 44 const plot = w - left - right const ratio = (n: number) => n / free const rmax = Math.max(1, ...models.map((m) => ratio(m.req))) const log = (n: number) => Math.log10(Math.max(n, 1)) const base = 24 const p = 1.8 const x = (r: number) => left + base + Math.pow(log(r) / log(rmax), p) * (plot - base) const start = (x(1) / w) * 100 const ticks = [1, 5, 10, 25, 50, 100].filter((t) => t <= rmax) const labels = (() => { const set = new Set() let last = -Infinity for (const t of ticks) { if (t === 1) { set.add(t) last = x(t) continue } const pos = x(t) if (pos - last < 44) continue set.add(t) last = pos } return set })() const shown = ticks.filter((t) => labels.has(t)) const bh = 8 const gap = 16 const step = bh + gap const sep = bh + 40 const fy = top + 22 const gy = (i: number) => fy + sep + step * i const my = models.length < 2 ? gy(0) : (gy(0) + gy(models.length - 1)) / 2 const px = (n: number) => `${(n / w) * 100}%` const py = (n: number) => `${(n / h) * 100}%` const lx = px(left - 16) const ty = py(h - 18) return (
{i18n.t("go.graph.label")} {i18n.t("go.graph.usageLimits")}
) } export default function Home() { const workspaceID = createAsync(() => checkLoggedIn()) const subscribeUrl = createMemo(() => (workspaceID() ? `/workspace/${workspaceID()}/go` : "/auth")) const i18n = useI18n() const language = useLanguage() return (
{/**/} {i18n.t("go.title")}

{i18n.t("go.pricing.body")}

{i18n.t("go.problem.title")}

{i18n.t("go.problem.body")}

{i18n.t("go.problem.subtitle")}

  • [*] {i18n.t("go.problem.item1")}
  • [*] {i18n.t("go.problem.item2")}
  • [*] {i18n.t("go.problem.item3")}
  • [*] {i18n.t("go.problem.item4")}

{i18n.t("go.how.title")}

{i18n.t("go.how.body")}

{i18n.t("common.faq")}

) }