Skip to content

Commit 501cd56

Browse files
committed
fix(web): hold running tool rows at full emphasis
1 parent ad27bb4 commit 501cd56

3 files changed

Lines changed: 20 additions & 5 deletions

File tree

apps/pythinker-web/src/components/chat/ToolRow.vue

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,6 +47,7 @@ function onHeadClick(): void {
4747
:class="{
4848
open,
4949
stacked,
50+
run: status === 'running' || status === 'suspended',
5051
err: status === 'error',
5152
'stack-first': stackPosition === 'first',
5253
'stack-middle': stackPosition === 'middle',
@@ -110,6 +111,10 @@ function onHeadClick(): void {
110111
border-top: 1px solid var(--color-line);
111112
}
112113
114+
/* Head text emphasis, inherited by slotted titles too: a settled row sits
115+
dimmed, hover/open restores legibility, and a running/suspended row holds
116+
full strength — then fades back out once it finishes. Slotted content
117+
(Edit/Read tool titles) picks this up via custom-property inheritance. */
113118
.bh {
114119
display: flex;
115120
align-items: center;
@@ -119,10 +124,15 @@ function onHeadClick(): void {
119124
cursor: pointer;
120125
font: var(--text-sm) var(--font-mono);
121126
color: var(--color-text);
127+
--emph: var(--color-text-muted);
122128
}
123129
.box.open .bh,
124130
.bh:hover {
125131
background: var(--color-surface-sunken);
132+
--emph: var(--color-text);
133+
}
134+
.box.run .bh {
135+
--emph: var(--color-text-strong);
126136
}
127137
.box.err .bh {
128138
background: color-mix(in srgb, var(--color-danger) 4%, var(--bg));
@@ -145,9 +155,10 @@ function onHeadClick(): void {
145155
min-width: 0;
146156
}
147157
.a {
148-
color: var(--color-text);
158+
color: var(--emph);
149159
font-weight: var(--weight-medium);
150160
flex: none;
161+
transition: color var(--duration-slow) var(--ease-out);
151162
}
152163
.p {
153164
color: var(--color-text-muted);

apps/pythinker-web/src/components/chat/tool-calls/EditTool.vue

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -118,9 +118,10 @@ function openFile(): void {
118118

119119
<style scoped>
120120
.tl-name {
121-
color: var(--color-text);
121+
color: var(--emph, var(--color-text));
122122
font-weight: var(--weight-medium);
123123
flex: none;
124+
transition: color var(--duration-slow) var(--ease-out);
124125
}
125126
.tl-ficon {
126127
display: inline-flex;
@@ -132,7 +133,7 @@ function openFile(): void {
132133
display: block;
133134
}
134135
.tl-file {
135-
color: var(--color-text);
136+
color: var(--emph, var(--color-text));
136137
line-height: var(--leading-tight);
137138
flex: none;
138139
max-width: 60%;
@@ -146,6 +147,7 @@ function openFile(): void {
146147
font-family: inherit;
147148
font-size: inherit;
148149
cursor: pointer;
150+
transition: color var(--duration-slow) var(--ease-out);
149151
}
150152
.tl-file:hover {
151153
color: var(--color-accent);

apps/pythinker-web/src/components/chat/tool-calls/ReadTool.vue

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -184,12 +184,13 @@ watch(
184184
display: block;
185185
}
186186
.tl-name {
187-
color: var(--color-text);
187+
color: var(--emph, var(--color-text));
188188
font-weight: var(--weight-medium);
189189
flex: none;
190+
transition: color var(--duration-slow) var(--ease-out);
190191
}
191192
.tl-file {
192-
color: var(--color-text);
193+
color: var(--emph, var(--color-text));
193194
line-height: var(--leading-tight);
194195
flex: none;
195196
max-width: 60%;
@@ -203,6 +204,7 @@ watch(
203204
font-family: inherit;
204205
font-size: inherit;
205206
cursor: pointer;
207+
transition: color var(--duration-slow) var(--ease-out);
206208
}
207209
.tl-file:hover {
208210
color: var(--color-accent);

0 commit comments

Comments
 (0)