5 Commits

Author SHA1 Message Date
Giancarlo Erra c2c616f4a3 fix(indexing): normalize extension casing and tighten docs/test (#77)
Address CodeRabbit review:
- getLanguageFromExtension/getAstGrepLang lowercase the extension before
  consulting the override map, so an uppercase ext still matches the
  lowercased keys (production callers already lowercase; .R collapses to
  .r with the same value, so no other behavior changes).
- README: clarify EXTRA_EXTENSIONS indexes as plaintext / leaf nodes,
  versus EXTENSION_LANGUAGE_MAP's full language treatment.
- Make the isIndexableFile override test hermetic (save/restore the prior
  map entry, assert against the captured baseline).
2026-06-28 20:59:25 +01:00
Giancarlo Erra 1c5ddf52be feat(indexing): map custom extensions to languages via EXTENSION_LANGUAGE_MAP (#77)
EXTRA_EXTENSIONS indexes unknown extensions as plaintext, losing AST
chunking, symbols, and the call graph. EXTENSION_LANGUAGE_MAP lets you
map an extension to a real language (e.g. .inc:php) so it gets full
language treatment end to end.

Format `.inc:php,.module:php`. Each entry resolves to the target
language's canonical extension, so both the language label
(getLanguageFromExtension) and the AST grammar (getAstGrepLang) come
from the existing maps and stay consistent, without re-encoding their
different vocabularies (shell vs bash, Lang enums for JS/TS/HTML/CSS).
Mapped extensions are auto-discovered (indexer + watcher) without also
needing EXTRA_EXTENSIONS, and can override built-ins (e.g. .h:cpp).
Targets with no AST grammar (the reporter's .foo:bar) and malformed
entries are rejected and warned about at startup.

Additive and backward compatible: with the var unset, behavior is
unchanged; no new dependency; no data migration.
2026-06-28 20:22:08 +01:00
Giancarlo Erra e9ee3ea116 fix(graph): normalize Windows backslash paths to forward slashes
On Windows, path.relative() and path.join() return backslash separators.
Graph node keys were stored with native separators, but query inputs use
forward slashes, causing silent lookup failures on Windows.

Add toForwardSlash() utility and apply it at build time (file walker,
resolution functions) and query time (getFileDependencies,
getSymbolContext, listSymbols) for defense-in-depth.

No-op on macOS/Linux where path.relative() already returns forward
slashes. Existing Windows symbol graph caches require one rebuild.

Fixes #60
2026-05-22 15:59:13 +01:00
midwestE 507d823336 feat: auto-infer port from QDRANT_URL for reverse proxy support 2026-03-17 07:20:56 -05:00
Giancarlo Erra 3f0ed5a286 feat: SocratiCode v1.0.0 — initial release 2026-02-28 17:06:21 +00:00