fix
This commit is contained in:
parent
10d472e79e
commit
e83f61e74d
|
@ -21,8 +21,6 @@ import {
|
||||||
} from "./artifacts";
|
} from "./artifacts";
|
||||||
import { useChatStore } from "../store";
|
import { useChatStore } from "../store";
|
||||||
import { IconButton } from "./button";
|
import { IconButton } from "./button";
|
||||||
import { SAAS_CHAT_URL } from "@/app/constant";
|
|
||||||
import { trackConversationGuideToCPaymentClick } from "../utils/auth-settings-events";
|
|
||||||
export function Mermaid(props: { code: string }) {
|
export function Mermaid(props: { code: string }) {
|
||||||
const ref = useRef<HTMLDivElement>(null);
|
const ref = useRef<HTMLDivElement>(null);
|
||||||
const [hasError, setHasError] = useState(false);
|
const [hasError, setHasError] = useState(false);
|
||||||
|
@ -281,13 +279,7 @@ function _MarkDownContent(props: { content: string }) {
|
||||||
const href = aProps.href || "";
|
const href = aProps.href || "";
|
||||||
const isInternal = /^\/#/i.test(href);
|
const isInternal = /^\/#/i.test(href);
|
||||||
const target = isInternal ? "_self" : aProps.target ?? "_blank";
|
const target = isInternal ? "_self" : aProps.target ?? "_blank";
|
||||||
const handleClick = () => {
|
return <a {...aProps} target={target} />;
|
||||||
if (href === SAAS_CHAT_URL) {
|
|
||||||
trackConversationGuideToCPaymentClick();
|
|
||||||
}
|
|
||||||
};
|
|
||||||
|
|
||||||
return <a {...aProps} target={target} onClick={handleClick} />;
|
|
||||||
},
|
},
|
||||||
}}
|
}}
|
||||||
>
|
>
|
||||||
|
|
|
@ -2,6 +2,7 @@ import { getClientConfig } from "../config/client";
|
||||||
import { SubmitKey } from "../store/config";
|
import { SubmitKey } from "../store/config";
|
||||||
import { SAAS_CHAT_URL } from "@/app/constant";
|
import { SAAS_CHAT_URL } from "@/app/constant";
|
||||||
|
|
||||||
|
const SAAS_CHAT_URL_WITH_PARAM = `${SAAS_CHAT_URL}?data=title`;
|
||||||
const isApp = !!getClientConfig()?.isApp;
|
const isApp = !!getClientConfig()?.isApp;
|
||||||
|
|
||||||
const cn = {
|
const cn = {
|
||||||
|
@ -9,10 +10,10 @@ const cn = {
|
||||||
Error: {
|
Error: {
|
||||||
Unauthorized: isApp
|
Unauthorized: isApp
|
||||||
? `😆 对话遇到了一些问题,不用慌:
|
? `😆 对话遇到了一些问题,不用慌:
|
||||||
\\ 1️⃣ 想要零配置开箱即用,[点击这里立刻开启对话 🚀](${SAAS_CHAT_URL})
|
\\ 1️⃣ 想要零配置开箱即用,[点击这里立刻开启对话 🚀](${SAAS_CHAT_URL_WITH_PARAM})
|
||||||
\\ 2️⃣ 如果你想消耗自己的 OpenAI 资源,点击[这里](/#/settings)修改设置 ⚙️`
|
\\ 2️⃣ 如果你想消耗自己的 OpenAI 资源,点击[这里](/#/settings)修改设置 ⚙️`
|
||||||
: `😆 对话遇到了一些问题,不用慌:
|
: `😆 对话遇到了一些问题,不用慌:
|
||||||
\ 1️⃣ 想要零配置开箱即用,[点击这里立刻开启对话 🚀](${SAAS_CHAT_URL})
|
\ 1️⃣ 想要零配置开箱即用,[点击这里立刻开启对话 🚀](${SAAS_CHAT_URL_WITH_PARAM})
|
||||||
\ 2️⃣ 如果你正在使用私有部署版本,点击[这里](/#/auth)输入访问秘钥 🔑
|
\ 2️⃣ 如果你正在使用私有部署版本,点击[这里](/#/auth)输入访问秘钥 🔑
|
||||||
\ 3️⃣ 如果你想消耗自己的 OpenAI 资源,点击[这里](/#/settings)修改设置 ⚙️
|
\ 3️⃣ 如果你想消耗自己的 OpenAI 资源,点击[这里](/#/settings)修改设置 ⚙️
|
||||||
`,
|
`,
|
||||||
|
|
Loading…
Reference in New Issue