mirror of
https://gitcode.com/JianFeeeee/HomeAgent.git
synced 2026-09-23 10:28:06 +00:00
gui+webui: 聊天界面升级(PiDeck风格思考/工具卡片+滴入动画) & 流式卡顿修复(防抖局部增量渲染) & 主题系统修复(启动恢复色板/弹窗溢出wrap)
This commit is contained in:
@ -553,11 +553,15 @@ body.maximized .tb-max svg {
|
||||
filter: blur(calc(var(--bg-blur, 0) * 1px));
|
||||
transition: filter 0.25s var(--ease-out);
|
||||
}
|
||||
|
||||
.palette-pop {
|
||||
position: fixed;
|
||||
bottom: 56px;
|
||||
left: 6px;
|
||||
width: 210px;
|
||||
width: 216px;
|
||||
max-width: calc(100vw - 24px);
|
||||
max-height: calc(100vh - 120px);
|
||||
overflow-y: auto;
|
||||
padding: 12px;
|
||||
background: var(--glass-bg-strong);
|
||||
backdrop-filter: blur(12px);
|
||||
@ -586,7 +590,7 @@ body.maximized .tb-max svg {
|
||||
margin: 3px;
|
||||
padding: 0;
|
||||
vertical-align: middle;
|
||||
transition: transform 0.15s;
|
||||
transition: transform 0.15s, box-shadow 0.15s;
|
||||
}
|
||||
.palette-pop button.cdot:hover {
|
||||
transform: scale(1.25);
|
||||
@ -607,27 +611,33 @@ body.maximized .tb-max svg {
|
||||
margin-bottom: 6px;
|
||||
outline: none;
|
||||
}
|
||||
.palette-pop input[type="range"] {
|
||||
width: 80px;
|
||||
margin: 0;
|
||||
accent-color: var(--accent);
|
||||
vertical-align: middle;
|
||||
}
|
||||
.palette-pop .pp-row {
|
||||
display: flex;
|
||||
flex-wrap: wrap;
|
||||
align-items: center;
|
||||
gap: 6px;
|
||||
gap: 5px;
|
||||
margin-top: 4px;
|
||||
}
|
||||
.palette-pop .pp-row .btn {
|
||||
padding: 3px 10px;
|
||||
padding: 3px 9px;
|
||||
font-size: 11px;
|
||||
white-space: nowrap;
|
||||
}
|
||||
.palette-pop .pp-val {
|
||||
display: inline-flex;
|
||||
align-items: center;
|
||||
gap: 4px;
|
||||
font-size: 10px;
|
||||
color: var(--text-muted);
|
||||
min-width: 96px;
|
||||
min-width: 0;
|
||||
text-align: right;
|
||||
margin-left: auto;
|
||||
}
|
||||
.palette-pop input[type="range"] {
|
||||
width: 72px;
|
||||
margin: 0;
|
||||
accent-color: var(--accent);
|
||||
vertical-align: middle;
|
||||
}
|
||||
.lang-btn {
|
||||
font-size: 13px;
|
||||
@ -1179,26 +1189,73 @@ code {
|
||||
max-width: 100%;
|
||||
border-radius: var(--radius-sm);
|
||||
}
|
||||
.msg-bubble .reasoning {
|
||||
border-left: 2px solid #dddddd;
|
||||
padding-left: 8px;
|
||||
|
||||
/* ===== 思考卡片(PiDeck 风格)===== */
|
||||
.reasoning-card {
|
||||
margin: 6px 0;
|
||||
font-size: 11px;
|
||||
opacity: 0.8;
|
||||
border: 1px dashed var(--kv-border);
|
||||
border-radius: var(--radius-sm);
|
||||
background: var(--bg-panel, var(--bg-hover));
|
||||
overflow: hidden;
|
||||
}
|
||||
.msg-bubble .reasoning-title {
|
||||
.reasoning-card .reasoning-head {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
gap: 7px;
|
||||
padding: 6px 10px;
|
||||
font-size: 11px;
|
||||
cursor: pointer;
|
||||
font-size: 10px;
|
||||
font-weight: 600;
|
||||
user-select: none;
|
||||
margin-bottom: 2px;
|
||||
color: var(--text-secondary);
|
||||
}
|
||||
.reasoning-card .reasoning-head:hover {
|
||||
background: var(--bg-hover);
|
||||
}
|
||||
.reasoning-card .rc-ico {
|
||||
color: var(--accent);
|
||||
flex-shrink: 0;
|
||||
}
|
||||
.reasoning-card .rc-title {
|
||||
font-weight: 600;
|
||||
color: var(--text-primary);
|
||||
}
|
||||
.reasoning-card .rc-chev {
|
||||
margin-left: auto;
|
||||
font-size: 10px;
|
||||
color: var(--text-muted);
|
||||
transition: transform 0.2s var(--ease-out);
|
||||
}
|
||||
.reasoning-card.open .rc-chev {
|
||||
transform: rotate(180deg);
|
||||
}
|
||||
.reasoning-card .reasoning-body {
|
||||
padding: 4px 10px 8px;
|
||||
}
|
||||
.reasoning-card .reasoning-content {
|
||||
line-height: 1.5;
|
||||
color: var(--text-tertiary);
|
||||
font-size: 11.5px;
|
||||
}
|
||||
.reasoning-card .reasoning-content p {
|
||||
margin: 4px 0;
|
||||
}
|
||||
.reasoning-card .reasoning-sweep {
|
||||
height: 2px;
|
||||
border-radius: 2px;
|
||||
margin-top: 6px;
|
||||
background: linear-gradient(90deg, transparent, var(--accent), transparent);
|
||||
background-size: 200% 100%;
|
||||
animation: reasoningSweep 1.2s var(--ease-out) infinite;
|
||||
opacity: 0.6;
|
||||
}
|
||||
.msg-bubble .reasoning-body {
|
||||
line-height: 1.4;
|
||||
@keyframes reasoningSweep {
|
||||
from { background-position: 200% 0; }
|
||||
to { background-position: -200% 0; }
|
||||
}
|
||||
.msg-bubble .tool-call {
|
||||
background: var(--bg-hover);
|
||||
|
||||
/* ===== 工具卡片(PiDeck 风格,扁平不套气泡)===== */
|
||||
.tool-card {
|
||||
background: var(--bg-panel, var(--bg-hover));
|
||||
color: var(--text-secondary);
|
||||
border-radius: var(--radius-sm);
|
||||
padding: 7px 10px;
|
||||
@ -1207,55 +1264,101 @@ code {
|
||||
border: 1px solid var(--kv-border);
|
||||
border-left: 3px solid var(--accent);
|
||||
cursor: pointer;
|
||||
transition: border-color 0.2s var(--ease-out), background 0.2s var(--ease-out);
|
||||
}
|
||||
.msg-bubble .tool-call .tc-line {
|
||||
.tool-card.tc-running {
|
||||
border-left-color: var(--accent);
|
||||
}
|
||||
.tool-card.tc-done {
|
||||
border-left-color: rgba(23, 169, 100, 0.8);
|
||||
}
|
||||
.tool-card.tc-error {
|
||||
border-left-color: var(--error, #db3694);
|
||||
}
|
||||
.tool-card .tc-line {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
gap: 6px;
|
||||
font-size: 11px;
|
||||
user-select: none;
|
||||
}
|
||||
.msg-bubble .tool-call .tc-ico {
|
||||
.tool-card .tc-ico {
|
||||
display: inline-flex;
|
||||
flex-shrink: 0;
|
||||
color: var(--accent);
|
||||
}
|
||||
.msg-bubble .tool-call .tc-name {
|
||||
.tool-card.tc-error .tc-ico {
|
||||
color: var(--error, #db3694);
|
||||
}
|
||||
.tool-card.tc-done .tc-ico {
|
||||
color: rgba(23, 169, 100, 0.9);
|
||||
}
|
||||
.tool-card .tc-name {
|
||||
font-weight: 600;
|
||||
color: var(--text-primary);
|
||||
}
|
||||
.msg-bubble .tool-call .tc-state {
|
||||
margin-left: 6px;
|
||||
.tool-card .tc-plugin {
|
||||
font-size: 9.5px;
|
||||
color: var(--text-muted);
|
||||
background: var(--pre-bg);
|
||||
border-radius: 4px;
|
||||
padding: 0 4px;
|
||||
line-height: 1.6;
|
||||
flex-shrink: 0;
|
||||
}
|
||||
.tool-card .tc-state {
|
||||
margin-left: auto;
|
||||
font-size: 9.5px;
|
||||
font-weight: 500;
|
||||
padding: 1px 6px;
|
||||
border-radius: 999px;
|
||||
flex-shrink: 0;
|
||||
margin-left: auto;
|
||||
display: inline-flex;
|
||||
align-items: center;
|
||||
gap: 4px;
|
||||
}
|
||||
.msg-bubble .tool-call .tc-run {
|
||||
.tool-card .tc-run {
|
||||
background: rgba(63, 110, 245, 0.18);
|
||||
color: #a3b8ff;
|
||||
}
|
||||
.msg-bubble .tool-call .tc-done {
|
||||
.tool-card .tc-done {
|
||||
background: rgba(23, 169, 100, 0.18);
|
||||
color: #6ee7a8;
|
||||
}
|
||||
.msg-bubble .tool-call .tc-deny {
|
||||
.tool-card .tc-deny {
|
||||
background: rgba(219, 54, 148, 0.18);
|
||||
color: #ff9ec6;
|
||||
}
|
||||
.msg-bubble .tool-call .tc-caret {
|
||||
.tool-card .tc-spinner {
|
||||
width: 11px;
|
||||
height: 11px;
|
||||
border-radius: 50%;
|
||||
border: 2px solid rgba(63, 110, 245, 0.25);
|
||||
border-top-color: #3f6ef5;
|
||||
animation: spin 0.7s linear infinite;
|
||||
display: inline-block;
|
||||
}
|
||||
.tool-card .tc-caret {
|
||||
font-size: 10px;
|
||||
color: var(--text-muted);
|
||||
transition: transform 0.15s var(--ease-out);
|
||||
}
|
||||
.msg-bubble .tool-call.open .tc-caret {
|
||||
.tool-card.open .tc-caret {
|
||||
transform: rotate(180deg);
|
||||
}
|
||||
.msg-bubble .tool-call .tc-detail {
|
||||
.tool-card .tc-detail {
|
||||
margin-top: 6px;
|
||||
}
|
||||
.msg-bubble .tool-call .tc-args {
|
||||
.tool-card .tc-detail-label {
|
||||
font-size: 9.5px;
|
||||
font-weight: 600;
|
||||
color: var(--text-muted);
|
||||
text-transform: uppercase;
|
||||
letter-spacing: 0.03em;
|
||||
margin-bottom: 2px;
|
||||
}
|
||||
.tool-card .tc-args,
|
||||
.tool-card .tc-result {
|
||||
font-family: var(--font-mono);
|
||||
font-size: 11px;
|
||||
opacity: 0.85;
|
||||
@ -1267,29 +1370,37 @@ code {
|
||||
border-radius: 4px;
|
||||
padding: 5px 7px;
|
||||
}
|
||||
.msg-bubble .tool-call .tc-result {
|
||||
font-family: var(--font-mono);
|
||||
font-size: 11px;
|
||||
.tool-card .tc-result {
|
||||
opacity: 0.72;
|
||||
white-space: pre-wrap;
|
||||
word-break: break-all;
|
||||
margin-top: 5px;
|
||||
background: var(--pre-bg);
|
||||
color: var(--pre-color);
|
||||
border-radius: 4px;
|
||||
padding: 5px 7px;
|
||||
max-height: 80px;
|
||||
overflow-y: auto;
|
||||
}
|
||||
[data-theme="light"] .msg-bubble .tool-call .tc-run {
|
||||
[data-theme="light"] .tool-card .tc-run {
|
||||
color: #3f6ef5;
|
||||
}
|
||||
[data-theme="light"] .msg-bubble .tool-call .tc-done {
|
||||
[data-theme="light"] .tool-card .tc-done {
|
||||
color: #128a52;
|
||||
}
|
||||
[data-theme="light"] .msg-bubble .tool-call .tc-deny {
|
||||
[data-theme="light"] .tool-card .tc-deny {
|
||||
color: #c2185b;
|
||||
}
|
||||
.tool-card.tool-drip-in {
|
||||
animation: toolDripIn 0.32s var(--ease-out) both;
|
||||
}
|
||||
@keyframes toolDripIn {
|
||||
0% {
|
||||
opacity: 0;
|
||||
transform: translateY(-18px) scale(0.96);
|
||||
}
|
||||
70% {
|
||||
opacity: 1;
|
||||
transform: translateY(2px) scale(1.005);
|
||||
}
|
||||
100% {
|
||||
opacity: 1;
|
||||
transform: translateY(0) scale(1);
|
||||
}
|
||||
}
|
||||
.msg-bubble .thinking-tools {
|
||||
display: flex;
|
||||
gap: 6px;
|
||||
|
||||
Reference in New Issue
Block a user