PluginProbe
OpenStation: Desktop Windows, Dock & Virtual Desktops for WP Admin / trunk
OpenStation: Desktop Windows, Dock & Virtual Desktops for WP Admin vtrunk
1.1.9 1.1.8 1.1.7 1.1.6 1.1.5 1.1.4 1.1.3 1.1.2 1.1.1 1.1.0 1.0.1 1.0.0 0.9.8 0.9.7 0.9.6 0.9.4 0.9.5 0.9.3 0.9.2 0.9.1 0.9.0 0.8.9 0.8.8 0.8.7 0.8.6 All 33 releases
desktop-mode / assets / css / agents.css

agents.css in OpenStation: Desktop Windows, Dock & Virtual Desktops for WP Admin trunk, at assets/css/agents.css

578 lines 12.2 KB
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 /**
2 * Agents — "Agent chat" window styles.
3 *
4 * Conversation surface painted by the `agent-run-window` bundle
5 * (src/agent-run-window.ts). Same conventions as the other window
6 * stylesheets: `os-*` / `dm-*` prefixes, theming via the
7 * os-variables custom properties.
8 *
9 */
10
11 .desktop-mode-agent-run {
12 display: flex;
13 flex-direction: column;
14 width: 100%;
15 height: 100%;
16 min-height: 0;
17 font-family: var(
18 --os-font,
19 -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif
20 );
21 color: var( --os-ui-fg, #1d2327 );
22 background: var( --os-window-bg, #fff );
23 box-sizing: border-box;
24 }
25
26 .os-agent-run__loading {
27 display: flex;
28 align-items: center;
29 justify-content: center;
30 height: 100%;
31 }
32
33 .dm-agent-chat {
34 display: flex;
35 flex-direction: row;
36 height: 100%;
37 min-height: 0;
38 }
39
40 /* Past-conversations sidebar. */
41 .dm-agent-chat__sidebar {
42 width: 190px;
43 flex: none;
44 display: flex;
45 flex-direction: column;
46 min-height: 0;
47 border-right: 1px solid rgba( 0, 0, 0, 0.08 );
48 background: rgba( 0, 0, 0, 0.02 );
49 }
50
51 .dm-agent-chat__new {
52 margin: 10px 10px 6px;
53 }
54
55 .dm-agent-chat__convs {
56 flex: 1;
57 overflow-y: auto;
58 padding: 0 6px 10px;
59 display: flex;
60 flex-direction: column;
61 gap: 2px;
62 }
63
64 .dm-agent-chat__convs-empty {
65 color: #757575;
66 font-size: 12px;
67 padding: 8px;
68 }
69
70 .dm-agent-chat__conv {
71 display: flex;
72 align-items: center;
73 gap: 8px;
74 padding: 7px 8px;
75 border-radius: 8px;
76 cursor: pointer;
77 }
78
79 .dm-agent-chat__conv:hover {
80 background: rgba( 0, 0, 0, 0.05 );
81 }
82
83 .dm-agent-chat__conv--active {
84 background: rgba( 0, 0, 0, 0.08 );
85 }
86
87 .dm-agent-chat__conv-avatar {
88 flex: none;
89 }
90
91 /* Two-line row: agent + time on top, the tail of the last message
92 below. Both lines clamp to one line — the sidebar is 190px wide and
93 a wrapping row would push the next conversation out of reach. */
94 .dm-agent-chat__conv-text {
95 flex: 1;
96 min-width: 0;
97 display: flex;
98 flex-direction: column;
99 gap: 1px;
100 }
101
102 .dm-agent-chat__conv-top {
103 display: flex;
104 align-items: baseline;
105 gap: 6px;
106 min-width: 0;
107 }
108
109 .dm-agent-chat__conv-name {
110 flex: 1;
111 min-width: 0;
112 font-size: 12px;
113 font-weight: 600;
114 white-space: nowrap;
115 overflow: hidden;
116 text-overflow: ellipsis;
117 }
118
119 .dm-agent-chat__conv-time {
120 flex: none;
121 font-size: 11px;
122 opacity: 0.55;
123 font-variant-numeric: tabular-nums;
124 }
125
126 .dm-agent-chat__conv-preview {
127 min-width: 0;
128 font-size: 11.5px;
129 opacity: 0.65;
130 white-space: nowrap;
131 overflow: hidden;
132 text-overflow: ellipsis;
133 }
134
135 .dm-agent-chat__conv-delete {
136 flex: none;
137 opacity: 0;
138 border: 0;
139 background: none;
140 cursor: pointer;
141 color: #757575;
142 font-size: 14px;
143 padding: 0 2px;
144 line-height: 1;
145 }
146
147 .dm-agent-chat__conv:hover .dm-agent-chat__conv-delete,
148 .dm-agent-chat__conv-delete:focus-visible {
149 opacity: 1;
150 }
151
152 /* Conversation column. */
153 .dm-agent-chat__main {
154 flex: 1;
155 display: flex;
156 flex-direction: column;
157 min-width: 0;
158 min-height: 0;
159 }
160
161 .dm-agent-chat__head {
162 display: flex;
163 align-items: center;
164 gap: 10px;
165 padding: 12px;
166 border-bottom: 1px solid var( --os-border, rgba( 0, 0, 0, 0.08 ) );
167 }
168
169 .dm-agent-chat__avatar {
170 flex: none;
171 }
172
173 .dm-agent-chat__title {
174 display: flex;
175 flex-direction: column;
176 min-width: 0;
177 }
178
179 .dm-agent-chat__desc {
180 font-size: 12px;
181 opacity: 0.65;
182 white-space: nowrap;
183 overflow: hidden;
184 text-overflow: ellipsis;
185 }
186
187 .dm-agent-chat__scroll {
188 flex: 1;
189 min-height: 0;
190 overflow-y: auto;
191 padding: 12px;
192 display: flex;
193 flex-direction: column;
194 gap: 10px;
195 }
196
197 .dm-agent-chat__msg {
198 max-width: 85%;
199 border-radius: 12px;
200 padding: 8px 12px;
201 display: flex;
202 flex-direction: column;
203 gap: 6px;
204 font-size: 13px;
205 line-height: 1.5;
206 }
207
208 .dm-agent-chat__msg--user {
209 align-self: flex-end;
210 background: var( --os-accent, #2271b1 );
211 color: #fff;
212 }
213
214 .dm-agent-chat__msg--agent {
215 align-self: flex-start;
216 background: var( --os-hover, rgba( 0, 0, 0, 0.06 ) );
217 }
218
219 .dm-agent-chat__msg--error {
220 align-self: flex-start;
221 /* Tokenized so the wash and its ink move together: a dark-red
222 literal on a translucent red wash reads fine over a white bubble
223 list and vanishes over a dark one. Literals unchanged. */
224 background: var( --os-ui-notice-error-bg, rgba( 214, 54, 56, 0.12 ) );
225 color: var( --os-ui-danger, #8a1f21 );
226 }
227
228 .dm-agent-chat__msg-text {
229 white-space: pre-wrap;
230 word-break: break-word;
231 }
232
233 .dm-agent-chat__tools {
234 font-size: 12px;
235 opacity: 0.8;
236 }
237
238 .dm-agent-chat__tools summary {
239 cursor: pointer;
240 }
241
242 .dm-agent-chat__tool {
243 font-family: monospace;
244 font-size: 11px;
245 padding: 2px 0;
246 word-break: break-all;
247 }
248
249 /* Call-to-action buttons under an agent answer. */
250 .dm-agent-chat__ctas {
251 display: flex;
252 flex-wrap: wrap;
253 gap: 8px;
254 margin-top: 2px;
255 }
256
257 /* The composer is one field. The textarea is still the kit's, but the
258 wrapper carries the chrome (field surface, border, focus bloom) and
259 the textarea's own box is flattened through its exported part, so
260 the send button sits inside the same border rather than beside it. */
261 .dm-agent-chat__composer {
262 display: flex;
263 align-items: flex-end;
264 gap: 6px;
265 margin: 10px 12px 12px;
266 padding: 4px 8px 4px 10px;
267 border: 1px solid var( --os-ui-field-border, var( --os-ui-border, #dcdcde ) );
268 border-radius: 12px;
269 background: var( --os-ui-field-bg, var( --os-window-bg, #fff ) );
270 transition: border-color 0.15s ease, box-shadow 0.15s ease;
271 }
272
273 .dm-agent-chat__composer:focus-within {
274 border-color: var( --os-ui-accent, #f252fc );
275 box-shadow: 0 0 0 3px
276 color-mix( in srgb, var( --os-ui-accent-dim, #f252fc ) 28%, transparent );
277 }
278
279 .dm-agent-chat__composer os-textarea {
280 flex: 1;
281 min-width: 0;
282 }
283
284 /* One line of 13px text at 1.45 is 18.85px; 6.5px above and below
285 makes the single-line textarea 31.85px, the send button's height,
286 so with the row bottom-aligned the two centres coincide on one line
287 and the button stays anchored at the bottom as the text grows. */
288 .dm-agent-chat__composer os-textarea::part( textarea ),
289 .dm-agent-chat__composer os-textarea::part( textarea ):hover,
290 .dm-agent-chat__composer os-textarea::part( textarea ):focus,
291 .dm-agent-chat__composer os-textarea::part( textarea ):focus-visible {
292 border: 0;
293 border-radius: 0;
294 background: transparent;
295 box-shadow: none;
296 outline: none;
297 padding: 6.5px 0;
298 }
299
300 /* Round and icon-only, a size down from a toolbar button so it reads
301 as part of the field rather than a control beside it. Sized through
302 the exported part: the host's width does not reach the inner button,
303 and a zero padding token on its own shrank it to the glyph. The
304 bottom margin is half the difference to the single-line textarea
305 (31.85px), so the two centres meet on one line and the button stays
306 anchored to the last line as the text grows. */
307 .dm-agent-chat__send {
308 flex: none;
309 margin-block-end: 4px;
310 }
311
312 .dm-agent-chat__send::part( button ) {
313 display: inline-flex;
314 align-items: center;
315 justify-content: center;
316 width: 24px;
317 height: 24px;
318 min-height: 0;
319 padding: 0;
320 border-radius: 999px;
321 }
322
323 .dm-agent-chat__send-icon {
324 display: block;
325 width: 14px;
326 height: 14px;
327 }
328
329 /* The accessible name, off-screen. */
330 .dm-agent-chat__send-label {
331 position: absolute;
332 width: 1px;
333 height: 1px;
334 padding: 0;
335 margin: -1px;
336 overflow: hidden;
337 clip: rect( 0, 0, 0, 0 );
338 white-space: nowrap;
339 border: 0;
340 }
341
342 @media ( prefers-reduced-motion: reduce ) {
343 .dm-agent-chat__composer {
344 transition: none;
345 }
346 }
347
348
349 .dm-agent-chat__line {
350 display: flex;
351 align-items: flex-end;
352 gap: 8px;
353 max-width: 88%;
354 }
355
356 .dm-agent-chat__line--agent,
357 .dm-agent-chat__line--error {
358 align-self: flex-start;
359 }
360
361 .dm-agent-chat__line--user {
362 align-self: flex-end;
363 flex-direction: row-reverse;
364 }
365
366 .dm-agent-chat__line .dm-agent-chat__msg {
367 align-self: auto;
368 max-width: none;
369 min-width: 0;
370 }
371
372 .dm-agent-chat__msg-avatar {
373 flex: none;
374 }
375
376 /* The object a drop / "Send to" handed the agent. Rendered instead of
377 the runner-facing sentence, and clickable — it opens the entity's
378 admin screen in its own window. */
379 .dm-agent-chat__attachment {
380 display: flex;
381 align-items: center;
382 gap: 8px;
383 inline-size: 100%;
384 min-inline-size: 0;
385 padding: 8px 10px;
386 border: 1px solid rgba( 255, 255, 255, 0.35 );
387 border-radius: 10px;
388 background: rgba( 255, 255, 255, 0.16 );
389 color: inherit;
390 font: inherit;
391 text-align: start;
392 cursor: pointer;
393 }
394
395 .dm-agent-chat__attachment:hover,
396 .dm-agent-chat__attachment:focus-visible {
397 background: rgba( 255, 255, 255, 0.28 );
398 }
399
400 .dm-agent-chat__msg--agent .dm-agent-chat__attachment,
401 .dm-agent-chat__msg--error .dm-agent-chat__attachment {
402 border-color: var( --os-border, rgba( 0, 0, 0, 0.12 ) );
403 background: rgba( 0, 0, 0, 0.04 );
404 }
405
406 .dm-agent-chat__msg--agent .dm-agent-chat__attachment:hover,
407 .dm-agent-chat__msg--error .dm-agent-chat__attachment:hover {
408 background: rgba( 0, 0, 0, 0.08 );
409 }
410
411 .dm-agent-chat__attachment-icon {
412 flex: none;
413 font-size: 20px;
414 inline-size: 20px;
415 block-size: 20px;
416 }
417
418 .dm-agent-chat__attachment-text {
419 flex: 1;
420 min-inline-size: 0;
421 display: flex;
422 flex-direction: column;
423 gap: 1px;
424 }
425
426 .dm-agent-chat__attachment-title {
427 font-weight: 600;
428 white-space: nowrap;
429 overflow: hidden;
430 text-overflow: ellipsis;
431 }
432
433 .dm-agent-chat__attachment-meta {
434 font-size: 11px;
435 opacity: 0.75;
436 }
437
438 .dm-agent-chat__attachment-open {
439 flex: none;
440 font-size: 15px;
441 inline-size: 15px;
442 block-size: 15px;
443 opacity: 0.7;
444 }
445
446 .dm-agent-chat__msg-caption {
447 font-size: 11px;
448 opacity: 0.75;
449 }
450
451 /* The in-flight bubble: wide enough to read as a live surface, not a
452 chip. The width lives on the LINE (its percentage resolves against
453 the message column; the bubble's own would resolve against the
454 shrink-to-fit line and collapse), and the bubble fills the line. */
455 .dm-agent-chat__line--pending {
456 min-width: min( 176px, 100% );
457 }
458
459 /* Spinner and label on one line, centred. The bubble is a flex column
460 everywhere else; the working row is the one place it reads as an
461 instrument line, arc first, then the word. */
462 .dm-agent-chat__line--pending .dm-agent-chat__msg {
463 flex: 1;
464 flex-direction: row;
465 align-items: center;
466 justify-content: center;
467 gap: 8px;
468 }
469
470 .dm-agent-chat__msg--pending os-spinner {
471 flex: none;
472 --os-ui-spinner-size: 16px;
473 }
474
475 /* Three motions say "working", each quiet on its own: the arc turns
476 (the component's), a sheen sweeps the label, and the agent's face
477 bobs beside the bubble. The sheen is the skeleton shimmer clipped
478 to text, so the label stays a real, selectable word rather than a
479 drawn one. Every one of them stops under reduced motion; the label
480 falls back to its plain colour, not to invisible text. */
481 .dm-agent-chat__msg--pending .dm-agent-chat__msg-text {
482 background: linear-gradient(
483 90deg,
484 currentColor 0%,
485 currentColor 35%,
486 var( --os-ui-accent, #f252fc ) 50%,
487 currentColor 65%,
488 currentColor 100%
489 );
490 background-size: 250% 100%;
491 -webkit-background-clip: text;
492 background-clip: text;
493 -webkit-text-fill-color: transparent;
494 animation: dm-agent-chat-sheen 1.8s ease-in-out infinite;
495 }
496
497 .dm-agent-chat__line--pending .dm-agent-chat__msg-avatar {
498 animation: dm-agent-chat-bob 1.4s ease-in-out infinite;
499 }
500
501 @keyframes dm-agent-chat-sheen {
502 from {
503 background-position: 125% 0;
504 }
505 to {
506 background-position: -125% 0;
507 }
508 }
509
510 @keyframes dm-agent-chat-bob {
511 0%,
512 100% {
513 transform: translateY( 0 );
514 }
515 50% {
516 transform: translateY( -3px );
517 }
518 }
519
520 @media ( prefers-reduced-motion: reduce ) {
521 .dm-agent-chat__msg--pending .dm-agent-chat__msg-text {
522 animation: none;
523 background: none;
524 -webkit-text-fill-color: currentColor;
525 }
526 .dm-agent-chat__line--pending .dm-agent-chat__msg-avatar {
527 animation: none;
528 }
529 }
530
531 /* Markdown content inside agent bubbles. */
532 .dm-agent-chat__msg-text p {
533 margin: 0 0 0.5em;
534 }
535
536 .dm-agent-chat__msg-text p:last-child {
537 margin-bottom: 0;
538 }
539
540 .dm-agent-chat__msg-text ul,
541 .dm-agent-chat__msg-text ol {
542 margin: 0 0 0.5em;
543 padding-left: 1.4em;
544 }
545
546 .dm-agent-chat__msg-text h3,
547 .dm-agent-chat__msg-text h4,
548 .dm-agent-chat__msg-text h5,
549 .dm-agent-chat__msg-text h6 {
550 margin: 0.6em 0 0.3em;
551 font-size: 1em;
552 line-height: 1.3;
553 }
554
555 .dm-agent-chat__msg-text h3:first-child,
556 .dm-agent-chat__msg-text h4:first-child,
557 .dm-agent-chat__msg-text h5:first-child,
558 .dm-agent-chat__msg-text h6:first-child {
559 margin-top: 0;
560 }
561
562 .dm-agent-chat__msg-text hr {
563 border: 0;
564 border-top: 1px solid rgba( 0, 0, 0, 0.12 );
565 margin: 0.6em 0;
566 }
567
568 .dm-agent-chat__msg-text code {
569 background: rgba( 0, 0, 0, 0.07 );
570 padding: 0.1em 0.35em;
571 border-radius: 4px;
572 font-size: 0.92em;
573 }
574
575 .dm-agent-chat__msg--user .dm-agent-chat__msg-text code {
576 background: rgba( 255, 255, 255, 0.2 );
577 }
578