MCPcopy Index your code
hub / github.com/codeaashu/claude-code / buildIDEProperties

Function buildIDEProperties

src/utils/status.tsx:38–88  ·  view source on GitHub ↗
(mcpClients: MCPServerConnection[], ideInstallationStatus: IDEExtensionInstallationStatus | null = null, theme: ThemeName)

Source from the content-addressed store, hash-verified

36 }];
37}
38export function buildIDEProperties(mcpClients: MCPServerConnection[], ideInstallationStatus: IDEExtensionInstallationStatus | null = null, theme: ThemeName): Property[] {
39 const ideClient = mcpClients?.find(client => client.name === 'ide');
40 if (ideInstallationStatus) {
41 const ideName = toIDEDisplayName(ideInstallationStatus.ideType);
42 const pluginOrExtension = isJetBrainsIde(ideInstallationStatus.ideType) ? 'plugin' : 'extension';
43 if (ideInstallationStatus.error) {
44 return [{
45 label: 'IDE',
46 value: <Text>
47 {color('error', theme)(figures.cross)} Error installing {ideName}{' '}
48 {pluginOrExtension}: {ideInstallationStatus.error}
49 {'\n'}Please restart your IDE and try again.
50 </Text>
51 }];
52 }
53 if (ideInstallationStatus.installed) {
54 if (ideClient && ideClient.type === 'connected') {
55 if (ideInstallationStatus.installedVersion !== ideClient.serverInfo?.version) {
56 return [{
57 label: 'IDE',
58 value: `Connected to ${ideName} ${pluginOrExtension} version ${ideInstallationStatus.installedVersion} (server version: ${ideClient.serverInfo?.version})`
59 }];
60 } else {
61 return [{
62 label: 'IDE',
63 value: `Connected to ${ideName} ${pluginOrExtension} version ${ideInstallationStatus.installedVersion}`
64 }];
65 }
66 } else {
67 return [{
68 label: 'IDE',
69 value: `Installed ${ideName} ${pluginOrExtension}`
70 }];
71 }
72 }
73 } else if (ideClient) {
74 const ideName = getIdeClientName(ideClient) ?? 'IDE';
75 if (ideClient.type === 'connected') {
76 return [{
77 label: 'IDE',
78 value: `Connected to ${ideName} extension`
79 }];
80 } else {
81 return [{
82 label: 'IDE',
83 value: `${color('error', theme)(figures.cross)} Not connected to ${ideName}`
84 }];
85 }
86 }
87 return [];
88}
89export function buildMcpProperties(clients: MCPServerConnection[] = [], theme: ThemeName): Property[] {
90 const servers = clients.filter(client => client.name !== 'ide');
91 if (!servers.length) {

Callers 1

buildSecondarySectionFunction · 0.85

Calls 4

toIDEDisplayNameFunction · 0.85
isJetBrainsIdeFunction · 0.85
colorFunction · 0.85
getIdeClientNameFunction · 0.85

Tested by

no test coverage detected