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功能
This commit is contained in:
@ -168,10 +168,18 @@ export default function MarketplacePage() {
|
||||
const totalPages = useMemo(() => Math.max(1, Math.ceil(total / 12)), [total]);
|
||||
|
||||
return (
|
||||
<div className="mx-auto max-w-7xl p-6">
|
||||
<div className="mx-auto mb-10 max-w-4xl">
|
||||
<div className="mx-auto max-w-7xl space-y-6 p-4 sm:p-6">
|
||||
<div className="mx-auto max-w-4xl space-y-5">
|
||||
<div className="text-center">
|
||||
<h1 className="text-2xl font-bold tracking-normal sm:text-3xl">
|
||||
{t('市场', 'Marketplace')}
|
||||
</h1>
|
||||
<p className="mt-2 text-sm leading-6 text-muted-foreground">
|
||||
{t('搜索、查看并安装 SkillHub 技能。', 'Search, inspect, and install SkillHub skills.')}
|
||||
</p>
|
||||
</div>
|
||||
<form
|
||||
className="flex gap-3"
|
||||
className="flex flex-col gap-3 sm:flex-row"
|
||||
onSubmit={(event) => {
|
||||
event.preventDefault();
|
||||
setPage(0);
|
||||
@ -187,7 +195,7 @@ export default function MarketplacePage() {
|
||||
className="h-14 rounded-2xl pl-12 text-base"
|
||||
/>
|
||||
</div>
|
||||
<Button type="submit" className="h-14 rounded-2xl px-10 text-base">
|
||||
<Button type="submit" className="h-14 rounded-2xl px-10 text-base sm:w-auto">
|
||||
{t('搜索', 'Search')}
|
||||
</Button>
|
||||
</form>
|
||||
@ -195,9 +203,9 @@ export default function MarketplacePage() {
|
||||
|
||||
{error && (
|
||||
<Card className="mb-6 border-destructive">
|
||||
<CardContent className="flex items-center gap-2 pt-6 text-sm text-destructive">
|
||||
<AlertCircle className="h-4 w-4" />
|
||||
{error}
|
||||
<CardContent className="flex items-start gap-2 pt-6 text-sm text-destructive">
|
||||
<AlertCircle className="mt-0.5 h-4 w-4 shrink-0" />
|
||||
<span className="min-w-0 break-words">{error}</span>
|
||||
</CardContent>
|
||||
</Card>
|
||||
)}
|
||||
@ -206,6 +214,7 @@ export default function MarketplacePage() {
|
||||
<div className="space-y-5">
|
||||
<Button
|
||||
variant="ghost"
|
||||
className="h-11"
|
||||
onClick={() => {
|
||||
setSelected(null);
|
||||
setVersionDetail(null);
|
||||
@ -239,7 +248,7 @@ export default function MarketplacePage() {
|
||||
onOpenFile={(filePath) => void openFile(filePath)}
|
||||
badges={
|
||||
<>
|
||||
<Badge variant="outline">@{selected.namespace}</Badge>
|
||||
<Badge variant="outline" className="max-w-full break-all">@{selected.namespace}</Badge>
|
||||
<Badge variant="outline">{t('下载', 'Downloads')}: {selected.downloadCount || 0}</Badge>
|
||||
<Badge variant="outline">{t('收藏', 'Stars')}: {selected.starCount || 0}</Badge>
|
||||
{selected.installed && (
|
||||
@ -251,7 +260,7 @@ export default function MarketplacePage() {
|
||||
</>
|
||||
}
|
||||
actions={
|
||||
<Button onClick={installSelected} disabled={installing || detailLoading || versionLoading}>
|
||||
<Button className="h-11" onClick={installSelected} disabled={installing || detailLoading || versionLoading}>
|
||||
{installing ? <Loader2 className="mr-2 h-4 w-4 animate-spin" /> : <Download className="mr-2 h-4 w-4" />}
|
||||
{selected.installed ? t('重新安装/更新', 'Reinstall/update') : t('安装', 'Install')}
|
||||
</Button>
|
||||
@ -283,7 +292,7 @@ export default function MarketplacePage() {
|
||||
{label}
|
||||
</Button>
|
||||
))}
|
||||
<span className="ml-4 text-sm font-medium text-muted-foreground">{t('筛选:', 'Filter:')}</span>
|
||||
<span className="text-sm font-medium text-muted-foreground sm:ml-4">{t('筛选:', 'Filter:')}</span>
|
||||
<Button size="sm" variant={starredOnly ? 'default' : 'outline'} onClick={() => setStarredOnly((value) => !value)}>
|
||||
<Star className="mr-2 h-4 w-4" />
|
||||
{t('只看已收藏', 'Starred only')}
|
||||
@ -297,28 +306,34 @@ export default function MarketplacePage() {
|
||||
) : (
|
||||
<div className="grid gap-5 md:grid-cols-2 xl:grid-cols-3">
|
||||
{items.map((item) => (
|
||||
<Card key={`${item.namespace}/${item.slug}`} className="cursor-pointer transition hover:border-primary" onClick={() => void openDetail(item)}>
|
||||
<CardHeader>
|
||||
<div className="flex items-start justify-between gap-3">
|
||||
<CardTitle className="text-xl">{item.displayName || item.slug}</CardTitle>
|
||||
<Badge variant="outline">@{item.namespace}</Badge>
|
||||
</div>
|
||||
</CardHeader>
|
||||
<CardContent className="space-y-5">
|
||||
<p className="line-clamp-3 min-h-[4.5rem] text-sm leading-6 text-muted-foreground">{item.summary}</p>
|
||||
<div className="flex flex-wrap items-center gap-3 text-sm text-muted-foreground">
|
||||
<Badge variant="secondary">v{publishedVersion(item) || '-'}</Badge>
|
||||
<span>{item.downloadCount || 0}</span>
|
||||
<span>{item.starCount || 0}</span>
|
||||
{item.installed && <Badge variant="outline">{t('已安装', 'Installed')}</Badge>}
|
||||
</div>
|
||||
</CardContent>
|
||||
<Card key={`${item.namespace}/${item.slug}`} className="overflow-hidden transition hover:border-primary">
|
||||
<button
|
||||
type="button"
|
||||
className="block h-full w-full text-left"
|
||||
onClick={() => void openDetail(item)}
|
||||
>
|
||||
<CardHeader>
|
||||
<div className="flex flex-col items-start gap-3 sm:flex-row sm:justify-between">
|
||||
<CardTitle className="min-w-0 break-words text-xl">{item.displayName || item.slug}</CardTitle>
|
||||
<Badge variant="outline" className="max-w-full break-all">@{item.namespace}</Badge>
|
||||
</div>
|
||||
</CardHeader>
|
||||
<CardContent className="space-y-5">
|
||||
<p className="line-clamp-3 min-h-[4.5rem] break-words text-sm leading-6 text-muted-foreground">{item.summary}</p>
|
||||
<div className="flex flex-wrap items-center gap-3 text-sm text-muted-foreground">
|
||||
<Badge variant="secondary" className="max-w-full break-all">v{publishedVersion(item) || '-'}</Badge>
|
||||
<span>{item.downloadCount || 0}</span>
|
||||
<span>{item.starCount || 0}</span>
|
||||
{item.installed && <Badge variant="outline">{t('已安装', 'Installed')}</Badge>}
|
||||
</div>
|
||||
</CardContent>
|
||||
</button>
|
||||
</Card>
|
||||
))}
|
||||
</div>
|
||||
)}
|
||||
|
||||
<div className="flex items-center justify-center gap-3">
|
||||
<div className="flex flex-wrap items-center justify-center gap-3">
|
||||
<Button variant="outline" disabled={page <= 0} onClick={() => setPage((value) => Math.max(0, value - 1))}>
|
||||
{t('上一页', 'Previous')}
|
||||
</Button>
|
||||
|
||||
Reference in New Issue
Block a user