refactor(web): trim preset visibility diff
This commit is contained in:
1 parent
f3946dc39a
commit
9490dfceae
2 files changed
+4
-12
No files matched your search
@@ -15,9 +15,9 @@ import css from './AgentPresetSection.module.css'
|
||||
/** Settings actions and their shared controller state. */
|
||||
export interface AgentPresetSectionInjected {
|
||||
hooks: {
|
||||
agentPresetSection: SnapshotStore<AgentPresetSectionState>
|
||||
/** Shared Coding Tools preference; off hides the built-in PTC and Minimal cards. */
|
||||
developerTools: ObservableSnapshot<boolean>
|
||||
agentPresetSection: SnapshotStore<AgentPresetSectionState>
|
||||
}
|
||||
/** Stage the `cordis` preset and start a Creator-mode task; absent without a conversation flow. */
|
||||
startCreatorDraft?: () => void
|
||||
@@ -62,11 +62,11 @@ function CardDescription({ text }: { text: string }): ReactNode {
|
||||
* @returns The preset settings section.
|
||||
*/
|
||||
export function AgentPresetSection({
|
||||
useAgentPresetSection, useDeveloperTools, load, view, closeView, makeDefault, startCreatorDraft,
|
||||
close: closeSettings, t,
|
||||
useAgentPresetSection, load, view, closeView, makeDefault, startCreatorDraft,
|
||||
close: closeSettings, useDeveloperTools, t,
|
||||
}: AgentPresetSectionProps) {
|
||||
const state = useAgentPresetSection(value => value)
|
||||
const developerTools = useDeveloperTools(value => value)
|
||||
const developerTools = useDeveloperTools(enabled => enabled)
|
||||
const [guide, setGuide] = useState<{
|
||||
content: NonNullable<ReturnType<typeof presetGuide>>
|
||||
page: PresetGuidePage
|
||||
|
||||
@@ -28,8 +28,6 @@ export type AgentPresetSettingsKey =
|
||||
| 'standardUnavailable'
|
||||
| 'close'
|
||||
| 'creatorDraft'
|
||||
| 'enableDevToolsToSetDefault'
|
||||
| 'enableDevToolsToCreate'
|
||||
|
||||
/** English copy. */
|
||||
export const en: Record<AgentPresetSettingsKey, string> = {
|
||||
@@ -68,9 +66,6 @@ export const en: Record<AgentPresetSettingsKey, string> = {
|
||||
close: 'Close',
|
||||
|
||||
creatorDraft: 'Let the agent help me create a preset',
|
||||
|
||||
enableDevToolsToSetDefault: 'Turn on Coding Tools in General settings to choose a default',
|
||||
enableDevToolsToCreate: 'Turn on Coding Tools in General settings to start Creator mode',
|
||||
}
|
||||
|
||||
/** Simplified Chinese copy. */
|
||||
@@ -106,9 +101,6 @@ export const zh: Record<AgentPresetSettingsKey, string> = {
|
||||
close: '关闭',
|
||||
|
||||
creatorDraft: '让 Agent 帮我创建预设模式',
|
||||
|
||||
enableDevToolsToSetDefault: '请先在通用设置中开启代码工作工具,再设置默认值',
|
||||
enableDevToolsToCreate: '请先在通用设置中开启代码工作工具,再启动创造模式',
|
||||
}
|
||||
|
||||
// The resolution itself is the shared fold in `dsh-agent-preset-registry/display`,
|
||||
|
||||
Reference in new issue
Block a user