mirror of
https://github.com/catlog22/Claude-Code-Workflow.git
synced 2026-03-19 18:58:47 +08:00
feat: remove API worker and batch size configurations; update CodexLens settings for v2
This commit is contained in:
@@ -20,8 +20,6 @@ const mockStatus: CodexLensVenvStatus = {
|
||||
const mockConfig: CodexLensConfig = {
|
||||
index_dir: '~/.codexlens/indexes',
|
||||
index_count: 100,
|
||||
api_max_workers: 4,
|
||||
api_batch_size: 8,
|
||||
};
|
||||
|
||||
// Mock window.alert
|
||||
@@ -243,8 +241,6 @@ describe('OverviewTab', () => {
|
||||
const emptyConfig: CodexLensConfig = {
|
||||
index_dir: '',
|
||||
index_count: 0,
|
||||
api_max_workers: 4,
|
||||
api_batch_size: 8,
|
||||
};
|
||||
|
||||
render(
|
||||
|
||||
@@ -54,8 +54,6 @@ import {
|
||||
const mockConfig: CodexLensConfig = {
|
||||
index_dir: '~/.codexlens/indexes',
|
||||
index_count: 100,
|
||||
api_max_workers: 4,
|
||||
api_batch_size: 8,
|
||||
};
|
||||
|
||||
const mockEnv: Record<string, string> = {
|
||||
@@ -75,8 +73,6 @@ function setupDefaultMocks() {
|
||||
config: mockConfig,
|
||||
indexDir: mockConfig.index_dir,
|
||||
indexCount: 100,
|
||||
apiMaxWorkers: 4,
|
||||
apiBatchSize: 8,
|
||||
isLoading: false,
|
||||
error: null,
|
||||
refetch: vi.fn(),
|
||||
@@ -298,8 +294,6 @@ describe('SettingsTab', () => {
|
||||
config: mockConfig,
|
||||
indexDir: mockConfig.index_dir,
|
||||
indexCount: 100,
|
||||
apiMaxWorkers: 4,
|
||||
apiBatchSize: 8,
|
||||
isLoading: true,
|
||||
error: null,
|
||||
refetch: vi.fn(),
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
// ========================================
|
||||
// CodexLens Settings Tab
|
||||
// ========================================
|
||||
// Structured form for CodexLens env configuration
|
||||
// Renders 5 groups: embedding, reranker, concurrency, cascade, chunking
|
||||
// Structured form for CodexLens v2 env configuration
|
||||
// Renders 4 groups: embedding, reranker, search, indexing
|
||||
// Plus a general config section (index_dir)
|
||||
|
||||
import { useState, useEffect, useCallback, useMemo } from 'react';
|
||||
@@ -33,12 +33,10 @@ export function SettingsTab({ enabled = true }: SettingsTabProps) {
|
||||
const { formatMessage } = useIntl();
|
||||
const { success, error: showError } = useNotifications();
|
||||
|
||||
// Fetch current config (index_dir, workers, batch_size)
|
||||
// Fetch current config (index_dir, index_count)
|
||||
const {
|
||||
config,
|
||||
indexCount,
|
||||
apiMaxWorkers,
|
||||
apiBatchSize,
|
||||
isLoading: isLoadingConfig,
|
||||
refetch: refetchConfig,
|
||||
} = useCodexLensConfig({ enabled });
|
||||
@@ -199,25 +197,13 @@ export function SettingsTab({ enabled = true }: SettingsTabProps) {
|
||||
<div className="space-y-6">
|
||||
{/* Current Info Card */}
|
||||
<Card className="p-4 bg-muted/30">
|
||||
<div className="grid grid-cols-1 md:grid-cols-3 gap-4 text-sm">
|
||||
<div className="text-sm">
|
||||
<div>
|
||||
<span className="text-muted-foreground">
|
||||
{formatMessage({ id: 'codexlens.settings.currentCount' })}
|
||||
</span>
|
||||
<p className="text-foreground font-medium">{indexCount}</p>
|
||||
</div>
|
||||
<div>
|
||||
<span className="text-muted-foreground">
|
||||
{formatMessage({ id: 'codexlens.settings.currentWorkers' })}
|
||||
</span>
|
||||
<p className="text-foreground font-medium">{apiMaxWorkers}</p>
|
||||
</div>
|
||||
<div>
|
||||
<span className="text-muted-foreground">
|
||||
{formatMessage({ id: 'codexlens.settings.currentBatchSize' })}
|
||||
</span>
|
||||
<p className="text-foreground font-medium">{apiBatchSize}</p>
|
||||
</div>
|
||||
</div>
|
||||
</Card>
|
||||
|
||||
|
||||
Reference in New Issue
Block a user