- Scope dedupe key to label::relativePath in mergeMultiCollectionResults
so same file in different projects is not collapsed
- Compute embedding once in searchMultipleCollections via internal
searchChunksWithVector helper (avoids N redundant API calls)
- Compare base project hashes (not branch-suffixed names) when skipping
duplicate linked projects in resolveLinkedCollections
- Use path.resolve() for platform-neutral assertion in query-tools tests
- Update multi-collection-search tests for new cross-project dedup semantics
- Refactor git temp repos into initTempRepo() helper using git config
instead of env vars (resolves Critical finding)
- Restore SOCRATICODE_LINKED_PROJECTS and SOCRATICODE_PROJECT_ID to
original values in resolveLinkedCollections afterEach
- Fix TypeScript 'never' type errors in query-tools mocks by adding
explicit SearchResult[] return types
- query-tools.test.ts: 6 new tests for includeLinked parameter:
- omitted/false → calls searchChunks (not searchMultipleCollections)
- true → calls searchMultipleCollections via resolveLinkedCollections
- passes collections and args correctly
- project label appears in output
- no project tag when field absent
- multi-collection-search.test.ts: 1 new test for searchMultipleCollections
empty-input short-circuit (internal searchChunks calls cannot be mocked
from the same module — integration covered by query-tools tests)
ensureOllamaReady() was called unconditionally on every search and context
operation, causing failures for OpenAI and Google embedding users. Now only
called when embeddingProvider is ollama; otherwise the configured provider
is initialized via getEmbeddingProvider().
Fixes#7
Co-authored-by: pineapplestrikesback <pineapplestrikesback@users.noreply.github.com>