Code
Hub
Workspaces
Following
Trending
Connect
MCP
copy
Create free account
hub
/
github.com/Qinbf/groundmap
/ functions
Functions
931 in github.com/Qinbf/groundmap
⨍
Functions
931
◇
Types & classes
173
↓ 2 callers
Function
renderToolResult
( tool: string, data: unknown, )
tools/debug-console/components/PreviewPanel.tsx:553
↓ 2 callers
Function
runAugment
给一对 trigger call+result 跑 mode augment(emit synthetic 事件)
tools/debug-console/lib/agent-loop.ts:187
↓ 2 callers
Function
runOneAgentSession
( msgs: ChatMessage[], )
tools/debug-console/lib/agent-loop.ts:203
↓ 2 callers
Function
scrollToHash
()
web/components/HashScroller.tsx:191
↓ 2 callers
Function
seg
(l: Locale, labelKey: "locale.zh" | "locale.en", titleKey: "locale.switch_to_zh" | "locale.switch_to_en")
tools/debug-console/components/LocaleSwitcher.tsx:15
↓ 2 callers
Function
serializeMarkdown
(frontmatter: PageFrontmatter, content: string)
web/lib/markdown.ts:168
↓ 2 callers
Function
setSize
()
web/components/GraphView.tsx:547
↓ 2 callers
Function
settle
()
web/components/ScrollMemory.tsx:52
↓ 2 callers
Function
splitAliasOrRelation
(thirdGroup: string | undefined | null)
web/lib/markdown.ts:51
↓ 2 callers
Function
stripAnchors
(text: string)
web/lib/markdown.ts:75
↓ 2 callers
Function
stripLeadingH1
(content: string)
web/lib/markdown-render.ts:139
↓ 2 callers
Function
strip_anchors
从文本中剥离所有由 add_anchors 添加的锚点尾巴,恢复原始内容。
scripts/postprocess.py:53
↓ 2 callers
Function
synthId
(prefix: string)
tools/debug-console/lib/mode-augment.ts:89
↓ 2 callers
Function
tConfidence
(value: string | undefined, locale: Locale)
web/components/FrontmatterPanel.tsx:137
↓ 2 callers
Function
take
(bucket: dict[str, list[dict]], key: str | None)
scripts/postprocess.py:187
↓ 2 callers
Function
toLocal
(e: PointerEvent)
web/components/GraphView.tsx:661
↓ 2 callers
Method
unavailableReason
()
tools/debug-console/lib/providers/types.ts:118
↓ 2 callers
Function
usePanelResize
({ side, config, initialWidth, }: { side: "left" | "right"; config: PanelConfig; /** SSR 从 cookie
web/lib/use-panel-resize.ts:23
↓ 2 callers
Function
usePopover
()
web/lib/use-popover.ts:8
↓ 2 callers
Function
walk
(secs)
scripts/postprocess.py:153
↓ 2 callers
Function
whenLayoutStable
* 等待 main 容器的 scrollHeight 稳定(连续 N 帧不变),表示 React 渲染 + layout 完成; * 然后回调。避免在元素 *出现* 但页面 *还在长高* 时计算错位置。 * * 兜底:超过 maxFrames 仍未稳定 → 仍调 callback 但通过 on
web/components/HashScroller.tsx:146
↓ 2 callers
Function
zoomBy
(factor: number)
web/components/GraphView.tsx:772
↓ 1 callers
Function
URL_TRANSFORM
(url: string)
web/components/PageRenderer.tsx:38
↓ 1 callers
Function
_anchor_resolvable
与 read_block 同口径判断 anchor 是否可解析:精确命中,或 hash6 在该页唯一命中(容错回收)。
scripts/k.py:1847
↓ 1 callers
Function
_atomic_write_text
write-then-rename 原子写:先写到同目录的临时文件再 os.replace 重命名。 保证别的进程读 target 时只能看到完整旧内容或完整新内容,不会读到半截。 Windows 兼容:当目标文件被另一进程持 read handle(如 web server 正在
scripts/k.py:27
↓ 1 callers
Function
_body_after_first_h2
返回第一个 H2 (`## `) 行开始的内容;用于跳过 source_summary 顶部元信息块。 没有 H2 时返回原文(fallback:全文扫一遍,可能有少量误报可接受)。
scripts/k.py:819
↓ 1 callers
Function
_classify_lines
逐行分类:blank / heading / hr / fence / text / fence-mid。
scripts/section_parser.py:75
↓ 1 callers
Function
_clean_preview
从段落原文提取干净的预览文字:去 markdown 标记、压空白、截 200 字。
scripts/section_parser.py:222
↓ 1 callers
Function
_collect_anchors_in_md
提取 md 文件中所有锚点 id(heading + paragraph 等所有类型)。 注意:这是**内联文本扫描**——会把正文里出现的裸锚点文本(如表格里列举的 ^t-2-db7484、 或 [[...]] 引用内部的锚点)也当成"本页锚点"。对 raw 文件没问题(raw
scripts/k.py:1815
↓ 1 callers
Function
_collect_section_summary_index
读 raw 的 .outline.json,递归收集所有 heading section 的元信息。 返回 {anchor: {title, level, agent_summary}} 或 None(outline 文件不存在 / 路径越界)。
scripts/k.py:1923
↓ 1 callers
Function
_collect_summaries
递归收集旧 outline 中所有非空 agent_summary。 返回 list[{anchor, title, summary}]——供 _restore_summaries 做 anchor → title 多级匹配(pipe-2)。
scripts/postprocess.py:146
↓ 1 callers
Function
_count_sections
(section: dict)
scripts/convert.py:230
↓ 1 callers
Function
_expand_braces
Brace expansion。 支持:单层 brace,可在同一 pattern 出现多个并列。 wiki/concepts/{rlhf,dpo} → [wiki/concepts/rlhf, wiki/concepts/dpo] {a,b}/{x,y}
scripts/k.py:990
↓ 1 callers
Function
_has_block_citation
检查文本是否含"块级引用"——即足以把论断 ground 到 raw 的引用形式: - [[raw/...]](任意,有/无 anchor) - 任意带 ^anchor 的 wikilink([[wiki/sources/X#^p-N-...]] 也算) 其他形式(如 [[w
scripts/k.py:1131
↓ 1 callers
Function
_is_self_link
plain wikilink 目标是否指向同一文件(自链)——自链不应报警。
scripts/k.py:830
↓ 1 callers
Function
_line_starts
每行起始字符偏移。lines[i] 起始于 starts[i]。
scripts/section_parser.py:66
↓ 1 callers
Function
_looks_like_relation
启发式:看起来像关系类型(用以判断是否要校验白名单)。
scripts/k.py:590
↓ 1 callers
Function
_main_impl
()
scripts/k.py:2810
↓ 1 callers
Function
_project_relative_posix
把绝对路径转换成相对 base root(workspace 根 / 项目根)的 POSIX 路径, 供 outline.json 的 doc_path 字段使用。
scripts/convert.py:159
↓ 1 callers
Function
_relation_balance_suggestion
对每个超阈值关系词给具体到「可能偷懒」的方向,避免笼统说『复查』。 落到 7 个关系词各自的语义边界(与 .claude/skills/kb-ingest/SKILL.md 「关系词决策树」对齐)。
scripts/k.py:763
↓ 1 callers
Function
_resolvable_anchor_index
目标页**能被 read_block 解析**的锚点集合 + hash6 计数(与 read_block 完全同口径)。 用计算/回填的块锚点(parse_blocks_with_anchors,只认每个块行尾的真实锚点标记), 而非 _collect_anchors_in_md
scripts/k.py:1829
↓ 1 callers
Function
_resolve_source_entry
解析 sources[] 里的一条字符串(典型如 "[[wiki/sources/X]]" 或 "[[raw/papers/X]]"), 返回 (target_file_exists, resolved_md_path)。 非 wikilink 字符串(纯文本 caption 等)
scripts/k.py:1117
↓ 1 callers
Function
_restore_summaries
把旧摘要写回新 sections,返回回填条数。 pipe-2:先按 anchor 精确匹配;失配再按归一化 title 匹配。heading 锚点形如 `h-{level}-{seq}-{hash}` 含全局 seq,在文档前部插入新段 / 新标题会让后续所有 headi
scripts/postprocess.py:169
↓ 1 callers
Function
_split_scope_top_level
按逗号 split scope,但忽略 `{}` 内的逗号。 例:'wiki/concepts/*, wiki/entities/{a,b}' → ['wiki/concepts/*', 'wiki/entities/{a,b}']
scripts/k.py:1013
↓ 1 callers
Function
_strip_anchor_from_text
去掉文本末尾的 `^x-...` 锚点(用于生成 preview / 重生成时识别原标题)。
scripts/section_parser.py:217
↓ 1 callers
Function
_strip_line_comments
去掉 // 行注释——避免注释里的 "xxx": 误判为 key。 (i18n.ts 的 value 里不含裸 // ——都是中英文/界面词,安全。)
scripts/tests/test_i18n_sync.py:35
↓ 1 callers
Function
addTag
()
web/components/FrontmatterEditor.tsx:28
↓ 1 callers
Function
aggregateBack
(hits: BacklinkHit[])
web/components/BacklinksPanel.tsx:86
↓ 1 callers
Function
aggregateOut
(hits: OutlinkHit[])
web/components/BacklinksPanel.tsx:108
↓ 1 callers
Function
aggregateStatus
(calls: ToolCallVizData[])
tools/debug-console/lib/build-flow-graph.ts:251
↓ 1 callers
Function
aggregateStatus
(calls: ToolCallVizData[])
web/lib/flow/build-flow-graph.ts:231
↓ 1 callers
Function
annotate_section
把 agent_summary 写入对应 section 并保存 .outline.json。 经 load_or_build_outline 取**新鲜**大纲(盘上缓存过期时现场重建), 再原子写回——保证 annotate 的锚点视图与 `k.py outline` 展示的一
scripts/k.py:1778
↓ 1 callers
Function
apiClient
()
tools/debug-console/lib/citation-judge.ts:12
↓ 1 callers
Function
appendPrewarmedIndex
在 system prompt 末尾 append root_index 全文,让 AI 不需要花一轮调 read_page 读它
tools/debug-console/app/api/chat/route.ts:52
↓ 1 callers
Function
applyResolve
( relPath: string, action: ResolveAction, payload?: ResolvePayload, )
web/lib/operations.ts:55
↓ 1 callers
Function
asStringArray
YAML 字段可能是 "foo"(字符串)或 ["foo", "bar"](列表);都规范化为字符串数组。 * 如果用户在 YAML 写 `tags: foo`,python-frontmatter / gray-matter 会给出字符串而非数组—— * 下游 .some(...) / 标
web/lib/kb-service.ts:104
↓ 1 callers
Function
auditAugment
( triggerCall: { name: string; args: Record<string, unknown> }, triggerResult: { ok: boolean; data?: unkno
tools/debug-console/lib/mode-augment.ts:176
↓ 1 callers
Function
blockContent
(data: unknown)
tools/debug-console/lib/verify-citations.ts:53
↓ 1 callers
Function
blockKind
(data: unknown)
tools/debug-console/lib/verify-citations.ts:59
↓ 1 callers
Function
bucketLabel
(b: string, t: ReturnType<typeof useT>)
web/components/BacklinksPanel.tsx:49
↓ 1 callers
Function
build
()
scripts/build_tutorial_html.py:28
↓ 1 callers
Function
buildAnchorRegistry
( content: string, opts?: { scanWikilinks?: boolean }, )
tools/debug-console/lib/anchor-refs.tsx:62
↓ 1 callers
Function
buildAnchorRegistry
( content: string, opts?: { scanWikilinks?: boolean }, )
web/lib/anchor-refs.tsx:93
↓ 1 callers
Function
buildFlowGraph
( msg: UIMessage | null | undefined, userQuery?: string | null, locale: Locale = DEFAULT_LOCALE, )
tools/debug-console/lib/build-flow-graph.ts:311
↓ 1 callers
Function
build_graph_data
构造 wiki 链接图谱 JSON。 返回 {nodes: [...], edges: [...]} : - 节点字段 path / title / type / status / tags / inbound_count / outbound_count - 边字
scripts/k.py:600
↓ 1 callers
Function
by_anchor
(secs)
scripts/k.py:1554
↓ 1 callers
Function
by_title
(secs)
scripts/k.py:1566
↓ 1 callers
Function
claimContextsFor
* 取某引用的「论断上下文」们(同 key 可多处出现)。每处:取本引用所在行内、从 * 「上一条引用结束/行首」到「本引用」之间的片段(剥 [[...]] 与表格 |);为空则退到整行去引用。
tools/debug-console/lib/verify-citations.ts:171
↓ 1 callers
Function
classifyCall
(name, args)
tools/debug-console/scripts/verify-flow-graph.mjs:22
↓ 1 callers
Function
classifyCall
(name: string, args: Record<string, unknown>)
web/lib/flow/build-flow-graph.ts:136
↓ 1 callers
Function
cleanPreviewText
(raw: string)
tools/debug-console/lib/anchor-refs.tsx:44
↓ 1 callers
Function
cleanPreviewText
(raw: string)
web/lib/anchor-refs.tsx:62
↓ 1 callers
Function
clearScrollClaim
()
web/lib/scroll-memory.ts:154
↓ 1 callers
Function
closeTab
(path: string, e?: React.MouseEvent)
web/components/EditorTabs.tsx:166
↓ 1 callers
Function
collect_files
收集目录下所有待处理的文件,跳过派生产物(*.outline.json / *.outline.md)。
scripts/convert.py:136
↓ 1 callers
Function
convert_file
转换/处理单个文件。返回 (成功与否, 消息)。 Pipeline: 1. 非 .md:markitdown 转为 markdown 文本;.md:直接读原文 2. postprocess.process 加锚点 + 生成 outline 数据
scripts/convert.py:170
↓ 1 callers
Function
countSections
(sections: OutlineSection[])
web/components/OutlinePanel.tsx:109
↓ 1 callers
Function
createExploreState
()
tools/debug-console/lib/mode-augment.ts:209
↓ 1 callers
Function
create_workspace
在 DATA_ROOT/workspaces/ 下创建一个新的空知识库骨架。 生成:标准目录结构 + wiki/root_index.md(标准 frontmatter 的空根索引) + log.md(首条 human 日志)。不碰已存在的 workspace(直接拒绝)。
scripts/k.py:2725
↓ 1 callers
Function
decodeHash
* Next.js 客户端导航不会触发浏览器原生的 fragment 滚动—— * pathname/searchParams 变了,但浏览器认为是同一文档,hash 不会自动定位。 * * 本组件挂在 PageColumns 里,pathname 变化或 hashchange 时主动找 id
web/components/HashScroller.tsx:20
↓ 1 callers
Function
dirOf
(p: string)
tools/debug-console/lib/build-flow-graph.ts:233
↓ 1 callers
Function
dirOf
(p: string)
web/lib/flow/build-flow-graph.ts:213
↓ 1 callers
Function
downgradeRefAnchors
(text: string, downgradedKeys: Set<string>)
tools/debug-console/lib/wiki-ref.ts:208
↓ 1 callers
Function
edgeColor
(stepType?: string, isGhost?: boolean, isSynthetic?: boolean)
tools/debug-console/components/FlowGraph.tsx:203
↓ 1 callers
Function
edgeColor
(stepType?: string)
web/components/walkthrough/ReasoningGraph.tsx:123
↓ 1 callers
Function
ensureEntryKey
(key: string)
web/lib/scroll-memory.ts:104
↓ 1 callers
Function
errorIsNotFound
* read_block 失败时:是不是「确定性不存在」(vs 网络/超时/反代/DNS)。 * 只命中明确来自 KB 业务层的串;**不**匹配 ENOTFOUND/ECONNREFUSED/http_404/timeout 等传输层故障 * (那些归 unverified、不降级,避免主站抖
tools/debug-console/lib/verify-citations.ts:49
↓ 1 callers
Function
explainCard
这张卡片是什么——返回通用讲解文案
web/components/walkthrough/ReasoningDetailPanel.tsx:35
↓ 1 callers
Function
exploreAugment
( triggerCall: { name: string; args: Record<string, unknown> }, triggerResult: { ok: boolean; data?: unkno
tools/debug-console/lib/mode-augment.ts:213
↓ 1 callers
Function
extractArgPath
从工具 args 里抽 path 字段(兼容 KB 工具的 path / CC 的 file_path)
tools/debug-console/lib/mode-augment.ts:59
↓ 1 callers
Function
extractBlockAnchorRefs
抽 markdown 文本里所有的块锚点引用 [[wiki/X#^p-…]] / [[raw/Y#^h-…]]
tools/debug-console/lib/mode-augment.ts:25
↓ 1 callers
Function
extractLastStep
(text)
tools/debug-console/scripts/verify-flow-graph.mjs:16
↓ 1 callers
Function
extractTextContent
从工具结果 data 里提取主文本内容(用于 audit 扫锚点)
tools/debug-console/lib/mode-augment.ts:47
↓ 1 callers
Function
extractThoughts
抽 thoughts:每个 **【TYPE】标题** 或 【TYPE】 后到下一个同类标记或末尾的段落 * 兼容格式: * **【EXTRACT】提取关键信息** ← 加粗包裹(agent 推荐格式) * 【EXTRACT】提取关键信息 ← 无加粗 * 【extr
tools/debug-console/lib/build-flow-graph.ts:96
↓ 1 callers
Function
extractThoughts
* 抽 thoughts:每个 **【TYPE】标题** 段,从标记后到下一个同类标记 / 末尾。 * 段内首行 = 标题(剥掉首尾的 ** 加粗符),其余 = 正文。 * * 注:控制台版用单条非贪婪正则,标题分组实测会被吞进 body 且残留 `**`;这里独立移植 * 改为「先定位所有
web/lib/flow/build-flow-graph.ts:116
↓ 1 callers
Function
filter_pages
(pages, filters)
scripts/k.py:425
↓ 1 callers
Function
find_anchor
在 md 中找包含 snippet 的块,返回 anchor + 上下文。
scripts/k.py:1754
↓ 1 callers
Function
find_owner
(start: int, end: int, self_anchor: str | None)
scripts/k.py:1705
↓ 1 callers
Function
find_section_by_anchor
(sections: list[Section], anchor: str)
scripts/section_parser.py:344
↓ 1 callers
Function
find_section_in_outline
在嵌套 sections 里递归查找:先按 anchor 精确匹配,再按 title 精确匹配。
scripts/k.py:1549
← previous
next →
201–300 of 931, ranked by callers