MCPcopy Create free account
hub / github.com/MatterAIOrg/OrbCode / DetailPanel

Function DetailPanel

src/ui/components/McpPicker.tsx:398–486  ·  view source on GitHub ↗
({
	manager,
	state,
	actions,
	actionMode,
	actionSelected,
}: {
	manager: McpManager
	state: McpServerState
	actions: string[]
	actionMode: boolean
	actionSelected: number
})

Source from the content-addressed store, hash-verified

396}
397
398function DetailPanel({
399 manager,
400 state,
401 actions,
402 actionMode,
403 actionSelected,
404}: {
405 manager: McpManager
406 state: McpServerState
407 actions: string[]
408 actionMode: boolean
409 actionSelected: number
410}) {
411 const cfg = manager.getConfig(state.name)
412 const configPath = manager.getConfigPath(state.name)
413 const isOAuth = manager.isOAuthServer(state.name)
414 const authenticated = manager.isAuthenticated(state.name)
415
416 const authText = !isOAuth
417 ? "— (static / stdio)"
418 : authenticated
419 ? "✓ authenticated"
420 : "✗ not authenticated"
421
422 let urlText: string
423 if (cfg && (cfg.type === "http" || cfg.type === "sse")) {
424 urlText = cfg.url
425 } else if (cfg) {
426 const cmd = cfg.command
427 const args = cfg.args ?? []
428 urlText = `stdio: ${cmd}${args.length ? " " + args.join(" ") : ""}`
429 } else {
430 urlText = ""
431 }
432
433 return (
434 <Box paddingLeft={1} marginTop={1} flexDirection="column">
435 <Text bold>
436 {state.name} MCP Server
437 </Text>
438 <Text>
439 <Text dimColor>Status: </Text>
440 <Text color={statusColor(state)}>{statusIcon(state)} {state.status}</Text>
441 </Text>
442 <Text>
443 <Text dimColor>Auth: </Text>
444 <Text color={isOAuth && !authenticated ? COLORS.error : isOAuth ? COLORS.success : COLORS.dim}>
445 {authText}
446 </Text>
447 </Text>
448 <Text>
449 <Text dimColor>URL: </Text>
450 {urlText}
451 </Text>
452 {configPath && (
453 <Text>
454 <Text dimColor>Config location: </Text>
455 <Text dimColor>{configPath}</Text>

Callers

nothing calls this directly

Calls 6

statusColorFunction · 0.85
statusIconFunction · 0.85
getConfigMethod · 0.80
getConfigPathMethod · 0.80
isOAuthServerMethod · 0.80
isAuthenticatedMethod · 0.80

Tested by

no test coverage detected