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

Function toIDEDisplayName

src/utils/ide.ts:1214–1242  ·  view source on GitHub ↗
(terminal: string | null)

Source from the content-addressed store, hash-verified

1212}
1213
1214export function toIDEDisplayName(terminal: string | null): string {
1215 if (!terminal) return 'IDE'
1216
1217 const config = supportedIdeConfigs[terminal as IdeType]
1218 if (config) {
1219 return config.displayName
1220 }
1221
1222 // Check editor command names (exact match first)
1223 const editorName = EDITOR_DISPLAY_NAMES[terminal.toLowerCase().trim()]
1224 if (editorName) {
1225 return editorName
1226 }
1227
1228 // Extract command name from path/arguments (e.g., "/usr/bin/code --wait" -> "code")
1229 const command = terminal.split(' ')[0]
1230 const commandName = command ? basename(command).toLowerCase() : null
1231 if (commandName) {
1232 const mappedName = EDITOR_DISPLAY_NAMES[commandName]
1233 if (mappedName) {
1234 return mappedName
1235 }
1236 // Fallback: capitalize the command basename
1237 return capitalize(commandName)
1238 }
1239
1240 // Fallback: capitalize first letter
1241 return capitalize(terminal)
1242}
1243
1244export { callIdeRpc }
1245

Callers 13

IdeOnboardingDialogFunction · 0.85
QuestionViewFunction · 0.85
PreviewQuestionViewFunction · 0.85
NotificationsFunction · 0.85
editFileInEditorFunction · 0.85
detectIDEsFunction · 0.85
getIdeClientNameFunction · 0.85
buildIDEPropertiesFunction · 0.85
_temp5Function · 0.85
onInstallFunction · 0.85

Calls 1

capitalizeFunction · 0.85

Tested by

no test coverage detected