feat(aia): Complete AIA V2.0 with universal streaming capabilities

Major Updates:
- Add StreamingService with OpenAI Compatible format (backend/common/streaming)
- Upgrade Chat component V2 with Ant Design X integration
- Implement AIA module with 12 intelligent agents
- Create AgentHub with 100% prototype V11 restoration
- Create ChatWorkspace with streaming response support
- Add ThinkingBlock for deep thinking display
- Add useAIStream Hook for OpenAI Compatible stream handling

Backend Common Capabilities (~400 lines):
- OpenAIStreamAdapter: SSE adapter with OpenAI format
- StreamingService: unified streaming service
- Support content and reasoning_content dual streams
- Deep thinking tag processing (<think>...</think>)

Frontend Common Capabilities (~2000 lines):
- AIStreamChat: modern streaming chat component
- ThinkingBlock: collapsible deep thinking display
- ConversationList: conversation management with grouping
- useAIStream: OpenAI Compatible stream handler Hook
- useConversations: conversation state management Hook
- Modern design styles (Ultramodern theme)

AIA Module Frontend (~1500 lines):
- AgentHub: 12 agent cards with timeline design
- ChatWorkspace: fullscreen immersive chat interface
- AgentCard: theme-colored cards (blue/yellow/teal/purple)
- 5 phases, 12 agents configuration
- Responsive layout (desktop + mobile)

AIA Module Backend (~900 lines):
- agentService: 12 agents config with system prompts
- conversationService: refactored with StreamingService
- attachmentService: file upload skeleton (30k token limit)
- 12 API endpoints with authentication
- Full CRUD for conversations and messages

Documentation:
- AIA module status and development guide
- Universal capabilities catalog (11 services)
- Quick reference card for developers
- System overview updates

Testing:
- Stream response verified (HTTP 200)
- Authentication working correctly
- Auto conversation creation working
- Deep thinking display working
- Message input and send working

Status: Core features completed (85%), attachment and history loading pending
This commit is contained in:
2026-01-14 19:09:28 +08:00
parent 4ed67a8846
commit 3d35e9c58b
38 changed files with 8448 additions and 335 deletions

View File

@@ -0,0 +1,213 @@
/**
* ConversationList 会话列表样式
*
* 现代感设计(参考 Ant Design X Ultramodern
* - 简洁清爽
* - 柔和阴影
* - 流畅过渡
*/
.conversation-list {
display: flex;
flex-direction: column;
height: 100%;
width: 280px;
background: #ffffff;
border-right: 1px solid #e5e7eb;
}
/* 头部 */
.conversation-list-header {
padding: 20px 16px;
border-bottom: 1px solid #f3f4f6;
}
.conversation-list-logo {
display: flex;
align-items: center;
gap: 12px;
}
.conversation-list-logo .default-logo {
font-size: 24px;
color: #6366f1;
}
.conversation-list-title {
font-size: 18px;
font-weight: 600;
color: #111827;
letter-spacing: -0.02em;
}
/* 新建会话按钮 */
.conversation-list-new {
padding: 12px 16px;
}
.new-conversation-btn {
height: 44px;
border-radius: 12px;
border: 1px dashed #d1d5db;
background: linear-gradient(135deg, #f9fafb 0%, #f3f4f6 100%);
color: #6366f1;
font-weight: 500;
transition: all 0.3s ease;
}
.new-conversation-btn:hover {
border-color: #6366f1;
background: linear-gradient(135deg, #eef2ff 0%, #e0e7ff 100%);
color: #4f46e5;
transform: translateY(-1px);
box-shadow: 0 4px 12px rgba(99, 102, 241, 0.15);
}
/* 会话列表内容 */
.conversation-list-content {
flex: 1;
overflow-y: auto;
padding: 8px 12px;
}
/* 分组标签 */
.conversation-group {
margin-bottom: 16px;
}
.conversation-group-label {
padding: 8px 4px;
font-size: 12px;
font-weight: 500;
text-transform: uppercase;
letter-spacing: 0.05em;
}
/* 会话项 */
.conversation-item {
display: flex;
align-items: flex-start;
gap: 12px;
padding: 12px;
border-radius: 12px;
cursor: pointer;
transition: all 0.2s ease;
margin-bottom: 4px;
position: relative;
}
.conversation-item:hover {
background: #f9fafb;
}
.conversation-item.active {
background: linear-gradient(135deg, #eef2ff 0%, #e0e7ff 100%);
}
.conversation-item.active::before {
content: '';
position: absolute;
left: 0;
top: 50%;
transform: translateY(-50%);
width: 3px;
height: 24px;
background: #6366f1;
border-radius: 0 3px 3px 0;
}
/* 会话图标 */
.conversation-item-icon {
flex-shrink: 0;
width: 36px;
height: 36px;
display: flex;
align-items: center;
justify-content: center;
border-radius: 10px;
background: #f3f4f6;
color: #6b7280;
font-size: 16px;
}
.conversation-item.active .conversation-item-icon {
background: #6366f1;
color: white;
}
.agent-icon {
font-size: 20px;
}
/* 会话内容 */
.conversation-item-content {
flex: 1;
min-width: 0;
overflow: hidden;
}
.conversation-item-title {
font-size: 14px;
font-weight: 500;
color: #111827;
white-space: nowrap;
overflow: hidden;
text-overflow: ellipsis;
line-height: 1.4;
}
.conversation-item-preview {
font-size: 12px;
color: #6b7280;
white-space: nowrap;
overflow: hidden;
text-overflow: ellipsis;
margin-top: 4px;
line-height: 1.4;
}
/* 更多按钮 */
.conversation-item-more {
opacity: 0;
flex-shrink: 0;
color: #9ca3af;
transition: opacity 0.2s ease;
}
.conversation-item:hover .conversation-item-more {
opacity: 1;
}
/* 空状态 */
.conversation-empty {
padding: 40px 20px;
}
/* 滚动条 */
.conversation-list-content::-webkit-scrollbar {
width: 6px;
}
.conversation-list-content::-webkit-scrollbar-track {
background: transparent;
}
.conversation-list-content::-webkit-scrollbar-thumb {
background: #e5e7eb;
border-radius: 3px;
}
.conversation-list-content::-webkit-scrollbar-thumb:hover {
background: #d1d5db;
}
/* 响应式 */
@media (max-width: 768px) {
.conversation-list {
width: 100%;
border-right: none;
border-bottom: 1px solid #e5e7eb;
max-height: 40vh;
}
}