mirror of
https://github.com/MODSetter/SurfSense.git
synced 2026-04-27 01:36:30 +02:00
- Replaced direct embedding calls with a utility function across various components to streamline embedding logic. - Added enable_summary flag to several models and routes to control summary generation behavior.
25 lines
772 B
TypeScript
25 lines
772 B
TypeScript
"use client";
|
|
|
|
import type { FC } from "react";
|
|
import { Switch } from "@/components/ui/switch";
|
|
|
|
interface SummaryConfigProps {
|
|
enabled: boolean;
|
|
onEnabledChange: (enabled: boolean) => void;
|
|
}
|
|
|
|
export const SummaryConfig: FC<SummaryConfigProps> = ({ enabled, onEnabledChange }) => {
|
|
return (
|
|
<div className="rounded-xl bg-slate-400/5 dark:bg-white/5 p-3 sm:p-6">
|
|
<div className="flex items-center justify-between">
|
|
<div className="space-y-1">
|
|
<h3 className="font-medium text-sm sm:text-base">Enable AI Summary</h3>
|
|
<p className="text-xs sm:text-sm text-muted-foreground">
|
|
Improves search quality but adds latency during indexing
|
|
</p>
|
|
</div>
|
|
<Switch checked={enabled} onCheckedChange={onEnabledChange} />
|
|
</div>
|
|
</div>
|
|
);
|
|
};
|