Skip to content

An open-source, privacy-first, self-hosted knowledge workspace where humans and AI agents work together 开源、隐私优先、自托管的知识工作空间,让人与智能体在此协作

:rotating_light:

Vanessaeb30109d7fc5
diff --git a/app/src/plugin/index.ts b/app/src/plugin/index.ts
index f2ef00257e..181f4ff54e 100644
--- a/app/src/plugin/index.ts
+++ b/app/src/plugin/index.ts
@@ -258,17 +258,17 @@ export class Plugin {
this.setting.open(this.displayName || this.name);
}
- public loadData(storageName: string): Promise<IWebSocketData> {
+ public loadData(storageName: string): Promise<any> {
if (typeof this.data[storageName] === "undefined") {
this.data[storageName] = "";
}
- return new Promise((resolve, reject) => {
+ return new Promise((resolve) => {
fetchPost("/api/file/getFile", {
path: `/data/storage/petal/${this.name}/${storageName.replace(/[\/\\]+/g, "")}`
}, (response) => {
this.data[storageName] = response;
resolve(this.data[storageName]);
- }, null, (response) => {
+ }, null, () => {
resolve("");
});
});