An open-source, privacy-first, self-hosted knowledge workspace where humans and AI agents work together 开源、隐私优先、自托管的知识工作空间,让人与智能体在此协作
TypeScript agentic-aiai-agentknowledge-baselocal-firstmarkdownmcpmindmapnote-takingself-hostedsiyuanworkspace
:bug: 修复 IObject 放宽后 headers 无法赋值给 HeadersInit #18034
Daniel82e589146aaf
diff --git a/app/src/types/protyle.d.ts b/app/src/types/protyle.d.tsindex c31b599b3a..510e631327 100644--- a/app/src/types/protyle.d.ts+++ b/app/src/types/protyle.d.ts@@ -327,7 +327,7 @@ interface IUpload {/** 跨站点访问控制。默认值: false */withCredentials?: boolean;/** 请求头设置 */- headers?: IObject;+ headers?: Record<string, string>;/** 额外请求参数 */extraData?: { [key: string]: string | Blob };/** 上传字段名。默认值:file[] */diff --git a/app/src/util/fetch.ts b/app/src/util/fetch.tsindex cb72ed45ea..9c452e6eb0 100644--- a/app/src/util/fetch.ts+++ b/app/src/util/fetch.ts@@ -9,7 +9,7 @@ export const fetchPost = (url: string,data?: any,cb?: (response: IWebSocketData) => void,- headers?: IObject,+ headers?: Record<string, string>,failCallback?: (response: IWebSocketData) => void,signal?: AbortSignal) => {const init: RequestInit = {