Skip to content

feat(indexer): HTML AST chunking + user-defined extension mappings#47

Open
fazleelahhee wants to merge 4 commits intomainfrom
feat/html-parser-and-custom-extensions
Open

feat(indexer): HTML AST chunking + user-defined extension mappings#47
fazleelahhee wants to merge 4 commits intomainfrom
feat/html-parser-and-custom-extensions

Conversation

@fazleelahhee
Copy link
Copy Markdown
Contributor

  • Wire tree-sitter-html parser into Chunker. <script> and <style> blocks become MODULE chunks; pages without either fall through to the existing whole-file plaintext fallback.
  • Add indexer.extensions to .context-engine.yaml. Maps a file suffix (e.g. .tpl, .mjs) to a built-in language string, or to "" for plaintext-only indexing. User entries override _LANGUAGE_MAP built-ins. Keys validated to start with "." and lowercased at load.
  • New _resolve_language helper in pipeline; replaces direct _LANGUAGE_MAP lookup. Layers user mappings over the built-in map.

- Wire tree-sitter-html parser into Chunker. <script> and <style>
  blocks become MODULE chunks; pages without either fall through to
  the existing whole-file plaintext fallback.
- Add `indexer.extensions` to .context-engine.yaml. Maps a file
  suffix (e.g. .tpl, .mjs) to a built-in language string, or to ""
  for plaintext-only indexing. User entries override _LANGUAGE_MAP
  built-ins. Keys validated to start with "." and lowercased at load.
- New _resolve_language helper in pipeline; replaces direct
  _LANGUAGE_MAP lookup. Layers user mappings over the built-in map.
fazleelahhee and others added 3 commits May 5, 2026 21:56
New "Custom File Extensions" section covering: how to alias an
extension to a built-in parser, how to opt into plaintext indexing
with an empty value, override behavior per-project, and which
languages currently have AST chunking vs. plaintext fallback.
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