diff --git a/api/prompt/_shared.ts b/api/prompt/_shared.ts index 16a454ac..a2f1f0b3 100644 --- a/api/prompt/_shared.ts +++ b/api/prompt/_shared.ts @@ -39,7 +39,7 @@ export async function handleRateLimit( redis: kv, limiter: isPro ? Ratelimit.slidingWindow(3, "1m") - : Ratelimit.fixedWindow(3, "30d"), + : Ratelimit.fixedWindow(2, "30d"), }); const rateLimitKey = isPro ? `pro_${customerId}` : `unauth_${ip}`; diff --git a/app/public/template-screenshots/code-flow.png b/app/public/template-screenshots/code-flow.png index c2f9d68c..1a15fdb7 100644 Binary files a/app/public/template-screenshots/code-flow.png and b/app/public/template-screenshots/code-flow.png differ diff --git a/app/public/template-screenshots/decision-flow.png b/app/public/template-screenshots/decision-flow.png index dee4064b..31704608 100644 Binary files a/app/public/template-screenshots/decision-flow.png and b/app/public/template-screenshots/decision-flow.png differ diff --git a/app/public/template-screenshots/default.png b/app/public/template-screenshots/default.png index 4e4c1f36..1450a36b 100644 Binary files a/app/public/template-screenshots/default.png and b/app/public/template-screenshots/default.png differ diff --git a/app/public/template-screenshots/mindmap-dark.png b/app/public/template-screenshots/mindmap-dark.png index e70ea7b9..f3b86139 100644 Binary files a/app/public/template-screenshots/mindmap-dark.png and b/app/public/template-screenshots/mindmap-dark.png differ diff --git a/app/public/template-screenshots/mindmap.png b/app/public/template-screenshots/mindmap.png index 8c69800a..8df40978 100644 Binary files a/app/public/template-screenshots/mindmap.png and b/app/public/template-screenshots/mindmap.png differ diff --git a/app/public/template-screenshots/network-diagram-dark.png b/app/public/template-screenshots/network-diagram-dark.png index a57c4a83..cea5fd99 100644 Binary files a/app/public/template-screenshots/network-diagram-dark.png and b/app/public/template-screenshots/network-diagram-dark.png differ diff --git a/app/public/template-screenshots/org-chart.png b/app/public/template-screenshots/org-chart.png index 995fd2d1..f2d8738a 100644 Binary files a/app/public/template-screenshots/org-chart.png and b/app/public/template-screenshots/org-chart.png differ diff --git a/app/public/template-screenshots/pert-light.png b/app/public/template-screenshots/pert-light.png index 8f18b828..aae817fe 100644 Binary files a/app/public/template-screenshots/pert-light.png and b/app/public/template-screenshots/pert-light.png differ diff --git a/app/public/template-screenshots/playful-mindmap.png b/app/public/template-screenshots/playful-mindmap.png index 95333883..7be9a276 100644 Binary files a/app/public/template-screenshots/playful-mindmap.png and b/app/public/template-screenshots/playful-mindmap.png differ diff --git a/app/public/template-screenshots/process-flow.png b/app/public/template-screenshots/process-flow.png new file mode 100644 index 00000000..e4af50af Binary files /dev/null and b/app/public/template-screenshots/process-flow.png differ diff --git a/app/public/template-screenshots/thumb_code-flow.png b/app/public/template-screenshots/thumb_code-flow.png index 8fbb9916..35fc1727 100644 Binary files a/app/public/template-screenshots/thumb_code-flow.png and b/app/public/template-screenshots/thumb_code-flow.png differ diff --git a/app/public/template-screenshots/thumb_decision-flow.png b/app/public/template-screenshots/thumb_decision-flow.png index 5ca144ce..72f2a96a 100644 Binary files a/app/public/template-screenshots/thumb_decision-flow.png and b/app/public/template-screenshots/thumb_decision-flow.png differ diff --git a/app/public/template-screenshots/thumb_default.png b/app/public/template-screenshots/thumb_default.png index 09206878..d252dadd 100644 Binary files a/app/public/template-screenshots/thumb_default.png and b/app/public/template-screenshots/thumb_default.png differ diff --git a/app/public/template-screenshots/thumb_flowchart.png b/app/public/template-screenshots/thumb_flowchart.png index fb4fc033..688ae653 100644 Binary files a/app/public/template-screenshots/thumb_flowchart.png and b/app/public/template-screenshots/thumb_flowchart.png differ diff --git a/app/public/template-screenshots/thumb_knowledge-graph.png b/app/public/template-screenshots/thumb_knowledge-graph.png index 8260cd1c..fb86070e 100644 Binary files a/app/public/template-screenshots/thumb_knowledge-graph.png and b/app/public/template-screenshots/thumb_knowledge-graph.png differ diff --git a/app/public/template-screenshots/thumb_mindmap-dark.png b/app/public/template-screenshots/thumb_mindmap-dark.png index 5a3405ff..55da448a 100644 Binary files a/app/public/template-screenshots/thumb_mindmap-dark.png and b/app/public/template-screenshots/thumb_mindmap-dark.png differ diff --git a/app/public/template-screenshots/thumb_mindmap.png b/app/public/template-screenshots/thumb_mindmap.png index 1635ffed..8e6ee2a7 100644 Binary files a/app/public/template-screenshots/thumb_mindmap.png and b/app/public/template-screenshots/thumb_mindmap.png differ diff --git a/app/public/template-screenshots/thumb_network-diagram-dark.png b/app/public/template-screenshots/thumb_network-diagram-dark.png index debc7f26..c3621521 100644 Binary files a/app/public/template-screenshots/thumb_network-diagram-dark.png and b/app/public/template-screenshots/thumb_network-diagram-dark.png differ diff --git a/app/public/template-screenshots/thumb_network-diagram-dark.ts.png b/app/public/template-screenshots/thumb_network-diagram-dark.ts.png index 8e1b5351..b0558100 100644 Binary files a/app/public/template-screenshots/thumb_network-diagram-dark.ts.png and b/app/public/template-screenshots/thumb_network-diagram-dark.ts.png differ diff --git a/app/public/template-screenshots/thumb_network-diagram-icons.png b/app/public/template-screenshots/thumb_network-diagram-icons.png index 2cf7a02b..a9b32a9c 100644 Binary files a/app/public/template-screenshots/thumb_network-diagram-icons.png and b/app/public/template-screenshots/thumb_network-diagram-icons.png differ diff --git a/app/public/template-screenshots/thumb_org-chart.png b/app/public/template-screenshots/thumb_org-chart.png index ff84e345..1f085e17 100644 Binary files a/app/public/template-screenshots/thumb_org-chart.png and b/app/public/template-screenshots/thumb_org-chart.png differ diff --git a/app/public/template-screenshots/thumb_pert-light.png b/app/public/template-screenshots/thumb_pert-light.png index ef5047a7..688178da 100644 Binary files a/app/public/template-screenshots/thumb_pert-light.png and b/app/public/template-screenshots/thumb_pert-light.png differ diff --git a/app/public/template-screenshots/thumb_playful-mindmap.png b/app/public/template-screenshots/thumb_playful-mindmap.png index a0037aa0..dc418804 100644 Binary files a/app/public/template-screenshots/thumb_playful-mindmap.png and b/app/public/template-screenshots/thumb_playful-mindmap.png differ diff --git a/app/public/template-screenshots/thumb_process-flow.png b/app/public/template-screenshots/thumb_process-flow.png new file mode 100644 index 00000000..7a2dd37d Binary files /dev/null and b/app/public/template-screenshots/thumb_process-flow.png differ diff --git a/app/scripts/screenshot-templates.mjs b/app/scripts/screenshot-templates.mjs index 65fa804b..ba13a096 100644 --- a/app/scripts/screenshot-templates.mjs +++ b/app/scripts/screenshot-templates.mjs @@ -37,7 +37,9 @@ async function main() { await screenshotTemplates(filteredTemplates); await createThumbnails(filteredTemplates); - await createTemplatesIndex(templates); // Always create index with all templates + console.log( + "Don't forget to add the new templates to `shared/src/templates.ts` file." + ); } /** @@ -75,8 +77,8 @@ async function takeScreenshot(browser, template) { console.error("Error loading template", error); } - // wait a few seconds - await page.waitForTimeout(3000); + // wait 3 seconds + await new Promise((resolve) => setTimeout(resolve, 3000)); // get the full page link const screenshotLink = await page.evaluate(() => { @@ -137,21 +139,4 @@ async function createThumbnails(templates) { } } -async function createTemplatesIndex(templates) { - console.log("Creating templates index..."); - const indexPath = path.join(__dirname, "../../shared/templates.ts"); - const indexContent = `export const templates = ${JSON.stringify( - templates, - null, - 2 - )} as const;`; - - try { - await writeFile(indexPath, indexContent, "utf8"); - console.log("✅ Created templates index file"); - } catch (error) { - console.error("Error creating templates index file:", error); - } -} - main().catch(console.error); diff --git a/app/src/components/Graph.tsx b/app/src/components/Graph.tsx index ef6987f2..02d37200 100644 --- a/app/src/components/Graph.tsx +++ b/app/src/components/Graph.tsx @@ -358,6 +358,8 @@ function getGraphUpdater({ // Because the graph has no positions yet if (layout.name === "fcose") { if (isFirstRender.current) { + // @ts-ignore + layout.animate = false; // @ts-ignore layout.randomize = true; // @ts-ignore diff --git a/app/src/components/LoadTemplateDialog.tsx b/app/src/components/LoadTemplateDialog.tsx index 5593fe45..4decab8b 100644 --- a/app/src/components/LoadTemplateDialog.tsx +++ b/app/src/components/LoadTemplateDialog.tsx @@ -48,6 +48,8 @@ export function LoadTemplateDialog() { }); }, [template, replaceContent, reset]); + console.log(templates); + return ( 0] { + background-color: #50c878; + border-color: #3da75d; +} + +/** Decision Point */ +:childless[out_degree > 1] { + shape: diamond; + background-color: #ffa500; + height: $width; + text-margin-y: 2; + border-color: #cc8400; +} + +/** Terminal */ +:childless[out_degree < 1][in_degree > 0] { + background-color: #ff6347; + color: white; + border-color: #e74c3c; +} + +/** Links */ +:childless[href] { + background-color: #4a90e2; + color: white; + text-decoration: underline; + cursor: pointer; + border-color: #3a7ac5; +} +`; diff --git a/shared/src/templates.ts b/shared/src/templates.ts index 13c57415..782dfd08 100644 --- a/shared/src/templates.ts +++ b/shared/src/templates.ts @@ -1,14 +1,15 @@ export const templates = [ "code-flow", + "process-flow", + "flowchart", "decision-flow", + "pert-light", "default", - "flowchart", + "org-chart", "knowledge-graph", - "mindmap-dark", "mindmap", + "mindmap-dark", "network-diagram-dark", "network-diagram-icons", - "org-chart", - "pert-light", "playful-mindmap", ] as const;