/** * The General section (figma 501:29983 'Options'): Permission and Tool Call * skeleton rows, then the feature-contributed preference rows from the * `settings.general.item` slot (locale → Language, ui-theme → Appearance). * The section column stacks rows; each row draws its own internals and * separator. */ import { IconChevronDownOutline14 } from '@deepseek-ai/dsh-client-ui-primitives' import type { PropsRenderSlots, PropsRuntime } from '@deepseek-ai/dsh-client-ui-slots' import css from './GeneralSection.module.css' /** Injected face of the General section: the settings-namespace translate. */ export interface GeneralSectionInjected { /** Translate a `settings` dictionary key to the active-locale text. */ t: (key: string) => string } /** Full component props: section owner share + item render share + inject face. */ export type GeneralSectionComponentProps = PropsRuntime<'settings.section'> & PropsRenderSlots<'settings.general.item'> & GeneralSectionInjected /** * Render the General section content column. * @param props - composed slot props (contract/slots.ts). * @returns the section element tree. */ export function GeneralSection({ t, renderSlot }: GeneralSectionComponentProps) { return (
{/* Permission (skeleton): disabled selector pill. */}
{t('permission.title')}
{t('permission.desc')}
{/* Tool Call (skeleton): schema cube pinned selected, code cube unselected. */}
{t('toolcall.title')}
{t('toolcall.schema.title')}
{t('toolcall.schema.desc')}
{t('toolcall.code.title')}
{t('toolcall.code.desc')}
{/* Feature-owned preference rows (Language, Appearance, …). */} {renderSlot('settings.general.item', {})}
) }