Skip to content

Open-source platform for 3D AI agents. Turn text or a photo into a rigged, animated GLB avatar, give it an LLM brain, memory and a wallet, and embed it anywhere with one web component. Remote MCP server, x402 payments, Three.js, browser-native.

9.1 KB
Raw Blame
/* The desktop assistant: a frosted pane docked to the right edge above the taskbar. */

.asx {
	position: absolute;
	top: 10px;
	right: 10px;
	bottom: calc(var(--task-h, 48px) + 10px);
	z-index: 10001;
	width: min(400px, calc(100vw - 20px));
	display: flex;
	flex-direction: column;
	color: var(--text);
	background: color-mix(in srgb, var(--bg) 58%, transparent);
	backdrop-filter: blur(48px) saturate(1.8);
	-webkit-backdrop-filter: blur(48px) saturate(1.8);
	border: 1px solid color-mix(in srgb, var(--text) 10%, transparent);
	border-radius: 20px;
	box-shadow: 0 30px 80px -20px rgb(0 0 0 / 0.6);
	font-size: 13.5px;
	overflow: hidden;
	transform: translateX(calc(100% + 24px));
	opacity: 0;
	transition:
		transform var(--duration-base) var(--ease-standard),
		opacity var(--duration-base);
}
.asx.in {
	transform: none;
	opacity: 1;
}
.asx :focus-visible {
	outline: 2px solid var(--accent);
	outline-offset: 2px;
}

.asx-head {
	display: flex;
	align-items: center;
	gap: 8px;
	padding: 10px 10px 8px 12px;
	border-bottom: 1px solid color-mix(in srgb, var(--text) 8%, transparent);
}
.asx-who {
	display: flex;
	align-items: center;
	gap: 10px;
	min-width: 0;
	padding: 4px 8px 4px 4px;
	border: 0;
	border-radius: 12px;
	background: none;
	color: var(--text);
	font: inherit;
	text-align: left;
	cursor: pointer;
}
.asx-who:hover,
.asx-who[aria-expanded='true'] {
	background: color-mix(in srgb, var(--text) 7%, transparent);
}
.asx-who > span {
	display: grid;
	min-width: 0;
}
.asx-who b {
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
}
.asx-who small {
	color: var(--text2);
	font-size: 11px;
}
.asx-who > .ico {
	transform: rotate(90deg);
	color: var(--text2);
	flex: none;
}
.asx img,
.asx i:not(.asx-dots i) {
	flex: none;
	width: 32px;
	height: 32px;
	border-radius: 10px;
	object-fit: cover;
	display: grid;
	place-items: center;
	font-style: normal;
	font-weight: 700;
	color: #fff;
	background: linear-gradient(135deg, var(--theme-1, #ad6eca), var(--theme-2, #3b91d8));
}
.asx-logo.big {
	width: 56px;
	height: 56px;
	border-radius: 18px;
}
.asx-tools {
	margin-left: auto;
	display: flex;
	gap: 2px;
}
.asx-ib {
	display: grid;
	place-items: center;
	width: 34px;
	height: 34px;
	border: 0;
	border-radius: 10px;
	background: none;
	color: var(--text2);
	cursor: pointer;
}
.asx-ib:hover {
	background: color-mix(in srgb, var(--text) 8%, transparent);
	color: var(--text);
}
.asx-ib:active {
	transform: scale(0.94);
}

/* agent picker */
.asx-pick {
	display: flex;
	flex-direction: column;
	gap: 6px;
	padding: 10px;
	max-height: 55%;
	border-bottom: 1px solid color-mix(in srgb, var(--text) 8%, transparent);
	background: color-mix(in srgb, var(--card) 50%, transparent);
}
.asx-pick[hidden] {
	display: none;
}
.asx-search {
	display: flex;
	align-items: center;
	gap: 8px;
	padding: 0 10px;
	height: 36px;
	border-radius: 10px;
	border: 1px solid color-mix(in srgb, var(--text) 10%, transparent);
	background: color-mix(in srgb, var(--card) 80%, transparent);
	color: var(--text2);
}
.asx-search:focus-within {
	border-color: var(--accent);
}
.asx-search input {
	flex: 1;
	min-width: 0;
	border: 0;
	background: none;
	color: var(--text);
	font: inherit;
	outline: none;
}
.asx-pick ul {
	list-style: none;
	margin: 0;
	padding: 0;
	overflow: auto;
	display: grid;
	gap: 2px;
}
.asx-pick li button {
	width: 100%;
	display: flex;
	align-items: center;
	gap: 10px;
	padding: 6px 8px;
	border: 0;
	border-radius: 10px;
	background: none;
	color: var(--text);
	font: inherit;
	text-align: left;
	cursor: pointer;
}
.asx-pick li button > span {
	display: grid;
	min-width: 0;
}
.asx-pick li small {
	color: var(--text2);
	font-size: 11.5px;
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
}
.asx-pick li button:hover {
	background: color-mix(in srgb, var(--text) 7%, transparent);
}
.asx-pick li button[aria-selected='true'] {
	background: color-mix(in srgb, var(--accent) 16%, transparent);
}
.asx-pick > small {
	color: var(--text2);
	font-size: 12px;
	padding: 0 4px;
}
.asx-pick > small:empty {
	display: none;
}

/* conversation */
.asx-log {
	flex: 1;
	min-height: 0;
	overflow: auto;
	overscroll-behavior: contain;
	padding: 14px 14px 6px;
	display: flex;
	flex-direction: column;
	gap: 10px;
	scrollbar-width: thin;
}
.asx-hello {
	margin: auto 0;
	display: grid;
	justify-items: center;
	gap: 8px;
	text-align: center;
	padding: 12px 6px;
}
.asx-hello img,
.asx-hello > i {
	width: 56px;
	height: 56px;
	border-radius: 18px;
	font-size: 22px;
}
.asx-hello b {
	font-size: 18px;
	font-weight: 650;
}
.asx-hello span {
	color: var(--text2);
	max-width: 30ch;
}
.asx-sugs {
	display: grid;
	gap: 6px;
	width: 100%;
	margin-top: 10px;
}
.asx-sugs button {
	padding: 10px 12px;
	border-radius: 12px;
	border: 1px solid color-mix(in srgb, var(--text) 10%, transparent);
	background: color-mix(in srgb, var(--card) 60%, transparent);
	color: var(--text);
	font: inherit;
	text-align: left;
	cursor: pointer;
	transition:
		background var(--duration-fast),
		border-color var(--duration-fast);
}
.asx-sugs button:hover {
	background: color-mix(in srgb, var(--card) 90%, transparent);
	border-color: color-mix(in srgb, var(--accent) 50%, transparent);
}
.asx-sugs button:active {
	transform: scale(0.99);
}
.asx-msg {
	max-width: 88%;
	line-height: 1.5;
	overflow-wrap: anywhere;
}
.asx-msg.me {
	align-self: flex-end;
	padding: 8px 12px;
	border-radius: 16px 16px 4px 16px;
	background: var(--accent);
	color: #fff;
	white-space: pre-wrap;
}
.asx-msg.ai {
	align-self: flex-start;
	max-width: 100%;
}
.asx-msg.ai p,
.asx-msg.ai ul,
.asx-msg.ai ol,
.asx-msg.ai pre,
.asx-msg.ai h4 {
	margin: 0 0 8px;
}
.asx-msg.ai > :last-child {
	margin-bottom: 0;
}
.asx-msg.ai ul,
.asx-msg.ai ol {
	padding-left: 20px;
}
.asx-msg.ai h4 {
	font-size: 14px;
}
.asx-msg.ai a {
	color: var(--accent);
	text-underline-offset: 2px;
}
.asx-msg code {
	padding: 1px 5px;
	border-radius: 5px;
	font-size: 12.5px;
	background: color-mix(in srgb, var(--text) 9%, transparent);
	overflow-wrap: anywhere;
}
.asx-msg pre {
	padding: 10px;
	border-radius: 10px;
	overflow: auto;
	background: color-mix(in srgb, var(--text) 8%, transparent);
}
.asx-msg pre code {
	padding: 0;
	background: none;
}
.asx-msg.typing > :last-child::after {
	content: '';
	display: inline-block;
	width: 7px;
	height: 14px;
	margin-left: 2px;
	vertical-align: -2px;
	border-radius: 2px;
	background: var(--accent);
	animation: asx-blink 1s steps(2) infinite;
}
@keyframes asx-blink {
	50% {
		opacity: 0;
	}
}
.asx-dots {
	display: inline-flex;
	gap: 4px;
	padding: 6px 0;
}
.asx-dots i {
	width: 7px;
	height: 7px;
	border-radius: 50%;
	background: var(--text2);
	animation: asx-bounce 1s infinite ease-in-out;
}
.asx-dots i:nth-child(2) {
	animation-delay: 0.15s;
}
.asx-dots i:nth-child(3) {
	animation-delay: 0.3s;
}
.asx-msg.typing .asx-dots::after {
	content: none;
}
@keyframes asx-bounce {
	0%,
	80%,
	100% {
		transform: translateY(0);
		opacity: 0.5;
	}
	40% {
		transform: translateY(-4px);
		opacity: 1;
	}
}
.asx-err {
	color: #f0524f;
	font-size: 12.5px;
}
[data-theme='light'] .asx-err {
	color: #c62f2c;
}
.asx-acts {
	display: flex;
	flex-wrap: wrap;
	gap: 6px;
	margin-top: 8px;
}
.asx-acts button {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	height: 32px;
	padding: 0 12px;
	border-radius: 99px;
	border: 1px solid color-mix(in srgb, var(--accent) 45%, transparent);
	background: color-mix(in srgb, var(--accent) 12%, transparent);
	color: var(--text);
	font: inherit;
	font-size: 12.5px;
	font-weight: 600;
	cursor: pointer;
}
.asx-acts button:hover {
	background: color-mix(in srgb, var(--accent) 22%, transparent);
}
.asx-acts button:active {
	transform: scale(0.97);
}

/* composer */
.asx-form {
	display: flex;
	align-items: flex-end;
	gap: 8px;
	margin: 6px 12px 4px;
	padding: 6px 6px 6px 12px;
	border-radius: 16px;
	border: 1px solid color-mix(in srgb, var(--text) 12%, transparent);
	background: color-mix(in srgb, var(--card) 80%, transparent);
}
.asx-form:focus-within {
	border-color: var(--accent);
}
.asx-form textarea {
	flex: 1;
	min-width: 0;
	resize: none;
	max-height: 160px;
	padding: 7px 0;
	border: 0;
	background: none;
	color: var(--text);
	font: inherit;
	line-height: 1.4;
	outline: none;
}
.asx-form textarea:focus-visible {
	outline: none;
}
.asx-form textarea::placeholder {
	color: var(--text2);
}
.asx-send {
	flex: none;
	display: grid;
	place-items: center;
	width: 34px;
	height: 34px;
	border: 0;
	border-radius: 11px;
	background: var(--accent);
	color: #fff;
	cursor: pointer;
	transition:
		opacity var(--duration-fast),
		transform var(--duration-instant);
}
.asx-send:hover:not(:disabled) {
	background: color-mix(in srgb, var(--accent) 86%, #fff);
}
.asx-send:active:not(:disabled) {
	transform: scale(0.94);
}
.asx-send:disabled {
	opacity: 0.4;
	cursor: default;
}
.asx-send.stop {
	background: color-mix(in srgb, var(--text) 80%, transparent);
	color: var(--bg);
}
.asx-foot {
	margin: 0;
	padding: 2px 14px 10px;
	color: var(--text2);
	font-size: 10.5px;
	text-align: center;
}

@media (max-width: 640px) {
	.asx {
		top: 8px;
		right: 8px;
		left: 8px;
		width: auto;
	}
}
@media (prefers-reduced-motion: reduce) {
	.asx {
		transition: none;
	}
	.asx-dots i,
	.asx-msg.typing > :last-child::after {
		animation: none;
	}
}