cocoindex-code 0.2.1__tar.gz → 0.2.2__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {cocoindex_code-0.2.1 → cocoindex_code-0.2.2}/PKG-INFO +2 -2
- {cocoindex_code-0.2.1 → cocoindex_code-0.2.2}/pyproject.toml +1 -1
- {cocoindex_code-0.2.1 → cocoindex_code-0.2.2}/src/cocoindex_code/_version.py +2 -2
- {cocoindex_code-0.2.1 → cocoindex_code-0.2.2}/src/cocoindex_code/cli.py +3 -0
- {cocoindex_code-0.2.1 → cocoindex_code-0.2.2}/src/cocoindex_code/daemon.py +18 -9
- {cocoindex_code-0.2.1 → cocoindex_code-0.2.2}/src/cocoindex_code/project.py +1 -1
- {cocoindex_code-0.2.1 → cocoindex_code-0.2.2}/src/cocoindex_code/protocol.py +1 -0
- {cocoindex_code-0.2.1 → cocoindex_code-0.2.2}/.gitignore +0 -0
- {cocoindex_code-0.2.1 → cocoindex_code-0.2.2}/LICENSE +0 -0
- {cocoindex_code-0.2.1 → cocoindex_code-0.2.2}/README.md +0 -0
- {cocoindex_code-0.2.1 → cocoindex_code-0.2.2}/src/cocoindex_code/__init__.py +0 -0
- {cocoindex_code-0.2.1 → cocoindex_code-0.2.2}/src/cocoindex_code/__main__.py +0 -0
- {cocoindex_code-0.2.1 → cocoindex_code-0.2.2}/src/cocoindex_code/client.py +0 -0
- {cocoindex_code-0.2.1 → cocoindex_code-0.2.2}/src/cocoindex_code/config.py +0 -0
- {cocoindex_code-0.2.1 → cocoindex_code-0.2.2}/src/cocoindex_code/indexer.py +0 -0
- {cocoindex_code-0.2.1 → cocoindex_code-0.2.2}/src/cocoindex_code/query.py +0 -0
- {cocoindex_code-0.2.1 → cocoindex_code-0.2.2}/src/cocoindex_code/schema.py +0 -0
- {cocoindex_code-0.2.1 → cocoindex_code-0.2.2}/src/cocoindex_code/server.py +0 -0
- {cocoindex_code-0.2.1 → cocoindex_code-0.2.2}/src/cocoindex_code/settings.py +0 -0
- {cocoindex_code-0.2.1 → cocoindex_code-0.2.2}/src/cocoindex_code/shared.py +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: cocoindex-code
|
|
3
|
-
Version: 0.2.
|
|
3
|
+
Version: 0.2.2
|
|
4
4
|
Summary: MCP server for indexing and querying codebases using CocoIndex
|
|
5
5
|
Project-URL: Homepage, https://github.com/cocoindex-io/cocoindex-code
|
|
6
6
|
Project-URL: Repository, https://github.com/cocoindex-io/cocoindex-code
|
|
@@ -17,7 +17,7 @@ Classifier: Programming Language :: Python :: 3.12
|
|
|
17
17
|
Classifier: Programming Language :: Python :: 3.13
|
|
18
18
|
Classifier: Topic :: Software Development :: Libraries :: Python Modules
|
|
19
19
|
Requires-Python: >=3.11
|
|
20
|
-
Requires-Dist: cocoindex[litellm]==1.0.
|
|
20
|
+
Requires-Dist: cocoindex[litellm]==1.0.0a33
|
|
21
21
|
Requires-Dist: einops>=0.8.2
|
|
22
22
|
Requires-Dist: mcp>=1.0.0
|
|
23
23
|
Requires-Dist: msgspec>=0.19.0
|
|
@@ -28,7 +28,7 @@ version_tuple: VERSION_TUPLE
|
|
|
28
28
|
commit_id: COMMIT_ID
|
|
29
29
|
__commit_id__: COMMIT_ID
|
|
30
30
|
|
|
31
|
-
__version__ = version = '0.2.
|
|
32
|
-
__version_tuple__ = version_tuple = (0, 2,
|
|
31
|
+
__version__ = version = '0.2.2'
|
|
32
|
+
__version_tuple__ = version_tuple = (0, 2, 2)
|
|
33
33
|
|
|
34
34
|
__commit_id__ = commit_id = None
|
|
@@ -100,6 +100,9 @@ def print_index_stats(status: ProjectStatusResponse) -> None:
|
|
|
100
100
|
"""Print formatted index statistics."""
|
|
101
101
|
if status.progress is not None:
|
|
102
102
|
_typer.echo(f"Indexing in progress: {_format_progress(status.progress)}")
|
|
103
|
+
if not status.index_exists:
|
|
104
|
+
_typer.echo("\nIndex not created yet. Run `ccc index` to build the index.")
|
|
105
|
+
return
|
|
103
106
|
_typer.echo("\nIndex stats:")
|
|
104
107
|
_typer.echo(f" Chunks: {status.total_chunks}")
|
|
105
108
|
_typer.echo(f" Files: {status.total_files}")
|
|
@@ -6,6 +6,7 @@ import asyncio
|
|
|
6
6
|
import logging
|
|
7
7
|
import os
|
|
8
8
|
import signal
|
|
9
|
+
import sqlite3
|
|
9
10
|
import sys
|
|
10
11
|
import threading
|
|
11
12
|
import time
|
|
@@ -279,15 +280,22 @@ class ProjectRegistry:
|
|
|
279
280
|
)
|
|
280
281
|
|
|
281
282
|
db = project.env.get_context(SQLITE_DB)
|
|
282
|
-
|
|
283
|
-
|
|
284
|
-
|
|
285
|
-
"SELECT COUNT(
|
|
286
|
-
|
|
287
|
-
|
|
288
|
-
|
|
289
|
-
|
|
290
|
-
|
|
283
|
+
index_exists = True
|
|
284
|
+
try:
|
|
285
|
+
with db.readonly() as conn:
|
|
286
|
+
total_chunks = conn.execute("SELECT COUNT(*) FROM code_chunks_vec").fetchone()[0]
|
|
287
|
+
total_files = conn.execute(
|
|
288
|
+
"SELECT COUNT(DISTINCT file_path) FROM code_chunks_vec"
|
|
289
|
+
).fetchone()[0]
|
|
290
|
+
lang_rows = conn.execute(
|
|
291
|
+
"SELECT language, COUNT(*) as cnt FROM code_chunks_vec"
|
|
292
|
+
" GROUP BY language ORDER BY cnt DESC"
|
|
293
|
+
).fetchall()
|
|
294
|
+
except sqlite3.OperationalError:
|
|
295
|
+
index_exists = False
|
|
296
|
+
total_chunks = 0
|
|
297
|
+
total_files = 0
|
|
298
|
+
lang_rows = []
|
|
291
299
|
|
|
292
300
|
lock = self._index_locks.get(project_root)
|
|
293
301
|
is_indexing = lock is not None and lock.locked()
|
|
@@ -298,6 +306,7 @@ class ProjectRegistry:
|
|
|
298
306
|
total_files=total_files,
|
|
299
307
|
languages={lang: cnt for lang, cnt in lang_rows},
|
|
300
308
|
progress=progress,
|
|
309
|
+
index_exists=index_exists,
|
|
301
310
|
)
|
|
302
311
|
|
|
303
312
|
def remove_project(self, project_root: str) -> bool:
|
|
@@ -51,7 +51,7 @@ class Project:
|
|
|
51
51
|
try:
|
|
52
52
|
handle = self._app.update()
|
|
53
53
|
async for snapshot in handle.watch():
|
|
54
|
-
file_stats = snapshot.stats.
|
|
54
|
+
file_stats = snapshot.stats.by_component.get("process_file")
|
|
55
55
|
if file_stats is not None:
|
|
56
56
|
progress = IndexingProgress(
|
|
57
57
|
num_execution_starts=file_stats.num_execution_starts,
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|