A Simple and Universal Swarm Intelligence Engine, Predicting Anything. 简洁通用的群体智能引擎,预测万物
Python agent-memoryfinancial-forecastingfuture-predictionknowledge-graphllmsmulti-agent-simulationpublic-opinion-analysispython3social-predictionswarm-intelligence
Enhance Step5Interaction component with professional design updates and improved UI elements
666ghjc43b83f10dde
diff --git a/frontend/src/components/Step5Interaction.vue b/frontend/src/components/Step5Interaction.vueindex 0f15780e..c585397b 100644--- a/frontend/src/components/Step5Interaction.vue+++ b/frontend/src/components/Step5Interaction.vue@@ -77,35 +77,40 @@<!-- RIGHT PANEL: Interaction Interface --><div class="right-panel" ref="rightPanel">- <!-- Unified Action Bar -->+ <!-- Unified Action Bar - Professional Design --><div class="action-bar">- <div class="action-bar-left">+ <div class="action-bar-header">+ <span class="action-bar-title">Interactive Tools</span>+ <span class="action-bar-subtitle mono">{{ profiles.length }} agents available</span>+ </div>+ <div class="action-bar-tabs"><button- class="action-btn"+ class="tab-pill":class="{ active: activeTab === 'chat' && chatTarget === 'report_agent' }"@click="selectReportAgentChat">- <svg viewBox="0 0 24 24" width="16" height="16" fill="none" stroke="currentColor" stroke-width="2">+ <svg viewBox="0 0 24 24" width="14" height="14" fill="none" stroke="currentColor" stroke-width="2"><path d="M14.7 6.3a1 1 0 0 0 0 1.4l1.6 1.6a1 1 0 0 0 1.4 0l3.77-3.77a6 6 0 0 1-7.94 7.94l-6.91 6.91a2.12 2.12 0 0 1-3-3l6.91-6.91a6 6 0 0 1 7.94-7.94l-3.76 3.76z"></path></svg>- <span>与Report Agent对话</span>+ <span>Report Agent</span></button><div class="agent-dropdown" v-if="profiles.length > 0"><button- class="action-btn agent-option"+ class="tab-pill agent-pill":class="{ active: activeTab === 'chat' && chatTarget === 'agent' }"@click="toggleAgentDropdown">- <svg viewBox="0 0 24 24" width="16" height="16" fill="none" stroke="currentColor" stroke-width="2">+ <svg viewBox="0 0 24 24" width="14" height="14" fill="none" stroke="currentColor" stroke-width="2"><path d="M20 21v-2a4 4 0 0 0-4-4H8a4 4 0 0 0-4 4v2"></path><circle cx="12" cy="7" r="4"></circle></svg>- <span>{{ selectedAgent ? `与${selectedAgent.username}对话` : '与世界中的任意个体对话' }}</span>- <svg class="dropdown-arrow" :class="{ open: showAgentDropdown }" viewBox="0 0 24 24" width="14" height="14" fill="none" stroke="currentColor" stroke-width="2">+ <span>{{ selectedAgent ? selectedAgent.username : 'Select Agent' }}</span>+ <svg class="dropdown-arrow" :class="{ open: showAgentDropdown }" viewBox="0 0 24 24" width="12" height="12" fill="none" stroke="currentColor" stroke-width="2"><polyline points="6 9 12 15 18 9"></polyline></svg></button><div v-if="showAgentDropdown" class="dropdown-menu">+ <div class="dropdown-header">选择对话对象</div><divv-for="(agent, idx) in profiles":key="idx"@@ -120,18 +125,17 @@</div></div></div>- </div>- <div class="action-bar-right">+ <div class="tab-divider"></div><button- class="action-btn survey-btn"+ class="tab-pill survey-pill":class="{ active: activeTab === 'survey' }"@click="activeTab = 'survey'">- <svg viewBox="0 0 24 24" width="16" height="16" fill="none" stroke="currentColor" stroke-width="2">+ <svg viewBox="0 0 24 24" width="14" height="14" fill="none" stroke="currentColor" stroke-width="2"><path d="M9 11l3 3L22 4"></path><path d="M21 12v7a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h11"></path></svg>- <span>在世界中发放问卷</span>+ <span>Survey</span></button></div></div>@@ -754,6 +758,11 @@ watch(() => props.simulationId, (newId) => {overflow: hidden;}+/* Utility Classes */+.mono {+ font-family: 'JetBrains Mono', 'SF Mono', 'Monaco', 'Consolas', monospace;+}+/* Main Split Layout */.main-split-layout {flex: 1;@@ -1089,74 +1098,110 @@ watch(() => props.simulationId, (newId) => {overflow: hidden;}-/* Action Bar */+/* Action Bar - Professional Design */.action-bar {display: flex;align-items: center;justify-content: space-between;- padding: 12px 20px;+ padding: 14px 20px;border-bottom: 1px solid #E5E7EB;- background: #FAFAFA;- gap: 12px;+ background: linear-gradient(180deg, #FFFFFF 0%, #FAFBFC 100%);+ gap: 16px;}-.action-bar-left {+.action-bar-header {display: flex;- align-items: center;- gap: 8px;+ flex-direction: column;+ gap: 2px;+ min-width: 140px;+}++.action-bar-title {+ font-size: 13px;+ font-weight: 600;+ color: #1F2937;+ letter-spacing: -0.01em;+}++.action-bar-subtitle {+ font-size: 11px;+ color: #9CA3AF;+}++.action-bar-subtitle.mono {+ font-family: 'JetBrains Mono', 'SF Mono', monospace;}-.action-bar-right {+.action-bar-tabs {display: flex;align-items: center;+ gap: 6px;+ flex: 1;+ justify-content: flex-end;}-.action-btn {+.tab-pill {display: flex;align-items: center;gap: 6px;padding: 8px 14px;- font-size: 13px;+ font-size: 12px;font-weight: 500;- color: #4B5563;- background: #FFFFFF;- border: 1px solid #E5E7EB;- border-radius: 6px;+ color: #6B7280;+ background: #F3F4F6;+ border: 1px solid transparent;+ border-radius: 20px;cursor: pointer;transition: all 0.2s ease;white-space: nowrap;}-.action-btn:hover {- background: #F9FAFB;- border-color: #D1D5DB;+.tab-pill:hover {+ background: #E5E7EB;+ color: #374151;}-.action-btn.active {+.tab-pill.active {background: #1F2937;color: #FFFFFF;- border-color: #1F2937;+ box-shadow: 0 2px 8px rgba(31, 41, 55, 0.15);}-.action-btn svg {+.tab-pill svg {flex-shrink: 0;+ opacity: 0.7;}-.survey-btn {- background: #F0FDF4;- border-color: #86EFAC;- color: #166534;+.tab-pill.active svg {+ opacity: 1;}-.survey-btn:hover {- background: #DCFCE7;- border-color: #4ADE80;+.tab-divider {+ width: 1px;+ height: 24px;+ background: #E5E7EB;+ margin: 0 6px;+}++.agent-pill {+ min-width: 120px;+ justify-content: space-between;+}++.survey-pill {+ background: #ECFDF5;+ color: #047857;+}++.survey-pill:hover {+ background: #D1FAE5;+ color: #065F46;}-.survey-btn.active {- background: #166534;+.survey-pill.active {+ background: #047857;color: #FFFFFF;- border-color: #166534;+ box-shadow: 0 2px 8px rgba(4, 120, 87, 0.2);}/* Interaction Header */@@ -1379,14 +1424,10 @@ watch(() => props.simulationId, (newId) => {position: relative;}-.agent-option {- min-width: 180px;- justify-content: flex-start;-}-.dropdown-arrow {- margin-left: auto;+ margin-left: 4px;transition: transform 0.2s ease;+ opacity: 0.6;}.dropdown-arrow.open {@@ -1395,30 +1436,50 @@ watch(() => props.simulationId, (newId) => {.dropdown-menu {position: absolute;- top: 100%;- left: 0;- right: 0;- margin-top: 4px;+ top: calc(100% + 6px);+ left: 50%;+ transform: translateX(-50%);+ min-width: 240px;background: #FFFFFF;border: 1px solid #E5E7EB;- border-radius: 8px;- box-shadow: 0 10px 40px rgba(0, 0, 0, 0.1);- max-height: 300px;+ border-radius: 12px;+ box-shadow: 0 12px 40px rgba(0, 0, 0, 0.12), 0 4px 12px rgba(0, 0, 0, 0.06);+ max-height: 320px;overflow-y: auto;z-index: 100;}+.dropdown-header {+ padding: 12px 16px 8px;+ font-size: 11px;+ font-weight: 600;+ color: #9CA3AF;+ text-transform: uppercase;+ letter-spacing: 0.05em;+ border-bottom: 1px solid #F3F4F6;+}+.dropdown-item {display: flex;align-items: center;gap: 12px;- padding: 12px 16px;+ padding: 10px 16px;cursor: pointer;- transition: background 0.15s ease;+ transition: all 0.15s ease;+ border-left: 3px solid transparent;}.dropdown-item:hover {background: #F9FAFB;+ border-left-color: #1F2937;+}++.dropdown-item:first-of-type {+ margin-top: 4px;+}++.dropdown-item:last-child {+ margin-bottom: 4px;}.agent-avatar {@@ -1426,32 +1487,41 @@ watch(() => props.simulationId, (newId) => {height: 32px;min-width: 32px;min-height: 32px;- background: #1F2937;+ background: linear-gradient(135deg, #1F2937 0%, #374151 100%);color: #FFFFFF;border-radius: 50%;display: flex;align-items: center;justify-content: center;- font-size: 13px;+ font-size: 12px;font-weight: 600;flex-shrink: 0;+ box-shadow: 0 2px 4px rgba(31, 41, 55, 0.1);}.agent-info {display: flex;flex-direction: column;gap: 2px;+ flex: 1;+ min-width: 0;}.agent-name {font-size: 13px;font-weight: 600;color: #1F2937;+ white-space: nowrap;+ overflow: hidden;+ text-overflow: ellipsis;}.agent-role {font-size: 11px;color: #9CA3AF;+ white-space: nowrap;+ overflow: hidden;+ text-overflow: ellipsis;}/* Chat Messages */