MCPcopy Create free account
hub / github.com/anus-dev/ANUS / getIdeStatusMessage

Function getIdeStatusMessage

packages/cli/src/ui/commands/ideCommand.ts:28–55  ·  view source on GitHub ↗
(ideClient: IdeClient)

Source from the content-addressed store, hash-verified

26import { SettingScope } from '../../config/settings.js';
27
28function getIdeStatusMessage(ideClient: IdeClient): {
29 messageType: 'info' | 'error';
30 content: string;
31} {
32 const connection = ideClient.getConnectionStatus();
33 switch (connection.status) {
34 case IDEConnectionStatus.Connected:
35 return {
36 messageType: 'info',
37 content: `🟢 Connected to ${ideClient.getDetectedIdeDisplayName()}`,
38 };
39 case IDEConnectionStatus.Connecting:
40 return {
41 messageType: 'info',
42 content: `🟡 Connecting...`,
43 };
44 default: {
45 let content = `🔴 Disconnected`;
46 if (connection?.details) {
47 content += `: ${connection.details}`;
48 }
49 return {
50 messageType: 'error',
51 content,
52 };
53 }
54 }
55}
56
57function formatFileList(openFiles: File[]): string {
58 const basenameCounts = new Map<string, number>();

Callers 1

ideCommandFunction · 0.85

Calls 2

getConnectionStatusMethod · 0.80

Tested by

no test coverage detected