srcbookdev / srcbook

TypeScript-centric app development platform
https://srcbook.com
Apache License 2.0
2.79k stars 139 forks source link

Reintroduce templates + prompt updates for high level changeset description #364

Closed nichochar closed 1 month ago

nichochar commented 1 month ago

Previously, the AI was creating the whole app from scratch.

I modified things so that we have a template with tailwind, vite, no eslint and a simpler tsconfig.

I also updated both prompts for creation and editing, with the new node, which we can present to the user in Markdown form in the ChatBox. We currently use the Markdown component but this will likely have styling issues, so it's a stop gap.

We currently run npm install twice, which is not super elegant but actually quite efficient: we run it while the AI is generating and it installs vite, tailwind, etc... then the AI might have added a library, so just in case we run it again.

Note that the optimal fix is to get the AI to give us a list of packages to add, and run it only with those. We can get to that later