"use client"; /** * Tool surface configuration: the user-toggleable system tools (same pool as * the chat composer) plus configured MCP tools, grouped by server. * * Semantics mirror the backend config: `null` = everything allowed (default), * an explicit array = whitelist. The picker materialises `null` into "all * selected" for editing and hands back an array. */ import { useTranslation } from "react-i18next"; import type { ToolOptions } from "@/lib/partners-api"; function ToggleRow({ name, description, checked, onToggle, }: { name: string; description?: string; checked: boolean; onToggle: () => void; }) { return ( ); } export default function ToolPicker({ options, enabledTools, builtinTools, mcpTools, onChangeEnabledTools, onChangeBuiltinTools, onChangeMcpTools, }: { options: ToolOptions | null; enabledTools: string[]; builtinTools: string[]; mcpTools: string[]; onChangeEnabledTools: (next: string[]) => void; onChangeBuiltinTools: (next: string[]) => void; onChangeMcpTools: (next: string[]) => void; }) { const { t } = useTranslation(); if (!options) { return (
{t("Loading tools…")}
); } const toggle = ( list: string[], name: string, setter: (next: string[]) => void, ) => { setter( list.includes(name) ? list.filter((n) => n !== name) : [...list, name], ); }; const mcpByServer = new Map{t( "Mounted automatically when the context calls for it — a knowledge base attached, memory available, the sandbox enabled. Deny any you don't want this partner to have.", )}
{t( "Always on and built in — not configurable. partner_read sees the owner's shared memory plus the partner's own; partner_memorize writes only the partner's own memory; partner_search keyword-searches past conversations.", )}
{server}