Skip to content

Commit b01f8b7

Browse files
samhvw8cte
authored andcommitted
feat(ui): sync BatchDiffApproval styling with BatchFilePermission (#4640)
1 parent 439f29f commit b01f8b7

File tree

1 file changed

+18
-16
lines changed

1 file changed

+18
-16
lines changed

webview-ui/src/components/chat/BatchDiffApproval.tsx

Lines changed: 18 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -33,22 +33,24 @@ export const BatchDiffApproval = memo(({ files = [], ts }: BatchDiffApprovalProp
3333

3434
return (
3535
<div className="pt-[5px]">
36-
{files.map((file) => {
37-
// Combine all diffs into a single diff string for this file
38-
const combinedDiff = file.diffs?.map((diff) => diff.content).join("\n\n") || file.content
39-
40-
return (
41-
<div key={`${file.path}-${ts}`} className="mb-2">
42-
<CodeAccordian
43-
path={file.path}
44-
code={combinedDiff}
45-
language="diff"
46-
isExpanded={expandedFiles[file.path] || false}
47-
onToggleExpand={() => handleToggleExpand(file.path)}
48-
/>
49-
</div>
50-
)
51-
})}
36+
<div className="flex flex-col gap-0 border border-border rounded-md p-1">
37+
{files.map((file) => {
38+
// Combine all diffs into a single diff string for this file
39+
const combinedDiff = file.diffs?.map((diff) => diff.content).join("\n\n") || file.content
40+
41+
return (
42+
<div key={`${file.path}-${ts}`}>
43+
<CodeAccordian
44+
path={file.path}
45+
code={combinedDiff}
46+
language="diff"
47+
isExpanded={expandedFiles[file.path] || false}
48+
onToggleExpand={() => handleToggleExpand(file.path)}
49+
/>
50+
</div>
51+
)
52+
})}
53+
</div>
5254
</div>
5355
)
5456
})

0 commit comments

Comments
 (0)