From e0cfba6bb85c47ee6a396da0f2d622377fbee97a Mon Sep 17 00:00:00 2001 From: Ilya Bondar Date: Fri, 20 Dec 2024 15:40:50 +0100 Subject: [PATCH] format:fix --- apps/chat/src/components/Markdown/CodeBlock.tsx | 6 ++++-- apps/chat/src/utils/app/codeblock.ts | 2 +- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/apps/chat/src/components/Markdown/CodeBlock.tsx b/apps/chat/src/components/Markdown/CodeBlock.tsx index 508a3dbd5..e51b4b9b0 100644 --- a/apps/chat/src/components/Markdown/CodeBlock.tsx +++ b/apps/chat/src/components/Markdown/CodeBlock.tsx @@ -12,8 +12,8 @@ import classNames from 'classnames'; import { languageExtensionMapping, - languageNameMapping, languageFilenameMapping, + languageNameMapping, } from '@/src/utils/app/codeblock'; import { Translation } from '@/src/types/translation'; @@ -67,7 +67,9 @@ export const CodeBlock: FC = memo( // languageExtensionMapping allows set empty extension const fileExtension = languageExtensionMapping[displayLanguage] ?? '.txt'; // use the specific filename if it exists in languageFilenameMapping - const suggestedFileName = languageFilenameMapping[displayLanguage] ?? `ai-chat-code-${currentDate()}${fileExtension}`; + const suggestedFileName = + languageFilenameMapping[displayLanguage] ?? + `ai-chat-code-${currentDate()}${fileExtension}`; const fileName = window.prompt( t('Enter file name') || '', suggestedFileName, diff --git a/apps/chat/src/utils/app/codeblock.ts b/apps/chat/src/utils/app/codeblock.ts index a0df9ee5c..4c4534132 100644 --- a/apps/chat/src/utils/app/codeblock.ts +++ b/apps/chat/src/utils/app/codeblock.ts @@ -245,4 +245,4 @@ export const languageFilenameMapping: languageMap = { dockerfile: 'Dockerfile', makefile: 'Makefile', // Add other specific filenames here -}; \ No newline at end of file +};