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

Function readTargetFor

src/agent/read-cache.ts:61–70  ·  view source on GitHub ↗
(args: any)

Source from the content-addressed store, hash-verified

59}
60
61function readTargetFor(args: any): ReadTarget | null {
62 const path = args?.path ?? args?.file_path ?? args?.filePath;
63 if (!path || typeof path !== 'string') return null;
64 const { offset, limit, symbol } = args;
65 const full = offset == null && limit == null && (symbol == null || symbol === '');
66 const key = full
67 ? `${path}\u0000FULL`
68 : `${path}\u0000o${offset ?? ''}:l${limit ?? ''}:s${symbol ?? ''}`;
69 return { path, full, key };
70}
71
72/** Extract the structural outline block from a read_file result, if present. */
73export function extractOutline(content: string | null): string | null {

Callers 1

compactFileReadsFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected