MCPcopy Create free account
hub / github.com/codeaashu/claude-code / McpConfigErrorSection

Function McpConfigErrorSection

src/components/mcp/McpParsingWarnings.tsx:8–113  ·  view source on GitHub ↗
(t0)

Source from the content-addressed store, hash-verified

6import type { ValidationError } from 'src/utils/settings/validation.js';
7import { Box, Link, Text } from '../../ink.js';
8function McpConfigErrorSection(t0) {
9 const $ = _c(26);
10 const {
11 scope,
12 parsingErrors,
13 warnings
14 } = t0;
15 const hasErrors = parsingErrors.length > 0;
16 const hasWarnings = warnings.length > 0;
17 if (!hasErrors && !hasWarnings) {
18 return null;
19 }
20 let t1;
21 if ($[0] !== hasErrors || $[1] !== hasWarnings) {
22 t1 = (hasErrors || hasWarnings) && <Text color={hasErrors ? "error" : "warning"}>[{hasErrors ? "Failed to parse" : "Contains warnings"}]{" "}</Text>;
23 $[0] = hasErrors;
24 $[1] = hasWarnings;
25 $[2] = t1;
26 } else {
27 t1 = $[2];
28 }
29 let t2;
30 if ($[3] !== scope) {
31 t2 = getScopeLabel(scope);
32 $[3] = scope;
33 $[4] = t2;
34 } else {
35 t2 = $[4];
36 }
37 let t3;
38 if ($[5] !== t2) {
39 t3 = <Text>{t2}</Text>;
40 $[5] = t2;
41 $[6] = t3;
42 } else {
43 t3 = $[6];
44 }
45 let t4;
46 if ($[7] !== t1 || $[8] !== t3) {
47 t4 = <Box>{t1}{t3}</Box>;
48 $[7] = t1;
49 $[8] = t3;
50 $[9] = t4;
51 } else {
52 t4 = $[9];
53 }
54 let t5;
55 if ($[10] === Symbol.for("react.memo_cache_sentinel")) {
56 t5 = <Text dimColor={true}>Location: </Text>;
57 $[10] = t5;
58 } else {
59 t5 = $[10];
60 }
61 let t6;
62 if ($[11] !== scope) {
63 t6 = describeMcpConfigFilePath(scope);
64 $[11] = scope;
65 $[12] = t6;

Callers

nothing calls this directly

Calls 2

getScopeLabelFunction · 0.50

Tested by

no test coverage detected