Skip to content

Commit af63bab

Browse files
authored
fix: web iocn (#429)
* fix: web iocn * fix: serarch icon * build: build web 1.1.6 * chore: remove console
1 parent 80ac8ba commit af63bab

5 files changed

Lines changed: 6 additions & 8 deletions

File tree

src/components/Common/Icons/ItemIcon.tsx

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,14 @@
11
import { File } from "lucide-react";
22
import React, { useState } from "react";
33
import { useAsyncEffect } from "ahooks";
4+
import { isEmpty, isNil } from "lodash-es";
45

56
import IconWrapper from "./IconWrapper";
67
import ThemedIcon from "./ThemedIcon";
78
import { useFindConnectorIcon } from "@/hooks/useFindConnectorIcon";
89
import { useAppStore } from "@/stores/appStore";
910
import FontIcon from "./FontIcon";
1011
import platformAdapter from "@/utils/platformAdapter";
11-
import { isEmpty, isNil } from "lodash-es";
1212

1313
interface 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
}

src/components/Search/InputBox.tsx

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff 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);

src/components/SearchChat/index.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff 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
},

src/utils/platformAdapter.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
// manual modification
22
import { createTauriAdapter } from "./tauriAdapter";
3-
// import { createWebAdapter } from './webAdapter';
3+
//import { createWebAdapter } from './webAdapter';
44

55
let platformAdapter = createTauriAdapter();
6-
// let platformAdapter = createWebAdapter();
6+
//let platformAdapter = createWebAdapter();
77

88
export default platformAdapter;

tsup.config.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff 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",

0 commit comments

Comments
 (0)