fix: fix enhance prompt to stop implementing full project instead of enhancing (#1383) #release
* fix: enhance prompt fix * fix: added error capture on api error * fix: replaced error with log for wrong files selected by bolt
This commit is contained in:
@@ -1,24 +1,24 @@
|
||||
export const getLanguageFromExtension = (ext: string): string => {
|
||||
const map: Record<string, string> = {
|
||||
js: "javascript",
|
||||
jsx: "jsx",
|
||||
ts: "typescript",
|
||||
tsx: "tsx",
|
||||
json: "json",
|
||||
html: "html",
|
||||
css: "css",
|
||||
py: "python",
|
||||
java: "java",
|
||||
rb: "ruby",
|
||||
cpp: "cpp",
|
||||
c: "c",
|
||||
cs: "csharp",
|
||||
go: "go",
|
||||
rs: "rust",
|
||||
php: "php",
|
||||
swift: "swift",
|
||||
md: "plaintext",
|
||||
sh: "bash",
|
||||
js: 'javascript',
|
||||
jsx: 'jsx',
|
||||
ts: 'typescript',
|
||||
tsx: 'tsx',
|
||||
json: 'json',
|
||||
html: 'html',
|
||||
css: 'css',
|
||||
py: 'python',
|
||||
java: 'java',
|
||||
rb: 'ruby',
|
||||
cpp: 'cpp',
|
||||
c: 'c',
|
||||
cs: 'csharp',
|
||||
go: 'go',
|
||||
rs: 'rust',
|
||||
php: 'php',
|
||||
swift: 'swift',
|
||||
md: 'plaintext',
|
||||
sh: 'bash',
|
||||
};
|
||||
return map[ext] || "typescript";
|
||||
};
|
||||
return map[ext] || 'typescript';
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user