agent-Specialization/demo/todo_float_window/runner.css
JOJO 171833e4d1 feat(quickdock): 新增对话区右侧快捷窗口(待办/子智能体/后台指令/文件记录)
- 四窗口固定顺序占位布局,空时收起到 0 宽;动画区分「运行中新出现」与「切换/加载」
- 文件记录:edit/write 埋点写入对话 metadata.edited_files,预览走既有 /api/file/content
- 详情面板:lastDetail/lastStatus 快照、首次填充静态+瞬间到底、终态四色分类
- 数据通道全部走 REST 轮询(带 conversation_id 对话级隔离),含 demo 与设计文档
2026-07-22 00:52:36 +08:00

363 lines
8.1 KiB
CSS
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

/* ============================================================
子智能体 / 后台指令窗口 + 详情面板 + 条目菜单 样式
复用 style.css 的变量与窗口基础样式
============================================================ */
/* ---------------- 条目列表(与待办同规格:固定 5 行) ---------------- */
.run-list {
list-style: none;
padding: 0;
height: calc(var(--row-h) * 5);
overflow-y: auto;
scrollbar-width: none;
-ms-overflow-style: none;
}
.run-list::-webkit-scrollbar { display: none; width: 0; height: 0; }
/* 条目:[状态点] 左 + 名称 + [⋯] 右,整行可点击 */
.run-item {
height: var(--row-h);
display: flex;
align-items: center;
gap: 7px;
padding: 0 8px 0 12px;
overflow: hidden;
cursor: pointer;
transition: background 0.12s ease;
}
.run-item:hover { background: var(--hover-wash); }
/* 当前打开详情的条目保持高亮 */
.run-item.is-active { background: var(--surface-wash); }
/* ⋯ 按钮 */
.item-menu-btn {
flex: none;
width: 22px;
height: 22px;
display: flex;
align-items: center;
justify-content: center;
padding: 0;
background: none;
border: none;
border-radius: 5px;
color: var(--text-tertiary);
cursor: pointer;
transition: background 0.12s ease, color 0.12s ease;
}
.item-menu-btn svg { width: 14px; height: 14px; }
.item-menu-btn:hover { background: rgba(38, 36, 31, 0.07); color: var(--text-secondary); }
/* 名称 */
.item-name {
flex: 1;
min-width: 0;
font-size: 13px;
color: var(--text-primary);
white-space: nowrap;
overflow: hidden;
text-overflow: ellipsis;
}
/* 后台指令名称用等宽字体 */
.run-item[data-kind="cmd"] .item-name {
font-family: ui-monospace, "SF Mono", Menlo, monospace;
font-size: 12px;
}
/* 完成后名称变灰 */
.run-item.is-done .item-name { color: var(--text-tertiary); }
/* 状态点:运行中呼吸,完成/终止变灰 */
.item-status {
flex: none;
width: 6px;
height: 6px;
border-radius: 50%;
background: transparent;
}
.run-item.is-running .item-status {
background: var(--accent);
animation: status-pulse 1.6s ease-in-out infinite;
}
.run-item.is-done .item-status { background: var(--text-tertiary); }
@keyframes status-pulse {
0%, 100% { opacity: 1; }
50% { opacity: 0.3; }
}
/* 进入动画复用待办的 keyframestodo-in 定义在 style.css全局可用 */
.run-item.is-entering {
opacity: 0;
animation: todo-in 0.34s var(--ease-out) forwards;
}
/* ---------------- 详情面板 ---------------- */
/* display:flex 会覆盖 hidden 属性的 display:none必须显式补回 */
.detail-panel[hidden] { display: none; }
.detail-panel {
position: fixed;
top: 20px;
right: calc(20px + var(--window-max-w) * 0.9 + 12px); /* 悬浮窗左侧 */
width: 480px;
max-width: calc(100vw - 360px);
height: 460px;
max-height: calc(100vh - 40px);
background: var(--surface-float);
border: 1px solid var(--border-subtle);
border-radius: 12px;
box-shadow: var(--shadow-float);
display: flex;
flex-direction: column;
overflow: hidden;
z-index: 90;
}
.detail-panel.panel-enter { animation: panel-in 0.24s var(--ease-out); }
@keyframes panel-in {
from { opacity: 0; transform: translateX(12px); }
to { opacity: 1; transform: translateX(0); }
}
.detail-panel.panel-leave { animation: panel-out 0.18s ease-in forwards; }
@keyframes panel-out {
to { opacity: 0; transform: translateX(8px); }
}
/* 详情头部 */
.detail-header {
flex: none;
height: 42px;
display: flex;
align-items: center;
gap: 8px;
padding: 0 12px;
border-bottom: 1px solid var(--border-subtle);
}
.detail-status-dot {
flex: none;
width: 7px;
height: 7px;
border-radius: 50%;
background: var(--text-tertiary);
}
.detail-status-dot.is-running {
background: var(--accent);
animation: status-pulse 1.6s ease-in-out infinite;
}
.detail-title {
font-size: 13px;
font-weight: 600;
color: var(--text-primary);
white-space: nowrap;
overflow: hidden;
text-overflow: ellipsis;
min-width: 0;
}
.detail-badge {
flex: none;
font-size: 11px;
line-height: 1;
padding: 4px 8px;
border-radius: 99px;
background: color-mix(in srgb, var(--accent) 12%, transparent);
color: var(--accent);
}
.detail-badge.is-done { background: var(--surface-wash); color: var(--text-tertiary); }
.detail-close {
flex: none;
margin-left: auto;
width: 26px;
height: 26px;
display: flex;
align-items: center;
justify-content: center;
padding: 0;
background: none;
border: none;
border-radius: 6px;
color: var(--text-tertiary);
cursor: pointer;
transition: background 0.12s ease, color 0.12s ease;
}
.detail-close svg { width: 13px; height: 13px; }
.detail-close:hover { background: rgba(38, 36, 31, 0.07); color: var(--text-secondary); }
/* 详情内容区 */
.detail-body {
flex: 1;
overflow-y: auto;
padding: 6px 0 10px;
scrollbar-width: none;
-ms-overflow-style: none;
}
.detail-body::-webkit-scrollbar { display: none; width: 0; height: 0; }
.detail-body.body-fade { animation: body-fade-in 0.18s ease-out; }
@keyframes body-fade-in {
from { opacity: 0; }
to { opacity: 1; }
}
/* ---------------- feed 行(工具 + 输出,扁平行式,无嵌套卡片) ---------------- */
.feed-row {
display: flex;
align-items: center;
gap: 8px;
padding: 0 14px;
min-height: 28px;
font-size: 12.5px;
animation: feed-in 0.25s var(--ease-out);
}
/* 新进度出现动画:淡入 + 轻微上浮 */
@keyframes feed-in {
from { opacity: 0; transform: translateY(5px); }
to { opacity: 1; transform: translateY(0); }
}
/* 智能体文本输出 */
.feed-row.feed-text {
align-items: flex-start;
padding-top: 5px;
padding-bottom: 5px;
color: var(--text-secondary);
line-height: 1.55;
white-space: pre-wrap;
word-break: break-word;
}
/* 工具调用行 */
.feed-tool .tool-name {
font-family: ui-monospace, "SF Mono", Menlo, monospace;
font-size: 12px;
color: var(--text-primary);
flex: none;
}
.feed-tool .tool-param {
color: var(--text-tertiary);
font-size: 12px;
white-space: nowrap;
overflow: hidden;
text-overflow: ellipsis;
min-width: 0;
}
.feed-tool .tool-result {
flex: none;
margin-left: auto;
font-size: 11.5px;
color: var(--text-tertiary);
font-variant-numeric: tabular-nums;
}
/* 工具运行中 spinner / 完成 ✓ */
.tool-spinner {
flex: none;
width: 11px;
height: 11px;
border-radius: 50%;
border: 1.5px solid var(--border-strong);
border-top-color: var(--accent);
animation: tool-spin 0.7s linear infinite;
}
@keyframes tool-spin {
to { transform: rotate(360deg); }
}
.tool-done {
flex: none;
width: 11px;
text-align: center;
font-size: 11px;
color: var(--accent);
}
/* 终端输出行(后台指令) */
.feed-row.feed-term {
font-family: ui-monospace, "SF Mono", Menlo, monospace;
font-size: 12px;
color: var(--text-secondary);
white-space: pre-wrap;
word-break: break-all;
min-height: 24px;
}
.feed-row.feed-term.is-command {
color: var(--text-primary);
font-weight: 600;
}
/* 终止提示行 */
.feed-row.feed-killed { color: #c0453a; }
/* ---------------- 条目 ⋯ 菜单 ---------------- */
.item-menu {
position: fixed;
z-index: 300;
min-width: 116px;
padding: 4px;
background: var(--surface-float);
border: 1px solid var(--border-subtle);
border-radius: 8px;
box-shadow: var(--shadow-float);
}
.item-menu.menu-enter { animation: menu-in 0.16s ease-out; }
@keyframes menu-in {
from { opacity: 0; transform: translateY(-3px) scale(0.97); }
to { opacity: 1; transform: translateY(0) scale(1); }
}
.menu-item {
display: flex;
align-items: center;
width: 100%;
height: 30px;
padding: 0 10px;
background: none;
border: none;
border-radius: 5px;
font-size: 12.5px;
text-align: left;
cursor: pointer;
transition: background 0.12s ease;
}
.menu-item--danger { color: #c0453a; }
.menu-item--danger:hover:not(:disabled) { background: rgba(192, 69, 58, 0.08); }
.menu-item--danger:disabled { color: var(--text-tertiary); cursor: default; }
/* ---------------- demo 控制台补充 ---------------- */
.demo-divider {
width: 100%;
height: 1px;
background: var(--border-subtle);
margin: 5px 0;
}