Closed thucpn closed 1 month ago
Latest commit: 44afc0938d786643fb27072635aec1615a94ad11
Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.
Click here to learn what changesets are, and how to add one.
Click here if you're a maintainer who wants to add a changeset to this PR
The recent updates introduce several enhancements across multiple components. Key changes include adding an optional setInput
function in the ChatInputProps
interface, incorporating an isHidden
property in the ContentDisplayConfig
type to conditionally hide components, and refactoring the UploadCsvPreview
component to use a Drawer
for better UI organization. Additionally, the initOpenAI
function now dynamically sets the maxTokens
property based on an environment variable.
File Path | Change Summary |
---|---|
templates/components/ui/html/chat/chat-input.tsx |
Added an optional setInput function to ChatInputProps . |
.../components/ui/chat-message.tsx |
Introduced an isHidden property in ContentDisplayConfig for conditional component visibility. |
.../components/ui/chat/csv-content.tsx |
Restructured the layout for rendering CSV files, removing a paragraph element. |
.../components/ui/upload-csv-preview.tsx |
Refactored to use a Drawer component, updated props, and improved UI layout. |
.../src/controllers/engine/settings.ts |
Updated initOpenAI to dynamically set maxTokens based on LLM_MAX_TOKENS environment variable. |
sequenceDiagram
participant User
participant ChatInput
participant ChatMessage
participant UploadCsvPreview
participant Settings
User->>ChatInput: Enter message
ChatInput->>ChatMessage: Send message content
ChatMessage->>ChatInput: Update visibility based on role
User->>UploadCsvPreview: Upload CSV file
UploadCsvPreview->>Drawer: Display file details in drawer
User->>Settings: Initialize OpenAI
Settings->>Settings: Set maxTokens from environment variable
In the land of code where changes thrive,
A chat input takes a dive,
With hidden roles and drawers wide,
CSVs now in style abide.
Tokens set by the environment's call,
OpenAI stands tall for all.
🌟✨💻
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?
Summary by CodeRabbit
New Features
setInput
to the chat input component for better input management.isHidden
property to conditionally hide chat message components based on user roles.Refactor
UploadCsvPreview
component to use aDrawer
for better organization and interaction.Chores
maxTokens
in the OpenAI initialization based on environment variables for better configurability.