Skip to content

feat(cli): group similar indexed code chunks - #333

Open
hatemadi15 wants to merge 3 commits into
cocoindex-io:mainfrom
hatemadi15:feat/duplicate-groups-247
Open

hatemadi15 wants to merge 3 commits into
cocoindex-io:mainfrom
hatemadi15:feat/duplicate-groups-247

Conversation

@hatemadi15

Copy link
Copy Markdown

Closes #247.

Add ccc duplicates to find cosine-similarity groups in an existing SQLite vector index. It uses stored embeddings without running the daemon or embedding model, visits each unordered pair once in bounded-size blocks, and groups threshold matches transitively. Supports text and JSON output, plus language, path, and minimum-line filters. The exact scan takes quadratic time in the number of selected chunks.

Validation

  • 44 focused tests passed, including four CLI tests against an on-disk sqlite-vec index. They cover filters, transitive matches across comparison blocks, text and JSON output, missing indexes, and NaN input.
  • Ruff lint/format, focused mypy, and git diff --check passed.
  • Broader run: 310 passed, 27 failed, 17 errors, 8 deselected. The workspace blocks daemon sockets, also reproduced on main. Full test-tree mypy reports the same existing errors as main.

@hatemadi15
hatemadi15 marked this pull request as ready for review November 7, 2026 14:03

This branch has not been deployed

No deployments
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.

[Feature] Find semantically similar and duplicated code across the codebase

1 participant