import { useState, useEffect, useRef } from "react"; import { BASE, deleteRepo, fetchMcpStatus, fetchMcpPrompt } from "../api"; function ContextualTip() { const [open, setOpen] = useState(false); return (
Hit ⟳ on any repo to re-index with contextual retrieval — the AI prepends a description to each key chunk before embedding. Searches, diagrams, and the semantic map all improve.
)}{agentMode ? "Searches → reads → searches again. Slower but thorough." : "Retrieves code once, streams an answer. Fast."}
{mode === "hybrid" && "Text + semantic combined. Best for most questions."} {mode === "semantic" && "Finds conceptually similar code, even without exact terms."} {mode === "keyword" && "Exact identifier matching. Best for function or class names."}
No repos indexed yet. Add one above.
) : (Not connected — is the backend running?
) : ( <> {/* Primer — one line explaining what this panel exposes. Turns a debug list into a piece of the product story. */}Live from the backend — every capability the agent uses to reason over your code.
{mcpInfo.tools.length > 0 && ({t.description}
{r.description || "Read-only resource exposed over MCP."}
{p.description}
} {args.length > 0 && ({preview}
)}
{!hasRequiredArgs && !preview && (
)}
{hasRequiredArgs && !preview && (
Invoke from chat: type /{p.name} in the message box.