diff --git a/frontend/package-lock.json b/frontend/package-lock.json index 2b5331b748..94b4804d3d 100644 --- a/frontend/package-lock.json +++ b/frontend/package-lock.json @@ -13187,6 +13187,7 @@ "resolved": "https://registry.npmjs.org/vitest/-/vitest-1.6.0.tgz", "integrity": "sha512-H5r/dN06swuFnzNFhq/dnz37bPXnq8xB2xB5JOVk8K09rUtoeNN+LHWkoQ0A/i3hvbUKKcCei9KpbxqHMLhLLA==", "dev": true, + "license": "MIT", "dependencies": { "@vitest/expect": "1.6.0", "@vitest/runner": "1.6.0", diff --git a/frontend/src/components/chat/ChatMessage.test.tsx b/frontend/src/components/chat/ChatMessage.test.tsx index f4132b6ea0..106501f360 100644 --- a/frontend/src/components/chat/ChatMessage.test.tsx +++ b/frontend/src/components/chat/ChatMessage.test.tsx @@ -198,4 +198,22 @@ describe("Message", () => { expect(rejectButton).toBeInTheDocument(); }); }); + + it("should apply markdown-body class to the message content", () => { + render( + , + ); + + const markdownBody = screen.getByTestId("message-content"); + expect(markdownBody).toHaveClass("markdown-body"); + }); }); diff --git a/frontend/src/components/modals/settings/AutocompleteCombobox.tsx b/frontend/src/components/modals/settings/AutocompleteCombobox.tsx index 4c309e9990..4d0d300b0b 100644 --- a/frontend/src/components/modals/settings/AutocompleteCombobox.tsx +++ b/frontend/src/components/modals/settings/AutocompleteCombobox.tsx @@ -1,7 +1,7 @@ import { Autocomplete, AutocompleteItem, Tooltip } from "@nextui-org/react"; import React from "react"; import { useTranslation } from "react-i18next"; -import { I18nKey } from "#/i18n/declaration"; +import { I18nKey } from "#/i18n"; type Label = "model" | "agent" | "language" | "securityanalyzer"; diff --git a/frontend/src/components/modals/settings/SettingsForm.tsx b/frontend/src/components/modals/settings/SettingsForm.tsx index 02fe76e901..0f27dccde8 100644 --- a/frontend/src/components/modals/settings/SettingsForm.tsx +++ b/frontend/src/components/modals/settings/SettingsForm.tsx @@ -3,7 +3,7 @@ import React from "react"; import { useTranslation } from "react-i18next"; import { FaEye, FaEyeSlash } from "react-icons/fa"; import { AvailableLanguages } from "../../../i18n"; -import { I18nKey } from "../../../i18n/declaration"; +import { I18nKey } from "../../../i18n"; import { AutocompleteCombobox } from "./AutocompleteCombobox"; import { Settings } from "#/services/settings"; import { organizeModelsAndProviders } from "#/utils/organizeModelsAndProviders"; diff --git a/frontend/src/i18n/index.ts b/frontend/src/i18n/index.ts index d1e39c0b51..5fc17a7b6a 100644 --- a/frontend/src/i18n/index.ts +++ b/frontend/src/i18n/index.ts @@ -69,4 +69,5 @@ i18n } }); +export { I18nKey } from './declaration'; export default i18n; diff --git a/frontend/src/index.css b/frontend/src/index.css index d458c973bd..7f7746fe53 100644 --- a/frontend/src/index.css +++ b/frontend/src/index.css @@ -47,14 +47,14 @@ code { .markdown-body ol { list-style-type: decimal; /* Handles numbered lists */ - margin-left: 20px; - padding-left: 0.5em; /* Adds some indentation */ + margin-left: 1em; + padding-left: 0.2em; /* Reduces indentation */ } .markdown-body ul { list-style-type: disc; /* Handles bullet points */ - margin-left: 20px; - padding-left: 0.5em; /* Adds some indentation */ + margin-left: 1em; + padding-left: 0.2em; /* Reduces indentation */ } .markdown-body th { diff --git a/frontend/vite.config.ts b/frontend/vite.config.ts index 15a67d8f91..bf77b018f9 100644 --- a/frontend/vite.config.ts +++ b/frontend/vite.config.ts @@ -3,6 +3,7 @@ import { defineConfig, loadEnv } from "vite"; import react from "@vitejs/plugin-react"; // eslint-disable-next-line import/no-extraneous-dependencies import viteTsconfigPaths from "vite-tsconfig-paths"; +import path from 'path'; export default defineConfig(({ mode }) => { const { @@ -38,6 +39,11 @@ export default defineConfig(({ mode }) => { }), viteTsconfigPaths(), ], + resolve: { + alias: { + '#': path.resolve(__dirname, './src'), + }, + }, clearScreen: false, server: { watch: {