docs(claude): restructure documentation management and add feedback system
- Restructure §8 from "文档沉淀规则" to "文档管理规则" with 4 subsections - Add docs/ structure with features/ and knowledge-base/ directories - Add feature documentation template with 7 sections (概述/设计初衷/技术设计/预期作用/实际效果/演化路线/头脑风暴) - Add feature update trigger matrix (新增/修改/完成/问题/反馈) - Add documentation quality checklist - Add §16
This commit is contained in:
@@ -1,13 +1,14 @@
|
||||
import { useEffect, useMemo, useState } from 'react';
|
||||
import { motion } from 'framer-motion';
|
||||
import { motion, AnimatePresence } from 'framer-motion';
|
||||
import { getStoredGatewayUrl } from '../lib/gateway-client';
|
||||
import { useGatewayStore, type PluginStatus } from '../store/gatewayStore';
|
||||
import { toChatAgent, useChatStore } from '../store/chatStore';
|
||||
import {
|
||||
Wifi, WifiOff, Bot, BarChart3, Plug, RefreshCw,
|
||||
MessageSquare, Cpu, FileText, User, Activity, FileCode, Brain
|
||||
MessageSquare, Cpu, FileText, User, Activity, FileCode, Brain, MessageCircle
|
||||
} from 'lucide-react';
|
||||
import { MemoryPanel } from './MemoryPanel';
|
||||
import { FeedbackModal, FeedbackHistory } from './Feedback';
|
||||
import { cardHover, defaultTransition } from '../lib/animations';
|
||||
import { Button, Badge, EmptyState } from './ui';
|
||||
|
||||
@@ -17,7 +18,8 @@ export function RightPanel() {
|
||||
connect, loadClones, loadUsageStats, loadPluginStatus, workspaceInfo, quickConfig, updateClone,
|
||||
} = useGatewayStore();
|
||||
const { messages, currentModel, currentAgent, setCurrentAgent } = useChatStore();
|
||||
const [activeTab, setActiveTab] = useState<'status' | 'files' | 'agent' | 'memory'>('status');
|
||||
const [activeTab, setActiveTab] = useState<'status' | 'files' | 'agent' | 'memory' | 'feedback'>('status');
|
||||
const [isFeedbackModalOpen, setIsFeedbackModalOpen] = useState(false);
|
||||
const [isEditingAgent, setIsEditingAgent] = useState(false);
|
||||
const [agentDraft, setAgentDraft] = useState<AgentDraft | null>(null);
|
||||
|
||||
@@ -152,6 +154,18 @@ export function RightPanel() {
|
||||
>
|
||||
<Brain className="w-4 h-4" />
|
||||
</Button>
|
||||
<Button
|
||||
variant={activeTab === 'feedback' ? 'secondary' : 'ghost'}
|
||||
size="sm"
|
||||
onClick={() => setActiveTab('feedback')}
|
||||
className="flex items-center gap-1 text-xs px-2 py-1"
|
||||
title="Feedback"
|
||||
aria-label="Feedback"
|
||||
aria-selected={activeTab === 'feedback'}
|
||||
role="tab"
|
||||
>
|
||||
<MessageCircle className="w-4 h-4" />
|
||||
</Button>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -382,6 +396,29 @@ export function RightPanel() {
|
||||
)}
|
||||
</motion.div>
|
||||
</div>
|
||||
) : activeTab === 'feedback' ? (
|
||||
<div className="space-y-4">
|
||||
<motion.div
|
||||
whileHover={cardHover}
|
||||
transition={defaultTransition}
|
||||
className="rounded-xl border border-gray-200 dark:border-gray-700 bg-white dark:bg-gray-800 p-4 shadow-sm"
|
||||
>
|
||||
<div className="flex items-center justify-between mb-3">
|
||||
<h3 className="text-sm font-semibold text-gray-900 dark:text-gray-100 flex items-center gap-2">
|
||||
<MessageCircle className="w-4 h-4" />
|
||||
User Feedback
|
||||
</h3>
|
||||
<Button
|
||||
variant="primary"
|
||||
size="sm"
|
||||
onClick={() => setIsFeedbackModalOpen(true)}
|
||||
>
|
||||
New Feedback
|
||||
</Button>
|
||||
</div>
|
||||
<FeedbackHistory />
|
||||
</motion.div>
|
||||
</div>
|
||||
) : (
|
||||
<>
|
||||
{/* Gateway 连接状态 */}
|
||||
@@ -592,6 +629,13 @@ export function RightPanel() {
|
||||
</>
|
||||
)}
|
||||
</div>
|
||||
|
||||
{/* Feedback Modal */}
|
||||
<AnimatePresence>
|
||||
{isFeedbackModalOpen && (
|
||||
<FeedbackModal onClose={() => setIsFeedbackModalOpen(false)} />
|
||||
)}
|
||||
</AnimatePresence>
|
||||
</aside>
|
||||
);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user