chore: bump version to 7.2.7

- Enhance smart-search with advanced MCP integration
- Add GEMINI_API_KEY configuration support in codexlens
- Update MCP server with new tool handlers
- Add tests for smart-search MCP usage
- Update documentation
This commit is contained in:
catlog22
2026-03-11 16:48:16 +08:00
parent efbbaff834
commit 1cd96b90e8
16 changed files with 1215 additions and 111 deletions

View File

@@ -61,6 +61,7 @@ const mockConfig: CodexLensConfig = {
const mockEnv: Record<string, string> = {
CODEXLENS_EMBEDDING_BACKEND: 'local',
CODEXLENS_EMBEDDING_MODEL: 'fast',
CODEXLENS_AUTO_EMBED_MISSING: 'true',
CODEXLENS_USE_GPU: 'true',
CODEXLENS_RERANKER_ENABLED: 'true',
CODEXLENS_RERANKER_BACKEND: 'onnx',
@@ -141,6 +142,7 @@ describe('SettingsTab', () => {
expect(screen.getByText(/Concurrency/i)).toBeInTheDocument();
expect(screen.getByText(/Cascade/i)).toBeInTheDocument();
expect(screen.getByText(/Chunking/i)).toBeInTheDocument();
expect(screen.getByText(/Auto Build Missing Vectors/i)).toBeInTheDocument();
});
it('should initialize index dir from config', () => {

View File

@@ -56,6 +56,13 @@ export const envVarGroupsSchema: EnvVarGroupsSchema = {
},
],
},
CODEXLENS_AUTO_EMBED_MISSING: {
key: 'CODEXLENS_AUTO_EMBED_MISSING',
labelKey: 'codexlens.envField.autoEmbedMissing',
type: 'checkbox',
default: 'true',
settingsPath: 'embedding.auto_embed_missing',
},
CODEXLENS_USE_GPU: {
key: 'CODEXLENS_USE_GPU',
labelKey: 'codexlens.envField.useGpu',

View File

@@ -256,8 +256,22 @@ export function McpServerDialog({
// Parse JSON config and populate form
const parseJsonConfig = useCallback(() => {
try {
const config = JSON.parse(jsonInput);
let config = JSON.parse(jsonInput);
let extractedServerName = '';
// Auto-detect mcpServers wrapper format (Claude Code config format)
// Supports both: { "mcpServers": { "name": {...} } } and direct { "command": ... }
if (config.mcpServers && typeof config.mcpServers === 'object' && !Array.isArray(config.mcpServers)) {
const serverNames = Object.keys(config.mcpServers);
if (serverNames.length > 0) {
extractedServerName = serverNames[0];
const serverConfig = config.mcpServers[extractedServerName];
if (serverConfig && typeof serverConfig === 'object') {
config = serverConfig;
}
}
}
// Detect transport type based on config structure
if (config.url) {
// HTTP transport
@@ -278,6 +292,7 @@ export function McpServerDialog({
setFormData(prev => ({
...prev,
name: extractedServerName || prev.name,
url: config.url || '',
headers,
bearerTokenEnvVar: config.bearer_token_env_var || config.bearerTokenEnvVar || '',
@@ -291,6 +306,7 @@ export function McpServerDialog({
setFormData(prev => ({
...prev,
name: extractedServerName || prev.name,
command: config.command || '',
args,
env,

View File

@@ -298,6 +298,7 @@
"envField": {
"backend": "Backend",
"model": "Model",
"autoEmbedMissing": "Auto Build Missing Vectors",
"useGpu": "Use GPU",
"highAvailability": "High Availability",
"loadBalanceStrategy": "Load Balance Strategy",

View File

@@ -298,6 +298,7 @@
"envField": {
"backend": "后端",
"model": "模型",
"autoEmbedMissing": "缺失向量时自动构建",
"useGpu": "使用 GPU",
"highAvailability": "高可用",
"loadBalanceStrategy": "负载均衡策略",