mirror of
https://github.com/catlog22/Claude-Code-Workflow.git
synced 2026-03-27 20:00:44 +08:00
fix: improve CodexLens env defaults, self-exclusion, and route handling
- Adjust env defaults (embed batch 64, workers 2) and add HNSW/chunking params - Exclude .codexlens directory from indexing and file watching - Expand codexlens-routes with improved validation and error handling - Enhance integration tests for broader route coverage Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -296,7 +296,7 @@ def cmd_remove_file(args: argparse.Namespace) -> None:
|
||||
DEFAULT_EXCLUDES = frozenset({
|
||||
"node_modules", ".git", "__pycache__", "dist", "build",
|
||||
".venv", "venv", ".tox", ".mypy_cache", ".pytest_cache",
|
||||
".next", ".nuxt", "coverage", ".eggs", "*.egg-info",
|
||||
".next", ".nuxt", "coverage", ".eggs", "*.egg-info", ".codexlens",
|
||||
})
|
||||
|
||||
|
||||
|
||||
@@ -51,7 +51,7 @@ class WatcherConfig:
|
||||
# IDE / Editor
|
||||
".idea", ".vscode", ".vs",
|
||||
# Package / cache
|
||||
".cache", ".parcel-cache", ".turbo", ".next", ".nuxt",
|
||||
".cache", ".parcel-cache", ".turbo", ".next", ".nuxt", ".codexlens",
|
||||
# Logs / temp
|
||||
"logs", "tmp", "temp",
|
||||
})
|
||||
|
||||
@@ -9,7 +9,13 @@ from unittest.mock import patch
|
||||
|
||||
import pytest
|
||||
|
||||
from codexlens_search.bridge import _build_parser, _json_output, _error_exit
|
||||
from codexlens_search.bridge import (
|
||||
DEFAULT_EXCLUDES,
|
||||
_build_parser,
|
||||
_json_output,
|
||||
_error_exit,
|
||||
should_exclude,
|
||||
)
|
||||
|
||||
|
||||
# ---------------------------------------------------------------------------
|
||||
@@ -71,6 +77,12 @@ class TestParser:
|
||||
args = self.parser.parse_args([])
|
||||
assert args.command is None
|
||||
|
||||
def test_default_excludes_include_codexlens(self):
|
||||
assert ".codexlens" in DEFAULT_EXCLUDES
|
||||
|
||||
def test_should_exclude_codexlens_directory(self):
|
||||
assert should_exclude(Path(".codexlens") / "metadata.db", DEFAULT_EXCLUDES) is True
|
||||
|
||||
|
||||
# ---------------------------------------------------------------------------
|
||||
# JSON output helpers
|
||||
|
||||
@@ -52,6 +52,7 @@ class TestWatcherConfig:
|
||||
assert ".git" in cfg.ignored_patterns
|
||||
assert "__pycache__" in cfg.ignored_patterns
|
||||
assert "node_modules" in cfg.ignored_patterns
|
||||
assert ".codexlens" in cfg.ignored_patterns
|
||||
|
||||
def test_custom(self):
|
||||
cfg = WatcherConfig(debounce_ms=1000, ignored_patterns={".custom"})
|
||||
|
||||
Reference in New Issue
Block a user