An open-source, privacy-first, self-hosted knowledge workspace where humans and AI agents work together 开源、隐私优先、自托管的知识工作空间,让人与智能体在此协作
TypeScript agentic-aiai-agentknowledge-baselocal-firstmarkdownmcpmindmapnote-takingself-hostedsiyuanworkspace
import {createAVLocationReplacement} from "./locationValue";
interface IAVCellValueTarget {
id: string;
keyID: string;
blockID: string;
}
export const rebindAVCellValue = (source: IAVCellValue, target: IAVCellValueTarget) => {
const value = JSON.parse(JSON.stringify(source,
(key, item) => key === "renderedContent" ? undefined : item)) as IAVCellValue & {
createdAt?: number;
updatedAt?: number;
};
value.id = target.id;
value.keyID = target.keyID;
value.blockID = target.blockID;
if (value.type === "location") {
value.location = createAVLocationReplacement(value.location);
}
delete value.createdAt;
delete value.updatedAt;
return value;
};
export const genAVDragFillValue = rebindAVCellValue;