mirror of
https://gitlab.com/soapbox-pub/shakespeare.git
synced 2026-12-06 00:27:24 +00:00
Don't upload images to Blossom
This commit is contained in:
5 files changed
+39
-93
No files matched your search
@@ -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(() => {
|
||||
|
||||
Reference in new issue
Block a user