mirror of
https://github.com/val1813/kwcode.git
synced 2026-09-03 14:42:13 +08:00
- Restructure deps: move llama-cpp-python/tree-sitter to optional (base install is pure Python, no compiler needed) - Add __main__.py for pipx/python -m support - Add GitHub Actions auto-publish on tag push - Fix install scripts: correct package name, remove Ollama check, add pipx priority - Wrap ast_engine imports in try/except for graceful degradation - Published v1.0.7 to PyPI: pip install kwcode Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
26 lines
778 B
Python
26 lines
778 B
Python
"""
|
|
AST Engine: tree-sitter based call graph locator (spec S6).
|
|
Provides function-level code location via call graph analysis.
|
|
BM25+graph retrieval (spec LOC upgrade).
|
|
"""
|
|
|
|
try:
|
|
from kaiwu.ast_engine.parser import TreeSitterParser
|
|
from kaiwu.ast_engine.call_graph import CallGraph
|
|
from kaiwu.ast_engine.locator import ASTLocator
|
|
from kaiwu.ast_engine.graph_builder import GraphBuilder
|
|
from kaiwu.ast_engine.graph_retriever import GraphRetriever
|
|
AST_AVAILABLE = True
|
|
except ImportError:
|
|
TreeSitterParser = None
|
|
CallGraph = None
|
|
ASTLocator = None
|
|
GraphBuilder = None
|
|
GraphRetriever = None
|
|
AST_AVAILABLE = False
|
|
|
|
__all__ = [
|
|
"TreeSitterParser", "CallGraph", "ASTLocator",
|
|
"GraphBuilder", "GraphRetriever", "AST_AVAILABLE",
|
|
]
|