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

@@ -103,7 +103,7 @@ describe('LiteLLM client bridge', () => {
assert.equal(available, true);
assert.equal(spawnCalls.length, 1);
assert.equal(spawnCalls[0].command, 'python');
assert.equal(spawnCalls[0].command, mod.getCodexLensVenvPython());
assert.deepEqual(spawnCalls[0].args, ['-m', 'ccw_litellm.cli', 'version']);
});
@@ -117,6 +117,19 @@ describe('LiteLLM client bridge', () => {
assert.equal(spawnCalls[0].command, 'python3');
});
it('spawns LiteLLM Python with hidden window options', async () => {
spawnPlan.push({ type: 'close', code: 0, stdout: '1.2.3\n' });
const client = new mod.LiteLLMClient({ timeout: 10 });
const available = await client.isAvailable();
assert.equal(available, true);
assert.equal(spawnCalls.length, 1);
assert.equal(spawnCalls[0].options.shell, false);
assert.equal(spawnCalls[0].options.windowsHide, true);
assert.equal(spawnCalls[0].options.env.PYTHONIOENCODING, 'utf-8');
});
it('isAvailable returns false on spawn error', async () => {
spawnPlan.push({ type: 'error', error: new Error('ENOENT') });
@@ -154,7 +167,7 @@ describe('LiteLLM client bridge', () => {
assert.deepEqual(cfg, { ok: true });
assert.equal(spawnCalls.length, 1);
assert.deepEqual(spawnCalls[0].args, ['-m', 'ccw_litellm.cli', 'config', '--json']);
assert.deepEqual(spawnCalls[0].args, ['-m', 'ccw_litellm.cli', 'config']);
});
it('getConfig throws on malformed JSON', async () => {