MCPcopy Create free account
hub / github.com/Qinbf/groundmap / extractArgPath

Function extractArgPath

tools/debug-console/lib/mode-augment.ts:59–63  ·  view source on GitHub ↗

从工具 args 里抽 path 字段(兼容 KB 工具的 path / CC 的 file_path)

(args: Record<string, unknown>)

Source from the content-addressed store, hash-verified

57
58/** 从工具 args 里抽 path 字段(兼容 KB 工具的 path / CC 的 file_path) */
59function extractArgPath(args: Record<string, unknown>): string | null {
60 const p = args.path || args.file_path || args.target_file;
61 if (typeof p !== "string") return null;
62 return p.replace(/.*\/(wiki|raw)\//, "$1/");
63}
64
65/** 从 backlinks/outlinks 结果里抽 paths */
66function extractPathsFromLinkResult(

Callers 1

exploreAugmentFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected