feat(agent): stream admin debug preview

This commit is contained in:
2026-07-17 13:47:05 +08:00
parent 13fed0467a
commit bfaf2ebf67
11 changed files with 620 additions and 75 deletions

View File

@@ -1380,6 +1380,115 @@ textarea {
line-height: 1.75;
}
.agent-preview-markdown {
overflow-wrap: anywhere;
color: #263832;
font-size: 14px;
line-height: 1.75;
}
.agent-preview-markdown > :first-child { margin-top: 0; }
.agent-preview-markdown > :last-child { margin-bottom: 0; }
.agent-preview-markdown p { margin: 0 0 10px; }
.agent-preview-markdown h1,
.agent-preview-markdown h2,
.agent-preview-markdown h3,
.agent-preview-markdown h4 {
margin: 16px 0 8px;
color: #1f352e;
line-height: 1.45;
}
.agent-preview-markdown h1 { font-size: 19px; }
.agent-preview-markdown h2 { font-size: 17px; }
.agent-preview-markdown h3,
.agent-preview-markdown h4 { font-size: 15px; }
.agent-preview-markdown ul,
.agent-preview-markdown ol {
margin: 8px 0 10px;
padding-left: 22px;
}
.agent-preview-markdown li + li { margin-top: 5px; }
.agent-preview-markdown strong { color: #1f352e; font-weight: 700; }
.agent-preview-markdown blockquote {
margin: 10px 0;
padding: 7px 10px;
border-left: 3px solid #8cc7b6;
background: #eef7f4;
color: #526b63;
}
.agent-preview-markdown code {
padding: 2px 5px;
border-radius: 5px;
background: #edf5f2;
color: #0f735d;
font-family: "SFMono-Regular", Consolas, monospace;
font-size: 0.92em;
}
.agent-preview-markdown pre {
max-width: 100%;
overflow-x: auto;
margin: 10px 0;
padding: 10px;
border-radius: 8px;
background: #13231e;
color: #f4fffb;
}
.agent-preview-markdown pre code {
padding: 0;
background: transparent;
color: inherit;
}
.agent-preview-markdown table {
display: block;
max-width: 100%;
overflow-x: auto;
border-collapse: collapse;
margin: 10px 0;
}
.agent-preview-markdown th,
.agent-preview-markdown td {
padding: 6px 8px;
border: 1px solid #dbe7e3;
white-space: nowrap;
}
.agent-preview-markdown a { color: #0f735d; font-weight: 700; }
.agent-preview-generation-state {
display: flex;
align-items: center;
gap: 4px;
min-height: 28px;
color: #667a73;
font-size: 13px;
}
.agent-preview-generation-state span {
width: 5px;
height: 5px;
border-radius: 50%;
background: #0f735d;
animation: agent-generation-pulse 1.2s ease-in-out infinite;
}
.agent-preview-generation-state span:nth-child(2) { animation-delay: 0.14s; }
.agent-preview-generation-state span:nth-child(3) { margin-right: 4px; animation-delay: 0.28s; }
@keyframes agent-generation-pulse {
0%, 70%, 100% { opacity: 0.25; transform: translateY(0); }
35% { opacity: 1; transform: translateY(-2px); }
}
.agent-preview-thinking {
margin-bottom: 10px;
padding: 9px 10px;