* Change the config to only allow TS files.
* Rename bunch of files from js to ts.
* Add better types to some files.
* Rename the big StorageExplorerStore but with no-check flag.
* Add vercel/ai. Commit additional next types.
* Add a API route in /app for streaming responses.
* Make the components work with streaming response.
* Add a dummy page to /app folder to fix a linking bug.
* Fix the dummy page.
* Fix the dummy page again.
* Add an empty layout to the app folder.
* Make the code snippets in the chat read-only.
* Remove queries and mutations for suggest.
* Reset the chat when closing the panel.
* Make the AI instructions a bit better.
* Don't render empty code blocks.
* Try to use remark for rendering the code. Style fixes for CodeBlock in AI assistant panel.
* Fix the styling of the definitions when sending them to OpenAI.
* Fix the css styling of the messages and code blocks.
* Move the suggest API route from app to pages folder.
* Revert the change for app API routes.
* Make the API route look like the rest of the API routes.
* Use Pre instead of Code because the <code> tags aren't working if between spans.
* Minor leftovers.
* Revert to using app route handlers.
* Change the wording on the diff header.
* Add nextjs types.
* Fix a missing import.
* Move AssistantChatForm back to db-new.
* Fix a build error.
* Rename the suggest route to assistant.
* Fix Joshen's comments.
* fix: enable `useDefineForClassFields` in Studio `tsconfig.json`
Per https://mobx.js.org/installation.html#use-spec-compliant-transpilation-for-class-properties. Needed to switch to SWC.
* fix: remove Studio `.babelrc` to enable SWC
This was tried previously and reverted. I believe that it should work now with `useDefineForClassField` enabled in the previous commit, support for which was added to Next.js in https://github.com/vercel/next.js/pull/36335.
* fix: set Studio `onDemandEntries` options `maxInactiveAge` to 1 day, `pagesBufferLength` to 100
This will keep up to 100 built pages in memory for 1 day, speeding up development. You'd expect that this speed up would come at the cost of memory usage, but in my unscientific testing involving clicking around every page I could get to, with SWC compilation, memory usage maxed out at ~3.3 GB with these options enabled, and no compilation was needed for any revisited pages, whereas without these options, memory usage maxed out at ~4 GB(?!), and revisited pages were compiled once they were out of the buffer. Perhaps the recompilation actually worsens memory usage.
* fix prettier
---------
Co-authored-by: Alaister Young <a@alaisteryoung.com>
* Move all studio files from /studio to /apps/studio.
* Move studio specific prettier ignores.
* Fix the ui references from studio.
* Fix the css imports.
* Fix all package.json issues.
* Fix the prettier setup for the studio app.
* Add .turbo folder to prettierignore.
* Fix the github workflows.