@@ -10,6 +10,7 @@ import { useTranslation } from "react-i18next";
1010import { OpenURLWithBrowser } from "@/utils/index" ;
1111import type { IChunkData } from "@/components/Assistant/types" ;
1212import RetrieveIcon from "@/icons/Retrieve" ;
13+ import { useAppStore } from "@/stores/appStore" ;
1314
1415interface FetchSourceProps {
1516 Detail ?: any ;
@@ -34,8 +35,14 @@ interface ISourceData {
3435 url : string ;
3536}
3637
37- export const FetchSource = ( { Detail, ChunkData, loading } : FetchSourceProps ) => {
38+ export const FetchSource = ( {
39+ Detail,
40+ ChunkData,
41+ loading,
42+ } : FetchSourceProps ) => {
3843 const { t } = useTranslation ( ) ;
44+ const isTauri = useAppStore ( ( state ) => state . isTauri ) ;
45+
3946 const [ isSourceExpanded , setIsSourceExpanded ] = useState ( false ) ;
4047
4148 const [ total , setTotal ] = useState ( 0 ) ;
@@ -51,7 +58,7 @@ export const FetchSource = ({ Detail, ChunkData, loading }: FetchSourceProps) =>
5158 useEffect ( ( ) => {
5259 if ( ! ChunkData ?. message_chunk ) return ;
5360
54- if ( ! loading ) {
61+ if ( ! loading ) {
5562 try {
5663 const match = ChunkData . message_chunk . match (
5764 // /\u003cPayload total=(\d+)\u003e/
@@ -130,7 +137,11 @@ export const FetchSource = ({ Detail, ChunkData, loading }: FetchSourceProps) =>
130137 { item . title || item . category }
131138 </ div >
132139 </ div >
133- < div className = "hidden md:flex w-[25%] items-center justify-end gap-2" >
140+ < div
141+ className = { `${
142+ isTauri ? "flex" : "hidden md:flex"
143+ } w-[25%] items-center justify-end gap-2`}
144+ >
134145 < span className = "text-xs text-[#999999] dark:text-[#999999] truncate" >
135146 { item . source ?. name }
136147 </ span >
0 commit comments