feat: Add segmented control for custom and copilot prompts in PromptBody component
This commit is contained in:
parent
fa42f71821
commit
44da2db97e
@ -147,6 +147,10 @@
|
|||||||
"type": "نوع پرامپت",
|
"type": "نوع پرامپت",
|
||||||
"actions": "اقدامات"
|
"actions": "اقدامات"
|
||||||
},
|
},
|
||||||
|
"segmented": {
|
||||||
|
"custom": "پرامپتهای سفارشی",
|
||||||
|
"copilot": "پرامپتهای کوپایلوت"
|
||||||
|
},
|
||||||
"systemPrompt": "پرامپت سیستم ",
|
"systemPrompt": "پرامپت سیستم ",
|
||||||
"quickPrompt": "پرامپت سریع",
|
"quickPrompt": "پرامپت سریع",
|
||||||
"tooltip": {
|
"tooltip": {
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
import { QueryClient, QueryClientProvider } from "@tanstack/react-query"
|
import { QueryClient, QueryClientProvider } from "@tanstack/react-query"
|
||||||
import { MemoryRouter } from "react-router-dom"
|
import { MemoryRouter } from "react-router-dom"
|
||||||
import { useEffect } from "react"
|
import { useEffect, useState } from "react"
|
||||||
const queryClient = new QueryClient()
|
const queryClient = new QueryClient()
|
||||||
import { ConfigProvider, Empty, theme } from "antd"
|
import { ConfigProvider, Empty, theme } from "antd"
|
||||||
import { StyleProvider } from "@ant-design/cssinjs"
|
import { StyleProvider } from "@ant-design/cssinjs"
|
||||||
@ -13,13 +13,15 @@ import { PageAssistProvider } from "@/components/Common/PageAssistProvider"
|
|||||||
function IndexOption() {
|
function IndexOption() {
|
||||||
const { mode } = useDarkMode()
|
const { mode } = useDarkMode()
|
||||||
const { t, i18n } = useTranslation()
|
const { t, i18n } = useTranslation()
|
||||||
|
const [direction, setDirection] = useState<"ltr" | "rtl">("ltr")
|
||||||
|
|
||||||
useEffect(() => {
|
useEffect(() => {
|
||||||
if (i18n.resolvedLanguage) {
|
if (i18n.resolvedLanguage) {
|
||||||
document.documentElement.lang = i18n.resolvedLanguage;
|
document.documentElement.lang = i18n.resolvedLanguage
|
||||||
document.documentElement.dir = i18n.dir(i18n.resolvedLanguage);
|
document.documentElement.dir = i18n.dir(i18n.resolvedLanguage)
|
||||||
|
setDirection(i18n.dir(i18n.resolvedLanguage))
|
||||||
}
|
}
|
||||||
}, [i18n, i18n.resolvedLanguage]);
|
}, [i18n, i18n.resolvedLanguage])
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<MemoryRouter>
|
<MemoryRouter>
|
||||||
@ -38,7 +40,8 @@ function IndexOption() {
|
|||||||
}}
|
}}
|
||||||
description={t("common:noData")}
|
description={t("common:noData")}
|
||||||
/>
|
/>
|
||||||
)}>
|
)}
|
||||||
|
direction={direction}>
|
||||||
<StyleProvider hashPriority="high">
|
<StyleProvider hashPriority="high">
|
||||||
<QueryClientProvider client={queryClient}>
|
<QueryClientProvider client={queryClient}>
|
||||||
<PageAssistProvider>
|
<PageAssistProvider>
|
||||||
|
@ -14,7 +14,7 @@ export const DEFAULT_TITLE_GEN_PROMPT = `Here is the query:
|
|||||||
|
|
||||||
--------------
|
--------------
|
||||||
|
|
||||||
Create a concise, 3-5 word phrase as a title for the previous query. Suitable emojis for the summary can be used to enhance understanding. Avoid quotation marks or special formatting. RESPOND ONLY WITH THE TITLE TEXT. ANSWER USING THE SAME LANGUAGE AS THE QUERY.
|
Create a concise, 3-5 word phrase as a title for the previous query. Avoid quotation marks or special formatting. RESPOND ONLY WITH THE TITLE TEXT. ANSWER USING THE SAME LANGUAGE AS THE QUERY.
|
||||||
|
|
||||||
|
|
||||||
Examples of titles:
|
Examples of titles:
|
||||||
|
Loading…
x
Reference in New Issue
Block a user