import { useTranslation } from 'react-i18next'; import { HelpText } from './HelpText'; import { FieldLabel, FieldInput } from './formUtils'; import type { SectionFormProps } from './types'; /** * Skill Quotas — per-user skill store limits (`skills.*`). * * These caps bound how many skills a user can install and how large the * store may grow. They exist in the config schema (SkillsConfig) but were * previously only editable via config.yaml. (Distinct from the SkillsForm * panel under User Folder, which is the skill *store* browser/editor.) */ export function SkillsQuotaForm({ config, onChange }: SectionFormProps) { const { t } = useTranslation('settings'); const skills = config.skills ?? {}; return (

{t('skillsQuota.title')}

{t('skillsQuota.intro')}
Max Per User onChange('skills.maxPerUser', v === '' ? undefined : Number(v))} /> {t('skillsQuota.maxPerUserHelp')}
Max Skill Size (KB) onChange('skills.maxSkillSizeKb', v === '' ? undefined : Number(v))} /> {t('skillsQuota.maxSkillSizeHelp')}
Max Total Size (MB) onChange('skills.maxTotalSizeMb', v === '' ? undefined : Number(v))} /> {t('skillsQuota.maxTotalSizeHelp')}
Max System Skills onChange('skills.maxSystemSkills', v === '' ? undefined : Number(v))} /> {t('skillsQuota.maxSystemSkillsHelp')}
Max Index Chars onChange('skills.maxIndexChars', v === '' ? undefined : Number(v))} /> {t('skillsQuota.maxIndexCharsHelp')}
); }