fix(web): persist the default agent preset, and give its page an identity
Three fixes to the settings surface. The default never reached settings.yaml. The api-proxy keeps an explicit allowlist of settings namespaces it exposes to configuration clients, and `agent-presets` was never added — so both pickers moved and then silently forgot, which is worse than refusing the control. The host seam was fine all along; only the wire boundary refused. The regression test fails with the namespace removed. The nav row showed the fallback gear and read `Agent preset` in Chinese, matching neither sibling (通用设置 / 模型). It is now 智能体 with the think glyph, the only unused icon in the set whose semantics point at the agent rather than at tuning sliders (Personalization is already the workspace browser's filter control).
This commit is contained in:
@@ -12,13 +12,16 @@
|
||||
import { useCallback, useEffect, useId, useRef, useState } from 'react'
|
||||
import { createPortal } from 'react-dom'
|
||||
import clsx from 'clsx'
|
||||
import { IconCloseOutline16, IconDataOutline16, IconSettingsOutline16 } from '@deepseek-ai/dsh-client-ui-primitives'
|
||||
import {
|
||||
IconCloseOutline16, IconDataOutline16, IconSettingsOutline16, IconThinkOutline16,
|
||||
} from '@deepseek-ai/dsh-client-ui-primitives'
|
||||
import type { SettingsRootComponentProps, SettingsSectionRow } from './contract/slots.ts'
|
||||
import css from './SettingsRoot.module.css'
|
||||
|
||||
/** Nav glyph by section id; unknown ids fall back to the settings gear. */
|
||||
function navIcon(id: string) {
|
||||
if (id === 'models') return <IconDataOutline16 className={css.navIcon} size={16} />
|
||||
if (id === 'agent-presets') return <IconThinkOutline16 className={css.navIcon} size={16} />
|
||||
return <IconSettingsOutline16 className={css.navIcon} size={16} />
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user