Skip to content

feat: turn Index to package#12

Merged
stephantul merged 2 commits into
mainfrom
index-to-package
Apr 15, 2026
Merged

feat: turn Index to package#12
stephantul merged 2 commits into
mainfrom
index-to-package

Conversation

@stephantul
Copy link
Copy Markdown
Contributor

This is a large PR that makes the indexing object stateless. Instead of creating a SembleIndex with some of its essential attributes set to None, the index creation is completely fronted: a SembleIndex always has a model and is always indexed.

The indexing loop was practically stateless, so I moved all functions that were part of SembleIndex to separate files. Those files are now under a separate module called index.

I fixed a bug: file_walker did not ignore ignored paths.
I also clarified the usage of FILE_TYPES: index_by_default just meant that the extension was a code file. So I made this explicit: every filetype now has a FileTypeType which denotes that the file contains. In the future, we can expand this set and expose it, so an agent can do stuff like:

search("where is the OpenAPI key defined?", file_types={FileTypeType.CONFIG})

For now, I left the API of the resolve_extensions file intact.

@stephantul stephantul requested a review from Pringled April 15, 2026 12:24
@stephantul stephantul merged commit 026d746 into main Apr 15, 2026
@Pringled Pringled deleted the index-to-package branch April 22, 2026 05:06
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants