import React from "react";
import { Button } from "@/src/components/ui/button";
import { Badge } from "@/src/components/ui/badge";
import { ChevronDown, Wrench, Braces, Variable } from "lucide-react";
import {
Popover,
PopoverContent,
PopoverTrigger,
} from "@/src/components/ui/popover";
import { usePlaygroundContext } from "../context";
import { usePlaygroundWindowSize } from "../hooks/usePlaygroundWindowSize";
import { PlaygroundTools, PlaygroundToolsPopover } from "./PlaygroundTools";
import {
StructuredOutputSchemaSection,
StructuredOutputSchemaPopover,
} from "./StructuredOutputSchemaSection";
import { Variables } from "./Variables";
import { MessagePlaceholders } from "./MessagePlaceholders";
export const ConfigurationDropdowns: React.FC = () => {
const { containerRef, isVeryCompact, isCompact } = usePlaygroundWindowSize();
const {
tools,
structuredOutputSchema,
promptVariables,
messagePlaceholders,
} = usePlaygroundContext();
const toolsCount = tools.length;
const hasSchema = structuredOutputSchema ? 1 : 0;
const variablesCount = promptVariables.length + messagePlaceholders.length;
// Helper function to get responsive content (text or icon)
const getResponsiveContent = (
fullText: string,
IconComponent: React.ComponentType<{ className?: string }>,
abbreviation?: string,
) => {
if (isVeryCompact) {
return
Configure tools for your model to use.
No tools attached.
Configure JSON schema for structured output.
No schema provided.
Configure variables and message placeholders for your prompts.
No variables or message placeholders defined.