* Add LLM post-processing feature with settings management and UI integration * Refactor LLM post-processing settings and prompt selection logic * Rename CLAUDE.md to more standard AGENTS.md * Replace Open Router with OpenAI Compatible endpoints for post-processing * Fix post processing settings api styles * refactor or something * simplify * cleanup a bit? * remove useless code * minor improvements * fix laggy textarea * Store post-processing results in db * fix text color * new default prompt --------- Co-authored-by: CJ Pais <cj@cjpais.com>
34 lines
896 B
TypeScript
34 lines
896 B
TypeScript
import React from "react";
|
|
import ResetIcon from "../icons/ResetIcon";
|
|
|
|
interface ResetButtonProps {
|
|
onClick: () => void;
|
|
disabled?: boolean;
|
|
className?: string;
|
|
ariaLabel?: string;
|
|
children?: React.ReactNode;
|
|
}
|
|
|
|
export const ResetButton: React.FC<ResetButtonProps> = React.memo(
|
|
({
|
|
onClick,
|
|
disabled = false,
|
|
className = "",
|
|
ariaLabel,
|
|
children,
|
|
}) => (
|
|
<button
|
|
type="button"
|
|
aria-label={ariaLabel}
|
|
className={`p-1 rounded border border-transparent transition-all duration-150 ${
|
|
disabled
|
|
? "opacity-50 cursor-not-allowed text-text/40"
|
|
: "hover:bg-logo-primary/30 active:bg-logo-primary/50 active:translate-y-[1px] hover:cursor-pointer hover:border-logo-primary text-text/80"
|
|
} ${className}`}
|
|
onClick={onClick}
|
|
disabled={disabled}
|
|
>
|
|
{children ?? <ResetIcon />}
|
|
</button>
|
|
),
|
|
);
|