Unverified 提交 d8a0c6e1 authored 作者: Mohamed Aziz Mejri's avatar Mohamed Aziz Mejri 提交者: GitHub

fix : hiding upgrade banner on unrelated errors (#1667)

This PR solves the issue #1666 To solve this i removed the upgrade link from the general case since errors related to pro mode are already handled in the specific if-blocks <!-- This is an auto-generated description by cubic. --> --- ## Summary by cubic Hide the Dyad Pro upgrade banner on termination errors to reduce confusion. The generic upgrade link in ChatErrorBox is now suppressed when the error includes "TypeError: terminated" and only shows when Pro is disabled otherwise. <sup>Written for commit 1edf665. Summary will update automatically on new commits.</sup> <!-- End of auto-generated description by cubic. -->
上级 8ce23cd1
......@@ -99,7 +99,7 @@ export function ChatErrorBox({
<ChatErrorContainer onDismiss={onDismiss}>
{error}
<div className="mt-2 space-y-2 space-x-2">
{!isDyadProEnabled && (
{!isDyadProEnabled && !error.includes("TypeError: terminated") && (
<ExternalLink
href="https://dyad.sh/pro?utm_source=dyad-app&utm_medium=app&utm_campaign=general-error"
variant="primary"
......@@ -107,7 +107,6 @@ export function ChatErrorBox({
Upgrade to Dyad Pro
</ExternalLink>
)}
<ExternalLink href="https://www.dyad.sh/docs/faq">
Read docs
</ExternalLink>
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论