An open-source, privacy-first, self-hosted knowledge workspace where humans and AI agents work together 开源、隐私优先、自托管的知识工作空间,让人与智能体在此协作
TypeScript agentic-aiai-agentknowledge-baselocal-firstmarkdownmcpmindmapnote-takingself-hostedsiyuanworkspace
:art: https://github.com/siyuan-note/siyuan/pull/16717
Vanessae6ec708526e4
diff --git a/app/src/util/fetch.ts b/app/src/util/fetch.tsindex 6fef05739b..ece58ee616 100644--- a/app/src/util/fetch.ts+++ b/app/src/util/fetch.ts@@ -37,6 +37,7 @@ export const fetchPost = (if (headers) {init.headers = headers;}+ let isGetFile202 = false;fetch(url, init).then((response) => {switch (response.status) {case 403:@@ -56,15 +57,11 @@ export const fetchPost = (msg: response.statusText,code: -response.status,};- case 202:- // /api/file/getFile 接口返回202时表示文件没有正常读取- failCallback({- data: null,- msg: response.statusText,- code: response.status,- });- return;default:+ // /api/file/getFile 接口返回202时表示文件没有正常读取+ if (response.status === 202 && url === "/api/file/getFile") {+ isGetFile202 = true;+ }if (response.headers.get("content-type")?.indexOf("application/json") > -1) {return response.json();} else {@@ -72,6 +69,10 @@ export const fetchPost = (}}}).then((response: IWebSocketData) => {+ if (failCallback && url === "/api/file/getFile" && isGetFile202) {+ failCallback(response);+ return;+ }if (typeof response === "string") {if (cb) {cb(response);