✨ feat: add image upload toggle with auto-disable after sending
Add a toggle switch to enable/disable image uploads in the playground, with automatic disabling after message sending to prevent accidental image inclusion in subsequent messages. Changes: - Add `imageEnabled` field to default configuration with false as default - Enhance ImageUrlInput component with enable/disable toggle switch - Update UI to show disabled state with opacity and color changes - Modify message sending logic to only include images when enabled - Implement auto-disable functionality after message is sent - Update SettingsPanel to pass through new imageEnabled props - Maintain backward compatibility with existing configurations User Experience: - Images are disabled by default for privacy and intentional usage - Users must explicitly enable image uploads before adding URLs - After sending a message with images, the feature auto-disables - Clear visual feedback shows current enabled/disabled state - Manual control allows users to re-enable when needed This improves user control over multimodal conversations and prevents unintentional image sharing in follow-up messages.
This commit is contained in:
@@ -12,6 +12,7 @@ const DEFAULT_CONFIG = {
|
||||
seed: null,
|
||||
stream: true,
|
||||
imageUrls: [],
|
||||
imageEnabled: false,
|
||||
},
|
||||
parameterEnabled: {
|
||||
max_tokens: true,
|
||||
|
||||
Reference in New Issue
Block a user