diff --git a/CHANGELOG.md b/CHANGELOG.md index fbf15dc..3c82420 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -43,6 +43,8 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 - Stub Channel 适配器(Telegram、Discord、Slack) - 未使用的 Store(meshStore、personaStore) - 不完整的 ActiveLearningPanel 和 skillMarketStore +- 未使用的 Feedback 组件目录 +- Team(团队)和 Swarm(协作)功能(~8,100 行前端代码,零后端支持,Pipeline 系统已覆盖其全部能力) - 调试日志清理(~310 处 console/println 语句) --- diff --git a/desktop/src/App.tsx b/desktop/src/App.tsx index 4a49276..2dd00f3 100644 --- a/desktop/src/App.tsx +++ b/desktop/src/App.tsx @@ -6,9 +6,6 @@ import { ChatArea } from './components/ChatArea'; import { RightPanel } from './components/RightPanel'; import { SettingsLayout } from './components/Settings/SettingsLayout'; import { AutomationPanel } from './components/Automation'; -import { TeamCollaborationView } from './components/TeamCollaborationView'; -import { TeamOrchestrator } from './components/TeamOrchestrator'; -import { SwarmDashboard } from './components/SwarmDashboard'; import { SkillMarket } from './components/SkillMarket'; import { AgentOnboardingWizard } from './components/AgentOnboardingWizard'; import { HandApprovalModal } from './components/HandApprovalModal'; @@ -16,13 +13,11 @@ import { TopBar } from './components/TopBar'; import { DetailDrawer } from './components/DetailDrawer'; import { useConnectionStore } from './store/connectionStore'; import { useHandStore, type HandRun } from './store/handStore'; -import { useTeamStore } from './store/teamStore'; import { useChatStore } from './store/chatStore'; import { initializeStores } from './store'; import { getStoredGatewayToken } from './lib/gateway-client'; import { pageVariants, defaultTransition, fadeInVariants } from './lib/animations'; -import { Users, Loader2, Settings } from 'lucide-react'; -import { EmptyState } from './components/ui'; +import { Loader2 } from 'lucide-react'; import { isTauriRuntime, getLocalGatewayStatus, startLocalGateway } from './lib/tauri-gateway'; import { useOnboarding } from './lib/use-onboarding'; import { intelligenceClient } from './lib/intelligence-client'; @@ -47,7 +42,6 @@ function BootstrapScreen({ status }: { status: string }) { function App() { const [view, setView] = useState('main'); const [mainContentView, setMainContentView] = useState('chat'); - const [selectedTeamId, setSelectedTeamId] = useState(undefined); const [bootstrapping, setBootstrapping] = useState(true); const [bootstrapStatus, setBootstrapStatus] = useState('Initializing...'); const [showOnboarding, setShowOnboarding] = useState(false); @@ -56,13 +50,11 @@ function App() { // Hand Approval state const [pendingApprovalRun, setPendingApprovalRun] = useState(null); const [showApprovalModal, setShowApprovalModal] = useState(false); - const [teamViewMode, setTeamViewMode] = useState<'collaboration' | 'orchestrator'>('collaboration'); const connect = useConnectionStore((s) => s.connect); const hands = useHandStore((s) => s.hands); const approveHand = useHandStore((s) => s.approveHand); const loadHands = useHandStore((s) => s.loadHands); - const { activeTeam, setActiveTeam, teams } = useTeamStore(); const { setCurrentAgent, newConversation } = useChatStore(); const { isNeeded: onboardingNeeded, isLoading: onboardingLoading, markCompleted } = useOnboarding(); @@ -288,14 +280,6 @@ function App() { setMainContentView('chat'); }; - const handleSelectTeam = (teamId: string) => { - const team = teams.find(t => t.id === teamId); - if (team) { - setActiveTeam(team); - setSelectedTeamId(teamId); - } - }; - if (view === 'settings') { return setView('main')} />; } @@ -362,8 +346,6 @@ function App() { setView('settings')} onMainViewChange={handleMainViewChange} - selectedTeamId={selectedTeamId} - onSelectTeam={handleSelectTeam} onNewChat={handleNewChat} /> @@ -395,59 +377,6 @@ function App() { > - ) : mainContentView === 'team' ? ( - activeTeam ? ( -
- {/* Team View Tabs */} -
- - -
- {/* Tab Content */} -
- {teamViewMode === 'orchestrator' ? ( - setTeamViewMode('collaboration')} /> - ) : ( - - )} -
-
- ) : ( - } - title="选择或创建团队" - description="从左侧列表中选择一个团队,或点击 + 创建新的多 Agent 协作团队。" - /> - ) - ) : mainContentView === 'swarm' ? ( - - - ) : mainContentView === 'skills' ? ( void; -} - -function FeedbackItem({ feedback, iteration, isExpanded, onToggle }: FeedbackItemProps) { - const verdictColors = { - approved: 'bg-green-100 text-green-700 dark:bg-green-900/30 dark:text-green-300', - needs_work: 'bg-yellow-100 text-yellow-700 dark:bg-yellow-900/30 dark:text-yellow-300', - rejected: 'bg-red-100 text-red-700 dark:bg-red-900/30 dark:text-red-300', - }; - - const verdictIcons = { - approved: , - needs_work: , - rejected: , - }; - - const severityColors = { - critical: 'bg-red-100 text-red-700 dark:bg-red-900/30 dark:text-red-300', - major: 'bg-orange-100 text-orange-700 dark:bg-orange-900/30 dark:text-orange-300', - minor: 'bg-yellow-100 text-yellow-700 dark:bg-yellow-900/30 dark:text-yellow-300', - suggestion: 'bg-blue-100 text-blue-700 dark:bg-blue-900/30 dark:text-blue-300', - }; - - return ( -
- - - {isExpanded && ( -
- {/* Comments */} - {feedback.comments.length > 0 && ( -
-
Comments
-
    - {feedback.comments.map((comment, idx) => ( -
  • - - {comment} -
  • - ))} -
-
- )} - - {/* Issues */} - {feedback.issues.length > 0 && ( -
-
Issues ({feedback.issues.length})
-
- {feedback.issues.map((issue, idx) => ( -
-
- - {issue.severity} - - {issue.file && ( - - - {issue.file}{issue.line ? `:${issue.line}` : ''} - - )} -
-

{issue.description}

- {issue.suggestion && ( -

- - {issue.suggestion} -

- )} -
- ))} -
-
- )} -
- )} -
- ); -} - -interface ReviewFormProps { - loopId: string; - teamId: string; - onSubmit: (feedback: Omit) => void; - onCancel: () => void; -} - -function ReviewForm({ loopId: _loopId, teamId: _teamId, onSubmit, onCancel }: ReviewFormProps) { - const [verdict, setVerdict] = useState('needs_work'); - const [comment, setComment] = useState(''); - const [issues, setIssues] = useState([]); - const [newIssue, setNewIssue] = useState>({}); - - const handleAddIssue = () => { - if (!newIssue.description) return; - setIssues([...issues, { - severity: newIssue.severity || 'minor', - description: newIssue.description, - file: newIssue.file, - line: newIssue.line, - suggestion: newIssue.suggestion, - } as ReviewIssue]); - setNewIssue({}); - }; - - const handleSubmit = () => { - onSubmit({ - verdict, - comments: comment ? [comment] : [], - issues, - }); - }; - - return ( -
-

Submit Review

- - {/* Verdict */} -
- -
- {(['approved', 'needs_work', 'rejected'] as const).map(v => ( - - ))} -
-
- - {/* Comment */} -
- -