| ... | @@ -51,7 +51,6 @@ const completeIconResolver = createFileTreeIconResolver(T3_PIERRE_ICONS); | ... | @@ -51,7 +51,6 @@ const completeIconResolver = createFileTreeIconResolver(T3_PIERRE_ICONS); |
| 51 | const LANGUAGE_EXTENSION_ALIASES: Record<string, string> = { | 51 | const LANGUAGE_EXTENSION_ALIASES: Record<string, string> = { |
| 52 | bash: "sh", | 52 | bash: "sh", |
| 53 | csharp: "cs", | 53 | csharp: "cs", |
| 54 | dockerfile: "dockerfile", | | |
| 55 | javascript: "js", | 54 | javascript: "js", |
| 56 | jsx: "jsx", | 55 | jsx: "jsx", |
| 57 | markdown: "md", | 56 | markdown: "md", |
| ... | @@ -79,9 +78,17 @@ export function inferEntryKindFromPath(pathValue: string): "file" | "directory" | ... | @@ -79,9 +78,17 @@ export function inferEntryKindFromPath(pathValue: string): "file" | "directory" |
| 79 | return base.includes(".") ? "file" : "directory"; | 78 | return base.includes(".") ? "file" : "directory"; |
| 80 | } | 79 | } |
| 81 | | 80 | |
| | 81 | /** Languages whose files are recognised by name rather than by extension. */ |
| | 82 | const LANGUAGE_FILE_NAMES: Record<string, string> = { |
| | 83 | dockerfile: "Dockerfile", |
| | 84 | }; |
| | 85 | |
| 82 | export function syntheticFileNameForLanguageId(languageId: string): string { | 86 | export function syntheticFileNameForLanguageId(languageId: string): string { |
| 83 | const normalized = languageId.toLowerCase(); | 87 | const normalized = languageId.toLowerCase(); |
| 84 | return `file.${LANGUAGE_EXTENSION_ALIASES[normalized] ?? normalized}`; | 88 | return ( |
| | 89 | LANGUAGE_FILE_NAMES[normalized] ?? |
| | 90 | `file.${LANGUAGE_EXTENSION_ALIASES[normalized] ?? normalized}` |
| | 91 | ); |
| 85 | } | 92 | } |
| 86 | | 93 | |
| 87 | export function resolvePierreIconForEntry( | 94 | export function resolvePierreIconForEntry( |