This commit is contained in:
lyf 2024-09-25 15:21:17 +08:00
parent 10d472e79e
commit e83f61e74d
2 changed files with 4 additions and 11 deletions

View File

@ -21,8 +21,6 @@ import {
} from "./artifacts";
import { useChatStore } from "../store";
import { IconButton } from "./button";
import { SAAS_CHAT_URL } from "@/app/constant";
import { trackConversationGuideToCPaymentClick } from "../utils/auth-settings-events";
export function Mermaid(props: { code: string }) {
const ref = useRef<HTMLDivElement>(null);
const [hasError, setHasError] = useState(false);
@ -281,13 +279,7 @@ function _MarkDownContent(props: { content: string }) {
const href = aProps.href || "";
const isInternal = /^\/#/i.test(href);
const target = isInternal ? "_self" : aProps.target ?? "_blank";
const handleClick = () => {
if (href === SAAS_CHAT_URL) {
trackConversationGuideToCPaymentClick();
}
};
return <a {...aProps} target={target} onClick={handleClick} />;
return <a {...aProps} target={target} />;
},
}}
>

View File

@ -2,6 +2,7 @@ import { getClientConfig } from "../config/client";
import { SubmitKey } from "../store/config";
import { SAAS_CHAT_URL } from "@/app/constant";
const SAAS_CHAT_URL_WITH_PARAM = `${SAAS_CHAT_URL}?data=title`;
const isApp = !!getClientConfig()?.isApp;
const cn = {
@ -9,10 +10,10 @@ const cn = {
Error: {
Unauthorized: isApp
? `😆 对话遇到了一些问题,不用慌:
\\ 1 [ 🚀](${SAAS_CHAT_URL})
\\ 1 [ 🚀](${SAAS_CHAT_URL_WITH_PARAM})
\\ 2 OpenAI [](/#/settings) `
: `😆 对话遇到了一些问题,不用慌:
\ 1 [ 🚀](${SAAS_CHAT_URL})
\ 1 [ 🚀](${SAAS_CHAT_URL_WITH_PARAM})
\ 2 使[](/#/auth)访 🔑
\ 3 OpenAI [](/#/settings)
`,