MCPcopy Create free account
hub / github.com/freecodexyz/free-code / getToolsWithGrouping

Function getToolsWithGrouping

src/utils/groupToolUses.ts:25–32  ·  view source on GitHub ↗
(tools: Tools)

Source from the content-addressed store, hash-verified

23const GROUPING_CACHE = new WeakMap<Tools, Set<string>>()
24
25function getToolsWithGrouping(tools: Tools): Set<string> {
26 let cached = GROUPING_CACHE.get(tools)
27 if (!cached) {
28 cached = new Set(tools.filter(t => t.renderGroupedToolUse).map(t => t.name))
29 GROUPING_CACHE.set(tools, cached)
30 }
31 return cached
32}
33
34function getToolUseInfo(
35 msg: MessageWithoutProgress,

Callers 1

applyGroupingFunction · 0.85

Calls 2

setMethod · 0.80
getMethod · 0.45

Tested by

no test coverage detected