An open-source, privacy-first, self-hosted knowledge workspace where humans and AI agents work together 开源、隐私优先、自托管的知识工作空间,让人与智能体在此协作
TypeScript agentic-aiai-agentknowledge-baselocal-firstmarkdownmcpmindmapnote-takingself-hostedsiyuanworkspace
export interface CreateTargetContext {
notebookId: string;
path: string;
}
export const getCreateTargetContext = (protyle: Pick<IProtyle, "notebookId" | "path">): CreateTargetContext => ({
notebookId: protyle.notebookId || "",
path: protyle.path || "",
});
export const isSameCreateTargetContext = (
context: CreateTargetContext,
protyle: Pick<IProtyle, "notebookId" | "path">,
) => {
const current = getCreateTargetContext(protyle);
return context.notebookId === current.notebookId && context.path === current.path;
};