(scope: GraphScope | undefined)
| 8 | /** A node or symbol alone has no relationships to show, so it starts one hop |
| 9 | * out. Files and folders already carry their internal edges at depth 0. */ |
| 10 | export function minimumScopeDepth(scope: GraphScope | undefined): number { |
| 11 | return scope?.kind === 'node' || scope?.kind === 'symbol' ? 1 : 0; |
| 12 | } |
| 13 | |
| 14 | /** Scoped requests are independent of the whole-repository layout budget. */ |
| 15 | export function useGraphScope({ project, layout, filePath, range, fetch: fetchImpl, edgeTypes, limits }: { |