MCPcopy
hub / github.com/codeaashu/claude-code / buildToolLookup

Function buildToolLookup

src/utils/permissions/yoloClassifier.ts:364–373  ·  view source on GitHub ↗
(tools: Tools)

Source from the content-addressed store, hash-verified

362type ToolLookup = ReadonlyMap<string, Tool>
363
364function buildToolLookup(tools: Tools): ToolLookup {
365 const map = new Map<string, Tool>()
366 for (const tool of tools) {
367 map.set(tool.name, tool)
368 for (const alias of tool.aliases ?? []) {
369 map.set(alias, tool)
370 }
371 }
372 return map
373}
374
375/**
376 * Serialize a single transcript block as a JSONL dict line: `{"Bash":"ls"}`

Callers 2

classifyYoloActionFunction · 0.85

Calls 1

setMethod · 0.45

Tested by

no test coverage detected