import { useQuery, useQueryClient } from "@tanstack/react-query" import { Skeleton, Radio, Form, Input } from "antd" import React from "react" import { useTranslation } from "react-i18next" import { SaveButton } from "~/components/Common/SaveButton" import { getWebSearchPrompt, geWebSearchFollowUpPrompt, setWebPrompts, promptForRag, setPromptForRag } from "~/services/ollama" export const SettingPrompt = () => { const { t } = useTranslation("settings") const [selectedValue, setSelectedValue] = React.useState<"web" | "rag">("rag") const queryClient = useQueryClient() const { status, data } = useQuery({ queryKey: ["fetchRagPrompt"], queryFn: async () => { const [prompt, webSearchPrompt, webSearchFollowUpPrompt] = await Promise.all([ promptForRag(), getWebSearchPrompt(), geWebSearchFollowUpPrompt() ]) return { prompt, webSearchPrompt, webSearchFollowUpPrompt } } }) return (