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

Function filePath

apps/kimi-web/src/lib/toolMeta.ts:172–174  ·  view source on GitHub ↗

Take a tool input's file path, regardless of which key the tool used.

(d: Record<string, unknown>)

Source from the content-addressed store, hash-verified

170
171/** Take a tool input's file path, regardless of which key the tool used. */
172function filePath(d: Record<string, unknown>): string | undefined {
173 return str(d.path) ?? str(d.file_path) ?? str(d.filePath) ?? str(d.filename);
174}
175
176const BASH_MAX = 64;
177

Callers 1

toolSummaryFunction · 0.85

Calls 1

strFunction · 0.70

Tested by

no test coverage detected