Skip to content

Commit 7464982

Browse files
committed
Improve ACP tool call diff display
1 parent bd86bbc commit 7464982

5 files changed

Lines changed: 462 additions & 99 deletions

File tree

anycode/components/agent/AcpMessage.css

Lines changed: 82 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -164,6 +164,10 @@
164164
background: transparent;
165165
}
166166

167+
.acp-diff-code {
168+
max-height: 40vh;
169+
}
170+
167171
.acp-code-block-fallback {
168172
margin: 0;
169173
padding: 0.75em;
@@ -221,11 +225,6 @@
221225
color: white;
222226
}
223227

224-
.acp-message-assistant .acp-message-content {
225-
/* background-color: var(--assistant-message-bg, #2a2a2a); */
226-
/* color: var(--text-color, #ccc); */
227-
}
228-
229228
.acp-message-thought .acp-message-content {
230229
/* background-color: var(--assistant-message-bg, #2a2a2a); */
231230
color: var(--text-color-secondary, #888);
@@ -247,6 +246,15 @@
247246
overflow-x: hidden;
248247
}
249248

249+
.acp-tool-call-expanded {
250+
display: flex;
251+
flex-direction: column;
252+
gap: 12px;
253+
margin-top: 10px;
254+
animation: acp-tool-call-expand 180ms cubic-bezier(0.2, 0.8, 0.2, 1);
255+
transform-origin: top;
256+
}
257+
250258
.acp-message-tool_result {
251259
align-items: flex-start;
252260
}
@@ -260,6 +268,75 @@
260268
overflow-x: hidden;
261269
}
262270

271+
.acp-tool-call-diffs {
272+
display: flex;
273+
flex-direction: column;
274+
gap: 10px;
275+
}
276+
277+
.acp-tool-call-toggle-main {
278+
display: flex;
279+
align-items: center;
280+
justify-content: space-between;
281+
gap: 12px;
282+
flex: 1;
283+
min-width: 0;
284+
}
285+
286+
.acp-tool-call-toggle-title {
287+
display: flex;
288+
align-items: center;
289+
gap: 8px;
290+
min-width: 0;
291+
}
292+
293+
.acp-tool-call-kind-badge {
294+
flex: 0 0 auto;
295+
padding: 2px 6px;
296+
border-radius: 999px;
297+
background: rgba(76, 195, 138, 0.16);
298+
color: #4cc38a;
299+
font-size: 11px;
300+
font-weight: 600;
301+
line-height: 1.2;
302+
text-transform: uppercase;
303+
}
304+
305+
.acp-tool-call-toggle-stats {
306+
display: flex;
307+
align-items: center;
308+
gap: 8px;
309+
white-space: nowrap;
310+
font-family: "JetBrains Mono", monospace;
311+
font-size: 12px;
312+
}
313+
314+
.acp-tool-call-diff {
315+
display: flex;
316+
flex-direction: column;
317+
gap: 6px;
318+
}
319+
320+
.acp-tool-call-diff-added {
321+
color: #4cc38a;
322+
}
323+
324+
.acp-tool-call-diff-deleted {
325+
color: #ff6b6b;
326+
}
327+
328+
@keyframes acp-tool-call-expand {
329+
from {
330+
opacity: 0;
331+
transform: translateY(-4px) scaleY(0.98);
332+
}
333+
334+
to {
335+
opacity: 1;
336+
transform: translateY(0) scaleY(1);
337+
}
338+
}
339+
263340
.acp-message-tool_update {
264341
align-items: flex-start;
265342
}

0 commit comments

Comments
 (0)