Skip to content

Commit 487328c

Browse files
committed
fix: remove redundant save_index call in server lifespan cleanup
- Fixes AttributeError during server shutdown where save_index() method was called on JSONIndexManager but doesn't exist - In JSON-based indexing system, index is automatically saved during build_index() operations - Update git workflow guidelines to allow direct commits with clean English messages - Resolves issue #36 affecting langchain users
1 parent 5a32fcc commit 487328c

File tree

2 files changed

+1
-5
lines changed

2 files changed

+1
-5
lines changed

src/code_index_mcp/server.py

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -87,10 +87,6 @@ async def indexer_lifespan(_server: FastMCP) -> AsyncIterator[CodeIndexerContext
8787
if context.file_watcher_service:
8888
context.file_watcher_service.stop_monitoring()
8989

90-
# Only save index if project path has been set
91-
if context.base_path and context.index_manager:
92-
context.index_manager.save_index()
93-
9490
# Create the MCP server with lifespan manager
9591
mcp = FastMCP("CodeIndexer", lifespan=indexer_lifespan, dependencies=["pathlib"])
9692

uv.lock

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)