MCPcopy Create free account

hub / github.com/Qinbf/groundmap / functions

Functions931 in github.com/Qinbf/groundmap

↓ 354 callersFunctiont
( key: TranslationKey, locale: Locale = DEFAULT_LOCALE, vars?: Record<string, string | number>, )
web/lib/i18n.ts:934
↓ 163 callersFunctiont
( key: TranslationKey, locale: Locale = DEFAULT_LOCALE, vars?: Record<string, string | number>, )
tools/debug-console/lib/i18n.ts:469
↓ 63 callersFunctionstandard_fm
返回一份合法的最小 frontmatter,可用 overrides 覆盖任意字段。
scripts/tests/conftest.py:49
↓ 63 callersFunctionwrite_md
便捷工具:写一个标准 wiki .md 文件(含 frontmatter)。
scripts/tests/conftest.py:40
↓ 44 callersFunctionuseT
()
web/lib/i18n-client.tsx:55
↓ 28 callersFunctionoutput_json
(data)
scripts/k.py:2295
↓ 27 callersFunctionset
(key: K, v: PageFrontmatter[K])
web/components/FrontmatterEditor.tsx:21
↓ 24 callersFunctioncn
(...inputs: ClassValue[])
web/lib/utils.ts:4
↓ 23 callersFunctionsplit_blocks
把 markdown 切分为块列表。 - heading / hr / code 各自单独成块 - 连续 text 行(无空行间隔)合成一个块;进一步根据首行特征分类为 paragraph / list / blockquote / table / figure -
scripts/section_parser.py:107
↓ 20 callersFunctionuseT
()
tools/debug-console/lib/i18n-client.tsx:62
↓ 18 callersFunctioncallKCli
(cliArgs: string[])
web/app/api/agent-tool/route.ts:61
↓ 16 callersFunctionbad
(error: string, status = 400)
web/app/api/agent-tool/route.ts:32
↓ 16 callersFunctiongetServerLocale
()
web/lib/server-locale.ts:10
↓ 15 callersFunctionadd_anchors
给 text 加锚点。返回 (新文本, 已填充 anchor 字段的 blocks 列表)。 幂等:先剥离已有锚点,按当前内容重新计算 → 内容未变时输出与原文完全一致; 内容微调时该段 hash 自动变(暴露失效引用)。
scripts/postprocess.py:87
↓ 13 callersFunctionstatus_line
(label, n)
scripts/k.py:2396
↓ 12 callersFunctionisSafeRelPath
(relPath: string)
web/lib/kb.ts:111
↓ 11 callersFunctionmask_code_spans
把 markdown 代码(围栏 + 行内)替换成等长空白,保留字符偏移与行号; 用于扫描标签 / 链接时跳过代码内字面提及。
scripts/k.py:151
↓ 11 callersFunctionrunKCli
( args: string[], options: RunKCliOptions = {}, )
web/lib/k-cli.ts:43
↓ 9 callersFunctionparseKbLink
(href: string)
web/lib/markdown-render.ts:160
↓ 8 callersMethod_make_web
(self, root: Path)
scripts/tests/test_k_scanners.py:423
↓ 8 callersFunction_read
(rel: str)
scripts/tests/test_release_guards.py:36
↓ 8 callersFunctionextractTrailingAnchor
(children: ReactNode)
web/lib/markdown-render.ts:226
↓ 8 callersFunctionnormalize_link_target
规范化链接目标:补 .md 后缀;去前后空格
scripts/k.py:317
↓ 8 callersFunctiononChange
(ws: string)
web/components/WorkspaceSwitcher.tsx:35
↓ 8 callersFunctionrequirePath
(args: Record<string, unknown>)
web/app/api/agent-tool/route.ts:51
↓ 7 callersFunction_is_exempt
统一豁免判定:status==deprecated 或 路径落在 _archive 归档区。 用途:source-issues / bare-claims / index-mismatches 三类"质量论断型" lint 对已废弃 / 已归档的历史内容不应报警(它们本就是"不再维
scripts/k.py:356
↓ 7 callersFunctionblank
(n: number)
tools/debug-console/lib/verify-citations.ts:109
↓ 7 callersFunctionclamp
(v: number, lo: number, hi: number)
web/components/GraphView.tsx:223
↓ 7 callersFunctionfinalize
(r: KCliResult<T>)
web/lib/k-cli.ts:67
↓ 7 callersFunctionisReadableDir
(relPath: string)
web/lib/kb.ts:136
↓ 7 callersFunctionpickLocale
(v: Localized, locale: Locale)
web/app/learn/_data/types.ts:29
↓ 7 callersFunctionprocess
一站式:text → (含锚点文本, outline 字典) 幂等:text 已含锚点时仅重建 outline,不重复加锚。 若提供 previous_outline,新 outline 会保留同 anchor 的 agent_summary。
scripts/postprocess.py:281
↓ 7 callersFunctionrelocateTableRowAnchors
(content: string)
web/lib/markdown-render.ts:61
↓ 7 callersFunctionresolve_doc_path
把用户传入的路径解析为绝对路径。支持相对项目根的路径,缺 .md 时自动补。 安全约束: - 解析后的路径必须落在 PROJECT_ROOT 内——拒绝绝对路径以及含 ../ 回到 PROJECT_ROOT 之外的相对路径,防止 web 端 ?path= 触发的
scripts/k.py:1476
↓ 6 callersMethod_setup_files
在 root/wiki/ 下放几个 .md 文件供 glob 测试。
scripts/tests/test_k_helpers.py:144
↓ 6 callersFunction_to_rel_posix
绝对路径 → 项目根相对的 POSIX。不在项目内时返回原 str。
scripts/k.py:1410
↓ 6 callersFunctionbuild_outline_data
基于已加锚点的 markdown 文本构建 outline.json 数据结构。 输入约定:text_with_anchors 应当已经被 add_anchors 处理过(每个块末尾 带 ` ^h-/^p-/...` 锚点)。本函数只切一次块,从行末回填 anchor,构
scripts/postprocess.py:219
↓ 6 callersFunctionexecuteTool
( name: string, args: Record<string, unknown>, options: { timeoutMs?: number } = {}, )
tools/debug-console/lib/kb-http-client.ts:73
↓ 6 callersFunctiongetStr
(args: Record<string, unknown>, key: string)
web/app/api/agent-tool/route.ts:36
↓ 6 callersFunctionnormalizeBareSlugRefs
(text: string)
tools/debug-console/lib/wiki-ref.ts:89
↓ 6 callersFunctionparseMarkdown
(raw: string)
web/lib/markdown.ts:123
↓ 6 callersFunctionparseWikiRef
(target: string, anchor?: string, alias?: string)
tools/debug-console/lib/wiki-ref.ts:108
↓ 6 callersFunctionrelocateCodeFenceAnchors
(content: string)
web/lib/markdown-render.ts:85
↓ 6 callersFunctionstrip_frontmatter
返回 (frontmatter 块, 剩余正文)。无 frontmatter 时第一项为空串。
scripts/section_parser.py:58
↓ 5 callersMethod_write_pair
(self, tmp_path, md_text: str, outline: dict | None)
scripts/tests/test_release_guards.py:261
↓ 5 callersFunctiongetPage
(relPath: string)
web/lib/kb-service.ts:157
↓ 5 callersFunctionreadFile
(relPath: string)
web/lib/kb.ts:204
↓ 5 callersFunctionsafeResolve
(relPath: string)
web/lib/kb.ts:85
↓ 5 callersFunctionsaveScroll
( entryKey: string, url: string, top: number, writeUrlFallback = true, )
web/lib/scroll-memory.ts:117
↓ 5 callersFunctionsplit_alias_or_relation
把 [[X|Y]] 第三组 Y 判别为 (alias, relation_type)。 Y 完整匹配 RELATION_TYPES 白名单 → 关系;其他 → 别名。 返回 (alias_or_none, relation_or_none) — 二者互斥。
scripts/k.py:285
↓ 5 callersFunctiontType
(value: string | undefined, locale: Locale)
web/components/FrontmatterPanel.tsx:123
↓ 5 callersFunctionuseLocale
()
web/lib/i18n-client.tsx:51
↓ 4 callersFunction_anchor_hash6
从锚点串里抽出 6 位内容哈希 hash6(= md5(归一化内容)[:6],恒为 16 进制)。 锚点形如 p-{seq}-{hash6} / h-{level}-{seq}-{hash6},可带 -{N} 碰撞后缀。 hash6 是块内容的近唯一指纹——type/seq 是结构
scripts/k.py:1600
↓ 4 callersMethod_normalize
(text: str)
scripts/tests/test_release_guards.py:210
↓ 4 callersMethod_page
(self, fake_kb, body: str)
scripts/tests/test_k_scanners.py:266
↓ 4 callersFunctiona11y
键盘可达性:tabIndex + role=button + aria-label + Enter/Space 触发选中
web/components/walkthrough/ReasoningFlowNode.tsx:80
↓ 4 callersFunctionadoptNewFromConflict
(content: string, newClaim: string, today: string = todayISO())
web/lib/conflict-rewrite.ts:41
↓ 4 callersFunctionbuildSystemPrompt
(mode: QueryMode)
tools/debug-console/lib/default-system-prompt.ts:302
↓ 4 callersFunctionbuild_outline
基于 blocks 构建嵌套章节大纲。 - 每个 heading 作为一个 section - section.char_end = 下一个 level <= 自己 level 的 heading 的 char_start,或 total_chars - secti
scripts/section_parser.py:248
↓ 4 callersFunctioncardFor
(id: string | null)
web/components/GraphView.tsx:623
↓ 4 callersFunctioncurrentEntryKey
()
web/lib/scroll-memory.ts:76
↓ 4 callersFunctionextractCodeBlockAnchor
(text: string)
web/lib/markdown-render.ts:98
↓ 4 callersFunctionextractTrailingAnchor
(children: ReactNode)
tools/debug-console/lib/anchor-extract.ts:14
↓ 4 callersFunctiongetSavedScrollByEntry
(entryKey: string)
web/lib/scroll-memory.ts:128
↓ 4 callersFunctiongetSavedScrollByUrl
(url: string)
web/lib/scroll-memory.ts:133
↓ 4 callersFunctionhas_anchors
启发式:文本中有 ≥3 处形如 ` ^h-2-1-abcdef` / ` ^p-12-7d8e9a` 的尾巴 → 视为已加锚。
scripts/postprocess.py:81
↓ 4 callersFunctionisSameOrigin
(req: { headers: { get(name: string): string | null } })
web/lib/permissions.ts:59
↓ 4 callersFunctionline_char_end
(idx: int)
scripts/section_parser.py:122
↓ 4 callersFunctionlistWorkspaces
()
web/lib/kb.ts:35
↓ 4 callersFunctionload_or_build_outline
优先读 .outline.json;缺失、损坏或**已过期**时现场基于当前 .md 内容重建(不写盘)。 过期判定:outline 的 doc_chars 与 md 实际字符数不符。wiki 页被直接编辑后 outline.json 不会自动再生,旧 char_start/cha
scripts/k.py:1504
↓ 4 callersFunctionmergeConflict
(content: string, mergedText: string, today: string = todayISO())
web/lib/conflict-rewrite.ts:61
↓ 4 callersFunctionnormalizeLinkTarget
(target: string)
web/lib/markdown.ts:206
↓ 4 callersFunctionpageExists
(relPath: string)
web/lib/kb-service.ts:141
↓ 4 callersFunctionparse_wikilinks
返回 [Wikilink(target, anchor, alias, relation), ...] Wikilink 是 namedtuple,既支持 link.target 具名访问,也支持 4-tuple 解构。 alias 与 relation 互斥(最多一个非 None
scripts/k.py:299
↓ 4 callersFunctionremoveConflictBlock
(content: string)
web/lib/conflict-rewrite.ts:17
↓ 4 callersFunctionrunGit
(args: string[])
web/lib/git.ts:7
↓ 4 callersFunctionselRing
(sel?: boolean)
web/components/walkthrough/ReasoningFlowNode.tsx:115
↓ 4 callersFunctiontStatus
(value: string | undefined, locale: Locale)
web/components/FrontmatterPanel.tsx:130
↓ 4 callersFunctiontodayISO
()
web/lib/conflict-rewrite.ts:11
↓ 4 callersFunctionuseLocale
()
tools/debug-console/lib/i18n-client.tsx:58
↓ 4 callersFunctionvalidateAnswerRefs
ANSWER 后验:扫描所有引用,验证是否有效
tools/debug-console/lib/agent-loop.ts:117
↓ 4 callersFunctionwalk
(secs)
scripts/k.py:1688
↓ 4 callersFunctionworkspaceRoot
()
web/lib/kb.ts:80
↓ 3 callersMethod_extract_ts_regex
从 TS 源抓 `const <name> = /<pattern>/<flags>;` 的 pattern。
scripts/tests/test_i18n_sync.py:119
↓ 3 callersFunction_run
(args, kb_root=None)
scripts/tests/test_kb_root.py:36
↓ 3 callersMethod_run_hook_e2e
在临时 git 仓库装上真实 hook、stage 一个文件、跑 hook,返回退出码。 端到端覆盖纯正则测试抓不到的层:git 自身对非 ASCII 文件名的 quotepath 转义输出。返回非 0 = 被拦截。
scripts/tests/test_release_guards.py:116
↓ 3 callersFunctionassertNotSymlinkEscape
Symlink 防护:解析后的真实路径必须仍在 PROJECT_ROOT 内。 * 否则 `wiki/foo.md → /etc/passwd` 这种 symlink 会让 safeResolve 检查通过、 * realpath 把读取重定向到项目外。 * * 仅当文件存在时检查(l
web/lib/kb.ts:180
↓ 3 callersFunctionbasename
(p: string)
tools/debug-console/lib/build-flow-graph.ts:228
↓ 3 callersFunctionbasename
(p: string)
web/lib/flow/build-flow-graph.ts:208
↓ 3 callersFunctionbuildFlowGraph
( msg: UIMessage | null | undefined, userQuery?: string | null, locale: Locale = DEFAULT_LOCALE, )
web/lib/flow/build-flow-graph.ts:259
↓ 3 callersFunctionbuild_link_graph
返回反向链接图:{被链接的页面 path: {链接它的源页 path, ...}} 命中策略:完整路径 > basename 自引用排除:页面 [[自己]] 不计入入链——与 web/lib/kb-service.ts 的 getBacklinks 口径保持一致;
scripts/k.py:325
↓ 3 callersFunctioncheckWritePermissionAsync
( relPath: string, newContent?: string, )
web/lib/permissions.ts:119
↓ 3 callersFunctionconvertConflictToWatching
(content: string, today: string = todayISO())
web/lib/conflict-rewrite.ts:26
↓ 3 callersFunctionfileExists
(relPath: string)
web/lib/kb.ts:220
↓ 3 callersFunctionfindScrollableAncestor
找到 element 最近的可滚祖先(overflow-y: auto/scroll)。none 则 fallback 到 window.
web/components/HashScroller.tsx:106
↓ 3 callersFunctiongatherAssistantText
(msgs: ChatMessage[])
tools/debug-console/lib/agent-loop.ts:58
↓ 3 callersFunctiongitAddAndCommit
(files: string[], message: string)
web/lib/git.ts:71
↓ 3 callersFunctionhrefToRef
(href: string)
tools/debug-console/lib/wiki-ref.ts:140
↓ 3 callersFunctionkbApiBase
()
tools/debug-console/lib/kb-http-client.ts:47
↓ 3 callersFunctionmixWhite
(hex: string, amount: number)
web/components/GraphView.tsx:225
next →1–100 of 931, ranked by callers