MCPcopy Create free account
hub / github.com/continuedev/continue / ServiceDebugger

Function ServiceDebugger

extensions/cli/src/ui/ServiceDebugger.tsx:29–117  ·  view source on GitHub ↗
({
  services,
  loading,
  error,
  allReady,
  servicesLoading,
  servicesError,
})

Source from the content-addressed store, hash-verified

27}
28
29const ServiceDebugger: React.FC<ServiceDebuggerProps> = ({
30 services,
31 loading,
32 error,
33 allReady,
34 servicesLoading,
35 servicesError,
36}) => {
37 const getServiceStatus = (serviceName: string, service: any) => {
38 if (!service) return "❌ Not loaded";
39 if (service.error) return `❌ Error: ${service.error}`;
40 return "✅ Ready";
41 };
42
43 const getServiceDetails = (serviceName: string, service: any) => {
44 switch (serviceName) {
45 case "auth":
46 return service?.authConfig
47 ? `User: ${service.authConfig.email || "unknown"}`
48 : "No auth config";
49 case "config":
50 return service?.config ? `Config: ${service.config.name}` : "No config";
51 case "model":
52 return service?.model ? `Model: ${service.model.name}` : "No model";
53 case "mcp":
54 return service?.mcpService
55 ? `Tools: ${service.mcpService.getTools()?.length || 0}`
56 : "No MCP service";
57 case "apiClient":
58 return service?.apiClient ? "API client ready" : "No API client";
59 default:
60 return "";
61 }
62 };
63
64 return (
65 <Box {...defaultBoxStyles("cyan")}>
66 <Text bold color="cyan">
67 🔧 Service Debug Info
68 </Text>
69 <Text> </Text>
70
71 <Text color="yellow">Overall Status:</Text>
72 <Text>Loading: {loading ? "🟡 Yes" : "✅ No"}</Text>
73 <Text>All Ready: {allReady ? "✅ Yes" : "❌ No"}</Text>
74 <Text>Services Loading: {servicesLoading ? "🟡 Yes" : "✅ No"}</Text>
75
76 {error && <Text color="red">Error: {String(error)}</Text>}
77
78 {servicesError && (
79 <Text color="red">Services Error: {String(servicesError)}</Text>
80 )}
81
82 <Text> </Text>
83 <Text color="yellow">Individual Services:</Text>
84
85 {["auth", "config", "model", "mcp", "apiClient"].map((serviceName) => {
86 const service = services[serviceName as keyof typeof services];

Callers

nothing calls this directly

Calls 3

defaultBoxStylesFunction · 0.85
getServiceStatusFunction · 0.85
getServiceDetailsFunction · 0.85

Tested by

no test coverage detected