Review code faster with Anti-Slop intelligence.

Surfaces and explains critical parts, loads instantly, and groups similar PRs.

Try for free
ASI

Pull requests

Loading

Structured, readable diffs

Our intelligent diff engine pairs related changes together and removes noise.

ASI

ASI Enhanced Diffs

Related changes are intelligently paired together, making it easy to understand what actually changed

apps/web/components/markdown-renderer.tsx

Modified+34 -19
1import React, { useLayoutEffect, useRef, useState } from "react";
2import { Fade } from "./blur-fade/blur-fade";
import { useTheme } from "next-themes";
3import { cn } from "@workspace/ui/lib/utils";
4import { Button } from "@workspace/ui/components/button";
5import { Check, Copy, ChevronDown } from "lucide-react";
6import * as Collapsible from "@radix-ui/react-collapsible";
7
8const Root = ({
9 className,
10 children,
11 defaultOpen = true,
12 ...props
13}: React.ComponentProps<"div">) =>& {
14 defaultOpen?: boolean;
15}) => {
16 const [open, setOpen] = useState(defaultOpen);
17
18 return (
19 <Collapsible.Root open={open} onOpenChange={setOpen}>
20 <div
21 {...props}
22 className={cn(
23 "relative text-[13px] rounded-xl overflow-hidden border bg-code flex flex-col min-h-16",
24 className
25 )}
26 / >
27 {children}
28 </div>
29 </Collapsible.Root>
30 );
31};
32
33const Header: React.FC<React.HTMLAttributes<HTMLDivElement>> = ({
34 className,
35 children,
36 ...props
37}) => (
38 <Collapsible.Trigger asChild>
39 <div
40 {...props}
41 className={cn(
42 "absolute top-3 inset-x-4 z-20",
43 "flex items-center gap-2 justify-between",
44 className
45 )}
46 >
47 <Button variant="ghost" size="icon" className="h-8 w-8">
48 <ChevronDown className="h-4 w-4 transition-transform duration-200 [[data-state=open]_&]:rotate-180" />
49 </Button>
50 {children}
51 </div>
52 </Collapsible.Trigger>
53);
54
GitHub

Traditional unified diff

Github

Templates for every type of change

Just like Granola structures your notes based on meeting type, ASI structures your PRs with templates made for features, bugs, or custom patterns for your team.

feature
  1. Short description of problem solved (no headline)
  2. Short explanation of solution & why
  3. (optional) If something seems unclear or critical, highlight on top, use h3
  4. Use section headlines to group related file diffs
    1. File 1
      1. Explaination for file 1, use mermaid or bullet points to explain logic
      2. (optional) [!IMPORTANT] call out most critical part
      3. <DiffViewer/>
    2. Do this for EACH file in group
  5. (always if any) Excluded or filtered files and explanation. If none excluded, write nothing.