feat: enhance search, ranking, reranker and CLI tooling across ccw and codex-lens

Major improvements to smart-search, chain-search cascade, ranking pipeline,
reranker factory, CLI history store, codex-lens integration, and uv-manager.
Simplify command-generator skill by inlining phases. Add comprehensive tests.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
catlog22
2026-03-16 20:35:08 +08:00
parent 1cd96b90e8
commit 5a4b18d9b1
73 changed files with 14684 additions and 2442 deletions

View File

@@ -76,6 +76,26 @@ describe('Smart Search - Query Intent + RRF Weights', async () => {
});
});
describe('classifyIntent lexical routing', () => {
it('routes config/backend queries to exact when index and embeddings are available', () => {
if (!smartSearchModule) return;
const classification = smartSearchModule.__testables.classifyIntent(
'embedding backend fastembed local litellm api config',
true,
true,
);
assert.strictEqual(classification.mode, 'exact');
assert.match(classification.reasoning, /lexical priority/i);
});
it('routes generated artifact queries to exact when index and embeddings are available', () => {
if (!smartSearchModule) return;
const classification = smartSearchModule.__testables.classifyIntent('dist bundle output', true, true);
assert.strictEqual(classification.mode, 'exact');
assert.match(classification.reasoning, /generated artifact/i);
});
});
describe('adjustWeightsByIntent', () => {
it('maps keyword intent to exact-heavy weights', () => {
if (!smartSearchModule) return;
@@ -119,4 +139,3 @@ describe('Smart Search - Query Intent + RRF Weights', async () => {
});
});
});