import { McpClientPanel } from "@/components/McpClientPanel"; import { Badge } from "@/components/ui/badge"; import { Button } from "@/components/ui/button"; import { Card, CardContent, CardDescription, CardHeader, CardTitle, } from "@/components/ui/card"; import { Input } from "@/components/ui/input"; import { Label } from "@/components/ui/label"; import { useMcpSetup } from "@/hooks/useMcpSetup"; import { apiPath } from "@/lib/api"; import { Activity, Cpu, Database, MessageSquare, Save, Sliders, } from "lucide-react"; import { useEffect, useState } from "react"; interface LlmProvider { id: string; label: string; base_url: string; models: string[]; needs_key: boolean; } interface ProvidersResponse { providers: LlmProvider[]; } export function Settings() { const mcp = useMcpSetup(); const [providers, setProviders] = useState([]); const [selectedProvider, setSelectedProvider] = useState( () => localStorage.getItem("pywinauto-llm-provider") || "ollama", ); const [selectedModel, setSelectedModel] = useState( () => localStorage.getItem("pywinauto-llm-model") || "", ); const [llmSaved, setLlmSaved] = useState(false); useEffect(() => { fetch(apiPath("/api/llm/providers")) .then((r) => r.json() as Promise) .then((data) => setProviders(data.providers)) .catch(() => setProviders([])); }, []); const currentProvider = providers.find((p) => p.id === selectedProvider); const handleSaveLlm = () => { localStorage.setItem("pywinauto-llm-provider", selectedProvider); localStorage.setItem("pywinauto-llm-model", selectedModel); setLlmSaved(true); setTimeout(() => setLlmSaved(false), 2000); }; return (

Project Settings

Local URLs for this dev UI only

dev UI
{mcp.isDesktop ? (
) : null}
API Configuration REST bridge for this web UI

Dev UI uses relative{" "} /api/v1/… proxied to{" "} 127.0.0.1:10789 (see{" "} web_sota/vite.config.ts ). Override with{" "} VITE_API_ORIGIN if needed.

Local LLM (chat page) Ollama / LM Studio — not the MCP server itself

The Local LLM sidebar route calls /api/v1/llm/*{" "} on this backend, which forwards to{" "} localhost only{" "} (SSRF-safe). Default base URL from env{" "} PYWINAUTO_LLM_BASE_URL{" "} (Ollama 11434, LM Studio{" "} 1234 ).

Repo context for system prompts:{" "} llm_repo_context.py ·{" "} docs/LLM_REPO_CONTEXT.md

Persistence Global state and history management

Local Cache

Store UI state in browser

ENABLED
LLM Configuration Discovered local LLM providers — set model for chat

{currentProvider?.models.length ? `${currentProvider.models.length} model(s) detected` : "Start your local LLM to discover models"}

Infrastructure Standards Materialist/Reductionist technical compliance

Architecture

RESTful Automation

Protocol

pywinauto over HTTP

Consistency

Dashboard and biometrics use live{" "} /api/v1 data where wired; no decorative fake metrics.

); }