Move summarize button inside of context view (#4015)
This commit is contained in:
@@ -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;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user