mirror of
https://github.com/openclaw/openclaw.git
synced 2026-05-06 19:20:43 +00:00
feat(ui): steer queued chat messages
This commit is contained in:
@@ -646,6 +646,59 @@
|
||||
background: color-mix(in srgb, var(--danger) 85%, #fff);
|
||||
}
|
||||
|
||||
.chat-queue__item--steered {
|
||||
border-color: color-mix(in srgb, var(--accent) 30%, var(--border));
|
||||
}
|
||||
|
||||
.chat-queue__main {
|
||||
min-width: 0;
|
||||
}
|
||||
|
||||
.chat-queue__actions {
|
||||
display: flex;
|
||||
align-items: flex-start;
|
||||
gap: 6px;
|
||||
}
|
||||
|
||||
.chat-queue__steer {
|
||||
align-self: start;
|
||||
display: inline-flex;
|
||||
align-items: center;
|
||||
gap: 4px;
|
||||
padding: 4px 8px;
|
||||
color: var(--accent);
|
||||
font-size: 12px;
|
||||
line-height: 1;
|
||||
}
|
||||
|
||||
.chat-queue__steer svg {
|
||||
width: 13px;
|
||||
height: 13px;
|
||||
fill: none;
|
||||
stroke: currentColor;
|
||||
stroke-width: 1.5px;
|
||||
stroke-linecap: round;
|
||||
stroke-linejoin: round;
|
||||
}
|
||||
|
||||
.chat-queue__steer:hover:not(:disabled) {
|
||||
background: color-mix(in srgb, var(--accent) 12%, transparent);
|
||||
}
|
||||
|
||||
.chat-queue__badge {
|
||||
display: inline-flex;
|
||||
width: fit-content;
|
||||
margin-bottom: 6px;
|
||||
flex-shrink: 0;
|
||||
padding: 2px 6px;
|
||||
border-radius: var(--radius-sm);
|
||||
background: color-mix(in srgb, var(--accent) 12%, transparent);
|
||||
color: var(--accent);
|
||||
font-size: 0.68rem;
|
||||
font-weight: 600;
|
||||
line-height: 1.2;
|
||||
}
|
||||
|
||||
.slash-menu {
|
||||
position: absolute;
|
||||
bottom: 100%;
|
||||
|
||||
19
ui/src/styles/chat/layout.test.ts
Normal file
19
ui/src/styles/chat/layout.test.ts
Normal file
@@ -0,0 +1,19 @@
|
||||
import { existsSync, readFileSync } from "node:fs";
|
||||
import { resolve } from "node:path";
|
||||
import { describe, expect, it } from "vitest";
|
||||
|
||||
describe("chat steer styles", () => {
|
||||
it("styles queued-message steering controls and pending indicators", () => {
|
||||
const cssPath = [
|
||||
resolve(process.cwd(), "src/styles/chat/layout.css"),
|
||||
resolve(process.cwd(), "ui/src/styles/chat/layout.css"),
|
||||
].find((candidate) => existsSync(candidate));
|
||||
expect(cssPath).toBeTruthy();
|
||||
const css = readFileSync(cssPath!, "utf8");
|
||||
|
||||
expect(css).toContain(".chat-queue__steer");
|
||||
expect(css).toContain(".chat-queue__actions");
|
||||
expect(css).toContain(".chat-queue__item--steered");
|
||||
expect(css).toContain(".chat-queue__badge");
|
||||
});
|
||||
});
|
||||
Reference in New Issue
Block a user