MCPcopy Create free account
hub / github.com/MoonshotAI/kimi-code / toolNames

Function toolNames

packages/agent-core/test/agent/config.test.ts:225–234  ·  view source on GitHub ↗
(value: unknown)

Source from the content-addressed store, hash-verified

223});
224
225function toolNames(value: unknown): string[] {
226 if (!Array.isArray(value)) return [];
227 return value
228 .map((item) => {
229 if (item === null || typeof item !== 'object') return null;
230 const record = item as Record<string, unknown>;
231 return typeof record['name'] === 'string' ? record['name'] : null;
232 })
233 .filter((name): name is string => name !== null);
234}

Callers 1

config.test.tsFile · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected