"use client"; import { SparklesIcon } from "lucide-react"; import { Badge } from "@/components/ui/badge"; import { Empty, EmptyDescription, EmptyHeader, EmptyMedia, EmptyTitle, } from "@/components/ui/empty"; import { Item, ItemActions, ItemTitle, ItemContent, ItemDescription, } from "@/components/ui/item"; import { Switch } from "@/components/ui/switch"; import { useI18n } from "@/core/i18n/hooks"; import { useEnableSkill, useSkills } from "@/core/skills/hooks"; import type { Skill } from "@/core/skills/type"; import { SettingsSection } from "./settings-section"; export function SkillSettingsPage() { const { t } = useI18n(); const { skills, isLoading, error } = useSkills(); return ( {isLoading ? (
Loading...
) : error ? (
Error: {error.message}
) : ( )}
); } function SkillSettingsList({ skills }: { skills: Skill[] }) { const { mutate: enableSkill } = useEnableSkill(); if (skills.length === 0) { return ( No skill yet Put your skill folders under the `/skills/custom` folder under the root folder of DeerFlow. ); } return (
{skills.map((skill) => (
{skill.name}
{skill.category}
{skill.description}
enableSkill({ skillName: skill.name, enabled: checked }) } />
))}
); }