diff --git a/core/context/mcp/json/loadJsonMcpConfigs.ts b/core/context/mcp/json/loadJsonMcpConfigs.ts index 01ed60baed1..5600a27eec4 100644 --- a/core/context/mcp/json/loadJsonMcpConfigs.ts +++ b/core/context/mcp/json/loadJsonMcpConfigs.ts @@ -189,6 +189,7 @@ export async function loadJsonMcpConfigs( ...c.warnings.map((warning) => ({ fatal: false, message: warning, + uri: c.yamlConfig.sourceFile, })), ); return convertYamlMcpConfigToInternalMcpOptions( diff --git a/gui/src/pages/config/sections/ConfigsSection.tsx b/gui/src/pages/config/sections/ConfigsSection.tsx index 25d32ffed01..b7a6eaad891 100644 --- a/gui/src/pages/config/sections/ConfigsSection.tsx +++ b/gui/src/pages/config/sections/ConfigsSection.tsx @@ -34,16 +34,25 @@ export function ConfigsSection() { profiles.map((profile, index) => { const isSelected = profile.id === selectedProfile?.id; const errors = isSelected ? configError : profile.errors; + const hasFatalErrors = + errors && errors.some((error) => error.fatal); + const hasErrors = errors && errors.length > 0; return (
-
+

0 ? "text-error" : ""}`} + className={`my-2 text-sm font-medium ${ + hasFatalErrors + ? "text-error" + : hasErrors + ? "text-yellow-500" + : "" + }`} > {profile.title}

@@ -51,8 +60,20 @@ export function ConfigsSection() {
{errors.map((error, errorIndex) => (
{ + if (error.uri) { + e.stopPropagation(); + ideMessenger.post("openFile", { + path: error.uri, + }); + } + }} key={errorIndex} - className="text-error bg-error/10 rounded py-1 pr-2 text-xs" + className={`${ + error.fatal + ? "text-error bg-error/10" + : "bg-yellow-500/10 text-yellow-500" + } rounded border border-solid border-transparent px-2 py-1 text-xs ${error.uri ? "cursor-pointer " + (error.fatal ? "hover:border-error" : "hover:border-yellow-500") : ""}`} > {error.message}
diff --git a/packages/config-yaml/src/schemas/mcp/convertJson.ts b/packages/config-yaml/src/schemas/mcp/convertJson.ts index 87fa248060e..662f8e41957 100644 --- a/packages/config-yaml/src/schemas/mcp/convertJson.ts +++ b/packages/config-yaml/src/schemas/mcp/convertJson.ts @@ -59,7 +59,7 @@ export function convertJsonMcpConfigToYamlMcpConfig( if ("command" in jsonConfig) { if (jsonConfig.envFile) { warnings.push( - `envFile is not supported in Continue MCP config (server "${name}"). Environment variables from this file will not be used.`, + `envFile is not supported in Continue MCP configuration (server "${name}"). Environment variables from file will not be used.`, ); } diff --git a/packages/config-yaml/src/validation.ts b/packages/config-yaml/src/validation.ts index 766f852bd42..874eb3ad890 100644 --- a/packages/config-yaml/src/validation.ts +++ b/packages/config-yaml/src/validation.ts @@ -3,6 +3,7 @@ import { ConfigYaml, configYamlSchema } from "./schemas/index.js"; export interface ConfigValidationError { fatal: boolean; message: string; + uri?: string; } export interface ConfigResult {