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

Function noFlowReason

src/ui-server/api/flow.ts:880–899  ·  view source on GitHub ↗

* Why there is no strip, in the words that say what to do next. * * "Not connected" is a real answer about this index, not a failure — a flow * that runs through a dynamic dispatch the resolver could not bridge genuinely * has no static path, and saying so is the honest end of the search. CG-51

(
  parsed: FlowQuery,
  tokenCount: number,
  unresolved: readonly string[]
)

Source from the content-addressed store, hash-verified

878 * turns this sentence into the boundary end cap that names the dispatch site.
879 */
880function noFlowReason(
881 parsed: FlowQuery,
882 tokenCount: number,
883 unresolved: readonly string[]
884): string {
885 if (unresolved.length > 0) {
886 return `${unresolved.join(' and ')} ${unresolved.length > 1 ? 'name' : 'names'} nothing in this index.`;
887 }
888 if (parsed.kind === 'directed') {
889 return (
890 `No chain of calls reaches ${parsed.to} from ${parsed.from} within ${DIRECTED_MAX_HOPS} hops. ` +
891 'The path may run through a dynamic dispatch — a callback, a registry, a reflective ' +
892 'call — that no static edge records.'
893 );
894 }
895 if (tokenCount < 2) {
896 return 'Name at least two symbols: a flow is a path between them.';
897 }
898 return 'Those symbols do not call one another, directly or through one intermediate.';
899}

Callers 1

buildFlowFunction · 0.85

Calls 1

joinMethod · 0.45

Tested by

no test coverage detected