campanhapsdalcoframain.ts3 matches
446};
447448function App() {
449return (
450<>
454}
455456function client() {
457createRoot(document.getElementById("root")).render(<App />);
458}
462}
463464export default async function server(request: Request): Promise<Response> {
465return new Response(
466`
untitled-8620main.ts9 matches
1112const DECONSTRUCT_FACT_PROMPT = `
13You are 'Principia', an expert logician specializing in epistemology. Your function is to deconstruct a given factual statement into its immediate, necessary, and sufficient prerequisite facts. You must adhere to the principle of strict logical entailment.
1415- Analyze the provided {Target Fact}.
82},
83{
84"fact": "The operation '+' (addition) is defined as repeatedly applying the successor function.",
85"justification": "This is necessary because the symbol '+' must have a defined operational meaning."
86}
127* Calls the specified AI with a given prompt and fact.
128*/
129async function callAI(fact: string, prompt: string): Promise<Prerequisite[]> {
130try {
131const completion = await openai.chat.completions.create({
149* Recursively builds the prerequisite tree, with an Auditor check.
150*/
151async function buildTreeRecursive(
152node: FactNode,
153jobId: string,
196* This prevents race conditions when writing to blob storage.
197*/
198async function buildTreeInBackground(jobId: string, rootNode: FactNode) {
199try {
200let currentLevelNodes = [rootNode];
260}
261262function generateHtml(sourceUrl: string): string {
263return `<!DOCTYPE html>
264<html lang="en">
447const POLLING_INTERVAL = 2000;
448449function TreeNode({ node }) {
450const [isCollapsed, setIsCollapsed] = useState(false);
451
478}
479480function App() {
481const [view, setView] = useState('input'); // 'input', 'processing', 'tree'
482const [jobId, setJobId] = useState(null);
618619// --- HTTP REQUEST HANDLER ---
620export default async function (req: Request): Promise<Response> {
621const url = new URL(req.url);
622const path = url.pathname;
untitled-8620main.ts6 matches
59const openai = new OpenAI();
6061async function callAI(fact: string, prompt: string): Promise<Prerequisite[]> {
62try {
63const completion = await openai.chat.completions.create({
83* Tracks processed nodes to avoid redundant API calls and circular dependencies.
84*/
85async function buildTreeInBackground(jobId: string, rootNode: FactNode) {
86try {
87// This Map will store all nodes ever created, keyed by their fact string.
160// --- FRONTEND & ROUTER (No changes needed below this line) ---
161162function generateHtml(sourceUrl: string): string {
163return `<!DOCTYPE html>
164<html lang="en">
347const POLLING_INTERVAL = 2000;
348349function TreeNode({ node, seenIds = new Set() }) {
350const [isCollapsed, setIsCollapsed] = useState(false);
351
395}
396397function App() {
398const [view, setView] = useState('input'); // 'input', 'processing', 'tree'
399const [jobId, setJobId] = useState(null);
534}
535536export default async function (req: Request): Promise<Response> {
537const url = new URL(req.url);
538const path = url.pathname;
bella-cleaningmain.ts1 match
23// ✅ Images Inside Text Spans
4$("[data='spanWrapper']").each(function (index) {
5let relatedEl = $("[data='spanElement']").eq(index);
6relatedEl.appendTo($(this));
brew_countermain.ts1 match
21`);
2223export default async function (req: Request): Promise<Response> {
24const url = new URL(req.url);
25
untitled-8264Main2.ts12 matches
1export default async function (req: Request): Promise<Response> {
2const fftSize = 2048;
3const TWO_PI = 2.0 * 3.141592653579;
7475
76function showError(e) {
77console.error(e);
78errorBox.style.display = "block";
8182// DPR-aware resize
83function resize() {
84const dpr = Math.min(window.devicePixelRatio || 1, 2);
85const w = Math.floor(window.innerWidth * dpr);
196\`;
197198function compileShader(type, src) {
199const s = gl.createShader(type);
200gl.shaderSource(s, src);
222gl.bindVertexArray(vao);
223224function createAttrib(data, attribName, usage) {
225const loc = gl.getAttribLocation(program, attribName);
226if (loc === -1) throw new Error("Attrib not found or optimized out: " + attribName);
248249// Matrices
250function mat4Perspective(fovDeg, aspect, near, far) {
251const f = 1.0 / Math.tan((fovDeg * Math.PI) / 360);
252const nf = 1 / (near - far);
259return out;
260}
261function subtract(a, b) { return [a[0]-b[0], a[1]-b[1], a[2]-b[2]]; }
262function normalize(v) {
263const l = Math.hypot(v[0], v[1], v[2]) || 1;
264return [v[0]/l, v[1]/l, v[2]/l];
265}
266function cross(a, b) {
267return [a[1]*b[2] - a[2]*b[1], a[2]*b[0] - a[0]*b[2], a[0]*b[1] - a[1]*b[0]];
268}
269function dot(a, b) { return a[0]*b[0] + a[1]*b[1] + a[2]*b[2]; }
270function mat4LookAt(eye, target, up) {
271const z = normalize(subtract(eye, target));
272const x = normalize(cross(up, z));
314315// Render loop
316function render(ts) {
317// Update audio only if ready
318if (analyser) {
TownieValTownLogo.tsx1 match
1/** @jsxImportSource https://esm.sh/react@18.2.0 */
23export function ValTownLogo () {
4return (
5<svg
Townieval-summary.ts1 match
5* Get usage data for a specific val
6*/
7export async function getValSummary(valId: string) {
8// Get summary data for the val from the usage table
9const usageSummaryResult = await sqlite.execute(`
Townieval-detail.ts1 match
36}
3738export function renderValDetail(valId: string, summary: ValSummary, requests: UsageRequest[] = []): string {
39// Generate the content
40const content = `
TownieuseUser.tsx1 match
3const USER_ENDPOINT = "/api/user";
45export function useUser() {
6const [data, setData] = useState<any>(null);
7const [loading, setLoading] = useState(true);