File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 11import { File } from "lucide-react" ;
22import React , { useState } from "react" ;
33import { useAsyncEffect } from "ahooks" ;
4+ import { isEmpty , isNil } from "lodash-es" ;
45
56import IconWrapper from "./IconWrapper" ;
67import ThemedIcon from "./ThemedIcon" ;
78import { useFindConnectorIcon } from "@/hooks/useFindConnectorIcon" ;
89import { useAppStore } from "@/stores/appStore" ;
910import FontIcon from "./FontIcon" ;
1011import platformAdapter from "@/utils/platformAdapter" ;
11- import { isEmpty , isNil } from "lodash-es" ;
1212
1313interface ItemIconProps {
1414 item : any ;
@@ -33,8 +33,7 @@ const ItemIcon = React.memo(function ItemIcon({
3333 const { isAbsolute } = await platformAdapter . metadata ( item . icon , {
3434 omitSize : true ,
3535 } ) ;
36-
37- setIsAbsolute ( isAbsolute ) ;
36+ setIsAbsolute ( Boolean ( isAbsolute ) ) ;
3837 } catch ( error ) {
3938 setIsAbsolute ( false ) ;
4039 }
Original file line number Diff line number Diff line change @@ -84,7 +84,6 @@ export default function ChatInput({
8484 const { t } = useTranslation ( ) ;
8585
8686 const currentAssistant = useConnectStore ( ( state ) => state . currentAssistant ) ;
87- console . log ( "currentAssistant" , currentAssistant ) ;
8887
8988 const showTooltip = useAppStore ( ( state ) => state . showTooltip ) ;
9089 const isPinned = useAppStore ( ( state ) => state . isPinned ) ;
Original file line number Diff line number Diff line change @@ -197,7 +197,7 @@ function SearchChat({
197197 }
198198 let ids = currentAssistant ?. _source ?. datasource ?. ids ;
199199 if ( Array . isArray ( ids ) && ids . length > 0 && ! ids . includes ( "*" ) ) {
200- response = response . filter ( ( item : any ) => ids . includes ( item . id ) ) ;
200+ response = response ? .filter ( ( item : any ) => ids . includes ( item . id ) ) ;
201201 }
202202 return response || [ ] ;
203203 } ,
Original file line number Diff line number Diff line change 11// manual modification
22import { createTauriAdapter } from "./tauriAdapter" ;
3- // import { createWebAdapter } from './webAdapter';
3+ //import { createWebAdapter } from './webAdapter';
44
55let platformAdapter = createTauriAdapter ( ) ;
6- // let platformAdapter = createWebAdapter();
6+ //let platformAdapter = createWebAdapter();
77
88export default platformAdapter ;
Original file line number Diff line number Diff line change @@ -67,7 +67,7 @@ export default defineConfig({
6767
6868 const packageJson = {
6969 name : "@infinilabs/search-chat" ,
70- version : "1.1.5 " ,
70+ version : "1.1.6 " ,
7171 main : "index.js" ,
7272 module : "index.js" ,
7373 type : "module" ,
You can’t perform that action at this time.
0 commit comments