Skip to content

🪢 Open source agent evals & observability: Trace, evaluate, and improve LLM applications with one open platform.

fixes

Max Deichmannf811a706181d
diff --git a/src/components/charts/baseTimeseriesChart.tsx b/src/components/charts/baseTimeseriesChart.tsx
index 84bf4b98e7..c0f2067e6f 100644
--- a/src/components/charts/baseTimeseriesChart.tsx
+++ b/src/components/charts/baseTimeseriesChart.tsx
@@ -2,7 +2,6 @@ import {
dateTimeAggregationSettings,
type DateTimeAggregationOption,
} from "@/src/utils/types";
-import { set } from "lodash";
import {
LineChart,
Line,
diff --git a/src/pages/old-index.tsx b/src/pages/old-index.tsx
deleted file mode 100644
index c12c6ce3ea..0000000000
--- a/src/pages/old-index.tsx
+++ /dev/null
@@ -1,83 +0,0 @@
-import { type NextPage } from "next";
-import Head from "next/head";
-import Link from "next/link";
-import { signIn, signOut, useSession } from "next-auth/react";
-
-import { api } from "~/utils/api";
-
-const Home: NextPage = () => {
- const hello = api.example.hello.useQuery({ text: "from tRPC" });
-
- return (
- <>
- <Head>
- <title>Create T3 App</title>
- <meta name="description" content="Generated by create-t3-app" />
- <link rel="icon" href="/favicon.ico" />
- </Head>
- <main className="flex min-h-screen flex-col items-center justify-center bg-gradient-to-b from-[#2e026d] to-[#15162c]">
- <div className="container flex flex-col items-center justify-center gap-12 px-4 py-16 ">
- <h1 className="text-5xl font-extrabold tracking-tight text-white sm:text-[5rem]">
- Create <span className="text-[hsl(280,100%,70%)]">T3</span> App
- </h1>
- <div className="grid grid-cols-1 gap-4 sm:grid-cols-2 md:gap-8">
- <Link
- className="flex max-w-xs flex-col gap-4 rounded-xl bg-white/10 p-4 text-white hover:bg-white/20"
- href="https://create.t3.gg/en/usage/first-steps"
- target="_blank"
- >
- <h3 className="text-2xl font-bold">First Steps →</h3>
- <div className="text-lg">
- Just the basics - Everything you need to know to set up your
- database and authentication.
- </div>
- </Link>
- <Link
- className="flex max-w-xs flex-col gap-4 rounded-xl bg-white/10 p-4 text-white hover:bg-white/20"
- href="https://create.t3.gg/en/introduction"
- target="_blank"
- >
- <h3 className="text-2xl font-bold">Documentation →</h3>
- <div className="text-lg">
- Learn more about Create T3 App, the libraries it uses, and how
- to deploy it.
- </div>
- </Link>
- </div>
- <div className="flex flex-col items-center gap-2">
- <p className="text-2xl text-white">
- {hello.data ? hello.data.greeting : "Loading tRPC query..."}
- </p>
- <AuthShowcase />
- </div>
- </div>
- </main>
- </>
- );
-};
-
-export default Home;
-
-const AuthShowcase: React.FC = () => {
- const { data: sessionData } = useSession();
-
- const { data: secretMessage } = api.example.getSecretMessage.useQuery(
- undefined, // no input
- { enabled: sessionData?.user !== undefined }
- );
-
- return (
- <div className="flex flex-col items-center justify-center gap-4">
- <p className="text-center text-2xl text-white">
- {sessionData && <span>Logged in as {sessionData.user?.name}</span>}
- {secretMessage && <span> - {secretMessage}</span>}
- </p>
- <button
- className="rounded-full bg-white/10 px-10 py-3 font-semibold text-white no-underline transition hover:bg-white/20"
- onClick={sessionData ? () => void signOut() : () => void signIn()}
- >
- {sessionData ? "Sign out" : "Sign in"}
- </button>
- </div>
- );
-};
diff --git a/src/pages/traces.tsx b/src/pages/traces.tsx
index e02d222825..45ee609b9f 100644
--- a/src/pages/traces.tsx
+++ b/src/pages/traces.tsx
@@ -13,9 +13,6 @@ import {
GridToolbarContainer,
GridToolbarExport,
GridToolbarFilterButton,
- GridCell,
- type GridCellProps,
- GridRow,
} from "@mui/x-data-grid";
import { api } from "~/utils/api";
import { useRouter } from "next/router";
@@ -28,14 +25,9 @@ import {
import { type RouterInput, type RouterOutput } from "../utils/types";
import { Button } from "../components/ui/button";
import Link from "next/link";
-import { ArrowUpRight, Copy } from "lucide-react";
+import { ArrowUpRight } from "lucide-react";
import ObservationDisplay from "../components/observationDisplay";
-import {
- type TextFieldProps,
- TextField,
- Box,
- tableCellClasses,
-} from "@mui/material";
+import { type TextFieldProps, TextField, Box } from "@mui/material";
import React from "react";
import { FontAwesomeIcon } from "@fortawesome/react-fontawesome";
import { faSpinner } from "@fortawesome/free-solid-svg-icons";
@@ -49,25 +41,31 @@ interface CustomToolbarProps {
function InputKeyValue(props: GridFilterInputValueProps) {
const { item, applyValue, focusElementRef = null } = props;
+ // eslint-disable-next-line @typescript-eslint/no-explicit-any
const filterTimeout = React.useRef<any>();
const [filterValueState, setFilterValueState] = React.useState<
[string, string]
+ // eslint-disable-next-line @typescript-eslint/no-unsafe-argument
>(item.value ?? "");
const [applying, setIsApplying] = React.useState(false);
React.useEffect(() => {
return () => {
+ // eslint-disable-next-line @typescript-eslint/no-unsafe-argument
clearTimeout(filterTimeout.current);
};
}, []);
React.useEffect(() => {
+ // eslint-disable-next-line @typescript-eslint/no-unsafe-assignment
const itemValue = item.value ?? [undefined, undefined];
+ // eslint-disable-next-line @typescript-eslint/no-unsafe-argument
setFilterValueState(itemValue);
}, [item.value]);
const updateFilterValue = (key: string, value: string) => {
+ // eslint-disable-next-line @typescript-eslint/no-unsafe-argument
clearTimeout(filterTimeout.current);
setFilterValueState([key, value]);
@@ -157,11 +155,14 @@ export default function Traces() {
}
return ({ value }) => {
+ // eslint-disable-next-line @typescript-eslint/no-unsafe-assignment, @typescript-eslint/no-unsafe-argument
const jsonObj = JSON.parse(value);
return (
value !== null &&
+ // eslint-disable-next-line @typescript-eslint/no-unsafe-member-access
jsonObj[filterItem.value[0]] !== undefined &&
+ // eslint-disable-next-line @typescript-eslint/no-unsafe-member-access
jsonObj[filterItem.value[0]] === filterItem.value[1]
);
};
@@ -295,7 +296,9 @@ export default function Traces() {
status: trace.status,
statusMessage: trace.statusMessage,
attributes: JSON.stringify(trace.attributes),
+ // eslint-disable-next-line @typescript-eslint/no-unsafe-assignment, @typescript-eslint/no-unsafe-member-access, @typescript-eslint/no-unsafe-call
scores: trace.scores
+ // eslint-disable-next-line @typescript-eslint/restrict-template-expressions, @typescript-eslint/no-unsafe-member-access
.map((score) => `${score.name}: ${score.value}`)
.join("; "),
}))
@@ -347,9 +350,7 @@ export default function Traces() {
setFilterButtonEl,
},
}}
- getRowClassName={(params) =>
- `whitespace-nowrap text-sm text-gray-500`
- }
+ getRowClassName={() => `whitespace-nowrap text-sm text-gray-500`}
autoHeight
/>
</TabsContent>
@@ -380,9 +381,7 @@ export default function Traces() {
onFilterModelChange={onFilterChange}
disableColumnMenu={true}
disableRowSelectionOnClick={true}
- getRowClassName={(params) =>
- `whitespace-nowrap text-sm text-gray-500`
- }
+ getRowClassName={() => `whitespace-nowrap text-sm text-gray-500`}
slots={{
toolbar: CustomToolbar,
noRowsOverlay: () => null,
@@ -447,39 +446,3 @@ const Single = (props: { trace: RouterOutput["traces"]["all"][number] }) => {
);
else return null;
};
-
-function ColumnHeaders() {
- return (
- <thead>
- <tr>
- <th
- scope="col"
- className="py-3.5 pl-4 pr-3 text-left text-sm font-semibold text-gray-900"
- >
- Name
- </th>
- <th
- scope="col"
- className="px-3 py-3.5 text-left text-sm font-semibold text-gray-900"
- >
- Title
- </th>
- <th
- scope="col"
- className="px-3 py-3.5 text-left text-sm font-semibold text-gray-900"
- >
- Email
- </th>
- <th
- scope="col"
- className="px-3 py-3.5 text-left text-sm font-semibold text-gray-900"
- >
- Role
- </th>
- <th scope="col" className="relative py-3.5 pl-3 pr-4 sm:pr-0">
- <span className="sr-only">Edit</span>
- </th>
- </tr>
- </thead>
- );
-}