MCPcopy Create free account
hub / github.com/QodeXcli/QodeX / extractFilePathsFromArgs

Function extractFilePathsFromArgs

src/hooks/manager.ts:20–31  ·  view source on GitHub ↗
(args: unknown)

Source from the content-addressed store, hash-verified

18]);
19
20export function extractFilePathsFromArgs(args: unknown): string[] {
21 if (!args || typeof args !== 'object') return [];
22 const out: string[] = [];
23 for (const [k, v] of Object.entries(args as Record<string, unknown>)) {
24 if (!FILE_PATH_ARG_KEYS.has(k)) continue;
25 if (typeof v === 'string') out.push(v);
26 else if (Array.isArray(v)) {
27 for (const item of v) if (typeof item === 'string') out.push(item);
28 }
29 }
30 return out;
31}
32
33export class HooksManager {
34 constructor(private cfg: HooksConfig = {}) {}

Callers 2

hooks.test.tsFile · 0.85
executeToolCallMethod · 0.85

Calls 2

hasMethod · 0.45
pushMethod · 0.45

Tested by

no test coverage detected