Files
qwen-code/packages/web-shell/client/components/ChatContextHeader.module.css
T
ytahdn 99214d5308 feat(web-shell): move the workspace and git chips out of the composer toolbar (#12299)
The workspace selector and the git branch chip both say where a prompt goes,
not how it runs, yet they sat inside the composer toolbar between the "+" menu
and the mode/model controls. In an existing session that was worse than
cosmetic: the workspace selector only ever acts on the next session, so it sat
among controls that act on the current one.

ChatEditor takes a contextChipPlacement prop. While the chat is empty it moves
both chips into their own row under the composer box, so the composer stays
about the prompt; once the session exists the chat header reports the workspace
as a single leading folder icon, with the folder name and full path on hover,
and the composer keeps only git. The header icon uses the same glyph whether or
not a workspace exists -- only the tooltip differs -- because a single icon is
the one place that always answers which workspace the session is in.
2026-09-20 09:19:53 +00:00

99 lines
1.7 KiB
CSS

.header {
display: flex;
min-width: 0;
min-height: 52px;
flex: 1 1 auto;
align-items: center;
gap: 0;
padding: 8px 20px 8px 12px;
}
.content {
min-width: 0;
flex: 1 1 auto;
overflow: hidden;
color: var(--foreground);
font-size: 14px;
font-weight: 600;
text-overflow: ellipsis;
white-space: nowrap;
}
.actions {
display: flex;
flex: 0 0 auto;
align-items: center;
gap: 6px;
}
.workspaceIcon {
display: inline-flex;
width: 30px;
height: 30px;
flex: 0 0 auto;
align-items: center;
justify-content: center;
margin-right: 2px;
border-radius: 10px;
color: var(--foreground);
}
.workspaceIcon:hover {
background: var(--accent);
}
.workspaceIcon svg {
width: 15px;
height: 15px;
stroke-width: 1.7;
}
/* The tooltip is the only place the workspace behind an icon-only trigger can
be read, so it carries the name and the full path. */
.workspaceTooltip {
display: flex;
flex-direction: column;
gap: 2px;
}
/* The workspace's own name is the tooltip's subject, so it carries the weight
and the size; the path below stays a quiet second line. */
.workspaceTooltipName {
font-size: 13px;
font-weight: 600;
}
.workspaceTooltipPath {
color: var(--muted-foreground);
font-size: 11px;
overflow-wrap: anywhere;
}
.action {
display: inline-flex;
width: 30px;
height: 30px;
align-items: center;
justify-content: center;
padding: 0;
border: 1px solid transparent;
border-radius: 10px;
background: transparent;
color: var(--muted-foreground);
cursor: pointer;
}
.action:hover,
.action:focus-visible,
.action[aria-pressed='true'] {
background: var(--accent);
color: var(--foreground);
outline: none;
}
.action svg {
width: 15px;
height: 15px;
stroke-width: 1.7;
}