Don't upload images to Blossom

This commit is contained in:
Alex Gleason committed 2025-11-23 11:30:34 -06:00
1 parent e88b8c90d9
commit d2a8ee36f7
5 files changed
+39 -93

No files matched your search

+3 -6
View File
@@ -44,7 +44,6 @@ import { Quilly } from '@/components/Quilly';
import { ShakespeareLogo } from '@/components/ShakespeareLogo';
import { ChatInput } from '@/components/Shakespeare/ChatInput';
import { buildMessageContent } from '@/lib/buildMessageContent';
import { useUploadFile } from '@/hooks/useUploadFile';
// Clean interfaces now handled by proper hooks
@@ -78,7 +77,6 @@ export const ChatPane = forwardRef<ChatPaneRef, ChatPaneProps>(({
const { fs } = useFS();
const { git } = useGit();
const { user } = useCurrentUser();
const { mutateAsync: uploadFile } = useUploadFile();
const { models } = useProviderModels();
const { config } = useAppContext();
const { projectsPath, tmpPath, pluginsPath } = useFSPaths();
@@ -441,20 +439,19 @@ export const ChatPane = forwardRef<ChatPaneRef, ChatPaneProps>(({
const modelToUse = providerModel.trim();
// Build message content from input and attached files
// Pass uploadFile function if user is logged in
// Images are converted to base64-encoded data URLs
const messageContent = await buildMessageContent(
input,
attachedFiles,
fs,
tmpPath,
user ? uploadFile : undefined
tmpPath
);
// Add model to recently used when sending a message
addRecentlyUsedModel(modelToUse);
await sendMessage(messageContent, modelToUse);
}, [addRecentlyUsedModel, fs, isConfigured, isLoading, providerModel, sendMessage, tmpPath, uploadFile, user]);
}, [addRecentlyUsedModel, fs, isConfigured, isLoading, providerModel, sendMessage, tmpPath]);
// Handle textarea focus - show onboarding if not configured
const handleTextareaFocus = useCallback(() => {