@@ -5,8 +5,10 @@ import {
55 useReducer ,
66 Suspense ,
77 memo ,
8+ useState ,
89} from "react" ;
910import clsx from "clsx" ;
11+ import { isWindows10 } from "tauri-plugin-windows-version-api" ;
1012
1113import Search from "@/components/Search/Search" ;
1214import InputBox from "@/components/Search/InputBox" ;
@@ -22,19 +24,20 @@ import { useStartupStore } from "@/stores/startupStore";
2224import { DataSource } from "@/types/commands" ;
2325import { useThemeStore } from "@/stores/themeStore" ;
2426import { Get } from "@/api/axiosRequest" ;
27+ import { useMount } from "ahooks" ;
2528
2629interface SearchChatProps {
2730 isTauri ?: boolean ;
2831 hasModules ?: string [ ] ;
2932 defaultModule ?: "search" | "chat" ;
30-
33+
3134 hasFeature ?: string [ ] ;
3235 showChatHistory ?: boolean ;
33-
36+
3437 theme ?: "auto" | "light" | "dark" ;
3538 searchPlaceholder ?: string ;
3639 chatPlaceholder ?: string ;
37-
40+
3841 hideCoco ?: ( ) => void ;
3942 setIsPinned ?: ( value : boolean ) => void ;
4043 querySearch : ( input : string ) => Promise < any > ;
@@ -74,6 +77,7 @@ function SearchChat({
7477 isDeepThinkActive,
7578 isTyping,
7679 } = state ;
80+ const [ isWin10 , setIsWin10 ] = useState ( false ) ;
7781
7882 useWindowEvents ( ) ;
7983
@@ -84,6 +88,12 @@ function SearchChat({
8488
8589 const setTheme = useThemeStore ( ( state ) => state . setTheme ) ;
8690
91+ useMount ( async ( ) => {
92+ const isWin10 = await isWindows10 ( ) ;
93+
94+ setIsWin10 ( isWin10 ) ;
95+ } ) ;
96+
8797 useEffect ( ( ) => {
8898 let mounted = true ;
8999
@@ -325,6 +335,7 @@ function SearchChat({
325335 "w-screen h-screen" : isTauri ,
326336 "rounded-xl" : ! isWin ,
327337 "border border-[#E6E6E6] dark:border-[#272626]" : isLinux ,
338+ "border-t border-t-[#999] dark:border-t-[#333]" : isWin10 ,
328339 }
329340 ) }
330341 >
0 commit comments