feat(chat): refactor agent stream display and tool result rendering
Add RagPipelineProgress timeline, simplify AgentStreamDisplay structure, group grep hits per document, and add KnowledgeChunksList tool result UI.
This commit is contained in:
@@ -164,3 +164,30 @@
|
||||
filter: saturate(1.06);
|
||||
}
|
||||
}
|
||||
|
||||
:deep(.streaming-mermaid-loading) {
|
||||
display: block;
|
||||
position: relative;
|
||||
width: 100%;
|
||||
max-width: 480px;
|
||||
min-height: 180px;
|
||||
margin: 0.75em 0;
|
||||
border-radius: 0;
|
||||
border: 0;
|
||||
background: var(--td-bg-color-container);
|
||||
overflow: hidden;
|
||||
animation: streamingImageBreath 2.2s ease-in-out infinite;
|
||||
}
|
||||
|
||||
:deep(.streaming-mermaid-loading__skeleton) {
|
||||
position: absolute;
|
||||
inset: 0;
|
||||
background: linear-gradient(
|
||||
110deg,
|
||||
rgba(234, 239, 246, 0.95) 8%,
|
||||
rgba(248, 250, 252, 0.98) 18%,
|
||||
rgba(234, 239, 246, 0.95) 33%
|
||||
);
|
||||
background-size: 220% 100%;
|
||||
animation: streamingImageShimmer 1.4s linear infinite;
|
||||
}
|
||||
|
||||
@@ -0,0 +1,69 @@
|
||||
@keyframes chatTimelineTypingBounce {
|
||||
|
||||
0%,
|
||||
60%,
|
||||
100% {
|
||||
transform: translateY(0);
|
||||
}
|
||||
|
||||
30% {
|
||||
transform: translateY(-8px);
|
||||
}
|
||||
}
|
||||
|
||||
@keyframes chatTimelineLoadingFadeIn {
|
||||
from {
|
||||
opacity: 0;
|
||||
transform: translateY(6px);
|
||||
}
|
||||
|
||||
to {
|
||||
opacity: 1;
|
||||
transform: translateY(0);
|
||||
}
|
||||
}
|
||||
|
||||
.streaming-loading-node {
|
||||
.tree-child-content {
|
||||
position: relative;
|
||||
}
|
||||
|
||||
.loading-indicator {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
min-height: 24px;
|
||||
padding: 0;
|
||||
margin: 0;
|
||||
position: relative;
|
||||
animation: chatTimelineLoadingFadeIn 0.3s ease-out;
|
||||
}
|
||||
|
||||
.loading-typing {
|
||||
position: absolute;
|
||||
left: -42px;
|
||||
top: 9px;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
gap: 4px;
|
||||
|
||||
span {
|
||||
width: 4px;
|
||||
height: 4px;
|
||||
border-radius: 50%;
|
||||
background: var(--td-text-color-placeholder);
|
||||
animation: chatTimelineTypingBounce 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;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,16 @@
|
||||
import assert from 'node:assert/strict'
|
||||
import { readFileSync } from 'node:fs'
|
||||
import { dirname, join } from 'node:path'
|
||||
import { fileURLToPath } from 'node:url'
|
||||
import test from 'node:test'
|
||||
|
||||
const here = dirname(fileURLToPath(import.meta.url))
|
||||
const css = readFileSync(join(here, 'chat-timeline-loading.less'), 'utf8')
|
||||
|
||||
test('timeline loading uses shared gray bounce dots on the axis', () => {
|
||||
assert.match(css, /\.streaming-loading-node\s*\{[\s\S]*left:\s*-42px/)
|
||||
assert.match(css, /width:\s*4px/)
|
||||
assert.match(css, /background:\s*var\(--td-text-color-placeholder\)/)
|
||||
assert.match(css, /animation:\s*chatTimelineTypingBounce/)
|
||||
assert.match(css, /animation-delay:\s*0\.2s/)
|
||||
})
|
||||
Reference in New Issue
Block a user