Skip to content

Commit 493367a

Browse files
committed
feat(ai): styles for the token split tips and a flush turn line
The usage tips now serve two kinds: the day under the pointer on the start-screen card, and a token split by kind, on the card's tokens figure or under a turn line. Both live on the body so neither the card's overflow nor the scrolling messages can clip them. The tokens that open a split carry a dotted underline. The usage line under an answer loses its 14px indent and sits flush with the answer and its label.
1 parent 8b1ec63 commit 493367a

1 file changed

Lines changed: 48 additions & 4 deletions

File tree

‎src/styles/Extn-AIChatPanel.less‎

Lines changed: 48 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -6077,7 +6077,8 @@
60776077
display: flex;
60786078
align-items: center;
60796079
gap: 8px;
6080-
margin: -2px 0 10px 14px;
6080+
// Flush with the answer above it and its "Claude" label.
6081+
margin: -2px 0 10px;
60816082
font-size: @ai-text-meta;
60826083
color: @project-panel-text-2;
60836084
white-space: nowrap;
@@ -6091,6 +6092,16 @@
60916092
opacity: 0.5;
60926093
}
60936094

6095+
// The tokens open their split by kind on hover; the dotted rule hints at it.
6096+
.ai-usage-turn-tokens {
6097+
border-bottom: 1px dotted fade(@project-panel-text-1, 50%);
6098+
cursor: default;
6099+
6100+
&:hover {
6101+
color: @project-panel-text-1;
6102+
}
6103+
}
6104+
60946105
&.ai-usage-hidden {
60956106
display: none;
60966107
}
@@ -6324,6 +6335,12 @@
63246335
font-weight: 600;
63256336
line-height: 1.15;
63266337
}
6338+
6339+
// The tokens figure opens its split by kind on hover; the dotted rule hints at it.
6340+
.ai-usage-stat-kinds b {
6341+
align-self: flex-start;
6342+
border-bottom: 1px dotted fade(@project-panel-text-1, 50%);
6343+
}
63276344
}
63286345

63296346
.ai-usage-stat {
@@ -6449,9 +6466,11 @@
64496466
to { transform: rotate(360deg); }
64506467
}
64516468

6452-
/* The day under the pointer, in the grid or the bars. Lives on the body so
6453-
the card's overflow cannot clip it. */
6454-
.ai-usage-day-tip {
6469+
/* The usage tips: the day under the pointer on the start-screen card, and a
6470+
token split there or under a turn line. They live on the body so neither the
6471+
card's overflow nor the scrolling messages can clip them. */
6472+
.ai-usage-day-tip,
6473+
.ai-usage-turn-tip {
64556474
position: fixed;
64566475
z-index: 1000;
64576476
min-width: 196px;
@@ -6539,4 +6558,29 @@
65396558
.ai-usage-tip-amt {
65406559
font-variant-numeric: tabular-nums;
65416560
}
6561+
6562+
// The tokens figure's split: kind, count and share, the total under a rule. A kind
6563+
// with nothing in it stays in its place, dimmed.
6564+
.ai-usage-tip-kind {
6565+
display: grid;
6566+
grid-template-columns: 1fr auto 34px;
6567+
gap: 12px;
6568+
padding: 2px 0;
6569+
white-space: nowrap;
6570+
6571+
.ai-usage-tip-amt,
6572+
.ai-usage-tip-pct {
6573+
text-align: right;
6574+
}
6575+
6576+
&.ai-usage-tip-none {
6577+
color: @project-panel-text-2;
6578+
}
6579+
6580+
&.ai-usage-tip-total {
6581+
border-top: 1px solid @ai-start-border;
6582+
margin-top: 4px;
6583+
padding-top: 6px;
6584+
}
6585+
}
65426586
}

0 commit comments

Comments
 (0)