MCPcopy Create free account
hub / github.com/colbymchenry/codegraph / exploreFlow

Function exploreFlow

__tests__/flow-named-implementation.test.ts:149–156  ·  view source on GitHub ↗

The numbered lines of explore's Flow section.

(query: string)

Source from the content-addressed store, hash-verified

147
148/** The numbered lines of explore's Flow section. */
149async function exploreFlow(query: string): Promise<string[]> {
150 const res = await new ToolHandler(cg).execute('codegraph_explore', { query });
151 const text = res.content?.[0]?.text ?? '';
152 const start = text.indexOf('**Flow (call path among the symbols you queried)**');
153 if (start < 0) return [];
154 const section = text.slice(start).split(/\n\n(?=\*\*|>)/)[0] ?? '';
155 return section.split(/\r?\n/).filter((line) => /^\d+\. /.test(line));
156}
157
158describe('a Flow through an interface goes through the implementation the query names', () => {
159 it('Go: the route through formSource.TrySet when the query names it', () => {

Calls 1

executeMethod · 0.45

Tested by

no test coverage detected