You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: CHANGELOG.md
+9Lines changed: 9 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -20,6 +20,15 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
20
20
21
21
## [Unreleased]
22
22
23
+
### Added
24
+
-**Call graph extraction and query**: Tree-sitter query-based extraction of function calls, method calls, constructors, and imports across 5 languages (TypeScript/JavaScript, Python, Go, Rust)
25
+
-**`call_graph` tool**: Query callers or callees of any function/method with branch-aware filtering
26
+
-**DB schema v2**: `symbols`, `call_edges`, and `branch_symbols` tables with full CRUD, GC, and batch operations
27
+
-**Same-file call resolution**: Automatically resolves call edges to symbols defined in the same file during indexing
28
+
29
+
### Fixed
30
+
-**Missing `call_graph` export**: The `call_graph` tool was not exported from the plugin entry point — now available to OpenCode users
Query the call graph to find callers or callees of a function/method. Automatically built during indexing for TypeScript, JavaScript, Python, Go, and Rust.
description: Trace callers or callees using the call graph
3
+
---
4
+
5
+
Trace function dependencies using the `call_graph` tool.
6
+
7
+
User input: $ARGUMENTS
8
+
9
+
Interpret input as follows:
10
+
- Default to `direction="callers"` unless input asks for callees/calls/makes calls.
11
+
-`name=<function>` or plain text function name sets `name`.
12
+
-`symbolId=<id>` is required for `direction="callees"`.
13
+
14
+
Execution flow:
15
+
1. If direction is `callers`, call `call_graph` with `{ name, direction: "callers" }`.
16
+
2. If direction is `callees` and `symbolId` is present, call `call_graph` with `{ name, direction: "callees", symbolId }`.
17
+
3. If direction is `callees` and `symbolId` is missing, first call `call_graph` with `direction="callers"` to get symbol IDs, then ask the user to choose one if multiple are returned.
18
+
19
+
Examples:
20
+
-`/call-graph Database` → callers for `Database`
21
+
-`/call-graph callers name=Indexer` → callers for `Indexer`
22
+
-`/call-graph callees name=Database symbolId=sym_abc123` → callees for selected symbol
23
+
24
+
If output says no callers found, suggest running `/index force` first.
0 commit comments