build: build error (#922)

This commit is contained in:
BiggerRain
2025-10-13 16:43:29 +08:00
committed by GitHub
parent 9652a54f08
commit 89a8304b9e
3 changed files with 8 additions and 3 deletions

View File

@@ -129,6 +129,7 @@ export interface SystemOperations {
queryParams: string[] queryParams: string[]
) => Promise<any[]>; ) => Promise<any[]>;
fetchAssistant: (serverId: string, queryParams: string[]) => Promise<any>; fetchAssistant: (serverId: string, queryParams: string[]) => Promise<any>;
openLogDir: () => Promise<void>;
} }
// Base platform adapter interface // Base platform adapter interface

View File

@@ -7,6 +7,7 @@ export interface WebPlatformAdapter extends BasePlatformAdapter {
openFileDialog: (options: any) => Promise<string | string[] | null>; openFileDialog: (options: any) => Promise<string | string[] | null>;
metadata: (path: string, options: any) => Promise<Record<string, any>>; metadata: (path: string, options: any) => Promise<Record<string, any>>;
error: (message: string) => void; error: (message: string) => void;
openLogDir: () => Promise<void>;
} }
// Create Web adapter functions // Create Web adapter functions
@@ -261,17 +262,20 @@ export const createWebAdapter = (): WebPlatformAdapter => {
`/assistant/_search?${queryParams?.join("&")}`, `/assistant/_search?${queryParams?.join("&")}`,
undefined undefined
); );
if (error) { if (error) {
console.error("_search", error); console.error("_search", error);
return {}; return {};
} }
return res; return res;
}, },
async getCurrentWindowLabel() { async getCurrentWindowLabel() {
return "web"; return "web";
}, },
async openLogDir() {
console.log("openLogDir is not supported in web environment");
return Promise.resolve();
},
}; };
}; };

View File

@@ -72,7 +72,7 @@ export default defineConfig({
const packageJson = { const packageJson = {
name: "@infinilabs/search-chat", name: "@infinilabs/search-chat",
version: "1.2.38", version: "1.2.46",
main: "index.js", main: "index.js",
module: "index.js", module: "index.js",
type: "module", type: "module",