From de73445766eae315d8068870f932cd774a5d63cf Mon Sep 17 00:00:00 2001 From: Will Chen Date: Mon, 21 Jul 2025 21:16:00 -0700 Subject: [PATCH] Update codebase.ts so that all files are read (#684) --- e2e-tests/snapshots/astro.spec.ts_astro-1.txt | 22 ++- ...pec.ts_chat-mode-selector---ask-mode-1.txt | 22 ++- ...t-mode-selector---default-build-mode-1.txt | 22 ++- ...age.spec.ts_manage-context---default-1.txt | 2 +- ...--smart-context---auto-includes-only-1.txt | 14 +- ...rt-context---auto-includes-only-2.aria.yml | 2 +- ...ec.ts_manage-context---smart-context-1.txt | 7 +- ..._manage-context---smart-context-2.aria.yml | 2 +- ...ec.ts_manage-context---smart-context-3.txt | 2 +- ...ec.ts_manage-context---smart-context-4.txt | 14 +- ...ontext_window.spec.ts_context-window-1.txt | 134 ++++++++++------- ...ontext_window.spec.ts_context-window-2.txt | 134 ++++++++++------- ...ontext_window.spec.ts_context-window-3.txt | 134 ++++++++++------- ...ontext_window.spec.ts_context-window-5.txt | 134 ++++++++++------- .../dump_messages.spec.ts_dump-messages-1.txt | 134 ++++++++++------- ...r-auto-should-send-message-to-engine-1.txt | 140 +++++++++++------- ...o-engine---anthropic-claude-sonnet-4-1.txt | 140 +++++++++++------- ...d-message-to-engine---openai-gpt-4-1-1.txt | 140 +++++++++++------- ...ngine.spec.ts_send-message-to-engine-1.txt | 140 +++++++++++------- ...t-auto-should-send-message-to-engine-1.txt | 140 +++++++++++------- .../gateway.spec.ts_claude-4-sonnet-1.txt | 2 +- ...ort.spec.ts_import-app-with-AI-rules-1.txt | 18 ++- ...e.spec.ts_partial-message-is-resumed-1.txt | 22 ++- ...to-fix---complex-delete-rename-write-1.txt | 18 ++- ...to-fix---complex-delete-rename-write-2.txt | 18 ++- ....spec.ts_problems-auto-fix---enabled-1.txt | 18 ++- ....spec.ts_problems-auto-fix---enabled-2.txt | 18 ++- ...auto-fix---gives-up-after-2-attempts-1.txt | 18 ++- ...auto-fix---gives-up-after-2-attempts-2.txt | 20 ++- ...nking_budget.spec.ts_thinking-budget-2.txt | 140 +++++++++++------- ...nking_budget.spec.ts_thinking-budget-4.txt | 140 +++++++++++------- ...nking_budget.spec.ts_thinking-budget-6.txt | 140 +++++++++++------- src/utils/codebase.ts | 97 +++++++----- 33 files changed, 1435 insertions(+), 713 deletions(-) diff --git a/e2e-tests/snapshots/astro.spec.ts_astro-1.txt b/e2e-tests/snapshots/astro.spec.ts_astro-1.txt index 0f21bf5..d552d13 100644 --- a/e2e-tests/snapshots/astro.spec.ts_astro-1.txt +++ b/e2e-tests/snapshots/astro.spec.ts_astro-1.txt @@ -335,7 +335,15 @@ You need to first add Supabase to your app and then we can add auth. === role: user -message: This is my codebase. +message: This is my codebase. +// File contents excluded from context + + + +// File contents excluded from context + + + @@ -417,6 +425,18 @@ createRoot(document.getElementById("root")!).render(); + +// File contents excluded from context + + + +// File contents excluded from context + + + +// File contents excluded from context + + import { defineConfig } from "vite"; import react from "@vitejs/plugin-react-swc"; diff --git a/e2e-tests/snapshots/chat_mode.spec.ts_chat-mode-selector---ask-mode-1.txt b/e2e-tests/snapshots/chat_mode.spec.ts_chat-mode-selector---ask-mode-1.txt index 1cb1f3f..07b3b44 100644 --- a/e2e-tests/snapshots/chat_mode.spec.ts_chat-mode-selector---ask-mode-1.txt +++ b/e2e-tests/snapshots/chat_mode.spec.ts_chat-mode-selector---ask-mode-1.txt @@ -148,7 +148,15 @@ You need to first add Supabase to your app and then we can add auth. === role: user -message: This is my codebase. +message: This is my codebase. +// File contents excluded from context + + + +// File contents excluded from context + + + @@ -185,6 +193,18 @@ createRoot(document.getElementById("root")!).render(); + +// File contents excluded from context + + + +// File contents excluded from context + + + +// File contents excluded from context + + import { defineConfig } from "vite"; import react from "@vitejs/plugin-react-swc"; diff --git a/e2e-tests/snapshots/chat_mode.spec.ts_chat-mode-selector---default-build-mode-1.txt b/e2e-tests/snapshots/chat_mode.spec.ts_chat-mode-selector---default-build-mode-1.txt index 54f1dfa..e6f7d35 100644 --- a/e2e-tests/snapshots/chat_mode.spec.ts_chat-mode-selector---default-build-mode-1.txt +++ b/e2e-tests/snapshots/chat_mode.spec.ts_chat-mode-selector---default-build-mode-1.txt @@ -335,7 +335,15 @@ You need to first add Supabase to your app and then we can add auth. === role: user -message: This is my codebase. +message: This is my codebase. +// File contents excluded from context + + + +// File contents excluded from context + + + @@ -372,6 +380,18 @@ createRoot(document.getElementById("root")!).render(); + +// File contents excluded from context + + + +// File contents excluded from context + + + +// File contents excluded from context + + import { defineConfig } from "vite"; import react from "@vitejs/plugin-react-swc"; diff --git a/e2e-tests/snapshots/context_manage.spec.ts_manage-context---default-1.txt b/e2e-tests/snapshots/context_manage.spec.ts_manage-context---default-1.txt index 15f27e1..070a991 100644 --- a/e2e-tests/snapshots/context_manage.spec.ts_manage-context---default-1.txt +++ b/e2e-tests/snapshots/context_manage.spec.ts_manage-context---default-1.txt @@ -320,7 +320,7 @@ You need to first add Supabase to your app and then we can add auth. === role: user message: This is my codebase. -// Contents omitted for brevity +// File contents excluded from context diff --git a/e2e-tests/snapshots/context_manage.spec.ts_manage-context---smart-context---auto-includes-only-1.txt b/e2e-tests/snapshots/context_manage.spec.ts_manage-context---smart-context---auto-includes-only-1.txt index 32e11ab..4088dfc 100644 --- a/e2e-tests/snapshots/context_manage.spec.ts_manage-context---smart-context---auto-includes-only-1.txt +++ b/e2e-tests/snapshots/context_manage.spec.ts_manage-context---smart-context---auto-includes-only-1.txt @@ -21,6 +21,11 @@ }, "dyad_options": { "files": [ + { + "path": ".env.foobar", + "content": "// File contents excluded from context", + "force": false + }, { "path": "a.ts", "content": "// a.ts\n", @@ -41,6 +46,11 @@ "content": "// exclude.tsx: this file is not in any of the globs\n", "force": false }, + { + "path": "manual/baz.json", + "content": "// File contents excluded from context", + "force": true + }, { "path": "manual/file.ts", "content": "", @@ -53,12 +63,12 @@ }, { "path": "src/components/ui/button.tsx", - "content": "// Contents omitted for brevity", + "content": "// File contents excluded from context", "force": false }, { "path": "src/components/ui/helper.ts", - "content": "// Contents omitted for brevity", + "content": "// File contents excluded from context", "force": false }, { diff --git a/e2e-tests/snapshots/context_manage.spec.ts_manage-context---smart-context---auto-includes-only-2.aria.yml b/e2e-tests/snapshots/context_manage.spec.ts_manage-context---smart-context---auto-includes-only-2.aria.yml index b81de0d..da5aa31 100644 --- a/e2e-tests/snapshots/context_manage.spec.ts_manage-context---smart-context---auto-includes-only-2.aria.yml +++ b/e2e-tests/snapshots/context_manage.spec.ts_manage-context---smart-context---auto-includes-only-2.aria.yml @@ -15,6 +15,6 @@ - text: /a\.ts 1 files, ~\d+ tokens/ - button: - img - - text: /manual\/\*\* 2 files, ~\d+ tokens/ + - text: /manual\/\*\* 3 files, ~\d+ tokens/ - button: - img \ No newline at end of file diff --git a/e2e-tests/snapshots/context_manage.spec.ts_manage-context---smart-context-1.txt b/e2e-tests/snapshots/context_manage.spec.ts_manage-context---smart-context-1.txt index e2d70f3..cf692b7 100644 --- a/e2e-tests/snapshots/context_manage.spec.ts_manage-context---smart-context-1.txt +++ b/e2e-tests/snapshots/context_manage.spec.ts_manage-context---smart-context-1.txt @@ -26,6 +26,11 @@ "content": "// a.ts\n", "force": true }, + { + "path": "manual/baz.json", + "content": "// File contents excluded from context", + "force": true + }, { "path": "manual/file.ts", "content": "", @@ -38,7 +43,7 @@ }, { "path": "src/components/ui/helper.ts", - "content": "// Contents omitted for brevity", + "content": "// File contents excluded from context", "force": false }, { diff --git a/e2e-tests/snapshots/context_manage.spec.ts_manage-context---smart-context-2.aria.yml b/e2e-tests/snapshots/context_manage.spec.ts_manage-context---smart-context-2.aria.yml index bdf5a2b..fc2cfab 100644 --- a/e2e-tests/snapshots/context_manage.spec.ts_manage-context---smart-context-2.aria.yml +++ b/e2e-tests/snapshots/context_manage.spec.ts_manage-context---smart-context-2.aria.yml @@ -20,6 +20,6 @@ - text: /a\.ts 1 files, ~\d+ tokens/ - button: - img - - text: /manual\/\*\* 2 files, ~\d+ tokens/ + - text: /manual\/\*\* 3 files, ~\d+ tokens/ - button: - img \ No newline at end of file diff --git a/e2e-tests/snapshots/context_manage.spec.ts_manage-context---smart-context-3.txt b/e2e-tests/snapshots/context_manage.spec.ts_manage-context---smart-context-3.txt index 081c964..fe2b44b 100644 --- a/e2e-tests/snapshots/context_manage.spec.ts_manage-context---smart-context-3.txt +++ b/e2e-tests/snapshots/context_manage.spec.ts_manage-context---smart-context-3.txt @@ -31,7 +31,7 @@ "files": [ { "path": "src/components/ui/helper.ts", - "content": "// Contents omitted for brevity", + "content": "// File contents excluded from context", "force": false }, { diff --git a/e2e-tests/snapshots/context_manage.spec.ts_manage-context---smart-context-4.txt b/e2e-tests/snapshots/context_manage.spec.ts_manage-context---smart-context-4.txt index 505c0f0..067e5c1 100644 --- a/e2e-tests/snapshots/context_manage.spec.ts_manage-context---smart-context-4.txt +++ b/e2e-tests/snapshots/context_manage.spec.ts_manage-context---smart-context-4.txt @@ -37,6 +37,11 @@ }, "dyad_options": { "files": [ + { + "path": ".env.foobar", + "content": "// File contents excluded from context", + "force": false + }, { "path": "a.ts", "content": "// a.ts\n", @@ -57,6 +62,11 @@ "content": "// exclude.tsx: this file is not in any of the globs\n", "force": false }, + { + "path": "manual/baz.json", + "content": "// File contents excluded from context", + "force": false + }, { "path": "manual/file.ts", "content": "", @@ -69,12 +79,12 @@ }, { "path": "src/components/ui/button.tsx", - "content": "// Contents omitted for brevity", + "content": "// File contents excluded from context", "force": false }, { "path": "src/components/ui/helper.ts", - "content": "// Contents omitted for brevity", + "content": "// File contents excluded from context", "force": false }, { diff --git a/e2e-tests/snapshots/context_window.spec.ts_context-window-1.txt b/e2e-tests/snapshots/context_window.spec.ts_context-window-1.txt index 55d1c26..642a826 100644 --- a/e2e-tests/snapshots/context_window.spec.ts_context-window-1.txt +++ b/e2e-tests/snapshots/context_window.spec.ts_context-window-1.txt @@ -337,7 +337,11 @@ You need to first add Supabase to your app and then we can add auth. === role: user -message: This is my codebase. +message: This is my codebase. +// File contents excluded from context + + + # Tech Stack - You are building a React application. @@ -360,8 +364,12 @@ Available packages and libraries: + +// File contents excluded from context + + -// Contents omitted for brevity +// File contents excluded from context @@ -391,6 +399,18 @@ export default { + +// File contents excluded from context + + + +// File contents excluded from context + + + +// File contents excluded from context + + # Welcome to your Dyad app @@ -492,199 +512,199 @@ export const MadeWithDyad = () => { -// Contents omitted for brevity +// File contents excluded from context -// Contents omitted for brevity +// File contents excluded from context -// Contents omitted for brevity +// File contents excluded from context -// Contents omitted for brevity +// File contents excluded from context -// Contents omitted for brevity +// File contents excluded from context -// Contents omitted for brevity +// File contents excluded from context -// Contents omitted for brevity +// File contents excluded from context -// Contents omitted for brevity +// File contents excluded from context -// Contents omitted for brevity +// File contents excluded from context -// Contents omitted for brevity +// File contents excluded from context -// Contents omitted for brevity +// File contents excluded from context -// Contents omitted for brevity +// File contents excluded from context -// Contents omitted for brevity +// File contents excluded from context -// Contents omitted for brevity +// File contents excluded from context -// Contents omitted for brevity +// File contents excluded from context -// Contents omitted for brevity +// File contents excluded from context -// Contents omitted for brevity +// File contents excluded from context -// Contents omitted for brevity +// File contents excluded from context -// Contents omitted for brevity +// File contents excluded from context -// Contents omitted for brevity +// File contents excluded from context -// Contents omitted for brevity +// File contents excluded from context -// Contents omitted for brevity +// File contents excluded from context -// Contents omitted for brevity +// File contents excluded from context -// Contents omitted for brevity +// File contents excluded from context -// Contents omitted for brevity +// File contents excluded from context -// Contents omitted for brevity +// File contents excluded from context -// Contents omitted for brevity +// File contents excluded from context -// Contents omitted for brevity +// File contents excluded from context -// Contents omitted for brevity +// File contents excluded from context -// Contents omitted for brevity +// File contents excluded from context -// Contents omitted for brevity +// File contents excluded from context -// Contents omitted for brevity +// File contents excluded from context -// Contents omitted for brevity +// File contents excluded from context -// Contents omitted for brevity +// File contents excluded from context -// Contents omitted for brevity +// File contents excluded from context -// Contents omitted for brevity +// File contents excluded from context -// Contents omitted for brevity +// File contents excluded from context -// Contents omitted for brevity +// File contents excluded from context -// Contents omitted for brevity +// File contents excluded from context -// Contents omitted for brevity +// File contents excluded from context -// Contents omitted for brevity +// File contents excluded from context -// Contents omitted for brevity +// File contents excluded from context -// Contents omitted for brevity +// File contents excluded from context -// Contents omitted for brevity +// File contents excluded from context -// Contents omitted for brevity +// File contents excluded from context -// Contents omitted for brevity +// File contents excluded from context -// Contents omitted for brevity +// File contents excluded from context -// Contents omitted for brevity +// File contents excluded from context -// Contents omitted for brevity +// File contents excluded from context @@ -1208,6 +1228,18 @@ export default { + +// File contents excluded from context + + + +// File contents excluded from context + + + +// File contents excluded from context + + import { defineConfig } from "vite"; import dyadComponentTagger from "@dyad-sh/react-vite-component-tagger"; diff --git a/e2e-tests/snapshots/context_window.spec.ts_context-window-2.txt b/e2e-tests/snapshots/context_window.spec.ts_context-window-2.txt index 283c1c5..f03980c 100644 --- a/e2e-tests/snapshots/context_window.spec.ts_context-window-2.txt +++ b/e2e-tests/snapshots/context_window.spec.ts_context-window-2.txt @@ -337,7 +337,11 @@ You need to first add Supabase to your app and then we can add auth. === role: user -message: This is my codebase. +message: This is my codebase. +// File contents excluded from context + + + # Tech Stack - You are building a React application. @@ -360,8 +364,12 @@ Available packages and libraries: + +// File contents excluded from context + + -// Contents omitted for brevity +// File contents excluded from context @@ -391,6 +399,18 @@ export default { + +// File contents excluded from context + + + +// File contents excluded from context + + + +// File contents excluded from context + + # Welcome to your Dyad app @@ -492,199 +512,199 @@ export const MadeWithDyad = () => { -// Contents omitted for brevity +// File contents excluded from context -// Contents omitted for brevity +// File contents excluded from context -// Contents omitted for brevity +// File contents excluded from context -// Contents omitted for brevity +// File contents excluded from context -// Contents omitted for brevity +// File contents excluded from context -// Contents omitted for brevity +// File contents excluded from context -// Contents omitted for brevity +// File contents excluded from context -// Contents omitted for brevity +// File contents excluded from context -// Contents omitted for brevity +// File contents excluded from context -// Contents omitted for brevity +// File contents excluded from context -// Contents omitted for brevity +// File contents excluded from context -// Contents omitted for brevity +// File contents excluded from context -// Contents omitted for brevity +// File contents excluded from context -// Contents omitted for brevity +// File contents excluded from context -// Contents omitted for brevity +// File contents excluded from context -// Contents omitted for brevity +// File contents excluded from context -// Contents omitted for brevity +// File contents excluded from context -// Contents omitted for brevity +// File contents excluded from context -// Contents omitted for brevity +// File contents excluded from context -// Contents omitted for brevity +// File contents excluded from context -// Contents omitted for brevity +// File contents excluded from context -// Contents omitted for brevity +// File contents excluded from context -// Contents omitted for brevity +// File contents excluded from context -// Contents omitted for brevity +// File contents excluded from context -// Contents omitted for brevity +// File contents excluded from context -// Contents omitted for brevity +// File contents excluded from context -// Contents omitted for brevity +// File contents excluded from context -// Contents omitted for brevity +// File contents excluded from context -// Contents omitted for brevity +// File contents excluded from context -// Contents omitted for brevity +// File contents excluded from context -// Contents omitted for brevity +// File contents excluded from context -// Contents omitted for brevity +// File contents excluded from context -// Contents omitted for brevity +// File contents excluded from context -// Contents omitted for brevity +// File contents excluded from context -// Contents omitted for brevity +// File contents excluded from context -// Contents omitted for brevity +// File contents excluded from context -// Contents omitted for brevity +// File contents excluded from context -// Contents omitted for brevity +// File contents excluded from context -// Contents omitted for brevity +// File contents excluded from context -// Contents omitted for brevity +// File contents excluded from context -// Contents omitted for brevity +// File contents excluded from context -// Contents omitted for brevity +// File contents excluded from context -// Contents omitted for brevity +// File contents excluded from context -// Contents omitted for brevity +// File contents excluded from context -// Contents omitted for brevity +// File contents excluded from context -// Contents omitted for brevity +// File contents excluded from context -// Contents omitted for brevity +// File contents excluded from context -// Contents omitted for brevity +// File contents excluded from context -// Contents omitted for brevity +// File contents excluded from context @@ -1208,6 +1228,18 @@ export default { + +// File contents excluded from context + + + +// File contents excluded from context + + + +// File contents excluded from context + + import { defineConfig } from "vite"; import dyadComponentTagger from "@dyad-sh/react-vite-component-tagger"; diff --git a/e2e-tests/snapshots/context_window.spec.ts_context-window-3.txt b/e2e-tests/snapshots/context_window.spec.ts_context-window-3.txt index e9a7cf0..688b950 100644 --- a/e2e-tests/snapshots/context_window.spec.ts_context-window-3.txt +++ b/e2e-tests/snapshots/context_window.spec.ts_context-window-3.txt @@ -337,7 +337,11 @@ You need to first add Supabase to your app and then we can add auth. === role: user -message: This is my codebase. +message: This is my codebase. +// File contents excluded from context + + + # Tech Stack - You are building a React application. @@ -360,8 +364,12 @@ Available packages and libraries: + +// File contents excluded from context + + -// Contents omitted for brevity +// File contents excluded from context @@ -391,6 +399,18 @@ export default { + +// File contents excluded from context + + + +// File contents excluded from context + + + +// File contents excluded from context + + # Welcome to your Dyad app @@ -492,199 +512,199 @@ export const MadeWithDyad = () => { -// Contents omitted for brevity +// File contents excluded from context -// Contents omitted for brevity +// File contents excluded from context -// Contents omitted for brevity +// File contents excluded from context -// Contents omitted for brevity +// File contents excluded from context -// Contents omitted for brevity +// File contents excluded from context -// Contents omitted for brevity +// File contents excluded from context -// Contents omitted for brevity +// File contents excluded from context -// Contents omitted for brevity +// File contents excluded from context -// Contents omitted for brevity +// File contents excluded from context -// Contents omitted for brevity +// File contents excluded from context -// Contents omitted for brevity +// File contents excluded from context -// Contents omitted for brevity +// File contents excluded from context -// Contents omitted for brevity +// File contents excluded from context -// Contents omitted for brevity +// File contents excluded from context -// Contents omitted for brevity +// File contents excluded from context -// Contents omitted for brevity +// File contents excluded from context -// Contents omitted for brevity +// File contents excluded from context -// Contents omitted for brevity +// File contents excluded from context -// Contents omitted for brevity +// File contents excluded from context -// Contents omitted for brevity +// File contents excluded from context -// Contents omitted for brevity +// File contents excluded from context -// Contents omitted for brevity +// File contents excluded from context -// Contents omitted for brevity +// File contents excluded from context -// Contents omitted for brevity +// File contents excluded from context -// Contents omitted for brevity +// File contents excluded from context -// Contents omitted for brevity +// File contents excluded from context -// Contents omitted for brevity +// File contents excluded from context -// Contents omitted for brevity +// File contents excluded from context -// Contents omitted for brevity +// File contents excluded from context -// Contents omitted for brevity +// File contents excluded from context -// Contents omitted for brevity +// File contents excluded from context -// Contents omitted for brevity +// File contents excluded from context -// Contents omitted for brevity +// File contents excluded from context -// Contents omitted for brevity +// File contents excluded from context -// Contents omitted for brevity +// File contents excluded from context -// Contents omitted for brevity +// File contents excluded from context -// Contents omitted for brevity +// File contents excluded from context -// Contents omitted for brevity +// File contents excluded from context -// Contents omitted for brevity +// File contents excluded from context -// Contents omitted for brevity +// File contents excluded from context -// Contents omitted for brevity +// File contents excluded from context -// Contents omitted for brevity +// File contents excluded from context -// Contents omitted for brevity +// File contents excluded from context -// Contents omitted for brevity +// File contents excluded from context -// Contents omitted for brevity +// File contents excluded from context -// Contents omitted for brevity +// File contents excluded from context -// Contents omitted for brevity +// File contents excluded from context -// Contents omitted for brevity +// File contents excluded from context -// Contents omitted for brevity +// File contents excluded from context @@ -1208,6 +1228,18 @@ export default { + +// File contents excluded from context + + + +// File contents excluded from context + + + +// File contents excluded from context + + import { defineConfig } from "vite"; import dyadComponentTagger from "@dyad-sh/react-vite-component-tagger"; diff --git a/e2e-tests/snapshots/context_window.spec.ts_context-window-5.txt b/e2e-tests/snapshots/context_window.spec.ts_context-window-5.txt index 90a5474..f036301 100644 --- a/e2e-tests/snapshots/context_window.spec.ts_context-window-5.txt +++ b/e2e-tests/snapshots/context_window.spec.ts_context-window-5.txt @@ -337,7 +337,11 @@ You need to first add Supabase to your app and then we can add auth. === role: user -message: This is my codebase. +message: This is my codebase. +// File contents excluded from context + + + # Tech Stack - You are building a React application. @@ -360,8 +364,12 @@ Available packages and libraries: + +// File contents excluded from context + + -// Contents omitted for brevity +// File contents excluded from context @@ -391,6 +399,18 @@ export default { + +// File contents excluded from context + + + +// File contents excluded from context + + + +// File contents excluded from context + + # Welcome to your Dyad app @@ -492,199 +512,199 @@ export const MadeWithDyad = () => { -// Contents omitted for brevity +// File contents excluded from context -// Contents omitted for brevity +// File contents excluded from context -// Contents omitted for brevity +// File contents excluded from context -// Contents omitted for brevity +// File contents excluded from context -// Contents omitted for brevity +// File contents excluded from context -// Contents omitted for brevity +// File contents excluded from context -// Contents omitted for brevity +// File contents excluded from context -// Contents omitted for brevity +// File contents excluded from context -// Contents omitted for brevity +// File contents excluded from context -// Contents omitted for brevity +// File contents excluded from context -// Contents omitted for brevity +// File contents excluded from context -// Contents omitted for brevity +// File contents excluded from context -// Contents omitted for brevity +// File contents excluded from context -// Contents omitted for brevity +// File contents excluded from context -// Contents omitted for brevity +// File contents excluded from context -// Contents omitted for brevity +// File contents excluded from context -// Contents omitted for brevity +// File contents excluded from context -// Contents omitted for brevity +// File contents excluded from context -// Contents omitted for brevity +// File contents excluded from context -// Contents omitted for brevity +// File contents excluded from context -// Contents omitted for brevity +// File contents excluded from context -// Contents omitted for brevity +// File contents excluded from context -// Contents omitted for brevity +// File contents excluded from context -// Contents omitted for brevity +// File contents excluded from context -// Contents omitted for brevity +// File contents excluded from context -// Contents omitted for brevity +// File contents excluded from context -// Contents omitted for brevity +// File contents excluded from context -// Contents omitted for brevity +// File contents excluded from context -// Contents omitted for brevity +// File contents excluded from context -// Contents omitted for brevity +// File contents excluded from context -// Contents omitted for brevity +// File contents excluded from context -// Contents omitted for brevity +// File contents excluded from context -// Contents omitted for brevity +// File contents excluded from context -// Contents omitted for brevity +// File contents excluded from context -// Contents omitted for brevity +// File contents excluded from context -// Contents omitted for brevity +// File contents excluded from context -// Contents omitted for brevity +// File contents excluded from context -// Contents omitted for brevity +// File contents excluded from context -// Contents omitted for brevity +// File contents excluded from context -// Contents omitted for brevity +// File contents excluded from context -// Contents omitted for brevity +// File contents excluded from context -// Contents omitted for brevity +// File contents excluded from context -// Contents omitted for brevity +// File contents excluded from context -// Contents omitted for brevity +// File contents excluded from context -// Contents omitted for brevity +// File contents excluded from context -// Contents omitted for brevity +// File contents excluded from context -// Contents omitted for brevity +// File contents excluded from context -// Contents omitted for brevity +// File contents excluded from context -// Contents omitted for brevity +// File contents excluded from context @@ -1208,6 +1228,18 @@ export default { + +// File contents excluded from context + + + +// File contents excluded from context + + + +// File contents excluded from context + + import { defineConfig } from "vite"; import dyadComponentTagger from "@dyad-sh/react-vite-component-tagger"; diff --git a/e2e-tests/snapshots/dump_messages.spec.ts_dump-messages-1.txt b/e2e-tests/snapshots/dump_messages.spec.ts_dump-messages-1.txt index 5d17681..b7aeba0 100644 --- a/e2e-tests/snapshots/dump_messages.spec.ts_dump-messages-1.txt +++ b/e2e-tests/snapshots/dump_messages.spec.ts_dump-messages-1.txt @@ -337,7 +337,11 @@ You need to first add Supabase to your app and then we can add auth. === role: user -message: This is my codebase. +message: This is my codebase. +// File contents excluded from context + + + # Tech Stack - You are building a React application. @@ -360,8 +364,12 @@ Available packages and libraries: + +// File contents excluded from context + + -// Contents omitted for brevity +// File contents excluded from context @@ -391,6 +399,18 @@ export default { + +// File contents excluded from context + + + +// File contents excluded from context + + + +// File contents excluded from context + + # Welcome to your Dyad app @@ -492,199 +512,199 @@ export const MadeWithDyad = () => { -// Contents omitted for brevity +// File contents excluded from context -// Contents omitted for brevity +// File contents excluded from context -// Contents omitted for brevity +// File contents excluded from context -// Contents omitted for brevity +// File contents excluded from context -// Contents omitted for brevity +// File contents excluded from context -// Contents omitted for brevity +// File contents excluded from context -// Contents omitted for brevity +// File contents excluded from context -// Contents omitted for brevity +// File contents excluded from context -// Contents omitted for brevity +// File contents excluded from context -// Contents omitted for brevity +// File contents excluded from context -// Contents omitted for brevity +// File contents excluded from context -// Contents omitted for brevity +// File contents excluded from context -// Contents omitted for brevity +// File contents excluded from context -// Contents omitted for brevity +// File contents excluded from context -// Contents omitted for brevity +// File contents excluded from context -// Contents omitted for brevity +// File contents excluded from context -// Contents omitted for brevity +// File contents excluded from context -// Contents omitted for brevity +// File contents excluded from context -// Contents omitted for brevity +// File contents excluded from context -// Contents omitted for brevity +// File contents excluded from context -// Contents omitted for brevity +// File contents excluded from context -// Contents omitted for brevity +// File contents excluded from context -// Contents omitted for brevity +// File contents excluded from context -// Contents omitted for brevity +// File contents excluded from context -// Contents omitted for brevity +// File contents excluded from context -// Contents omitted for brevity +// File contents excluded from context -// Contents omitted for brevity +// File contents excluded from context -// Contents omitted for brevity +// File contents excluded from context -// Contents omitted for brevity +// File contents excluded from context -// Contents omitted for brevity +// File contents excluded from context -// Contents omitted for brevity +// File contents excluded from context -// Contents omitted for brevity +// File contents excluded from context -// Contents omitted for brevity +// File contents excluded from context -// Contents omitted for brevity +// File contents excluded from context -// Contents omitted for brevity +// File contents excluded from context -// Contents omitted for brevity +// File contents excluded from context -// Contents omitted for brevity +// File contents excluded from context -// Contents omitted for brevity +// File contents excluded from context -// Contents omitted for brevity +// File contents excluded from context -// Contents omitted for brevity +// File contents excluded from context -// Contents omitted for brevity +// File contents excluded from context -// Contents omitted for brevity +// File contents excluded from context -// Contents omitted for brevity +// File contents excluded from context -// Contents omitted for brevity +// File contents excluded from context -// Contents omitted for brevity +// File contents excluded from context -// Contents omitted for brevity +// File contents excluded from context -// Contents omitted for brevity +// File contents excluded from context -// Contents omitted for brevity +// File contents excluded from context -// Contents omitted for brevity +// File contents excluded from context @@ -1208,6 +1228,18 @@ export default { + +// File contents excluded from context + + + +// File contents excluded from context + + + +// File contents excluded from context + + import { defineConfig } from "vite"; import dyadComponentTagger from "@dyad-sh/react-vite-component-tagger"; diff --git a/e2e-tests/snapshots/engine.spec.ts_regular-auto-should-send-message-to-engine-1.txt b/e2e-tests/snapshots/engine.spec.ts_regular-auto-should-send-message-to-engine-1.txt index 797fb4b..4b08372 100644 --- a/e2e-tests/snapshots/engine.spec.ts_regular-auto-should-send-message-to-engine-1.txt +++ b/e2e-tests/snapshots/engine.spec.ts_regular-auto-should-send-message-to-engine-1.txt @@ -21,14 +21,24 @@ }, "dyad_options": { "files": [ + { + "path": ".gitignore", + "content": "// File contents excluded from context", + "force": false + }, { "path": "AI_RULES.md", "content": "# Tech Stack\n\n- You are building a React application.\n- Use TypeScript.\n- Use React Router. KEEP the routes in src/App.tsx\n- Always put source code in the src folder.\n- Put pages into src/pages/\n- Put components into src/components/\n- The main page (default page) is src/pages/Index.tsx\n- UPDATE the main page to include the new components. OTHERWISE, the user can NOT see any components!\n- ALWAYS try to use the shadcn/ui library.\n- Tailwind CSS: always use Tailwind CSS for styling components. Utilize Tailwind classes extensively for layout, spacing, colors, and other design aspects.\n\nAvailable packages and libraries:\n\n- The lucide-react package is installed for icons.\n- You ALREADY have ALL the shadcn/ui components and their dependencies installed. So you don't need to install them again.\n- You have ALL the necessary Radix UI components installed.\n- Use prebuilt components from the shadcn/ui library after importing them. Note that these files shouldn't be edited, so make new components if you need to change them.\n", "force": false }, + { + "path": "components.json", + "content": "// File contents excluded from context", + "force": false + }, { "path": "eslint.config.js", - "content": "// Contents omitted for brevity", + "content": "// File contents excluded from context", "force": false }, { @@ -46,6 +56,21 @@ "content": "export default {\n plugins: {\n tailwindcss: {},\n autoprefixer: {},\n },\n};\n", "force": false }, + { + "path": "public/favicon.ico", + "content": "// File contents excluded from context", + "force": false + }, + { + "path": "public/placeholder.svg", + "content": "// File contents excluded from context", + "force": false + }, + { + "path": "public/robots.txt", + "content": "// File contents excluded from context", + "force": false + }, { "path": "README.md", "content": "# Welcome to your Dyad app\n", @@ -68,247 +93,247 @@ }, { "path": "src/components/ui/accordion.tsx", - "content": "// Contents omitted for brevity", + "content": "// File contents excluded from context", "force": false }, { "path": "src/components/ui/alert-dialog.tsx", - "content": "// Contents omitted for brevity", + "content": "// File contents excluded from context", "force": false }, { "path": "src/components/ui/alert.tsx", - "content": "// Contents omitted for brevity", + "content": "// File contents excluded from context", "force": false }, { "path": "src/components/ui/aspect-ratio.tsx", - "content": "// Contents omitted for brevity", + "content": "// File contents excluded from context", "force": false }, { "path": "src/components/ui/avatar.tsx", - "content": "// Contents omitted for brevity", + "content": "// File contents excluded from context", "force": false }, { "path": "src/components/ui/badge.tsx", - "content": "// Contents omitted for brevity", + "content": "// File contents excluded from context", "force": false }, { "path": "src/components/ui/breadcrumb.tsx", - "content": "// Contents omitted for brevity", + "content": "// File contents excluded from context", "force": false }, { "path": "src/components/ui/button.tsx", - "content": "// Contents omitted for brevity", + "content": "// File contents excluded from context", "force": false }, { "path": "src/components/ui/calendar.tsx", - "content": "// Contents omitted for brevity", + "content": "// File contents excluded from context", "force": false }, { "path": "src/components/ui/card.tsx", - "content": "// Contents omitted for brevity", + "content": "// File contents excluded from context", "force": false }, { "path": "src/components/ui/carousel.tsx", - "content": "// Contents omitted for brevity", + "content": "// File contents excluded from context", "force": false }, { "path": "src/components/ui/chart.tsx", - "content": "// Contents omitted for brevity", + "content": "// File contents excluded from context", "force": false }, { "path": "src/components/ui/checkbox.tsx", - "content": "// Contents omitted for brevity", + "content": "// File contents excluded from context", "force": false }, { "path": "src/components/ui/collapsible.tsx", - "content": "// Contents omitted for brevity", + "content": "// File contents excluded from context", "force": false }, { "path": "src/components/ui/command.tsx", - "content": "// Contents omitted for brevity", + "content": "// File contents excluded from context", "force": false }, { "path": "src/components/ui/context-menu.tsx", - "content": "// Contents omitted for brevity", + "content": "// File contents excluded from context", "force": false }, { "path": "src/components/ui/dialog.tsx", - "content": "// Contents omitted for brevity", + "content": "// File contents excluded from context", "force": false }, { "path": "src/components/ui/drawer.tsx", - "content": "// Contents omitted for brevity", + "content": "// File contents excluded from context", "force": false }, { "path": "src/components/ui/dropdown-menu.tsx", - "content": "// Contents omitted for brevity", + "content": "// File contents excluded from context", "force": false }, { "path": "src/components/ui/form.tsx", - "content": "// Contents omitted for brevity", + "content": "// File contents excluded from context", "force": false }, { "path": "src/components/ui/hover-card.tsx", - "content": "// Contents omitted for brevity", + "content": "// File contents excluded from context", "force": false }, { "path": "src/components/ui/input-otp.tsx", - "content": "// Contents omitted for brevity", + "content": "// File contents excluded from context", "force": false }, { "path": "src/components/ui/input.tsx", - "content": "// Contents omitted for brevity", + "content": "// File contents excluded from context", "force": false }, { "path": "src/components/ui/label.tsx", - "content": "// Contents omitted for brevity", + "content": "// File contents excluded from context", "force": false }, { "path": "src/components/ui/menubar.tsx", - "content": "// Contents omitted for brevity", + "content": "// File contents excluded from context", "force": false }, { "path": "src/components/ui/navigation-menu.tsx", - "content": "// Contents omitted for brevity", + "content": "// File contents excluded from context", "force": false }, { "path": "src/components/ui/pagination.tsx", - "content": "// Contents omitted for brevity", + "content": "// File contents excluded from context", "force": false }, { "path": "src/components/ui/popover.tsx", - "content": "// Contents omitted for brevity", + "content": "// File contents excluded from context", "force": false }, { "path": "src/components/ui/progress.tsx", - "content": "// Contents omitted for brevity", + "content": "// File contents excluded from context", "force": false }, { "path": "src/components/ui/radio-group.tsx", - "content": "// Contents omitted for brevity", + "content": "// File contents excluded from context", "force": false }, { "path": "src/components/ui/resizable.tsx", - "content": "// Contents omitted for brevity", + "content": "// File contents excluded from context", "force": false }, { "path": "src/components/ui/scroll-area.tsx", - "content": "// Contents omitted for brevity", + "content": "// File contents excluded from context", "force": false }, { "path": "src/components/ui/select.tsx", - "content": "// Contents omitted for brevity", + "content": "// File contents excluded from context", "force": false }, { "path": "src/components/ui/separator.tsx", - "content": "// Contents omitted for brevity", + "content": "// File contents excluded from context", "force": false }, { "path": "src/components/ui/sheet.tsx", - "content": "// Contents omitted for brevity", + "content": "// File contents excluded from context", "force": false }, { "path": "src/components/ui/sidebar.tsx", - "content": "// Contents omitted for brevity", + "content": "// File contents excluded from context", "force": false }, { "path": "src/components/ui/skeleton.tsx", - "content": "// Contents omitted for brevity", + "content": "// File contents excluded from context", "force": false }, { "path": "src/components/ui/slider.tsx", - "content": "// Contents omitted for brevity", + "content": "// File contents excluded from context", "force": false }, { "path": "src/components/ui/sonner.tsx", - "content": "// Contents omitted for brevity", + "content": "// File contents excluded from context", "force": false }, { "path": "src/components/ui/switch.tsx", - "content": "// Contents omitted for brevity", + "content": "// File contents excluded from context", "force": false }, { "path": "src/components/ui/table.tsx", - "content": "// Contents omitted for brevity", + "content": "// File contents excluded from context", "force": false }, { "path": "src/components/ui/tabs.tsx", - "content": "// Contents omitted for brevity", + "content": "// File contents excluded from context", "force": false }, { "path": "src/components/ui/textarea.tsx", - "content": "// Contents omitted for brevity", + "content": "// File contents excluded from context", "force": false }, { "path": "src/components/ui/toast.tsx", - "content": "// Contents omitted for brevity", + "content": "// File contents excluded from context", "force": false }, { "path": "src/components/ui/toaster.tsx", - "content": "// Contents omitted for brevity", + "content": "// File contents excluded from context", "force": false }, { "path": "src/components/ui/toggle-group.tsx", - "content": "// Contents omitted for brevity", + "content": "// File contents excluded from context", "force": false }, { "path": "src/components/ui/toggle.tsx", - "content": "// Contents omitted for brevity", + "content": "// File contents excluded from context", "force": false }, { "path": "src/components/ui/tooltip.tsx", - "content": "// Contents omitted for brevity", + "content": "// File contents excluded from context", "force": false }, { "path": "src/components/ui/use-toast.ts", - "content": "// Contents omitted for brevity", + "content": "// File contents excluded from context", "force": false }, { @@ -361,6 +386,21 @@ "content": "import type { Config } from \"tailwindcss\";\n\nexport default {\n darkMode: [\"class\"],\n content: [\n \"./pages/**/*.{ts,tsx}\",\n \"./components/**/*.{ts,tsx}\",\n \"./app/**/*.{ts,tsx}\",\n \"./src/**/*.{ts,tsx}\",\n ],\n prefix: \"\",\n theme: {\n container: {\n center: true,\n padding: \"2rem\",\n screens: {\n \"2xl\": \"1400px\",\n },\n },\n extend: {\n colors: {\n border: \"hsl(var(--border))\",\n input: \"hsl(var(--input))\",\n ring: \"hsl(var(--ring))\",\n background: \"hsl(var(--background))\",\n foreground: \"hsl(var(--foreground))\",\n primary: {\n DEFAULT: \"hsl(var(--primary))\",\n foreground: \"hsl(var(--primary-foreground))\",\n },\n secondary: {\n DEFAULT: \"hsl(var(--secondary))\",\n foreground: \"hsl(var(--secondary-foreground))\",\n },\n destructive: {\n DEFAULT: \"hsl(var(--destructive))\",\n foreground: \"hsl(var(--destructive-foreground))\",\n },\n muted: {\n DEFAULT: \"hsl(var(--muted))\",\n foreground: \"hsl(var(--muted-foreground))\",\n },\n accent: {\n DEFAULT: \"hsl(var(--accent))\",\n foreground: \"hsl(var(--accent-foreground))\",\n },\n popover: {\n DEFAULT: \"hsl(var(--popover))\",\n foreground: \"hsl(var(--popover-foreground))\",\n },\n card: {\n DEFAULT: \"hsl(var(--card))\",\n foreground: \"hsl(var(--card-foreground))\",\n },\n sidebar: {\n DEFAULT: \"hsl(var(--sidebar-background))\",\n foreground: \"hsl(var(--sidebar-foreground))\",\n primary: \"hsl(var(--sidebar-primary))\",\n \"primary-foreground\": \"hsl(var(--sidebar-primary-foreground))\",\n accent: \"hsl(var(--sidebar-accent))\",\n \"accent-foreground\": \"hsl(var(--sidebar-accent-foreground))\",\n border: \"hsl(var(--sidebar-border))\",\n ring: \"hsl(var(--sidebar-ring))\",\n },\n },\n borderRadius: {\n lg: \"var(--radius)\",\n md: \"calc(var(--radius) - 2px)\",\n sm: \"calc(var(--radius) - 4px)\",\n },\n keyframes: {\n \"accordion-down\": {\n from: {\n height: \"0\",\n },\n to: {\n height: \"var(--radix-accordion-content-height)\",\n },\n },\n \"accordion-up\": {\n from: {\n height: \"var(--radix-accordion-content-height)\",\n },\n to: {\n height: \"0\",\n },\n },\n },\n animation: {\n \"accordion-down\": \"accordion-down 0.2s ease-out\",\n \"accordion-up\": \"accordion-up 0.2s ease-out\",\n },\n },\n },\n plugins: [require(\"tailwindcss-animate\")],\n} satisfies Config;\n", "force": false }, + { + "path": "tsconfig.app.json", + "content": "// File contents excluded from context", + "force": false + }, + { + "path": "tsconfig.json", + "content": "// File contents excluded from context", + "force": false + }, + { + "path": "tsconfig.node.json", + "content": "// File contents excluded from context", + "force": false + }, { "path": "vite.config.ts", "content": "import { defineConfig } from \"vite\";\nimport dyadComponentTagger from \"@dyad-sh/react-vite-component-tagger\";\nimport react from \"@vitejs/plugin-react-swc\";\nimport path from \"path\";\n\nexport default defineConfig(() => ({\n server: {\n host: \"::\",\n port: 8080,\n },\n plugins: [dyadComponentTagger(), react()],\n resolve: {\n alias: {\n \"@\": path.resolve(__dirname, \"./src\"),\n },\n },\n}));\n", diff --git a/e2e-tests/snapshots/engine.spec.ts_send-message-to-engine---anthropic-claude-sonnet-4-1.txt b/e2e-tests/snapshots/engine.spec.ts_send-message-to-engine---anthropic-claude-sonnet-4-1.txt index 8a4426e..29ebc1f 100644 --- a/e2e-tests/snapshots/engine.spec.ts_send-message-to-engine---anthropic-claude-sonnet-4-1.txt +++ b/e2e-tests/snapshots/engine.spec.ts_send-message-to-engine---anthropic-claude-sonnet-4-1.txt @@ -16,14 +16,24 @@ "stream": true, "dyad_options": { "files": [ + { + "path": ".gitignore", + "content": "// File contents excluded from context", + "force": false + }, { "path": "AI_RULES.md", "content": "# Tech Stack\n\n- You are building a React application.\n- Use TypeScript.\n- Use React Router. KEEP the routes in src/App.tsx\n- Always put source code in the src folder.\n- Put pages into src/pages/\n- Put components into src/components/\n- The main page (default page) is src/pages/Index.tsx\n- UPDATE the main page to include the new components. OTHERWISE, the user can NOT see any components!\n- ALWAYS try to use the shadcn/ui library.\n- Tailwind CSS: always use Tailwind CSS for styling components. Utilize Tailwind classes extensively for layout, spacing, colors, and other design aspects.\n\nAvailable packages and libraries:\n\n- The lucide-react package is installed for icons.\n- You ALREADY have ALL the shadcn/ui components and their dependencies installed. So you don't need to install them again.\n- You have ALL the necessary Radix UI components installed.\n- Use prebuilt components from the shadcn/ui library after importing them. Note that these files shouldn't be edited, so make new components if you need to change them.\n", "force": false }, + { + "path": "components.json", + "content": "// File contents excluded from context", + "force": false + }, { "path": "eslint.config.js", - "content": "// Contents omitted for brevity", + "content": "// File contents excluded from context", "force": false }, { @@ -41,6 +51,21 @@ "content": "export default {\n plugins: {\n tailwindcss: {},\n autoprefixer: {},\n },\n};\n", "force": false }, + { + "path": "public/favicon.ico", + "content": "// File contents excluded from context", + "force": false + }, + { + "path": "public/placeholder.svg", + "content": "// File contents excluded from context", + "force": false + }, + { + "path": "public/robots.txt", + "content": "// File contents excluded from context", + "force": false + }, { "path": "README.md", "content": "# Welcome to your Dyad app\n", @@ -63,247 +88,247 @@ }, { "path": "src/components/ui/accordion.tsx", - "content": "// Contents omitted for brevity", + "content": "// File contents excluded from context", "force": false }, { "path": "src/components/ui/alert-dialog.tsx", - "content": "// Contents omitted for brevity", + "content": "// File contents excluded from context", "force": false }, { "path": "src/components/ui/alert.tsx", - "content": "// Contents omitted for brevity", + "content": "// File contents excluded from context", "force": false }, { "path": "src/components/ui/aspect-ratio.tsx", - "content": "// Contents omitted for brevity", + "content": "// File contents excluded from context", "force": false }, { "path": "src/components/ui/avatar.tsx", - "content": "// Contents omitted for brevity", + "content": "// File contents excluded from context", "force": false }, { "path": "src/components/ui/badge.tsx", - "content": "// Contents omitted for brevity", + "content": "// File contents excluded from context", "force": false }, { "path": "src/components/ui/breadcrumb.tsx", - "content": "// Contents omitted for brevity", + "content": "// File contents excluded from context", "force": false }, { "path": "src/components/ui/button.tsx", - "content": "// Contents omitted for brevity", + "content": "// File contents excluded from context", "force": false }, { "path": "src/components/ui/calendar.tsx", - "content": "// Contents omitted for brevity", + "content": "// File contents excluded from context", "force": false }, { "path": "src/components/ui/card.tsx", - "content": "// Contents omitted for brevity", + "content": "// File contents excluded from context", "force": false }, { "path": "src/components/ui/carousel.tsx", - "content": "// Contents omitted for brevity", + "content": "// File contents excluded from context", "force": false }, { "path": "src/components/ui/chart.tsx", - "content": "// Contents omitted for brevity", + "content": "// File contents excluded from context", "force": false }, { "path": "src/components/ui/checkbox.tsx", - "content": "// Contents omitted for brevity", + "content": "// File contents excluded from context", "force": false }, { "path": "src/components/ui/collapsible.tsx", - "content": "// Contents omitted for brevity", + "content": "// File contents excluded from context", "force": false }, { "path": "src/components/ui/command.tsx", - "content": "// Contents omitted for brevity", + "content": "// File contents excluded from context", "force": false }, { "path": "src/components/ui/context-menu.tsx", - "content": "// Contents omitted for brevity", + "content": "// File contents excluded from context", "force": false }, { "path": "src/components/ui/dialog.tsx", - "content": "// Contents omitted for brevity", + "content": "// File contents excluded from context", "force": false }, { "path": "src/components/ui/drawer.tsx", - "content": "// Contents omitted for brevity", + "content": "// File contents excluded from context", "force": false }, { "path": "src/components/ui/dropdown-menu.tsx", - "content": "// Contents omitted for brevity", + "content": "// File contents excluded from context", "force": false }, { "path": "src/components/ui/form.tsx", - "content": "// Contents omitted for brevity", + "content": "// File contents excluded from context", "force": false }, { "path": "src/components/ui/hover-card.tsx", - "content": "// Contents omitted for brevity", + "content": "// File contents excluded from context", "force": false }, { "path": "src/components/ui/input-otp.tsx", - "content": "// Contents omitted for brevity", + "content": "// File contents excluded from context", "force": false }, { "path": "src/components/ui/input.tsx", - "content": "// Contents omitted for brevity", + "content": "// File contents excluded from context", "force": false }, { "path": "src/components/ui/label.tsx", - "content": "// Contents omitted for brevity", + "content": "// File contents excluded from context", "force": false }, { "path": "src/components/ui/menubar.tsx", - "content": "// Contents omitted for brevity", + "content": "// File contents excluded from context", "force": false }, { "path": "src/components/ui/navigation-menu.tsx", - "content": "// Contents omitted for brevity", + "content": "// File contents excluded from context", "force": false }, { "path": "src/components/ui/pagination.tsx", - "content": "// Contents omitted for brevity", + "content": "// File contents excluded from context", "force": false }, { "path": "src/components/ui/popover.tsx", - "content": "// Contents omitted for brevity", + "content": "// File contents excluded from context", "force": false }, { "path": "src/components/ui/progress.tsx", - "content": "// Contents omitted for brevity", + "content": "// File contents excluded from context", "force": false }, { "path": "src/components/ui/radio-group.tsx", - "content": "// Contents omitted for brevity", + "content": "// File contents excluded from context", "force": false }, { "path": "src/components/ui/resizable.tsx", - "content": "// Contents omitted for brevity", + "content": "// File contents excluded from context", "force": false }, { "path": "src/components/ui/scroll-area.tsx", - "content": "// Contents omitted for brevity", + "content": "// File contents excluded from context", "force": false }, { "path": "src/components/ui/select.tsx", - "content": "// Contents omitted for brevity", + "content": "// File contents excluded from context", "force": false }, { "path": "src/components/ui/separator.tsx", - "content": "// Contents omitted for brevity", + "content": "// File contents excluded from context", "force": false }, { "path": "src/components/ui/sheet.tsx", - "content": "// Contents omitted for brevity", + "content": "// File contents excluded from context", "force": false }, { "path": "src/components/ui/sidebar.tsx", - "content": "// Contents omitted for brevity", + "content": "// File contents excluded from context", "force": false }, { "path": "src/components/ui/skeleton.tsx", - "content": "// Contents omitted for brevity", + "content": "// File contents excluded from context", "force": false }, { "path": "src/components/ui/slider.tsx", - "content": "// Contents omitted for brevity", + "content": "// File contents excluded from context", "force": false }, { "path": "src/components/ui/sonner.tsx", - "content": "// Contents omitted for brevity", + "content": "// File contents excluded from context", "force": false }, { "path": "src/components/ui/switch.tsx", - "content": "// Contents omitted for brevity", + "content": "// File contents excluded from context", "force": false }, { "path": "src/components/ui/table.tsx", - "content": "// Contents omitted for brevity", + "content": "// File contents excluded from context", "force": false }, { "path": "src/components/ui/tabs.tsx", - "content": "// Contents omitted for brevity", + "content": "// File contents excluded from context", "force": false }, { "path": "src/components/ui/textarea.tsx", - "content": "// Contents omitted for brevity", + "content": "// File contents excluded from context", "force": false }, { "path": "src/components/ui/toast.tsx", - "content": "// Contents omitted for brevity", + "content": "// File contents excluded from context", "force": false }, { "path": "src/components/ui/toaster.tsx", - "content": "// Contents omitted for brevity", + "content": "// File contents excluded from context", "force": false }, { "path": "src/components/ui/toggle-group.tsx", - "content": "// Contents omitted for brevity", + "content": "// File contents excluded from context", "force": false }, { "path": "src/components/ui/toggle.tsx", - "content": "// Contents omitted for brevity", + "content": "// File contents excluded from context", "force": false }, { "path": "src/components/ui/tooltip.tsx", - "content": "// Contents omitted for brevity", + "content": "// File contents excluded from context", "force": false }, { "path": "src/components/ui/use-toast.ts", - "content": "// Contents omitted for brevity", + "content": "// File contents excluded from context", "force": false }, { @@ -356,6 +381,21 @@ "content": "import type { Config } from \"tailwindcss\";\n\nexport default {\n darkMode: [\"class\"],\n content: [\n \"./pages/**/*.{ts,tsx}\",\n \"./components/**/*.{ts,tsx}\",\n \"./app/**/*.{ts,tsx}\",\n \"./src/**/*.{ts,tsx}\",\n ],\n prefix: \"\",\n theme: {\n container: {\n center: true,\n padding: \"2rem\",\n screens: {\n \"2xl\": \"1400px\",\n },\n },\n extend: {\n colors: {\n border: \"hsl(var(--border))\",\n input: \"hsl(var(--input))\",\n ring: \"hsl(var(--ring))\",\n background: \"hsl(var(--background))\",\n foreground: \"hsl(var(--foreground))\",\n primary: {\n DEFAULT: \"hsl(var(--primary))\",\n foreground: \"hsl(var(--primary-foreground))\",\n },\n secondary: {\n DEFAULT: \"hsl(var(--secondary))\",\n foreground: \"hsl(var(--secondary-foreground))\",\n },\n destructive: {\n DEFAULT: \"hsl(var(--destructive))\",\n foreground: \"hsl(var(--destructive-foreground))\",\n },\n muted: {\n DEFAULT: \"hsl(var(--muted))\",\n foreground: \"hsl(var(--muted-foreground))\",\n },\n accent: {\n DEFAULT: \"hsl(var(--accent))\",\n foreground: \"hsl(var(--accent-foreground))\",\n },\n popover: {\n DEFAULT: \"hsl(var(--popover))\",\n foreground: \"hsl(var(--popover-foreground))\",\n },\n card: {\n DEFAULT: \"hsl(var(--card))\",\n foreground: \"hsl(var(--card-foreground))\",\n },\n sidebar: {\n DEFAULT: \"hsl(var(--sidebar-background))\",\n foreground: \"hsl(var(--sidebar-foreground))\",\n primary: \"hsl(var(--sidebar-primary))\",\n \"primary-foreground\": \"hsl(var(--sidebar-primary-foreground))\",\n accent: \"hsl(var(--sidebar-accent))\",\n \"accent-foreground\": \"hsl(var(--sidebar-accent-foreground))\",\n border: \"hsl(var(--sidebar-border))\",\n ring: \"hsl(var(--sidebar-ring))\",\n },\n },\n borderRadius: {\n lg: \"var(--radius)\",\n md: \"calc(var(--radius) - 2px)\",\n sm: \"calc(var(--radius) - 4px)\",\n },\n keyframes: {\n \"accordion-down\": {\n from: {\n height: \"0\",\n },\n to: {\n height: \"var(--radix-accordion-content-height)\",\n },\n },\n \"accordion-up\": {\n from: {\n height: \"var(--radix-accordion-content-height)\",\n },\n to: {\n height: \"0\",\n },\n },\n },\n animation: {\n \"accordion-down\": \"accordion-down 0.2s ease-out\",\n \"accordion-up\": \"accordion-up 0.2s ease-out\",\n },\n },\n },\n plugins: [require(\"tailwindcss-animate\")],\n} satisfies Config;\n", "force": false }, + { + "path": "tsconfig.app.json", + "content": "// File contents excluded from context", + "force": false + }, + { + "path": "tsconfig.json", + "content": "// File contents excluded from context", + "force": false + }, + { + "path": "tsconfig.node.json", + "content": "// File contents excluded from context", + "force": false + }, { "path": "vite.config.ts", "content": "import { defineConfig } from \"vite\";\nimport dyadComponentTagger from \"@dyad-sh/react-vite-component-tagger\";\nimport react from \"@vitejs/plugin-react-swc\";\nimport path from \"path\";\n\nexport default defineConfig(() => ({\n server: {\n host: \"::\",\n port: 8080,\n },\n plugins: [dyadComponentTagger(), react()],\n resolve: {\n alias: {\n \"@\": path.resolve(__dirname, \"./src\"),\n },\n },\n}));\n", diff --git a/e2e-tests/snapshots/engine.spec.ts_send-message-to-engine---openai-gpt-4-1-1.txt b/e2e-tests/snapshots/engine.spec.ts_send-message-to-engine---openai-gpt-4-1-1.txt index b309c4a..1908608 100644 --- a/e2e-tests/snapshots/engine.spec.ts_send-message-to-engine---openai-gpt-4-1-1.txt +++ b/e2e-tests/snapshots/engine.spec.ts_send-message-to-engine---openai-gpt-4-1-1.txt @@ -16,14 +16,24 @@ "stream": true, "dyad_options": { "files": [ + { + "path": ".gitignore", + "content": "// File contents excluded from context", + "force": false + }, { "path": "AI_RULES.md", "content": "# Tech Stack\n\n- You are building a React application.\n- Use TypeScript.\n- Use React Router. KEEP the routes in src/App.tsx\n- Always put source code in the src folder.\n- Put pages into src/pages/\n- Put components into src/components/\n- The main page (default page) is src/pages/Index.tsx\n- UPDATE the main page to include the new components. OTHERWISE, the user can NOT see any components!\n- ALWAYS try to use the shadcn/ui library.\n- Tailwind CSS: always use Tailwind CSS for styling components. Utilize Tailwind classes extensively for layout, spacing, colors, and other design aspects.\n\nAvailable packages and libraries:\n\n- The lucide-react package is installed for icons.\n- You ALREADY have ALL the shadcn/ui components and their dependencies installed. So you don't need to install them again.\n- You have ALL the necessary Radix UI components installed.\n- Use prebuilt components from the shadcn/ui library after importing them. Note that these files shouldn't be edited, so make new components if you need to change them.\n", "force": false }, + { + "path": "components.json", + "content": "// File contents excluded from context", + "force": false + }, { "path": "eslint.config.js", - "content": "// Contents omitted for brevity", + "content": "// File contents excluded from context", "force": false }, { @@ -41,6 +51,21 @@ "content": "export default {\n plugins: {\n tailwindcss: {},\n autoprefixer: {},\n },\n};\n", "force": false }, + { + "path": "public/favicon.ico", + "content": "// File contents excluded from context", + "force": false + }, + { + "path": "public/placeholder.svg", + "content": "// File contents excluded from context", + "force": false + }, + { + "path": "public/robots.txt", + "content": "// File contents excluded from context", + "force": false + }, { "path": "README.md", "content": "# Welcome to your Dyad app\n", @@ -63,247 +88,247 @@ }, { "path": "src/components/ui/accordion.tsx", - "content": "// Contents omitted for brevity", + "content": "// File contents excluded from context", "force": false }, { "path": "src/components/ui/alert-dialog.tsx", - "content": "// Contents omitted for brevity", + "content": "// File contents excluded from context", "force": false }, { "path": "src/components/ui/alert.tsx", - "content": "// Contents omitted for brevity", + "content": "// File contents excluded from context", "force": false }, { "path": "src/components/ui/aspect-ratio.tsx", - "content": "// Contents omitted for brevity", + "content": "// File contents excluded from context", "force": false }, { "path": "src/components/ui/avatar.tsx", - "content": "// Contents omitted for brevity", + "content": "// File contents excluded from context", "force": false }, { "path": "src/components/ui/badge.tsx", - "content": "// Contents omitted for brevity", + "content": "// File contents excluded from context", "force": false }, { "path": "src/components/ui/breadcrumb.tsx", - "content": "// Contents omitted for brevity", + "content": "// File contents excluded from context", "force": false }, { "path": "src/components/ui/button.tsx", - "content": "// Contents omitted for brevity", + "content": "// File contents excluded from context", "force": false }, { "path": "src/components/ui/calendar.tsx", - "content": "// Contents omitted for brevity", + "content": "// File contents excluded from context", "force": false }, { "path": "src/components/ui/card.tsx", - "content": "// Contents omitted for brevity", + "content": "// File contents excluded from context", "force": false }, { "path": "src/components/ui/carousel.tsx", - "content": "// Contents omitted for brevity", + "content": "// File contents excluded from context", "force": false }, { "path": "src/components/ui/chart.tsx", - "content": "// Contents omitted for brevity", + "content": "// File contents excluded from context", "force": false }, { "path": "src/components/ui/checkbox.tsx", - "content": "// Contents omitted for brevity", + "content": "// File contents excluded from context", "force": false }, { "path": "src/components/ui/collapsible.tsx", - "content": "// Contents omitted for brevity", + "content": "// File contents excluded from context", "force": false }, { "path": "src/components/ui/command.tsx", - "content": "// Contents omitted for brevity", + "content": "// File contents excluded from context", "force": false }, { "path": "src/components/ui/context-menu.tsx", - "content": "// Contents omitted for brevity", + "content": "// File contents excluded from context", "force": false }, { "path": "src/components/ui/dialog.tsx", - "content": "// Contents omitted for brevity", + "content": "// File contents excluded from context", "force": false }, { "path": "src/components/ui/drawer.tsx", - "content": "// Contents omitted for brevity", + "content": "// File contents excluded from context", "force": false }, { "path": "src/components/ui/dropdown-menu.tsx", - "content": "// Contents omitted for brevity", + "content": "// File contents excluded from context", "force": false }, { "path": "src/components/ui/form.tsx", - "content": "// Contents omitted for brevity", + "content": "// File contents excluded from context", "force": false }, { "path": "src/components/ui/hover-card.tsx", - "content": "// Contents omitted for brevity", + "content": "// File contents excluded from context", "force": false }, { "path": "src/components/ui/input-otp.tsx", - "content": "// Contents omitted for brevity", + "content": "// File contents excluded from context", "force": false }, { "path": "src/components/ui/input.tsx", - "content": "// Contents omitted for brevity", + "content": "// File contents excluded from context", "force": false }, { "path": "src/components/ui/label.tsx", - "content": "// Contents omitted for brevity", + "content": "// File contents excluded from context", "force": false }, { "path": "src/components/ui/menubar.tsx", - "content": "// Contents omitted for brevity", + "content": "// File contents excluded from context", "force": false }, { "path": "src/components/ui/navigation-menu.tsx", - "content": "// Contents omitted for brevity", + "content": "// File contents excluded from context", "force": false }, { "path": "src/components/ui/pagination.tsx", - "content": "// Contents omitted for brevity", + "content": "// File contents excluded from context", "force": false }, { "path": "src/components/ui/popover.tsx", - "content": "// Contents omitted for brevity", + "content": "// File contents excluded from context", "force": false }, { "path": "src/components/ui/progress.tsx", - "content": "// Contents omitted for brevity", + "content": "// File contents excluded from context", "force": false }, { "path": "src/components/ui/radio-group.tsx", - "content": "// Contents omitted for brevity", + "content": "// File contents excluded from context", "force": false }, { "path": "src/components/ui/resizable.tsx", - "content": "// Contents omitted for brevity", + "content": "// File contents excluded from context", "force": false }, { "path": "src/components/ui/scroll-area.tsx", - "content": "// Contents omitted for brevity", + "content": "// File contents excluded from context", "force": false }, { "path": "src/components/ui/select.tsx", - "content": "// Contents omitted for brevity", + "content": "// File contents excluded from context", "force": false }, { "path": "src/components/ui/separator.tsx", - "content": "// Contents omitted for brevity", + "content": "// File contents excluded from context", "force": false }, { "path": "src/components/ui/sheet.tsx", - "content": "// Contents omitted for brevity", + "content": "// File contents excluded from context", "force": false }, { "path": "src/components/ui/sidebar.tsx", - "content": "// Contents omitted for brevity", + "content": "// File contents excluded from context", "force": false }, { "path": "src/components/ui/skeleton.tsx", - "content": "// Contents omitted for brevity", + "content": "// File contents excluded from context", "force": false }, { "path": "src/components/ui/slider.tsx", - "content": "// Contents omitted for brevity", + "content": "// File contents excluded from context", "force": false }, { "path": "src/components/ui/sonner.tsx", - "content": "// Contents omitted for brevity", + "content": "// File contents excluded from context", "force": false }, { "path": "src/components/ui/switch.tsx", - "content": "// Contents omitted for brevity", + "content": "// File contents excluded from context", "force": false }, { "path": "src/components/ui/table.tsx", - "content": "// Contents omitted for brevity", + "content": "// File contents excluded from context", "force": false }, { "path": "src/components/ui/tabs.tsx", - "content": "// Contents omitted for brevity", + "content": "// File contents excluded from context", "force": false }, { "path": "src/components/ui/textarea.tsx", - "content": "// Contents omitted for brevity", + "content": "// File contents excluded from context", "force": false }, { "path": "src/components/ui/toast.tsx", - "content": "// Contents omitted for brevity", + "content": "// File contents excluded from context", "force": false }, { "path": "src/components/ui/toaster.tsx", - "content": "// Contents omitted for brevity", + "content": "// File contents excluded from context", "force": false }, { "path": "src/components/ui/toggle-group.tsx", - "content": "// Contents omitted for brevity", + "content": "// File contents excluded from context", "force": false }, { "path": "src/components/ui/toggle.tsx", - "content": "// Contents omitted for brevity", + "content": "// File contents excluded from context", "force": false }, { "path": "src/components/ui/tooltip.tsx", - "content": "// Contents omitted for brevity", + "content": "// File contents excluded from context", "force": false }, { "path": "src/components/ui/use-toast.ts", - "content": "// Contents omitted for brevity", + "content": "// File contents excluded from context", "force": false }, { @@ -356,6 +381,21 @@ "content": "import type { Config } from \"tailwindcss\";\n\nexport default {\n darkMode: [\"class\"],\n content: [\n \"./pages/**/*.{ts,tsx}\",\n \"./components/**/*.{ts,tsx}\",\n \"./app/**/*.{ts,tsx}\",\n \"./src/**/*.{ts,tsx}\",\n ],\n prefix: \"\",\n theme: {\n container: {\n center: true,\n padding: \"2rem\",\n screens: {\n \"2xl\": \"1400px\",\n },\n },\n extend: {\n colors: {\n border: \"hsl(var(--border))\",\n input: \"hsl(var(--input))\",\n ring: \"hsl(var(--ring))\",\n background: \"hsl(var(--background))\",\n foreground: \"hsl(var(--foreground))\",\n primary: {\n DEFAULT: \"hsl(var(--primary))\",\n foreground: \"hsl(var(--primary-foreground))\",\n },\n secondary: {\n DEFAULT: \"hsl(var(--secondary))\",\n foreground: \"hsl(var(--secondary-foreground))\",\n },\n destructive: {\n DEFAULT: \"hsl(var(--destructive))\",\n foreground: \"hsl(var(--destructive-foreground))\",\n },\n muted: {\n DEFAULT: \"hsl(var(--muted))\",\n foreground: \"hsl(var(--muted-foreground))\",\n },\n accent: {\n DEFAULT: \"hsl(var(--accent))\",\n foreground: \"hsl(var(--accent-foreground))\",\n },\n popover: {\n DEFAULT: \"hsl(var(--popover))\",\n foreground: \"hsl(var(--popover-foreground))\",\n },\n card: {\n DEFAULT: \"hsl(var(--card))\",\n foreground: \"hsl(var(--card-foreground))\",\n },\n sidebar: {\n DEFAULT: \"hsl(var(--sidebar-background))\",\n foreground: \"hsl(var(--sidebar-foreground))\",\n primary: \"hsl(var(--sidebar-primary))\",\n \"primary-foreground\": \"hsl(var(--sidebar-primary-foreground))\",\n accent: \"hsl(var(--sidebar-accent))\",\n \"accent-foreground\": \"hsl(var(--sidebar-accent-foreground))\",\n border: \"hsl(var(--sidebar-border))\",\n ring: \"hsl(var(--sidebar-ring))\",\n },\n },\n borderRadius: {\n lg: \"var(--radius)\",\n md: \"calc(var(--radius) - 2px)\",\n sm: \"calc(var(--radius) - 4px)\",\n },\n keyframes: {\n \"accordion-down\": {\n from: {\n height: \"0\",\n },\n to: {\n height: \"var(--radix-accordion-content-height)\",\n },\n },\n \"accordion-up\": {\n from: {\n height: \"var(--radix-accordion-content-height)\",\n },\n to: {\n height: \"0\",\n },\n },\n },\n animation: {\n \"accordion-down\": \"accordion-down 0.2s ease-out\",\n \"accordion-up\": \"accordion-up 0.2s ease-out\",\n },\n },\n },\n plugins: [require(\"tailwindcss-animate\")],\n} satisfies Config;\n", "force": false }, + { + "path": "tsconfig.app.json", + "content": "// File contents excluded from context", + "force": false + }, + { + "path": "tsconfig.json", + "content": "// File contents excluded from context", + "force": false + }, + { + "path": "tsconfig.node.json", + "content": "// File contents excluded from context", + "force": false + }, { "path": "vite.config.ts", "content": "import { defineConfig } from \"vite\";\nimport dyadComponentTagger from \"@dyad-sh/react-vite-component-tagger\";\nimport react from \"@vitejs/plugin-react-swc\";\nimport path from \"path\";\n\nexport default defineConfig(() => ({\n server: {\n host: \"::\",\n port: 8080,\n },\n plugins: [dyadComponentTagger(), react()],\n resolve: {\n alias: {\n \"@\": path.resolve(__dirname, \"./src\"),\n },\n },\n}));\n", diff --git a/e2e-tests/snapshots/engine.spec.ts_send-message-to-engine-1.txt b/e2e-tests/snapshots/engine.spec.ts_send-message-to-engine-1.txt index 45c2062..29eeadd 100644 --- a/e2e-tests/snapshots/engine.spec.ts_send-message-to-engine-1.txt +++ b/e2e-tests/snapshots/engine.spec.ts_send-message-to-engine-1.txt @@ -21,14 +21,24 @@ }, "dyad_options": { "files": [ + { + "path": ".gitignore", + "content": "// File contents excluded from context", + "force": false + }, { "path": "AI_RULES.md", "content": "# Tech Stack\n\n- You are building a React application.\n- Use TypeScript.\n- Use React Router. KEEP the routes in src/App.tsx\n- Always put source code in the src folder.\n- Put pages into src/pages/\n- Put components into src/components/\n- The main page (default page) is src/pages/Index.tsx\n- UPDATE the main page to include the new components. OTHERWISE, the user can NOT see any components!\n- ALWAYS try to use the shadcn/ui library.\n- Tailwind CSS: always use Tailwind CSS for styling components. Utilize Tailwind classes extensively for layout, spacing, colors, and other design aspects.\n\nAvailable packages and libraries:\n\n- The lucide-react package is installed for icons.\n- You ALREADY have ALL the shadcn/ui components and their dependencies installed. So you don't need to install them again.\n- You have ALL the necessary Radix UI components installed.\n- Use prebuilt components from the shadcn/ui library after importing them. Note that these files shouldn't be edited, so make new components if you need to change them.\n", "force": false }, + { + "path": "components.json", + "content": "// File contents excluded from context", + "force": false + }, { "path": "eslint.config.js", - "content": "// Contents omitted for brevity", + "content": "// File contents excluded from context", "force": false }, { @@ -46,6 +56,21 @@ "content": "export default {\n plugins: {\n tailwindcss: {},\n autoprefixer: {},\n },\n};\n", "force": false }, + { + "path": "public/favicon.ico", + "content": "// File contents excluded from context", + "force": false + }, + { + "path": "public/placeholder.svg", + "content": "// File contents excluded from context", + "force": false + }, + { + "path": "public/robots.txt", + "content": "// File contents excluded from context", + "force": false + }, { "path": "README.md", "content": "# Welcome to your Dyad app\n", @@ -68,247 +93,247 @@ }, { "path": "src/components/ui/accordion.tsx", - "content": "// Contents omitted for brevity", + "content": "// File contents excluded from context", "force": false }, { "path": "src/components/ui/alert-dialog.tsx", - "content": "// Contents omitted for brevity", + "content": "// File contents excluded from context", "force": false }, { "path": "src/components/ui/alert.tsx", - "content": "// Contents omitted for brevity", + "content": "// File contents excluded from context", "force": false }, { "path": "src/components/ui/aspect-ratio.tsx", - "content": "// Contents omitted for brevity", + "content": "// File contents excluded from context", "force": false }, { "path": "src/components/ui/avatar.tsx", - "content": "// Contents omitted for brevity", + "content": "// File contents excluded from context", "force": false }, { "path": "src/components/ui/badge.tsx", - "content": "// Contents omitted for brevity", + "content": "// File contents excluded from context", "force": false }, { "path": "src/components/ui/breadcrumb.tsx", - "content": "// Contents omitted for brevity", + "content": "// File contents excluded from context", "force": false }, { "path": "src/components/ui/button.tsx", - "content": "// Contents omitted for brevity", + "content": "// File contents excluded from context", "force": false }, { "path": "src/components/ui/calendar.tsx", - "content": "// Contents omitted for brevity", + "content": "// File contents excluded from context", "force": false }, { "path": "src/components/ui/card.tsx", - "content": "// Contents omitted for brevity", + "content": "// File contents excluded from context", "force": false }, { "path": "src/components/ui/carousel.tsx", - "content": "// Contents omitted for brevity", + "content": "// File contents excluded from context", "force": false }, { "path": "src/components/ui/chart.tsx", - "content": "// Contents omitted for brevity", + "content": "// File contents excluded from context", "force": false }, { "path": "src/components/ui/checkbox.tsx", - "content": "// Contents omitted for brevity", + "content": "// File contents excluded from context", "force": false }, { "path": "src/components/ui/collapsible.tsx", - "content": "// Contents omitted for brevity", + "content": "// File contents excluded from context", "force": false }, { "path": "src/components/ui/command.tsx", - "content": "// Contents omitted for brevity", + "content": "// File contents excluded from context", "force": false }, { "path": "src/components/ui/context-menu.tsx", - "content": "// Contents omitted for brevity", + "content": "// File contents excluded from context", "force": false }, { "path": "src/components/ui/dialog.tsx", - "content": "// Contents omitted for brevity", + "content": "// File contents excluded from context", "force": false }, { "path": "src/components/ui/drawer.tsx", - "content": "// Contents omitted for brevity", + "content": "// File contents excluded from context", "force": false }, { "path": "src/components/ui/dropdown-menu.tsx", - "content": "// Contents omitted for brevity", + "content": "// File contents excluded from context", "force": false }, { "path": "src/components/ui/form.tsx", - "content": "// Contents omitted for brevity", + "content": "// File contents excluded from context", "force": false }, { "path": "src/components/ui/hover-card.tsx", - "content": "// Contents omitted for brevity", + "content": "// File contents excluded from context", "force": false }, { "path": "src/components/ui/input-otp.tsx", - "content": "// Contents omitted for brevity", + "content": "// File contents excluded from context", "force": false }, { "path": "src/components/ui/input.tsx", - "content": "// Contents omitted for brevity", + "content": "// File contents excluded from context", "force": false }, { "path": "src/components/ui/label.tsx", - "content": "// Contents omitted for brevity", + "content": "// File contents excluded from context", "force": false }, { "path": "src/components/ui/menubar.tsx", - "content": "// Contents omitted for brevity", + "content": "// File contents excluded from context", "force": false }, { "path": "src/components/ui/navigation-menu.tsx", - "content": "// Contents omitted for brevity", + "content": "// File contents excluded from context", "force": false }, { "path": "src/components/ui/pagination.tsx", - "content": "// Contents omitted for brevity", + "content": "// File contents excluded from context", "force": false }, { "path": "src/components/ui/popover.tsx", - "content": "// Contents omitted for brevity", + "content": "// File contents excluded from context", "force": false }, { "path": "src/components/ui/progress.tsx", - "content": "// Contents omitted for brevity", + "content": "// File contents excluded from context", "force": false }, { "path": "src/components/ui/radio-group.tsx", - "content": "// Contents omitted for brevity", + "content": "// File contents excluded from context", "force": false }, { "path": "src/components/ui/resizable.tsx", - "content": "// Contents omitted for brevity", + "content": "// File contents excluded from context", "force": false }, { "path": "src/components/ui/scroll-area.tsx", - "content": "// Contents omitted for brevity", + "content": "// File contents excluded from context", "force": false }, { "path": "src/components/ui/select.tsx", - "content": "// Contents omitted for brevity", + "content": "// File contents excluded from context", "force": false }, { "path": "src/components/ui/separator.tsx", - "content": "// Contents omitted for brevity", + "content": "// File contents excluded from context", "force": false }, { "path": "src/components/ui/sheet.tsx", - "content": "// Contents omitted for brevity", + "content": "// File contents excluded from context", "force": false }, { "path": "src/components/ui/sidebar.tsx", - "content": "// Contents omitted for brevity", + "content": "// File contents excluded from context", "force": false }, { "path": "src/components/ui/skeleton.tsx", - "content": "// Contents omitted for brevity", + "content": "// File contents excluded from context", "force": false }, { "path": "src/components/ui/slider.tsx", - "content": "// Contents omitted for brevity", + "content": "// File contents excluded from context", "force": false }, { "path": "src/components/ui/sonner.tsx", - "content": "// Contents omitted for brevity", + "content": "// File contents excluded from context", "force": false }, { "path": "src/components/ui/switch.tsx", - "content": "// Contents omitted for brevity", + "content": "// File contents excluded from context", "force": false }, { "path": "src/components/ui/table.tsx", - "content": "// Contents omitted for brevity", + "content": "// File contents excluded from context", "force": false }, { "path": "src/components/ui/tabs.tsx", - "content": "// Contents omitted for brevity", + "content": "// File contents excluded from context", "force": false }, { "path": "src/components/ui/textarea.tsx", - "content": "// Contents omitted for brevity", + "content": "// File contents excluded from context", "force": false }, { "path": "src/components/ui/toast.tsx", - "content": "// Contents omitted for brevity", + "content": "// File contents excluded from context", "force": false }, { "path": "src/components/ui/toaster.tsx", - "content": "// Contents omitted for brevity", + "content": "// File contents excluded from context", "force": false }, { "path": "src/components/ui/toggle-group.tsx", - "content": "// Contents omitted for brevity", + "content": "// File contents excluded from context", "force": false }, { "path": "src/components/ui/toggle.tsx", - "content": "// Contents omitted for brevity", + "content": "// File contents excluded from context", "force": false }, { "path": "src/components/ui/tooltip.tsx", - "content": "// Contents omitted for brevity", + "content": "// File contents excluded from context", "force": false }, { "path": "src/components/ui/use-toast.ts", - "content": "// Contents omitted for brevity", + "content": "// File contents excluded from context", "force": false }, { @@ -361,6 +386,21 @@ "content": "import type { Config } from \"tailwindcss\";\n\nexport default {\n darkMode: [\"class\"],\n content: [\n \"./pages/**/*.{ts,tsx}\",\n \"./components/**/*.{ts,tsx}\",\n \"./app/**/*.{ts,tsx}\",\n \"./src/**/*.{ts,tsx}\",\n ],\n prefix: \"\",\n theme: {\n container: {\n center: true,\n padding: \"2rem\",\n screens: {\n \"2xl\": \"1400px\",\n },\n },\n extend: {\n colors: {\n border: \"hsl(var(--border))\",\n input: \"hsl(var(--input))\",\n ring: \"hsl(var(--ring))\",\n background: \"hsl(var(--background))\",\n foreground: \"hsl(var(--foreground))\",\n primary: {\n DEFAULT: \"hsl(var(--primary))\",\n foreground: \"hsl(var(--primary-foreground))\",\n },\n secondary: {\n DEFAULT: \"hsl(var(--secondary))\",\n foreground: \"hsl(var(--secondary-foreground))\",\n },\n destructive: {\n DEFAULT: \"hsl(var(--destructive))\",\n foreground: \"hsl(var(--destructive-foreground))\",\n },\n muted: {\n DEFAULT: \"hsl(var(--muted))\",\n foreground: \"hsl(var(--muted-foreground))\",\n },\n accent: {\n DEFAULT: \"hsl(var(--accent))\",\n foreground: \"hsl(var(--accent-foreground))\",\n },\n popover: {\n DEFAULT: \"hsl(var(--popover))\",\n foreground: \"hsl(var(--popover-foreground))\",\n },\n card: {\n DEFAULT: \"hsl(var(--card))\",\n foreground: \"hsl(var(--card-foreground))\",\n },\n sidebar: {\n DEFAULT: \"hsl(var(--sidebar-background))\",\n foreground: \"hsl(var(--sidebar-foreground))\",\n primary: \"hsl(var(--sidebar-primary))\",\n \"primary-foreground\": \"hsl(var(--sidebar-primary-foreground))\",\n accent: \"hsl(var(--sidebar-accent))\",\n \"accent-foreground\": \"hsl(var(--sidebar-accent-foreground))\",\n border: \"hsl(var(--sidebar-border))\",\n ring: \"hsl(var(--sidebar-ring))\",\n },\n },\n borderRadius: {\n lg: \"var(--radius)\",\n md: \"calc(var(--radius) - 2px)\",\n sm: \"calc(var(--radius) - 4px)\",\n },\n keyframes: {\n \"accordion-down\": {\n from: {\n height: \"0\",\n },\n to: {\n height: \"var(--radix-accordion-content-height)\",\n },\n },\n \"accordion-up\": {\n from: {\n height: \"var(--radix-accordion-content-height)\",\n },\n to: {\n height: \"0\",\n },\n },\n },\n animation: {\n \"accordion-down\": \"accordion-down 0.2s ease-out\",\n \"accordion-up\": \"accordion-up 0.2s ease-out\",\n },\n },\n },\n plugins: [require(\"tailwindcss-animate\")],\n} satisfies Config;\n", "force": false }, + { + "path": "tsconfig.app.json", + "content": "// File contents excluded from context", + "force": false + }, + { + "path": "tsconfig.json", + "content": "// File contents excluded from context", + "force": false + }, + { + "path": "tsconfig.node.json", + "content": "// File contents excluded from context", + "force": false + }, { "path": "vite.config.ts", "content": "import { defineConfig } from \"vite\";\nimport dyadComponentTagger from \"@dyad-sh/react-vite-component-tagger\";\nimport react from \"@vitejs/plugin-react-swc\";\nimport path from \"path\";\n\nexport default defineConfig(() => ({\n server: {\n host: \"::\",\n port: 8080,\n },\n plugins: [dyadComponentTagger(), react()],\n resolve: {\n alias: {\n \"@\": path.resolve(__dirname, \"./src\"),\n },\n },\n}));\n", diff --git a/e2e-tests/snapshots/engine.spec.ts_smart-auto-should-send-message-to-engine-1.txt b/e2e-tests/snapshots/engine.spec.ts_smart-auto-should-send-message-to-engine-1.txt index 7b76a11..ab6b403 100644 --- a/e2e-tests/snapshots/engine.spec.ts_smart-auto-should-send-message-to-engine-1.txt +++ b/e2e-tests/snapshots/engine.spec.ts_smart-auto-should-send-message-to-engine-1.txt @@ -21,14 +21,24 @@ }, "dyad_options": { "files": [ + { + "path": ".gitignore", + "content": "// File contents excluded from context", + "force": false + }, { "path": "AI_RULES.md", "content": "# Tech Stack\n\n- You are building a React application.\n- Use TypeScript.\n- Use React Router. KEEP the routes in src/App.tsx\n- Always put source code in the src folder.\n- Put pages into src/pages/\n- Put components into src/components/\n- The main page (default page) is src/pages/Index.tsx\n- UPDATE the main page to include the new components. OTHERWISE, the user can NOT see any components!\n- ALWAYS try to use the shadcn/ui library.\n- Tailwind CSS: always use Tailwind CSS for styling components. Utilize Tailwind classes extensively for layout, spacing, colors, and other design aspects.\n\nAvailable packages and libraries:\n\n- The lucide-react package is installed for icons.\n- You ALREADY have ALL the shadcn/ui components and their dependencies installed. So you don't need to install them again.\n- You have ALL the necessary Radix UI components installed.\n- Use prebuilt components from the shadcn/ui library after importing them. Note that these files shouldn't be edited, so make new components if you need to change them.\n", "force": false }, + { + "path": "components.json", + "content": "// File contents excluded from context", + "force": false + }, { "path": "eslint.config.js", - "content": "// Contents omitted for brevity", + "content": "// File contents excluded from context", "force": false }, { @@ -46,6 +56,21 @@ "content": "export default {\n plugins: {\n tailwindcss: {},\n autoprefixer: {},\n },\n};\n", "force": false }, + { + "path": "public/favicon.ico", + "content": "// File contents excluded from context", + "force": false + }, + { + "path": "public/placeholder.svg", + "content": "// File contents excluded from context", + "force": false + }, + { + "path": "public/robots.txt", + "content": "// File contents excluded from context", + "force": false + }, { "path": "README.md", "content": "# Welcome to your Dyad app\n", @@ -68,247 +93,247 @@ }, { "path": "src/components/ui/accordion.tsx", - "content": "// Contents omitted for brevity", + "content": "// File contents excluded from context", "force": false }, { "path": "src/components/ui/alert-dialog.tsx", - "content": "// Contents omitted for brevity", + "content": "// File contents excluded from context", "force": false }, { "path": "src/components/ui/alert.tsx", - "content": "// Contents omitted for brevity", + "content": "// File contents excluded from context", "force": false }, { "path": "src/components/ui/aspect-ratio.tsx", - "content": "// Contents omitted for brevity", + "content": "// File contents excluded from context", "force": false }, { "path": "src/components/ui/avatar.tsx", - "content": "// Contents omitted for brevity", + "content": "// File contents excluded from context", "force": false }, { "path": "src/components/ui/badge.tsx", - "content": "// Contents omitted for brevity", + "content": "// File contents excluded from context", "force": false }, { "path": "src/components/ui/breadcrumb.tsx", - "content": "// Contents omitted for brevity", + "content": "// File contents excluded from context", "force": false }, { "path": "src/components/ui/button.tsx", - "content": "// Contents omitted for brevity", + "content": "// File contents excluded from context", "force": false }, { "path": "src/components/ui/calendar.tsx", - "content": "// Contents omitted for brevity", + "content": "// File contents excluded from context", "force": false }, { "path": "src/components/ui/card.tsx", - "content": "// Contents omitted for brevity", + "content": "// File contents excluded from context", "force": false }, { "path": "src/components/ui/carousel.tsx", - "content": "// Contents omitted for brevity", + "content": "// File contents excluded from context", "force": false }, { "path": "src/components/ui/chart.tsx", - "content": "// Contents omitted for brevity", + "content": "// File contents excluded from context", "force": false }, { "path": "src/components/ui/checkbox.tsx", - "content": "// Contents omitted for brevity", + "content": "// File contents excluded from context", "force": false }, { "path": "src/components/ui/collapsible.tsx", - "content": "// Contents omitted for brevity", + "content": "// File contents excluded from context", "force": false }, { "path": "src/components/ui/command.tsx", - "content": "// Contents omitted for brevity", + "content": "// File contents excluded from context", "force": false }, { "path": "src/components/ui/context-menu.tsx", - "content": "// Contents omitted for brevity", + "content": "// File contents excluded from context", "force": false }, { "path": "src/components/ui/dialog.tsx", - "content": "// Contents omitted for brevity", + "content": "// File contents excluded from context", "force": false }, { "path": "src/components/ui/drawer.tsx", - "content": "// Contents omitted for brevity", + "content": "// File contents excluded from context", "force": false }, { "path": "src/components/ui/dropdown-menu.tsx", - "content": "// Contents omitted for brevity", + "content": "// File contents excluded from context", "force": false }, { "path": "src/components/ui/form.tsx", - "content": "// Contents omitted for brevity", + "content": "// File contents excluded from context", "force": false }, { "path": "src/components/ui/hover-card.tsx", - "content": "// Contents omitted for brevity", + "content": "// File contents excluded from context", "force": false }, { "path": "src/components/ui/input-otp.tsx", - "content": "// Contents omitted for brevity", + "content": "// File contents excluded from context", "force": false }, { "path": "src/components/ui/input.tsx", - "content": "// Contents omitted for brevity", + "content": "// File contents excluded from context", "force": false }, { "path": "src/components/ui/label.tsx", - "content": "// Contents omitted for brevity", + "content": "// File contents excluded from context", "force": false }, { "path": "src/components/ui/menubar.tsx", - "content": "// Contents omitted for brevity", + "content": "// File contents excluded from context", "force": false }, { "path": "src/components/ui/navigation-menu.tsx", - "content": "// Contents omitted for brevity", + "content": "// File contents excluded from context", "force": false }, { "path": "src/components/ui/pagination.tsx", - "content": "// Contents omitted for brevity", + "content": "// File contents excluded from context", "force": false }, { "path": "src/components/ui/popover.tsx", - "content": "// Contents omitted for brevity", + "content": "// File contents excluded from context", "force": false }, { "path": "src/components/ui/progress.tsx", - "content": "// Contents omitted for brevity", + "content": "// File contents excluded from context", "force": false }, { "path": "src/components/ui/radio-group.tsx", - "content": "// Contents omitted for brevity", + "content": "// File contents excluded from context", "force": false }, { "path": "src/components/ui/resizable.tsx", - "content": "// Contents omitted for brevity", + "content": "// File contents excluded from context", "force": false }, { "path": "src/components/ui/scroll-area.tsx", - "content": "// Contents omitted for brevity", + "content": "// File contents excluded from context", "force": false }, { "path": "src/components/ui/select.tsx", - "content": "// Contents omitted for brevity", + "content": "// File contents excluded from context", "force": false }, { "path": "src/components/ui/separator.tsx", - "content": "// Contents omitted for brevity", + "content": "// File contents excluded from context", "force": false }, { "path": "src/components/ui/sheet.tsx", - "content": "// Contents omitted for brevity", + "content": "// File contents excluded from context", "force": false }, { "path": "src/components/ui/sidebar.tsx", - "content": "// Contents omitted for brevity", + "content": "// File contents excluded from context", "force": false }, { "path": "src/components/ui/skeleton.tsx", - "content": "// Contents omitted for brevity", + "content": "// File contents excluded from context", "force": false }, { "path": "src/components/ui/slider.tsx", - "content": "// Contents omitted for brevity", + "content": "// File contents excluded from context", "force": false }, { "path": "src/components/ui/sonner.tsx", - "content": "// Contents omitted for brevity", + "content": "// File contents excluded from context", "force": false }, { "path": "src/components/ui/switch.tsx", - "content": "// Contents omitted for brevity", + "content": "// File contents excluded from context", "force": false }, { "path": "src/components/ui/table.tsx", - "content": "// Contents omitted for brevity", + "content": "// File contents excluded from context", "force": false }, { "path": "src/components/ui/tabs.tsx", - "content": "// Contents omitted for brevity", + "content": "// File contents excluded from context", "force": false }, { "path": "src/components/ui/textarea.tsx", - "content": "// Contents omitted for brevity", + "content": "// File contents excluded from context", "force": false }, { "path": "src/components/ui/toast.tsx", - "content": "// Contents omitted for brevity", + "content": "// File contents excluded from context", "force": false }, { "path": "src/components/ui/toaster.tsx", - "content": "// Contents omitted for brevity", + "content": "// File contents excluded from context", "force": false }, { "path": "src/components/ui/toggle-group.tsx", - "content": "// Contents omitted for brevity", + "content": "// File contents excluded from context", "force": false }, { "path": "src/components/ui/toggle.tsx", - "content": "// Contents omitted for brevity", + "content": "// File contents excluded from context", "force": false }, { "path": "src/components/ui/tooltip.tsx", - "content": "// Contents omitted for brevity", + "content": "// File contents excluded from context", "force": false }, { "path": "src/components/ui/use-toast.ts", - "content": "// Contents omitted for brevity", + "content": "// File contents excluded from context", "force": false }, { @@ -361,6 +386,21 @@ "content": "import type { Config } from \"tailwindcss\";\n\nexport default {\n darkMode: [\"class\"],\n content: [\n \"./pages/**/*.{ts,tsx}\",\n \"./components/**/*.{ts,tsx}\",\n \"./app/**/*.{ts,tsx}\",\n \"./src/**/*.{ts,tsx}\",\n ],\n prefix: \"\",\n theme: {\n container: {\n center: true,\n padding: \"2rem\",\n screens: {\n \"2xl\": \"1400px\",\n },\n },\n extend: {\n colors: {\n border: \"hsl(var(--border))\",\n input: \"hsl(var(--input))\",\n ring: \"hsl(var(--ring))\",\n background: \"hsl(var(--background))\",\n foreground: \"hsl(var(--foreground))\",\n primary: {\n DEFAULT: \"hsl(var(--primary))\",\n foreground: \"hsl(var(--primary-foreground))\",\n },\n secondary: {\n DEFAULT: \"hsl(var(--secondary))\",\n foreground: \"hsl(var(--secondary-foreground))\",\n },\n destructive: {\n DEFAULT: \"hsl(var(--destructive))\",\n foreground: \"hsl(var(--destructive-foreground))\",\n },\n muted: {\n DEFAULT: \"hsl(var(--muted))\",\n foreground: \"hsl(var(--muted-foreground))\",\n },\n accent: {\n DEFAULT: \"hsl(var(--accent))\",\n foreground: \"hsl(var(--accent-foreground))\",\n },\n popover: {\n DEFAULT: \"hsl(var(--popover))\",\n foreground: \"hsl(var(--popover-foreground))\",\n },\n card: {\n DEFAULT: \"hsl(var(--card))\",\n foreground: \"hsl(var(--card-foreground))\",\n },\n sidebar: {\n DEFAULT: \"hsl(var(--sidebar-background))\",\n foreground: \"hsl(var(--sidebar-foreground))\",\n primary: \"hsl(var(--sidebar-primary))\",\n \"primary-foreground\": \"hsl(var(--sidebar-primary-foreground))\",\n accent: \"hsl(var(--sidebar-accent))\",\n \"accent-foreground\": \"hsl(var(--sidebar-accent-foreground))\",\n border: \"hsl(var(--sidebar-border))\",\n ring: \"hsl(var(--sidebar-ring))\",\n },\n },\n borderRadius: {\n lg: \"var(--radius)\",\n md: \"calc(var(--radius) - 2px)\",\n sm: \"calc(var(--radius) - 4px)\",\n },\n keyframes: {\n \"accordion-down\": {\n from: {\n height: \"0\",\n },\n to: {\n height: \"var(--radix-accordion-content-height)\",\n },\n },\n \"accordion-up\": {\n from: {\n height: \"var(--radix-accordion-content-height)\",\n },\n to: {\n height: \"0\",\n },\n },\n },\n animation: {\n \"accordion-down\": \"accordion-down 0.2s ease-out\",\n \"accordion-up\": \"accordion-up 0.2s ease-out\",\n },\n },\n },\n plugins: [require(\"tailwindcss-animate\")],\n} satisfies Config;\n", "force": false }, + { + "path": "tsconfig.app.json", + "content": "// File contents excluded from context", + "force": false + }, + { + "path": "tsconfig.json", + "content": "// File contents excluded from context", + "force": false + }, + { + "path": "tsconfig.node.json", + "content": "// File contents excluded from context", + "force": false + }, { "path": "vite.config.ts", "content": "import { defineConfig } from \"vite\";\nimport dyadComponentTagger from \"@dyad-sh/react-vite-component-tagger\";\nimport react from \"@vitejs/plugin-react-swc\";\nimport path from \"path\";\n\nexport default defineConfig(() => ({\n server: {\n host: \"::\",\n port: 8080,\n },\n plugins: [dyadComponentTagger(), react()],\n resolve: {\n alias: {\n \"@\": path.resolve(__dirname, \"./src\"),\n },\n },\n}));\n", diff --git a/e2e-tests/snapshots/gateway.spec.ts_claude-4-sonnet-1.txt b/e2e-tests/snapshots/gateway.spec.ts_claude-4-sonnet-1.txt index 37fd4b7..5efac6f 100644 --- a/e2e-tests/snapshots/gateway.spec.ts_claude-4-sonnet-1.txt +++ b/e2e-tests/snapshots/gateway.spec.ts_claude-4-sonnet-1.txt @@ -10,7 +10,7 @@ }, { "role": "user", - "content": "This is my codebase. \n# Tech Stack\n\n- You are building a React application.\n- Use TypeScript.\n- Use React Router. KEEP the routes in src/App.tsx\n- Always put source code in the src folder.\n- Put pages into src/pages/\n- Put components into src/components/\n- The main page (default page) is src/pages/Index.tsx\n- UPDATE the main page to include the new components. OTHERWISE, the user can NOT see any components!\n- ALWAYS try to use the shadcn/ui library.\n- Tailwind CSS: always use Tailwind CSS for styling components. Utilize Tailwind classes extensively for layout, spacing, colors, and other design aspects.\n\nAvailable packages and libraries:\n\n- The lucide-react package is installed for icons.\n- You ALREADY have ALL the shadcn/ui components and their dependencies installed. So you don't need to install them again.\n- You have ALL the necessary Radix UI components installed.\n- Use prebuilt components from the shadcn/ui library after importing them. Note that these files shouldn't be edited, so make new components if you need to change them.\n\n\n\n\n// Contents omitted for brevity\n\n\n\n\n\n \n \n \n dyad-generated-app\n \n\n \n
\n \n \n\n\n
\n\n\n{\n \"dependencies\": {\n \"@hookform/resolvers\": \"^3.9.0\",\n \"@radix-ui/react-accordion\": \"^1.2.0\",\n \"@radix-ui/react-alert-dialog\": \"^1.1.1\",\n \"@radix-ui/react-aspect-ratio\": \"^1.1.0\",\n \"@radix-ui/react-avatar\": \"^1.1.0\",\n \"@radix-ui/react-checkbox\": \"^1.1.1\",\n \"@radix-ui/react-collapsible\": \"^1.1.0\",\n \"@radix-ui/react-context-menu\": \"^2.2.1\",\n \"@radix-ui/react-dialog\": \"^1.1.2\",\n \"@radix-ui/react-dropdown-menu\": \"^2.1.1\",\n \"@radix-ui/react-hover-card\": \"^1.1.1\",\n \"@radix-ui/react-label\": \"^2.1.0\",\n \"@radix-ui/react-menubar\": \"^1.1.1\",\n \"@radix-ui/react-navigation-menu\": \"^1.2.0\",\n \"@radix-ui/react-popover\": \"^1.1.1\",\n \"@radix-ui/react-progress\": \"^1.1.0\",\n \"@radix-ui/react-radio-group\": \"^1.2.0\",\n \"@radix-ui/react-scroll-area\": \"^1.1.0\",\n \"@radix-ui/react-select\": \"^2.1.1\",\n \"@radix-ui/react-separator\": \"^1.1.0\",\n \"@radix-ui/react-slider\": \"^1.2.0\",\n \"@radix-ui/react-slot\": \"^1.1.0\",\n \"@radix-ui/react-switch\": \"^1.1.0\",\n \"@radix-ui/react-tabs\": \"^1.1.0\",\n \"@radix-ui/react-toast\": \"^1.2.1\",\n \"@radix-ui/react-toggle\": \"^1.1.0\",\n \"@radix-ui/react-toggle-group\": \"^1.1.0\",\n \"@radix-ui/react-tooltip\": \"^1.1.4\",\n \"@tanstack/react-query\": \"^5.56.2\",\n \"class-variance-authority\": \"^0.7.1\",\n \"clsx\": \"^2.1.1\",\n \"cmdk\": \"^1.0.0\",\n \"date-fns\": \"^3.6.0\",\n \"embla-carousel-react\": \"^8.3.0\",\n \"input-otp\": \"^1.2.4\",\n \"lucide-react\": \"^0.462.0\",\n \"next-themes\": \"^0.3.0\",\n \"react\": \"^18.3.1\",\n \"react-day-picker\": \"^8.10.1\",\n \"react-dom\": \"^18.3.1\",\n \"react-hook-form\": \"^7.53.0\",\n \"react-resizable-panels\": \"^2.1.3\",\n \"react-router-dom\": \"^6.26.2\",\n \"recharts\": \"^2.12.7\",\n \"sonner\": \"^1.5.0\",\n \"tailwind-merge\": \"^2.5.2\",\n \"tailwindcss-animate\": \"^1.0.7\",\n \"vaul\": \"^0.9.3\",\n \"zod\": \"^3.23.8\"\n },\n \"devDependencies\": {\n \"@dyad-sh/react-vite-component-tagger\": \"^0.8.0\",\n \"@eslint/js\": \"^9.9.0\",\n \"@tailwindcss/typography\": \"^0.5.15\",\n \"@types/node\": \"^22.5.5\",\n \"@types/react\": \"^18.3.3\",\n \"@types/react-dom\": \"^18.3.0\",\n \"@vitejs/plugin-react-swc\": \"^3.9.0\",\n \"autoprefixer\": \"^10.4.20\",\n \"eslint\": \"^9.9.0\",\n \"eslint-plugin-react-hooks\": \"^5.1.0-rc.0\",\n \"eslint-plugin-react-refresh\": \"^0.4.9\",\n \"globals\": \"^15.9.0\",\n \"postcss\": \"^8.4.47\",\n \"tailwindcss\": \"^3.4.11\",\n \"typescript\": \"^5.5.3\",\n \"typescript-eslint\": \"^8.0.1\",\n \"vite\": \"^6.3.4\"\n }\n}\n\n\n\nexport default {\n plugins: {\n tailwindcss: {},\n autoprefixer: {},\n },\n};\n\n\n\n\n# Welcome to your Dyad app\n\n\n\n\n#root {\n max-width: 1280px;\n margin: 0 auto;\n padding: 2rem;\n text-align: center;\n}\n\n.logo {\n height: 6em;\n padding: 1.5em;\n will-change: filter;\n transition: filter 300ms;\n}\n.logo:hover {\n filter: drop-shadow(0 0 2em #646cffaa);\n}\n.logo.react:hover {\n filter: drop-shadow(0 0 2em #61dafbaa);\n}\n\n@keyframes logo-spin {\n from {\n transform: rotate(0deg);\n }\n to {\n transform: rotate(360deg);\n }\n}\n\n@media (prefers-reduced-motion: no-preference) {\n a:nth-of-type(2) .logo {\n animation: logo-spin infinite 20s linear;\n }\n}\n\n.card {\n padding: 2em;\n}\n\n.read-the-docs {\n color: #888;\n}\n\n\n\n\nimport { Toaster } from \"@/components/ui/toaster\";\nimport { Toaster as Sonner } from \"@/components/ui/sonner\";\nimport { TooltipProvider } from \"@/components/ui/tooltip\";\nimport { QueryClient, QueryClientProvider } from \"@tanstack/react-query\";\nimport { BrowserRouter, Routes, Route } from \"react-router-dom\";\nimport Index from \"./pages/Index\";\nimport NotFound from \"./pages/NotFound\";\n\nconst queryClient = new QueryClient();\n\nconst App = () => (\n \n \n \n \n \n \n } />\n {/* ADD ALL CUSTOM ROUTES ABOVE THE CATCH-ALL \"*\" ROUTE */}\n } />\n \n \n \n \n);\n\nexport default App;\n\n\n\n\nexport const MadeWithDyad = () => {\n return (\n
\n \n Made with Dyad\n \n
\n );\n};\n\n
\n\n\n// Contents omitted for brevity\n\n\n\n// Contents omitted for brevity\n\n\n\n// Contents omitted for brevity\n\n\n\n// Contents omitted for brevity\n\n\n\n// Contents omitted for brevity\n\n\n\n// Contents omitted for brevity\n\n\n\n// Contents omitted for brevity\n\n\n\n// Contents omitted for brevity\n\n\n\n// Contents omitted for brevity\n\n\n\n// Contents omitted for brevity\n\n\n\n// Contents omitted for brevity\n\n\n\n// Contents omitted for brevity\n\n\n\n// Contents omitted for brevity\n\n\n\n// Contents omitted for brevity\n\n\n\n// Contents omitted for brevity\n\n\n\n// Contents omitted for brevity\n\n\n\n// Contents omitted for brevity\n\n\n\n// Contents omitted for brevity\n\n\n\n// Contents omitted for brevity\n\n\n\n// Contents omitted for brevity\n\n\n\n// Contents omitted for brevity\n\n\n\n// Contents omitted for brevity\n\n\n\n// Contents omitted for brevity\n\n\n\n// Contents omitted for brevity\n\n\n\n// Contents omitted for brevity\n\n\n\n// Contents omitted for brevity\n\n\n\n// Contents omitted for brevity\n\n\n\n// Contents omitted for brevity\n\n\n\n// Contents omitted for brevity\n\n\n\n// Contents omitted for brevity\n\n\n\n// Contents omitted for brevity\n\n\n\n// Contents omitted for brevity\n\n\n\n// Contents omitted for brevity\n\n\n\n// Contents omitted for brevity\n\n\n\n// Contents omitted for brevity\n\n\n\n// Contents omitted for brevity\n\n\n\n// Contents omitted for brevity\n\n\n\n// Contents omitted for brevity\n\n\n\n// Contents omitted for brevity\n\n\n\n// Contents omitted for brevity\n\n\n\n// Contents omitted for brevity\n\n\n\n// Contents omitted for brevity\n\n\n\n// Contents omitted for brevity\n\n\n\n// Contents omitted for brevity\n\n\n\n// Contents omitted for brevity\n\n\n\n// Contents omitted for brevity\n\n\n\n// Contents omitted for brevity\n\n\n\n// Contents omitted for brevity\n\n\n\n// Contents omitted for brevity\n\n\n\n@tailwind base;\n@tailwind components;\n@tailwind utilities;\n\n@layer base {\n :root {\n --background: 0 0% 100%;\n --foreground: 222.2 84% 4.9%;\n\n --card: 0 0% 100%;\n --card-foreground: 222.2 84% 4.9%;\n\n --popover: 0 0% 100%;\n --popover-foreground: 222.2 84% 4.9%;\n\n --primary: 222.2 47.4% 11.2%;\n --primary-foreground: 210 40% 98%;\n\n --secondary: 210 40% 96.1%;\n --secondary-foreground: 222.2 47.4% 11.2%;\n\n --muted: 210 40% 96.1%;\n --muted-foreground: 215.4 16.3% 46.9%;\n\n --accent: 210 40% 96.1%;\n --accent-foreground: 222.2 47.4% 11.2%;\n\n --destructive: 0 84.2% 60.2%;\n --destructive-foreground: 210 40% 98%;\n\n --border: 214.3 31.8% 91.4%;\n --input: 214.3 31.8% 91.4%;\n --ring: 222.2 84% 4.9%;\n\n --radius: 0.5rem;\n\n --sidebar-background: 0 0% 98%;\n\n --sidebar-foreground: 240 5.3% 26.1%;\n\n --sidebar-primary: 240 5.9% 10%;\n\n --sidebar-primary-foreground: 0 0% 98%;\n\n --sidebar-accent: 240 4.8% 95.9%;\n\n --sidebar-accent-foreground: 240 5.9% 10%;\n\n --sidebar-border: 220 13% 91%;\n\n --sidebar-ring: 217.2 91.2% 59.8%;\n }\n\n .dark {\n --background: 222.2 84% 4.9%;\n --foreground: 210 40% 98%;\n\n --card: 222.2 84% 4.9%;\n --card-foreground: 210 40% 98%;\n\n --popover: 222.2 84% 4.9%;\n --popover-foreground: 210 40% 98%;\n\n --primary: 210 40% 98%;\n --primary-foreground: 222.2 47.4% 11.2%;\n\n --secondary: 217.2 32.6% 17.5%;\n --secondary-foreground: 210 40% 98%;\n\n --muted: 217.2 32.6% 17.5%;\n --muted-foreground: 215 20.2% 65.1%;\n\n --accent: 217.2 32.6% 17.5%;\n --accent-foreground: 210 40% 98%;\n\n --destructive: 0 62.8% 30.6%;\n --destructive-foreground: 210 40% 98%;\n\n --border: 217.2 32.6% 17.5%;\n --input: 217.2 32.6% 17.5%;\n --ring: 212.7 26.8% 83.9%;\n --sidebar-background: 240 5.9% 10%;\n --sidebar-foreground: 240 4.8% 95.9%;\n --sidebar-primary: 224.3 76.3% 48%;\n --sidebar-primary-foreground: 0 0% 100%;\n --sidebar-accent: 240 3.7% 15.9%;\n --sidebar-accent-foreground: 240 4.8% 95.9%;\n --sidebar-border: 240 3.7% 15.9%;\n --sidebar-ring: 217.2 91.2% 59.8%;\n }\n}\n\n@layer base {\n * {\n @apply border-border;\n }\n\n body {\n @apply bg-background text-foreground;\n }\n}\n\n\n\n\nimport * as React from \"react\";\n\nconst MOBILE_BREAKPOINT = 768;\n\nexport function useIsMobile() {\n const [isMobile, setIsMobile] = React.useState(\n undefined,\n );\n\n React.useEffect(() => {\n const mql = window.matchMedia(`(max-width: ${MOBILE_BREAKPOINT - 1}px)`);\n const onChange = () => {\n setIsMobile(window.innerWidth < MOBILE_BREAKPOINT);\n };\n mql.addEventListener(\"change\", onChange);\n setIsMobile(window.innerWidth < MOBILE_BREAKPOINT);\n return () => mql.removeEventListener(\"change\", onChange);\n }, []);\n\n return !!isMobile;\n}\n\n\n\n\nimport * as React from \"react\";\n\nimport type { ToastActionElement, ToastProps } from \"@/components/ui/toast\";\n\nconst TOAST_LIMIT = 1;\nconst TOAST_REMOVE_DELAY = 1000000;\n\ntype ToasterToast = ToastProps & {\n id: string;\n title?: React.ReactNode;\n description?: React.ReactNode;\n action?: ToastActionElement;\n};\n\nconst _actionTypes = {\n ADD_TOAST: \"ADD_TOAST\",\n UPDATE_TOAST: \"UPDATE_TOAST\",\n DISMISS_TOAST: \"DISMISS_TOAST\",\n REMOVE_TOAST: \"REMOVE_TOAST\",\n} as const;\n\nlet count = 0;\n\nfunction genId() {\n count = (count + 1) % Number.MAX_SAFE_INTEGER;\n return count.toString();\n}\n\ntype ActionType = typeof _actionTypes;\n\ntype Action =\n | {\n type: ActionType[\"ADD_TOAST\"];\n toast: ToasterToast;\n }\n | {\n type: ActionType[\"UPDATE_TOAST\"];\n toast: Partial;\n }\n | {\n type: ActionType[\"DISMISS_TOAST\"];\n toastId?: ToasterToast[\"id\"];\n }\n | {\n type: ActionType[\"REMOVE_TOAST\"];\n toastId?: ToasterToast[\"id\"];\n };\n\ninterface State {\n toasts: ToasterToast[];\n}\n\nconst toastTimeouts = new Map>();\n\nconst addToRemoveQueue = (toastId: string) => {\n if (toastTimeouts.has(toastId)) {\n return;\n }\n\n const timeout = setTimeout(() => {\n toastTimeouts.delete(toastId);\n dispatch({\n type: \"REMOVE_TOAST\",\n toastId: toastId,\n });\n }, TOAST_REMOVE_DELAY);\n\n toastTimeouts.set(toastId, timeout);\n};\n\nexport const reducer = (state: State, action: Action): State => {\n switch (action.type) {\n case \"ADD_TOAST\":\n return {\n ...state,\n toasts: [action.toast, ...state.toasts].slice(0, TOAST_LIMIT),\n };\n\n case \"UPDATE_TOAST\":\n return {\n ...state,\n toasts: state.toasts.map((t) =>\n t.id === action.toast.id ? { ...t, ...action.toast } : t,\n ),\n };\n\n case \"DISMISS_TOAST\": {\n const { toastId } = action;\n\n // ! Side effects ! - This could be extracted into a dismissToast() action,\n // but I'll keep it here for simplicity\n if (toastId) {\n addToRemoveQueue(toastId);\n } else {\n state.toasts.forEach((toast) => {\n addToRemoveQueue(toast.id);\n });\n }\n\n return {\n ...state,\n toasts: state.toasts.map((t) =>\n t.id === toastId || toastId === undefined\n ? {\n ...t,\n open: false,\n }\n : t,\n ),\n };\n }\n case \"REMOVE_TOAST\":\n if (action.toastId === undefined) {\n return {\n ...state,\n toasts: [],\n };\n }\n return {\n ...state,\n toasts: state.toasts.filter((t) => t.id !== action.toastId),\n };\n }\n};\n\nconst listeners: Array<(state: State) => void> = [];\n\nlet memoryState: State = { toasts: [] };\n\nfunction dispatch(action: Action) {\n memoryState = reducer(memoryState, action);\n listeners.forEach((listener) => {\n listener(memoryState);\n });\n}\n\ntype Toast = Omit;\n\nfunction toast({ ...props }: Toast) {\n const id = genId();\n\n const update = (props: ToasterToast) =>\n dispatch({\n type: \"UPDATE_TOAST\",\n toast: { ...props, id },\n });\n const dismiss = () => dispatch({ type: \"DISMISS_TOAST\", toastId: id });\n\n dispatch({\n type: \"ADD_TOAST\",\n toast: {\n ...props,\n id,\n open: true,\n onOpenChange: (open) => {\n if (!open) dismiss();\n },\n },\n });\n\n return {\n id: id,\n dismiss,\n update,\n };\n}\n\nfunction useToast() {\n const [state, setState] = React.useState(memoryState);\n\n React.useEffect(() => {\n listeners.push(setState);\n return () => {\n const index = listeners.indexOf(setState);\n if (index > -1) {\n listeners.splice(index, 1);\n }\n };\n }, [state]);\n\n return {\n ...state,\n toast,\n dismiss: (toastId?: string) => dispatch({ type: \"DISMISS_TOAST\", toastId }),\n };\n}\n\nexport { useToast, toast };\n\n\n\n\nimport { clsx, type ClassValue } from \"clsx\";\nimport { twMerge } from \"tailwind-merge\";\n\nexport function cn(...inputs: ClassValue[]) {\n return twMerge(clsx(inputs));\n}\n\n\n\n\nimport { createRoot } from \"react-dom/client\";\nimport App from \"./App.tsx\";\nimport \"./globals.css\";\n\ncreateRoot(document.getElementById(\"root\")!).render();\n\n\n\n\n// Update this page (the content is just a fallback if you fail to update the page)\n\nimport { MadeWithDyad } from \"@/components/made-with-dyad\";\n\nconst Index = () => {\n return (\n
\n
\n

Welcome to Your Blank App

\n

\n Start building your amazing project here!\n

\n
\n \n
\n );\n};\n\nexport default Index;\n\n
\n\n\nimport { useLocation } from \"react-router-dom\";\nimport { useEffect } from \"react\";\n\nconst NotFound = () => {\n const location = useLocation();\n\n useEffect(() => {\n console.error(\n \"404 Error: User attempted to access non-existent route:\",\n location.pathname,\n );\n }, [location.pathname]);\n\n return (\n
\n
\n

404

\n

Oops! Page not found

\n \n Return to Home\n \n
\n
\n );\n};\n\nexport default NotFound;\n\n
\n\n\nimport { toast } from \"sonner\";\n\nexport const showSuccess = (message: string) => {\n toast.success(message);\n};\n\nexport const showError = (message: string) => {\n toast.error(message);\n};\n\nexport const showLoading = (message: string) => {\n return toast.loading(message);\n};\n\nexport const dismissToast = (toastId: string) => {\n toast.dismiss(toastId);\n};\n\n\n\n\n/// \n\n\n\n\nimport type { Config } from \"tailwindcss\";\n\nexport default {\n darkMode: [\"class\"],\n content: [\n \"./pages/**/*.{ts,tsx}\",\n \"./components/**/*.{ts,tsx}\",\n \"./app/**/*.{ts,tsx}\",\n \"./src/**/*.{ts,tsx}\",\n ],\n prefix: \"\",\n theme: {\n container: {\n center: true,\n padding: \"2rem\",\n screens: {\n \"2xl\": \"1400px\",\n },\n },\n extend: {\n colors: {\n border: \"hsl(var(--border))\",\n input: \"hsl(var(--input))\",\n ring: \"hsl(var(--ring))\",\n background: \"hsl(var(--background))\",\n foreground: \"hsl(var(--foreground))\",\n primary: {\n DEFAULT: \"hsl(var(--primary))\",\n foreground: \"hsl(var(--primary-foreground))\",\n },\n secondary: {\n DEFAULT: \"hsl(var(--secondary))\",\n foreground: \"hsl(var(--secondary-foreground))\",\n },\n destructive: {\n DEFAULT: \"hsl(var(--destructive))\",\n foreground: \"hsl(var(--destructive-foreground))\",\n },\n muted: {\n DEFAULT: \"hsl(var(--muted))\",\n foreground: \"hsl(var(--muted-foreground))\",\n },\n accent: {\n DEFAULT: \"hsl(var(--accent))\",\n foreground: \"hsl(var(--accent-foreground))\",\n },\n popover: {\n DEFAULT: \"hsl(var(--popover))\",\n foreground: \"hsl(var(--popover-foreground))\",\n },\n card: {\n DEFAULT: \"hsl(var(--card))\",\n foreground: \"hsl(var(--card-foreground))\",\n },\n sidebar: {\n DEFAULT: \"hsl(var(--sidebar-background))\",\n foreground: \"hsl(var(--sidebar-foreground))\",\n primary: \"hsl(var(--sidebar-primary))\",\n \"primary-foreground\": \"hsl(var(--sidebar-primary-foreground))\",\n accent: \"hsl(var(--sidebar-accent))\",\n \"accent-foreground\": \"hsl(var(--sidebar-accent-foreground))\",\n border: \"hsl(var(--sidebar-border))\",\n ring: \"hsl(var(--sidebar-ring))\",\n },\n },\n borderRadius: {\n lg: \"var(--radius)\",\n md: \"calc(var(--radius) - 2px)\",\n sm: \"calc(var(--radius) - 4px)\",\n },\n keyframes: {\n \"accordion-down\": {\n from: {\n height: \"0\",\n },\n to: {\n height: \"var(--radix-accordion-content-height)\",\n },\n },\n \"accordion-up\": {\n from: {\n height: \"var(--radix-accordion-content-height)\",\n },\n to: {\n height: \"0\",\n },\n },\n },\n animation: {\n \"accordion-down\": \"accordion-down 0.2s ease-out\",\n \"accordion-up\": \"accordion-up 0.2s ease-out\",\n },\n },\n },\n plugins: [require(\"tailwindcss-animate\")],\n} satisfies Config;\n\n\n\n\nimport { defineConfig } from \"vite\";\nimport dyadComponentTagger from \"@dyad-sh/react-vite-component-tagger\";\nimport react from \"@vitejs/plugin-react-swc\";\nimport path from \"path\";\n\nexport default defineConfig(() => ({\n server: {\n host: \"::\",\n port: 8080,\n },\n plugins: [dyadComponentTagger(), react()],\n resolve: {\n alias: {\n \"@\": path.resolve(__dirname, \"./src\"),\n },\n },\n}));\n\n\n\n" + "content": "This is my codebase. \n// File contents excluded from context\n\n\n\n# Tech Stack\n\n- You are building a React application.\n- Use TypeScript.\n- Use React Router. KEEP the routes in src/App.tsx\n- Always put source code in the src folder.\n- Put pages into src/pages/\n- Put components into src/components/\n- The main page (default page) is src/pages/Index.tsx\n- UPDATE the main page to include the new components. OTHERWISE, the user can NOT see any components!\n- ALWAYS try to use the shadcn/ui library.\n- Tailwind CSS: always use Tailwind CSS for styling components. Utilize Tailwind classes extensively for layout, spacing, colors, and other design aspects.\n\nAvailable packages and libraries:\n\n- The lucide-react package is installed for icons.\n- You ALREADY have ALL the shadcn/ui components and their dependencies installed. So you don't need to install them again.\n- You have ALL the necessary Radix UI components installed.\n- Use prebuilt components from the shadcn/ui library after importing them. Note that these files shouldn't be edited, so make new components if you need to change them.\n\n\n\n\n// File contents excluded from context\n\n\n\n// File contents excluded from context\n\n\n\n\n\n \n \n \n dyad-generated-app\n \n\n \n
\n \n \n\n\n
\n\n\n{\n \"dependencies\": {\n \"@hookform/resolvers\": \"^3.9.0\",\n \"@radix-ui/react-accordion\": \"^1.2.0\",\n \"@radix-ui/react-alert-dialog\": \"^1.1.1\",\n \"@radix-ui/react-aspect-ratio\": \"^1.1.0\",\n \"@radix-ui/react-avatar\": \"^1.1.0\",\n \"@radix-ui/react-checkbox\": \"^1.1.1\",\n \"@radix-ui/react-collapsible\": \"^1.1.0\",\n \"@radix-ui/react-context-menu\": \"^2.2.1\",\n \"@radix-ui/react-dialog\": \"^1.1.2\",\n \"@radix-ui/react-dropdown-menu\": \"^2.1.1\",\n \"@radix-ui/react-hover-card\": \"^1.1.1\",\n \"@radix-ui/react-label\": \"^2.1.0\",\n \"@radix-ui/react-menubar\": \"^1.1.1\",\n \"@radix-ui/react-navigation-menu\": \"^1.2.0\",\n \"@radix-ui/react-popover\": \"^1.1.1\",\n \"@radix-ui/react-progress\": \"^1.1.0\",\n \"@radix-ui/react-radio-group\": \"^1.2.0\",\n \"@radix-ui/react-scroll-area\": \"^1.1.0\",\n \"@radix-ui/react-select\": \"^2.1.1\",\n \"@radix-ui/react-separator\": \"^1.1.0\",\n \"@radix-ui/react-slider\": \"^1.2.0\",\n \"@radix-ui/react-slot\": \"^1.1.0\",\n \"@radix-ui/react-switch\": \"^1.1.0\",\n \"@radix-ui/react-tabs\": \"^1.1.0\",\n \"@radix-ui/react-toast\": \"^1.2.1\",\n \"@radix-ui/react-toggle\": \"^1.1.0\",\n \"@radix-ui/react-toggle-group\": \"^1.1.0\",\n \"@radix-ui/react-tooltip\": \"^1.1.4\",\n \"@tanstack/react-query\": \"^5.56.2\",\n \"class-variance-authority\": \"^0.7.1\",\n \"clsx\": \"^2.1.1\",\n \"cmdk\": \"^1.0.0\",\n \"date-fns\": \"^3.6.0\",\n \"embla-carousel-react\": \"^8.3.0\",\n \"input-otp\": \"^1.2.4\",\n \"lucide-react\": \"^0.462.0\",\n \"next-themes\": \"^0.3.0\",\n \"react\": \"^18.3.1\",\n \"react-day-picker\": \"^8.10.1\",\n \"react-dom\": \"^18.3.1\",\n \"react-hook-form\": \"^7.53.0\",\n \"react-resizable-panels\": \"^2.1.3\",\n \"react-router-dom\": \"^6.26.2\",\n \"recharts\": \"^2.12.7\",\n \"sonner\": \"^1.5.0\",\n \"tailwind-merge\": \"^2.5.2\",\n \"tailwindcss-animate\": \"^1.0.7\",\n \"vaul\": \"^0.9.3\",\n \"zod\": \"^3.23.8\"\n },\n \"devDependencies\": {\n \"@dyad-sh/react-vite-component-tagger\": \"^0.8.0\",\n \"@eslint/js\": \"^9.9.0\",\n \"@tailwindcss/typography\": \"^0.5.15\",\n \"@types/node\": \"^22.5.5\",\n \"@types/react\": \"^18.3.3\",\n \"@types/react-dom\": \"^18.3.0\",\n \"@vitejs/plugin-react-swc\": \"^3.9.0\",\n \"autoprefixer\": \"^10.4.20\",\n \"eslint\": \"^9.9.0\",\n \"eslint-plugin-react-hooks\": \"^5.1.0-rc.0\",\n \"eslint-plugin-react-refresh\": \"^0.4.9\",\n \"globals\": \"^15.9.0\",\n \"postcss\": \"^8.4.47\",\n \"tailwindcss\": \"^3.4.11\",\n \"typescript\": \"^5.5.3\",\n \"typescript-eslint\": \"^8.0.1\",\n \"vite\": \"^6.3.4\"\n }\n}\n\n\n\nexport default {\n plugins: {\n tailwindcss: {},\n autoprefixer: {},\n },\n};\n\n\n\n\n// File contents excluded from context\n\n\n\n// File contents excluded from context\n\n\n\n// File contents excluded from context\n\n\n\n# Welcome to your Dyad app\n\n\n\n\n#root {\n max-width: 1280px;\n margin: 0 auto;\n padding: 2rem;\n text-align: center;\n}\n\n.logo {\n height: 6em;\n padding: 1.5em;\n will-change: filter;\n transition: filter 300ms;\n}\n.logo:hover {\n filter: drop-shadow(0 0 2em #646cffaa);\n}\n.logo.react:hover {\n filter: drop-shadow(0 0 2em #61dafbaa);\n}\n\n@keyframes logo-spin {\n from {\n transform: rotate(0deg);\n }\n to {\n transform: rotate(360deg);\n }\n}\n\n@media (prefers-reduced-motion: no-preference) {\n a:nth-of-type(2) .logo {\n animation: logo-spin infinite 20s linear;\n }\n}\n\n.card {\n padding: 2em;\n}\n\n.read-the-docs {\n color: #888;\n}\n\n\n\n\nimport { Toaster } from \"@/components/ui/toaster\";\nimport { Toaster as Sonner } from \"@/components/ui/sonner\";\nimport { TooltipProvider } from \"@/components/ui/tooltip\";\nimport { QueryClient, QueryClientProvider } from \"@tanstack/react-query\";\nimport { BrowserRouter, Routes, Route } from \"react-router-dom\";\nimport Index from \"./pages/Index\";\nimport NotFound from \"./pages/NotFound\";\n\nconst queryClient = new QueryClient();\n\nconst App = () => (\n \n \n \n \n \n \n } />\n {/* ADD ALL CUSTOM ROUTES ABOVE THE CATCH-ALL \"*\" ROUTE */}\n } />\n \n \n \n \n);\n\nexport default App;\n\n\n\n\nexport const MadeWithDyad = () => {\n return (\n
\n \n Made with Dyad\n \n
\n );\n};\n\n
\n\n\n// File contents excluded from context\n\n\n\n// File contents excluded from context\n\n\n\n// File contents excluded from context\n\n\n\n// File contents excluded from context\n\n\n\n// File contents excluded from context\n\n\n\n// File contents excluded from context\n\n\n\n// File contents excluded from context\n\n\n\n// File contents excluded from context\n\n\n\n// File contents excluded from context\n\n\n\n// File contents excluded from context\n\n\n\n// File contents excluded from context\n\n\n\n// File contents excluded from context\n\n\n\n// File contents excluded from context\n\n\n\n// File contents excluded from context\n\n\n\n// File contents excluded from context\n\n\n\n// File contents excluded from context\n\n\n\n// File contents excluded from context\n\n\n\n// File contents excluded from context\n\n\n\n// File contents excluded from context\n\n\n\n// File contents excluded from context\n\n\n\n// File contents excluded from context\n\n\n\n// File contents excluded from context\n\n\n\n// File contents excluded from context\n\n\n\n// File contents excluded from context\n\n\n\n// File contents excluded from context\n\n\n\n// File contents excluded from context\n\n\n\n// File contents excluded from context\n\n\n\n// File contents excluded from context\n\n\n\n// File contents excluded from context\n\n\n\n// File contents excluded from context\n\n\n\n// File contents excluded from context\n\n\n\n// File contents excluded from context\n\n\n\n// File contents excluded from context\n\n\n\n// File contents excluded from context\n\n\n\n// File contents excluded from context\n\n\n\n// File contents excluded from context\n\n\n\n// File contents excluded from context\n\n\n\n// File contents excluded from context\n\n\n\n// File contents excluded from context\n\n\n\n// File contents excluded from context\n\n\n\n// File contents excluded from context\n\n\n\n// File contents excluded from context\n\n\n\n// File contents excluded from context\n\n\n\n// File contents excluded from context\n\n\n\n// File contents excluded from context\n\n\n\n// File contents excluded from context\n\n\n\n// File contents excluded from context\n\n\n\n// File contents excluded from context\n\n\n\n// File contents excluded from context\n\n\n\n@tailwind base;\n@tailwind components;\n@tailwind utilities;\n\n@layer base {\n :root {\n --background: 0 0% 100%;\n --foreground: 222.2 84% 4.9%;\n\n --card: 0 0% 100%;\n --card-foreground: 222.2 84% 4.9%;\n\n --popover: 0 0% 100%;\n --popover-foreground: 222.2 84% 4.9%;\n\n --primary: 222.2 47.4% 11.2%;\n --primary-foreground: 210 40% 98%;\n\n --secondary: 210 40% 96.1%;\n --secondary-foreground: 222.2 47.4% 11.2%;\n\n --muted: 210 40% 96.1%;\n --muted-foreground: 215.4 16.3% 46.9%;\n\n --accent: 210 40% 96.1%;\n --accent-foreground: 222.2 47.4% 11.2%;\n\n --destructive: 0 84.2% 60.2%;\n --destructive-foreground: 210 40% 98%;\n\n --border: 214.3 31.8% 91.4%;\n --input: 214.3 31.8% 91.4%;\n --ring: 222.2 84% 4.9%;\n\n --radius: 0.5rem;\n\n --sidebar-background: 0 0% 98%;\n\n --sidebar-foreground: 240 5.3% 26.1%;\n\n --sidebar-primary: 240 5.9% 10%;\n\n --sidebar-primary-foreground: 0 0% 98%;\n\n --sidebar-accent: 240 4.8% 95.9%;\n\n --sidebar-accent-foreground: 240 5.9% 10%;\n\n --sidebar-border: 220 13% 91%;\n\n --sidebar-ring: 217.2 91.2% 59.8%;\n }\n\n .dark {\n --background: 222.2 84% 4.9%;\n --foreground: 210 40% 98%;\n\n --card: 222.2 84% 4.9%;\n --card-foreground: 210 40% 98%;\n\n --popover: 222.2 84% 4.9%;\n --popover-foreground: 210 40% 98%;\n\n --primary: 210 40% 98%;\n --primary-foreground: 222.2 47.4% 11.2%;\n\n --secondary: 217.2 32.6% 17.5%;\n --secondary-foreground: 210 40% 98%;\n\n --muted: 217.2 32.6% 17.5%;\n --muted-foreground: 215 20.2% 65.1%;\n\n --accent: 217.2 32.6% 17.5%;\n --accent-foreground: 210 40% 98%;\n\n --destructive: 0 62.8% 30.6%;\n --destructive-foreground: 210 40% 98%;\n\n --border: 217.2 32.6% 17.5%;\n --input: 217.2 32.6% 17.5%;\n --ring: 212.7 26.8% 83.9%;\n --sidebar-background: 240 5.9% 10%;\n --sidebar-foreground: 240 4.8% 95.9%;\n --sidebar-primary: 224.3 76.3% 48%;\n --sidebar-primary-foreground: 0 0% 100%;\n --sidebar-accent: 240 3.7% 15.9%;\n --sidebar-accent-foreground: 240 4.8% 95.9%;\n --sidebar-border: 240 3.7% 15.9%;\n --sidebar-ring: 217.2 91.2% 59.8%;\n }\n}\n\n@layer base {\n * {\n @apply border-border;\n }\n\n body {\n @apply bg-background text-foreground;\n }\n}\n\n\n\n\nimport * as React from \"react\";\n\nconst MOBILE_BREAKPOINT = 768;\n\nexport function useIsMobile() {\n const [isMobile, setIsMobile] = React.useState(\n undefined,\n );\n\n React.useEffect(() => {\n const mql = window.matchMedia(`(max-width: ${MOBILE_BREAKPOINT - 1}px)`);\n const onChange = () => {\n setIsMobile(window.innerWidth < MOBILE_BREAKPOINT);\n };\n mql.addEventListener(\"change\", onChange);\n setIsMobile(window.innerWidth < MOBILE_BREAKPOINT);\n return () => mql.removeEventListener(\"change\", onChange);\n }, []);\n\n return !!isMobile;\n}\n\n\n\n\nimport * as React from \"react\";\n\nimport type { ToastActionElement, ToastProps } from \"@/components/ui/toast\";\n\nconst TOAST_LIMIT = 1;\nconst TOAST_REMOVE_DELAY = 1000000;\n\ntype ToasterToast = ToastProps & {\n id: string;\n title?: React.ReactNode;\n description?: React.ReactNode;\n action?: ToastActionElement;\n};\n\nconst _actionTypes = {\n ADD_TOAST: \"ADD_TOAST\",\n UPDATE_TOAST: \"UPDATE_TOAST\",\n DISMISS_TOAST: \"DISMISS_TOAST\",\n REMOVE_TOAST: \"REMOVE_TOAST\",\n} as const;\n\nlet count = 0;\n\nfunction genId() {\n count = (count + 1) % Number.MAX_SAFE_INTEGER;\n return count.toString();\n}\n\ntype ActionType = typeof _actionTypes;\n\ntype Action =\n | {\n type: ActionType[\"ADD_TOAST\"];\n toast: ToasterToast;\n }\n | {\n type: ActionType[\"UPDATE_TOAST\"];\n toast: Partial;\n }\n | {\n type: ActionType[\"DISMISS_TOAST\"];\n toastId?: ToasterToast[\"id\"];\n }\n | {\n type: ActionType[\"REMOVE_TOAST\"];\n toastId?: ToasterToast[\"id\"];\n };\n\ninterface State {\n toasts: ToasterToast[];\n}\n\nconst toastTimeouts = new Map>();\n\nconst addToRemoveQueue = (toastId: string) => {\n if (toastTimeouts.has(toastId)) {\n return;\n }\n\n const timeout = setTimeout(() => {\n toastTimeouts.delete(toastId);\n dispatch({\n type: \"REMOVE_TOAST\",\n toastId: toastId,\n });\n }, TOAST_REMOVE_DELAY);\n\n toastTimeouts.set(toastId, timeout);\n};\n\nexport const reducer = (state: State, action: Action): State => {\n switch (action.type) {\n case \"ADD_TOAST\":\n return {\n ...state,\n toasts: [action.toast, ...state.toasts].slice(0, TOAST_LIMIT),\n };\n\n case \"UPDATE_TOAST\":\n return {\n ...state,\n toasts: state.toasts.map((t) =>\n t.id === action.toast.id ? { ...t, ...action.toast } : t,\n ),\n };\n\n case \"DISMISS_TOAST\": {\n const { toastId } = action;\n\n // ! Side effects ! - This could be extracted into a dismissToast() action,\n // but I'll keep it here for simplicity\n if (toastId) {\n addToRemoveQueue(toastId);\n } else {\n state.toasts.forEach((toast) => {\n addToRemoveQueue(toast.id);\n });\n }\n\n return {\n ...state,\n toasts: state.toasts.map((t) =>\n t.id === toastId || toastId === undefined\n ? {\n ...t,\n open: false,\n }\n : t,\n ),\n };\n }\n case \"REMOVE_TOAST\":\n if (action.toastId === undefined) {\n return {\n ...state,\n toasts: [],\n };\n }\n return {\n ...state,\n toasts: state.toasts.filter((t) => t.id !== action.toastId),\n };\n }\n};\n\nconst listeners: Array<(state: State) => void> = [];\n\nlet memoryState: State = { toasts: [] };\n\nfunction dispatch(action: Action) {\n memoryState = reducer(memoryState, action);\n listeners.forEach((listener) => {\n listener(memoryState);\n });\n}\n\ntype Toast = Omit;\n\nfunction toast({ ...props }: Toast) {\n const id = genId();\n\n const update = (props: ToasterToast) =>\n dispatch({\n type: \"UPDATE_TOAST\",\n toast: { ...props, id },\n });\n const dismiss = () => dispatch({ type: \"DISMISS_TOAST\", toastId: id });\n\n dispatch({\n type: \"ADD_TOAST\",\n toast: {\n ...props,\n id,\n open: true,\n onOpenChange: (open) => {\n if (!open) dismiss();\n },\n },\n });\n\n return {\n id: id,\n dismiss,\n update,\n };\n}\n\nfunction useToast() {\n const [state, setState] = React.useState(memoryState);\n\n React.useEffect(() => {\n listeners.push(setState);\n return () => {\n const index = listeners.indexOf(setState);\n if (index > -1) {\n listeners.splice(index, 1);\n }\n };\n }, [state]);\n\n return {\n ...state,\n toast,\n dismiss: (toastId?: string) => dispatch({ type: \"DISMISS_TOAST\", toastId }),\n };\n}\n\nexport { useToast, toast };\n\n\n\n\nimport { clsx, type ClassValue } from \"clsx\";\nimport { twMerge } from \"tailwind-merge\";\n\nexport function cn(...inputs: ClassValue[]) {\n return twMerge(clsx(inputs));\n}\n\n\n\n\nimport { createRoot } from \"react-dom/client\";\nimport App from \"./App.tsx\";\nimport \"./globals.css\";\n\ncreateRoot(document.getElementById(\"root\")!).render();\n\n\n\n\n// Update this page (the content is just a fallback if you fail to update the page)\n\nimport { MadeWithDyad } from \"@/components/made-with-dyad\";\n\nconst Index = () => {\n return (\n
\n
\n

Welcome to Your Blank App

\n

\n Start building your amazing project here!\n

\n
\n \n
\n );\n};\n\nexport default Index;\n\n
\n\n\nimport { useLocation } from \"react-router-dom\";\nimport { useEffect } from \"react\";\n\nconst NotFound = () => {\n const location = useLocation();\n\n useEffect(() => {\n console.error(\n \"404 Error: User attempted to access non-existent route:\",\n location.pathname,\n );\n }, [location.pathname]);\n\n return (\n
\n
\n

404

\n

Oops! Page not found

\n \n Return to Home\n \n
\n
\n );\n};\n\nexport default NotFound;\n\n
\n\n\nimport { toast } from \"sonner\";\n\nexport const showSuccess = (message: string) => {\n toast.success(message);\n};\n\nexport const showError = (message: string) => {\n toast.error(message);\n};\n\nexport const showLoading = (message: string) => {\n return toast.loading(message);\n};\n\nexport const dismissToast = (toastId: string) => {\n toast.dismiss(toastId);\n};\n\n\n\n\n/// \n\n\n\n\nimport type { Config } from \"tailwindcss\";\n\nexport default {\n darkMode: [\"class\"],\n content: [\n \"./pages/**/*.{ts,tsx}\",\n \"./components/**/*.{ts,tsx}\",\n \"./app/**/*.{ts,tsx}\",\n \"./src/**/*.{ts,tsx}\",\n ],\n prefix: \"\",\n theme: {\n container: {\n center: true,\n padding: \"2rem\",\n screens: {\n \"2xl\": \"1400px\",\n },\n },\n extend: {\n colors: {\n border: \"hsl(var(--border))\",\n input: \"hsl(var(--input))\",\n ring: \"hsl(var(--ring))\",\n background: \"hsl(var(--background))\",\n foreground: \"hsl(var(--foreground))\",\n primary: {\n DEFAULT: \"hsl(var(--primary))\",\n foreground: \"hsl(var(--primary-foreground))\",\n },\n secondary: {\n DEFAULT: \"hsl(var(--secondary))\",\n foreground: \"hsl(var(--secondary-foreground))\",\n },\n destructive: {\n DEFAULT: \"hsl(var(--destructive))\",\n foreground: \"hsl(var(--destructive-foreground))\",\n },\n muted: {\n DEFAULT: \"hsl(var(--muted))\",\n foreground: \"hsl(var(--muted-foreground))\",\n },\n accent: {\n DEFAULT: \"hsl(var(--accent))\",\n foreground: \"hsl(var(--accent-foreground))\",\n },\n popover: {\n DEFAULT: \"hsl(var(--popover))\",\n foreground: \"hsl(var(--popover-foreground))\",\n },\n card: {\n DEFAULT: \"hsl(var(--card))\",\n foreground: \"hsl(var(--card-foreground))\",\n },\n sidebar: {\n DEFAULT: \"hsl(var(--sidebar-background))\",\n foreground: \"hsl(var(--sidebar-foreground))\",\n primary: \"hsl(var(--sidebar-primary))\",\n \"primary-foreground\": \"hsl(var(--sidebar-primary-foreground))\",\n accent: \"hsl(var(--sidebar-accent))\",\n \"accent-foreground\": \"hsl(var(--sidebar-accent-foreground))\",\n border: \"hsl(var(--sidebar-border))\",\n ring: \"hsl(var(--sidebar-ring))\",\n },\n },\n borderRadius: {\n lg: \"var(--radius)\",\n md: \"calc(var(--radius) - 2px)\",\n sm: \"calc(var(--radius) - 4px)\",\n },\n keyframes: {\n \"accordion-down\": {\n from: {\n height: \"0\",\n },\n to: {\n height: \"var(--radix-accordion-content-height)\",\n },\n },\n \"accordion-up\": {\n from: {\n height: \"var(--radix-accordion-content-height)\",\n },\n to: {\n height: \"0\",\n },\n },\n },\n animation: {\n \"accordion-down\": \"accordion-down 0.2s ease-out\",\n \"accordion-up\": \"accordion-up 0.2s ease-out\",\n },\n },\n },\n plugins: [require(\"tailwindcss-animate\")],\n} satisfies Config;\n\n\n\n\n// File contents excluded from context\n\n\n\n// File contents excluded from context\n\n\n\n// File contents excluded from context\n\n\n\nimport { defineConfig } from \"vite\";\nimport dyadComponentTagger from \"@dyad-sh/react-vite-component-tagger\";\nimport react from \"@vitejs/plugin-react-swc\";\nimport path from \"path\";\n\nexport default defineConfig(() => ({\n server: {\n host: \"::\",\n port: 8080,\n },\n plugins: [dyadComponentTagger(), react()],\n resolve: {\n alias: {\n \"@\": path.resolve(__dirname, \"./src\"),\n },\n },\n}));\n\n\n\n" }, { "role": "assistant", diff --git a/e2e-tests/snapshots/import.spec.ts_import-app-with-AI-rules-1.txt b/e2e-tests/snapshots/import.spec.ts_import-app-with-AI-rules-1.txt index 2b4097d..014d7ef 100644 --- a/e2e-tests/snapshots/import.spec.ts_import-app-with-AI-rules-1.txt +++ b/e2e-tests/snapshots/import.spec.ts_import-app-with-AI-rules-1.txt @@ -321,7 +321,11 @@ You need to first add Supabase to your app and then we can add auth. === role: user -message: This is my codebase. +message: This is my codebase. +// File contents excluded from context + + + [[beginning of AI_RULES.md]] There's already AI rules... [[end of AI_RULES.md]] @@ -365,6 +369,18 @@ createRoot(document.getElementById("root")!).render(); + +// File contents excluded from context + + + +// File contents excluded from context + + + +// File contents excluded from context + + import { defineConfig } from "vite"; import react from "@vitejs/plugin-react-swc"; diff --git a/e2e-tests/snapshots/partial_response.spec.ts_partial-message-is-resumed-1.txt b/e2e-tests/snapshots/partial_response.spec.ts_partial-message-is-resumed-1.txt index bff2eaa..308f119 100644 --- a/e2e-tests/snapshots/partial_response.spec.ts_partial-message-is-resumed-1.txt +++ b/e2e-tests/snapshots/partial_response.spec.ts_partial-message-is-resumed-1.txt @@ -335,7 +335,15 @@ You need to first add Supabase to your app and then we can add auth. === role: user -message: This is my codebase. +message: This is my codebase. +// File contents excluded from context + + + +// File contents excluded from context + + + @@ -372,6 +380,18 @@ createRoot(document.getElementById("root")!).render(); + +// File contents excluded from context + + + +// File contents excluded from context + + + +// File contents excluded from context + + import { defineConfig } from "vite"; import react from "@vitejs/plugin-react-swc"; diff --git a/e2e-tests/snapshots/problems.spec.ts_problems-auto-fix---complex-delete-rename-write-1.txt b/e2e-tests/snapshots/problems.spec.ts_problems-auto-fix---complex-delete-rename-write-1.txt index c1ae0ad..bf32035 100644 --- a/e2e-tests/snapshots/problems.spec.ts_problems-auto-fix---complex-delete-rename-write-1.txt +++ b/e2e-tests/snapshots/problems.spec.ts_problems-auto-fix---complex-delete-rename-write-1.txt @@ -321,7 +321,11 @@ You need to first add Supabase to your app and then we can add auth. === role: user -message: This is my codebase. +message: This is my codebase. +// File contents excluded from context + + + [[beginning of AI_RULES.md]] There's already AI rules... [[end of AI_RULES.md]] @@ -354,6 +358,18 @@ finalMainTsxFileWithError(); + +// File contents excluded from context + + + +// File contents excluded from context + + + +// File contents excluded from context + + import { defineConfig } from "vite"; import react from "@vitejs/plugin-react-swc"; diff --git a/e2e-tests/snapshots/problems.spec.ts_problems-auto-fix---complex-delete-rename-write-2.txt b/e2e-tests/snapshots/problems.spec.ts_problems-auto-fix---complex-delete-rename-write-2.txt index 4b49bed..8e9bb3a 100644 --- a/e2e-tests/snapshots/problems.spec.ts_problems-auto-fix---complex-delete-rename-write-2.txt +++ b/e2e-tests/snapshots/problems.spec.ts_problems-auto-fix---complex-delete-rename-write-2.txt @@ -321,7 +321,11 @@ You need to first add Supabase to your app and then we can add auth. === role: user -message: This is my codebase. +message: This is my codebase. +// File contents excluded from context + + + [[beginning of AI_RULES.md]] There's already AI rules... [[end of AI_RULES.md]] @@ -363,6 +367,18 @@ finalMainTsxFileWithError(); + +// File contents excluded from context + + + +// File contents excluded from context + + + +// File contents excluded from context + + import { defineConfig } from "vite"; import react from "@vitejs/plugin-react-swc"; diff --git a/e2e-tests/snapshots/problems.spec.ts_problems-auto-fix---enabled-1.txt b/e2e-tests/snapshots/problems.spec.ts_problems-auto-fix---enabled-1.txt index bb2e840..e88b551 100644 --- a/e2e-tests/snapshots/problems.spec.ts_problems-auto-fix---enabled-1.txt +++ b/e2e-tests/snapshots/problems.spec.ts_problems-auto-fix---enabled-1.txt @@ -321,7 +321,11 @@ You need to first add Supabase to your app and then we can add auth. === role: user -message: This is my codebase. +message: This is my codebase. +// File contents excluded from context + + + [[beginning of AI_RULES.md]] There's already AI rules... [[end of AI_RULES.md]] @@ -372,6 +376,18 @@ createRoot(document.getElementById("root")!).render(); + +// File contents excluded from context + + + +// File contents excluded from context + + + +// File contents excluded from context + + import { defineConfig } from "vite"; import react from "@vitejs/plugin-react-swc"; diff --git a/e2e-tests/snapshots/problems.spec.ts_problems-auto-fix---enabled-2.txt b/e2e-tests/snapshots/problems.spec.ts_problems-auto-fix---enabled-2.txt index a36cd4f..0c6fccd 100644 --- a/e2e-tests/snapshots/problems.spec.ts_problems-auto-fix---enabled-2.txt +++ b/e2e-tests/snapshots/problems.spec.ts_problems-auto-fix---enabled-2.txt @@ -321,7 +321,11 @@ You need to first add Supabase to your app and then we can add auth. === role: user -message: This is my codebase. +message: This is my codebase. +// File contents excluded from context + + + [[beginning of AI_RULES.md]] There's already AI rules... [[end of AI_RULES.md]] @@ -374,6 +378,18 @@ createRoot(document.getElementById("root")!).render(); + +// File contents excluded from context + + + +// File contents excluded from context + + + +// File contents excluded from context + + import { defineConfig } from "vite"; import react from "@vitejs/plugin-react-swc"; diff --git a/e2e-tests/snapshots/problems.spec.ts_problems-auto-fix---gives-up-after-2-attempts-1.txt b/e2e-tests/snapshots/problems.spec.ts_problems-auto-fix---gives-up-after-2-attempts-1.txt index 9f15646..a49529d 100644 --- a/e2e-tests/snapshots/problems.spec.ts_problems-auto-fix---gives-up-after-2-attempts-1.txt +++ b/e2e-tests/snapshots/problems.spec.ts_problems-auto-fix---gives-up-after-2-attempts-1.txt @@ -321,7 +321,11 @@ You need to first add Supabase to your app and then we can add auth. === role: user -message: This is my codebase. +message: This is my codebase. +// File contents excluded from context + + + [[beginning of AI_RULES.md]] There's already AI rules... [[end of AI_RULES.md]] @@ -373,6 +377,18 @@ createRoot(document.getElementById("root")!).render(); + +// File contents excluded from context + + + +// File contents excluded from context + + + +// File contents excluded from context + + import { defineConfig } from "vite"; import react from "@vitejs/plugin-react-swc"; diff --git a/e2e-tests/snapshots/problems.spec.ts_problems-auto-fix---gives-up-after-2-attempts-2.txt b/e2e-tests/snapshots/problems.spec.ts_problems-auto-fix---gives-up-after-2-attempts-2.txt index 2f06817..045edfc 100644 --- a/e2e-tests/snapshots/problems.spec.ts_problems-auto-fix---gives-up-after-2-attempts-2.txt +++ b/e2e-tests/snapshots/problems.spec.ts_problems-auto-fix---gives-up-after-2-attempts-2.txt @@ -321,7 +321,11 @@ You need to first add Supabase to your app and then we can add auth. === role: user -message: This is my codebase. +message: This is my codebase. +// File contents excluded from context + + + [[beginning of AI_RULES.md]] There's already AI rules... [[end of AI_RULES.md]] @@ -329,7 +333,7 @@ There's already AI rules... -A file (2) +// File contents excluded from context @@ -377,6 +381,18 @@ createRoot(document.getElementById("root")!).render(); + +// File contents excluded from context + + + +// File contents excluded from context + + + +// File contents excluded from context + + import { defineConfig } from "vite"; import react from "@vitejs/plugin-react-swc"; diff --git a/e2e-tests/snapshots/thinking_budget.spec.ts_thinking-budget-2.txt b/e2e-tests/snapshots/thinking_budget.spec.ts_thinking-budget-2.txt index 1b01573..bc609c2 100644 --- a/e2e-tests/snapshots/thinking_budget.spec.ts_thinking-budget-2.txt +++ b/e2e-tests/snapshots/thinking_budget.spec.ts_thinking-budget-2.txt @@ -29,14 +29,24 @@ }, "dyad_options": { "files": [ + { + "path": ".gitignore", + "content": "// File contents excluded from context", + "force": false + }, { "path": "AI_RULES.md", "content": "# Tech Stack\n\n- You are building a React application.\n- Use TypeScript.\n- Use React Router. KEEP the routes in src/App.tsx\n- Always put source code in the src folder.\n- Put pages into src/pages/\n- Put components into src/components/\n- The main page (default page) is src/pages/Index.tsx\n- UPDATE the main page to include the new components. OTHERWISE, the user can NOT see any components!\n- ALWAYS try to use the shadcn/ui library.\n- Tailwind CSS: always use Tailwind CSS for styling components. Utilize Tailwind classes extensively for layout, spacing, colors, and other design aspects.\n\nAvailable packages and libraries:\n\n- The lucide-react package is installed for icons.\n- You ALREADY have ALL the shadcn/ui components and their dependencies installed. So you don't need to install them again.\n- You have ALL the necessary Radix UI components installed.\n- Use prebuilt components from the shadcn/ui library after importing them. Note that these files shouldn't be edited, so make new components if you need to change them.\n", "force": false }, + { + "path": "components.json", + "content": "// File contents excluded from context", + "force": false + }, { "path": "eslint.config.js", - "content": "// Contents omitted for brevity", + "content": "// File contents excluded from context", "force": false }, { @@ -54,6 +64,21 @@ "content": "export default {\n plugins: {\n tailwindcss: {},\n autoprefixer: {},\n },\n};\n", "force": false }, + { + "path": "public/favicon.ico", + "content": "// File contents excluded from context", + "force": false + }, + { + "path": "public/placeholder.svg", + "content": "// File contents excluded from context", + "force": false + }, + { + "path": "public/robots.txt", + "content": "// File contents excluded from context", + "force": false + }, { "path": "README.md", "content": "# Welcome to your Dyad app\n", @@ -76,247 +101,247 @@ }, { "path": "src/components/ui/accordion.tsx", - "content": "// Contents omitted for brevity", + "content": "// File contents excluded from context", "force": false }, { "path": "src/components/ui/alert-dialog.tsx", - "content": "// Contents omitted for brevity", + "content": "// File contents excluded from context", "force": false }, { "path": "src/components/ui/alert.tsx", - "content": "// Contents omitted for brevity", + "content": "// File contents excluded from context", "force": false }, { "path": "src/components/ui/aspect-ratio.tsx", - "content": "// Contents omitted for brevity", + "content": "// File contents excluded from context", "force": false }, { "path": "src/components/ui/avatar.tsx", - "content": "// Contents omitted for brevity", + "content": "// File contents excluded from context", "force": false }, { "path": "src/components/ui/badge.tsx", - "content": "// Contents omitted for brevity", + "content": "// File contents excluded from context", "force": false }, { "path": "src/components/ui/breadcrumb.tsx", - "content": "// Contents omitted for brevity", + "content": "// File contents excluded from context", "force": false }, { "path": "src/components/ui/button.tsx", - "content": "// Contents omitted for brevity", + "content": "// File contents excluded from context", "force": false }, { "path": "src/components/ui/calendar.tsx", - "content": "// Contents omitted for brevity", + "content": "// File contents excluded from context", "force": false }, { "path": "src/components/ui/card.tsx", - "content": "// Contents omitted for brevity", + "content": "// File contents excluded from context", "force": false }, { "path": "src/components/ui/carousel.tsx", - "content": "// Contents omitted for brevity", + "content": "// File contents excluded from context", "force": false }, { "path": "src/components/ui/chart.tsx", - "content": "// Contents omitted for brevity", + "content": "// File contents excluded from context", "force": false }, { "path": "src/components/ui/checkbox.tsx", - "content": "// Contents omitted for brevity", + "content": "// File contents excluded from context", "force": false }, { "path": "src/components/ui/collapsible.tsx", - "content": "// Contents omitted for brevity", + "content": "// File contents excluded from context", "force": false }, { "path": "src/components/ui/command.tsx", - "content": "// Contents omitted for brevity", + "content": "// File contents excluded from context", "force": false }, { "path": "src/components/ui/context-menu.tsx", - "content": "// Contents omitted for brevity", + "content": "// File contents excluded from context", "force": false }, { "path": "src/components/ui/dialog.tsx", - "content": "// Contents omitted for brevity", + "content": "// File contents excluded from context", "force": false }, { "path": "src/components/ui/drawer.tsx", - "content": "// Contents omitted for brevity", + "content": "// File contents excluded from context", "force": false }, { "path": "src/components/ui/dropdown-menu.tsx", - "content": "// Contents omitted for brevity", + "content": "// File contents excluded from context", "force": false }, { "path": "src/components/ui/form.tsx", - "content": "// Contents omitted for brevity", + "content": "// File contents excluded from context", "force": false }, { "path": "src/components/ui/hover-card.tsx", - "content": "// Contents omitted for brevity", + "content": "// File contents excluded from context", "force": false }, { "path": "src/components/ui/input-otp.tsx", - "content": "// Contents omitted for brevity", + "content": "// File contents excluded from context", "force": false }, { "path": "src/components/ui/input.tsx", - "content": "// Contents omitted for brevity", + "content": "// File contents excluded from context", "force": false }, { "path": "src/components/ui/label.tsx", - "content": "// Contents omitted for brevity", + "content": "// File contents excluded from context", "force": false }, { "path": "src/components/ui/menubar.tsx", - "content": "// Contents omitted for brevity", + "content": "// File contents excluded from context", "force": false }, { "path": "src/components/ui/navigation-menu.tsx", - "content": "// Contents omitted for brevity", + "content": "// File contents excluded from context", "force": false }, { "path": "src/components/ui/pagination.tsx", - "content": "// Contents omitted for brevity", + "content": "// File contents excluded from context", "force": false }, { "path": "src/components/ui/popover.tsx", - "content": "// Contents omitted for brevity", + "content": "// File contents excluded from context", "force": false }, { "path": "src/components/ui/progress.tsx", - "content": "// Contents omitted for brevity", + "content": "// File contents excluded from context", "force": false }, { "path": "src/components/ui/radio-group.tsx", - "content": "// Contents omitted for brevity", + "content": "// File contents excluded from context", "force": false }, { "path": "src/components/ui/resizable.tsx", - "content": "// Contents omitted for brevity", + "content": "// File contents excluded from context", "force": false }, { "path": "src/components/ui/scroll-area.tsx", - "content": "// Contents omitted for brevity", + "content": "// File contents excluded from context", "force": false }, { "path": "src/components/ui/select.tsx", - "content": "// Contents omitted for brevity", + "content": "// File contents excluded from context", "force": false }, { "path": "src/components/ui/separator.tsx", - "content": "// Contents omitted for brevity", + "content": "// File contents excluded from context", "force": false }, { "path": "src/components/ui/sheet.tsx", - "content": "// Contents omitted for brevity", + "content": "// File contents excluded from context", "force": false }, { "path": "src/components/ui/sidebar.tsx", - "content": "// Contents omitted for brevity", + "content": "// File contents excluded from context", "force": false }, { "path": "src/components/ui/skeleton.tsx", - "content": "// Contents omitted for brevity", + "content": "// File contents excluded from context", "force": false }, { "path": "src/components/ui/slider.tsx", - "content": "// Contents omitted for brevity", + "content": "// File contents excluded from context", "force": false }, { "path": "src/components/ui/sonner.tsx", - "content": "// Contents omitted for brevity", + "content": "// File contents excluded from context", "force": false }, { "path": "src/components/ui/switch.tsx", - "content": "// Contents omitted for brevity", + "content": "// File contents excluded from context", "force": false }, { "path": "src/components/ui/table.tsx", - "content": "// Contents omitted for brevity", + "content": "// File contents excluded from context", "force": false }, { "path": "src/components/ui/tabs.tsx", - "content": "// Contents omitted for brevity", + "content": "// File contents excluded from context", "force": false }, { "path": "src/components/ui/textarea.tsx", - "content": "// Contents omitted for brevity", + "content": "// File contents excluded from context", "force": false }, { "path": "src/components/ui/toast.tsx", - "content": "// Contents omitted for brevity", + "content": "// File contents excluded from context", "force": false }, { "path": "src/components/ui/toaster.tsx", - "content": "// Contents omitted for brevity", + "content": "// File contents excluded from context", "force": false }, { "path": "src/components/ui/toggle-group.tsx", - "content": "// Contents omitted for brevity", + "content": "// File contents excluded from context", "force": false }, { "path": "src/components/ui/toggle.tsx", - "content": "// Contents omitted for brevity", + "content": "// File contents excluded from context", "force": false }, { "path": "src/components/ui/tooltip.tsx", - "content": "// Contents omitted for brevity", + "content": "// File contents excluded from context", "force": false }, { "path": "src/components/ui/use-toast.ts", - "content": "// Contents omitted for brevity", + "content": "// File contents excluded from context", "force": false }, { @@ -369,6 +394,21 @@ "content": "import type { Config } from \"tailwindcss\";\n\nexport default {\n darkMode: [\"class\"],\n content: [\n \"./pages/**/*.{ts,tsx}\",\n \"./components/**/*.{ts,tsx}\",\n \"./app/**/*.{ts,tsx}\",\n \"./src/**/*.{ts,tsx}\",\n ],\n prefix: \"\",\n theme: {\n container: {\n center: true,\n padding: \"2rem\",\n screens: {\n \"2xl\": \"1400px\",\n },\n },\n extend: {\n colors: {\n border: \"hsl(var(--border))\",\n input: \"hsl(var(--input))\",\n ring: \"hsl(var(--ring))\",\n background: \"hsl(var(--background))\",\n foreground: \"hsl(var(--foreground))\",\n primary: {\n DEFAULT: \"hsl(var(--primary))\",\n foreground: \"hsl(var(--primary-foreground))\",\n },\n secondary: {\n DEFAULT: \"hsl(var(--secondary))\",\n foreground: \"hsl(var(--secondary-foreground))\",\n },\n destructive: {\n DEFAULT: \"hsl(var(--destructive))\",\n foreground: \"hsl(var(--destructive-foreground))\",\n },\n muted: {\n DEFAULT: \"hsl(var(--muted))\",\n foreground: \"hsl(var(--muted-foreground))\",\n },\n accent: {\n DEFAULT: \"hsl(var(--accent))\",\n foreground: \"hsl(var(--accent-foreground))\",\n },\n popover: {\n DEFAULT: \"hsl(var(--popover))\",\n foreground: \"hsl(var(--popover-foreground))\",\n },\n card: {\n DEFAULT: \"hsl(var(--card))\",\n foreground: \"hsl(var(--card-foreground))\",\n },\n sidebar: {\n DEFAULT: \"hsl(var(--sidebar-background))\",\n foreground: \"hsl(var(--sidebar-foreground))\",\n primary: \"hsl(var(--sidebar-primary))\",\n \"primary-foreground\": \"hsl(var(--sidebar-primary-foreground))\",\n accent: \"hsl(var(--sidebar-accent))\",\n \"accent-foreground\": \"hsl(var(--sidebar-accent-foreground))\",\n border: \"hsl(var(--sidebar-border))\",\n ring: \"hsl(var(--sidebar-ring))\",\n },\n },\n borderRadius: {\n lg: \"var(--radius)\",\n md: \"calc(var(--radius) - 2px)\",\n sm: \"calc(var(--radius) - 4px)\",\n },\n keyframes: {\n \"accordion-down\": {\n from: {\n height: \"0\",\n },\n to: {\n height: \"var(--radix-accordion-content-height)\",\n },\n },\n \"accordion-up\": {\n from: {\n height: \"var(--radix-accordion-content-height)\",\n },\n to: {\n height: \"0\",\n },\n },\n },\n animation: {\n \"accordion-down\": \"accordion-down 0.2s ease-out\",\n \"accordion-up\": \"accordion-up 0.2s ease-out\",\n },\n },\n },\n plugins: [require(\"tailwindcss-animate\")],\n} satisfies Config;\n", "force": false }, + { + "path": "tsconfig.app.json", + "content": "// File contents excluded from context", + "force": false + }, + { + "path": "tsconfig.json", + "content": "// File contents excluded from context", + "force": false + }, + { + "path": "tsconfig.node.json", + "content": "// File contents excluded from context", + "force": false + }, { "path": "vite.config.ts", "content": "import { defineConfig } from \"vite\";\nimport dyadComponentTagger from \"@dyad-sh/react-vite-component-tagger\";\nimport react from \"@vitejs/plugin-react-swc\";\nimport path from \"path\";\n\nexport default defineConfig(() => ({\n server: {\n host: \"::\",\n port: 8080,\n },\n plugins: [dyadComponentTagger(), react()],\n resolve: {\n alias: {\n \"@\": path.resolve(__dirname, \"./src\"),\n },\n },\n}));\n", diff --git a/e2e-tests/snapshots/thinking_budget.spec.ts_thinking-budget-4.txt b/e2e-tests/snapshots/thinking_budget.spec.ts_thinking-budget-4.txt index a9bd207..524bb37 100644 --- a/e2e-tests/snapshots/thinking_budget.spec.ts_thinking-budget-4.txt +++ b/e2e-tests/snapshots/thinking_budget.spec.ts_thinking-budget-4.txt @@ -37,14 +37,24 @@ }, "dyad_options": { "files": [ + { + "path": ".gitignore", + "content": "// File contents excluded from context", + "force": false + }, { "path": "AI_RULES.md", "content": "# Tech Stack\n\n- You are building a React application.\n- Use TypeScript.\n- Use React Router. KEEP the routes in src/App.tsx\n- Always put source code in the src folder.\n- Put pages into src/pages/\n- Put components into src/components/\n- The main page (default page) is src/pages/Index.tsx\n- UPDATE the main page to include the new components. OTHERWISE, the user can NOT see any components!\n- ALWAYS try to use the shadcn/ui library.\n- Tailwind CSS: always use Tailwind CSS for styling components. Utilize Tailwind classes extensively for layout, spacing, colors, and other design aspects.\n\nAvailable packages and libraries:\n\n- The lucide-react package is installed for icons.\n- You ALREADY have ALL the shadcn/ui components and their dependencies installed. So you don't need to install them again.\n- You have ALL the necessary Radix UI components installed.\n- Use prebuilt components from the shadcn/ui library after importing them. Note that these files shouldn't be edited, so make new components if you need to change them.\n", "force": false }, + { + "path": "components.json", + "content": "// File contents excluded from context", + "force": false + }, { "path": "eslint.config.js", - "content": "// Contents omitted for brevity", + "content": "// File contents excluded from context", "force": false }, { @@ -62,6 +72,21 @@ "content": "export default {\n plugins: {\n tailwindcss: {},\n autoprefixer: {},\n },\n};\n", "force": false }, + { + "path": "public/favicon.ico", + "content": "// File contents excluded from context", + "force": false + }, + { + "path": "public/placeholder.svg", + "content": "// File contents excluded from context", + "force": false + }, + { + "path": "public/robots.txt", + "content": "// File contents excluded from context", + "force": false + }, { "path": "README.md", "content": "# Welcome to your Dyad app\n", @@ -84,247 +109,247 @@ }, { "path": "src/components/ui/accordion.tsx", - "content": "// Contents omitted for brevity", + "content": "// File contents excluded from context", "force": false }, { "path": "src/components/ui/alert-dialog.tsx", - "content": "// Contents omitted for brevity", + "content": "// File contents excluded from context", "force": false }, { "path": "src/components/ui/alert.tsx", - "content": "// Contents omitted for brevity", + "content": "// File contents excluded from context", "force": false }, { "path": "src/components/ui/aspect-ratio.tsx", - "content": "// Contents omitted for brevity", + "content": "// File contents excluded from context", "force": false }, { "path": "src/components/ui/avatar.tsx", - "content": "// Contents omitted for brevity", + "content": "// File contents excluded from context", "force": false }, { "path": "src/components/ui/badge.tsx", - "content": "// Contents omitted for brevity", + "content": "// File contents excluded from context", "force": false }, { "path": "src/components/ui/breadcrumb.tsx", - "content": "// Contents omitted for brevity", + "content": "// File contents excluded from context", "force": false }, { "path": "src/components/ui/button.tsx", - "content": "// Contents omitted for brevity", + "content": "// File contents excluded from context", "force": false }, { "path": "src/components/ui/calendar.tsx", - "content": "// Contents omitted for brevity", + "content": "// File contents excluded from context", "force": false }, { "path": "src/components/ui/card.tsx", - "content": "// Contents omitted for brevity", + "content": "// File contents excluded from context", "force": false }, { "path": "src/components/ui/carousel.tsx", - "content": "// Contents omitted for brevity", + "content": "// File contents excluded from context", "force": false }, { "path": "src/components/ui/chart.tsx", - "content": "// Contents omitted for brevity", + "content": "// File contents excluded from context", "force": false }, { "path": "src/components/ui/checkbox.tsx", - "content": "// Contents omitted for brevity", + "content": "// File contents excluded from context", "force": false }, { "path": "src/components/ui/collapsible.tsx", - "content": "// Contents omitted for brevity", + "content": "// File contents excluded from context", "force": false }, { "path": "src/components/ui/command.tsx", - "content": "// Contents omitted for brevity", + "content": "// File contents excluded from context", "force": false }, { "path": "src/components/ui/context-menu.tsx", - "content": "// Contents omitted for brevity", + "content": "// File contents excluded from context", "force": false }, { "path": "src/components/ui/dialog.tsx", - "content": "// Contents omitted for brevity", + "content": "// File contents excluded from context", "force": false }, { "path": "src/components/ui/drawer.tsx", - "content": "// Contents omitted for brevity", + "content": "// File contents excluded from context", "force": false }, { "path": "src/components/ui/dropdown-menu.tsx", - "content": "// Contents omitted for brevity", + "content": "// File contents excluded from context", "force": false }, { "path": "src/components/ui/form.tsx", - "content": "// Contents omitted for brevity", + "content": "// File contents excluded from context", "force": false }, { "path": "src/components/ui/hover-card.tsx", - "content": "// Contents omitted for brevity", + "content": "// File contents excluded from context", "force": false }, { "path": "src/components/ui/input-otp.tsx", - "content": "// Contents omitted for brevity", + "content": "// File contents excluded from context", "force": false }, { "path": "src/components/ui/input.tsx", - "content": "// Contents omitted for brevity", + "content": "// File contents excluded from context", "force": false }, { "path": "src/components/ui/label.tsx", - "content": "// Contents omitted for brevity", + "content": "// File contents excluded from context", "force": false }, { "path": "src/components/ui/menubar.tsx", - "content": "// Contents omitted for brevity", + "content": "// File contents excluded from context", "force": false }, { "path": "src/components/ui/navigation-menu.tsx", - "content": "// Contents omitted for brevity", + "content": "// File contents excluded from context", "force": false }, { "path": "src/components/ui/pagination.tsx", - "content": "// Contents omitted for brevity", + "content": "// File contents excluded from context", "force": false }, { "path": "src/components/ui/popover.tsx", - "content": "// Contents omitted for brevity", + "content": "// File contents excluded from context", "force": false }, { "path": "src/components/ui/progress.tsx", - "content": "// Contents omitted for brevity", + "content": "// File contents excluded from context", "force": false }, { "path": "src/components/ui/radio-group.tsx", - "content": "// Contents omitted for brevity", + "content": "// File contents excluded from context", "force": false }, { "path": "src/components/ui/resizable.tsx", - "content": "// Contents omitted for brevity", + "content": "// File contents excluded from context", "force": false }, { "path": "src/components/ui/scroll-area.tsx", - "content": "// Contents omitted for brevity", + "content": "// File contents excluded from context", "force": false }, { "path": "src/components/ui/select.tsx", - "content": "// Contents omitted for brevity", + "content": "// File contents excluded from context", "force": false }, { "path": "src/components/ui/separator.tsx", - "content": "// Contents omitted for brevity", + "content": "// File contents excluded from context", "force": false }, { "path": "src/components/ui/sheet.tsx", - "content": "// Contents omitted for brevity", + "content": "// File contents excluded from context", "force": false }, { "path": "src/components/ui/sidebar.tsx", - "content": "// Contents omitted for brevity", + "content": "// File contents excluded from context", "force": false }, { "path": "src/components/ui/skeleton.tsx", - "content": "// Contents omitted for brevity", + "content": "// File contents excluded from context", "force": false }, { "path": "src/components/ui/slider.tsx", - "content": "// Contents omitted for brevity", + "content": "// File contents excluded from context", "force": false }, { "path": "src/components/ui/sonner.tsx", - "content": "// Contents omitted for brevity", + "content": "// File contents excluded from context", "force": false }, { "path": "src/components/ui/switch.tsx", - "content": "// Contents omitted for brevity", + "content": "// File contents excluded from context", "force": false }, { "path": "src/components/ui/table.tsx", - "content": "// Contents omitted for brevity", + "content": "// File contents excluded from context", "force": false }, { "path": "src/components/ui/tabs.tsx", - "content": "// Contents omitted for brevity", + "content": "// File contents excluded from context", "force": false }, { "path": "src/components/ui/textarea.tsx", - "content": "// Contents omitted for brevity", + "content": "// File contents excluded from context", "force": false }, { "path": "src/components/ui/toast.tsx", - "content": "// Contents omitted for brevity", + "content": "// File contents excluded from context", "force": false }, { "path": "src/components/ui/toaster.tsx", - "content": "// Contents omitted for brevity", + "content": "// File contents excluded from context", "force": false }, { "path": "src/components/ui/toggle-group.tsx", - "content": "// Contents omitted for brevity", + "content": "// File contents excluded from context", "force": false }, { "path": "src/components/ui/toggle.tsx", - "content": "// Contents omitted for brevity", + "content": "// File contents excluded from context", "force": false }, { "path": "src/components/ui/tooltip.tsx", - "content": "// Contents omitted for brevity", + "content": "// File contents excluded from context", "force": false }, { "path": "src/components/ui/use-toast.ts", - "content": "// Contents omitted for brevity", + "content": "// File contents excluded from context", "force": false }, { @@ -377,6 +402,21 @@ "content": "import type { Config } from \"tailwindcss\";\n\nexport default {\n darkMode: [\"class\"],\n content: [\n \"./pages/**/*.{ts,tsx}\",\n \"./components/**/*.{ts,tsx}\",\n \"./app/**/*.{ts,tsx}\",\n \"./src/**/*.{ts,tsx}\",\n ],\n prefix: \"\",\n theme: {\n container: {\n center: true,\n padding: \"2rem\",\n screens: {\n \"2xl\": \"1400px\",\n },\n },\n extend: {\n colors: {\n border: \"hsl(var(--border))\",\n input: \"hsl(var(--input))\",\n ring: \"hsl(var(--ring))\",\n background: \"hsl(var(--background))\",\n foreground: \"hsl(var(--foreground))\",\n primary: {\n DEFAULT: \"hsl(var(--primary))\",\n foreground: \"hsl(var(--primary-foreground))\",\n },\n secondary: {\n DEFAULT: \"hsl(var(--secondary))\",\n foreground: \"hsl(var(--secondary-foreground))\",\n },\n destructive: {\n DEFAULT: \"hsl(var(--destructive))\",\n foreground: \"hsl(var(--destructive-foreground))\",\n },\n muted: {\n DEFAULT: \"hsl(var(--muted))\",\n foreground: \"hsl(var(--muted-foreground))\",\n },\n accent: {\n DEFAULT: \"hsl(var(--accent))\",\n foreground: \"hsl(var(--accent-foreground))\",\n },\n popover: {\n DEFAULT: \"hsl(var(--popover))\",\n foreground: \"hsl(var(--popover-foreground))\",\n },\n card: {\n DEFAULT: \"hsl(var(--card))\",\n foreground: \"hsl(var(--card-foreground))\",\n },\n sidebar: {\n DEFAULT: \"hsl(var(--sidebar-background))\",\n foreground: \"hsl(var(--sidebar-foreground))\",\n primary: \"hsl(var(--sidebar-primary))\",\n \"primary-foreground\": \"hsl(var(--sidebar-primary-foreground))\",\n accent: \"hsl(var(--sidebar-accent))\",\n \"accent-foreground\": \"hsl(var(--sidebar-accent-foreground))\",\n border: \"hsl(var(--sidebar-border))\",\n ring: \"hsl(var(--sidebar-ring))\",\n },\n },\n borderRadius: {\n lg: \"var(--radius)\",\n md: \"calc(var(--radius) - 2px)\",\n sm: \"calc(var(--radius) - 4px)\",\n },\n keyframes: {\n \"accordion-down\": {\n from: {\n height: \"0\",\n },\n to: {\n height: \"var(--radix-accordion-content-height)\",\n },\n },\n \"accordion-up\": {\n from: {\n height: \"var(--radix-accordion-content-height)\",\n },\n to: {\n height: \"0\",\n },\n },\n },\n animation: {\n \"accordion-down\": \"accordion-down 0.2s ease-out\",\n \"accordion-up\": \"accordion-up 0.2s ease-out\",\n },\n },\n },\n plugins: [require(\"tailwindcss-animate\")],\n} satisfies Config;\n", "force": false }, + { + "path": "tsconfig.app.json", + "content": "// File contents excluded from context", + "force": false + }, + { + "path": "tsconfig.json", + "content": "// File contents excluded from context", + "force": false + }, + { + "path": "tsconfig.node.json", + "content": "// File contents excluded from context", + "force": false + }, { "path": "vite.config.ts", "content": "import { defineConfig } from \"vite\";\nimport dyadComponentTagger from \"@dyad-sh/react-vite-component-tagger\";\nimport react from \"@vitejs/plugin-react-swc\";\nimport path from \"path\";\n\nexport default defineConfig(() => ({\n server: {\n host: \"::\",\n port: 8080,\n },\n plugins: [dyadComponentTagger(), react()],\n resolve: {\n alias: {\n \"@\": path.resolve(__dirname, \"./src\"),\n },\n },\n}));\n", diff --git a/e2e-tests/snapshots/thinking_budget.spec.ts_thinking-budget-6.txt b/e2e-tests/snapshots/thinking_budget.spec.ts_thinking-budget-6.txt index cb7140d..5b6130f 100644 --- a/e2e-tests/snapshots/thinking_budget.spec.ts_thinking-budget-6.txt +++ b/e2e-tests/snapshots/thinking_budget.spec.ts_thinking-budget-6.txt @@ -45,14 +45,24 @@ }, "dyad_options": { "files": [ + { + "path": ".gitignore", + "content": "// File contents excluded from context", + "force": false + }, { "path": "AI_RULES.md", "content": "# Tech Stack\n\n- You are building a React application.\n- Use TypeScript.\n- Use React Router. KEEP the routes in src/App.tsx\n- Always put source code in the src folder.\n- Put pages into src/pages/\n- Put components into src/components/\n- The main page (default page) is src/pages/Index.tsx\n- UPDATE the main page to include the new components. OTHERWISE, the user can NOT see any components!\n- ALWAYS try to use the shadcn/ui library.\n- Tailwind CSS: always use Tailwind CSS for styling components. Utilize Tailwind classes extensively for layout, spacing, colors, and other design aspects.\n\nAvailable packages and libraries:\n\n- The lucide-react package is installed for icons.\n- You ALREADY have ALL the shadcn/ui components and their dependencies installed. So you don't need to install them again.\n- You have ALL the necessary Radix UI components installed.\n- Use prebuilt components from the shadcn/ui library after importing them. Note that these files shouldn't be edited, so make new components if you need to change them.\n", "force": false }, + { + "path": "components.json", + "content": "// File contents excluded from context", + "force": false + }, { "path": "eslint.config.js", - "content": "// Contents omitted for brevity", + "content": "// File contents excluded from context", "force": false }, { @@ -70,6 +80,21 @@ "content": "export default {\n plugins: {\n tailwindcss: {},\n autoprefixer: {},\n },\n};\n", "force": false }, + { + "path": "public/favicon.ico", + "content": "// File contents excluded from context", + "force": false + }, + { + "path": "public/placeholder.svg", + "content": "// File contents excluded from context", + "force": false + }, + { + "path": "public/robots.txt", + "content": "// File contents excluded from context", + "force": false + }, { "path": "README.md", "content": "# Welcome to your Dyad app\n", @@ -92,247 +117,247 @@ }, { "path": "src/components/ui/accordion.tsx", - "content": "// Contents omitted for brevity", + "content": "// File contents excluded from context", "force": false }, { "path": "src/components/ui/alert-dialog.tsx", - "content": "// Contents omitted for brevity", + "content": "// File contents excluded from context", "force": false }, { "path": "src/components/ui/alert.tsx", - "content": "// Contents omitted for brevity", + "content": "// File contents excluded from context", "force": false }, { "path": "src/components/ui/aspect-ratio.tsx", - "content": "// Contents omitted for brevity", + "content": "// File contents excluded from context", "force": false }, { "path": "src/components/ui/avatar.tsx", - "content": "// Contents omitted for brevity", + "content": "// File contents excluded from context", "force": false }, { "path": "src/components/ui/badge.tsx", - "content": "// Contents omitted for brevity", + "content": "// File contents excluded from context", "force": false }, { "path": "src/components/ui/breadcrumb.tsx", - "content": "// Contents omitted for brevity", + "content": "// File contents excluded from context", "force": false }, { "path": "src/components/ui/button.tsx", - "content": "// Contents omitted for brevity", + "content": "// File contents excluded from context", "force": false }, { "path": "src/components/ui/calendar.tsx", - "content": "// Contents omitted for brevity", + "content": "// File contents excluded from context", "force": false }, { "path": "src/components/ui/card.tsx", - "content": "// Contents omitted for brevity", + "content": "// File contents excluded from context", "force": false }, { "path": "src/components/ui/carousel.tsx", - "content": "// Contents omitted for brevity", + "content": "// File contents excluded from context", "force": false }, { "path": "src/components/ui/chart.tsx", - "content": "// Contents omitted for brevity", + "content": "// File contents excluded from context", "force": false }, { "path": "src/components/ui/checkbox.tsx", - "content": "// Contents omitted for brevity", + "content": "// File contents excluded from context", "force": false }, { "path": "src/components/ui/collapsible.tsx", - "content": "// Contents omitted for brevity", + "content": "// File contents excluded from context", "force": false }, { "path": "src/components/ui/command.tsx", - "content": "// Contents omitted for brevity", + "content": "// File contents excluded from context", "force": false }, { "path": "src/components/ui/context-menu.tsx", - "content": "// Contents omitted for brevity", + "content": "// File contents excluded from context", "force": false }, { "path": "src/components/ui/dialog.tsx", - "content": "// Contents omitted for brevity", + "content": "// File contents excluded from context", "force": false }, { "path": "src/components/ui/drawer.tsx", - "content": "// Contents omitted for brevity", + "content": "// File contents excluded from context", "force": false }, { "path": "src/components/ui/dropdown-menu.tsx", - "content": "// Contents omitted for brevity", + "content": "// File contents excluded from context", "force": false }, { "path": "src/components/ui/form.tsx", - "content": "// Contents omitted for brevity", + "content": "// File contents excluded from context", "force": false }, { "path": "src/components/ui/hover-card.tsx", - "content": "// Contents omitted for brevity", + "content": "// File contents excluded from context", "force": false }, { "path": "src/components/ui/input-otp.tsx", - "content": "// Contents omitted for brevity", + "content": "// File contents excluded from context", "force": false }, { "path": "src/components/ui/input.tsx", - "content": "// Contents omitted for brevity", + "content": "// File contents excluded from context", "force": false }, { "path": "src/components/ui/label.tsx", - "content": "// Contents omitted for brevity", + "content": "// File contents excluded from context", "force": false }, { "path": "src/components/ui/menubar.tsx", - "content": "// Contents omitted for brevity", + "content": "// File contents excluded from context", "force": false }, { "path": "src/components/ui/navigation-menu.tsx", - "content": "// Contents omitted for brevity", + "content": "// File contents excluded from context", "force": false }, { "path": "src/components/ui/pagination.tsx", - "content": "// Contents omitted for brevity", + "content": "// File contents excluded from context", "force": false }, { "path": "src/components/ui/popover.tsx", - "content": "// Contents omitted for brevity", + "content": "// File contents excluded from context", "force": false }, { "path": "src/components/ui/progress.tsx", - "content": "// Contents omitted for brevity", + "content": "// File contents excluded from context", "force": false }, { "path": "src/components/ui/radio-group.tsx", - "content": "// Contents omitted for brevity", + "content": "// File contents excluded from context", "force": false }, { "path": "src/components/ui/resizable.tsx", - "content": "// Contents omitted for brevity", + "content": "// File contents excluded from context", "force": false }, { "path": "src/components/ui/scroll-area.tsx", - "content": "// Contents omitted for brevity", + "content": "// File contents excluded from context", "force": false }, { "path": "src/components/ui/select.tsx", - "content": "// Contents omitted for brevity", + "content": "// File contents excluded from context", "force": false }, { "path": "src/components/ui/separator.tsx", - "content": "// Contents omitted for brevity", + "content": "// File contents excluded from context", "force": false }, { "path": "src/components/ui/sheet.tsx", - "content": "// Contents omitted for brevity", + "content": "// File contents excluded from context", "force": false }, { "path": "src/components/ui/sidebar.tsx", - "content": "// Contents omitted for brevity", + "content": "// File contents excluded from context", "force": false }, { "path": "src/components/ui/skeleton.tsx", - "content": "// Contents omitted for brevity", + "content": "// File contents excluded from context", "force": false }, { "path": "src/components/ui/slider.tsx", - "content": "// Contents omitted for brevity", + "content": "// File contents excluded from context", "force": false }, { "path": "src/components/ui/sonner.tsx", - "content": "// Contents omitted for brevity", + "content": "// File contents excluded from context", "force": false }, { "path": "src/components/ui/switch.tsx", - "content": "// Contents omitted for brevity", + "content": "// File contents excluded from context", "force": false }, { "path": "src/components/ui/table.tsx", - "content": "// Contents omitted for brevity", + "content": "// File contents excluded from context", "force": false }, { "path": "src/components/ui/tabs.tsx", - "content": "// Contents omitted for brevity", + "content": "// File contents excluded from context", "force": false }, { "path": "src/components/ui/textarea.tsx", - "content": "// Contents omitted for brevity", + "content": "// File contents excluded from context", "force": false }, { "path": "src/components/ui/toast.tsx", - "content": "// Contents omitted for brevity", + "content": "// File contents excluded from context", "force": false }, { "path": "src/components/ui/toaster.tsx", - "content": "// Contents omitted for brevity", + "content": "// File contents excluded from context", "force": false }, { "path": "src/components/ui/toggle-group.tsx", - "content": "// Contents omitted for brevity", + "content": "// File contents excluded from context", "force": false }, { "path": "src/components/ui/toggle.tsx", - "content": "// Contents omitted for brevity", + "content": "// File contents excluded from context", "force": false }, { "path": "src/components/ui/tooltip.tsx", - "content": "// Contents omitted for brevity", + "content": "// File contents excluded from context", "force": false }, { "path": "src/components/ui/use-toast.ts", - "content": "// Contents omitted for brevity", + "content": "// File contents excluded from context", "force": false }, { @@ -385,6 +410,21 @@ "content": "import type { Config } from \"tailwindcss\";\n\nexport default {\n darkMode: [\"class\"],\n content: [\n \"./pages/**/*.{ts,tsx}\",\n \"./components/**/*.{ts,tsx}\",\n \"./app/**/*.{ts,tsx}\",\n \"./src/**/*.{ts,tsx}\",\n ],\n prefix: \"\",\n theme: {\n container: {\n center: true,\n padding: \"2rem\",\n screens: {\n \"2xl\": \"1400px\",\n },\n },\n extend: {\n colors: {\n border: \"hsl(var(--border))\",\n input: \"hsl(var(--input))\",\n ring: \"hsl(var(--ring))\",\n background: \"hsl(var(--background))\",\n foreground: \"hsl(var(--foreground))\",\n primary: {\n DEFAULT: \"hsl(var(--primary))\",\n foreground: \"hsl(var(--primary-foreground))\",\n },\n secondary: {\n DEFAULT: \"hsl(var(--secondary))\",\n foreground: \"hsl(var(--secondary-foreground))\",\n },\n destructive: {\n DEFAULT: \"hsl(var(--destructive))\",\n foreground: \"hsl(var(--destructive-foreground))\",\n },\n muted: {\n DEFAULT: \"hsl(var(--muted))\",\n foreground: \"hsl(var(--muted-foreground))\",\n },\n accent: {\n DEFAULT: \"hsl(var(--accent))\",\n foreground: \"hsl(var(--accent-foreground))\",\n },\n popover: {\n DEFAULT: \"hsl(var(--popover))\",\n foreground: \"hsl(var(--popover-foreground))\",\n },\n card: {\n DEFAULT: \"hsl(var(--card))\",\n foreground: \"hsl(var(--card-foreground))\",\n },\n sidebar: {\n DEFAULT: \"hsl(var(--sidebar-background))\",\n foreground: \"hsl(var(--sidebar-foreground))\",\n primary: \"hsl(var(--sidebar-primary))\",\n \"primary-foreground\": \"hsl(var(--sidebar-primary-foreground))\",\n accent: \"hsl(var(--sidebar-accent))\",\n \"accent-foreground\": \"hsl(var(--sidebar-accent-foreground))\",\n border: \"hsl(var(--sidebar-border))\",\n ring: \"hsl(var(--sidebar-ring))\",\n },\n },\n borderRadius: {\n lg: \"var(--radius)\",\n md: \"calc(var(--radius) - 2px)\",\n sm: \"calc(var(--radius) - 4px)\",\n },\n keyframes: {\n \"accordion-down\": {\n from: {\n height: \"0\",\n },\n to: {\n height: \"var(--radix-accordion-content-height)\",\n },\n },\n \"accordion-up\": {\n from: {\n height: \"var(--radix-accordion-content-height)\",\n },\n to: {\n height: \"0\",\n },\n },\n },\n animation: {\n \"accordion-down\": \"accordion-down 0.2s ease-out\",\n \"accordion-up\": \"accordion-up 0.2s ease-out\",\n },\n },\n },\n plugins: [require(\"tailwindcss-animate\")],\n} satisfies Config;\n", "force": false }, + { + "path": "tsconfig.app.json", + "content": "// File contents excluded from context", + "force": false + }, + { + "path": "tsconfig.json", + "content": "// File contents excluded from context", + "force": false + }, + { + "path": "tsconfig.node.json", + "content": "// File contents excluded from context", + "force": false + }, { "path": "vite.config.ts", "content": "import { defineConfig } from \"vite\";\nimport dyadComponentTagger from \"@dyad-sh/react-vite-component-tagger\";\nimport react from \"@vitejs/plugin-react-swc\";\nimport path from \"path\";\n\nexport default defineConfig(() => ({\n server: {\n host: \"::\",\n port: 8080,\n },\n plugins: [dyadComponentTagger(), react()],\n resolve: {\n alias: {\n \"@\": path.resolve(__dirname, \"./src\"),\n },\n },\n}));\n", diff --git a/src/utils/codebase.ts b/src/utils/codebase.ts index 0b74097..e62162f 100644 --- a/src/utils/codebase.ts +++ b/src/utils/codebase.ts @@ -277,10 +277,6 @@ async function collectFiles(dir: string, baseDir: string): Promise { return; } - // Check file extension and filename - const ext = path.extname(entry.name).toLowerCase(); - const shouldAlwaysInclude = ALWAYS_INCLUDE_FILES.includes(entry.name); - // Skip files that are too large try { const stats = await fsAsync.stat(fullPath); @@ -292,9 +288,8 @@ async function collectFiles(dir: string, baseDir: string): Promise { return; } - if (ALLOWED_EXTENSIONS.includes(ext) || shouldAlwaysInclude) { - files.push(fullPath); - } + // Include all files in the list + files.push(fullPath); } }); @@ -311,25 +306,48 @@ function isOmittedFile(relativePath: string): boolean { return OMITTED_FILES.some((pattern) => relativePath.includes(pattern)); } -const OMITTED_FILE_CONTENT = "// Contents omitted for brevity"; +const OMITTED_FILE_CONTENT = "// File contents excluded from context"; + +/** + * Check if file contents should be read based on extension and inclusion rules + */ +function shouldReadFileContents({ + filePath, + normalizedRelativePath, +}: { + filePath: string; + normalizedRelativePath: string; +}): boolean { + const ext = path.extname(filePath).toLowerCase(); + const fileName = path.basename(filePath); + + // OMITTED_FILES takes precedence - never read if omitted + if (isOmittedFile(normalizedRelativePath)) { + return false; + } + + // Check if file should be included based on extension or filename + return ( + ALLOWED_EXTENSIONS.includes(ext) || ALWAYS_INCLUDE_FILES.includes(fileName) + ); +} /** * Format a file for inclusion in the codebase extract */ -async function formatFile( - filePath: string, - baseDir: string, - virtualFileSystem?: AsyncVirtualFileSystem, -): Promise { +async function formatFile({ + filePath, + normalizedRelativePath, + virtualFileSystem, +}: { + filePath: string; + normalizedRelativePath: string; + virtualFileSystem?: AsyncVirtualFileSystem; +}): Promise { try { - const relativePath = path - .relative(baseDir, filePath) - // Why? Normalize Windows-style paths which causes lots of weird issues (e.g. Git commit) - .split(path.sep) - .join("/"); - - if (isOmittedFile(relativePath)) { - return ` + // Check if we should read file contents + if (!shouldReadFileContents({ filePath, normalizedRelativePath })) { + return ` ${OMITTED_FILE_CONTENT} @@ -339,21 +357,21 @@ ${OMITTED_FILE_CONTENT} const content = await readFileWithCache(filePath, virtualFileSystem); if (content == null) { - return ` + return ` // Error reading file `; } - return ` + return ` ${content} `; } catch (error) { logger.error(`Error reading file: ${filePath}`, error); - return ` + return ` // Error reading file: ${error} @@ -482,28 +500,35 @@ export async function extractCodebase({ // Format files and collect individual file contents const filesArray: CodebaseFile[] = []; const formatPromises = sortedFiles.map(async (file) => { - const formattedContent = await formatFile(file, appPath, virtualFileSystem); - // Get raw content for the files array - const relativePath = path + const normalizedRelativePath = path .relative(appPath, file) // Why? Normalize Windows-style paths which causes lots of weird issues (e.g. Git commit) .split(path.sep) .join("/"); + const formattedContent = await formatFile({ + filePath: file, + normalizedRelativePath, + virtualFileSystem, + }); const isForced = autoIncludedFiles.has(path.normalize(file)); - const fileContent = isOmittedFile(relativePath) - ? OMITTED_FILE_CONTENT - : await readFileWithCache(file, virtualFileSystem); - if (fileContent != null) { - filesArray.push({ - path: relativePath, - content: fileContent, - force: isForced, - }); + // Determine file content based on whether we should read it + let fileContent: string; + if (!shouldReadFileContents({ filePath: file, normalizedRelativePath })) { + fileContent = OMITTED_FILE_CONTENT; + } else { + const readContent = await readFileWithCache(file, virtualFileSystem); + fileContent = readContent ?? "// Error reading file"; } + filesArray.push({ + path: normalizedRelativePath, + content: fileContent, + force: isForced, + }); + return formattedContent; });