Skip to content

Commit

Permalink
www: Local previews (#263)
Browse files Browse the repository at this point in the history
  • Loading branch information
richardgill authored Jun 1, 2024
1 parent bb54127 commit bfb23cc
Show file tree
Hide file tree
Showing 4 changed files with 33 additions and 5 deletions.
13 changes: 10 additions & 3 deletions apps/www/astro.config.mjs
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
import db from "@astrojs/db";
import mdx from "@astrojs/mdx";
import node from "@astrojs/node";
import react from "@astrojs/react";
import sitemap from "@astrojs/sitemap";
import tailwind from "@astrojs/tailwind";
Expand All @@ -8,6 +9,14 @@ import icon from "astro-icon";
import { defineConfig } from "astro/config";
import simpleStackForm from "simple-stack-form";

let adapter = vercel({
maxDuration: 60,
});

if (process.env.ADAPTER === "node") {
adapter = node({ mode: "standalone" });
}

// https://astro.build/config
export default defineConfig({
site: "https://llm-ui.com",
Expand All @@ -34,7 +43,5 @@ export default defineConfig({
simpleStackForm(),
],
output: "hybrid",
adapter: vercel({
maxDuration: 60,
}),
adapter,
});
4 changes: 3 additions & 1 deletion apps/www/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,10 @@
"dev": "astro dev",
"start": "astro dev",
"build": "astro build && pnpm build-pagefind",
"build:preview": "ADAPTER=node pnpm build",
"build-remote": "astro build --remote && pnpm build-pagefind",
"build-pagefind": "pagefind --site .vercel/output/static && cp -r .vercel/output/static/pagefind public",
"preview": "astro preview",
"preview": "ADAPTER=node astro preview",
"astro": "astro",
"typecheck": "astro check"
},
Expand All @@ -21,6 +22,7 @@
"@astrojs/sitemap": "^3.1.1",
"@astrojs/tailwind": "^5.1.0",
"@astrojs/vercel": "^7.5.0",
"@astrojs/node": "^8.2.5",
"@fontsource/inter": "^5.0.17",
"@hookform/resolvers": "^3.3.4",
"@iconify-json/lucide": "^1.1.174",
Expand Down
2 changes: 1 addition & 1 deletion packages/react/src/core/useLLMOutput/helper.ts
Original file line number Diff line number Diff line change
Expand Up @@ -193,7 +193,7 @@ const matchesWithLookback = ({
});
if (
visibleText.length > localVisibleTextLengthTarget &&
process.env.NODE_ENV !== "production"
process.env.NODE_ENV === "development"
) {
console.warn(
`Visible text length exceeded target for: ${visibleText} has length ${visibleText.length} target: ${localVisibleTextLengthTarget}. Raw output: ${llmOutputRaw}`,
Expand Down
19 changes: 19 additions & 0 deletions pnpm-lock.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit bfb23cc

Please sign in to comment.