🪢 Open source agent evals & observability: Trace, evaluate, and improve LLM applications with one open platform.
TypeScript analyticsautogenevaluationlangchainlarge-language-modelsllama-indexllmllm-evaluationllm-observabilityllmopsmonitoringobservabilityopen-sourceopenaiplaygroundprompt-engineeringprompt-managementself-hostedycombinator
feat(ui): add dark mode improvements (#2127)
Richard Krümmel87d34c05d93c
diff --git a/pnpm-lock.yaml b/pnpm-lock.yamlindex 0f919a9469..761307ee2b 100644--- a/pnpm-lock.yaml+++ b/pnpm-lock.yaml@@ -375,6 +375,9 @@ importers:'@uiw/codemirror-theme-github':specifier: ^4.21.25version: 4.21.25(@codemirror/[email protected])(@codemirror/[email protected])(@codemirror/[email protected])+ '@uiw/codemirror-theme-tokyo-night':+ specifier: ^4.22.1+ version: 4.22.1(@codemirror/[email protected])(@codemirror/[email protected])(@codemirror/[email protected])'@uiw/react-codemirror':specifier: ^4.21.25version: 4.21.25(@babel/[email protected])(@codemirror/[email protected])(@codemirror/[email protected])(@codemirror/[email protected])(@codemirror/[email protected])(@codemirror/[email protected])(@codemirror/[email protected])(@codemirror/[email protected])([email protected])([email protected])([email protected])@@ -7123,6 +7126,16 @@ packages:- '@codemirror/view'dev: false+ /@uiw/[email protected](@codemirror/[email protected])(@codemirror/[email protected])(@codemirror/[email protected]):+ resolution: {integrity: sha512-bF3yvrsvlIi1XBXdDkOC9JXtYvpbrSigJUwjSDl3qB2vdKAF3Cuw6/wVzAma3aG5Smy3FMjH4KMww9TStpNcUQ==}+ dependencies:+ '@uiw/codemirror-themes': 4.22.1(@codemirror/[email protected])(@codemirror/[email protected])(@codemirror/[email protected])+ transitivePeerDependencies:+ - '@codemirror/language'+ - '@codemirror/state'+ - '@codemirror/view'+ dev: false+/@uiw/[email protected](@codemirror/[email protected])(@codemirror/[email protected])(@codemirror/[email protected]):resolution: {integrity: sha512-C3t/voELxQj0eaVhrlgzaOnSALNf8bOcRbL5xN9r2+RkdsbFOmvNl3VVhlxEB7PSGc1jUZwVO4wQsB2AP178ag==}peerDependencies:@@ -7135,6 +7148,18 @@ packages:'@codemirror/view': 6.26.3dev: false+ /@uiw/[email protected](@codemirror/[email protected])(@codemirror/[email protected])(@codemirror/[email protected]):+ resolution: {integrity: sha512-5TeB8wCc0aNd3YEhzOvgekpAFQfEm4fCTUcGmEIQqaRNgKAM83HYNpE1JF2j7x2oDFugdiO0yJynS6bo1zVOuw==}+ peerDependencies:+ '@codemirror/language': '>=6.0.0'+ '@codemirror/state': '>=6.0.0'+ '@codemirror/view': '>=6.0.0'+ dependencies:+ '@codemirror/language': 6.10.1+ '@codemirror/state': 6.4.1+ '@codemirror/view': 6.26.3+ dev: false+/@uiw/[email protected](@babel/[email protected])(@codemirror/[email protected])(@codemirror/[email protected])(@codemirror/[email protected])(@codemirror/[email protected])(@codemirror/[email protected])(@codemirror/[email protected])(@codemirror/[email protected])([email protected])([email protected])([email protected]):resolution: {integrity: sha512-mBrCoiffQ+hbTqV1JoixFEcH7BHXkS3PjTyNH7dE8Gzf3GSBRazhtSM5HrAFIiQ5FIRGFs8Gznc4UAdhtevMmw==}peerDependencies:diff --git a/web/package.json b/web/package.jsonindex ff2636ecd9..7a0a98f9a3 100644--- a/web/package.json+++ b/web/package.json@@ -69,13 +69,14 @@"@tailwindcss/container-queries": "^0.1.1","@tanstack/react-query": "^4.36.1","@tanstack/react-table": "^8.11.8",- "@tremor/react": "3.16.2","@tanstack/react-virtual": "^3.5.0",+ "@tremor/react": "3.16.2","@trpc/client": "^10.45.0","@trpc/next": "^10.45.0","@trpc/react-query": "^10.45.0","@trpc/server": "^10.45.0","@uiw/codemirror-theme-github": "^4.21.25",+ "@uiw/codemirror-theme-tokyo-night": "^4.22.1","@uiw/react-codemirror": "^4.21.25","ai": "^3.0.23","bcryptjs": "^2.4.3",diff --git a/web/src/components/json-editor.tsx b/web/src/components/json-editor.tsxindex 74ba36562c..1436ccd6ba 100644--- a/web/src/components/json-editor.tsx+++ b/web/src/components/json-editor.tsx@@ -1,5 +1,6 @@import CodeMirror, { EditorView } from "@uiw/react-codemirror";-import { githubLight, githubDark } from "@uiw/codemirror-theme-github";+import { githubLight } from "@uiw/codemirror-theme-github";+import { tokyoNight } from "@uiw/codemirror-theme-tokyo-night";import { json } from "@codemirror/lang-json";import { useTheme } from "next-themes";import { cn } from "@/src/utils/tailwind";@@ -20,7 +21,7 @@ export function JsonEditor({className?: string;}) {const { theme } = useTheme();- const codeMirrorTheme = theme === "dark" ? githubDark : githubLight;+ const codeMirrorTheme = theme === "dark" ? tokyoNight : githubLight;return (<CodeMirrorvalue={defaultValue}diff --git a/web/src/components/layouts/layout.tsx b/web/src/components/layouts/layout.tsxindex 92dfd0226d..e59f9325d4 100644--- a/web/src/components/layouts/layout.tsx+++ b/web/src/components/layouts/layout.tsx@@ -372,7 +372,7 @@ export default function Layout(props: PropsWithChildren) {leaveFrom="transform opacity-100 scale-100"leaveTo="transform opacity-0 scale-95">- <Menu.Items className="absolute -top-full bottom-1 right-0 z-10 rounded-md bg-background py-2 shadow-lg ring-1 ring-primary/5 focus:outline-none">+ <Menu.Items className="absolute -top-full bottom-1 right-0 z-10 overflow-hidden rounded-md bg-background py-2 shadow-lg ring-1 ring-border focus:outline-none"><span className="block border-b px-3 pb-2 text-sm leading-6 text-muted-foreground">{session.data?.user?.email}</span>@@ -437,7 +437,7 @@ export default function Layout(props: PropsWithChildren) {leaveFrom="transform opacity-100 scale-100"leaveTo="transform opacity-0 scale-95">- <Menu.Items className="absolute right-0 z-10 mt-2.5 rounded-md bg-background py-2 shadow-lg ring-1 ring-primary/5 focus:outline-none">+ <Menu.Items className="absolute right-0 z-10 mt-2.5 rounded-md bg-background py-2 pb-1 shadow-lg ring-1 ring-border focus:outline-none"><span className="mb-1 block border-b px-3 pb-2 text-sm leading-6 text-muted-foreground">{session.data?.user?.email}</span>@@ -448,7 +448,7 @@ export default function Layout(props: PropsWithChildren) {onClick={() => void item.onClick()}className={cn(active ? "bg-primary-foreground" : "",- "flex cursor-pointer items-center justify-between px-2 py-1 text-sm text-primary",+ "flex cursor-pointer items-center justify-between px-2 py-1 text-sm leading-6 text-primary",)}>{item.name}diff --git a/web/src/components/trace/IOPreview.tsx b/web/src/components/trace/IOPreview.tsxindex 3a793059d0..552e140408 100644--- a/web/src/components/trace/IOPreview.tsx+++ b/web/src/components/trace/IOPreview.tsx@@ -112,7 +112,7 @@ export const IOPreview: React.FC<{title="Output"json={outputClean}isLoading={isLoading}- className="flex-1 border-accent-dark-green bg-accent-light-green"+ className="flex-1 bg-accent-light-green dark:border-accent-dark-green"/>) : null}</>@@ -190,7 +190,7 @@ export const OpenAiMessageView: React.FC<{"bg-muted",message.role === "system" && "bg-primary-foreground",message.role === "assistant" &&- "border-accent-dark-green bg-accent-light-green",+ "bg-accent-light-green dark:border-accent-dark-green",message.role === "user" && "bg-background",!!message.json && "rounded-b-none",)}@@ -206,7 +206,7 @@ export const OpenAiMessageView: React.FC<{"bg-muted",message.role === "system" && "bg-primary-foreground",message.role === "assistant" &&- "border-accent-dark-green bg-accent-light-green",+ "bg-accent-light-green dark:border-accent-dark-green",message.role === "user" && "bg-foreground",!!message.content && "rounded-t-none border-t-0",)}diff --git a/web/src/components/ui/CodeJsonViewer.tsx b/web/src/components/ui/CodeJsonViewer.tsxindex a1cdda3466..c3e106b4c7 100644--- a/web/src/components/ui/CodeJsonViewer.tsx+++ b/web/src/components/ui/CodeJsonViewer.tsx@@ -24,7 +24,7 @@ export function JSONView(props: {<divclassName={cn(props.title === "assistant" || props.title === "Output"- ? "border-accent-dark-green"+ ? "dark:border-accent-dark-green": "","border-b px-3 py-1 text-xs font-medium",)}diff --git a/web/src/components/ui/dialog.tsx b/web/src/components/ui/dialog.tsxindex e05ff4066b..b7d7126d8b 100644--- a/web/src/components/ui/dialog.tsx+++ b/web/src/components/ui/dialog.tsx@@ -21,7 +21,7 @@ const DialogOverlay = React.forwardRef<<DialogPrimitive.Overlayref={ref}className={cn(- "fixed inset-0 z-50 bg-foreground/60 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0",+ "fixed inset-0 z-50 bg-foreground/40 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0",className,)}{...props}diff --git a/web/src/styles/globals.css b/web/src/styles/globals.cssindex 13296b55d4..eba76de6ec 100644--- a/web/src/styles/globals.css+++ b/web/src/styles/globals.css@@ -63,7 +63,7 @@.dark {--background: 222.2 84% 4.9%;- --foreground: 210 40% 88%;+ --foreground: 210 40% 83%;--muted: 217.2 32.6% 17.5%;--muted-foreground: 215 20.2% 65.1%;@@ -77,7 +77,7 @@--border: 217.2 32.6% 27.5%;--input: 217.2 32.6% 27.5%;- --primary: 210 40% 88%;+ --primary: 210 40% 83%;--primary-foreground: 222.2 47.4% 11.2%;--secondary: 217.2 32.6% 17.5%;