mirror of
https://github.com/catlog22/Claude-Code-Workflow.git
synced 2026-03-01 09:33:25 +08:00
feat: add experimental support for AST parsing and static graph indexing
- Introduced CLI options for using AST grep parsers and enabling static graph relationships during indexing. - Updated configuration management to load new settings for AST parsing and static graph types. - Enhanced AST grep processor to handle imports with aliases and improve relationship tracking. - Modified TreeSitter parsers to support synthetic module scopes for better static graph persistence. - Implemented global relationship updates in the incremental indexer for static graph expansion. - Added new ArtifactTag and FloatingFileBrowser components to the frontend for improved terminal dashboard functionality. - Created utility functions for detecting CCW artifacts in terminal output with associated tests.
This commit is contained in:
@@ -294,6 +294,15 @@ class Config:
|
||||
"timeout_ms": self.llm_timeout_ms,
|
||||
"batch_size": self.llm_batch_size,
|
||||
},
|
||||
"parsing": {
|
||||
# Prefer ast-grep processors when available (experimental).
|
||||
"use_astgrep": self.use_astgrep,
|
||||
},
|
||||
"indexing": {
|
||||
# Persist global relationship edges during index build for static graph expansion.
|
||||
"static_graph_enabled": self.static_graph_enabled,
|
||||
"static_graph_relationship_types": self.static_graph_relationship_types,
|
||||
},
|
||||
"reranker": {
|
||||
"enabled": self.enable_cross_encoder_rerank,
|
||||
"backend": self.reranker_backend,
|
||||
@@ -413,6 +422,34 @@ class Config:
|
||||
if "fine_k" in cascade:
|
||||
self.cascade_fine_k = cascade["fine_k"]
|
||||
|
||||
# Load parsing settings
|
||||
parsing = settings.get("parsing", {})
|
||||
if isinstance(parsing, dict) and "use_astgrep" in parsing:
|
||||
self.use_astgrep = bool(parsing["use_astgrep"])
|
||||
|
||||
# Load indexing settings
|
||||
indexing = settings.get("indexing", {})
|
||||
if isinstance(indexing, dict):
|
||||
if "static_graph_enabled" in indexing:
|
||||
self.static_graph_enabled = bool(indexing["static_graph_enabled"])
|
||||
if "static_graph_relationship_types" in indexing:
|
||||
raw_types = indexing["static_graph_relationship_types"]
|
||||
if isinstance(raw_types, list):
|
||||
allowed = {"imports", "inherits", "calls"}
|
||||
cleaned = []
|
||||
for item in raw_types:
|
||||
val = str(item).strip().lower()
|
||||
if val and val in allowed:
|
||||
cleaned.append(val)
|
||||
if cleaned:
|
||||
self.static_graph_relationship_types = cleaned
|
||||
else:
|
||||
log.warning(
|
||||
"Invalid indexing.static_graph_relationship_types in %s: %r (expected list)",
|
||||
self.settings_path,
|
||||
raw_types,
|
||||
)
|
||||
|
||||
# Load API settings
|
||||
api = settings.get("api", {})
|
||||
if "max_workers" in api:
|
||||
|
||||
Reference in New Issue
Block a user