Files
simbarag/raggr-frontend/src/components/QuestionBubble.tsx
Ryan Chen 0415610d64 Add image upload and vision analysis to Ask Simba chat
Users can now attach images in the web chat for Simba to analyze using
Ollama's gemma3 vision model. Images are stored in Garage (S3-compatible)
and displayed in chat history.

Also fixes aerich migration config by extracting TORTOISE_CONFIG into a
standalone config/db.py module, removing the stale aerich_config.py, and
adding missing MODELS_STATE to migration 3.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-04-04 08:03:19 -04:00

32 lines
834 B
TypeScript

import { cn } from "../lib/utils";
import { conversationService } from "../api/conversationService";
type QuestionBubbleProps = {
text: string;
image_key?: string | null;
};
export const QuestionBubble = ({ text, image_key }: QuestionBubbleProps) => {
return (
<div className="flex justify-end message-enter">
<div
className={cn(
"max-w-[72%] rounded-3xl rounded-br-md",
"bg-leaf-pale border border-leaf-light/60",
"px-4 py-3 text-sm leading-relaxed text-charcoal",
"shadow-sm shadow-leaf/10",
)}
>
{image_key && (
<img
src={conversationService.getImageUrl(image_key)}
alt="Uploaded image"
className="max-w-full rounded-xl mb-2"
/>
)}
{text}
</div>
</div>
);
};