Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions .changeset/bright-files-count.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"kilo-code": patch
---

Show aggregate added and removed line counts for multi-file patch tool calls.
12 changes: 12 additions & 0 deletions packages/kilo-ui/src/components/basic-tool.css
Original file line number Diff line number Diff line change
Expand Up @@ -238,6 +238,18 @@ html[data-theme="kilo-vscode"] [data-component="tool-part-wrapper"][data-part-ty
color: var(--text-weak);
}

[data-slot="message-part-tool-changes"] {
display: inline-flex;
align-items: baseline;
flex-shrink: 0;
}

[data-slot="basic-tool-tool-subtitle"] + [data-slot="message-part-tool-changes"]::before {
content: "·";
margin-right: 6px;
color: var(--text-weak);
}

[data-slot="basic-tool-tool-title"],
[data-slot="basic-tool-tool-subtitle"],
[data-slot="basic-tool-tool-arg"],
Expand Down
15 changes: 12 additions & 3 deletions packages/kilo-ui/src/components/message-part.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -1844,12 +1844,12 @@ function ToolMetaLine(props: {
)
}

function ToolChanges(props: { changes: DiffValue; animate?: boolean }) {
function ToolChanges(props: { changes: DiffValue; animate?: boolean; slot?: string }) {
let ref: HTMLDivElement | undefined
useToolFade(() => ref, { delay: 0.04, animate: props.animate })

return (
<div ref={ref}>
<div ref={ref} data-slot={props.slot}>
<DiffChanges changes={props.changes} />
</div>
)
Expand Down Expand Up @@ -2764,7 +2764,16 @@ ToolRegistry.register({
/>
)}
</Show>
<Show when={!single() && subtitle()}>{(text) => <ToolText text={text()} animate={reveal()} />}</Show>
<Show when={!single() && subtitle()}>
{(text) => (
<>
<ToolText text={text()} animate={reveal()} />
<Show when={files().some((file) => file.additions > 0 || file.deletions > 0)}>
<ToolChanges changes={files()} animate={reveal()} slot="message-part-tool-changes" />
</Show>
</>
)}
</Show>
</div>
</div>
</div>
Expand Down
Loading