mirror of
https://github.com/QwenLM/qwen-code.git
synced 2026-08-22 15:15:18 +00:00
* feat(web-shell): add context mention customization * fix(web-shell): address context mention review comments * fix(web-shell): harden custom context rendering * fix(web-shell): guard custom tag render fallbacks * fix(web-shell): harden custom context rendering --------- Co-authored-by: 易良 <1204183885@qq.com> Co-authored-by: Shaojin Wen <shaojin.wensj@alibaba-inc.com>
212 lines
3.9 KiB
CSS
212 lines
3.9 KiB
CSS
.message {
|
|
margin-bottom: 12px;
|
|
display: flex;
|
|
gap: 8px;
|
|
align-items: baseline;
|
|
padding: 5px 0;
|
|
background: var(--accent);
|
|
}
|
|
|
|
.prefix {
|
|
color: var(--success-color);
|
|
font-weight: 700;
|
|
flex-shrink: 0;
|
|
}
|
|
|
|
.body {
|
|
flex: 1 1 auto;
|
|
min-width: 0;
|
|
color: var(--foreground);
|
|
white-space: pre-wrap;
|
|
word-break: break-word;
|
|
}
|
|
|
|
.images {
|
|
display: flex;
|
|
flex-wrap: wrap;
|
|
gap: 8px;
|
|
margin-bottom: 8px;
|
|
}
|
|
|
|
.imageThumb {
|
|
max-width: 200px;
|
|
max-height: 200px;
|
|
border-radius: 8px;
|
|
object-fit: contain;
|
|
border: 1px solid var(--border);
|
|
}
|
|
|
|
/* ---- Chat mode: right-aligned bubble layout ---- */
|
|
|
|
.chatMessageRow {
|
|
display: flex;
|
|
width: 100%;
|
|
justify-content: flex-end;
|
|
margin: 30px 0;
|
|
}
|
|
|
|
.chatBubble {
|
|
display: inline-block;
|
|
max-width: 80%;
|
|
padding: 8px 12px;
|
|
border-radius: 6px;
|
|
background: var(--accent);
|
|
color: var(--foreground);
|
|
font-family: var(--font-sans, system-ui, sans-serif);
|
|
font-size: 14px;
|
|
line-height: 1.5;
|
|
text-align: left;
|
|
}
|
|
|
|
.chatContent {
|
|
white-space: pre-wrap;
|
|
word-break: break-word;
|
|
}
|
|
|
|
.messageTag {
|
|
position: relative;
|
|
display: inline-flex;
|
|
max-width: min(44ch, 100%);
|
|
min-height: 20px;
|
|
align-items: center;
|
|
margin: 0 0.25ch;
|
|
border: 1px solid var(--border);
|
|
border-radius: 4px;
|
|
background: var(--secondary);
|
|
color: var(--foreground);
|
|
font-family: var(--font-mono, monospace);
|
|
font-size: 12px;
|
|
line-height: 1.2;
|
|
vertical-align: baseline;
|
|
}
|
|
|
|
.messageTagTooltip {
|
|
position: absolute;
|
|
z-index: calc(var(--web-shell-tooltip-z-index, 1000) + 1);
|
|
top: calc(100% + 6px);
|
|
left: 0;
|
|
min-width: 160px;
|
|
max-width: min(320px, 80vw);
|
|
padding: 8px 10px;
|
|
border: 1px solid var(--border);
|
|
border-radius: 6px;
|
|
background: var(--background);
|
|
box-shadow: 0 8px 24px rgba(0, 0, 0, 0.18);
|
|
color: var(--foreground);
|
|
font-family: var(--font-sans, system-ui, sans-serif);
|
|
font-size: 12px;
|
|
line-height: 1.5;
|
|
opacity: 0;
|
|
pointer-events: none;
|
|
transition:
|
|
opacity 120ms ease 0ms,
|
|
visibility 0ms linear 120ms;
|
|
visibility: hidden;
|
|
white-space: normal;
|
|
}
|
|
|
|
.messageTag:hover .messageTagTooltip,
|
|
.messageTag:focus-within .messageTagTooltip {
|
|
opacity: 1;
|
|
transition:
|
|
opacity 120ms ease 450ms,
|
|
visibility 0ms linear 450ms;
|
|
visibility: visible;
|
|
}
|
|
|
|
.messageTagClickable {
|
|
cursor: pointer;
|
|
}
|
|
|
|
.messageTagClickable:hover,
|
|
.messageTagClickable:focus-visible {
|
|
border-color: var(--chat-editor-accent-color, var(--foreground));
|
|
outline: none;
|
|
}
|
|
|
|
.messageTagIcon {
|
|
display: block;
|
|
width: 12px;
|
|
height: 12px;
|
|
flex: 0 0 auto;
|
|
margin-left: 7px;
|
|
background: currentColor;
|
|
mask: var(--user-message-tag-icon-url) center / contain no-repeat;
|
|
-webkit-mask: var(--user-message-tag-icon-url) center / contain no-repeat;
|
|
}
|
|
|
|
.messageTagLabel,
|
|
.messageTagValue {
|
|
min-width: 0;
|
|
overflow: hidden;
|
|
text-overflow: ellipsis;
|
|
white-space: nowrap;
|
|
}
|
|
|
|
.messageTagLabel {
|
|
padding: 3px 0 3px 7px;
|
|
color: var(--agent-blue-500);
|
|
}
|
|
|
|
.messageTagIcon + .messageTagLabel {
|
|
padding-left: 0.5ch;
|
|
}
|
|
|
|
.messageTagValue {
|
|
max-width: 32ch;
|
|
padding: 3px 0 3px 0.5ch;
|
|
color: var(--foreground, #e4e4e4);
|
|
opacity: 1;
|
|
}
|
|
|
|
.chatContentCollapsed {
|
|
max-height: 400px;
|
|
overflow: hidden;
|
|
}
|
|
|
|
.toggleButton {
|
|
display: inline-flex;
|
|
align-items: center;
|
|
gap: 6px;
|
|
margin-top: 10px;
|
|
padding: 0;
|
|
border: 0;
|
|
background: transparent;
|
|
color: var(--muted-foreground);
|
|
cursor: pointer;
|
|
font: inherit;
|
|
font-size: 14px;
|
|
line-height: 1.4;
|
|
}
|
|
|
|
.toggleButton:hover,
|
|
.toggleButton:focus-visible {
|
|
color: var(--foreground);
|
|
outline: none;
|
|
}
|
|
|
|
.toggleIcon {
|
|
width: 15px;
|
|
height: 15px;
|
|
stroke-width: 1.8;
|
|
transition: transform 120ms ease;
|
|
}
|
|
|
|
.toggleIconExpanded {
|
|
transform: rotate(180deg);
|
|
}
|
|
|
|
.chatImages {
|
|
display: flex;
|
|
flex-wrap: wrap;
|
|
gap: 8px;
|
|
margin-bottom: 8px;
|
|
}
|
|
|
|
.chatImageThumb {
|
|
max-width: 150px;
|
|
max-height: 150px;
|
|
border-radius: 8px;
|
|
object-fit: contain;
|
|
border: 1px solid var(--border);
|
|
}
|