Spaces:
Running
Running
File size: 7,462 Bytes
f402bb3 | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 | /* Agent 面板(Phase 5B:能操控电脑的手):Warm Paper 令牌配色,与全站一致。
只服务 AgentPanel.tsx;样式独立不外溢。 */
.agent-panel {
flex: 1;
min-width: 0;
display: flex;
flex-direction: column;
padding: 26px 32px 20px;
gap: 14px;
overflow: hidden;
}
.agent-head h1 {
font-family: var(--font-serif);
font-size: 26px;
font-weight: 600;
}
.agent-sub {
margin-top: 4px;
color: var(--text-secondary);
font-size: 14px;
}
.agent-sub-dim {
color: var(--text-tertiary);
}
/* 常驻安全说明(琥珀色细条,温和不吓人) */
.agent-safety {
padding: 10px 14px;
border: 1px solid var(--border);
border-left: 3px solid var(--warning);
border-radius: var(--radius-card);
background: var(--bg-elevated);
color: var(--text-secondary);
font-size: 12.5px;
line-height: 1.6;
}
/* 输入区 */
.agent-inputs {
display: flex;
flex-direction: column;
gap: 10px;
}
.agent-model {
align-self: flex-start;
min-width: 240px;
padding: 7px 12px;
border: 1px solid var(--border);
border-radius: var(--radius-control);
background: var(--bg);
color: var(--text);
font-family: var(--font-mono);
font-size: 12.5px;
}
.agent-task {
width: 100%;
resize: vertical;
min-height: 64px;
padding: 12px 14px;
border: 1px solid var(--border);
border-radius: var(--radius-card);
background: var(--bg);
color: var(--text);
font-family: var(--font-sans);
font-size: 14px;
line-height: 1.6;
}
.agent-task:focus,
.agent-model:focus {
outline: none;
border-color: var(--accent);
box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent-soft) 65%, transparent);
}
.agent-actions {
display: flex;
gap: 10px;
align-items: center;
}
.agent-run,
.agent-cancel,
.agent-audit,
.agent-allow,
.agent-deny,
.agent-audit-close,
.agent-tool-copy {
padding: 8px 18px;
border: 1px solid var(--border);
border-radius: var(--radius-control);
background: var(--bg);
color: var(--text);
font-size: 13.5px;
cursor: pointer;
transition: background-color var(--dur) var(--ease);
}
.agent-run,
.agent-allow {
background: var(--accent);
border-color: var(--accent);
color: var(--bg);
}
.agent-run:disabled {
opacity: 0.55;
cursor: default;
}
.agent-run:not(:disabled):hover,
.agent-allow:hover {
filter: brightness(1.05);
}
.agent-cancel:hover,
.agent-audit:hover,
.agent-audit-close:hover,
.agent-tool-copy:hover {
background: var(--bg-elevated);
}
.agent-empty {
color: var(--text-secondary);
font-size: 13px;
}
/* ── 工具调用卡片(时间线主角)───────────────────────────────────── */
.agent-tool-card {
border: 1px solid var(--border);
border-left: 3px solid var(--border);
border-radius: var(--radius-card);
background: var(--bg-elevated);
padding: 10px 14px;
display: flex;
flex-direction: column;
gap: 8px;
}
/* 🟢 自动执行:绿色细条;🟡 需确认:琥珀细条 */
.agent-tool-card.level-green {
border-left-color: var(--success);
}
.agent-tool-card.level-yellow {
border-left-color: var(--warning);
}
.agent-tool-card.is-pending {
background: var(--accent-soft);
border-color: var(--accent);
border-left-color: var(--accent);
}
.agent-tool-card.is-failed {
border-left-color: var(--danger);
}
.agent-tool-head {
display: flex;
align-items: baseline;
gap: 8px;
flex-wrap: wrap;
}
/* 衬线小标题:「读文件」「执行命令」 */
.agent-tool-title {
font-family: var(--font-serif);
font-size: 15px;
font-weight: 600;
color: var(--text);
}
/* 状态徽章:与全站徽章同尺寸同字重(2px 8px / 12px / 500 / pill) */
.agent-tool-badge {
font-size: 12px;
font-weight: 500;
padding: 2px 8px;
border-radius: 999px;
border: 1px solid var(--border);
color: var(--text-secondary);
white-space: nowrap;
}
.agent-tool-badge.is-green {
color: var(--success);
border-color: var(--success);
}
.agent-tool-badge.is-yellow {
color: var(--warning);
border-color: var(--warning);
}
.agent-tool-summary {
font-size: 13px;
color: var(--text-secondary);
min-width: 0;
}
.agent-tool-status {
margin-left: auto;
font-size: 12px;
color: var(--text-tertiary);
white-space: nowrap;
}
/* 参数原文(mono;命令原文/文件路径都在这里看清楚) */
.agent-tool-args {
font-family: var(--font-mono);
font-size: 12px;
line-height: 1.6;
color: var(--text-secondary);
background: var(--bg-sunken);
border: 1px solid var(--border);
border-radius: var(--radius-chip);
padding: 8px 10px;
white-space: pre-wrap;
word-break: break-all;
max-height: 180px;
overflow-y: auto;
}
.agent-tool-actions {
display: flex;
gap: 10px;
}
.agent-tool-running {
font-size: 12.5px;
color: var(--text-tertiary);
}
/* 危险命令被拦:人话提示(danger 红,仅指引不代执行) */
.agent-tool-blocked {
font-size: 13px;
color: var(--danger);
border: 1px dashed var(--danger);
border-radius: var(--radius-chip);
padding: 6px 10px;
}
/* 结果折叠区(mono、可复制) */
.agent-tool-result {
border-top: 1px dashed var(--border);
padding-top: 6px;
}
.agent-tool-result summary {
cursor: pointer;
font-size: 12.5px;
color: var(--text-secondary);
user-select: none;
}
.agent-tool-result pre {
margin-top: 6px;
font-family: var(--font-mono);
font-size: 12px;
line-height: 1.6;
color: var(--text);
background: var(--bg-sunken);
border: 1px solid var(--border);
border-radius: var(--radius-chip);
padding: 8px 10px;
white-space: pre-wrap;
word-break: break-all;
max-height: 240px;
overflow-y: auto;
}
.agent-tool-copy {
margin-top: 6px;
padding: 4px 12px;
font-size: 12px;
}
/* ── 时间线 ─────────────────────────────────────────────────────── */
.agent-timeline {
flex: 1;
min-height: 120px;
overflow-y: auto;
display: flex;
flex-direction: column;
gap: 8px;
padding: 4px 2px;
}
.agent-timeline-empty {
color: var(--text-tertiary);
font-size: 13.5px;
}
.agent-item {
padding: 9px 13px;
border-radius: var(--radius-card);
border: 1px solid var(--border);
font-size: 13.5px;
line-height: 1.6;
}
.agent-item-task {
align-self: flex-end;
background: var(--accent-soft);
border-color: transparent;
max-width: 78%;
}
.agent-item-assistant {
background: var(--bg-elevated);
}
.agent-item-notice {
color: var(--text-secondary);
border-style: dashed;
}
.agent-item-notice.is-danger {
color: var(--danger);
border-color: var(--danger);
}
/* ── 审计日志查看 ───────────────────────────────────────────────── */
.agent-audit-view {
max-height: 220px;
overflow-y: auto;
border: 1px solid var(--border);
border-radius: var(--radius-card);
background: var(--bg-sunken);
padding: 10px 14px;
}
.agent-audit-title {
display: flex;
justify-content: space-between;
align-items: center;
font-size: 12px;
color: var(--text-secondary);
margin-bottom: 6px;
gap: 10px;
}
.agent-audit-view pre {
font-family: var(--font-mono);
font-size: 11px;
line-height: 1.7;
color: var(--text-secondary);
white-space: pre-wrap;
word-break: break-all;
}
|