mirror of
https://github.com/Mintplex-Labs/anything-llm
synced 2026-04-26 01:25:15 +02:00
* Init support of i18n and English and mandarin * Update common.js (#1320) * add General Appearance and Chat setting zh translate (#1414) * add config zh translate (#1461) * patch some translation pages * Update locality fixes * update: complete login page Mandarin translation. (#1709) update: complete Mandarin translation. * complete translation * update github to run validator * bump to test workflow failure * bump to fix tests * update workflow * refactor lang selector support * add Spanish and French * add dictionaries --------- Co-authored-by: GetOffer.help <13744916+getofferhelp@users.noreply.github.com> Co-authored-by: AIR <129256286+KochabStar@users.noreply.github.com> Co-authored-by: Ezio T <ezio5600@gmail.com>
33 lines
1.2 KiB
JavaScript
33 lines
1.2 KiB
JavaScript
import { chatQueryRefusalResponse } from "@/utils/chat";
|
|
import { useTranslation } from "react-i18next";
|
|
export default function ChatQueryRefusalResponse({ workspace, setHasChanges }) {
|
|
const { t } = useTranslation();
|
|
return (
|
|
<div>
|
|
<div className="flex flex-col">
|
|
<label htmlFor="name" className="block input-label">
|
|
{t("chat.refusal.title")}
|
|
</label>
|
|
<p className="text-white text-opacity-60 text-xs font-medium py-1.5">
|
|
{t("chat.refusal.desc-start")}{" "}
|
|
<code className="bg-zinc-900 p-0.5 rounded-sm">
|
|
{t("chat.refusal.query")}
|
|
</code>{" "}
|
|
{t("chat.refusal.desc-end")}
|
|
</p>
|
|
</div>
|
|
<textarea
|
|
name="queryRefusalResponse"
|
|
rows={2}
|
|
defaultValue={chatQueryRefusalResponse(workspace)}
|
|
className="border-none bg-zinc-900 placeholder:text-white/20 text-white text-sm rounded-lg focus:ring-blue-500 focus:border-blue-500 block w-full p-2.5 mt-2"
|
|
placeholder="The text returned in query mode when there is no relevant context found for a response."
|
|
required={true}
|
|
wrap="soft"
|
|
autoComplete="off"
|
|
onChange={() => setHasChanges(true)}
|
|
/>
|
|
</div>
|
|
);
|
|
}
|