(ideClient: IdeClient)
| 26 | import { SettingScope } from '../../config/settings.js'; |
| 27 | |
| 28 | function 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 | |
| 57 | function formatFileList(openFiles: File[]): string { |
| 58 | const basenameCounts = new Map<string, number>(); |
no test coverage detected