Skip to content

Open-source LLM knowledge platform: turn raw documents into a queryable RAG, an autonomous reasoning agent, and a self-maintaining Wiki.

feat: Enhance loading indicators and improve UI consistency across chat components

wizardchen83ea26228677
diff --git a/frontend/src/views/chat/components/AgentStreamDisplay.vue b/frontend/src/views/chat/components/AgentStreamDisplay.vue
index 1ecc9aaf7..12eb68f17 100644
--- a/frontend/src/views/chat/components/AgentStreamDisplay.vue
+++ b/frontend/src/views/chat/components/AgentStreamDisplay.vue
@@ -16,7 +16,7 @@
<!-- Event Stream -->
<template v-for="(event, index) in displayEvents" :key="getEventKey(event, index)">
- <div v-if="event && event.type" class="event-item" :data-event-index="index">
+ <div v-if="event && event.type" class="event-item" :data-event-index="index" :class="{ 'event-last': index === displayEvents.length - 1 }">
<!-- Plan Task Change Event -->
<div v-if="event.type === 'plan_task_change'" class="plan-task-change-event">
@@ -163,7 +163,20 @@
<!-- Loading Indicator -->
<div v-if="!isConversationDone && eventStream.length > 0" class="loading-indicator">
- <img class="botanswer_loading_gif" src="@/assets/img/botanswer_loading.gif" alt="Processing...">
+ <!-- 方案1: 三个跳动的圆点 -->
+ <!-- <div class="loading-dots">
+ <span></span>
+ <span></span>
+ <span></span>
+ </div> -->
+
+ <!-- 方案4: 打字机效果(注释掉,可替换使用) -->
+ <div class="loading-typing">
+ <span></span>
+ <span></span>
+ <span></span>
+ </div>
+
</div>
</div>
<!-- 全局浮层:统一承载 Web/KB 的 hover 内容 -->
@@ -1465,32 +1478,130 @@ const handleAddToKnowledge = (answerEvent: any) => {
.agent-stream-display {
display: flex;
flex-direction: column;
- gap: 8px;
+ gap: 0;
+ margin-bottom: 10px;
+ position: relative;
+}
+
+// 时间轴连线容器
+.event-item {
+ position: relative;
+ padding-left: 28px;
margin-bottom: 12px;
+
+ // 时间轴垂直线
+ &::before {
+ content: '';
+ position: absolute;
+ left: 8px;
+ top: 0;
+ bottom: -12px;
+ width: 2px;
+ background: linear-gradient(to bottom, #e5e7eb 0%, #e5e7eb 100%);
+ z-index: 0;
+ }
+
+ // 第一个事件的连线从节点开始
+ &:first-child::before {
+ top: 12px;
+ }
+
+ // 最后一个事件不显示底部连线
+ &.event-last::before {
+ bottom: auto;
+ height: 20px;
+ }
+
+ // 时间轴节点(圆点)
+ &::after {
+ content: '';
+ position: absolute;
+ left: 4px;
+ top: 12px;
+ width: 10px;
+ height: 10px;
+ border-radius: 50%;
+ background: #ffffff;
+ border: 2px solid #e5e7eb;
+ z-index: 1;
+ transition: all 0.2s ease;
+ }
+
+ // 不同事件类型的节点颜色
+ &:has(.thinking-event)::after {
+ border-color: #9ca3af;
+ background: #f9fafb;
+ }
+
+ &:has(.answer-event)::after {
+ border-color: #07c05f;
+ background: #07c05f;
+ box-shadow: 0 0 0 3px rgba(7, 192, 95, 0.15);
+ }
+
+ &:has(.tool-event)::after {
+ border-color: #07c05f;
+ background: #ffffff;
+ }
+
+ &:has(.tool-event .action-pending)::after {
+ border-color: #07c05f;
+ background: rgba(7, 192, 95, 0.2);
+ animation: pulseNode 2s ease-in-out infinite;
+ }
+
+ &:has(.tool-event .action-error)::after {
+ border-color: #e34d59;
+ background: #e34d59;
+ }
+
+ &:has(.plan-task-change-event)::after {
+ border-color: #07c05f;
+ background: #07c05f;
+ transform: rotate(45deg);
+ border-radius: 2px;
+ }
}
.intermediate-steps-collapsed {
display: flex;
flex-direction: column;
- font-size: 14px;
+ font-size: 13px;
width: 100%;
- border-radius: 8px;
+ border-radius: 6px;
background-color: #ffffff;
- border-left: 3px solid #07c05f;
- box-shadow: 0 2px 4px rgba(7, 192, 95, 0.08);
+ border: 1px solid #e5e7eb;
+ box-shadow: 0 1px 3px rgba(7, 192, 95, 0.06);
overflow: hidden;
box-sizing: border-box;
- transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
- margin-bottom: 8px;
+ transition: all 0.2s ease;
+ margin-bottom: 16px;
+ position: relative;
+
+ // 添加时间轴起点标记
+ &::before {
+ content: '';
+ position: absolute;
+ left: -20px;
+ top: 12px;
+ width: 10px;
+ height: 10px;
+ border-radius: 50%;
+ background: #07c05f;
+ border: 2px solid #ffffff;
+ box-shadow: 0 0 0 2px #07c05f, 0 0 0 4px rgba(7, 192, 95, 0.1);
+ z-index: 2;
+ }
.intermediate-steps-header {
display: flex;
justify-content: space-between;
align-items: center;
- padding: 10px 14px;
- color: #333333;
+ padding: 8px 12px;
+ color: #374151;
font-weight: 500;
cursor: pointer;
+ background: linear-gradient(to right, rgba(7, 192, 95, 0.03), transparent);
}
.intermediate-steps-title {
@@ -1498,14 +1609,14 @@ const handleAddToKnowledge = (answerEvent: any) => {
align-items: center;
img {
- width: 16px;
- height: 16px;
- margin-right: 8px;
+ width: 14px;
+ height: 14px;
+ margin-right: 7px;
}
span {
white-space: nowrap;
- font-size: 14px;
+ font-size: 13px;
:deep(strong) {
color: #07c05f;
@@ -1515,72 +1626,70 @@ const handleAddToKnowledge = (answerEvent: any) => {
}
.intermediate-steps-show-icon {
- font-size: 14px;
+ font-size: 13px;
padding: 0 2px 1px 2px;
color: #07c05f;
}
.intermediate-steps-header:hover {
- background-color: rgba(7, 192, 95, 0.04);
+ background: linear-gradient(to right, rgba(7, 192, 95, 0.05), rgba(7, 192, 95, 0.01));
}
}
-.event-item {
- margin-bottom: 0;
-}
-
// Thinking Event
.thinking-event {
- animation: fadeInUp 0.3s ease-out;
+ animation: fadeInUp 0.25s ease-out;
+ min-height: 20px;
.thinking-phase {
background: #ffffff;
- border-radius: 8px;
- padding: 1px 14px;
- // 默认不显示 border-left
- border-left: 3px solid transparent;
- box-shadow: 0 1px 2px rgba(0, 0, 0, 0.04);
- transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
+ border-radius: 6px;
+ padding: 8px 12px;
+ border: 1px solid #e5e7eb;
+ box-shadow: 0 1px 2px rgba(0, 0, 0, 0.03);
+ transition: all 0.2s ease;
- // 只有最后一个 thinking 显示绿色 border-left
&.thinking-last {
- border-left-color: #07c05f;
- box-shadow: 0 2px 4px rgba(7, 192, 95, 0.08);
+ border-color: #07c05f;
+ box-shadow: 0 1px 3px rgba(7, 192, 95, 0.06);
+
+ // 最后一个 Thinking 作为最终答案时,字体应该更大
+ .thinking-content {
+ font-size: 14px;
+ }
}
- // 进行中的 thinking(实时对话)显示绿色 border-left 和动画
&.thinking-active {
- border-left-color: #07c05f;
- box-shadow: 0 2px 4px rgba(7, 192, 95, 0.08);
- animation: pulseBorder 2s ease-in-out infinite;
+ border-color: #07c05f;
+ box-shadow: 0 1px 3px rgba(7, 192, 95, 0.06);
}
}
.thinking-content {
- font-size: 14px;
- color: #333333;
+ font-size: 13px;
+ color: #374151;
line-height: 1.6;
&.markdown-content {
:deep(p) {
- margin: 8px 0;
+ margin: 6px 0;
line-height: 1.6;
}
:deep(code) {
- background: #f0f0f0;
- padding: 2px 6px;
+ background: #f3f4f6;
+ padding: 2px 5px;
border-radius: 3px;
- font-family: 'Monaco', 'Courier New', monospace;
- font-size: 12px;
+ font-family: 'Monaco', 'Menlo', 'Courier New', monospace;
+ font-size: 11px;
}
:deep(pre) {
- background: #f5f5f5;
- padding: 12px;
+ background: #f9fafb;
+ padding: 10px;
border-radius: 4px;
overflow-x: auto;
- margin: 8px 0;
+ margin: 6px 0;
code {
background: none;
@@ -1589,25 +1698,25 @@ const handleAddToKnowledge = (answerEvent: any) => {
}
:deep(ul), :deep(ol) {
- margin: 8px 0;
- padding-left: 24px;
+ margin: 6px 0;
+ padding-left: 20px;
}
:deep(li) {
- margin: 4px 0;
+ margin: 3px 0;
}
:deep(blockquote) {
- border-left: 3px solid #07c05f;
- padding-left: 12px;
- margin: 8px 0;
- color: #666;
+ border-left: 2px solid #07c05f;
+ padding-left: 10px;
+ margin: 6px 0;
+ color: #6b7280;
}
:deep(h1), :deep(h2), :deep(h3), :deep(h4), :deep(h5), :deep(h6) {
- margin: 12px 0 8px 0;
+ margin: 10px 0 6px 0;
font-weight: 600;
- color: #333;
+ color: #374151;
}
:deep(a) {
@@ -1621,16 +1730,16 @@ const handleAddToKnowledge = (answerEvent: any) => {
:deep(table) {
border-collapse: collapse;
- margin: 8px 0;
- font-size: 12px;
+ margin: 6px 0;
+ font-size: 11px;
th, td {
border: 1px solid #e5e7eb;
- padding: 6px 10px;
+ padding: 5px 8px;
}
th {
- background: #f5f5f5;
+ background: #f9fafb;
font-weight: 600;
}
}
@@ -1640,30 +1749,29 @@ const handleAddToKnowledge = (answerEvent: any) => {
// Answer Event - 类似 thinking 但有独特样式
.answer-event {
- animation: fadeInUp 0.3s ease-out;
+ animation: fadeInUp 0.25s ease-out;
+ min-height: 20px;
.answer-content-wrapper {
background: #ffffff;
- border-radius: 8px;
- padding: 1px 14px;
- border-left: 3px solid #07c05f;
- box-shadow: 0 2px 4px rgba(7, 192, 95, 0.08);
- transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
+ border-radius: 6px;
+ padding: 8px 12px;
+ border: 1px solid #07c05f;
+ box-shadow: 0 1px 3px rgba(7, 192, 95, 0.06);
+ transition: all 0.2s ease;
- // 进行中的 answer 显示动画
&.answer-active {
- animation: pulseBorder 2s ease-in-out infinite;
+ background: linear-gradient(to right, rgba(7, 192, 95, 0.02), #ffffff);
}
- // 完成的 answer 保持绿色边框
&.answer-done {
- border-left-color: #07c05f;
+ border-color: #07c05f;
}
}
.answer-content {
- font-size: 14px;
- color: #333333;
+ font-size: 13px;
+ color: #374151;
line-height: 1.6;
&.markdown-content {
@@ -1678,24 +1786,24 @@ const handleAddToKnowledge = (answerEvent: any) => {
/* KB citation styles are defined globally, no need to override here */
:deep(p) {
- margin: 8px 0;
+ margin: 6px 0;
line-height: 1.6;
}
:deep(code) {
- background: #f0f0f0;
- padding: 2px 6px;
+ background: #f3f4f6;
+ padding: 2px 5px;
border-radius: 3px;
- font-family: 'Monaco', 'Courier New', monospace;
- font-size: 12px;
+ font-family: 'Monaco', 'Menlo', 'Courier New', monospace;
+ font-size: 11px;
}
:deep(pre) {
- background: #f5f5f5;
- padding: 12px;
+ background: #f9fafb;
+ padding: 10px;
border-radius: 4px;
overflow-x: auto;
- margin: 8px 0;
+ margin: 6px 0;
code {
background: none;
@@ -1704,25 +1812,25 @@ const handleAddToKnowledge = (answerEvent: any) => {
}
:deep(ul), :deep(ol) {
- margin: 8px 0;
- padding-left: 24px;
+ margin: 6px 0;
+ padding-left: 20px;
}
:deep(li) {
- margin: 4px 0;
+ margin: 3px 0;
}
:deep(blockquote) {
- border-left: 3px solid #07c05f;
- padding-left: 12px;
- margin: 8px 0;
- color: #666;
+ border-left: 2px solid #07c05f;
+ padding-left: 10px;
+ margin: 6px 0;
+ color: #6b7280;
}
:deep(h1), :deep(h2), :deep(h3), :deep(h4), :deep(h5), :deep(h6) {
- margin: 12px 0 8px 0;
+ margin: 10px 0 6px 0;
font-weight: 600;
- color: #333;
+ color: #374151;
}
:deep(a) {
@@ -1736,16 +1844,16 @@ const handleAddToKnowledge = (answerEvent: any) => {
:deep(table) {
border-collapse: collapse;
- margin: 8px 0;
- font-size: 12px;
+ margin: 6px 0;
+ font-size: 11px;
th, td {
border: 1px solid #e5e7eb;
- padding: 6px 10px;
+ padding: 5px 8px;
}
th {
- background: #f5f5f5;
+ background: #f9fafb;
font-weight: 600;
}
}
@@ -1755,8 +1863,9 @@ const handleAddToKnowledge = (answerEvent: any) => {
.answer-toolbar {
display: flex;
justify-content: flex-start;
- gap: 8px;
- margin-top: 5px;
+ gap: 6px;
+ margin-top: 4px;
+ min-height: 32px;
:deep(.t-button) {
display: inline-flex;
@@ -1835,16 +1944,16 @@ const handleAddToKnowledge = (answerEvent: any) => {
// Tool Event
.tool-event {
- animation: fadeInUp 0.3s ease-out;
+ animation: fadeInUp 0.25s ease-out;
.action-card {
background: #ffffff;
- border-radius: 8px;
+ border-radius: 6px;
border: 1px solid #e5e7eb;
overflow: hidden;
position: relative;
- transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
- box-shadow: 0 1px 2px rgba(0, 0, 0, 0.04);
+ transition: all 0.2s ease;
+ box-shadow: 0 1px 2px rgba(0, 0, 0, 0.03);
> * {
position: relative;
@@ -1853,19 +1962,18 @@ const handleAddToKnowledge = (answerEvent: any) => {
&:hover {
border-color: #07c05f;
- box-shadow: 0 2px 8px rgba(7, 192, 95, 0.12);
- // transform: translateY(-1px);
+ box-shadow: 0 1px 4px rgba(7, 192, 95, 0.08);
}
&.action-error {
- border-left: 3px solid #e34d59;
+ border-left: 2px solid #e34d59;
animation: shakeError 0.4s ease-out;
}
&.action-pending {
opacity: 1;
box-shadow: none;
- border-color: rgba(7, 192, 95, 0.18);
+ border-color: rgba(7, 192, 95, 0.15);
background: linear-gradient(120deg, rgba(7, 192, 95, 0.01), rgba(255, 255, 255, 0.98));
&::after {
@@ -1876,7 +1984,7 @@ const handleAddToKnowledge = (answerEvent: any) => {
120deg,
rgba(255, 255, 255, 0) 0%,
rgba(255, 255, 255, 0.3) 40%,
- rgba(7, 192, 95, 0.06) 55%,
+ rgba(7, 192, 95, 0.05) 55%,
rgba(255, 255, 255, 0) 85%
);
transform: translateX(-100%);
@@ -1888,42 +1996,42 @@ const handleAddToKnowledge = (answerEvent: any) => {
}
.tool-summary {
- padding: 8px 14px;
- font-size: 13px;
- color: #333333;
+ padding: 6px 12px;
+ font-size: 12px;
+ color: #374151;
background: #ffffff;
- border-top: 1px solid #f0f0f0;
+ border-top: 1px solid #f3f4f6;
line-height: 1.6;
font-weight: 500;
- animation: slideIn 0.25s ease-out;
+ animation: slideIn 0.2s ease-out;
.tool-summary-markdown {
font-weight: 400;
line-height: 1.6;
- color: #333333;
+ color: #374151;
:deep(p) {
- margin: 4px 0;
- color: #333333;
+ margin: 3px 0;
+ color: #374151;
}
:deep(ul), :deep(ol) {
- margin: 4px 0;
- padding-left: 20px;
+ margin: 3px 0;
+ padding-left: 18px;
}
:deep(code) {
- background: #f5f5f5;
- padding: 2px 6px;
- border-radius: 4px;
- font-size: 12px;
+ background: #f9fafb;
+ padding: 2px 5px;
+ border-radius: 3px;
+ font-size: 11px;
color: #07c05f;
font-weight: 500;
}
:deep(strong) {
font-weight: 600;
- color: #333333;
+ color: #374151;
}
}
}
@@ -1933,42 +2041,40 @@ const handleAddToKnowledge = (answerEvent: any) => {
display: flex;
justify-content: space-between;
align-items: center;
- padding: 10px 14px;
- color: #333333;
+ padding: 8px 12px;
+ color: #374151;
font-weight: 500;
cursor: pointer;
user-select: none;
- transition: background-color 0.25s cubic-bezier(0.4, 0, 0.2, 1);
+ transition: background-color 0.15s ease;
&:hover {
- background-color: rgba(7, 192, 95, 0.04);
+ background-color: rgba(7, 192, 95, 0.03);
}
}
.action-title {
display: flex;
align-items: center;
- gap: 8px;
+ gap: 7px;
flex: 1;
- min-width: 0; // Allow flex item to shrink below content size
+ min-width: 0;
.action-title-icon {
- width: 16px;
- height: 16px;
+ width: 14px;
+ height: 14px;
color: #07c05f;
fill: currentColor;
flex-shrink: 0;
- // For t-icon component
:deep(svg) {
- width: 16px;
- height: 16px;
+ width: 14px;
+ height: 14px;
color: #07c05f;
fill: currentColor;
}
}
- // Tooltip wrapper should also allow shrinking
:deep(.t-tooltip) {
flex: 1;
min-width: 0;
@@ -1976,7 +2082,7 @@ const handleAddToKnowledge = (answerEvent: any) => {
.action-name {
white-space: nowrap;
- font-size: 14px;
+ font-size: 13px;
}
}
@@ -1984,7 +2090,7 @@ const handleAddToKnowledge = (answerEvent: any) => {
@keyframes fadeInUp {
from {
opacity: 0;
- transform: translateY(8px);
+ transform: translateY(6px);
}
to {
opacity: 1;
@@ -1995,7 +2101,7 @@ const handleAddToKnowledge = (answerEvent: any) => {
@keyframes slideInDown {
from {
opacity: 0;
- transform: translateY(-10px);
+ transform: translateY(-8px);
}
to {
opacity: 1;
@@ -2006,7 +2112,7 @@ const handleAddToKnowledge = (answerEvent: any) => {
@keyframes slideIn {
from {
opacity: 0;
- transform: translateX(-8px);
+ transform: translateX(-6px);
}
to {
opacity: 1;
@@ -2014,14 +2120,75 @@ const handleAddToKnowledge = (answerEvent: any) => {
}
}
+@keyframes pulseNode {
+ 0%, 100% {
+ border-color: #07c05f;
+ box-shadow: 0 0 0 0 rgba(7, 192, 95, 0.4);
+ }
+ 50% {
+ border-color: #0ae06f;
+ box-shadow: 0 0 0 4px rgba(7, 192, 95, 0.1);
+ }
+}
+
+// Loading 动画关键帧
+@keyframes dotBounce {
+ 0%, 80%, 100% {
+ transform: scale(1);
+ opacity: 0.6;
+ }
+ 40% {
+ transform: scale(1.3);
+ opacity: 1;
+ }
+}
+
+@keyframes spin {
+ 0% {
+ transform: rotate(0deg);
+ }
+ 100% {
+ transform: rotate(360deg);
+ }
+}
+
+@keyframes pulse {
+ 0%, 100% {
+ transform: scale(1);
+ opacity: 0.8;
+ }
+ 50% {
+ transform: scale(1.5);
+ opacity: 0.3;
+ }
+}
+
+@keyframes typingBounce {
+ 0%, 60%, 100% {
+ transform: translateY(0);
+ }
+ 30% {
+ transform: translateY(-8px);
+ }
+}
+
+@keyframes wave {
+ 0%, 40%, 100% {
+ transform: scaleY(0.4);
+ }
+ 20% {
+ transform: scaleY(1);
+ }
+}
+
@keyframes pulseBorder {
0%, 100% {
border-left-color: #07c05f;
- box-shadow: 0 2px 4px rgba(7, 192, 95, 0.08);
+ box-shadow: 0 1px 3px rgba(7, 192, 95, 0.06);
}
50% {
border-left-color: #0ae06f;
- box-shadow: 0 2px 6px rgba(7, 192, 95, 0.15);
+ box-shadow: 0 1px 4px rgba(7, 192, 95, 0.12);
}
}
@@ -2030,10 +2197,10 @@ const handleAddToKnowledge = (answerEvent: any) => {
transform: translateX(0);
}
10%, 30%, 50%, 70%, 90% {
- transform: translateX(-3px);
+ transform: translateX(-2px);
}
20%, 40%, 60%, 80% {
- transform: translateX(3px);
+ transform: translateX(2px);
}
}
@@ -2050,9 +2217,9 @@ const handleAddToKnowledge = (answerEvent: any) => {
}
.action-name {
- font-size: 14px;
+ font-size: 13px;
font-weight: 500;
- color: #333;
+ color: #374151;
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
@@ -2062,14 +2229,14 @@ const handleAddToKnowledge = (answerEvent: any) => {
}
.action-show-icon {
- font-size: 14px;
+ font-size: 13px;
padding: 0 2px 1px 2px;
color: #07c05f;
}
.action-details {
padding: 0;
- border-top: 1px solid #f0f0f0;
+ border-top: 1px solid #f3f4f6;
background: #ffffff;
display: flex;
flex-direction: column;
@@ -2080,17 +2247,16 @@ const handleAddToKnowledge = (answerEvent: any) => {
}
.search-results-summary-fixed {
- padding: 8px 12px;
- background: #f8f9fa;
- border-top: 1px solid #e7e7e7;
+ padding: 6px 10px;
+ background: #f9fafb;
+ border-top: 1px solid #e5e7eb;
.results-summary-text {
- font-size: 13px;
+ font-size: 12px;
font-weight: 500;
- color: #333;
+ color: #374151;
line-height: 1.5;
- // Use :deep() to apply styles to v-html content
:deep(strong) {
color: #07c05f;
font-weight: 600;
@@ -2099,14 +2265,14 @@ const handleAddToKnowledge = (answerEvent: any) => {
}
.plan-status-summary-fixed {
- padding: 8px 12px;
- background: #f8f9fa;
- border-top: 1px solid #e7e7e7;
+ padding: 6px 10px;
+ background: #f9fafb;
+ border-top: 1px solid #e5e7eb;
.plan-status-text {
- font-size: 13px;
+ font-size: 12px;
font-weight: 500;
- color: #333;
+ color: #374151;
line-height: 1.5;
display: flex;
align-items: center;
@@ -2153,39 +2319,39 @@ const handleAddToKnowledge = (answerEvent: any) => {
}
.plan-task-change-event {
- margin-bottom: 8px;
+ min-height: 20px;
.plan-task-change-card {
padding: 8px 12px;
- background: #f8f9fa;
- border-radius: 4px;
- border-left: 3px solid #07C05F;
- font-size: 13px;
- color: #333;
+ background: linear-gradient(135deg, rgba(7, 192, 95, 0.05), rgba(7, 192, 95, 0.02));
+ border-radius: 6px;
+ border: 1px solid rgba(7, 192, 95, 0.2);
+ font-size: 12px;
+ color: #374151;
.plan-task-change-content {
strong {
- color: #333;
+ color: #07c05f;
font-weight: 600;
- margin-right: 4px;
+ margin-right: 3px;
}
}
}
}
.tool-output-wrapper {
- margin: 12px 0;
- padding: 0 10px;
+ margin: 10px 0;
+ padding: 0 8px;
.fallback-header {
display: flex;
align-items: center;
- margin-bottom: 10px;
+ margin-bottom: 8px;
padding: 0 4px;
.fallback-label {
- font-size: 12px;
- color: #666;
+ font-size: 11px;
+ color: #6b7280;
font-weight: 500;
line-height: 1.5;
}
@@ -2193,7 +2359,7 @@ const handleAddToKnowledge = (answerEvent: any) => {
.detail-output-wrapper {
position: relative;
- background: #fafafa;
+ background: #f9fafb;
border: 1px solid #e5e7eb;
border-radius: 6px;
overflow: hidden;
@@ -2202,9 +2368,9 @@ const handleAddToKnowledge = (answerEvent: any) => {
.detail-output {
font-family: 'Monaco', 'Menlo', 'Ubuntu Mono', 'Consolas', 'Courier New', monospace;
- font-size: 12px;
- color: #333;
- padding: 16px;
+ font-size: 11px;
+ color: #374151;
+ padding: 12px;
margin: 0;
white-space: pre-wrap;
word-break: break-word;
@@ -2215,20 +2381,19 @@ const handleAddToKnowledge = (answerEvent: any) => {
background: #ffffff;
display: block;
- // 滚动条样式
&::-webkit-scrollbar {
- width: 8px;
- height: 8px;
+ width: 6px;
+ height: 6px;
}
&::-webkit-scrollbar-track {
- background: #f5f5f5;
- border-radius: 4px;
+ background: #f9fafb;
+ border-radius: 3px;
}
&::-webkit-scrollbar-thumb {
background: #d1d5db;
- border-radius: 4px;
+ border-radius: 3px;
&:hover {
background: #9ca3af;
@@ -2239,18 +2404,18 @@ const handleAddToKnowledge = (answerEvent: any) => {
}
.thinking-thought-content {
- padding: 8px 12px;
+ padding: 6px 10px;
.thinking-thought-markdown {
- font-size: 14px;
- color: #333333;
+ font-size: 13px;
+ color: #374151;
line-height: 1.6;
:deep(p) {
- margin: 6px 0;
+ margin: 5px 0;
line-height: 1.6;
- font-size: 14px;
- color: #333333;
+ font-size: 13px;
+ color: #374151;
&:first-child {
margin-top: 0;
@@ -2262,20 +2427,20 @@ const handleAddToKnowledge = (answerEvent: any) => {
}
:deep(code) {
- background: #f0f0f0;
- padding: 2px 6px;
+ background: #f3f4f6;
+ padding: 2px 5px;
border-radius: 3px;
- font-family: 'Monaco', 'Courier New', monospace;
- font-size: 12px;
- color: #333;
+ font-family: 'Monaco', 'Menlo', 'Courier New', monospace;
+ font-size: 11px;
+ color: #374151;
}
:deep(pre) {
- background: #f5f5f5;
+ background: #f9fafb;
padding: 8px;
border-radius: 4px;
overflow-x: auto;
- margin: 6px 0;
+ margin: 5px 0;
code {
background: none;
@@ -2529,10 +2694,101 @@ const handleAddToKnowledge = (answerEvent: any) => {
.loading-indicator {
display: flex;
align-items: center;
- padding: 8px 0;
- margin-top: 8px;
+ padding: 12px 0;
+ margin-top: 0;
+ padding-left: 28px;
+ position: relative;
animation: fadeInUp 0.3s ease-out;
+ // 方案1: 三个跳动的圆点
+ .loading-dots {
+ display: flex;
+ align-items: center;
+ gap: 6px;
+
+ span {
+ width: 8px;
+ height: 8px;
+ border-radius: 50%;
+ background: #07c05f;
+ animation: dotBounce 1.4s ease-in-out infinite;
+
+ &:nth-child(1) {
+ animation-delay: -0.32s;
+ }
+
+ &:nth-child(2) {
+ animation-delay: -0.16s;
+ }
+
+ &:nth-child(3) {
+ animation-delay: 0s;
+ }
+ }
+ }
+
+ // 打字机效果
+ .loading-typing {
+ display: flex;
+ align-items: center;
+ gap: 4px;
+
+ span {
+ width: 6px;
+ height: 6px;
+ border-radius: 50%;
+ background: #07c05f;
+ animation: typingBounce 1.4s ease-in-out infinite;
+
+ &:nth-child(1) {
+ animation-delay: 0s;
+ }
+
+ &:nth-child(2) {
+ animation-delay: 0.2s;
+ }
+
+ &:nth-child(3) {
+ animation-delay: 0.4s;
+ }
+ }
+ }
+
+ // 方案5: 波浪线
+ .loading-wave {
+ display: flex;
+ align-items: center;
+ gap: 3px;
+
+ span {
+ width: 3px;
+ height: 16px;
+ background: #07c05f;
+ border-radius: 2px;
+ animation: wave 1.2s ease-in-out infinite;
+
+ &:nth-child(1) {
+ animation-delay: 0s;
+ }
+
+ &:nth-child(2) {
+ animation-delay: 0.1s;
+ }
+
+ &:nth-child(3) {
+ animation-delay: 0.2s;
+ }
+
+ &:nth-child(4) {
+ animation-delay: 0.3s;
+ }
+
+ &:nth-child(5) {
+ animation-delay: 0.4s;
+ }
+ }
+ }
+
.botanswer_loading_gif {
width: 24px;
height: 18px;
diff --git a/frontend/src/views/chat/components/ToolResultRenderer.vue b/frontend/src/views/chat/components/ToolResultRenderer.vue
index feed7d1a1..ab6ca2c37 100644
--- a/frontend/src/views/chat/components/ToolResultRenderer.vue
+++ b/frontend/src/views/chat/components/ToolResultRenderer.vue
@@ -125,7 +125,7 @@ const toolArguments = computed(() => props.arguments || {});
<style lang="less" scoped>
.tool-result-renderer {
- margin: 8px 0;
+ margin: 0;
}
.fallback-output {
diff --git a/frontend/src/views/chat/components/botmsg.vue b/frontend/src/views/chat/components/botmsg.vue
index 29eaf3960..e9e34e6a7 100644
--- a/frontend/src/views/chat/components/botmsg.vue
+++ b/frontend/src/views/chat/components/botmsg.vue
@@ -7,9 +7,14 @@
</div>
<!-- 非 Agent 模式下才显示传统的 markdown 渲染 -->
<div ref="parentMd" v-if="!session.hideContent && !session.isAgentMode">
- <!-- 消息正在总结中则渲染加载gif -->
- <img v-if="session.thinking" class="botanswer_laoding_gif" src="@/assets/img/botanswer_loading.gif"
- :alt="$t('chat.summaryInProgress')">
+ <!-- 消息正在总结中则渲染加载动画 -->
+ <div v-if="session.thinking" class="thinking-loading">
+ <div class="loading-typing">
+ <span></span>
+ <span></span>
+ <span></span>
+ </div>
+ </div>
<!-- 直接渲染完整内容,避免切分导致的问题,样式与 thinking 一致 -->
<div class="content-wrapper">
<div class="ai-markdown-template markdown-content" v-html="processMarkdown(content || session.content)"></div>
@@ -339,6 +344,46 @@ onMounted(async () => {
margin-left: 16px;
}
+.thinking-loading {
+ margin-left: 16px;
+ margin-bottom: 8px;
+}
+
+.loading-typing {
+ display: flex;
+ align-items: center;
+ gap: 4px;
+
+ span {
+ width: 6px;
+ height: 6px;
+ border-radius: 50%;
+ background: #07c05f;
+ animation: typingBounce 1.4s ease-in-out infinite;
+
+ &:nth-child(1) {
+ animation-delay: 0s;
+ }
+
+ &:nth-child(2) {
+ animation-delay: 0.2s;
+ }
+
+ &:nth-child(3) {
+ animation-delay: 0.4s;
+ }
+ }
+}
+
+@keyframes typingBounce {
+ 0%, 60%, 100% {
+ transform: translateY(0);
+ }
+ 30% {
+ transform: translateY(-8px);
+ }
+}
+
.img_loading {
background: #3032360f;
height: 230px;
diff --git a/frontend/src/views/chat/components/tool-results/DocumentInfo.vue b/frontend/src/views/chat/components/tool-results/DocumentInfo.vue
index 30ae4a623..43e6a66de 100644
--- a/frontend/src/views/chat/components/tool-results/DocumentInfo.vue
+++ b/frontend/src/views/chat/components/tool-results/DocumentInfo.vue
@@ -127,61 +127,29 @@ const formatMetadataValue = (value: unknown) => {
.document-info {
display: flex;
flex-direction: column;
- gap: 12px;
-}
-
-.document-summary {
- .summary-main {
- display: flex;
- justify-content: space-between;
- align-items: center;
- gap: 12px;
- }
-
- .summary-label {
- font-size: 13px;
- font-weight: 600;
- color: #333;
- }
-
- .summary-value {
- font-size: 13px;
- color: #555;
- }
-
- .summary-meta {
- margin-top: 8px;
- display: flex;
- flex-wrap: wrap;
- gap: 6px;
- }
-
- .summary-errors {
- margin-top: 10px;
- padding-top: 10px;
- border-top: 1px solid @card-border;
- }
+ gap: 8px;
}
.meta-chip {
- font-size: 12px;
- color: #555;
- background: #ffffff;
+ font-size: 11px;
+ color: #6b7280;
+ background: #f9fafb;
border: 1px solid @card-border;
- border-radius: 12px;
- padding: 2px 10px;
- line-height: 1.6;
+ border-radius: 10px;
+ padding: 2px 8px;
+ line-height: 1.5;
white-space: nowrap;
}
.documents-list {
display: flex;
flex-direction: column;
- gap: 10px;
+ gap: 8px;
}
.document-card {
- margin: 0 10px 10px 10px;
+ margin: 0 8px 8px 8px;
+
.document-header {
align-items: center;
}
@@ -192,24 +160,24 @@ const formatMetadataValue = (value: unknown) => {
}
.doc-title {
- font-size: 14px;
+ font-size: 13px;
font-weight: 500;
- color: #222;
+ color: #374151;
}
.status-pill {
- font-size: 12px;
+ font-size: 11px;
color: #07c05f;
- border: 1px solid rgba(7, 192, 95, 0.5);
- border-radius: 12px;
- padding: 2px 10px;
+ border: 1px solid rgba(7, 192, 95, 0.3);
+ border-radius: 10px;
+ padding: 2px 8px;
line-height: 1.4;
}
}
.info-section {
margin-top: 0;
- padding: 8px 0;
+ padding: 6px 0;
&:first-of-type {
padding-top: 4px;
@@ -218,66 +186,71 @@ const formatMetadataValue = (value: unknown) => {
.info-field {
display: flex;
- gap: 12px;
- margin-bottom: 6px;
- font-size: 13px;
+ gap: 10px;
+ margin-bottom: 5px;
+ font-size: 12px;
+ line-height: 1.5;
.field-label {
- color: #8b8b8b;
- min-width: 100px;
- font-weight: 600;
+ color: #6b7280;
+ min-width: 90px;
+ font-weight: 500;
}
.field-value {
flex: 1;
- color: #333;
+ color: #374151;
line-height: 1.5;
}
}
.metadata-section {
- padding-top: 12px;
+ padding-top: 10px;
border-top: 1px dashed @card-border;
}
.metadata-list {
list-style: none;
- margin: 6px 0 0;
+ margin: 4px 0 0;
padding: 0;
display: flex;
flex-direction: column;
- gap: 4px;
+ gap: 3px;
li {
- font-size: 12px;
- color: #333;
+ font-size: 11px;
+ color: #374151;
+ line-height: 1.5;
}
.metadata-key {
font-weight: 600;
margin-right: 4px;
+ color: #6b7280;
}
.metadata-value {
- font-family: 'Monaco', 'Courier New', monospace;
+ font-family: 'Monaco', 'Menlo', 'Courier New', monospace;
+ color: #374151;
}
}
.empty-state {
- font-size: 13px;
- color: #666;
+ font-size: 12px;
+ color: #9ca3af;
text-align: center;
- padding: 16px;
+ padding: 14px;
border: 1px dashed @card-border;
border-radius: @card-radius;
- background: #fff;
+ background: #f9fafb;
}
code {
- font-family: 'Monaco', 'Courier New', monospace;
- font-size: 11px;
- background: #f0f0f0;
+ font-family: 'Monaco', 'Menlo', 'Courier New', monospace;
+ font-size: 10px;
+ background: #f3f4f6;
padding: 2px 4px;
- border-radius: 3px;
+ border-radius: 2px;
+ color: #374151;
}
</style>
diff --git a/frontend/src/views/chat/components/tool-results/PlanDisplay.vue b/frontend/src/views/chat/components/tool-results/PlanDisplay.vue
index c7dde962e..1a65725f3 100644
--- a/frontend/src/views/chat/components/tool-results/PlanDisplay.vue
+++ b/frontend/src/views/chat/components/tool-results/PlanDisplay.vue
@@ -36,10 +36,10 @@ const props = defineProps<Props>();
<style lang="less" scoped>
.plan-display {
- font-size: 13px;
- color: #666;
+ font-size: 12px;
+ color: #6b7280;
background: transparent;
- padding: 8px 0 8px 12px;
+ padding: 6px 0 6px 12px;
margin: 0;
border: none !important;
box-shadow: none !important;
@@ -49,15 +49,15 @@ const props = defineProps<Props>();
.plan-steps {
display: flex;
flex-direction: column;
- gap: 4px;
+ gap: 3px;
}
.step-item {
display: flex;
align-items: flex-start;
- gap: 8px;
- padding: 2px 0;
- transition: all 0.2s;
+ gap: 7px;
+ padding: 1px 0;
+ transition: all 0.15s;
&:last-child {
margin-bottom: 0;
@@ -65,7 +65,7 @@ const props = defineProps<Props>();
&.status-in_progress {
.step-description {
- color: #333;
+ color: #374151;
font-weight: 500;
}
}
@@ -100,27 +100,27 @@ const props = defineProps<Props>();
.step-description {
flex: 1;
- color: #666;
+ color: #6b7280;
line-height: 1.5;
- font-size: 13px;
+ font-size: 12px;
&.completed {
text-decoration: line-through;
- color: #999;
+ color: #9ca3af;
}
.sparkle {
- margin-left: 4px;
- font-size: 12px;
+ margin-left: 3px;
+ font-size: 11px;
}
}
.no-steps {
- padding: 8px 12px;
+ padding: 12px;
text-align: center;
color: #9ca3af;
font-style: italic;
- font-size: 13px;
+ font-size: 12px;
}
</style>
diff --git a/frontend/src/views/chat/components/tool-results/SearchResults.vue b/frontend/src/views/chat/components/tool-results/SearchResults.vue
index 62022fb2f..7ebeacae5 100644
--- a/frontend/src/views/chat/components/tool-results/SearchResults.vue
+++ b/frontend/src/views/chat/components/tool-results/SearchResults.vue
@@ -127,90 +127,13 @@ const getRelevanceLabel = (level: RelevanceLevel): string => {
display: flex;
flex-direction: column;
padding: 0 0 0 12px;
- gap: 4px;
-}
-
-.search-params {
- padding: 10px 12px;
- background: #f8f9fa;
- border: 1px solid #e7e7e7;
- border-radius: 6px;
- font-size: 13px;
- line-height: 1.5;
- display: flex;
- flex-direction: column;
- gap: 8px;
-
- .params-main {
- display: flex;
- flex-direction: column;
- gap: 6px;
- }
-
- .param-item {
- display: flex;
- align-items: flex-start;
- gap: 8px;
-
- .param-label {
- font-weight: 600;
- color: #666;
- min-width: 75px;
- flex-shrink: 0;
- font-size: 12px;
- }
-
- .param-value {
- color: #333;
- flex: 1;
- word-break: break-word;
- line-height: 1.5;
- font-size: 13px;
- }
- }
-
- .params-meta {
- display: flex;
- flex-wrap: wrap;
- gap: 6px;
- padding-top: 6px;
- border-top: 1px solid #e7e7e7;
-
- .param-meta-item {
- font-size: 11px;
- color: #666;
- background: #ffffff;
- padding: 3px 8px;
- border-radius: 4px;
- border: 1px solid #e7e7e7;
- white-space: nowrap;
- }
- }
-}
-
-.stats-card {
- padding: 8px 12px;
- background: #f8f9fa;
- border: 1px solid #e7e7e7;
- border-radius: 6px;
- font-size: 13px;
- line-height: 1.6;
-
- .stats-label {
- font-weight: 600;
- color: #666;
- margin-right: 6px;
- }
-
- .stats-item-inline {
- color: #333;
- }
+ gap: 3px;
}
.results-list {
display: flex;
flex-direction: column;
- gap: 8px;
+ gap: 3px;
}
.result-item {
@@ -221,14 +144,14 @@ const getRelevanceLabel = (level: RelevanceLevel): string => {
}
.result-header {
- padding: 4px 0;
+ padding: 2px 0;
cursor: pointer;
user-select: none;
display: flex;
align-items: center;
justify-content: space-between;
- gap: 8px;
- transition: color 0.25s cubic-bezier(0.4, 0, 0.2, 1);
+ gap: 6px;
+ transition: color 0.15s ease;
&:hover {
color: #07c05f;
@@ -242,24 +165,26 @@ const getRelevanceLabel = (level: RelevanceLevel): string => {
flex: 1;
min-width: 0;
font-size: 12px;
+ line-height: 1.4;
}
.result-index {
font-size: 11px;
- color: #8b8b8b;
+ color: #9ca3af;
font-weight: 600;
flex-shrink: 0;
}
.relevance-badge {
flex-shrink: 0;
- font-size: 11px;
- padding: 2px 6px;
+ font-size: 10px;
+ padding: 2px 5px;
+ border-radius: 3px;
}
.knowledge-title {
font-size: 12px;
- color: #333;
+ color: #374151;
flex: 1;
font-weight: 500;
overflow: hidden;
@@ -268,7 +193,6 @@ const getRelevanceLabel = (level: RelevanceLevel): string => {
min-width: 0;
}
-
// Popup overlay styles
:deep([class*="result-popup-"]) {
.t-popup__content {
@@ -278,14 +202,14 @@ const getRelevanceLabel = (level: RelevanceLevel): string => {
overflow-x: hidden;
padding: 0;
border-radius: 6px;
- box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
+ box-shadow: 0 4px 12px rgba(0, 0, 0, 0.12);
word-wrap: break-word;
word-break: break-word;
}
}
.info-section {
- margin-top: 8px;
+ margin-top: 6px;
&:first-child {
margin-top: 0;
@@ -293,32 +217,32 @@ const getRelevanceLabel = (level: RelevanceLevel): string => {
}
.full-content {
- font-size: 13px;
- color: #333;
- line-height: 1.8;
- padding: 12px;
+ font-size: 12px;
+ color: #374151;
+ line-height: 1.6;
+ padding: 10px;
background: #ffffff;
border-radius: 4px;
- border: 1px solid #e7e7e7;
+ border: 1px solid #e5e7eb;
white-space: pre-wrap;
word-break: break-word;
- margin-bottom: 8px;
+ margin-bottom: 6px;
}
.info-field {
font-size: 11px;
- margin-bottom: 3px;
+ margin-bottom: 4px;
.field-label {
min-width: 60px;
- font-size: 11px;
+ font-size: 10px;
}
}
code {
- font-family: 'Monaco', 'Courier New', monospace;
+ font-family: 'Monaco', 'Menlo', 'Courier New', monospace;
font-size: 10px;
- background: #f0f0f0;
+ background: #f3f4f6;
padding: 1px 4px;
border-radius: 2px;
}
diff --git a/frontend/src/views/chat/components/tool-results/ThinkingDisplay.vue b/frontend/src/views/chat/components/tool-results/ThinkingDisplay.vue
index 1798aa660..ad37e628d 100644
--- a/frontend/src/views/chat/components/tool-results/ThinkingDisplay.vue
+++ b/frontend/src/views/chat/components/tool-results/ThinkingDisplay.vue
@@ -23,30 +23,32 @@ useI18n(); // ensure component reacts to locale changes if needed
@import './tool-results.less';
.thinking-display {
- padding: 8px 0;
+ padding: 0;
}
.thinking-content {
display: flex;
- gap: 8px;
- padding: 10px 12px;
- background: #f3f3f3;
+ gap: 10px;
+ padding: 12px 14px;
+ background: #f9fafb;
border-radius: 6px;
- border-left: 3px solid #8b8b8b;
+ border-left: 3px solid #9ca3af;
}
.thinking-icon {
font-size: 16px;
flex-shrink: 0;
+ line-height: 1.5;
}
.thinking-text {
- font-size: 13px;
- color: #333;
- line-height: 1.6;
+ font-size: 15px;
+ color: #1f2937;
+ line-height: 1.65;
white-space: pre-wrap;
word-break: break-word;
flex: 1;
+ font-weight: 400;
}
</style>
diff --git a/frontend/src/views/chat/components/tool-results/WebFetchResults.vue b/frontend/src/views/chat/components/tool-results/WebFetchResults.vue
index 3d9a1450f..6ed9eb73f 100644
--- a/frontend/src/views/chat/components/tool-results/WebFetchResults.vue
+++ b/frontend/src/views/chat/components/tool-results/WebFetchResults.vue
@@ -181,30 +181,31 @@ const indexKey = (index: number, item: WebFetchResultItem): string => {
.web-fetch-results {
display: flex;
flex-direction: column;
- gap: 8px;
- padding: 8px 8px 0 8px;
+ gap: 6px;
+ padding: 6px 6px 0 6px;
}
.results-list {
display: flex;
flex-direction: column;
- gap: 8px;
+ gap: 6px;
}
.result-index {
- font-size: 12px;
+ font-size: 11px;
font-weight: 600;
- color: #8b8b8b;
+ color: #9ca3af;
}
.result-link {
display: inline-flex;
align-items: center;
gap: 4px;
- color: #1f2937;
- font-size: 13px;
+ color: #374151;
+ font-size: 12px;
font-weight: 500;
text-decoration: none;
+ transition: color 0.15s ease;
&:hover {
color: #07c05f;
@@ -213,29 +214,30 @@ const indexKey = (index: number, item: WebFetchResultItem): string => {
}
.result-domain {
- font-size: 13px;
+ font-size: 12px;
font-weight: 500;
- color: #1f2937;
+ color: #374151;
}
.meta-pill {
display: inline-flex;
align-items: center;
- padding: 2px 8px;
+ padding: 2px 6px;
border-radius: 999px;
- background: #e8f8f0;
+ background: rgba(7, 192, 95, 0.08);
color: #0f7a49;
- font-size: 11px;
+ font-size: 10px;
font-weight: 600;
+ line-height: 1.4;
}
.meta-text {
- font-size: 12px;
+ font-size: 11px;
color: #6b7280;
}
.result-content.expanded {
- padding-top: 12px;
+ padding-top: 10px;
}
.info-field .field-value a {
@@ -248,13 +250,14 @@ const indexKey = (index: number, item: WebFetchResultItem): string => {
}
.raw-length {
- font-size: 12px;
- color: #8b8b8b;
+ font-size: 11px;
+ color: #9ca3af;
margin-left: 4px;
+ font-weight: normal;
}
.action-button {
- margin-top: 8px;
+ margin-top: 6px;
}
.info-section-title.error {
diff --git a/frontend/src/views/chat/components/tool-results/WebSearchResults.vue b/frontend/src/views/chat/components/tool-results/WebSearchResults.vue
index 50d4d9d11..a743ced77 100644
--- a/frontend/src/views/chat/components/tool-results/WebSearchResults.vue
+++ b/frontend/src/views/chat/components/tool-results/WebSearchResults.vue
@@ -150,20 +150,20 @@ const formatDate = (dateStr: string): string => {
.web-search-results {
display: flex;
flex-direction: column;
- padding: 8px 8px 0 8px;
- gap: 8px;
+ padding: 0 0 0 12px;
+ gap: 4px;
}
.results-groups {
display: flex;
flex-direction: column;
- gap: 8px;
+ gap: 4px;
}
.results-group {
display: flex;
flex-direction: column;
- gap: 4px;
+ gap: 3px;
}
.group-header {
@@ -199,14 +199,13 @@ const formatDate = (dateStr: string): string => {
.results-list {
display: flex;
flex-direction: column;
- gap: 4px;
+ gap: 3px;
}
.result-item {
- // padding: 6px 8px;
background: #ffffff;
border: none;
- border-radius: 8px;
+ border-radius: 0;
transition: none;
}
@@ -215,30 +214,30 @@ const formatDate = (dateStr: string): string => {
align-items: center;
gap: 6px;
margin-bottom: 0;
- /* Ensure links inside header remain clickable despite shared styles */
+ padding: 2px 0;
+
:deep(a) {
pointer-events: auto;
}
}
.result-index {
- font-size: 12px;
+ font-size: 11px;
font-weight: 600;
- color: #8b8b8b;
+ color: #9ca3af;
flex-shrink: 0;
- padding-top: 1px;
- min-width: 28px;
+ min-width: 24px;
text-align: right;
}
.result-title-link {
display: flex;
align-items: baseline;
- gap: 8px;
+ gap: 6px;
flex: 1;
text-decoration: none;
- color: #1f2937;
- transition: color 0.2s ease;
+ color: #374151;
+ transition: color 0.15s ease;
&:hover {
color: #07c05f;
@@ -250,10 +249,10 @@ const formatDate = (dateStr: string): string => {
}
.result-title {
- font-size: 13px;
- font-weight: 600;
- line-height: 1.2;
- color: #1f2937;
+ font-size: 12px;
+ font-weight: 500;
+ line-height: 1.4;
+ color: inherit;
flex: 1;
word-break: break-word;
overflow: hidden;
@@ -267,47 +266,25 @@ const formatDate = (dateStr: string): string => {
white-space: nowrap;
}
-.result-domain {
- font-size: 12px;
- color: #6b7280;
- flex-shrink: 0;
-}
-
-.external-link-icon {
- font-size: 11px;
- color: #9ca3af;
- flex-shrink: 0;
- transition: color 0.2s ease;
-}
-
-.result-title-link:hover .external-link-icon {
- color: #07c05f;
-}
-
.result-title-text {
display: flex;
align-items: baseline;
flex: 1;
-}
-
-.result-title-text .result-title {
- font-size: 13px;
- font-weight: 600;
- line-height: 1.3;
- color: #1f2937;
- flex: 1;
- word-break: break-word;
- overflow: hidden;
- text-overflow: ellipsis;
- white-space: nowrap;
+
+ .result-title {
+ font-size: 12px;
+ font-weight: 500;
+ line-height: 1.4;
+ color: #374151;
+ }
}
.result-meta {
display: flex;
align-items: center;
- gap: 10px;
- margin-top: 6px;
- padding-top: 6px;
+ gap: 8px;
+ margin-top: 4px;
+ padding-top: 4px;
border-top: 1px solid #f3f4f6;
font-size: 10px;
color: #9ca3af;
@@ -315,7 +292,7 @@ const formatDate = (dateStr: string): string => {
.meta-item {
display: flex;
align-items: center;
- gap: 4px;
+ gap: 3px;
}
.meta-icon {
@@ -324,13 +301,14 @@ const formatDate = (dateStr: string): string => {
}
.empty-state {
- padding: 20px;
+ padding: 16px;
text-align: center;
color: #9ca3af;
+ font-size: 12px;
font-style: italic;
background: #f9fafb;
border-radius: 6px;
- border: 1px solid #e5e7eb;
+ border: 1px dashed #e5e7eb;
}
</style>
diff --git a/frontend/src/views/chat/components/tool-results/tool-results.less b/frontend/src/views/chat/components/tool-results/tool-results.less
index de2e535eb..2c3d6218d 100644
--- a/frontend/src/views/chat/components/tool-results/tool-results.less
+++ b/frontend/src/views/chat/components/tool-results/tool-results.less
@@ -10,49 +10,50 @@
@relevance-weak: #bdbdbd;
// Card colors
-@card-bg: #f8f9fa;
-@card-border: #e7e7e7;
+@card-bg: #ffffff;
+@card-border: #e5e7eb;
@card-hover-border: #07c05f;
-@card-radius: 8px;
-@card-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
-@card-shadow-hover: 0 4px 8px rgba(0, 0, 0, 0.1);
+@card-radius: 6px;
+@card-shadow: 0 1px 2px rgba(0, 0, 0, 0.04);
+@card-shadow-hover: 0 2px 6px rgba(7, 192, 95, 0.08);
// Animation timing
-@transition-time: 0.3s;
+@transition-time: 0.2s;
// Tool result container
.tool-result-container {
- margin: 8px 0;
+ margin: 12px 0;
}
// Relevance badge styles
.relevance-badge {
display: inline-flex;
align-items: center;
- padding: 4px 8px;
- border-radius: 4px;
- font-size: 12px;
+ padding: 2px 6px;
+ border-radius: 3px;
+ font-size: 11px;
font-weight: 600;
- gap: 4px;
+ gap: 3px;
+ line-height: 1.4;
&.high {
- background-color: @relevance-high;
- color: white;
+ background-color: rgba(0, 168, 112, 0.12);
+ color: @relevance-high;
}
&.medium {
- background-color: @relevance-medium;
- color: white;
+ background-color: rgba(255, 152, 0, 0.12);
+ color: #d67700;
}
&.low {
- background-color: @relevance-low;
- color: white;
+ background-color: rgba(117, 117, 117, 0.12);
+ color: @relevance-low;
}
&.weak {
- background-color: @relevance-weak;
- color: #333;
+ background-color: rgba(189, 189, 189, 0.12);
+ color: #666;
}
}
@@ -62,25 +63,26 @@
align-items: center;
padding: 2px 6px;
border-radius: 3px;
- font-size: 11px;
- background-color: #e7e7e7;
- color: #666;
+ font-size: 10px;
+ background-color: #f3f4f6;
+ color: #6b7280;
gap: 2px;
+ line-height: 1.4;
}
// Result card
.result-card {
- background: #ffffff;
+ background: @card-bg;
border: 1px solid @card-border;
border-radius: @card-radius;
margin-bottom: 0;
overflow: hidden;
- transition: all @transition-time ease;
- box-shadow: 0 1px 2px rgba(0, 0, 0, 0.04);
+ transition: border-color @transition-time ease, box-shadow @transition-time ease;
+ box-shadow: @card-shadow;
&:hover {
border-color: @card-hover-border;
- box-shadow: 0 2px 8px rgba(7, 192, 95, 0.12);
+ box-shadow: @card-shadow-hover;
}
}
@@ -94,9 +96,10 @@
gap: 8px;
position: relative;
z-index: 1;
+ transition: background-color 0.15s ease;
&:hover {
- background: rgba(7, 192, 95, 0.05);
+ background: rgba(7, 192, 95, 0.04);
}
* {
@@ -107,22 +110,24 @@
.result-title {
display: flex;
align-items: center;
- gap: 8px;
+ gap: 6px;
flex: 1;
- font-size: 14px;
+ font-size: 13px;
font-weight: 500;
+ line-height: 1.4;
}
.result-meta {
display: flex;
align-items: center;
gap: 6px;
- font-size: 12px;
- color: #8b8b8b;
+ font-size: 11px;
+ color: #6b7280;
+ flex-shrink: 0;
}
.result-content {
- padding: 0 12px 12px 12px;
+ padding: 0;
border-top: 1px solid @card-border;
background: white;
max-height: 0;
@@ -139,11 +144,11 @@
.expand-icon {
font-size: 12px;
- color: #8b8b8b;
- transition: transform 0.2s ease;
+ color: #9ca3af;
+ transition: transform 0.15s ease, color 0.15s ease;
&.expanded {
- transform: rotate(90deg);
+ transform: rotate(180deg);
}
}
@@ -157,44 +162,48 @@
}
.info-section-title {
- font-size: 12px;
+ font-size: 11px;
font-weight: 600;
- color: #666;
+ color: #6b7280;
text-transform: uppercase;
letter-spacing: 0.5px;
- margin-bottom: 6px;
+ margin-bottom: 8px;
}
.info-field {
display: flex;
gap: 8px;
- margin-bottom: 4px;
- font-size: 13px;
+ margin-bottom: 6px;
+ font-size: 12px;
+ line-height: 1.5;
.field-label {
- color: #8b8b8b;
+ color: #6b7280;
min-width: 80px;
+ flex-shrink: 0;
+ font-weight: 500;
}
.field-value {
- color: #333;
+ color: #374151;
flex: 1;
+ word-break: break-word;
}
}
// Statistics card (for KB counts, etc.)
.stats-card {
- background: #f0f7ff;
- border: 1px solid #d6e4ff;
- border-radius: 6px;
+ background: rgba(7, 192, 95, 0.04);
+ border: 1px solid rgba(7, 192, 95, 0.15);
+ border-radius: @card-radius;
padding: 10px 12px;
- margin-bottom: 12px;
+ margin-bottom: 10px;
}
.stats-title {
- font-size: 13px;
+ font-size: 12px;
font-weight: 600;
- color: #333;
+ color: #374151;
margin-bottom: 6px;
}
@@ -205,17 +214,18 @@
}
.stats-item {
- font-size: 12px;
- color: #666;
+ font-size: 11px;
+ color: #6b7280;
display: flex;
justify-content: space-between;
+ line-height: 1.5;
}
// Grid layout for cards
.card-grid {
display: grid;
grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
- gap: 12px;
+ gap: 10px;
margin-top: 8px;
}
@@ -224,8 +234,8 @@
display: flex;
flex-direction: column;
gap: 4px;
- padding: 8px 0;
- border-bottom: 1px solid #f0f0f0;
+ padding: 6px 0;
+ border-bottom: 1px solid #f3f4f6;
&:last-child {
border-bottom: none;
@@ -234,9 +244,9 @@
// Content preview (truncated)
.content-preview {
- font-size: 13px;
- color: #333;
- line-height: 1.5;
+ font-size: 12px;
+ color: #374151;
+ line-height: 1.6;
max-height: 60px;
overflow: hidden;
text-overflow: ellipsis;
@@ -247,13 +257,13 @@
// Full content
.full-content {
- font-size: 13px;
- color: #333;
+ font-size: 12px;
+ color: #374151;
line-height: 1.6;
white-space: pre-wrap;
word-break: break-word;
- padding: 8px;
- background: #f5f5f5;
+ padding: 10px;
+ background: #f9fafb;
border-radius: 4px;
border: 1px solid @card-border;
}
@@ -261,36 +271,43 @@
// Action buttons
.action-button {
padding: 4px 10px;
- font-size: 12px;
+ font-size: 11px;
border-radius: 4px;
border: 1px solid @card-border;
background: white;
- color: #666;
+ color: #6b7280;
cursor: pointer;
- transition: all 0.2s ease;
+ transition: all 0.15s ease;
+ font-weight: 500;
&:hover {
border-color: @card-hover-border;
color: @card-hover-border;
+ background: rgba(7, 192, 95, 0.04);
}
}
// Empty state
.empty-state {
- padding: 24px;
+ padding: 20px;
text-align: center;
- color: #8b8b8b;
- font-size: 14px;
+ color: #9ca3af;
+ font-size: 12px;
+ font-style: italic;
+ background: #f9fafb;
+ border-radius: @card-radius;
+ border: 1px dashed @card-border;
}
// Code block
.code-block {
- font-family: 'Monaco', 'Courier New', monospace;
- font-size: 12px;
- background: #f5f5f5;
+ font-family: 'Monaco', 'Menlo', 'Courier New', monospace;
+ font-size: 11px;
+ background: #f9fafb;
padding: 8px;
border-radius: 4px;
border: 1px solid @card-border;
overflow-x: auto;
+ line-height: 1.5;
}
diff --git a/frontend/src/views/chat/index.vue b/frontend/src/views/chat/index.vue
index bc3db333f..4ba33619f 100644
--- a/frontend/src/views/chat/index.vue
+++ b/frontend/src/views/chat/index.vue
@@ -12,8 +12,12 @@
</div>
</div>
<div v-if="loading"
- style="height: 41px;display: flex;align-items: center;background: #fff;width: 58px;">
- <img class="botanswer_laoding_gif" src="@/assets/img/botanswer_loading.gif" :alt="$t('chat.waitingForAnswer')">
+ style="height: 41px;display: flex;align-items: center;padding-left: 4px;">
+ <div class="loading-typing">
+ <span></span>
+ <span></span>
+ <span></span>
+ </div>
</div>
</div>
</div>
@@ -872,5 +876,40 @@ onBeforeRouteUpdate((to, from, next) => {
height: 18px;
margin-left: 16px;
}
+
+ .loading-typing {
+ display: flex;
+ align-items: center;
+ gap: 4px;
+
+ span {
+ width: 6px;
+ height: 6px;
+ border-radius: 50%;
+ background: #07c05f;
+ animation: typingBounce 1.4s ease-in-out infinite;
+
+ &:nth-child(1) {
+ animation-delay: 0s;
+ }
+
+ &:nth-child(2) {
+ animation-delay: 0.2s;
+ }
+
+ &:nth-child(3) {
+ animation-delay: 0.4s;
+ }
+ }
+ }
+}
+
+@keyframes typingBounce {
+ 0%, 60%, 100% {
+ transform: translateY(0);
+ }
+ 30% {
+ transform: translateY(-8px);
+ }
}
</style>
\ No newline at end of file