mirror of
https://github.com/catlog22/Claude-Code-Workflow.git
synced 2026-02-28 09:23:08 +08:00
feat(codexlens): update backend options and default values for reranker settings
This commit is contained in:
@@ -218,7 +218,8 @@ function FieldRenderer({
|
||||
const backendKey = isEmbedding
|
||||
? 'CODEXLENS_EMBEDDING_BACKEND'
|
||||
: 'CODEXLENS_RERANKER_BACKEND';
|
||||
const backendType = allValues[backendKey] === 'api' ? 'api' : 'local';
|
||||
const backendValue = allValues[backendKey];
|
||||
const backendType = (backendValue === 'api' || backendValue === 'litellm') ? 'api' : 'local';
|
||||
|
||||
return (
|
||||
<div className="flex items-center gap-2">
|
||||
|
||||
@@ -63,7 +63,7 @@ const mockEnv: Record<string, string> = {
|
||||
CODEXLENS_EMBEDDING_MODEL: 'fast',
|
||||
CODEXLENS_USE_GPU: 'true',
|
||||
CODEXLENS_RERANKER_ENABLED: 'true',
|
||||
CODEXLENS_RERANKER_BACKEND: 'local',
|
||||
CODEXLENS_RERANKER_BACKEND: 'onnx',
|
||||
CODEXLENS_API_MAX_WORKERS: '4',
|
||||
CODEXLENS_API_BATCH_SIZE: '8',
|
||||
CODEXLENS_CASCADE_STRATEGY: 'dense_rerank',
|
||||
|
||||
@@ -117,8 +117,8 @@ export const envVarGroupsSchema: EnvVarGroupsSchema = {
|
||||
key: 'CODEXLENS_RERANKER_BACKEND',
|
||||
labelKey: 'codexlens.envField.backend',
|
||||
type: 'select',
|
||||
options: ['local', 'api'],
|
||||
default: 'local',
|
||||
options: ['onnx', 'api', 'litellm', 'legacy'],
|
||||
default: 'onnx',
|
||||
settingsPath: 'reranker.backend',
|
||||
},
|
||||
CODEXLENS_RERANKER_MODEL: {
|
||||
@@ -174,7 +174,7 @@ export const envVarGroupsSchema: EnvVarGroupsSchema = {
|
||||
options: ['true', 'false'],
|
||||
default: 'false',
|
||||
settingsPath: 'reranker.pool_enabled',
|
||||
showWhen: (env) => env['CODEXLENS_RERANKER_BACKEND'] === 'api',
|
||||
showWhen: (env) => env['CODEXLENS_RERANKER_BACKEND'] === 'api' || env['CODEXLENS_RERANKER_BACKEND'] === 'litellm',
|
||||
},
|
||||
CODEXLENS_RERANKER_STRATEGY: {
|
||||
key: 'CODEXLENS_RERANKER_STRATEGY',
|
||||
@@ -184,7 +184,7 @@ export const envVarGroupsSchema: EnvVarGroupsSchema = {
|
||||
default: 'latency_aware',
|
||||
settingsPath: 'reranker.strategy',
|
||||
showWhen: (env) =>
|
||||
env['CODEXLENS_RERANKER_BACKEND'] === 'api' &&
|
||||
(env['CODEXLENS_RERANKER_BACKEND'] === 'api' || env['CODEXLENS_RERANKER_BACKEND'] === 'litellm') &&
|
||||
env['CODEXLENS_RERANKER_POOL_ENABLED'] === 'true',
|
||||
},
|
||||
CODEXLENS_RERANKER_COOLDOWN: {
|
||||
@@ -197,7 +197,7 @@ export const envVarGroupsSchema: EnvVarGroupsSchema = {
|
||||
min: 0,
|
||||
max: 300,
|
||||
showWhen: (env) =>
|
||||
env['CODEXLENS_RERANKER_BACKEND'] === 'api' &&
|
||||
(env['CODEXLENS_RERANKER_BACKEND'] === 'api' || env['CODEXLENS_RERANKER_BACKEND'] === 'litellm') &&
|
||||
env['CODEXLENS_RERANKER_POOL_ENABLED'] === 'true',
|
||||
},
|
||||
},
|
||||
|
||||
@@ -126,14 +126,14 @@ function TaskItemCard({ item, onClick }: { item: UnifiedTaskItem; onClick: () =>
|
||||
onClick={onClick}
|
||||
className="w-full text-left p-3 rounded-lg border border-border bg-card hover:bg-accent/50 hover:border-primary/30 transition-all group"
|
||||
>
|
||||
<div className="flex items-start gap-2.5">
|
||||
<div className="flex items-start gap-2.5 min-w-0">
|
||||
<div className={cn('p-1.5 rounded-md shrink-0', typeColors[item.type])}>
|
||||
<TypeIcon className="h-4 w-4" />
|
||||
</div>
|
||||
<div className="flex-1 min-w-0">
|
||||
<div className="flex-1 min-w-0 overflow-hidden">
|
||||
{/* Header: name + status */}
|
||||
<div className="flex items-start gap-2 mb-1">
|
||||
<h4 className="text-sm font-medium text-foreground truncate flex-1 group-hover:text-primary transition-colors">
|
||||
<div className="flex items-start gap-2 mb-1 min-w-0">
|
||||
<h4 className="text-sm font-medium text-foreground truncate flex-1 min-w-0 group-hover:text-primary transition-colors">
|
||||
{item.name}
|
||||
</h4>
|
||||
<Badge className={cn('text-[10px] px-1.5 py-0 shrink-0 border', statusColors[item.status])}>
|
||||
|
||||
@@ -609,7 +609,7 @@ function WorkflowTaskWidgetComponent({ className }: WorkflowTaskWidgetProps) {
|
||||
</div>
|
||||
|
||||
{/* Task Details Section: Session Carousel with Task List */}
|
||||
<div className="flex-1 p-4 flex flex-col">
|
||||
<div className="flex-1 min-w-0 p-4 flex flex-col">
|
||||
{/* Header with navigation */}
|
||||
<div className="flex items-center justify-between mb-3">
|
||||
<h3 className="text-sm font-semibold text-foreground flex items-center gap-1.5">
|
||||
@@ -706,7 +706,7 @@ function WorkflowTaskWidgetComponent({ className }: WorkflowTaskWidgetProps) {
|
||||
<div
|
||||
key={`${currentSession.session_id}-${task.task_id}-${index}`}
|
||||
className={cn(
|
||||
'flex items-center gap-2 p-2 rounded hover:bg-background/50 transition-colors',
|
||||
'flex items-center gap-2 p-2 rounded hover:bg-background/50 transition-colors min-w-0',
|
||||
isLastOdd && 'col-span-2'
|
||||
)}
|
||||
>
|
||||
|
||||
Reference in New Issue
Block a user