diff --git a/auto-claude-ui/src/renderer/App.tsx b/auto-claude-ui/src/renderer/App.tsx index 591766b7..2961a920 100644 --- a/auto-claude-ui/src/renderer/App.tsx +++ b/auto-claude-ui/src/renderer/App.tsx @@ -29,7 +29,6 @@ import { Insights } from './components/Insights'; import { GitHubIssues } from './components/GitHubIssues'; import { Changelog } from './components/Changelog'; import { Worktrees } from './components/Worktrees'; -import { AgentProfiles } from './components/AgentProfiles'; import { WelcomeScreen } from './components/WelcomeScreen'; import { RateLimitModal } from './components/RateLimitModal'; import { SDKRateLimitModal } from './components/SDKRateLimitModal'; @@ -462,9 +461,6 @@ export function App() { {activeView === 'worktrees' && selectedProjectId && ( )} - {activeView === 'agent-profiles' && ( - - )} {activeView === 'agent-tools' && (
diff --git a/auto-claude-ui/src/renderer/components/Sidebar.tsx b/auto-claude-ui/src/renderer/components/Sidebar.tsx index fcae0347..9f626407 100644 --- a/auto-claude-ui/src/renderer/components/Sidebar.tsx +++ b/auto-claude-ui/src/renderer/components/Sidebar.tsx @@ -16,8 +16,7 @@ import { FileText, Sparkles, GitBranch, - HelpCircle, - UserCog + HelpCircle } from 'lucide-react'; import { Button } from './ui/button'; import { ScrollArea } from './ui/scroll-area'; @@ -57,7 +56,7 @@ import { GitSetupModal } from './GitSetupModal'; import { RateLimitIndicator } from './RateLimitIndicator'; import type { Project, AutoBuildVersionInfo, GitStatus } from '../../shared/types'; -export type SidebarView = 'kanban' | 'terminals' | 'roadmap' | 'context' | 'ideation' | 'github-issues' | 'changelog' | 'insights' | 'worktrees' | 'agent-tools' | 'agent-profiles'; +export type SidebarView = 'kanban' | 'terminals' | 'roadmap' | 'context' | 'ideation' | 'github-issues' | 'changelog' | 'insights' | 'worktrees' | 'agent-tools'; interface SidebarProps { onSettingsClick: () => void; @@ -85,8 +84,7 @@ const projectNavItems: NavItem[] = [ const toolsNavItems: NavItem[] = [ { id: 'github-issues', label: 'GitHub Issues', icon: Github, shortcut: 'G' }, - { id: 'worktrees', label: 'Worktrees', icon: GitBranch, shortcut: 'W' }, - { id: 'agent-profiles', label: 'Agent Profiles', icon: UserCog, shortcut: 'P' } + { id: 'worktrees', label: 'Worktrees', icon: GitBranch, shortcut: 'W' } ]; export function Sidebar({ diff --git a/auto-claude-ui/src/renderer/components/settings/AgentProfileSettings.tsx b/auto-claude-ui/src/renderer/components/settings/AgentProfileSettings.tsx new file mode 100644 index 00000000..eb119815 --- /dev/null +++ b/auto-claude-ui/src/renderer/components/settings/AgentProfileSettings.tsx @@ -0,0 +1,132 @@ +import { Brain, Scale, Zap, Check, Sparkles } from 'lucide-react'; +import { cn } from '../../lib/utils'; +import { DEFAULT_AGENT_PROFILES, AVAILABLE_MODELS, THINKING_LEVELS } from '../../../shared/constants'; +import { useSettingsStore, saveSettings } from '../../stores/settings-store'; +import { SettingsSection } from './SettingsSection'; +import type { AgentProfile } from '../../../shared/types/settings'; + +/** + * Icon mapping for agent profile icons + */ +const iconMap: Record = { + Brain, + Scale, + Zap, + Sparkles +}; + +/** + * Agent Profile Settings component + * Displays preset agent profiles for quick model/thinking level configuration + * Used in the Settings page under Agent Settings + */ +export function AgentProfileSettings() { + const settings = useSettingsStore((state) => state.settings); + const selectedProfileId = settings.selectedAgentProfile || 'auto'; + + const handleSelectProfile = async (profileId: string) => { + await saveSettings({ selectedAgentProfile: profileId }); + }; + + /** + * Get human-readable model label + */ + const getModelLabel = (modelValue: string): string => { + const model = AVAILABLE_MODELS.find((m) => m.value === modelValue); + return model?.label || modelValue; + }; + + /** + * Get human-readable thinking level label + */ + const getThinkingLabel = (thinkingValue: string): string => { + const level = THINKING_LEVELS.find((l) => l.value === thinkingValue); + return level?.label || thinkingValue; + }; + + /** + * Render a single profile card + */ + const renderProfileCard = (profile: AgentProfile) => { + const isSelected = selectedProfileId === profile.id; + const Icon = iconMap[profile.icon || 'Brain'] || Brain; + + return ( + + ); + }; + + return ( + +
+ {/* Description */} +
+

+ Agent profiles provide preset configurations for Claude model and thinking level. + When you create a new task, these settings will be used as defaults. You can always + override them in the task creation wizard. +

+
+ + {/* Profile cards - 2 column grid on larger screens */} +
+ {DEFAULT_AGENT_PROFILES.map(renderProfileCard)} +
+
+
+ ); +} diff --git a/auto-claude-ui/src/renderer/components/settings/GeneralSettings.tsx b/auto-claude-ui/src/renderer/components/settings/GeneralSettings.tsx index 1f49c2f3..be4b1a3f 100644 --- a/auto-claude-ui/src/renderer/components/settings/GeneralSettings.tsx +++ b/auto-claude-ui/src/renderer/components/settings/GeneralSettings.tsx @@ -3,6 +3,7 @@ import { Input } from '../ui/input'; import { Select, SelectContent, SelectItem, SelectTrigger, SelectValue } from '../ui/select'; import { Switch } from '../ui/switch'; import { SettingsSection } from './SettingsSection'; +import { AgentProfileSettings } from './AgentProfileSettings'; import { AVAILABLE_MODELS } from '../../../shared/constants'; import type { AppSettings } from '../../../shared/types'; @@ -18,64 +19,51 @@ interface GeneralSettingsProps { export function GeneralSettings({ settings, onSettingsChange, section }: GeneralSettingsProps) { if (section === 'agent') { return ( - -
-
- -

The AI model used for agent tasks

- -
-
- -

The coding framework used for autonomous tasks

- -
-
-
-
- -

- Automatically name terminals based on commands (uses Haiku) -

+
+ {/* Agent Profile Selection */} + + + {/* Other Agent Settings */} + +
+
+ +

The coding framework used for autonomous tasks

+ +
+
+
+
+ +

+ Automatically name terminals based on commands (uses Haiku) +

+
+ onSettingsChange({ ...settings, autoNameTerminals: checked })} + />
- onSettingsChange({ ...settings, autoNameTerminals: checked })} - />
-
- + +
); }