Skip to content

Commit 88dcc75

Browse files
gkorlandCopilot
andauthored
fix: replace unnecessary dynamic import of vendorConfig with static import (#474)
vendorConfig.ts is already statically imported by SettingsContext, useApiKeyValidation, Settings, and chat service, so the dynamic import() in ChatInterface.tsx provided no code-splitting benefit and triggered a Vite build warning. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
1 parent 25903a5 commit 88dcc75

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

app/src/components/chat/ChatInterface.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@ import QueryInput from "./QueryInput";
1212
import SuggestionCards from "../SuggestionCards";
1313
import { ChatService } from "@/services/chat";
1414
import type { ConfirmRequest } from "@/types/api";
15+
import { getVendorPrefix } from "@/utils/vendorConfig";
1516

1617
interface ChatMessageData {
1718
id: string;
@@ -338,7 +339,6 @@ const ChatInterface = ({
338339
if (isApiKeyValid && apiKey) {
339340
confirmRequest.custom_api_key = apiKey;
340341
if (modelName && vendor) {
341-
const { getVendorPrefix } = await import('@/utils/vendorConfig');
342342
const vendorPrefix = getVendorPrefix(vendor);
343343
confirmRequest.custom_model = modelName.startsWith(`${vendorPrefix}/`)
344344
? modelName

0 commit comments

Comments
 (0)