Move summarize button inside of context view (#4015)

This commit is contained in:
David Katz
2025-08-12 11:36:29 -04:00
committed by GitHub
parent 3201381354
commit dab1415fdd
5 changed files with 103 additions and 12 deletions
@@ -60,6 +60,19 @@ export const AlertBox = ({ alert, className }: AlertBoxProps) => {
: alert.progress!.total}
</span>
</div>
{alert.showSummarizeButton && alert.onSummarize && (
<button
onClick={(e) => {
e.preventDefault();
e.stopPropagation();
alert.onSummarize!();
}}
className="flex items-center gap-1.5 text-[11px] hover:opacity-80 cursor-pointer outline-none mt-1"
>
{alert.summarizeIcon}
<span>Summarize now</span>
</button>
)}
</div>
) : (
<>
@@ -16,4 +16,7 @@ export interface Alert {
current: number;
total: number;
};
showSummarizeButton?: boolean;
onSummarize?: () => void;
summarizeIcon?: React.ReactNode;
}