feat: Implement association tree for LSP-based code relationship discovery

- Add `association_tree` module with components for building and processing call association trees using LSP call hierarchy capabilities.
- Introduce `AssociationTreeBuilder` for constructing call trees from seed locations with depth-first expansion.
- Create data structures: `TreeNode`, `CallTree`, and `UniqueNode` for representing nodes and relationships in the call tree.
- Implement `ResultDeduplicator` to extract unique nodes from call trees and assign relevance scores based on depth, frequency, and kind.
- Add unit tests for `AssociationTreeBuilder` and `ResultDeduplicator` to ensure functionality and correctness.
This commit is contained in:
catlog22
2026-01-20 22:09:04 +08:00
parent b85d9b9eb1
commit 261c98549d
21 changed files with 2826 additions and 94 deletions

View File

@@ -9,8 +9,20 @@
"extensions": ["py", "pyi"],
"command": ["pyright-langserver", "--stdio"],
"enabled": true,
"initializationOptions": {},
"settings": {}
"initializationOptions": {
"pythonPath": "",
"pythonPlatform": "",
"pythonVersion": "3.13"
},
"settings": {
"python.analysis": {
"typeCheckingMode": "standard",
"diagnosticMode": "workspace",
"exclude": ["**/node_modules", "**/__pycache__", "build", "dist"],
"include": ["src/**", "tests/**"],
"stubPath": "typings"
}
}
},
{
"languageId": "typescript",