fix/chunk-embed - #63
Conversation
|
Caution Review failedThe pull request is closed. ℹ️ Recent review info⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (13)
WalkthroughVersion 1.2.1 adds token-chunked weighted-average embedding for long local solutions in ChangesLocal mode v1.2.1: chunked embedding + local search
Sequence Diagram(s)sequenceDiagram
participant User
participant CLI as clanker local search
participant parseHelpers as parseSearchLimit / parseSearchMode
participant LocalBackend
participant searchAndPrint
participant localSemantic as embedTextWithTokenChunks
User->>CLI: clanker local search "query" --db ./db --mode semantic
CLI->>parseHelpers: parse --limit, --mode
CLI->>LocalBackend: construct(localConfig, semanticConfig)
CLI->>searchAndPrint: query, limit, mode, allowHybridFallback=false
searchAndPrint->>LocalBackend: searchWithAutoFallback(query, limit, mode)
LocalBackend->>localSemantic: embedTextWithTokenChunks(model, context, query, dims)
localSemantic->>localSemantic: tokenize → chunkEmbeddingTokens → getEmbeddingFor × N → weightedAverageEmbeddingVectors
localSemantic-->>LocalBackend: float32 embedding buffer
LocalBackend-->>searchAndPrint: results[]
searchAndPrint-->>User: formatSearchResults output
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~25 minutes Possibly related PRs
Poem
✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
Summary
clanker local searchfor local SQLite search withoutCLANKER_MODE=local@clankeroverflow/clito1.2.1Validation
pnpm run lint(passes with existing warnings)pnpm run formatpnpm --filter @clankeroverflow/cli test -- --runInBandpnpm --filter @clankeroverflow/cli check-typespnpm --filter @clankeroverflow/cli buildnode packages/cli/e2e/local-mode.mjspnpm test:e2e:local(Docker matrix: Node 22 and Node 24)git diff --checkSummary by CodeRabbit
Release Notes
New Features
clanker local searchsubcommand to query the local SQLite database directly.Documentation
Version