diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 6a5bdfaf..20aec2e5 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -1,4 +1,4 @@ -# Contributing to CodinIT (codinit-dev) +# Contributing Download desktop app --> [latest release](https://github.com/codinit-dev/codinit-dev/releases/latest) diff --git a/app/components/@settings/core/ControlPanel.tsx b/app/components/@settings/core/ControlPanel.tsx index c1fd16fd..23ca124d 100644 --- a/app/components/@settings/core/ControlPanel.tsx +++ b/app/components/@settings/core/ControlPanel.tsx @@ -71,6 +71,7 @@ const TAB_DESCRIPTIONS: Record = { settings: 'Configure application preferences', notifications: 'View and manage your notifications', features: 'Explore new and upcoming features', + agent: 'Configure autonomous agent behavior', data: 'Manage your data and storage', 'cloud-providers': 'Configure cloud AI providers and models', 'local-providers': 'Configure local AI providers and models', @@ -331,6 +332,8 @@ export const ControlPanel = ({ open, onClose }: ControlPanelProps) => { return ; case 'features': return ; + case 'agent': + return null; case 'data': return ; case 'cloud-providers': diff --git a/app/components/@settings/core/ControlPanelDialog/components/ControlPanelContent.tsx b/app/components/@settings/core/ControlPanelDialog/components/ControlPanelContent.tsx index 3fdc86b6..65ad244d 100644 --- a/app/components/@settings/core/ControlPanelDialog/components/ControlPanelContent.tsx +++ b/app/components/@settings/core/ControlPanelDialog/components/ControlPanelContent.tsx @@ -17,6 +17,9 @@ const NotificationsTab = lazy(() => const FeaturesTab = lazy(() => import('~/components/@settings/tabs/features/FeaturesTab').then((module) => ({ default: module.default })), ); +const AgentTab = lazy(() => + import('~/components/@settings/tabs/agent/AgentTab').then((module) => ({ default: module.default })), +); const DataTab = lazy(() => import('~/components/@settings/tabs/data/DataTab').then((module) => ({ default: module.DataTab })), ); @@ -73,6 +76,8 @@ function TabContent({ tab }: { tab: TabType }) { return ; case 'features': return ; + case 'agent': + return ; case 'data': return ; case 'cloud-providers': diff --git a/app/components/@settings/core/constants.ts b/app/components/@settings/core/constants.ts index bd0a95ab..7b1fa026 100644 --- a/app/components/@settings/core/constants.ts +++ b/app/components/@settings/core/constants.ts @@ -5,6 +5,7 @@ export const TAB_ICONS: Record = { settings: 'i-ph:gear-six-fill', notifications: 'i-ph:bell-fill', features: 'i-ph:star-fill', + agent: 'i-ph:robot-fill', data: 'i-ph:database-fill', 'cloud-providers': 'i-ph:cloud-fill', 'local-providers': 'i-ph:desktop-fill', @@ -23,6 +24,7 @@ export const TAB_LABELS: Record = { settings: 'Settings', notifications: 'Notifications', features: 'Features', + agent: 'Agent', data: 'Data Management', 'cloud-providers': 'Cloud Providers', 'local-providers': 'Local Providers', @@ -41,6 +43,7 @@ export const TAB_DESCRIPTIONS: Record = { settings: 'Configure application preferences', notifications: 'View and manage your notifications', features: 'Explore new and upcoming features', + agent: 'Configure autonomous agent behavior', data: 'Manage your data and storage', 'cloud-providers': 'Configure cloud AI providers and models', 'local-providers': 'Configure local AI providers and models', @@ -57,11 +60,12 @@ export const TAB_DESCRIPTIONS: Record = { export const DEFAULT_TAB_CONFIG = [ // User Window Tabs (Always visible by default) { id: 'features', visible: true, window: 'user' as const, order: 0 }, - { id: 'data', visible: true, window: 'user' as const, order: 1 }, - { id: 'cloud-providers', visible: true, window: 'user' as const, order: 2 }, - { id: 'local-providers', visible: true, window: 'user' as const, order: 3 }, - { id: 'connection', visible: true, window: 'user' as const, order: 4 }, - { id: 'notifications', visible: true, window: 'user' as const, order: 5 }, + { id: 'agent', visible: true, window: 'user' as const, order: 1 }, + { id: 'data', visible: true, window: 'user' as const, order: 2 }, + { id: 'cloud-providers', visible: true, window: 'user' as const, order: 3 }, + { id: 'local-providers', visible: true, window: 'user' as const, order: 4 }, + { id: 'connection', visible: true, window: 'user' as const, order: 5 }, + { id: 'notifications', visible: true, window: 'user' as const, order: 6 }, // User Window Tabs (In dropdown, initially hidden) { id: 'profile', visible: false, window: 'user' as const, order: 7 }, @@ -75,11 +79,12 @@ export const DEFAULT_TAB_CONFIG = [ // Developer Window Tabs (All visible by default) { id: 'features', visible: true, window: 'developer' as const, order: 0 }, - { id: 'data', visible: true, window: 'developer' as const, order: 1 }, - { id: 'cloud-providers', visible: true, window: 'developer' as const, order: 2 }, - { id: 'local-providers', visible: true, window: 'developer' as const, order: 3 }, - { id: 'connection', visible: true, window: 'developer' as const, order: 4 }, - { id: 'notifications', visible: true, window: 'developer' as const, order: 5 }, + { id: 'agent', visible: true, window: 'developer' as const, order: 1 }, + { id: 'data', visible: true, window: 'developer' as const, order: 2 }, + { id: 'cloud-providers', visible: true, window: 'developer' as const, order: 3 }, + { id: 'local-providers', visible: true, window: 'developer' as const, order: 4 }, + { id: 'connection', visible: true, window: 'developer' as const, order: 5 }, + { id: 'notifications', visible: true, window: 'developer' as const, order: 6 }, { id: 'profile', visible: true, window: 'developer' as const, order: 7 }, { id: 'settings', visible: true, window: 'developer' as const, order: 8 }, { id: 'api-keys', visible: true, window: 'developer' as const, order: 9 }, diff --git a/app/components/@settings/core/types.ts b/app/components/@settings/core/types.ts index 356d3836..88907b2e 100644 --- a/app/components/@settings/core/types.ts +++ b/app/components/@settings/core/types.ts @@ -7,6 +7,7 @@ export type TabType = | 'settings' | 'notifications' | 'features' + | 'agent' | 'data' | 'cloud-providers' | 'local-providers' @@ -72,6 +73,7 @@ export const TAB_LABELS: Record = { settings: 'Settings', notifications: 'Notifications', features: 'Features', + agent: 'Agent', data: 'Data Management', 'cloud-providers': 'Cloud Providers', 'local-providers': 'Local Providers', diff --git a/app/components/@settings/shared/components/TabManagement.tsx b/app/components/@settings/shared/components/TabManagement.tsx index 4eb3580f..39ed73d6 100644 --- a/app/components/@settings/shared/components/TabManagement.tsx +++ b/app/components/@settings/shared/components/TabManagement.tsx @@ -15,6 +15,7 @@ const TAB_ICONS: Record = { settings: 'i-ph:gear-six-fill', notifications: 'i-ph:bell-fill', features: 'i-ph:star-fill', + agent: 'i-ph:robot-fill', data: 'i-ph:database-fill', 'cloud-providers': 'i-ph:cloud-fill', 'local-providers': 'i-ph:desktop-fill', diff --git a/app/components/@settings/tabs/agent/AgentTab.tsx b/app/components/@settings/tabs/agent/AgentTab.tsx new file mode 100644 index 00000000..20425683 --- /dev/null +++ b/app/components/@settings/tabs/agent/AgentTab.tsx @@ -0,0 +1,260 @@ +import { useCallback } from 'react'; +import { useStore } from '@nanostores/react'; +import { Switch } from '~/components/ui/Switch'; +import { classNames } from '~/utils/classNames'; +import { toast } from 'react-toastify'; +import { SettingsSection } from '~/components/@settings/shared/components/SettingsCard'; +import { SettingsList, SettingsListItem, SettingsPanel } from '~/components/@settings/shared/components/SettingsPanel'; +import { + agentModeStore, + agentMaxIterationsStore, + agentTokenBudgetStore, + agentSelfCorrectionStore, + updateAgentMode, + updateAgentMaxIterations, + updateAgentTokenBudget, + updateAgentSelfCorrection, +} from '~/lib/stores/settings'; +import { Input } from '~/components/ui/Input'; + +export default function AgentTab() { + const agentMode = useStore(agentModeStore); + const maxIterations = useStore(agentMaxIterationsStore); + const tokenBudget = useStore(agentTokenBudgetStore); + const selfCorrection = useStore(agentSelfCorrectionStore); + + const handleToggleAgentMode = useCallback((enabled: boolean) => { + updateAgentMode(enabled); + toast.success(`Agent mode ${enabled ? 'enabled' : 'disabled'}`); + }, []); + + const handleToggleSelfCorrection = useCallback((enabled: boolean) => { + updateAgentSelfCorrection(enabled); + toast.success(`Self-correction ${enabled ? 'enabled' : 'disabled'}`); + }, []); + + const handleMaxIterationsChange = useCallback((e: React.ChangeEvent) => { + const value = parseInt(e.target.value, 10); + + if (value >= 1 && value <= 100) { + updateAgentMaxIterations(value); + toast.success(`Max iterations set to ${value}`); + } + }, []); + + const handleTokenBudgetChange = useCallback((e: React.ChangeEvent) => { + const value = parseInt(e.target.value, 10); + + if (value >= 10000 && value <= 1000000) { + updateAgentTokenBudget(value); + toast.success(`Token budget set to ${value.toLocaleString()}`); + } + }, []); + + return ( +
+ + + + +
+
+
+
+
+
+

+ Agent Mode +

+ + Experimental + +
+

+ Enable autonomous agent mode with Plan-Execute reasoning for complex tasks +

+
+ 💡 + + When enabled, AI will autonomously plan and execute multi-step tasks + +
+
+
+
+ +
+ + + +
+
+
+
+
+

+ Self-Correction +

+

+ Allow agent to automatically detect and fix errors during execution +

+
+ 💡 + + Enables automatic retry with error correction strategies + +
+
+
+
+ +
+ + + + + + + +
+
+