Skip to content

Commit 9be4f28

Browse files
chitalianJustin Torre
andauthored
Fix jawn builds 2 (#3835)
* Revert "Jawn Packages Build (#3830)" This reverts commit a38a549. * deleted bloat * use tsx * tsx to work --------- Co-authored-by: Justin Torre <justin@helicone.ai>
1 parent 09c0e0b commit 9be4f28

File tree

105 files changed

+26008
-6548
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

105 files changed

+26008
-6548
lines changed

.cursor/rules/packages.mdc

Lines changed: 0 additions & 6 deletions
This file was deleted.

bifrost/app/comparison/ModelCapabilitiesCard.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
import { Card } from "@/components/ui/card";
2-
import { ModelDetails } from "@helicone-package/cost";
2+
import { ModelDetails } from "@helicone-package/cost/interfaces/Cost";
33
import Link from "next/link";
44

55
interface ModelCapabilitiesCardProps {

bifrost/app/pi/first_page/page.tsx

Lines changed: 8 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
import { useJawnClient } from "@/lib/clients/jawnHook";
44
import { JetBrains_Mono } from "next/font/google";
55
import { useRouter } from "next/navigation";
6-
import { Suspense, useEffect } from "react";
6+
import { Suspense } from "react";
77
import { useHeliconeLogin } from "./../useHeliconeLogin";
88
import { useTestAPIKey } from "./useTestApiKey";
99
import { useQuery } from "@tanstack/react-query";
@@ -16,14 +16,7 @@ const FirstPageContent = () => {
1616
const jawn = useJawnClient(apiKey.data ?? "");
1717
const router = useRouter();
1818

19-
useEffect(() => {
20-
if (!data && !isLoading && !apiKey.data && !apiKey.isLoading) {
21-
router.push("/pi/setup?invalid_api_key=true");
22-
} else {
23-
router.push("/pi/total-requests");
24-
}
25-
}, [data, isLoading, apiKey.data, apiKey.isLoading, router]);
26-
19+
router.push("/pi/total-requests");
2720
const orgName = useQuery({
2821
queryKey: ["org-name", apiKey.data],
2922
queryFn: () => jawn.POST("/v1/pi/org-name/query"),
@@ -52,7 +45,12 @@ const FirstPageContent = () => {
5245
}),
5346
});
5447

55-
return <div>Loading...</div>;
48+
if (!data && !isLoading && !apiKey.data && !apiKey.isLoading) {
49+
router.push("/pi/setup?invalid_api_key=true");
50+
return <div>Loading...</div>;
51+
}
52+
53+
return <div></div>;
5654
};
5755

5856
const PiPage = () => {

bifrost/components/home/Stats.tsx

Lines changed: 4 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,7 @@ import { ArrowUpRight } from "lucide-react";
88
import { useEffect, useRef, useState } from "react";
99
import { Button } from "../ui/button";
1010

11-
function humanReadableNumber(num: number | undefined): string {
12-
if (!num) return "0";
11+
function humanReadableNumber(num: number): string {
1312
if (num >= 1_000_000_000_000) {
1413
return `${Math.ceil(num / 1_000_000_000_00) / 10} trillion`;
1514
} else if (num >= 1_000_000_000) {
@@ -69,21 +68,17 @@ const Stats = ({
6968
isVisible ? "rotate-[-3deg]" : "rotate-[0 deg]"
7069
)}
7170
>
72-
{humanReadableNumber(totalValuesData?.total_requests)}
71+
{humanReadableNumber(totalValuesData?.total_requests ?? 0)}
7372
</span>{" "}
7473
requests processed,{" "}
7574
<span className="text-brand">
76-
{humanReadableNumber(totalValuesData?.total_tokens)}
75+
{humanReadableNumber(totalValuesData?.total_tokens ?? 0)}
7776
</span>{" "}
7877
tokens logged and <span className="text-brand">18.3 million</span>{" "}
7978
users tracked
8079
</h1>
8180
<div className="flex gap-2 items-center md:gap-4">
82-
<Link
83-
href="https://us.helicone.ai/open-stats"
84-
target="_blank"
85-
rel="noopener"
86-
>
81+
<Link href="https://us.helicone.ai/open-stats" target="_blank" rel="noopener">
8782
<Button
8883
variant="ghost"
8984
size="landing_page"

bifrost/lib/clients/jawnTypes/private.ts

Lines changed: 948 additions & 96 deletions
Large diffs are not rendered by default.

bifrost/next.config.mjs

Lines changed: 4 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -8,15 +8,10 @@ import rehypeAutolinkHeadings from "rehype-autolink-headings";
88
/** @type {import('next').NextConfig} */
99
const nextConfig = {
1010
pageExtensions: ["js", "jsx", "ts", "tsx", "md", "mdx"],
11-
transpilePackages: [
12-
"next-mdx-remote",
13-
"@helicone-package/cost",
14-
"@helicone-package/llm-mapper",
15-
"@helicone-package/common",
16-
],
11+
transpilePackages: ["next-mdx-remote"],
1712
images: {
1813
dangerouslyAllowSVG: true,
19-
contentDispositionType: "attachment",
14+
contentDispositionType: 'attachment',
2015
remotePatterns: [
2116
{
2217
protocol: "https",
@@ -40,8 +35,8 @@ const nextConfig = {
4035
},
4136
{
4237
protocol: "https",
43-
hostname: "marketing-assets-helicone.s3.us-west-2.amazonaws.com",
44-
},
38+
hostname: "marketing-assets-helicone.s3.us-west-2.amazonaws.com"
39+
}
4540
],
4641
},
4742
async redirects() {

bifrost/package.json

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,6 @@
77
"build": "next build",
88
"start": "next start",
99
"lint": "next lint",
10-
"preinstall": "yarn --cwd .. build:packages",
1110
"lint-fix": "next lint --fix",
1211
"postbuild": "next-sitemap"
1312
},

bifrost/public/sitemap-0.xml

Lines changed: 3674 additions & 3684 deletions
Large diffs are not rendered by default.

package.json

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -8,12 +8,9 @@
88
"valhalla/jawn"
99
],
1010
"scripts": {
11-
"build:web": "yarn workspace helicone build",
12-
"build:cost": "yarn workspace @helicone-package/cost build",
13-
"build:llm-mapper": "yarn workspace @helicone-package/llm-mapper build",
14-
"build:packages": "yarn build:cost && yarn build:llm-mapper"
11+
"build:web": "yarn workspace helicone build"
1512
},
1613
"engines": {
1714
"node": "=20"
1815
}
19-
}
16+
}

packages/README.md

Lines changed: 0 additions & 67 deletions
This file was deleted.

0 commit comments

Comments
 (0)