Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
32 changes: 20 additions & 12 deletions ui/frontend/main.js
Original file line number Diff line number Diff line change
Expand Up @@ -1425,21 +1425,29 @@ function renderChatHistory() {
</div>

<div class="suggestion-chips">
<button class="chip-btn" onclick="setQuickPrompt('Summarize this document')">
<span class="chip-icon">📝</span>
<span>Research</span>
<button class="chip-btn chip-analysis" onclick="setQuickPrompt('结合多篇史料,深度分析北宋初期‘杯酒释兵权’对中后期冗兵冗费问题的潜在影响。')">
<span class="chip-icon">
<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><path d="M14.5 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V7.5L14.5 2z"></path><polyline points="14 2 14 8 20 8"></polyline><line x1="16" y1="13" x2="8" y2="13"></line><line x1="16" y1="17" x2="8" y2="17"></line><line x1="10" y1="9" x2="8" y2="9"></line></svg>
</span>
<span>Analysis</span>
</button>
<button class="chip-btn" onclick="setQuickPrompt('Write a Python script for RAG')">
<span class="chip-icon">💻</span>
<span>Write Code</span>
<button class="chip-btn chip-explain" onclick="setQuickPrompt('请结合数学推导,详细拆解 PPO 算法中 Clipping Loss 的设计初衷及其公式含义。')">
<span class="chip-icon">
<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><path d="M15 14c.2-1 .7-1.7 1.5-2.5 1-.9 1.5-2.2 1.5-3.5A5 5 0 0 0 8 8c0 1.3.5 2.6 1.5 3.5.8.8 1.3 1.5 1.5 2.5"></path><path d="M9 18h6"></path><path d="M10 22h4"></path></svg>
</span>
<span>Explain</span>
</button>
<button class="chip-btn" onclick="setQuickPrompt('Explain quantum computing')">
<span class="chip-icon">💡</span>
<span>Learn Concept</span>
<button class="chip-btn chip-implement" onclick="setQuickPrompt('参考我上传的项目文档,快速搭建一个支持流式响应的 ChatGPT 风格聊天 Demo。')">
<span class="chip-icon">
<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><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>
<span>Implement</span>
</button>
<button class="chip-btn" onclick="setQuickPrompt('Brainstorm marketing ideas')">
<span class="chip-icon">🤯</span>
<span>Brainstorm</span>
<button class="chip-btn chip-insights" onclick="setQuickPrompt('对比最近的相关论文,挖掘多模态领域尚未被充分讨论的科研空白点与潜在机会。')">
<span class="chip-icon">
<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><path d="M6 3h12l4 6-10 12L2 9z"></path><path d="M11 3 8 9l3 12"></path><path d="M13 3l3 6-3 12"></path><path d="M2 9h20"></path></svg>
</span>
<span>Insights</span>
</button>
</div>
</div>
Expand Down
35 changes: 27 additions & 8 deletions ui/frontend/style.css
Original file line number Diff line number Diff line change
Expand Up @@ -1490,26 +1490,45 @@ body {
display: flex;
align-items: center;
gap: 8px;
background: #f0f4f9; /* 极浅的蓝灰色背景 */
border: none;
border-radius: 16px; /* 稍微大一点的圆角 */
background: #f0f4f9;
border: 1px solid transparent;
border-radius: 16px;
padding: 12px 20px;
font-size: 0.95rem;
color: #1f1f1f;
cursor: pointer;
transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
font-weight: 500;
}

/* 分类配色 (更淡、更简约的灰调配色) */
.chip-analysis { background-color: #f8f7ff !important; color: #6e6b7b !important; }
.chip-analysis:hover { background-color: #f0eeff !important; border-color: #d9d6fe; }

.chip-explain { background-color: #f1f8fe !important; color: #5d707a !important; }
.chip-explain:hover { background-color: #e2f1fd !important; border-color: #badcfb; }

.chip-implement { background-color: #f2f9f6 !important; color: #5c726b !important; }
.chip-implement:hover { background-color: #e3f3ed !important; border-color: #b7e3d1; }

.chip-insights { background-color: #f9f5f8 !important; color: #7a6673 !important; }
.chip-insights:hover { background-color: #f4e9f1 !important; border-color: #e9cadf; }

.chip-btn:hover {
background: #e2e7eb; /* 悬停加深 */
transform: translateY(-2px);
box-shadow: 0 2px 8px rgba(0,0,0,0.05);
box-shadow: 0 4px 12px rgba(0,0,0,0.08);
}

.chip-icon {
font-size: 1.1rem;
filter: grayscale(0.2);
display: flex;
align-items: center;
justify-content: center;
color: inherit;
}

.chip-icon svg {
width: 1.2rem;
height: 1.2rem;
}

/* 移动端适配:字体改小 */
Expand Down