mirror of
https://github.com/fosrl/pangolin.git
synced 2026-08-12 23:40:40 +02:00
show link to provider settings
This commit is contained in:
@@ -1921,6 +1921,7 @@
|
|||||||
"aiResourceProvidersUpdated": "Providers updated",
|
"aiResourceProvidersUpdated": "Providers updated",
|
||||||
"aiResourceProvidersErrorUpdate": "Failed to update providers",
|
"aiResourceProvidersErrorUpdate": "Failed to update providers",
|
||||||
"aiResourceProviderEditDescription": "Choose how this provider's models are exposed on this resource.",
|
"aiResourceProviderEditDescription": "Choose how this provider's models are exposed on this resource.",
|
||||||
|
"viewProviderSettings": "View Provider Settings",
|
||||||
"aiResourceProviderMode": "Access mode",
|
"aiResourceProviderMode": "Access mode",
|
||||||
"aiResourceProviderModeInherit": "Inherit",
|
"aiResourceProviderModeInherit": "Inherit",
|
||||||
"aiResourceProviderModeSelect": "Select",
|
"aiResourceProviderModeSelect": "Select",
|
||||||
|
|||||||
@@ -42,6 +42,7 @@ import { zodResolver } from "@hookform/resolvers/zod";
|
|||||||
import { useQuery } from "@tanstack/react-query";
|
import { useQuery } from "@tanstack/react-query";
|
||||||
import { Plus, XIcon } from "lucide-react";
|
import { Plus, XIcon } from "lucide-react";
|
||||||
import { useTranslations } from "next-intl";
|
import { useTranslations } from "next-intl";
|
||||||
|
import Link from "next/link";
|
||||||
import { useEffect, useMemo, useRef, useState } from "react";
|
import { useEffect, useMemo, useRef, useState } from "react";
|
||||||
import { useForm } from "react-hook-form";
|
import { useForm } from "react-hook-form";
|
||||||
import { z } from "zod";
|
import { z } from "zod";
|
||||||
@@ -178,6 +179,7 @@ export function AiProviderAttachments({
|
|||||||
|
|
||||||
{editing && (
|
{editing && (
|
||||||
<EditAttachmentCredenza
|
<EditAttachmentCredenza
|
||||||
|
orgId={orgId}
|
||||||
attachment={editing}
|
attachment={editing}
|
||||||
open={editingProviderId !== null}
|
open={editingProviderId !== null}
|
||||||
onOpenChange={(open) => {
|
onOpenChange={(open) => {
|
||||||
@@ -283,11 +285,13 @@ type EditFormValues = {
|
|||||||
};
|
};
|
||||||
|
|
||||||
function EditAttachmentCredenza({
|
function EditAttachmentCredenza({
|
||||||
|
orgId,
|
||||||
attachment,
|
attachment,
|
||||||
open,
|
open,
|
||||||
onOpenChange,
|
onOpenChange,
|
||||||
onSave
|
onSave
|
||||||
}: {
|
}: {
|
||||||
|
orgId: string;
|
||||||
attachment: AiProviderAttachmentValue;
|
attachment: AiProviderAttachmentValue;
|
||||||
open: boolean;
|
open: boolean;
|
||||||
onOpenChange: (open: boolean) => void;
|
onOpenChange: (open: boolean) => void;
|
||||||
@@ -565,6 +569,18 @@ function EditAttachmentCredenza({
|
|||||||
</Form>
|
</Form>
|
||||||
</CredenzaBody>
|
</CredenzaBody>
|
||||||
<CredenzaFooter>
|
<CredenzaFooter>
|
||||||
|
<Button
|
||||||
|
variant="link"
|
||||||
|
size="sm"
|
||||||
|
className="mr-auto px-0"
|
||||||
|
asChild
|
||||||
|
>
|
||||||
|
<Link
|
||||||
|
href={`/${orgId}/settings/ai-providers/${attachment.providerId}`}
|
||||||
|
>
|
||||||
|
{t("viewProviderSettings")}
|
||||||
|
</Link>
|
||||||
|
</Button>
|
||||||
<CredenzaClose asChild>
|
<CredenzaClose asChild>
|
||||||
<Button variant="outline">{t("close")}</Button>
|
<Button variant="outline">{t("close")}</Button>
|
||||||
</CredenzaClose>
|
</CredenzaClose>
|
||||||
|
|||||||
Reference in New Issue
Block a user