-
-
Notifications
You must be signed in to change notification settings - Fork 2.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
⚡ Introduce a new high-performing standalone chat API #1200
Conversation
The latest updates on your projects. Learn more about Vercel for Git ↗︎
|
Important Auto Review SkippedAuto reviews are disabled on this repository. Please check the settings in the CodeRabbit UI or the To trigger a single review, invoke the WalkthroughThe comprehensive changes detail the migration of Typebot's chat API to a standalone server, addressing limitations encountered in serverless environments, particularly with long-running processes like AI operations and issues with WhatsApp webhook retries causing duplicate messages. The migration enhances the chat API's capability to manage sessions, handle chat-related functionalities, integrate with WhatsApp, and streamline operations with the introduction of the Bun package manager for better efficiency and performance. Changes
Assessment against linked issues
The changes thoroughly address the primary objectives outlined in the linked issue, focusing on migrating the chat API to a standalone server to overcome the limitations of serverless environments, particularly for long-running processes and the handling of WhatsApp webhook retries. The adoption of the Thank you for using CodeRabbit. We offer it for free to the OSS community and would appreciate your support in helping us grow. If you find it useful, would you consider giving us a shout-out on your favorite social media? TipsChatThere are 3 ways to chat with CodeRabbit:
Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments. CodeRabbit Commands (invoked as PR comments)
Additionally, you can add CodeRabbit Configration File (
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Review Status
Actionable comments generated: 1
Configuration used: CodeRabbit UI
Files ignored due to path filters (10)
apps/builder/package.json
is excluded by:!**/*.json
apps/chat-api/package.json
is excluded by:!**/*.json
apps/chat-api/tsconfig.json
is excluded by:!**/*.json
apps/docs/openapi/viewer.json
is excluded by:!**/*.json
apps/landing-page/package.json
is excluded by:!**/*.json
apps/viewer/package.json
is excluded by:!**/*.json
packages/bot-engine/package.json
is excluded by:!**/*.json
packages/emails/package.json
is excluded by:!**/*.json
packages/lib/package.json
is excluded by:!**/*.json
pnpm-lock.yaml
is excluded by:!**/*.yaml
Files selected for processing (33)
- apps/builder/src/features/whatsapp/startWhatsAppPreview.ts (1 hunks)
- apps/chat-api/src/auth.ts (1 hunks)
- apps/chat-api/src/index.ts (1 hunks)
- apps/chat-api/src/runtimes/api/app.ts (1 hunks)
- apps/chat-api/src/runtimes/api/continueChat.ts (1 hunks)
- apps/chat-api/src/runtimes/api/getMessageStream.ts (1 hunks)
- apps/chat-api/src/runtimes/api/legacy/getOpenAIChatCompletionStream.ts (1 hunks)
- apps/chat-api/src/runtimes/api/saveClientLogs.ts (1 hunks)
- apps/chat-api/src/runtimes/api/startChat.ts (1 hunks)
- apps/chat-api/src/runtimes/api/startChatPreview.ts (1 hunks)
- apps/chat-api/src/runtimes/api/updateTypebotInSession.ts (1 hunks)
- apps/chat-api/src/runtimes/whatsapp/app.ts (1 hunks)
- apps/chat-api/src/runtimes/whatsapp/receiveMessage.ts (1 hunks)
- apps/chat-api/src/runtimes/whatsapp/receiveMessagePreview.ts (1 hunks)
- apps/viewer/src/app/api/v1/sessions/[sessionId]/streamMessage/route.ts (1 hunks)
- apps/viewer/src/features/chat/api/continueChat.ts (2 hunks)
- apps/viewer/src/features/chat/api/saveClientLogs.ts (2 hunks)
- apps/viewer/src/features/chat/api/startChat.ts (2 hunks)
- apps/viewer/src/features/chat/api/startChatPreview.ts (2 hunks)
- apps/viewer/src/features/chat/api/updateTypebotInSession.ts (2 hunks)
- packages/bot-engine/blocks/integrations/legacy/openai/createChatCompletionOpenAI.ts (1 hunks)
- packages/bot-engine/blocks/integrations/zemanticAi/executeZemanticAiBlock.ts (2 hunks)
- packages/bot-engine/forge/executeForgedBlock.ts (3 hunks)
- packages/bot-engine/queries/getCredentials.ts (1 hunks)
- packages/bot-engine/whatsapp/sendChatReplyToWhatsApp.ts (5 hunks)
- packages/bot-engine/whatsapp/sendWhatsAppMessage.ts (2 hunks)
- packages/embeds/js/src/features/blocks/inputs/fileUpload/components/FileUploadForm.tsx (2 hunks)
- packages/embeds/js/src/features/blocks/integrations/openai/streamChat.ts (1 hunks)
- packages/embeds/js/src/queries/startChatQuery.ts (1 hunks)
- packages/embeds/js/src/utils/guessApiHost.ts (1 hunks)
- packages/env/env.ts (2 hunks)
- packages/schemas/features/chat/schema.ts (1 hunks)
- packages/schemas/features/whatsapp.ts (1 hunks)
Files skipped from review due to trivial changes (1)
- packages/schemas/features/whatsapp.ts
Additional comments: 25
packages/bot-engine/queries/getCredentials.ts (1)
- 3-6: The implementation of
getCredentials
is concise and follows best practices for database querying with Prisma. The function is correctly marked as async and properly awaits the Prisma call. This ensures that the function can be used reliably in asynchronous contexts without risking unhandled promises.apps/chat-api/src/index.ts (1)
- 1-10: The setup of the Elysia server with
apiRuntime
andwhatsAppRuntime
is correctly implemented. The server's configuration to listen on a port from an environment variable with a fallback to3002
is a good practice, ensuring flexibility in deployment environments. The logging statement for server status is also a good practice for observability.packages/embeds/js/src/utils/guessApiHost.ts (1)
- 9-16: The update to
guessApiHost
introducing theignoreChatApiUrl
parameter is logically sound and provides a clear conditional return based on the parameter's value. Ensure that all callers of this function are updated to handle the potentialundefined
return value, which could affect the application's behavior if not properly managed.packages/bot-engine/whatsapp/sendWhatsAppMessage.ts (1)
- 19-31: Switching to the
ky
library for thesendWhatsAppMessage
function and adapting the request syntax accordingly is correctly implemented. The use of template literals for URL construction and the inclusion of authorization headers follow best practices for HTTP requests. Ensure that the transition fromgot
toky
has been tested thoroughly, especially regarding error handling and response parsing, as these areas can sometimes behave differently between libraries.apps/viewer/src/features/chat/api/saveClientLogs.ts (1)
- 21-23: Refactoring
saveClientLogs
to delegate its functionality tosaveClientLogsFn
from a different module is a good practice, promoting code reusability and separation of concerns. Ensure that error handling is adequately addressed either withinsaveClientLogsFn
or in the calling context to maintain robustness.apps/viewer/src/features/chat/api/startChat.ts (1)
- 18-24: Refactoring the
startChat
function to usestartChatFn
from the chat API runtime and focusing on response handling, including CORS headers, is an effective way to simplify the API layer. This change properly delegates the responsibility of starting a chat to the chat API runtime, aligning with best practices for API design. Ensure that CORS policies are consistently applied across all endpoints to avoid potential cross-origin issues.apps/viewer/src/features/chat/api/updateTypebotInSession.ts (1)
- 22-24: Simplifying the
updateTypebotInSession
function by delegating its core logic toupdateTypebotInSessionFn
from the chat API runtime is a good practice. This change enhances modularity and ensures that the API layer remains focused on handling requests and responses. Ensure thatupdateTypebotInSessionFn
includes comprehensive error handling to manage any issues that may arise during the update process.apps/chat-api/src/runtimes/whatsapp/app.ts (1)
- 5-33: Setting up the WhatsApp runtime for the Elysia server with endpoints for receiving WhatsApp messages and previews is correctly implemented. The structure of the routes, including parameter usage and request body validation, aligns with best practices for API design. The delegation to
receiveMessage
andreceiveMessagePreview
for handling requests ensures a clean separation of concerns. Ensure that these delegated functions include robust error handling and validation to manage any potential issues with incoming requests.apps/chat-api/src/auth.ts (1)
- 5-12: The update to
getAuthenticatedUserId
to support E2E testing environments by returning a mocked user ID based on an environment variable is a practical approach for testing. The function's structure, including the extraction and authentication of bearer tokens, follows best practices for API authentication. Ensure that the use of theNEXT_PUBLIC_E2E_TEST
environment variable is documented and that its implications for security are carefully considered in production environments.apps/viewer/src/features/chat/api/continueChat.ts (1)
- 25-32: Refactoring the
continueChat
function to usecontinueChatFn
from the chat API runtime and focusing on response handling, including CORS headers, is an effective way to simplify the API layer. This change properly delegates the responsibility of continuing a chat to the chat API runtime, aligning with best practices for API design. Ensure that CORS policies are consistently applied across all endpoints to avoid potential cross-origin issues.apps/viewer/src/features/chat/api/startChatPreview.ts (1)
- 31-39: Refactoring the
startChatPreview
function to directly usestartChatPreviewFn
from the chat API runtime simplifies the API layer by removing direct logic for preview chat session management. This change promotes modularity and ensures that the API layer remains focused on handling requests and responses. Ensure thatstartChatPreviewFn
includes comprehensive error handling to manage any issues that may arise during the preview process.apps/chat-api/src/runtimes/whatsapp/receiveMessagePreview.ts (1)
- 10-31: The implementation of
receiveMessagePreview
for handling WhatsApp message previews is correctly done, including validation of the required environment variable and processing of the received message. The use ofTRPCError
for error handling and the extraction of contact details from the message payload follow best practices. Ensure that the function is thoroughly tested, especially the error paths, to confirm that it behaves as expected under various scenarios.apps/chat-api/src/runtimes/whatsapp/receiveMessage.ts (1)
- 11-35: The
receiveMessage
function's implementation for processing incoming WhatsApp messages is correctly done, including the extraction and validation of message content and sender details. The delegation toresumeWhatsAppFlow
for further processing ensures a clean separation of concerns and promotes code reuse. Ensure that the function includes comprehensive error handling to manage any issues that may arise during message processing.apps/chat-api/src/runtimes/api/saveClientLogs.ts (1)
- 12-48: The implementation of
saveClientLogs
within the chat API runtime is well-structured, including robust session validation, error handling withTRPCError
, and log details formatting usingformatLogDetails
. This function ensures that only valid sessions can save logs, enhancing data integrity. Ensure that the error handling paths are thoroughly tested to confirm that appropriate responses are returned for various error conditions.apps/viewer/src/app/api/v1/sessions/[sessionId]/streamMessage/route.ts (1)
- 25-44: Defining an API route for streaming messages with proper handling of OPTIONS and POST methods is correctly implemented. The conditional logic for environments that may not support streaming, such as Vercel, is a thoughtful inclusion. Ensure that the use of
getMessageStream
for obtaining the stream is thoroughly tested, especially the error handling and streaming mechanics, to confirm that it behaves as expected across different environments and scenarios.apps/chat-api/src/runtimes/api/startChatPreview.ts (1)
- 16-78: The implementation of
startChatPreview
within the chat API runtime for handling chat preview initiation is well-structured, including session management and state saving. The use ofstartSession
,restartSession
, andsaveStateToDatabase
for managing session states ensures that the function can handle various scenarios effectively. Ensure that the function is thoroughly tested, especially the session state updates and error handling paths, to confirm that it behaves as expected under different conditions.apps/chat-api/src/runtimes/api/legacy/getOpenAIChatCompletionStream.ts (1)
- 14-58: The implementation of
getOpenAIChatCompletionStream
for creating a chat completion stream with OpenAI is correctly done, including credentials retrieval, decryption, and OpenAI API interaction. The use ofdecryptV2
for credentials decryption and the careful handling of missing credentials are best practices. Ensure that the interaction with the OpenAI API, especially the stream creation and error handling, is thoroughly tested to confirm that it behaves as expected under various scenarios.apps/builder/src/features/whatsapp/startWhatsAppPreview.ts (1)
- 117-117: The addition of
isStreamEnabled: false
to thestartSession
call explicitly disables streaming for WhatsApp previews. Ensure this behavior aligns with the intended functionality and does not negatively impact the user experience or session management.packages/bot-engine/blocks/integrations/legacy/openai/createChatCompletionOpenAI.ts (1)
- 92-93: The addition of
!process.env.VERCEL_ENV
as a condition within thecreateChatCompletionOpenAI
function suggests an intention to alter behavior based on the environment. Verify that this condition correctly implements the desired logic across different environments without causing unintended side effects.packages/bot-engine/forge/executeForgedBlock.ts (2)
- 21-22: The addition of the
env
import from@typebot.io/env
suggests changes in how environment variables are managed. Ensure that this new approach is consistently applied across the application and aligns with the overall strategy for environment variable management.- 44-44: The use of
getCredentials
instead of direct database queries for retrieving credentials abstracts the credentials retrieval process. Confirm thatgetCredentials
correctly handles all scenarios, including error handling and credentials validation, to ensure robustness.packages/bot-engine/whatsapp/sendChatReplyToWhatsApp.ts (1)
- 13-13: The switch from
got
toky
for handling HTTP errors may affect how errors are processed and logged. Ensure that this change is tested thoroughly to confirm that error handling remains effective and consistent with the application's requirements.packages/schemas/features/chat/schema.ts (1)
- 227-227: The introduction of default values for
isStreamEnabled
andisOnlyRegistering
in thestartPreviewChatInputSchema
standardizes the behavior of chat previews. Confirm that setting these fields tofalse
by default aligns with the intended functionality and does not inadvertently affect chat preview behavior.packages/embeds/js/src/features/blocks/inputs/fileUpload/components/FileUploadForm.tsx (1)
- 59-60: The conditional assignment of
apiHost
usingguessApiHost({ ignoreChatApiUrl: true })
whenprops.context.apiHost
is falsy enhances the flexibility in determining the API host. Ensure this logic accurately reflects the intended behavior and does not lead to incorrect API host determination in any scenario.packages/env/env.ts (1)
- 98-98: The introduction of
NEXT_PUBLIC_CHAT_API_URL
as an environment variable allows for configurable chat API URLs. Ensure that this variable is correctly utilized throughout the application and that its presence or absence is handled appropriately in all scenarios where the chat API URL is needed.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Review Status
Actionable comments generated: 4
Configuration used: CodeRabbit UI
Files ignored due to path filters (5)
apps/chat-api/package.json
is excluded by:!**/*.json
apps/chat-api/tsconfig.json
is excluded by:!**/*.json
apps/viewer/package.json
is excluded by:!**/*.json
package.json
is excluded by:!**/*.json
pnpm-lock.yaml
is excluded by:!**/*.yaml
Files selected for processing (17)
- apps/chat-api/src/runtimes/api/app.ts (1 hunks)
- apps/chat-api/src/runtimes/whatsapp/app.ts (1 hunks)
- apps/viewer/src/app/api/v1/sessions/[sessionId]/streamMessage/route.ts (1 hunks)
- apps/viewer/src/features/chat/api/continueChat.ts (2 hunks)
- apps/viewer/src/features/chat/api/saveClientLogs.ts (2 hunks)
- apps/viewer/src/features/chat/api/startChat.ts (2 hunks)
- apps/viewer/src/features/chat/api/startChatPreview.ts (2 hunks)
- apps/viewer/src/features/chat/api/updateTypebotInSession.ts (2 hunks)
- packages/bot-engine/apiHandlers/continueChat.ts (1 hunks)
- packages/bot-engine/apiHandlers/getMessageStream.ts (1 hunks)
- packages/bot-engine/apiHandlers/legacy/getOpenAIChatCompletionStream.ts (1 hunks)
- packages/bot-engine/apiHandlers/receiveMessage.ts (1 hunks)
- packages/bot-engine/apiHandlers/receiveMessagePreview.ts (1 hunks)
- packages/bot-engine/apiHandlers/saveClientLogs.ts (1 hunks)
- packages/bot-engine/apiHandlers/startChat.ts (1 hunks)
- packages/bot-engine/apiHandlers/startChatPreview.ts (1 hunks)
- packages/bot-engine/apiHandlers/updateTypebotInSession.ts (1 hunks)
Files skipped from review as they are similar to previous changes (7)
- apps/chat-api/src/runtimes/api/app.ts
- apps/chat-api/src/runtimes/whatsapp/app.ts
- apps/viewer/src/app/api/v1/sessions/[sessionId]/streamMessage/route.ts
- apps/viewer/src/features/chat/api/saveClientLogs.ts
- apps/viewer/src/features/chat/api/startChat.ts
- apps/viewer/src/features/chat/api/startChatPreview.ts
- apps/viewer/src/features/chat/api/updateTypebotInSession.ts
Additional comments: 13
apps/viewer/src/features/chat/api/continueChat.ts (2)
- 4-4: The import of
continueChat
ascontinueChatFn
from@typebot.io/bot-engine/apiHandlers/continueChat
is correctly done to avoid naming conflicts with the localcontinueChat
function. This is a good practice.- 25-32: The mutation logic correctly handles the response from
continueChatFn
, including setting CORS headers ifcorsOrigin
is present in the response. This is a good implementation for handling cross-origin requests securely. However, ensure that the CORS policy aligns with the application's security requirements.packages/bot-engine/apiHandlers/receiveMessagePreview.ts (1)
- 11-15: The error handling for the absence of
WHATSAPP_PREVIEW_FROM_PHONE_NUMBER_ID
in the environment variables is correctly implemented, throwing aTRPCError
with an appropriate message. This ensures that the function does not proceed without necessary configuration.packages/bot-engine/apiHandlers/receiveMessage.ts (1)
- 25-34: The logic to proceed only if a
phoneNumberId
is found is correctly implemented, returning an appropriate message if not found. This ensures that the function does not proceed without necessary information, which is crucial for identifying the session.packages/bot-engine/apiHandlers/saveClientLogs.ts (2)
- 13-20: The check for the existence of a session and throwing a
TRPCError
if not found is correctly implemented. This ensures that logs are not attempted to be saved for a non-existent session.- 24-29: The check for the existence of a
resultId
in the session's state and throwing aTRPCError
if not found is correctly implemented. This is important for ensuring that logs are associated with a specific result within a session.packages/bot-engine/apiHandlers/startChatPreview.ts (1)
- 16-77: The
startChatPreview
function correctly orchestrates the session start process, including handling the case where only registration is required and saving the session state to the database. The use of conditional logic to determine the session handling based onisOnlyRegistering
is well-implemented. However, ensure that therestartSession
andsaveStateToDatabase
functions properly handle all edge cases and potential errors to maintain data integrity.packages/bot-engine/apiHandlers/legacy/getOpenAIChatCompletionStream.ts (2)
- 25-28: The decryption of OpenAI credentials is correctly implemented using
decryptV2
. Ensure that the encryption and decryption processes are secure and that the encryption keys are managed securely.- 50-57: The creation of the OpenAI chat completion stream is correctly implemented, including handling of default model and temperature settings. However, ensure that error handling is robust, especially for potential API errors from OpenAI, to gracefully handle and log such failures.
packages/bot-engine/apiHandlers/startChat.ts (1)
- 16-90: The
startChat
function correctly orchestrates the session start process, including handling CORS origins and filtering potentially sensitive logs. The logic to determinecorsOrigin
based on allowed origins and the request origin is well-implemented. Ensure that CORS policies are correctly configured to prevent unauthorized cross-origin requests. Additionally, the filtering of potentially sensitive logs is a good practice for privacy and security.packages/bot-engine/apiHandlers/continueChat.ts (1)
- 14-85: The
continueChat
function correctly handles the continuation of a chat session, including session expiration checks, CORS origin handling, and updating the session state in the database. The logic to determine if a session is expired and to set thecorsOrigin
is well-implemented. Ensure that the session expiration logic aligns with the application's requirements and that CORS policies are correctly configured. Additionally, consider adding more robust error handling and logging throughout the function to aid in debugging and operational monitoring.packages/bot-engine/apiHandlers/updateTypebotInSession.ts (1)
- 16-60: The
updateTypebotInSession
function correctly updates the Typebot within a session, including authorization checks and updating the session state in the database. The use of Prisma to query and update the database is correctly implemented. Ensure that the authorization logic is comprehensive and secure, preventing unauthorized users from updating Typebot configurations. Additionally, consider adding more detailed error handling and logging to provide better insights into operation failures.packages/bot-engine/apiHandlers/getMessageStream.ts (1)
- 21-122: The
getMessageStream
function correctly handles the retrieval of message streams for different types of blocks, including OpenAI integration blocks. The logic to decrypt credentials and handle different block types is well-implemented. However, ensure that error handling is robust, especially for potential API errors and decryption failures, to gracefully handle and log such failures. Additionally, consider validating the block options and credentials to ensure they meet the expected format before proceeding with the operation.
bac5a5c
to
7a52997
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Review Status
Actionable comments generated: 0
Configuration used: CodeRabbit UI
Files ignored due to path filters (13)
apps/builder/package.json
is excluded by:!**/*.json
apps/chat-api/package.json
is excluded by:!**/*.json
apps/docs/package.json
is excluded by:!**/*.json
apps/viewer/package.json
is excluded by:!**/*.json
package.json
is excluded by:!**/*.json
packages/deprecated/bot-engine/package.json
is excluded by:!**/*.json
packages/deprecated/typebot-js/package.json
is excluded by:!**/*.json
packages/emails/package.json
is excluded by:!**/*.json
packages/embeds/js/package.json
is excluded by:!**/*.json
packages/embeds/wordpress/package.json
is excluded by:!**/*.json
packages/prisma/package.json
is excluded by:!**/*.json
pnpm-lock.yaml
is excluded by:!**/*.yaml
pnpm-workspace.yaml
is excluded by:!**/*.yaml
Files selected for processing (17)
- .github/workflows/check-and-report-chats-usage.yml (1 hunks)
- .github/workflows/clean-database.yml (1 hunks)
- .github/workflows/publish-lib-to-npm.yml (1 hunks)
- .github/workflows/publish-typebot-js.yml (1 hunks)
- .github/workflows/publish-typebot-nextjs.yml (1 hunks)
- .github/workflows/publish-typebot-react.yml (1 hunks)
- .husky/pre-commit (1 hunks)
- Dockerfile (4 hunks)
- apps/builder/.prettierignore (1 hunks)
- apps/docs/contribute/guides/create-block.mdx (1 hunks)
- apps/docs/contribute/guides/documentation.mdx (1 hunks)
- apps/docs/contribute/guides/local-installation.mdx (3 hunks)
- apps/docs/self-hosting/deploy/manual.mdx (2 hunks)
- apps/docs/self-hosting/deploy/vercel.mdx (2 hunks)
- apps/docs/self-hosting/guides/planetscale.mdx (1 hunks)
- packages/forge/cli/index.ts (1 hunks)
- packages/lib/playwright/baseConfig.ts (1 hunks)
Files skipped from review due to trivial changes (1)
- apps/builder/.prettierignore
Additional comments: 30
.husky/pre-commit (1)
- 4-4: The script uses
bun lint && bun format:check
which assumes specific scripts are defined in thepackage.json
. Verify these scripts exist and are correctly configured forbun
..github/workflows/publish-typebot-js.yml (1)
- 15-18: The workflow has been updated to use
bun
for package management and build tasks. Ensure that allbun
commands are compatible with the project's configuration and that thebun
environment is correctly set up in the CI environment..github/workflows/publish-typebot-react.yml (1)
- 15-18: Similar to the previous workflow, confirm that
bun
commands are correctly configured and that the CI environment supportsbun
..github/workflows/publish-typebot-nextjs.yml (1)
- 15-18: Again, ensure
bun
commands are properly set up and compatible with the project's setup, and verify the CI environment's compatibility withbun
..github/workflows/clean-database.yml (1)
- 20-22: Check that the
bun turbo run db:cleanDatabase
command is correctly implemented in the project and thatbun
is properly configured in the CI environment for database cleaning tasks..github/workflows/publish-lib-to-npm.yml (1)
- 15-22: Ensure that the
bun
commands and thebun config set
command for setting theNPM_TOKEN
are correctly used and that the CI environment is set up to supportbun
.apps/docs/self-hosting/guides/planetscale.mdx (1)
- 10-10: Confirm that the
bun db:push
command is correctly documented and that users are aware of any prerequisites or configurations needed to usebun
for database operations.packages/lib/playwright/baseConfig.ts (1)
- 19-19: Verify that the
bun start
command is correctly configured in the project to be used with Playwright tests and that the environment supportsbun
..github/workflows/check-and-report-chats-usage.yml (1)
- 32-34: Ensure that the
bun
commands are correctly set up for the script execution in the CI environment and thatbun
is properly configured for running thecheckAndReportChatsUsage
task.apps/docs/contribute/guides/documentation.mdx (1)
- 46-46: Confirm that the
bun dev
command is correctly documented for running the docs in dev mode and that users are aware of any prerequisites or configurations needed to usebun
.apps/docs/contribute/guides/local-installation.mdx (5)
- 14-14: Ensure that the documentation correctly guides users to install the
Bun
CLI and that the link provided is accessible and accurate.- 22-22: Verify that the
bun i
command for installing dependencies is correctly documented and that users are aware of any prerequisites or configurations needed to usebun
.- 38-38: Confirm that the
bun dev
command for starting the project in dev mode is correctly documented and that users are aware of any prerequisites or configurations needed to usebun
.- 55-55: Ensure that the
bun dev
command for starting the landing page in dev mode is correctly documented and that users are aware of any prerequisites or configurations needed to usebun
.- 62-62: Verify that the
bun dev
command for starting the docs in dev mode is correctly documented and that users are aware of any prerequisites or configurations needed to usebun
.Dockerfile (6)
- 1-1: Ensure that the base image
oven/bun
is compatible with the project's requirements and that all necessary dependencies are correctly installed.- 13-13: Confirm that the
bun --global install turbo
command is correctly used for installingturbo
globally in the Docker image.- 22-25: Verify that the file copying paths and dependencies are correctly adjusted for the
bun
environment and that all necessary files are included in the Docker image.- 29-29: Ensure that the
bun turbo run build
command is correctly configured for building the project within the Docker image.- 39-40: Check that the copying of
next-runtime-env
and its dependencies is correctly handled for runtime public variable injection in the Docker image.- 44-45: Confirm that the Prisma package and its dependencies are correctly copied and that the schema generation command is properly configured in the Docker image.
apps/docs/self-hosting/deploy/vercel.mdx (2)
- 48-48: Verify that the
bun turbo build --filter=builder... && bun db:migrate
command is correctly documented for building and migrating the database when deploying the builder on Vercel.- 63-63: Ensure that the
bun turbo build --filter=viewer... && bun db:migrate
command is correctly documented for building and migrating the database when deploying the viewer on Vercel.apps/docs/self-hosting/deploy/manual.mdx (6)
- 38-38: Confirm that the documentation correctly guides users to install the
Bun
CLI for manual deployment and that the link provided is accessible and accurate.- 48-48: Ensure that the
bun prisma generate && bun db:migrate
command for database setup and migration is correctly documented for manual deployment.- 54-54: Verify that the
bun install
command for installing dependencies is correctly documented for manual deployment.- 60-60: Confirm that the
bun run build:apps
command for building the apps is correctly documented for manual deployment.- 75-81: Ensure that the
bun start
command and its usage for deploying the builder with PM2 are correctly documented for manual deployment.- 94-100: Verify that the
bun start
command and its usage for deploying the viewer with PM2 are correctly documented for manual deployment.packages/forge/cli/index.ts (1)
- 90-90: Confirm that the
bun install
command is correctly used in the CLI tool for installing dependencies and that it is compatible with the project's setup.
Closes #1154
Summary by CodeRabbit
New Features
NEXT_PUBLIC_CHAT_API_URL
for chat API URL configuration.Bug Fixes
Documentation
bun
instead ofpnpm
.Refactor
bun
.Chores
bun
for package management in Dockerfiles and GitHub workflows..prettierignore
and documentation with new commands.Style
Tests
Revert