@@ -4,12 +4,12 @@ The Call Hierarchy API allows tracing the relationships between functions, showi
44
55## CallHierarchyRequest
66
7- | Field | Type | Default | Description |
8- | :----------------- | :------------------------------------------------------- | :------- | :--------------------------------------------------- |
9- | ` locate ` | [ ` LocateText ` ] ( locate.md ) \| [ ` LocateSymbol ` ] ( locate.md ) | Required | The symbol to trace callers/callees for. |
10- | ` direction ` | ` "incoming" \| "outgoing" \| "both" ` | ` "both" ` | Direction of the trace. |
11- | ` depth ` | ` number ` | ` 2 ` | Maximum number of hops to trace. |
12- | ` include_external ` | ` boolean ` | ` false ` | Whether to include calls to/from external libraries. |
7+ | Field | Type | Default | Description |
8+ | :----------------- | :-------------------------- | :- ------- | :--------------------------------------------------- |
9+ | ` locate ` | [ ` Locate ` ] ( locate.md ) | Required | The symbol to trace callers/callees for. |
10+ | ` direction ` | ` "incoming" ` \| ` "outgoing" ` \| ` "both" ` | ` "both" ` | Direction of the trace. |
11+ | ` depth ` | ` number ` | ` 2 ` | Maximum number of hops to trace. |
12+ | ` include_external ` | ` boolean ` | ` false ` | Whether to include calls to/from external libraries. |
1313
1414## CallHierarchyResponse
1515
@@ -19,6 +19,10 @@ The Call Hierarchy API allows tracing the relationships between functions, showi
1919| ` nodes ` | ` Map<string, CallHierarchyNode> ` | Details of all types encountered in the hierarchy. |
2020| ` edges_in ` | ` Map<string, CallEdge[]> ` | Incoming edges for each node. |
2121| ` edges_out ` | ` Map<string, CallEdge[]> ` | Outgoing edges for each node. |
22+ | ` calls_in ` | ` CallHierarchyItem[] ` | Flat list of incoming calls for tree rendering. |
23+ | ` calls_out ` | ` CallHierarchyItem[] ` | Flat list of outgoing calls for tree rendering. |
24+ | ` direction ` | ` string ` | The direction that was used. |
25+ | ` depth ` | ` number ` | The depth that was used. |
2226
2327### CallHierarchyNode
2428
@@ -30,6 +34,16 @@ The Call Hierarchy API allows tracing the relationships between functions, showi
3034| ` file_path ` | ` string ` | Relative path to the file. |
3135| ` range_start ` | ` Position ` | Start coordinates of the definition. |
3236
37+ ### CallHierarchyItem
38+
39+ | Field | Type | Description |
40+ | :---------- | :--------- | :----------------------------------------------------- |
41+ | ` name ` | ` string ` | Name of the function. |
42+ | ` kind ` | ` string ` | Symbol kind (e.g., ` Function ` , ` Method ` ). |
43+ | ` file_path ` | ` string ` | Relative path to the file. |
44+ | ` level ` | ` number ` | Nesting level in the hierarchy. |
45+ | ` is_cycle ` | ` boolean ` | Whether this represents a recursive cycle. |
46+
3347### CallEdge
3448
3549| Field | Type | Description |
@@ -48,7 +62,9 @@ The Call Hierarchy API allows tracing the relationships between functions, showi
4862{
4963 "locate" : {
5064 "file_path" : " src/app.py" ,
51- "symbol_path" : [" start_server" ]
65+ "scope" : {
66+ "symbol_path" : [" start_server" ]
67+ }
5268 },
5369 "direction" : " outgoing" ,
5470 "depth" : 1
@@ -79,7 +95,9 @@ The Call Hierarchy API allows tracing the relationships between functions, showi
7995{
8096 "locate" : {
8197 "file_path" : " src/db.py" ,
82- "symbol_path" : [" initialize_db" ]
98+ "scope" : {
99+ "symbol_path" : [" initialize_db" ]
100+ }
83101 },
84102 "direction" : " incoming" ,
85103 "depth" : 2
@@ -110,7 +128,9 @@ The Call Hierarchy API allows tracing the relationships between functions, showi
110128{
111129 "locate" : {
112130 "file_path" : " src/controllers.py" ,
113- "symbol_path" : [" handle_request" ]
131+ "scope" : {
132+ "symbol_path" : [" handle_request" ]
133+ }
114134 },
115135 "direction" : " both" ,
116136 "depth" : 3 ,
0 commit comments