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: IObject > Record
Daniel228ad0e1adf3
diff --git a/app/src/constants.ts b/app/src/constants.tsindex 8a7cdcb2fb..e0599b66a9 100644--- a/app/src/constants.ts+++ b/app/src/constants.ts@@ -870,7 +870,7 @@ export abstract class Constants {public static readonly ZWSP: string = "\u200b";public static readonly INLINE_TYPE: string[] = ["block-ref", "kbd", "text", "file-annotation-ref", "a", "strong", "em", "u", "s", "mark", "sup", "sub", "tag", "code", "inline-math", "inline-memo", "clear"];public static readonly BLOCK_HINT_KEYS: string[] = ["((", "[[", "((", "【【"];- public static readonly BLOCK_HINT_CLOSE_KEYS: IObject = {"((": "))", "[[": "]]", "((": "))", "【【": "】】"};+ public static readonly BLOCK_HINT_CLOSE_KEYS: Record<string, string> = {"((": "))", "[[": "]]", "((": "))", "【【": "】】"};// common: "bash", "c", "csharp", "cpp", "css", "diff", "go", "xml", "json", "java", "javascript", "kotlin", "less", "lua", "makefile", "markdown", "objectivec", "php", "php-template", "perl", "plaintext", "python", "python-repl", "r", "ruby", "rust", "scss", "sql", "shell", "swift", "ini", "typescript", "vbnet", "yaml", "properties", "1c", "armasm", "avrasm", "actionscript", "ada", "angelscript", "accesslog", "apache", "applescript", "arcade", "arduino", "asciidoc", "aspectj", "abnf", "autohotkey", "autoit", "awk", "basic", "bnf", "dos", "brainfuck", "cal", "cmake", "csp", "cos", "capnproto", "ceylon", "clean", "clojure", "clojure-repl", "coffeescript", "coq", "crystal", "d", "dns", "dart", "delphi", "dts", "django", "dockerfile", "dust", "erb", "elixir", "elm", "erlang", "erlang-repl", "excel", "ebnf", "fsharp", "fix", "flix", "fortran", "gcode", "gams", "gauss", "glsl", "gml", "gherkin", "golo", "gradle", "groovy", "haml", "hsp", "http", "handlebars", "haskell", "haxe", "hy", "irpf90", "isbl", "inform7", "x86asm", "jboss-cli", "julia", "julia-repl", "ldif", "llvm", "lsl", "latex", "lasso", "leaf", "lisp", "livecodeserver", "livescript", "mel", "mipsasm", "matlab", "maxima", "mercury", "axapta", "routeros", "mizar", "mojolicious", "monkey", "moonscript", "n1ql", "nsis", "nestedtext", "nginx", "nim", "nix", "node-repl", "ocaml", "openscad", "ruleslanguage", "oxygene", "pf", "parser3", "pony", "pgsql", "powershell", "processing", "prolog", "protobuf", "puppet", "purebasic", "profile", "q", "qml", "reasonml", "rib", "rsl", "roboconf", "sas", "sml", "sqf", "step21", "scala", "scheme", "scilab", "smali", "smalltalk", "stan", "stata", "stylus", "subunit", "tp", "taggerscript", "tcl", "tap", "thrift", "twig", "vbscript", "vbscript-html", "vhdl", "vala", "verilog", "vim", "wasm", "mathematica", "wren", "xl", "xquery", "zephir", "crmsh", "dsconfig", "graphql",// third: "yul", "solidity", "abap", "hlsl", "gdscript", "moonbit", "mlir"public static readonly ALIAS_CODE_LANGUAGES: string[] = [diff --git a/app/src/protyle/breadcrumb/index.ts b/app/src/protyle/breadcrumb/index.tsindex 47d5f9a912..e890ec8b7c 100644--- a/app/src/protyle/breadcrumb/index.ts+++ b/app/src/protyle/breadcrumb/index.ts@@ -229,7 +229,7 @@ ${padHTML}return;}const id = blockElement.getAttribute("data-node-id");- const breadcrumbParam: IObject = {id, excludeTypes: []};+ const breadcrumbParam: Record<string, any> = {id, excludeTypes: []};if (isEncryptedBox(protyle.notebookId)) {breadcrumbParam.notebook = protyle.notebookId;}@@ -637,7 +637,7 @@ ${padHTML}// 闪卡面包屑不能显示答案excludeTypes.push("NodeTextMark-mark");}- const breadcrumbParam: IObject = {id, excludeTypes};+ const breadcrumbParam: Record<string, any> = {id, excludeTypes};if (isEncryptedBox(protyle.notebookId)) {breadcrumbParam.notebook = protyle.notebookId;}diff --git a/app/src/protyle/index.ts b/app/src/protyle/index.tsindex 0b64028933..21b8f3103c 100644--- a/app/src/protyle/index.ts+++ b/app/src/protyle/index.ts@@ -390,7 +390,7 @@ export class Protyle {}private getDoc(mergedOptions: IProtyleOptions) {- const getDocParam: IObject = {+ const getDocParam: Record<string, any> = {id: mergedOptions.blockId,isBacklink: mergedOptions.action.includes(Constants.CB_GET_BACKLINK),originalRefBlockIDs: mergedOptions.originalRefBlockIDs,diff --git a/app/src/protyle/wysiwyg/index.ts b/app/src/protyle/wysiwyg/index.tsindex 0cf348301d..c48d1bfd7f 100644--- a/app/src/protyle/wysiwyg/index.ts+++ b/app/src/protyle/wysiwyg/index.ts@@ -139,7 +139,7 @@ export class WYSIWYG {dropEvent(protyle, this.element);}- public renderCustom(ial: IObject) {+ public renderCustom(ial: Record<string, string>) {let isFullWidth = ial[Constants.CUSTOM_SY_FULLWIDTH];if (!isFullWidth) {isFullWidth = window.siyuan.config.editor.fullWidth ? "true" : "false";diff --git a/app/src/protyle/wysiwyg/transaction.ts b/app/src/protyle/wysiwyg/transaction.tsindex 500504426e..6d264671fa 100644--- a/app/src/protyle/wysiwyg/transaction.ts+++ b/app/src/protyle/wysiwyg/transaction.ts@@ -592,7 +592,7 @@ export const onTransaction = (protyle: IProtyle, operations: IOperation[], isUnd}if (operation.action === "updateAttrs") { // 调用接口才推送const data = operation.data as any;- const attrsResult: IObject = {};+ const attrsResult: Record<string, string> = {};let bookmarkHTML = "";let nameHTML = "";let aliasHTML = "";