mileiShowGraphmain.tsx3 matches
13} from "https://esm.sh/recharts@2.7.2?deps=react@18.2.0,react-dom@18.2.0";
1415function App({ tweetData }) {
16const [selectedTweetId, setSelectedTweetId] = useState("1852746483306492004");
17const [filteredData, setFilteredData] = useState([]);
123}
124125function client() {
126const tweetData = JSON.parse(document.getElementById("tweet-data").textContent);
127createRoot(document.getElementById("root")).render(<App tweetData={tweetData} />);
129if (typeof document !== "undefined") { client(); }
130131export default async function server(request: Request): Promise<Response> {
132const { sqlite } = await import("https://esm.town/v/stevekrouse/sqlite");
133
terrificIndigoAlbatrossmain.tsx11 matches
26const PoweredByInfo = "";
2728function Hero({
29prompt,
30setPrompt,
4748<p className="text-[#bababa] text-center max-w-[25ch] mx-auto my-4 font-dm-sans">
49Turn your ideas into fully functional apps in{" "}
50<span className="relative w-fit text-fuchsia-400 z-10 italic font-semibold rounded-full">
51less than a second
121}
122123function App() {
124const previewRef = React.useRef<HTMLDivElement>(null);
125const [prompt, setPrompt] = useState("");
175});
176177function handleStarterPromptClick(promptItem: typeof prompts[number]) {
178setLoading(true);
179setTimeout(() => handleSubmit(promptItem.prompt), 0);
180}
181182async function handleSubmit(e: React.FormEvent | string) {
183if (typeof e !== "string") {
184e.preventDefault();
231}
232233function handleVersionChange(direction: "back" | "forward") {
234const { currentVersionIndex, versions } = versionHistory;
235if (direction === "back" && currentVersionIndex > 0) {
920);
921922function client() {
923const path = window.location.pathname;
924const root = createRoot(document.getElementById("root")!);
956}
957958function extractCodeFromFence(text: string): string {
959const htmlMatch = text.match(/```html\n([\s\S]*?)\n```/);
960return htmlMatch ? htmlMatch[1].trim() : text;
961}
962963async function generateCode(prompt: string, currentCode: string) {
964const starterPrompt = STARTER_PROMPTS.find(p => p.prompt === prompt);
965if (starterPrompt) {
1006}
10071008export default async function cerebras_coder(req: Request): Promise<Response> {
1009// Dynamic import for SQLite to avoid client-side import
1010const { sqlite } = await import("https://esm.town/v/stevekrouse/sqlite");
1109<meta property="og:site_name" content="Cerebras Coder">
1110<meta property="og:url" content="https://cerebrascoder.com"/>
1111<meta property="og:description" content="Turn your ideas into fully functional apps in less than a second – powered by Llama3.3-70b on Cerebras's super-fast wafer chips. Code is 100% open-source, hosted on Val Town."">
1112<meta property="og:type" content="website">
1113<meta property="og:image" content="https://stevekrouse-blob_admin.web.val.run/api/public/CerebrasCoderOG.jpg">
openaiproxymain.tsx2 matches
1718type User = { id: string; username: string; tier: string };
19export default async function(req: Request): Promise<Response> {
20// Ensure only allowed pathnames are used
21const { pathname, search } = new URL(req.url);
8283// Free users are limited to gpt-4o-mini. Limit pro users to 10 expensive model requests.
84async function limitFreeModel(req: Request, user: User) {
85const input = await req.json();
86let model = "gpt-4o-mini";
understandingIndigoLeechREADME.md2 matches
42- Value: Your SERP API key.
4344Without this key, the val will not function correctly.
4546---
58- Key: `mentionsDiscord`
59- Value: Your Discord webhook URL.
60Notifications will be sent using this function:
61```
62await discordWebhook({
templateRedditAlertmain.tsx1 match
12const isProd = true;
1314export async function redditAlert({ lastRunAt }: Interval) {
15if (!SERP_API_KEY || !DISCORD_API_KEY) {
16console.error("Missing SERP_API_KEY or Discord webhook URL. Exiting.");
redditAlertREADME.md2 matches
42- Value: Your SERP API key.
4344Without this key, the val will not function correctly.
4546---
58- Key: `mentionsDiscord`
59- Value: Your Discord webhook URL.
60Notifications will be sent using this function:
61```
62await discordWebhook({
honestMagentaCranemain.tsx1 match
8const SERP_API_KEY = Deno.env.get("SERP_API_KEY");
910export default async function redditAlert({ lastRunAt }: Interval) {
11// Determine the time frame for the search
12const timeFrame = lastRunAt
honestMagentaCraneREADME.md2 matches
42- Value: Your SERP API key.
4344Without this key, the val will not function correctly.
4546---
58- Key: `mentionsDiscord`
59- Value: Your Discord webhook URL.
60Notifications will be sent using this function:
61```
62await discordWebhook({
templateRedditAlertREADME.md2 matches
42- Value: Your SERP API key.
4344Without this key, the val will not function correctly.
4546---
58- Key: `mentionsDiscord`
59- Value: Your Discord webhook URL.
60Notifications will be sent using this function:
61```
62await discordWebhook({
tactfulCoffeeOctopusREADME.md2 matches
46- Key: `mentionsDiscord`
47- Value: Your Discord webhook URL.
48Notifications will be sent using this function:
4950```ts
6364- **Proxies via Val Town's [SocialDataProxy](https://www.val.town/v/stevekrouse/socialDataProxy)**: Limited to 10 cents per day for [**Val Town Pro users**](https://www.val.town/pricing). This API is *only* for Pro users.
65- **Need more calls?** Sign up for your own [SocialData API token](https://socialdata.tools) and configure the [`socialDataSearch`](https://www.val.town/v/stevekrouse/socialDataSearch) function.