Skip to content

Commit f53b324

Browse files
committed
feat(amazonq): support Dockerfile files in /dev
1 parent b4d7417 commit f53b324

File tree

1 file changed

+14
-2
lines changed

1 file changed

+14
-2
lines changed

packages/core/src/shared/filetypes.ts

Lines changed: 14 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -347,8 +347,20 @@ export const codefileExtensions = new Set([
347347
'.zig',
348348
])
349349

350+
// Some important files start with a known prefix
351+
export const codeFilePrefixes = new Set(['Dockerfile'])
352+
350353
/** Returns true if `filename` is a code file. */
351354
export function isCodeFile(filename: string): boolean {
352-
const ext = path.extname(filename).toLowerCase()
353-
return codefileExtensions.has(ext)
355+
if (codefileExtensions.has(path.extname(filename).toLowerCase())) {
356+
return true
357+
}
358+
359+
for (const prefix of codeFilePrefixes) {
360+
if (filename.startsWith(prefix)) {
361+
return true
362+
}
363+
}
364+
365+
return false
354366
}

0 commit comments

Comments
 (0)