Files
steven_li 2c5205b06e feat: 添加MinIO文件系统支持并优化外部连接器功能
- 添加MinIO用户文件系统配置选项(BEAVER_MINIO_ROOT_USER等)
- 更新外部连接器配置结构,包括BASE_URL和认证令牌设置
- 改进connector provider支持更多类型(official, feishu_bot等)
- 实现Mistral模型推理模式支持reasoning_effort参数
- 增强外部连接器策略配置和运行时配置管理
- 添加connector bridge事件验证和安全保护机制
- 优化任务路由逻辑,区分simple_chat和new_task场景
- 更新初始技能工具提示配置,分离authoring admin功能
2026-06-05 11:46:40 +08:00

61 lines
1.9 KiB
TypeScript

'use client';
import Link from 'next/link';
import { usePathname, useSearchParams } from 'next/navigation';
import { Clock3, ListTodo } from 'lucide-react';
import { pickAppText } from '@/lib/i18n/core';
import { useAppI18n } from '@/lib/i18n/provider';
import { cn } from '@/lib/utils';
const TASK_MANAGEMENT_TABS = [
{
label: 'ordinary',
href: '/tasks',
icon: ListTodo,
match: (pathname: string, tab: string | null) => pathname.startsWith('/tasks') && tab !== 'scheduled',
},
{
label: 'scheduled',
href: '/tasks?tab=scheduled',
icon: Clock3,
match: (pathname: string, tab: string | null) => pathname.startsWith('/tasks') && tab === 'scheduled',
},
] as const;
export function TaskManagementTabs() {
const { locale } = useAppI18n();
const pathname = usePathname();
const searchParams = useSearchParams();
const activeTab = searchParams.get('tab');
return (
<div className="rounded-2xl border border-border/70 bg-muted/20 p-1">
<div className="flex flex-wrap gap-1">
{TASK_MANAGEMENT_TABS.map((tab) => {
const isActive = tab.match(pathname, activeTab);
const Icon = tab.icon;
return (
<Link
key={tab.href}
href={tab.href}
className={cn(
'inline-flex h-11 items-center gap-2 rounded-xl px-4 py-2 text-sm font-medium transition-colors',
isActive
? 'bg-background text-foreground shadow-sm'
: 'text-muted-foreground hover:bg-background/70 hover:text-foreground'
)}
>
<Icon className="h-4 w-4" />
{tab.label === 'scheduled'
? pickAppText(locale, '定时任务', 'Scheduled tasks')
: pickAppText(locale, '普通任务', 'Ordinary tasks')}
</Link>
);
})}
</div>
</div>
);
}