feat(client): remove Tavily preset button from MCP server form

Drop the "Use Tavily preset" quick-fill button from the Add server form
and its now-dead supporting code:
- remove the preset JSX block, applyTavilyPreset handler and TAVILY_PRESET
  constant in ai-mcp-server-form.tsx
- drop the now-unused McpTransport import
- remove the unused "Use Tavily preset" i18n key from en-US translations

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
claude_code
2026-06-22 17:41:35 +03:00
parent e826d7a008
commit 39ce47a11f
2 changed files with 0 additions and 26 deletions

View File

@@ -26,7 +26,6 @@ import {
IAiMcpServer,
IAiMcpServerCreate,
IAiMcpServerUpdate,
McpTransport,
} from "@/features/workspace/services/ai-mcp-server-service.ts";
const formSchema = z.object({
@@ -62,13 +61,6 @@ function buildInitialValues(server?: IAiMcpServer): FormValues {
};
}
// Tavily preset (§8.10): the API key goes in the Authorization HEADER, not the URL.
const TAVILY_PRESET = {
name: "Tavily",
transport: "http" as McpTransport,
url: "https://mcp.tavily.com/mcp/",
};
export default function AiMcpServerForm({
server,
onClose,
@@ -155,28 +147,11 @@ export default function AiMcpServerForm({
form.setFieldValue("authHeader", "");
}
function applyTavilyPreset() {
form.setFieldValue("name", TAVILY_PRESET.name);
form.setFieldValue("transport", TAVILY_PRESET.transport);
form.setFieldValue("url", TAVILY_PRESET.url);
// Prefill the Bearer prefix; the admin pastes their Tavily key after it.
form.setFieldValue("authHeader", "Bearer ");
setHeadersCleared(false);
}
const testResult = testMutation.data;
const isSaving = createMutation.isPending || updateMutation.isPending;
return (
<Stack>
{!isEdit && (
<Group justify="flex-start">
<Button variant="default" size="compact-sm" onClick={applyTavilyPreset}>
{t("Use Tavily preset")}
</Button>
</Group>
)}
<TextInput
label={t("Server name")}
{...form.getInputProps("name")}