Skip to content
Merged
Show file tree
Hide file tree
Changes from 7 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
96 changes: 51 additions & 45 deletions apps/web/next.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,56 +2,62 @@
* Run `build` or `dev` with `SKIP_ENV_VALIDATION` to skip env validation. This is especially useful
* for Docker builds.
*/
import { fileURLToPath } from "node:url";
import type { NextConfig } from "next";
// @ts-expect-error - no types
import { PrismaPlugin } from "@prisma/nextjs-monorepo-workaround-plugin";

import "./src/env";
const makeConfig = async (): Promise<NextConfig> => {
const { createJiti } = await import("jiti");
await createJiti(fileURLToPath(import.meta.url)).import("./src/env.ts");

const config: NextConfig = {
images: {
remotePatterns: [
{
hostname: "assets.agentset.ai",
},
return {
poweredByHeader: false,

images: {
remotePatterns: [
{
hostname: "assets.agentset.ai",
},
],
},

/** Enables hot reloading for local packages without a build step */
transpilePackages: [
"@agentset/db",
"@agentset/emails",
"@agentset/engine",
"@agentset/jobs",
"@agentset/storage",
"@agentset/stripe",
"@agentset/ui",
"@agentset/utils",
"@agentset/validation",
],
},

/** Enables hot reloading for local packages without a build step */
transpilePackages: [
"@agentset/db",
"@agentset/emails",
"@agentset/engine",
"@agentset/jobs",
"@agentset/storage",
"@agentset/stripe",
"@agentset/ui",
"@agentset/utils",
"@agentset/validation",
],

/** We already do linting and typechecking as separate tasks in CI */
eslint: { ignoreDuringBuilds: true },
typescript: { ignoreBuildErrors: true },

webpack: (config, { isServer }) => {
if (isServer) config.plugins = [...config.plugins, new PrismaPlugin()];
return config;
},

async rewrites() {
return [
// for posthog proxy
{
source: "/_proxy/posthog/ingest/static/:path*",
destination: "https://us-assets.i.posthog.com/static/:path*",
},
{
source: "/_proxy/posthog/ingest/:path*",
destination: "https://us.i.posthog.com/:path*",
},
];
},

/** We already do linting and typechecking as separate tasks in CI */
eslint: { ignoreDuringBuilds: true },
typescript: { ignoreBuildErrors: true },

webpack: (config, { isServer }) => {
if (isServer) config.plugins = [...config.plugins, new PrismaPlugin()];
return config;
},

async rewrites() {
return [
// for posthog proxy
{
source: "/_proxy/posthog/ingest/static/:path*",
destination: "https://us-assets.i.posthog.com/static/:path*",
},
{
source: "/_proxy/posthog/ingest/:path*",
destination: "https://us.i.posthog.com/:path*",
},
];
},
};
};

export default config;
export default makeConfig();
1 change: 1 addition & 0 deletions apps/web/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,7 @@
"fast-deep-equal": "^3.1.3",
"file-type": "^21.0.0",
"framer-motion": "^12.4.10",
"jiti": "^2.6.1",
"next": "15.5.2",
"posthog-js": "^1.260.1",
"posthog-node": "^5.8.1",
Expand Down
Original file line number Diff line number Diff line change
@@ -1,35 +1,15 @@
"use client";

import Link from "next/link";
import { useParams } from "next/navigation";
import Chat from "@/components/chat";
import DashboardPageWrapper from "@/components/dashboard-page-wrapper";

import { Tabs, TabsList, TabsTrigger } from "@agentset/ui";

import ChatActions from "./chat-actions";

export default function PlaygroundPage() {
const { slug, namespaceSlug } = useParams();

return (
<DashboardPageWrapper
title="Playground"
title="Chat"
className="p-0"
titleActions={
<Tabs value="chat">
<TabsList>
<TabsTrigger value="chat" asChild>
<Link href={`/${slug}/${namespaceSlug}/playground`}>Chat</Link>
</TabsTrigger>
<TabsTrigger value="search" asChild>
<Link href={`/${slug}/${namespaceSlug}/playground/search`}>
Search
</Link>
</TabsTrigger>
</TabsList>
</Tabs>
}
actions={<ChatActions />}
requireNamespace
>
Expand Down
Loading