Consider it done. The open-source AI agent that works out of the box · 想到,就能做到。开源、开箱即用的 AI Agent。
TypeScript agentai-agentai-assistantandroidclaude-codecodexelectroniosllmmacosreact-nativetypescriptwindows
/* Answer primitives inherit the host theme and typography. No generated CSS or HTML. */
.rich-answer {
display: flex;
flex-direction: column;
gap: var(--rich-gap, var(--space-4));
min-width: 0;
container-type: inline-size;
}
.rich-answer p.rich-answer-text {
margin: 0;
white-space: pre-wrap;
overflow-wrap: anywhere;
}
.rich-answer h3.rich-answer-heading {
margin: 0;
font-size: var(--rich-fontSize, var(--text-lg));
font-weight: var(--rich-fontWeight, 500);
line-height: 1.5;
}
.rich-answer-layout {
display: flex;
gap: var(--rich-gap, var(--space-4));
min-width: 0;
}
.rich-answer-stack,
.rich-answer-group {
flex-direction: column;
}
.rich-answer-row {
flex-wrap: wrap;
}
.rich-answer-row > * {
flex: 1;
min-width: 0;
}
.rich-answer-grid {
display: grid;
grid-template-columns: var(--rich-ratio, repeat(var(--rich-columns, 2), minmax(0, 1fr)));
}
.rich-answer-aside {
grid-template-columns: var(--rich-ratio, minmax(100px, 0.7fr) minmax(0, 1.8fr));
}
.rich-answer-content {
min-width: 0;
}
.rich-answer-content img,
.rich-answer-content video {
max-width: 100%;
}
.rich-answer-caption {
color: var(--text-secondary);
font-size: var(--text-xs);
font-weight: 400;
}
.rich-answer-stat {
border-top: 1px solid var(--border-default);
padding-block: var(--space-3);
}
.rich-answer-stat output {
font-size: var(--text-2xl);
font-variant-numeric: tabular-nums;
}
.rich-answer-control {
display: flex;
flex-direction: column;
gap: var(--space-3);
min-width: 0;
}
.rich-answer-control-label {
display: flex;
justify-content: space-between;
gap: var(--space-3);
}
.rich-answer-check {
display: flex;
gap: var(--space-3);
align-items: center;
min-height: 36px;
}
.rich-answer-check input {
accent-color: var(--text-primary);
}
.rich-answer-select {
border: 1px solid var(--border-default);
border-radius: var(--radius-full);
padding: var(--space-2) var(--space-3);
background: var(--surface);
color: var(--text-primary);
min-height: 36px;
}
.rich-answer-select:focus-visible,
.rich-answer-check input:focus-visible {
outline: 2px solid var(--text-primary);
outline-offset: 2px;
}
.rich-answer-tabs {
display: flex;
flex-wrap: wrap;
gap: var(--space-2);
margin-bottom: var(--space-3);
}
.rich-answer-tabs [aria-selected='true'] {
font-weight: 600;
}
.rich-answer summary {
cursor: pointer;
min-height: 36px;
}
.rich-answer hr.rich-answer-divider {
border: 0;
border-top: 1px solid var(--border-default);
margin: var(--space-2) 0;
}
.rich-answer-chart {
margin: 0;
}
.rich-answer-chart svg {
display: block;
width: 100%;
max-height: 180px;
}
.rich-answer-chart dl {
display: flex;
flex-direction: column;
gap: var(--space-3);
margin: var(--space-3) 0 0;
}
.rich-answer-chart dd {
margin: 0;
}
.rich-answer-track {
height: 8px;
background: var(--surface-elevated);
border-radius: 2px;
overflow: hidden;
margin-top: var(--space-2);
}
.rich-answer-track > div {
height: 100%;
background: var(--text-secondary);
}
/* Two readable chart columns need more room than a phone-sized answer. */
@container (max-width:600px) {
.rich-answer-row {
flex-direction: column;
}
.rich-answer-grid {
grid-template-columns: repeat(var(--rich-mobile-columns, 1), minmax(0, 1fr));
}
.rich-answer-aside {
grid-template-columns: var(--rich-ratio, minmax(88px, 0.7fr) minmax(0, 1.8fr));
}
}
.rich-answer-body {
display: flex;
flex-direction: column;
gap: var(--rich-gap, var(--space-4));
min-width: 0;
}
.rich-answer-icon-row {
display: flex;
align-items: flex-start;
gap: var(--space-3);
}
.rich-answer-icon-row > svg {
flex-shrink: 0;
margin-top: var(--space-1);
}
.rich-answer-icon-row > div {
min-width: 0;
display: flex;
flex-direction: column;
gap: var(--space-2);
}
.rich-answer-icon-row strong {
font-weight: var(--rich-fontWeight, 500);
}
.rich-answer-chart-guide {
stroke: var(--border-default);
}
.rich-answer-chart-axis {
fill: var(--text-secondary);
font-size: var(--text-xs);
}
.rich-answer-chart-value {
fill: var(--text-primary);
font-size: var(--text-xs);
}
/* Model styles are inherited by the text inside compound primitives. */
.rich-answer-caption {
color: var(--rich-color, var(--text-secondary));
font-size: var(--rich-fontSize, var(--text-xs));
}
.rich-answer-stat output {
font-size: var(--rich-fontSize, var(--text-2xl));
}
.rich-answer-icon-row strong {
font-size: var(--rich-fontSize, inherit);
}
.rich-answer-text,
.rich-answer-heading,
.rich-answer-caption,
.rich-answer-stat output {
line-height: var(--rich-lineHeight, 1.5);
}
/* Apply media dimensions to the image itself; limiting only its wrapper makes
a tall image overlap subsequent text. Host preview defaults remain fallbacks. */
.rich-answer-media img,
.rich-answer-media video {
width: var(--rich-width, auto) !important;
max-width: 100% !important;
height: var(--rich-height, auto) !important;
min-height: var(--rich-minHeight, 0) !important;
max-height: var(--rich-maxHeight, min(40vh, 420px)) !important;
border-radius: var(--rich-borderRadius, var(--radius-xl)) !important;
object-fit: contain;
}
/* Inside a teammate's reply bubble (already the elevated surface), tracks and fields step down a level. */
[data-bot-reply-bubble] .rich-answer-track {
background: var(--surface);
}
[data-bot-reply-bubble] .rich-answer-control input {
background: var(--surface);
}