diff --git a/apps/ui/src/components/views/settings-view/codex/codex-settings.tsx b/apps/ui/src/components/views/settings-view/codex/codex-settings.tsx index d603337c..d46f7a05 100644 --- a/apps/ui/src/components/views/settings-view/codex/codex-settings.tsx +++ b/apps/ui/src/components/views/settings-view/codex/codex-settings.tsx @@ -1,110 +1,37 @@ import { Label } from '@/components/ui/label'; import { Checkbox } from '@/components/ui/checkbox'; -import { FileCode, ShieldCheck, Globe, ImageIcon } from 'lucide-react'; +import { FileCode, Globe, ImageIcon } from 'lucide-react'; import { cn } from '@/lib/utils'; -import { - Select, - SelectContent, - SelectItem, - SelectTrigger, - SelectValue, -} from '@/components/ui/select'; -import type { CodexApprovalPolicy, CodexSandboxMode } from '@automaker/types'; import { OpenAIIcon } from '@/components/ui/provider-icon'; interface CodexSettingsProps { autoLoadCodexAgents: boolean; - codexSandboxMode: CodexSandboxMode; - codexApprovalPolicy: CodexApprovalPolicy; codexEnableWebSearch: boolean; codexEnableImages: boolean; onAutoLoadCodexAgentsChange: (enabled: boolean) => void; - onCodexSandboxModeChange: (mode: CodexSandboxMode) => void; - onCodexApprovalPolicyChange: (policy: CodexApprovalPolicy) => void; onCodexEnableWebSearchChange: (enabled: boolean) => void; onCodexEnableImagesChange: (enabled: boolean) => void; } const CARD_TITLE = 'Codex CLI Settings'; -const CARD_SUBTITLE = 'Configure Codex instructions, capabilities, and execution safety defaults.'; +const CARD_SUBTITLE = 'Configure Codex instructions and capabilities.'; const AGENTS_TITLE = 'Auto-load AGENTS.md Instructions'; const AGENTS_DESCRIPTION = 'Automatically inject project instructions from'; const AGENTS_PATH = '.codex/AGENTS.md'; const AGENTS_SUFFIX = 'on each Codex run.'; const WEB_SEARCH_TITLE = 'Enable Web Search'; -const WEB_SEARCH_DESCRIPTION = - 'Allow Codex to search the web for current information using --search flag.'; +const WEB_SEARCH_DESCRIPTION = 'Allow Codex to search the web for current information.'; const IMAGES_TITLE = 'Enable Image Support'; -const IMAGES_DESCRIPTION = 'Allow Codex to process images attached to prompts using -i flag.'; -const SANDBOX_TITLE = 'Sandbox Policy'; -const APPROVAL_TITLE = 'Approval Policy'; -const SANDBOX_SELECT_LABEL = 'Select sandbox policy'; -const APPROVAL_SELECT_LABEL = 'Select approval policy'; - -const SANDBOX_OPTIONS: Array<{ - value: CodexSandboxMode; - label: string; - description: string; -}> = [ - { - value: 'read-only', - label: 'Read-only', - description: 'Only allow safe, non-mutating commands.', - }, - { - value: 'workspace-write', - label: 'Workspace write', - description: 'Allow file edits inside the project workspace.', - }, - { - value: 'danger-full-access', - label: 'Full access', - description: 'Allow unrestricted commands (use with care).', - }, -]; - -const APPROVAL_OPTIONS: Array<{ - value: CodexApprovalPolicy; - label: string; - description: string; -}> = [ - { - value: 'untrusted', - label: 'Untrusted', - description: 'Ask for approval for most commands.', - }, - { - value: 'on-failure', - label: 'On failure', - description: 'Ask only if a command fails in the sandbox.', - }, - { - value: 'on-request', - label: 'On request', - description: 'Let the agent decide when to ask.', - }, - { - value: 'never', - label: 'Never', - description: 'Never ask for approval (least restrictive).', - }, -]; +const IMAGES_DESCRIPTION = 'Allow Codex to process images attached to prompts.'; export function CodexSettings({ autoLoadCodexAgents, - codexSandboxMode, - codexApprovalPolicy, codexEnableWebSearch, codexEnableImages, onAutoLoadCodexAgentsChange, - onCodexSandboxModeChange, - onCodexApprovalPolicyChange, onCodexEnableWebSearchChange, onCodexEnableImagesChange, }: CodexSettingsProps) { - const sandboxOption = SANDBOX_OPTIONS.find((option) => option.value === codexSandboxMode); - const approvalOption = APPROVAL_OPTIONS.find((option) => option.value === codexApprovalPolicy); - return (
- {sandboxOption?.description} -
-- {approvalOption?.description} -
-