Skip to content

Commit 42cd41a

Browse files
committed
fix: refactor MediaSelector to import open function directly
- Updated MediaSelector component to import the open function from @tauri-apps/plugin-dialog directly, improving code clarity and reducing unnecessary dynamic imports.
1 parent 80c9e38 commit 42cd41a

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

tauri-app/src/components/chat/input/MediaSelector.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@ import {
77
} from "@/components/ui/tooltip";
88
import { useChatInputStore } from "@/stores/chatInputStore";
99
import { createMediaAttachment, isMediaFile } from "@/utils/mediaUtils";
10+
import { open } from "@tauri-apps/plugin-dialog";
1011
import { Image, Music, Paperclip } from "lucide-react";
1112
import React from "react";
1213

@@ -15,7 +16,6 @@ export const MediaSelector: React.FC = () => {
1516

1617
const handleSelectMedia = async () => {
1718
try {
18-
const { open } = await import("@tauri-apps/plugin-dialog");
1919
const selected: string | string[] | null = await open({
2020
multiple: true,
2121
filters: [

0 commit comments

Comments
 (0)