kodit 0.3.3__py3-none-any.whl → 0.3.5__py3-none-any.whl

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.

Potentially problematic release.


This version of kodit might be problematic. Click here for more details.

Files changed (36) hide show
  1. kodit/_version.py +2 -2
  2. kodit/app.py +23 -4
  3. kodit/application/factories/code_indexing_factory.py +2 -24
  4. kodit/application/services/code_indexing_application_service.py +10 -2
  5. kodit/application/services/sync_scheduler.py +128 -0
  6. kodit/cli.py +103 -28
  7. kodit/config.py +15 -0
  8. kodit/domain/services/index_service.py +25 -66
  9. kodit/domain/value_objects.py +10 -22
  10. kodit/infrastructure/slicing/__init__.py +1 -0
  11. kodit/infrastructure/slicing/language_detection_service.py +18 -0
  12. kodit/infrastructure/slicing/slicer.py +894 -0
  13. kodit/infrastructure/sqlalchemy/index_repository.py +29 -0
  14. kodit/migrations/versions/4073b33f9436_add_file_processing_flag.py +6 -4
  15. kodit/migrations/versions/4552eb3f23ce_add_summary.py +4 -4
  16. kodit/migrations/versions/7c3bbc2ab32b_add_embeddings_table.py +24 -16
  17. kodit/migrations/versions/85155663351e_initial.py +64 -48
  18. kodit/migrations/versions/c3f5137d30f5_index_all_the_things.py +20 -14
  19. {kodit-0.3.3.dist-info → kodit-0.3.5.dist-info}/METADATA +10 -4
  20. {kodit-0.3.3.dist-info → kodit-0.3.5.dist-info}/RECORD +23 -32
  21. kodit/infrastructure/snippet_extraction/__init__.py +0 -1
  22. kodit/infrastructure/snippet_extraction/factories.py +0 -13
  23. kodit/infrastructure/snippet_extraction/language_detection_service.py +0 -39
  24. kodit/infrastructure/snippet_extraction/languages/csharp.scm +0 -12
  25. kodit/infrastructure/snippet_extraction/languages/go.scm +0 -26
  26. kodit/infrastructure/snippet_extraction/languages/java.scm +0 -12
  27. kodit/infrastructure/snippet_extraction/languages/javascript.scm +0 -24
  28. kodit/infrastructure/snippet_extraction/languages/python.scm +0 -22
  29. kodit/infrastructure/snippet_extraction/languages/typescript.scm +0 -25
  30. kodit/infrastructure/snippet_extraction/snippet_extraction_factory.py +0 -67
  31. kodit/infrastructure/snippet_extraction/snippet_query_provider.py +0 -44
  32. kodit/infrastructure/snippet_extraction/tree_sitter_snippet_extractor.py +0 -182
  33. kodit/infrastructure/sqlalchemy/file_repository.py +0 -78
  34. {kodit-0.3.3.dist-info → kodit-0.3.5.dist-info}/WHEEL +0 -0
  35. {kodit-0.3.3.dist-info → kodit-0.3.5.dist-info}/entry_points.txt +0 -0
  36. {kodit-0.3.3.dist-info → kodit-0.3.5.dist-info}/licenses/LICENSE +0 -0
@@ -399,6 +399,35 @@ class SqlAlchemyIndexRepository(IndexRepository):
399
399
  )
400
400
  await self._session.execute(snippet_stmt)
401
401
 
402
+ async def delete_snippets_by_file_ids(self, file_ids: list[int]) -> None:
403
+ """Delete snippets by file IDs.
404
+
405
+ This is used when files are removed from the working copy to clean up
406
+ orphaned snippets and their associated embeddings.
407
+ """
408
+ if not file_ids:
409
+ return
410
+
411
+ # First get all snippets for these files
412
+ stmt = select(db_entities.Snippet).where(
413
+ db_entities.Snippet.file_id.in_(file_ids)
414
+ )
415
+ result = await self._session.scalars(stmt)
416
+ snippets = result.all()
417
+
418
+ # Delete all embeddings for these snippets
419
+ for snippet in snippets:
420
+ embedding_stmt = delete(db_entities.Embedding).where(
421
+ db_entities.Embedding.snippet_id == snippet.id
422
+ )
423
+ await self._session.execute(embedding_stmt)
424
+
425
+ # Now delete the snippets
426
+ snippet_stmt = delete(db_entities.Snippet).where(
427
+ db_entities.Snippet.file_id.in_(file_ids)
428
+ )
429
+ await self._session.execute(snippet_stmt)
430
+
402
431
  async def update(self, index: domain_entities.Index) -> None:
403
432
  """Update an index by ensuring all domain objects are saved to database."""
404
433
  if not index.id:
@@ -14,8 +14,8 @@ import sqlalchemy as sa
14
14
 
15
15
 
16
16
  # revision identifiers, used by Alembic.
17
- revision: str = '4073b33f9436'
18
- down_revision: Union[str, None] = '4552eb3f23ce'
17
+ revision: str = "4073b33f9436"
18
+ down_revision: Union[str, None] = "4552eb3f23ce"
19
19
  branch_labels: Union[str, Sequence[str], None] = None
20
20
  depends_on: Union[str, Sequence[str], None] = None
21
21
 
@@ -23,12 +23,14 @@ depends_on: Union[str, Sequence[str], None] = None
23
23
  def upgrade() -> None:
24
24
  """Upgrade schema."""
25
25
  # ### commands auto generated by Alembic - please adjust! ###
26
- op.add_column('files', sa.Column('file_processing_status', sa.Integer(), nullable=False))
26
+ op.add_column(
27
+ "files", sa.Column("file_processing_status", sa.Integer(), nullable=False)
28
+ )
27
29
  # ### end Alembic commands ###
28
30
 
29
31
 
30
32
  def downgrade() -> None:
31
33
  """Downgrade schema."""
32
34
  # ### commands auto generated by Alembic - please adjust! ###
33
- op.drop_column('files', 'file_processing_status')
35
+ op.drop_column("files", "file_processing_status")
34
36
  # ### end Alembic commands ###
@@ -14,8 +14,8 @@ import sqlalchemy as sa
14
14
 
15
15
 
16
16
  # revision identifiers, used by Alembic.
17
- revision: str = '4552eb3f23ce'
18
- down_revision: Union[str, None] = '9e53ea8bb3b0'
17
+ revision: str = "4552eb3f23ce"
18
+ down_revision: Union[str, None] = "9e53ea8bb3b0"
19
19
  branch_labels: Union[str, Sequence[str], None] = None
20
20
  depends_on: Union[str, Sequence[str], None] = None
21
21
 
@@ -23,12 +23,12 @@ depends_on: Union[str, Sequence[str], None] = None
23
23
  def upgrade() -> None:
24
24
  """Upgrade schema."""
25
25
  # ### commands auto generated by Alembic - please adjust! ###
26
- op.add_column('snippets', sa.Column('summary', sa.UnicodeText(), nullable=False))
26
+ op.add_column("snippets", sa.Column("summary", sa.UnicodeText(), nullable=False))
27
27
  # ### end Alembic commands ###
28
28
 
29
29
 
30
30
  def downgrade() -> None:
31
31
  """Downgrade schema."""
32
32
  # ### commands auto generated by Alembic - please adjust! ###
33
- op.drop_column('snippets', 'summary')
33
+ op.drop_column("snippets", "summary")
34
34
  # ### end Alembic commands ###
@@ -14,8 +14,8 @@ import sqlalchemy as sa
14
14
 
15
15
 
16
16
  # revision identifiers, used by Alembic.
17
- revision: str = '7c3bbc2ab32b'
18
- down_revision: Union[str, None] = '85155663351e'
17
+ revision: str = "7c3bbc2ab32b"
18
+ down_revision: Union[str, None] = "85155663351e"
19
19
  branch_labels: Union[str, Sequence[str], None] = None
20
20
  depends_on: Union[str, Sequence[str], None] = None
21
21
 
@@ -23,25 +23,33 @@ depends_on: Union[str, Sequence[str], None] = None
23
23
  def upgrade() -> None:
24
24
  """Upgrade schema."""
25
25
  # ### commands auto generated by Alembic - please adjust! ###
26
- op.create_table('embeddings',
27
- sa.Column('snippet_id', sa.Integer(), nullable=False),
28
- sa.Column('type', sa.Enum('CODE', 'TEXT', name='embeddingtype'), nullable=False),
29
- sa.Column('embedding', sa.JSON(), nullable=False),
30
- sa.Column('id', sa.Integer(), autoincrement=True, nullable=False),
31
- sa.Column('created_at', sa.DateTime(), nullable=False),
32
- sa.Column('updated_at', sa.DateTime(), nullable=False),
33
- sa.ForeignKeyConstraint(['snippet_id'], ['snippets.id'], ),
34
- sa.PrimaryKeyConstraint('id')
26
+ op.create_table(
27
+ "embeddings",
28
+ sa.Column("snippet_id", sa.Integer(), nullable=False),
29
+ sa.Column(
30
+ "type", sa.Enum("CODE", "TEXT", name="embeddingtype"), nullable=False
31
+ ),
32
+ sa.Column("embedding", sa.JSON(), nullable=False),
33
+ sa.Column("id", sa.Integer(), autoincrement=True, nullable=False),
34
+ sa.Column("created_at", sa.DateTime(), nullable=False),
35
+ sa.Column("updated_at", sa.DateTime(), nullable=False),
36
+ sa.ForeignKeyConstraint(
37
+ ["snippet_id"],
38
+ ["snippets.id"],
39
+ ),
40
+ sa.PrimaryKeyConstraint("id"),
35
41
  )
36
- op.create_index(op.f('ix_embeddings_snippet_id'), 'embeddings', ['snippet_id'], unique=False)
37
- op.create_index(op.f('ix_embeddings_type'), 'embeddings', ['type'], unique=False)
42
+ op.create_index(
43
+ op.f("ix_embeddings_snippet_id"), "embeddings", ["snippet_id"], unique=False
44
+ )
45
+ op.create_index(op.f("ix_embeddings_type"), "embeddings", ["type"], unique=False)
38
46
  # ### end Alembic commands ###
39
47
 
40
48
 
41
49
  def downgrade() -> None:
42
50
  """Downgrade schema."""
43
51
  # ### commands auto generated by Alembic - please adjust! ###
44
- op.drop_index(op.f('ix_embeddings_type'), table_name='embeddings')
45
- op.drop_index(op.f('ix_embeddings_snippet_id'), table_name='embeddings')
46
- op.drop_table('embeddings')
52
+ op.drop_index(op.f("ix_embeddings_type"), table_name="embeddings")
53
+ op.drop_index(op.f("ix_embeddings_snippet_id"), table_name="embeddings")
54
+ op.drop_table("embeddings")
47
55
  # ### end Alembic commands ###
@@ -2,7 +2,7 @@
2
2
  """initial
3
3
 
4
4
  Revision ID: 85155663351e
5
- Revises:
5
+ Revises:
6
6
  Create Date: 2025-05-08 13:45:16.687162
7
7
 
8
8
  """
@@ -14,7 +14,7 @@ import sqlalchemy as sa
14
14
 
15
15
 
16
16
  # revision identifiers, used by Alembic.
17
- revision: str = '85155663351e'
17
+ revision: str = "85155663351e"
18
18
  down_revision: Union[str, None] = None
19
19
  branch_labels: Union[str, Sequence[str], None] = None
20
20
  depends_on: Union[str, Sequence[str], None] = None
@@ -23,48 +23,64 @@ depends_on: Union[str, Sequence[str], None] = None
23
23
  def upgrade() -> None:
24
24
  """Upgrade schema."""
25
25
  # ### commands auto generated by Alembic - please adjust! ###
26
- op.create_table('sources',
27
- sa.Column('uri', sa.String(length=1024), nullable=False),
28
- sa.Column('cloned_path', sa.String(length=1024), nullable=False),
29
- sa.Column('id', sa.Integer(), autoincrement=True, nullable=False),
30
- sa.Column('created_at', sa.DateTime(), nullable=False),
31
- sa.Column('updated_at', sa.DateTime(), nullable=False),
32
- sa.PrimaryKeyConstraint('id')
26
+ op.create_table(
27
+ "sources",
28
+ sa.Column("uri", sa.String(length=1024), nullable=False),
29
+ sa.Column("cloned_path", sa.String(length=1024), nullable=False),
30
+ sa.Column("id", sa.Integer(), autoincrement=True, nullable=False),
31
+ sa.Column("created_at", sa.DateTime(), nullable=False),
32
+ sa.Column("updated_at", sa.DateTime(), nullable=False),
33
+ sa.PrimaryKeyConstraint("id"),
33
34
  )
34
- op.create_index(op.f('ix_sources_uri'), 'sources', ['uri'], unique=True)
35
- op.create_table('files',
36
- sa.Column('source_id', sa.Integer(), nullable=False),
37
- sa.Column('mime_type', sa.String(length=255), nullable=False),
38
- sa.Column('uri', sa.String(length=1024), nullable=False),
39
- sa.Column('cloned_path', sa.String(length=1024), nullable=False),
40
- sa.Column('sha256', sa.String(length=64), nullable=False),
41
- sa.Column('size_bytes', sa.Integer(), nullable=False),
42
- sa.Column('id', sa.Integer(), autoincrement=True, nullable=False),
43
- sa.Column('created_at', sa.DateTime(), nullable=False),
44
- sa.Column('updated_at', sa.DateTime(), nullable=False),
45
- sa.ForeignKeyConstraint(['source_id'], ['sources.id'], ),
46
- sa.PrimaryKeyConstraint('id')
35
+ op.create_index(op.f("ix_sources_uri"), "sources", ["uri"], unique=True)
36
+ op.create_table(
37
+ "files",
38
+ sa.Column("source_id", sa.Integer(), nullable=False),
39
+ sa.Column("mime_type", sa.String(length=255), nullable=False),
40
+ sa.Column("uri", sa.String(length=1024), nullable=False),
41
+ sa.Column("cloned_path", sa.String(length=1024), nullable=False),
42
+ sa.Column("sha256", sa.String(length=64), nullable=False),
43
+ sa.Column("size_bytes", sa.Integer(), nullable=False),
44
+ sa.Column("id", sa.Integer(), autoincrement=True, nullable=False),
45
+ sa.Column("created_at", sa.DateTime(), nullable=False),
46
+ sa.Column("updated_at", sa.DateTime(), nullable=False),
47
+ sa.ForeignKeyConstraint(
48
+ ["source_id"],
49
+ ["sources.id"],
50
+ ),
51
+ sa.PrimaryKeyConstraint("id"),
47
52
  )
48
- op.create_index(op.f('ix_files_sha256'), 'files', ['sha256'], unique=False)
49
- op.create_table('indexes',
50
- sa.Column('source_id', sa.Integer(), nullable=False),
51
- sa.Column('id', sa.Integer(), autoincrement=True, nullable=False),
52
- sa.Column('created_at', sa.DateTime(), nullable=False),
53
- sa.Column('updated_at', sa.DateTime(), nullable=False),
54
- sa.ForeignKeyConstraint(['source_id'], ['sources.id'], ),
55
- sa.PrimaryKeyConstraint('id')
53
+ op.create_index(op.f("ix_files_sha256"), "files", ["sha256"], unique=False)
54
+ op.create_table(
55
+ "indexes",
56
+ sa.Column("source_id", sa.Integer(), nullable=False),
57
+ sa.Column("id", sa.Integer(), autoincrement=True, nullable=False),
58
+ sa.Column("created_at", sa.DateTime(), nullable=False),
59
+ sa.Column("updated_at", sa.DateTime(), nullable=False),
60
+ sa.ForeignKeyConstraint(
61
+ ["source_id"],
62
+ ["sources.id"],
63
+ ),
64
+ sa.PrimaryKeyConstraint("id"),
56
65
  )
57
- op.create_index(op.f('ix_indexes_source_id'), 'indexes', ['source_id'], unique=True)
58
- op.create_table('snippets',
59
- sa.Column('file_id', sa.Integer(), nullable=False),
60
- sa.Column('index_id', sa.Integer(), nullable=False),
61
- sa.Column('content', sa.UnicodeText(), nullable=False),
62
- sa.Column('id', sa.Integer(), autoincrement=True, nullable=False),
63
- sa.Column('created_at', sa.DateTime(), nullable=False),
64
- sa.Column('updated_at', sa.DateTime(), nullable=False),
65
- sa.ForeignKeyConstraint(['file_id'], ['files.id'], ),
66
- sa.ForeignKeyConstraint(['index_id'], ['indexes.id'], ),
67
- sa.PrimaryKeyConstraint('id')
66
+ op.create_index(op.f("ix_indexes_source_id"), "indexes", ["source_id"], unique=True)
67
+ op.create_table(
68
+ "snippets",
69
+ sa.Column("file_id", sa.Integer(), nullable=False),
70
+ sa.Column("index_id", sa.Integer(), nullable=False),
71
+ sa.Column("content", sa.UnicodeText(), nullable=False),
72
+ sa.Column("id", sa.Integer(), autoincrement=True, nullable=False),
73
+ sa.Column("created_at", sa.DateTime(), nullable=False),
74
+ sa.Column("updated_at", sa.DateTime(), nullable=False),
75
+ sa.ForeignKeyConstraint(
76
+ ["file_id"],
77
+ ["files.id"],
78
+ ),
79
+ sa.ForeignKeyConstraint(
80
+ ["index_id"],
81
+ ["indexes.id"],
82
+ ),
83
+ sa.PrimaryKeyConstraint("id"),
68
84
  )
69
85
  # ### end Alembic commands ###
70
86
 
@@ -72,11 +88,11 @@ def upgrade() -> None:
72
88
  def downgrade() -> None:
73
89
  """Downgrade schema."""
74
90
  # ### commands auto generated by Alembic - please adjust! ###
75
- op.drop_table('snippets')
76
- op.drop_index(op.f('ix_indexes_source_id'), table_name='indexes')
77
- op.drop_table('indexes')
78
- op.drop_index(op.f('ix_files_sha256'), table_name='files')
79
- op.drop_table('files')
80
- op.drop_index(op.f('ix_sources_uri'), table_name='sources')
81
- op.drop_table('sources')
91
+ op.drop_table("snippets")
92
+ op.drop_index(op.f("ix_indexes_source_id"), table_name="indexes")
93
+ op.drop_table("indexes")
94
+ op.drop_index(op.f("ix_files_sha256"), table_name="files")
95
+ op.drop_table("files")
96
+ op.drop_index(op.f("ix_sources_uri"), table_name="sources")
97
+ op.drop_table("sources")
82
98
  # ### end Alembic commands ###
@@ -14,8 +14,8 @@ import sqlalchemy as sa
14
14
 
15
15
 
16
16
  # revision identifiers, used by Alembic.
17
- revision: str = 'c3f5137d30f5'
18
- down_revision: Union[str, None] = '7c3bbc2ab32b'
17
+ revision: str = "c3f5137d30f5"
18
+ down_revision: Union[str, None] = "7c3bbc2ab32b"
19
19
  branch_labels: Union[str, Sequence[str], None] = None
20
20
  depends_on: Union[str, Sequence[str], None] = None
21
21
 
@@ -23,22 +23,28 @@ depends_on: Union[str, Sequence[str], None] = None
23
23
  def upgrade() -> None:
24
24
  """Upgrade schema."""
25
25
  # ### commands auto generated by Alembic - please adjust! ###
26
- op.create_index(op.f('ix_files_cloned_path'), 'files', ['cloned_path'], unique=False)
27
- op.create_index(op.f('ix_files_mime_type'), 'files', ['mime_type'], unique=False)
28
- op.create_index(op.f('ix_files_uri'), 'files', ['uri'], unique=False)
29
- op.create_index(op.f('ix_snippets_file_id'), 'snippets', ['file_id'], unique=False)
30
- op.create_index(op.f('ix_snippets_index_id'), 'snippets', ['index_id'], unique=False)
31
- op.create_index(op.f('ix_sources_cloned_path'), 'sources', ['cloned_path'], unique=False)
26
+ op.create_index(
27
+ op.f("ix_files_cloned_path"), "files", ["cloned_path"], unique=False
28
+ )
29
+ op.create_index(op.f("ix_files_mime_type"), "files", ["mime_type"], unique=False)
30
+ op.create_index(op.f("ix_files_uri"), "files", ["uri"], unique=False)
31
+ op.create_index(op.f("ix_snippets_file_id"), "snippets", ["file_id"], unique=False)
32
+ op.create_index(
33
+ op.f("ix_snippets_index_id"), "snippets", ["index_id"], unique=False
34
+ )
35
+ op.create_index(
36
+ op.f("ix_sources_cloned_path"), "sources", ["cloned_path"], unique=False
37
+ )
32
38
  # ### end Alembic commands ###
33
39
 
34
40
 
35
41
  def downgrade() -> None:
36
42
  """Downgrade schema."""
37
43
  # ### commands auto generated by Alembic - please adjust! ###
38
- op.drop_index(op.f('ix_sources_cloned_path'), table_name='sources')
39
- op.drop_index(op.f('ix_snippets_index_id'), table_name='snippets')
40
- op.drop_index(op.f('ix_snippets_file_id'), table_name='snippets')
41
- op.drop_index(op.f('ix_files_uri'), table_name='files')
42
- op.drop_index(op.f('ix_files_mime_type'), table_name='files')
43
- op.drop_index(op.f('ix_files_cloned_path'), table_name='files')
44
+ op.drop_index(op.f("ix_sources_cloned_path"), table_name="sources")
45
+ op.drop_index(op.f("ix_snippets_index_id"), table_name="snippets")
46
+ op.drop_index(op.f("ix_snippets_file_id"), table_name="snippets")
47
+ op.drop_index(op.f("ix_files_uri"), table_name="files")
48
+ op.drop_index(op.f("ix_files_mime_type"), table_name="files")
49
+ op.drop_index(op.f("ix_files_cloned_path"), table_name="files")
44
50
  # ### end Alembic commands ###
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: kodit
3
- Version: 0.3.3
3
+ Version: 0.3.5
4
4
  Summary: Code indexing for better AI code generation
5
5
  Project-URL: Homepage, https://docs.helixml.tech/kodit/
6
6
  Project-URL: Documentation, https://docs.helixml.tech/kodit/
@@ -92,13 +92,17 @@ code. This index is used to build a snippet library, ready for ingestion into an
92
92
 
93
93
  - Index local directories and public Git repositories
94
94
  - Build comprehensive snippet libraries for LLM ingestion
95
- - Support for multiple codebase types and languages
96
- - Efficient indexing and search capabilities
95
+ - Support for 20+ programming languages including Python, JavaScript/TypeScript, Java, Go, Rust, C/C++, C#, HTML/CSS, and more
96
+ - Advanced code analysis with dependency tracking and call graph generation
97
+ - Intelligent snippet extraction with context-aware dependencies
98
+ - Efficient indexing with selective reindexing (only processes modified files)
97
99
  - Privacy first: respects .gitignore and .noindex files
98
100
  - **NEW in 0.3**: Auto-indexing configuration for shared server deployments
99
101
  - **NEW in 0.3**: Enhanced Git provider support including Azure DevOps
100
102
  - **NEW in 0.3**: Index private repositories via a PAT
101
103
  - **NEW in 0.3**: Improved progress monitoring and reporting during indexing
104
+ - **NEW in 0.3**: Advanced code slicing infrastructure with Tree-sitter parsing
105
+ - **NEW in 0.4**: Automatic periodic sync to keep indexes up-to-date
102
106
 
103
107
  ### MCP Server
104
108
 
@@ -111,7 +115,9 @@ intent. Kodit has been tested to work well with:
111
115
  - [Cursor](https://docs.helix.ml/kodit/getting-started/integration/#integration-with-cursor)
112
116
  - [Cline](https://docs.helix.ml/kodit/getting-started/integration/#integration-with-cline)
113
117
  - Please contribute more instructions! ... any other assistant is likely to work ...
114
- - **New in 0.3**: Filter snippets by source, language, author or timestamp.
118
+ - **New in 0.3**: Advanced search filters by source, language, author, date range, and file path
119
+ - **New in 0.3**: Hybrid search combining BM25 keyword search with semantic search
120
+ - **New in 0.4**: Enhanced MCP tools with rich context parameters and metadata
115
121
 
116
122
  ### Enterprise Ready
117
123
 
@@ -1,9 +1,9 @@
1
1
  kodit/.gitignore,sha256=ztkjgRwL9Uud1OEi36hGQeDGk3OLK1NfDEO8YqGYy8o,11
2
2
  kodit/__init__.py,sha256=aEKHYninUq1yh6jaNfvJBYg-6fenpN132nJt1UU6Jxs,59
3
- kodit/_version.py,sha256=cRYgYV4ttw-FMlrA4-5pzcSpTjS7X8uVa-nRTEADKW4,511
4
- kodit/app.py,sha256=uv67TE83fZE7wrA7cz-sKosFrAXlKRr1B7fT-X_gMZQ,2103
5
- kodit/cli.py,sha256=xh2MNA4sUTA3_yVbHGz-CRpbS0TTzKwf33XbScA74Gw,16626
6
- kodit/config.py,sha256=VUoUi2t2yGhqOtm5MSZuaasNSklH50hfWn6GOrz3jnU,7518
3
+ kodit/_version.py,sha256=qmTn4w-xTKk8dVv-032b430C-ilxMTkr9Q0HieU18N8,511
4
+ kodit/app.py,sha256=DtgvTfqbSSZMgtANknHLHWgRJgtYKK0Zt7TBNBrrAbc,2720
5
+ kodit/cli.py,sha256=7iP1rHVoObnKosNJD87a_JBdidFJtIxo_1fpkELb_jc,18894
6
+ kodit/config.py,sha256=Dh1ybowJyOqZIoQnvF3DykaX2ze1MC0Rjs9oK1iZ7cs,8060
7
7
  kodit/database.py,sha256=kI9yBm4uunsgV4-QeVoCBL0wLzU4kYmYv5qZilGnbPE,1740
8
8
  kodit/log.py,sha256=WOsLRitpCBtJa5IcsyZpKr146kXXHK2nU5VA90gcJdQ,8736
9
9
  kodit/mcp.py,sha256=OPscMbGQ05nFHJ_UkntobocZ6Y9wO2ZyRx1tVj7XSsY,6016
@@ -11,21 +11,22 @@ kodit/middleware.py,sha256=I6FOkqG9-8RH5kR1-0ZoQWfE4qLCB8lZYv8H_OCH29o,2714
11
11
  kodit/reporting.py,sha256=icce1ZyiADsA_Qz-mSjgn2H4SSqKuGfLKnw-yrl9nsg,2722
12
12
  kodit/application/__init__.py,sha256=mH50wTpgP9dhbKztFsL8Dda9Hi18TSnMVxXtpp4aGOA,35
13
13
  kodit/application/factories/__init__.py,sha256=bU5CvEnaBePZ7JbkCOp1MGTNP752bnU2uEqmfy5FdRk,37
14
- kodit/application/factories/code_indexing_factory.py,sha256=VV-die0zKogN73ldLJtghI9CVtv77TAlgLOVARscWmk,6764
14
+ kodit/application/factories/code_indexing_factory.py,sha256=R9f0wsj4-3NJFS5SEt_-OIGR_s_01gJXaL3PkZd8MlU,5911
15
15
  kodit/application/services/__init__.py,sha256=p5UQNw-H5sxQvs5Etfte93B3cJ1kKW6DNxK34uFvU1E,38
16
- kodit/application/services/code_indexing_application_service.py,sha256=xykcpLBS-5hZrFca2vakuVqdlZ4sbj26FLaViFC3N5c,14247
16
+ kodit/application/services/code_indexing_application_service.py,sha256=SuIuyBoSPOSjj5VaXIbxcYqaTEeMuUCu7w1tO8orrOY,14656
17
+ kodit/application/services/sync_scheduler.py,sha256=7ZWM0ACiOrTcsW300m52fTqfWMLFmgRRZ6YUPrgUaUk,4621
17
18
  kodit/domain/__init__.py,sha256=TCpg4Xx-oF4mKV91lo4iXqMEfBT1OoRSYnbG-zVWolA,66
18
19
  kodit/domain/entities.py,sha256=Mcku1Wmk3Xl3YJhY65_RoiLeffOLKOHI0uCAXWJrmvQ,8698
19
20
  kodit/domain/errors.py,sha256=yIsgCjM_yOFIg8l7l-t7jM8pgeAX4cfPq0owf7iz3DA,106
20
21
  kodit/domain/interfaces.py,sha256=Jkd0Ob4qSvhZHI9jRPFQ1n5Cv0SvU-y3Z-HCw2ikc4I,742
21
22
  kodit/domain/protocols.py,sha256=L94FwChhCoj39xicaVrK2UFhFbPzi5JEXW_KmgODsLA,1859
22
- kodit/domain/value_objects.py,sha256=lNmbz9m39bP62lYvo6mQa-XzeYiQ7uFIZt-E6LUj0L4,17679
23
+ kodit/domain/value_objects.py,sha256=MBZ0WdqQghDmL0Coz_QjPMoVMCiL8pjtpJ5FgaIynoc,17342
23
24
  kodit/domain/services/__init__.py,sha256=Q1GhCK_PqKHYwYE4tkwDz5BIyXkJngLBBOHhzvX8nzo,42
24
25
  kodit/domain/services/bm25_service.py,sha256=nsfTan3XtDwXuuAu1LUv-6Jukm6qFKVqqCVymjyepZQ,3625
25
26
  kodit/domain/services/embedding_service.py,sha256=7drYRC2kjg0WJmo06a2E9N0vDnwInUlBB96twjz2BT8,4526
26
27
  kodit/domain/services/enrichment_service.py,sha256=XsXg3nV-KN4rqtC7Zro_ZiZ6RSq-1eA1MG6IDzFGyBA,1316
27
28
  kodit/domain/services/index_query_service.py,sha256=02UWfyB_HoHUskunGuHeq5XwQLSWxGSK4OhvxcqIfY0,2022
28
- kodit/domain/services/index_service.py,sha256=lsHkiRJfJbBVuMMzM5TG6Z6EiT42RDwlXGKKHBLo8B4,12533
29
+ kodit/domain/services/index_service.py,sha256=ezVGbWdII25adri4_yyvsAF2eJOt4xmoHRDuS_-c6Ro,10810
29
30
  kodit/infrastructure/__init__.py,sha256=HzEYIjoXnkz_i_MHO2e0sIVYweUcRnl2RpyBiTbMObU,28
30
31
  kodit/infrastructure/bm25/__init__.py,sha256=DmGbrEO34FOJy4e685BbyxLA7gPW1eqs2gAxsp6JOuM,34
31
32
  kodit/infrastructure/bm25/bm25_factory.py,sha256=I4eo7qRslnyXIRkBf-StZ5ga2Evrr5J5YFocTChFD3g,884
@@ -59,23 +60,13 @@ kodit/infrastructure/indexing/fusion_service.py,sha256=2B0guBsuKz19uWcs18sIJpUJP
59
60
  kodit/infrastructure/indexing/indexing_factory.py,sha256=LPjPCps_wJ9M_fZGRP02bfc2pvYc50ZSTYI99XwRRPg,918
60
61
  kodit/infrastructure/mappers/__init__.py,sha256=QPHOjNreXmBPPovZ6elnYFS0vD-IsmrGl4TT01FCKro,77
61
62
  kodit/infrastructure/mappers/index_mapper.py,sha256=ZSfu8kjTaa8_UY0nTqr4b02NS3VrjqZYkduCN71AL2g,12743
62
- kodit/infrastructure/snippet_extraction/__init__.py,sha256=v6KqrRDjSj0nt87m7UwRGx2GN_fz_14VWq9Q0uABR_s,54
63
- kodit/infrastructure/snippet_extraction/factories.py,sha256=kAPd6JQyw7mVM4qfWqy9oD9pHGSatIlqfAxzZPzFBOw,407
64
- kodit/infrastructure/snippet_extraction/language_detection_service.py,sha256=nOw3W8KkSAx2tDCitth7b6DXmxQeKj_4FGoaUp1fqWo,1145
65
- kodit/infrastructure/snippet_extraction/snippet_extraction_factory.py,sha256=YA72kneJhR1nvgbYwH7fFAvTSMJw9bDoLGLhAAVpmq0,2272
66
- kodit/infrastructure/snippet_extraction/snippet_query_provider.py,sha256=4bj4YtxmIC4r7TyU0QQYajmmDR1eIQKqWuJ6aZING2A,1283
67
- kodit/infrastructure/snippet_extraction/tree_sitter_snippet_extractor.py,sha256=y2C5plTDvHOGTNdwcG4v_1Q15Pvq4mW7UlWsR3l5nCg,6177
68
- kodit/infrastructure/snippet_extraction/languages/csharp.scm,sha256=gbBN4RiV1FBuTJF6orSnDFi8H9JwTw-d4piLJYsWUsc,222
69
- kodit/infrastructure/snippet_extraction/languages/go.scm,sha256=SEX9mTOrhP2KiQW7oflDKkd21u5dK56QbJ4LvTDxY8A,533
70
- kodit/infrastructure/snippet_extraction/languages/java.scm,sha256=kSEZT0QJAuhT7WpR2PklYiCX-03qRRpCAlcxfIbXPt4,227
71
- kodit/infrastructure/snippet_extraction/languages/javascript.scm,sha256=Ini5TsVNmcBKQ8aL46a5Id9ut0g9UdmvmVqdMqRJtFk,446
72
- kodit/infrastructure/snippet_extraction/languages/python.scm,sha256=ee85R9PBzwye3IMTE7-iVoKWd_ViU3EJISTyrFGrVeo,429
73
- kodit/infrastructure/snippet_extraction/languages/typescript.scm,sha256=U-ujbbv4tylbUBj9wuhL-e5cW6hmgPCNs4xrIX3r_hE,448
63
+ kodit/infrastructure/slicing/__init__.py,sha256=x7cjvHA9Ay2weUYE_dpdAaPaStp20M-4U2b5MLgT5KM,37
64
+ kodit/infrastructure/slicing/language_detection_service.py,sha256=JGJXrq9bLyfnisWJXeP7y1jbZMmKAISdPBlRBCosUcE,684
65
+ kodit/infrastructure/slicing/slicer.py,sha256=Q5Syhe2KmYoCPvgP03XA6X0LVzrFgVyttRLEDHNrUSU,34305
74
66
  kodit/infrastructure/sqlalchemy/__init__.py,sha256=UXPMSF_hgWaqr86cawRVqM8XdVNumQyyK5B8B97GnlA,33
75
67
  kodit/infrastructure/sqlalchemy/embedding_repository.py,sha256=dC2Wzj_zQiWExwfScE1LAGiiyxPyg0YepwyLOgDwcs4,7905
76
68
  kodit/infrastructure/sqlalchemy/entities.py,sha256=Dmh0z-dMI0wfMAPpf62kxU4md6NUH9P5Nx1QSTITOfg,5961
77
- kodit/infrastructure/sqlalchemy/file_repository.py,sha256=1MBXh4ieE6W5LMcJl8V1YV0RUceH_PyiXPZ9IdA5_4g,2372
78
- kodit/infrastructure/sqlalchemy/index_repository.py,sha256=vPK-gl3JqMGjK_vOyXCzR_P-sN_p-BpuXy0m_A7Nkpo,21524
69
+ kodit/infrastructure/sqlalchemy/index_repository.py,sha256=fMnR3OxZN37dtp1M2Menf0xy31GjK1iv_0zn7EvRKYs,22575
79
70
  kodit/infrastructure/ui/__init__.py,sha256=CzbLOBwIZ6B6iAHEd1L8cIBydCj-n_kobxJAhz2I9_Y,32
80
71
  kodit/infrastructure/ui/progress.py,sha256=BaAeMEgXlSSb0c_t_NPxnThIktkzzCS9kegb5ExULJs,4791
81
72
  kodit/infrastructure/ui/spinner.py,sha256=GcP115qtR0VEnGfMEtsGoAUpRzVGUSfiUXfoJJERngA,2357
@@ -83,17 +74,17 @@ kodit/migrations/README,sha256=ISVtAOvqvKk_5ThM5ioJE-lMkvf9IbknFUFVU_vPma4,58
83
74
  kodit/migrations/__init__.py,sha256=lP5MuwlyWRMO6UcDWnQcQ3G-GYHcFb6rl9gYPHJ1sjo,40
84
75
  kodit/migrations/env.py,sha256=m57TkFLYjQ4w2aw1YICXkeek27M6qjwRDMHvThWqIL0,2383
85
76
  kodit/migrations/script.py.mako,sha256=zWziKtiwYKEWuwPV_HBNHwa9LCT45_bi01-uSNFaOOE,703
86
- kodit/migrations/versions/4073b33f9436_add_file_processing_flag.py,sha256=lntRkExB967OX0StZrcxEus9j2TmJvkwY5GO9ZNy7hM,903
87
- kodit/migrations/versions/4552eb3f23ce_add_summary.py,sha256=_saoHs5HGzc_z2OzBkFKrifTLQfoNox3BpSBeiKg_f8,870
88
- kodit/migrations/versions/7c3bbc2ab32b_add_embeddings_table.py,sha256=-61qol9PfQKILCDQRA5jEaats9aGZs9Wdtp-j-38SF4,1644
89
- kodit/migrations/versions/85155663351e_initial.py,sha256=Cg7zlF871o9ShV5rQMQ1v7hRV7fI59veDY9cjtTrs-8,3306
77
+ kodit/migrations/versions/4073b33f9436_add_file_processing_flag.py,sha256=c8dMcKQ-BBBr_2-92eJZFS3Fwe3__B2eNqvQeMZHs0w,917
78
+ kodit/migrations/versions/4552eb3f23ce_add_summary.py,sha256=WjyBQzFK8IXuvta15YBE23yaTMM1rZCXvPxW98MStng,870
79
+ kodit/migrations/versions/7c3bbc2ab32b_add_embeddings_table.py,sha256=JL6lxaYtGbXolrkNEujg5SWj3_aQBWReYP3I4vcibdo,1755
80
+ kodit/migrations/versions/85155663351e_initial.py,sha256=h8DWmSxVwTtWlmWNH8-S4AxfEIbCm_iWtR6Kg5psPnk,3605
90
81
  kodit/migrations/versions/9e53ea8bb3b0_add_authors.py,sha256=a32Zm8KUQyiiLkjKNPYdaJDgjW6VsV-GhaLnPnK_fpI,3884
91
82
  kodit/migrations/versions/__init__.py,sha256=9-lHzptItTzq_fomdIRBegQNm4Znx6pVjwD4MiqRIdo,36
92
- kodit/migrations/versions/c3f5137d30f5_index_all_the_things.py,sha256=rI8LmjF-I2OMxZ2nOIF_NRmqOLXe45hL_iz_nx97DTQ,1680
83
+ kodit/migrations/versions/c3f5137d30f5_index_all_the_things.py,sha256=r7ukmJ_axXLAWewYx-F1fEmZ4JbtFd37i7cSb0tq3y0,1722
93
84
  kodit/utils/__init__.py,sha256=DPEB1i8evnLF4Ns3huuAYg-0pKBFKUFuiDzOKG9r-sw,33
94
85
  kodit/utils/path_utils.py,sha256=thK6YGGNvQThdBaCYCCeCvS1L8x-lwl3AoGht2jnjGw,1645
95
- kodit-0.3.3.dist-info/METADATA,sha256=nPUYBtjo5uMq6jYJSMGAdxNrNesYXsW8pQAixYUH0nw,6358
96
- kodit-0.3.3.dist-info/WHEEL,sha256=qtCwoSJWgHk21S1Kb4ihdzI2rlJ1ZKaIurTj_ngOhyQ,87
97
- kodit-0.3.3.dist-info/entry_points.txt,sha256=hoTn-1aKyTItjnY91fnO-rV5uaWQLQ-Vi7V5et2IbHY,40
98
- kodit-0.3.3.dist-info/licenses/LICENSE,sha256=xx0jnfkXJvxRnG63LTGOxlggYnIysveWIZ6H3PNdCrQ,11357
99
- kodit-0.3.3.dist-info/RECORD,,
86
+ kodit-0.3.5.dist-info/METADATA,sha256=QkpcXiLLkwtVx1WPiXhbmNGkn2BUePzq0hXewzUymuI,6940
87
+ kodit-0.3.5.dist-info/WHEEL,sha256=qtCwoSJWgHk21S1Kb4ihdzI2rlJ1ZKaIurTj_ngOhyQ,87
88
+ kodit-0.3.5.dist-info/entry_points.txt,sha256=hoTn-1aKyTItjnY91fnO-rV5uaWQLQ-Vi7V5et2IbHY,40
89
+ kodit-0.3.5.dist-info/licenses/LICENSE,sha256=xx0jnfkXJvxRnG63LTGOxlggYnIysveWIZ6H3PNdCrQ,11357
90
+ kodit-0.3.5.dist-info/RECORD,,
@@ -1 +0,0 @@
1
- """Infrastructure services for snippet extraction."""
@@ -1,13 +0,0 @@
1
- """Factories for creating snippet query providers."""
2
-
3
- from pathlib import Path
4
-
5
- from kodit.infrastructure.snippet_extraction.snippet_query_provider import (
6
- FileSystemSnippetQueryProvider,
7
- SnippetQueryProvider,
8
- )
9
-
10
-
11
- def create_snippet_query_provider() -> SnippetQueryProvider:
12
- """Create a snippet query provider."""
13
- return FileSystemSnippetQueryProvider(Path(__file__).parent / "languages")
@@ -1,39 +0,0 @@
1
- """Infrastructure implementation for language detection."""
2
-
3
- from pathlib import Path
4
-
5
- from kodit.domain.services.index_service import LanguageDetectionService
6
-
7
-
8
- class FileSystemLanguageDetectionService(LanguageDetectionService):
9
- """Infrastructure implementation for language detection."""
10
-
11
- def __init__(self, language_map: dict[str, str]) -> None:
12
- """Initialize the language detection service.
13
-
14
- Args:
15
- language_map: Mapping of file extensions to programming languages
16
-
17
- """
18
- self.language_map = language_map
19
-
20
- async def detect_language(self, file_path: Path) -> str:
21
- """Detect language based on file extension.
22
-
23
- Args:
24
- file_path: Path to the file to detect language for
25
-
26
- Returns:
27
- The detected programming language
28
-
29
- Raises:
30
- ValueError: If the language is not supported
31
-
32
- """
33
- suffix = file_path.suffix.removeprefix(".").lower()
34
- language = self.language_map.get(suffix)
35
-
36
- if language is None:
37
- raise ValueError(f"Unsupported language for file suffix: {suffix}")
38
-
39
- return language
@@ -1,12 +0,0 @@
1
- (method_declaration
2
- name: (identifier) @function.name
3
- body: (block) @function.body
4
- ) @function.def
5
-
6
- (class_declaration
7
- name: (identifier) @class.name
8
- ) @class.def
9
-
10
- (using_directive) @import.name
11
-
12
- (identifier) @ident
@@ -1,26 +0,0 @@
1
- (function_declaration
2
- name: (identifier) @function.name
3
- body: (block) @function.body
4
- ) @function.def
5
-
6
- (method_declaration
7
- name: (field_identifier) @method.name
8
- body: (block) @method.body
9
- ) @method.def
10
-
11
- (import_declaration
12
- (import_spec
13
- path: (interpreted_string_literal) @import.name
14
- )
15
- ) @import.statement
16
-
17
- (identifier) @ident
18
-
19
- (parameter_declaration
20
- name: (identifier) @param.name
21
- )
22
-
23
- (package_clause "package" (package_identifier) @name.definition.module)
24
-
25
- ;; Exclude comments from being captured
26
- (comment) @comment
@@ -1,12 +0,0 @@
1
- (import_declaration
2
- (scoped_identifier) @import.name
3
- )
4
-
5
- (method_declaration
6
- name: (identifier) @function.name
7
- body: (block) @function.body
8
- ) @function.def
9
-
10
- (class_declaration
11
- name: (identifier) @class.name
12
- ) @class.def
@@ -1,24 +0,0 @@
1
- (import_statement
2
- (import_clause
3
- (named_imports
4
- (import_specifier
5
- name: (identifier) @import.name
6
- )
7
- )
8
- )
9
- )
10
-
11
- (function_declaration
12
- name: (identifier) @function.name
13
- body: (statement_block) @function.body
14
- )
15
-
16
- (class_declaration
17
- name: (identifier) @class.name
18
- body: (class_body) @class.body
19
- ) @class.def
20
-
21
- (method_definition
22
- name: (property_identifier) @function.name
23
- body: (statement_block) @function.body
24
- )