mirror of
https://github.com/paperclipai/paperclip.git
synced 2026-11-23 13:13:46 +01:00
Add opt-in OpenRouter checks at existing tool-result boundaries with regex fallback, service accounting, and settings on Connections. Make migration 0362 safe to replay over existing or partially applied schema state. Co-Authored-By: Paperclip <noreply@paperclip.ing>
47 lines
2.0 KiB
TypeScript
47 lines
2.0 KiB
TypeScript
import { useEffect } from "react";
|
|
import { Link2 } from "lucide-react";
|
|
import { useCompany } from "../context/CompanyContext";
|
|
import { useBreadcrumbs } from "../context/BreadcrumbContext";
|
|
import { DecisionModelSettingsSection } from "../components/decision-models/DecisionModelSettings";
|
|
import { FastResponseSettingsSection } from "../components/fast-responses/FastResponseSettings";
|
|
import { useFastResponsesEnabled } from "../hooks/useFastResponsesEnabled";
|
|
import { PromptInjectionPreventionSettingsSection } from "../components/prompt-injection-prevention/PromptInjectionPreventionSettings";
|
|
|
|
export function CompanyConnections() {
|
|
const { selectedCompany, selectedCompanyId } = useCompany();
|
|
const { setBreadcrumbs } = useBreadcrumbs();
|
|
const { enabled } = useFastResponsesEnabled();
|
|
|
|
useEffect(() => {
|
|
setBreadcrumbs([
|
|
{ label: selectedCompany?.name ?? "Company", href: "/dashboard" },
|
|
{ label: "Settings", href: "/company/settings" },
|
|
{ label: "Connections" },
|
|
]);
|
|
}, [setBreadcrumbs, selectedCompany?.name]);
|
|
|
|
if (!selectedCompanyId) {
|
|
return (
|
|
<div className="text-sm text-muted-foreground">
|
|
No organization selected. Select an organization from the switcher above.
|
|
</div>
|
|
);
|
|
}
|
|
|
|
return (
|
|
<div className="max-w-6xl space-y-8">
|
|
<div className="flex items-center gap-2">
|
|
<Link2 className="h-5 w-5 text-muted-foreground" />
|
|
<h1 className="text-lg font-semibold">Connections</h1>
|
|
</div>
|
|
<DecisionModelSettingsSection key={selectedCompanyId} companyId={selectedCompanyId} />
|
|
<div className="max-w-2xl border-t border-border pt-8">
|
|
<PromptInjectionPreventionSettingsSection key={`injection-${selectedCompanyId}`} companyId={selectedCompanyId} />
|
|
</div>
|
|
{enabled && <div className="max-w-2xl border-t border-border pt-8">
|
|
<FastResponseSettingsSection key={`fast-${selectedCompanyId}`} companyId={selectedCompanyId} />
|
|
</div>}
|
|
</div>
|
|
);
|
|
}
|