mirror of
https://github.com/runkids/skillshare.git
synced 2026-11-19 02:17:09 +00:00
fix(ui): turn a global MCP server off only for the project's Agents
Turning a global server off from a project wrote the switch for every Agent the server reaches, so a project that uses OpenCode and Pi also got a Kilo Code file and an entry in Claude Code's off list. The switch now goes to the Agents the project itself uses. Claude Code keeps that off list in ~/.claude.json, the file that also holds the user-scope servers. The Sync page grouped both under the one path and said "Server entry will be removed", which read as deleting the global server when it only turns the server back on in one project. The off list is now its own group that names the project, and its rows say whether the server is turned off or back on there. Refs #289
This commit is contained in:
@@ -34,11 +34,12 @@ export default function MCPPreview({ plan, onResolve, busy = false }: Props) {
|
||||
<AlertTriangle size={16} className="text-warning shrink-0 mt-0.5" aria-hidden="true" />{t('mcp.conflictHint')}
|
||||
</p> : null}
|
||||
<div className="space-y-3 max-h-[50vh] overflow-auto">
|
||||
{files.map(file => <section key={file.path} aria-label={file.target} className="border border-muted rounded-[var(--radius-md)] overflow-hidden">
|
||||
{files.map(file => <section key={file.key} aria-label={file.target} className="border border-muted rounded-[var(--radius-md)] overflow-hidden">
|
||||
<header className="flex flex-wrap items-center gap-2 px-3 py-2 bg-paper text-sm">
|
||||
<AgentIcon target={file.target} />
|
||||
<span className="font-semibold">{file.target}</span>
|
||||
<span className="font-mono text-xs text-pencil-light break-all">{file.path}</span>
|
||||
{file.offListFor ? <span className="text-xs text-pencil-light">{t('sync.mcp.offList', { project: file.offListFor })}</span> : null}
|
||||
</header>
|
||||
<ul className="divide-y divide-dashed divide-pencil-light/30">
|
||||
{file.changes.map(change => <li key={change.name} className="px-3 py-2.5 space-y-2">
|
||||
|
||||
@@ -15,7 +15,7 @@ import MCPServerDialog from './MCPServerDialog';
|
||||
import MCPServerList from './MCPServerList';
|
||||
import MCPSyncBox from './MCPSyncBox';
|
||||
import { TargetPill } from './TargetPicker';
|
||||
import { buildMatrix, describeEndpoint, describeError, projectOf, targetLabel } from './mcpView';
|
||||
import { buildMatrix, describeEndpoint, describeError, projectOf, switchTargets, targetLabel } from './mcpView';
|
||||
|
||||
type MCPList = Awaited<ReturnType<typeof mcpApi.list>>;
|
||||
|
||||
@@ -75,8 +75,7 @@ export default function MCPProjectView({ data, root, offered, onChanged, onRemov
|
||||
};
|
||||
|
||||
/** Agents where this global server can be turned off from here. */
|
||||
const switchable = (server: MCPServer) =>
|
||||
(server.targets ?? defaults).filter((x) => offTargets.includes(x) && (x !== 'pi' || server.piExtension === 'pi-mcp-adapter'));
|
||||
const switchable = (server: MCPServer) => switchTargets(server, defaults, targets);
|
||||
|
||||
const toggleGlobal = (n: string, on: boolean) => {
|
||||
const to = switchable(globals[n]);
|
||||
@@ -143,7 +142,9 @@ export default function MCPProjectView({ data, root, offered, onChanged, onRemov
|
||||
const to = switchable(server);
|
||||
const hint = entry && !off ? t('mcp.projects.overridden')
|
||||
: off ? (entry.targets ?? to).filter((x) => switchField[x]).map((x) => t('mcp.projects.writesSwitch', { target: targetLabel(x), field: switchField[x] })).join(', ')
|
||||
: to.length > 0 ? t('mcp.projects.followsGlobal') : t('mcp.projects.noSwitch');
|
||||
: to.length > 0 ? t('mcp.projects.followsGlobal')
|
||||
// Some Agent could turn it off, just none this project uses.
|
||||
: switchTargets(server, defaults, mcpOffTargets).length > 0 ? t('mcp.projects.noSwitchHere') : t('mcp.projects.noSwitch');
|
||||
return (
|
||||
<div key={n} className="ss-r">
|
||||
<span className="ss-cat sm mcp"><Plug size={14} /></span>
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
import { describe, expect, it } from 'vitest';
|
||||
import type { MCPPlan } from '../../api/mcp';
|
||||
import { buildMatrix, describeError, describeMessage, isResolvable, joinCommand, splitCommand, targetLabel } from './mcpView';
|
||||
import { buildMatrix, describeError, describeMessage, groupByFile, isResolvable, joinCommand, splitCommand, switchTargets, targetLabel } from './mcpView';
|
||||
import { mcpTargets } from '../../api/mcp';
|
||||
|
||||
const change = (name: string, target: string, action: string, message?: string) => ({ name, target, action, message, path: `/${target}.json` });
|
||||
@@ -58,3 +58,26 @@ describe('MCP view helpers', () => {
|
||||
expect(splitCommand(joinCommand(words))).toEqual(words);
|
||||
});
|
||||
});
|
||||
|
||||
describe('switchTargets', () => {
|
||||
const context7 = { command: 'npx', targets: ['claude', 'opencode', 'kilocode', 'pi'], piExtension: 'pi-mcp-adapter' };
|
||||
|
||||
it('turns a global server off only for the Agents the project uses', () => {
|
||||
expect(switchTargets(context7, [], ['opencode', 'pi'])).toEqual(['opencode', 'pi']);
|
||||
});
|
||||
|
||||
it('follows the default targets of a server that names none', () => {
|
||||
expect(switchTargets({ command: 'npx' }, ['claude', 'cursor'], ['claude', 'cursor'])).toEqual(['claude']);
|
||||
});
|
||||
});
|
||||
|
||||
describe('groupByFile', () => {
|
||||
it("keeps a project's Claude off list apart from the servers in the same file", () => {
|
||||
const groups = groupByFile([
|
||||
{ target: 'claude', path: '/home/u/.claude.json', name: 'context7', action: 'unchanged' },
|
||||
{ target: 'claude', path: '/home/u/.claude.json', name: 'context7', root: '/work/app', action: 'remove' },
|
||||
{ target: 'opencode', path: '/work/app/opencode.json', name: 'context7', root: '/work/app', action: 'add' },
|
||||
]);
|
||||
expect(groups.map((g) => g.offListFor)).toEqual([undefined, '/work/app', undefined]);
|
||||
});
|
||||
});
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
import { mcpOffTargets } from '../../api/mcp';
|
||||
import type { MCPPlan, MCPServer } from '../../api/mcp';
|
||||
|
||||
export type MCPChange = MCPPlan['changes'][number];
|
||||
@@ -24,11 +25,13 @@ export function buildMatrix(servers: Record<string, MCPServer>, plan: MCPPlan |
|
||||
return [...rows.values()];
|
||||
}
|
||||
|
||||
const inside = (root: string, path: string) => path.startsWith(root + '/') || path.startsWith(root + '\\');
|
||||
|
||||
/** The mcp.projects root a change belongs to, if any. */
|
||||
// The plan says so outright, because Claude Code's off list is written to the global file
|
||||
// rather than to anything under the folder it turns a server off for.
|
||||
export const projectOf = (roots: string[], change: MCPChange) =>
|
||||
change.root ?? roots.find((root) => change.path.startsWith(root + '/') || change.path.startsWith(root + '\\'));
|
||||
change.root ?? roots.find((root) => inside(root, change.path));
|
||||
|
||||
export function countActions(changes: MCPChange[]): Record<string, number> {
|
||||
const counts: Record<string, number> = {};
|
||||
@@ -36,12 +39,18 @@ export function countActions(changes: MCPChange[]): Record<string, number> {
|
||||
return counts;
|
||||
}
|
||||
|
||||
/** The project a change turns a server off for, when it edits Claude Code's off list. */
|
||||
// That list is the one project destination outside its root: it sits in ~/.claude.json, next
|
||||
// to the user-scope servers, so the path alone reads as a change to the global server.
|
||||
export const offListFor = (change: MCPChange) => (change.root && !inside(change.root, change.path) ? change.root : undefined);
|
||||
|
||||
export function groupByFile(changes: MCPChange[]) {
|
||||
const files = new Map<string, { target: string; path: string; changes: MCPChange[] }>();
|
||||
const files = new Map<string, { key: string; target: string; path: string; offListFor?: string; changes: MCPChange[] }>();
|
||||
for (const change of changes) {
|
||||
const file = files.get(change.path) ?? { target: change.target, path: change.path, changes: [] };
|
||||
const key = `${change.path}\0${offListFor(change) ?? ''}`;
|
||||
const file = files.get(key) ?? { key, target: change.target, path: change.path, offListFor: offListFor(change), changes: [] };
|
||||
file.changes.push(change);
|
||||
files.set(change.path, file);
|
||||
files.set(key, file);
|
||||
}
|
||||
return [...files.values()];
|
||||
}
|
||||
@@ -102,6 +111,10 @@ export const isResolvable = (change: MCPChange) =>
|
||||
change.action === 'conflict' &&
|
||||
['mcp.conflictChanged', 'mcp.conflictUnmanaged', 'mcp.conflictOrphaned'].includes(conflictKeys[conflictPrefix(change.message ?? '')]);
|
||||
|
||||
/** Agents a project can turn a global server off for: those it uses, that the server reaches and that have a switch. */
|
||||
export const switchTargets = (server: MCPServer, defaults: string[], projectTargets: readonly string[]) =>
|
||||
(server.targets ?? defaults).filter((x) => mcpOffTargets.includes(x) && projectTargets.includes(x) && (x !== 'pi' || server.piExtension === 'pi-mcp-adapter'));
|
||||
|
||||
/** Display names for the MCP clients, as in their own docs. */
|
||||
export const targetLabel = (target: string) =>
|
||||
({ pi: 'Pi', claude: 'Claude', codex: 'Codex', cursor: 'Cursor', vscode: 'VS Code', opencode: 'OpenCode', kilocode: 'Kilo Code', grok: 'Grok', antigravity: 'Antigravity', amp: 'Amp', 'claude-desktop': 'Claude Desktop', cline: 'Cline', copilot: 'Copilot CLI', factory: 'Factory', gemini: 'Gemini CLI', goose: 'Goose', junie: 'Junie', kiro: 'Kiro', lmstudio: 'LM Studio', warp: 'Warp', windsurf: 'Windsurf' })[target] ?? target;
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
import { beforeEach, describe, expect, it, vi } from 'vitest';
|
||||
import { api, type DiffTarget, type Target } from '../../api/client';
|
||||
import { mcpApi, type MCPPlan } from '../../api/mcp';
|
||||
import { countChanges, countEdited, extraGroups, MCP_CHANGED, pendingCount, resourceGroups, runSync } from './syncView';
|
||||
import { countChanges, countEdited, extraGroups, MCP_CHANGED, mcpGroups, pendingCount, resourceGroups, runSync } from './syncView';
|
||||
|
||||
vi.mock('../../api/client', async (load) => ({ ...await load<typeof import('../../api/client')>(), api: { sync: vi.fn(), syncExtras: vi.fn() } }));
|
||||
vi.mock('../../api/mcp', async (load) => ({ ...await load<typeof import('../../api/mcp')>(), mcpApi: { preview: vi.fn(), configure: vi.fn() } }));
|
||||
@@ -86,3 +86,14 @@ describe('runSync', () => {
|
||||
expect(mcpApi.configure).not.toHaveBeenCalled();
|
||||
});
|
||||
});
|
||||
|
||||
describe('mcpGroups', () => {
|
||||
it("says a change to a project's Claude off list turns the server on or off there", () => {
|
||||
const plan = { revision: 'r', sourcePath: '', blocked: false, changes: [
|
||||
{ target: 'claude', path: '/home/u/.claude.json', name: 'context7', root: '/work/app', action: 'remove' },
|
||||
{ target: 'claude', path: '/home/u/.claude.json', name: 'github', root: '/work/app', action: 'add' },
|
||||
] };
|
||||
const [group] = mcpGroups(plan);
|
||||
expect([group.project, ...group.rows.map((r) => r.text)]).toEqual(['/work/app', 'sync.row.mcp.offList.remove', 'sync.row.mcp.offList.add']);
|
||||
});
|
||||
});
|
||||
|
||||
@@ -26,6 +26,8 @@ export interface ChangeGroup {
|
||||
name: string;
|
||||
mode?: string;
|
||||
path?: string;
|
||||
/** Set on Claude Code's off list, which sits in the global file: the project it is for */
|
||||
project?: string;
|
||||
rows: ChangeRow[];
|
||||
}
|
||||
|
||||
@@ -93,16 +95,18 @@ const MCP_ICON: Record<string, RowIcon> = { add: 'add', update: 'update', remove
|
||||
|
||||
export function mcpGroups(plan: MCPPlan | null | undefined): ChangeGroup[] {
|
||||
return groupByFile((plan?.changes ?? []).filter((c) => MCP_ICON[c.action])).map((file) => ({
|
||||
key: `mcp/${file.path}`,
|
||||
key: `mcp/${file.key}`,
|
||||
part: 'mcp',
|
||||
name: file.target,
|
||||
path: file.path,
|
||||
project: file.offListFor,
|
||||
rows: file.changes.map((c: MCPChange) => ({
|
||||
key: `${file.path}/${c.name}`,
|
||||
key: `${file.key}/${c.name}`,
|
||||
part: 'mcp',
|
||||
name: c.name,
|
||||
icon: MCP_ICON[c.action],
|
||||
text: c.action === 'conflict' ? null : `sync.row.mcp.${c.action}`,
|
||||
// In the off list, adding a name turns the server off and removing it turns it back on.
|
||||
text: c.action === 'conflict' ? null : file.offListFor && c.action !== 'update' ? `sync.row.mcp.offList.${c.action}` : `sync.row.mcp.${c.action}`,
|
||||
detail: c.message,
|
||||
counts: c.action !== 'conflict',
|
||||
})),
|
||||
|
||||
@@ -1233,6 +1233,9 @@
|
||||
"sync.row.mcp.add": "Neuer Server-Eintrag",
|
||||
"sync.row.mcp.update": "Server-Eintrag wird aktualisiert",
|
||||
"sync.row.mcp.remove": "Server-Eintrag wird entfernt",
|
||||
"sync.row.mcp.offList.add": "Wird in diesem Projekt ausgeschaltet",
|
||||
"sync.row.mcp.offList.remove": "Wird in diesem Projekt wieder eingeschaltet",
|
||||
"sync.mcp.offList": "Aus-Liste für {project}",
|
||||
"sync.row.pruneIgnored": "In der Quelle ignoriert. Wird aus diesem Ziel entfernt",
|
||||
"sync.mcpBlocked": "MCP hat Konflikte, daher sind seine Änderungen nicht Teil dieser Synchronisierung.",
|
||||
"sync.openMcp": "MCP öffnen",
|
||||
@@ -1649,6 +1652,7 @@
|
||||
"mcp.projects.followsGlobal": "Folgt global. In dieses Projekt wird nichts geschrieben.",
|
||||
"mcp.projects.writesSwitch": "{target} bekommt {field}",
|
||||
"mcp.projects.noSwitch": "Keiner seiner Agents hat einen Schalter pro Projekt.",
|
||||
"mcp.projects.noSwitchHere": "Keiner der Agents dieses Projekts kann ihn hier ausschalten.",
|
||||
"mcp.projects.overridden": "Dieses Projekt definiert einen eigenen Server mit diesem Namen.",
|
||||
"mcp.kilocodeProjectEnv": "Kilo Code MCP {name}: Kilo erlaubt keine Umgebungsvariablen-Referenzen in der Projektkonfiguration und ignoriert die gesamte Datei, sobald eine gefunden wird. Entfernen Sie hier fromEnv oder definieren Sie diesen Server im globalen Modus.",
|
||||
"mcp.importError.json": "Kein gültiges JSON oder JSONC. Syntax prüfen.",
|
||||
|
||||
@@ -1233,6 +1233,9 @@
|
||||
"sync.row.mcp.add": "New server entry",
|
||||
"sync.row.mcp.update": "Server entry will be updated",
|
||||
"sync.row.mcp.remove": "Server entry will be removed",
|
||||
"sync.row.mcp.offList.add": "Will be turned off in this project",
|
||||
"sync.row.mcp.offList.remove": "Will be turned back on in this project",
|
||||
"sync.mcp.offList": "Off list for {project}",
|
||||
"sync.row.pruneIgnored": "Ignored in source. Will be removed from this target",
|
||||
"sync.mcpBlocked": "MCP has conflicts, so its changes are left out of this sync.",
|
||||
"sync.openMcp": "Open MCP",
|
||||
@@ -1649,6 +1652,7 @@
|
||||
"mcp.projects.followsGlobal": "Follows global. Nothing is written to this project.",
|
||||
"mcp.projects.writesSwitch": "{target} gets {field}",
|
||||
"mcp.projects.noSwitch": "None of its Agents has a per-project switch.",
|
||||
"mcp.projects.noSwitchHere": "None of the Agents this project uses can turn it off here.",
|
||||
"mcp.projects.overridden": "This project defines its own server with this name.",
|
||||
"mcp.kilocodeProjectEnv": "Kilo Code MCP {name}: Kilo does not allow environment references in project config and ignores the whole file when it finds one; remove fromEnv here or define this server in global mode",
|
||||
"mcp.importError.json": "Not valid JSON or JSONC. Check the syntax.",
|
||||
|
||||
@@ -1233,6 +1233,9 @@
|
||||
"sync.row.mcp.add": "Nueva entrada de servidor",
|
||||
"sync.row.mcp.update": "Se actualizará la entrada del servidor",
|
||||
"sync.row.mcp.remove": "Se eliminará la entrada del servidor",
|
||||
"sync.row.mcp.offList.add": "Se desactivará en este proyecto",
|
||||
"sync.row.mcp.offList.remove": "Se volverá a activar en este proyecto",
|
||||
"sync.mcp.offList": "Lista de desactivados de {project}",
|
||||
"sync.row.pruneIgnored": "Ignorado en el origen. Se eliminará de este destino",
|
||||
"sync.mcpBlocked": "MCP tiene conflictos, así que sus cambios quedan fuera de esta sincronización.",
|
||||
"sync.openMcp": "Abrir MCP",
|
||||
@@ -1649,6 +1652,7 @@
|
||||
"mcp.projects.followsGlobal": "Sigue a global. No se escribe nada en este proyecto.",
|
||||
"mcp.projects.writesSwitch": "{target} recibe {field}",
|
||||
"mcp.projects.noSwitch": "Ninguno de sus Agents tiene un interruptor por proyecto.",
|
||||
"mcp.projects.noSwitchHere": "Ninguno de los Agents que usa este proyecto puede desactivarlo aquí.",
|
||||
"mcp.projects.overridden": "Este proyecto define su propio servidor con este nombre.",
|
||||
"mcp.kilocodeProjectEnv": "Kilo Code MCP {name}: Kilo no permite referencias a variables de entorno en la configuración del proyecto e ignora todo el archivo cuando encuentra una; elimina fromEnv aquí o define este servidor en modo global.",
|
||||
"mcp.importError.json": "No es JSON ni JSONC válido. Revisa la sintaxis.",
|
||||
|
||||
@@ -1233,6 +1233,9 @@
|
||||
"sync.row.mcp.add": "ورودی سرور جدید",
|
||||
"sync.row.mcp.update": "ورودی سرور بهروزرسانی میشود",
|
||||
"sync.row.mcp.remove": "ورودی سرور حذف میشود",
|
||||
"sync.row.mcp.offList.add": "در این پروژه خاموش میشود",
|
||||
"sync.row.mcp.offList.remove": "در این پروژه دوباره روشن میشود",
|
||||
"sync.mcp.offList": "فهرست خاموشها برای {project}",
|
||||
"sync.row.pruneIgnored": "در منبع نادیده گرفته شده. از این مقصد حذف میشود",
|
||||
"sync.mcpBlocked": "MCP تعارض دارد، پس تغییرات آن در این همگامسازی نیست.",
|
||||
"sync.openMcp": "باز کردن MCP",
|
||||
@@ -1649,6 +1652,7 @@
|
||||
"mcp.projects.followsGlobal": "از سراسری پیروی میکند. چیزی در این پروژه نوشته نمیشود.",
|
||||
"mcp.projects.writesSwitch": "{target} مقدار {field} را میگیرد",
|
||||
"mcp.projects.noSwitch": "هیچکدام از Agentهایش کلید جداگانه برای هر پروژه ندارد.",
|
||||
"mcp.projects.noSwitchHere": "هیچکدام از Agentهای این پروژه نمیتواند آن را اینجا خاموش کند.",
|
||||
"mcp.projects.overridden": "این پروژه سرور خودش را با همین نام تعریف کرده است.",
|
||||
"mcp.kilocodeProjectEnv": "Kilo Code MCP {name}: کیلو ارجاع به متغیر محیطی را در پیکربندی پروژه مجاز نمیداند و با یافتن آن، کل فایل را نادیده میگیرد؛ fromEnv را از اینجا حذف کنید یا این سرور را در حالت سراسری تعریف کنید.",
|
||||
"mcp.importError.json": "JSON یا JSONC معتبر نیست. نحو را بررسی کنید.",
|
||||
|
||||
@@ -1233,6 +1233,9 @@
|
||||
"sync.row.mcp.add": "Nouvelle entrée de serveur",
|
||||
"sync.row.mcp.update": "L'entrée du serveur sera mise à jour",
|
||||
"sync.row.mcp.remove": "L'entrée du serveur sera supprimée",
|
||||
"sync.row.mcp.offList.add": "Sera désactivé dans ce projet",
|
||||
"sync.row.mcp.offList.remove": "Sera réactivé dans ce projet",
|
||||
"sync.mcp.offList": "Liste de désactivation de {project}",
|
||||
"sync.row.pruneIgnored": "Ignoré dans la source. Sera retiré de cette cible",
|
||||
"sync.mcpBlocked": "MCP a des conflits, ses changements sont exclus de cette synchronisation.",
|
||||
"sync.openMcp": "Ouvrir MCP",
|
||||
@@ -1649,6 +1652,7 @@
|
||||
"mcp.projects.followsGlobal": "Suit le global. Rien n'est écrit dans ce projet.",
|
||||
"mcp.projects.writesSwitch": "{target} reçoit {field}",
|
||||
"mcp.projects.noSwitch": "Aucun de ses Agents n'a d'interrupteur par projet.",
|
||||
"mcp.projects.noSwitchHere": "Aucun des Agents utilisés par ce projet ne peut le désactiver ici.",
|
||||
"mcp.projects.overridden": "Ce projet définit son propre serveur avec ce nom.",
|
||||
"mcp.kilocodeProjectEnv": "Kilo Code MCP {name} : Kilo n’autorise pas les références aux variables d’environnement dans la configuration du projet et ignore tout le fichier lorsqu’il en trouve une ; supprimez fromEnv ici ou définissez ce serveur en mode global.",
|
||||
"mcp.importError.json": "JSON ou JSONC non valide. Vérifiez la syntaxe.",
|
||||
|
||||
@@ -1233,6 +1233,9 @@
|
||||
"sync.row.mcp.add": "Entri server baru",
|
||||
"sync.row.mcp.update": "Entri server akan diperbarui",
|
||||
"sync.row.mcp.remove": "Entri server akan dihapus",
|
||||
"sync.row.mcp.offList.add": "Akan dimatikan di proyek ini",
|
||||
"sync.row.mcp.offList.remove": "Akan dinyalakan kembali di proyek ini",
|
||||
"sync.mcp.offList": "Daftar mati untuk {project}",
|
||||
"sync.row.pruneIgnored": "Diabaikan di sumber. Akan dihapus dari target ini",
|
||||
"sync.mcpBlocked": "MCP memiliki konflik, jadi perubahannya tidak ikut sinkronisasi ini.",
|
||||
"sync.openMcp": "Buka MCP",
|
||||
@@ -1649,6 +1652,7 @@
|
||||
"mcp.projects.followsGlobal": "Mengikuti global. Tidak ada yang ditulis ke proyek ini.",
|
||||
"mcp.projects.writesSwitch": "{target} mendapat {field}",
|
||||
"mcp.projects.noSwitch": "Tidak ada Agent-nya yang punya sakelar per proyek.",
|
||||
"mcp.projects.noSwitchHere": "Tidak ada Agent yang dipakai proyek ini yang bisa mematikannya di sini.",
|
||||
"mcp.projects.overridden": "Proyek ini mendefinisikan server sendiri dengan nama ini.",
|
||||
"mcp.kilocodeProjectEnv": "Kilo Code MCP {name}: Kilo tidak mengizinkan referensi variabel lingkungan dalam konfigurasi proyek dan akan mengabaikan seluruh file saat menemukannya; hapus fromEnv di sini atau definisikan server ini dalam mode global.",
|
||||
"mcp.importError.json": "Bukan JSON atau JSONC yang valid. Periksa sintaksnya.",
|
||||
|
||||
@@ -1233,6 +1233,9 @@
|
||||
"sync.row.mcp.add": "新しいサーバーエントリ",
|
||||
"sync.row.mcp.update": "サーバーエントリが更新されます",
|
||||
"sync.row.mcp.remove": "サーバーエントリが削除されます",
|
||||
"sync.row.mcp.offList.add": "このプロジェクトでオフになります",
|
||||
"sync.row.mcp.offList.remove": "このプロジェクトで再びオンになります",
|
||||
"sync.mcp.offList": "{project} のオフリスト",
|
||||
"sync.row.pruneIgnored": "ソースで無視されています。このターゲットから削除されます",
|
||||
"sync.mcpBlocked": "MCP に競合があるため、その変更は今回の同期に含まれません。",
|
||||
"sync.openMcp": "MCP を開く",
|
||||
@@ -1649,6 +1652,7 @@
|
||||
"mcp.projects.followsGlobal": "グローバルに従います。このプロジェクトには何も書き込みません。",
|
||||
"mcp.projects.writesSwitch": "{target} に {field} を書き込み",
|
||||
"mcp.projects.noSwitch": "どの Agent にもプロジェクト単位のスイッチがありません。",
|
||||
"mcp.projects.noSwitchHere": "このプロジェクトで使う Agent には、ここでオフにできるものがありません。",
|
||||
"mcp.projects.overridden": "このプロジェクトは同じ名前のサーバーを独自に定義しています。",
|
||||
"mcp.kilocodeProjectEnv": "Kilo Code MCP {name}: Kilo はプロジェクト設定で環境変数参照を許可しておらず、検出するとファイル全体を無視します。ここで fromEnv を削除するか、このサーバーをグローバルモードで定義してください。",
|
||||
"mcp.importError.json": "有効な JSON / JSONC ではありません。構文を確認してください。",
|
||||
|
||||
@@ -1233,6 +1233,9 @@
|
||||
"sync.row.mcp.add": "새 서버 항목",
|
||||
"sync.row.mcp.update": "서버 항목이 업데이트됩니다",
|
||||
"sync.row.mcp.remove": "서버 항목이 제거됩니다",
|
||||
"sync.row.mcp.offList.add": "이 프로젝트에서 꺼집니다",
|
||||
"sync.row.mcp.offList.remove": "이 프로젝트에서 다시 켜집니다",
|
||||
"sync.mcp.offList": "{project}의 끄기 목록",
|
||||
"sync.row.pruneIgnored": "소스에서 무시됨. 이 대상에서 제거됩니다",
|
||||
"sync.mcpBlocked": "MCP에 충돌이 있어 이번 동기화에서 MCP 변경은 제외됩니다.",
|
||||
"sync.openMcp": "MCP 열기",
|
||||
@@ -1649,6 +1652,7 @@
|
||||
"mcp.projects.followsGlobal": "전역을 따릅니다. 이 프로젝트에는 아무것도 기록하지 않습니다.",
|
||||
"mcp.projects.writesSwitch": "{target}에 {field} 기록",
|
||||
"mcp.projects.noSwitch": "이 서버의 Agent 중 프로젝트별 스위치가 있는 것이 없습니다.",
|
||||
"mcp.projects.noSwitchHere": "이 프로젝트에서 쓰는 Agent 중 여기서 끌 수 있는 것이 없습니다.",
|
||||
"mcp.projects.overridden": "이 프로젝트에 같은 이름의 자체 서버가 정의되어 있습니다.",
|
||||
"mcp.kilocodeProjectEnv": "Kilo Code MCP {name}: Kilo는 프로젝트 설정에서 환경 변수 참조를 허용하지 않으며, 이를 발견하면 파일 전체를 무시합니다. 여기서 fromEnv를 제거하거나 이 서버를 전역 모드로 정의하세요.",
|
||||
"mcp.importError.json": "올바른 JSON 또는 JSONC가 아닙니다. 문법을 확인하세요.",
|
||||
|
||||
@@ -1233,6 +1233,9 @@
|
||||
"sync.row.mcp.add": "Nova entrada de servidor",
|
||||
"sync.row.mcp.update": "A entrada do servidor será atualizada",
|
||||
"sync.row.mcp.remove": "A entrada do servidor será removida",
|
||||
"sync.row.mcp.offList.add": "Será desligado neste projeto",
|
||||
"sync.row.mcp.offList.remove": "Será ligado novamente neste projeto",
|
||||
"sync.mcp.offList": "Lista de desligados de {project}",
|
||||
"sync.row.pruneIgnored": "Ignorado na origem. Será removido deste destino",
|
||||
"sync.mcpBlocked": "O MCP tem conflitos, então as alterações dele ficam fora desta sincronização.",
|
||||
"sync.openMcp": "Abrir MCP",
|
||||
@@ -1649,6 +1652,7 @@
|
||||
"mcp.projects.followsGlobal": "Segue o global. Nada é gravado neste projeto.",
|
||||
"mcp.projects.writesSwitch": "{target} recebe {field}",
|
||||
"mcp.projects.noSwitch": "Nenhum dos Agents dele tem um interruptor por projeto.",
|
||||
"mcp.projects.noSwitchHere": "Nenhum dos Agents que este projeto usa pode desligá-lo aqui.",
|
||||
"mcp.projects.overridden": "Este projeto define seu próprio servidor com este nome.",
|
||||
"mcp.kilocodeProjectEnv": "Kilo Code MCP {name}: o Kilo não permite referências a variáveis de ambiente na configuração do projeto e ignora o arquivo inteiro quando encontra uma; remova fromEnv daqui ou defina este servidor no modo global.",
|
||||
"mcp.importError.json": "Não é JSON nem JSONC válido. Confira a sintaxe.",
|
||||
|
||||
@@ -1233,6 +1233,9 @@
|
||||
"sync.row.mcp.add": "新增服务器条目",
|
||||
"sync.row.mcp.update": "服务器条目将被更新",
|
||||
"sync.row.mcp.remove": "服务器条目将被移除",
|
||||
"sync.row.mcp.offList.add": "将在这个项目关闭",
|
||||
"sync.row.mcp.offList.remove": "将在这个项目重新启用",
|
||||
"sync.mcp.offList": "{project} 的关闭列表",
|
||||
"sync.row.pruneIgnored": "已在来源中忽略,将从此目标移除",
|
||||
"sync.mcpBlocked": "MCP 有冲突,因此本次同步不包含其变更。",
|
||||
"sync.openMcp": "打开 MCP",
|
||||
@@ -1649,6 +1652,7 @@
|
||||
"mcp.projects.followsGlobal": "沿用全局,这个项目不写入。",
|
||||
"mcp.projects.writesSwitch": "{target} 写入 {field}",
|
||||
"mcp.projects.noSwitch": "它的 Agent 都没有项目级的开关。",
|
||||
"mcp.projects.noSwitchHere": "这个项目使用的 Agent 都无法在这里关掉它。",
|
||||
"mcp.projects.overridden": "这个项目有自己的同名服务器。",
|
||||
"mcp.kilocodeProjectEnv": "Kilo Code MCP {name}:Kilo 不允许在项目配置中使用环境变量引用;一旦发现就会忽略整个文件。请在此移除 fromEnv,或改用全局模式定义此服务器。",
|
||||
"mcp.importError.json": "不是有效的 JSON 或 JSONC,请检查语法。",
|
||||
|
||||
@@ -1233,6 +1233,9 @@
|
||||
"sync.row.mcp.add": "新增伺服器項目",
|
||||
"sync.row.mcp.update": "伺服器項目將被更新",
|
||||
"sync.row.mcp.remove": "伺服器項目將被移除",
|
||||
"sync.row.mcp.offList.add": "將在這個專案關閉",
|
||||
"sync.row.mcp.offList.remove": "將在這個專案重新啟用",
|
||||
"sync.mcp.offList": "{project} 的關閉清單",
|
||||
"sync.row.pruneIgnored": "已在來源中忽略,將從此目標移除",
|
||||
"sync.mcpBlocked": "MCP 有衝突,因此本次同步不包含其變更。",
|
||||
"sync.openMcp": "開啟 MCP",
|
||||
@@ -1649,6 +1652,7 @@
|
||||
"mcp.projects.followsGlobal": "沿用全域,這個專案不寫入。",
|
||||
"mcp.projects.writesSwitch": "{target} 寫入 {field}",
|
||||
"mcp.projects.noSwitch": "它的 Agent 都沒有專案層級的開關。",
|
||||
"mcp.projects.noSwitchHere": "這個專案使用的 Agent 都無法在這裡關掉它。",
|
||||
"mcp.projects.overridden": "這個專案有自己的同名伺服器。",
|
||||
"mcp.kilocodeProjectEnv": "Kilo Code MCP {name}:Kilo 不允許在專案設定中使用環境變數參照;一旦找到就會忽略整份檔案。請在此移除 fromEnv,或改用全域模式定義這個伺服器。",
|
||||
"mcp.importError.json": "不是有效的 JSON 或 JSONC,請檢查語法。",
|
||||
|
||||
@@ -98,6 +98,7 @@ export default function SyncPage() {
|
||||
<span className="font-semibold">{g.part === 'mcp' ? targetLabel(g.name) : g.name}</span>
|
||||
<span className="ss-tag">{g.part === 'mcp' ? 'MCP' : g.mode}</span>
|
||||
{g.path && <span className="min-w-0 truncate font-mono text-[12px] text-ink-3" title={g.path}>{shortenHome(g.path)}</span>}
|
||||
{g.project && <span className="ss-tag shrink-0" title={g.project}>{t('sync.mcp.offList', { project: shortenHome(g.project) })}</span>}
|
||||
<span className="flex-1" />
|
||||
{n > 0 && <span className="shrink-0 text-[12px] text-ink-2">{t(n === 1 ? 'sync.changes.one' : 'sync.changes.other', { count: n })}</span>}
|
||||
</div>
|
||||
|
||||
Reference in New Issue
Block a user