@@ -102,7 +127,7 @@ const MessageBox = ({
size={20}
/>
- Answer
+ Question
-
diff --git a/ui/components/MessageInputActions/Focus.tsx b/ui/components/MessageInputActions/Focus.tsx
index 613078b..3bf6ac4 100644
--- a/ui/components/MessageInputActions/Focus.tsx
+++ b/ui/components/MessageInputActions/Focus.tsx
@@ -4,7 +4,7 @@ import {
Globe,
Pencil,
ScanEye,
- SwatchBook,
+ Eye,
} from 'lucide-react';
import { cn } from '@/lib/utils';
import {
@@ -19,52 +19,28 @@ import { Fragment } from 'react';
const focusModes = [
{
key: 'webSearch',
- title: 'All',
- description: 'Searches across all of the internet',
+ title: 'Recherche internet',
+ description: 'Recherche sur internet directement',
icon:
,
},
{
key: 'academicSearch',
- title: 'Academic',
- description: 'Search in published academic papers',
- icon:
,
+ title: 'Experts',
+ description: 'Recherche un expert pour vous acccompagner',
+ icon:
,
},
{
key: 'writingAssistant',
- title: 'Writing',
+ title: 'Document',
description: 'Chat without searching the web',
icon:
,
},
{
key: 'wolframAlphaSearch',
- title: 'Wolfram Alpha',
- description: 'Computational knowledge engine',
+ title: 'Business Plan',
+ description: 'Réaliser votre Business Plan',
icon:
,
},
- {
- key: 'youtubeSearch',
- title: 'Youtube',
- description: 'Search and watch videos',
- icon: (
-
- ),
- },
- {
- key: 'redditSearch',
- title: 'Reddit',
- description: 'Search for discussions and opinions',
- icon: (
-
- ),
- },
];
const Focus = ({
diff --git a/ui/components/SearchImages.tsx b/ui/components/SearchImages.tsx
index b083af7..03c729d 100644
--- a/ui/components/SearchImages.tsx
+++ b/ui/components/SearchImages.tsx
@@ -23,54 +23,60 @@ const SearchImages = ({
const [open, setOpen] = useState(false);
const [slides, setSlides] = useState
([]);
+ const handleSearch = async () => {
+ setLoading(true);
+ try {
+ console.log("🖼️ Démarrage de la recherche d'images pour:", query);
+
+ const chatModelProvider = localStorage.getItem('chatModelProvider');
+ const chatModel = localStorage.getItem('chatModel');
+ console.log("🖼️ Modèle configuré:", chatModelProvider, chatModel);
+
+ const response = await fetch('/api/images', {
+ method: 'POST',
+ headers: {
+ 'Content-Type': 'application/json',
+ },
+ body: JSON.stringify({
+ query: query,
+ chatHistory: chatHistory,
+ chatModel: {
+ provider: chatModelProvider,
+ model: chatModel,
+ },
+ }),
+ });
+
+ if (!response.ok) {
+ throw new Error(`HTTP error! status: ${response.status}`);
+ }
+
+ const data = await response.json();
+ console.log('🖼️ Résultats de la recherche:', data);
+
+ if (data.images && data.images.length > 0) {
+ setImages(data.images);
+ setSlides(
+ data.images.map((image: Image) => ({
+ src: image.img_src,
+ }))
+ );
+ console.log('🖼️ Images et slides mis à jour:', data.images.length);
+ } else {
+ console.log('🖼️ Aucune image trouvée');
+ }
+ } catch (error) {
+ console.error('🖼️ Erreur lors de la recherche:', error);
+ } finally {
+ setLoading(false);
+ }
+ };
+
return (
<>
{!loading && images === null && (