Publish Claude Code Binaries / Stage and publish binaries (push) Canceled after 0s
Publish Tutti App Runtime / Build darwin-arm64 (push) Canceled after 0s
Publish Tutti App Runtime / Build darwin-amd64 (push) Canceled after 0s
Publish Tutti App Runtime / Build linux-amd64 (push) Canceled after 0s
Publish Tutti App Runtime / Build windows-amd64 (push) Canceled after 0s
Sync Tutti Agent Skills / sync (push) Canceled after 0s
Windows Agent Adapters / Test Windows agent adapters (push) Canceled after 0s
Windows Daemon Adapters / Test Windows daemon adapters (push) Canceled after 0s
Publish Tutti App Runtime / Publish runtime catalog (push) Canceled after 0s
57 lines
1.4 KiB
TypeScript
57 lines
1.4 KiB
TypeScript
import {
|
|
forwardRef,
|
|
type HTMLAttributes,
|
|
type ReactNode,
|
|
type JSX
|
|
} from "react";
|
|
import { CustomScrollArea } from "../app/renderer/components/ui/custom-scroll-area";
|
|
import { cn } from "../app/renderer/lib/utils";
|
|
|
|
export interface AgentVerticalScrollAreaProps extends HTMLAttributes<HTMLDivElement> {
|
|
children: ReactNode;
|
|
viewportClassName?: string;
|
|
scrollbarClassName?: string;
|
|
scrollbarThumbClassName?: string;
|
|
syncKey?: unknown;
|
|
}
|
|
|
|
export const AgentVerticalScrollArea = forwardRef<
|
|
HTMLDivElement,
|
|
AgentVerticalScrollAreaProps
|
|
>(function AgentVerticalScrollArea(
|
|
{
|
|
children,
|
|
className,
|
|
viewportClassName,
|
|
scrollbarClassName,
|
|
scrollbarThumbClassName,
|
|
syncKey,
|
|
...props
|
|
},
|
|
forwardedRef
|
|
): JSX.Element {
|
|
"use memo";
|
|
return (
|
|
<CustomScrollArea
|
|
ref={forwardedRef}
|
|
className={cn("agent-vertical-scroll-area min-h-0 min-w-0", className)}
|
|
viewportClassName={cn(
|
|
"min-h-0 min-w-0 overflow-x-hidden overflow-y-auto",
|
|
viewportClassName
|
|
)}
|
|
scrollbarClassName={cn(
|
|
"agent-vertical-scroll-area__scrollbar top-2 right-2 bottom-2",
|
|
scrollbarClassName
|
|
)}
|
|
scrollbarThumbClassName={cn(
|
|
"agent-vertical-scroll-area__scrollbar-thumb",
|
|
scrollbarThumbClassName
|
|
)}
|
|
syncKey={syncKey ?? children}
|
|
{...props}
|
|
>
|
|
{children}
|
|
</CustomScrollArea>
|
|
);
|
|
});
|