Added a new file that deploys a preview environment for pull requests using Vercel.
Includes steps to get authentication, checkout the code, and deploy to Vercel with specific environment variables.
.gitignore Changes
Added ".vercel" to the .gitignore file.
Added a newline at the end of the file.
Removal of Unused Code
Removed some unused code related to conversations and knowledge.
Removed the creation of new conversations and updating conversation lists.
Removed a watch effect related to knowledge used in conversations.
Changes to app-prompt-input.vue
Modified the onType function to adjust the height of the textarea dynamically.
Removed the textareaStyle variable.
Updated the styles for the textarea element.
Modified the handleEnter function to call the onSend function.
Button Component Changes
Changed the positioning of the background color for a button component.
Now pins to the top center instead of the right top corner when outside the element.
Changed the color scheme with new values for toColor and fromColor.
ChatGPT Client Check and Message Filtering
Added a check to ensure that the ChatGPT client is only created on the client-side.
Filters messages based on their role.
Conditional Logic in useSetup Function
Added conditional logic to the useSetup function in setup.ts.
Checks if the process is running on the client side and then uses the useConversations hook to update the conversation list, create a new conversation if none exist, and switch to the first conversation.
Adds a watcher to check for changes in the current conversation and update the conversation list accordingly.
Moved the updateKnowledgeList call inside the conditional block.
Preview Environment Deployment
.gitignore Changes
Removal of Unused Code
Changes to app-prompt-input.vue
onType
function to adjust the height of the textarea dynamically.textareaStyle
variable.handleEnter
function to call theonSend
function.Button Component Changes
toColor
andfromColor
.ChatGPT Client Check and Message Filtering
Conditional Logic in useSetup Function
useSetup
function insetup.ts
.useConversations
hook to update the conversation list, create a new conversation if none exist, and switch to the first conversation.updateKnowledgeList
call inside the conditional block.