Token bar promo message (#217)
This commit is contained in:
@@ -10,6 +10,7 @@ import { MessageSquare, Code, Bot, AlignLeft } from "lucide-react";
|
|||||||
import { chatInputValueAtom } from "@/atoms/chatAtoms";
|
import { chatInputValueAtom } from "@/atoms/chatAtoms";
|
||||||
import { useAtom } from "jotai";
|
import { useAtom } from "jotai";
|
||||||
import { useSettings } from "@/hooks/useSettings";
|
import { useSettings } from "@/hooks/useSettings";
|
||||||
|
import { IpcClient } from "@/ipc/ipc_client";
|
||||||
|
|
||||||
interface TokenBarProps {
|
interface TokenBarProps {
|
||||||
chatId?: number;
|
chatId?: number;
|
||||||
@@ -125,6 +126,26 @@ export function TokenBar({ chatId }: TokenBarProps) {
|
|||||||
</Tooltip>
|
</Tooltip>
|
||||||
</TooltipProvider>
|
</TooltipProvider>
|
||||||
{error && <div className="text-red-500 text-xs mt-1">{error}</div>}
|
{error && <div className="text-red-500 text-xs mt-1">{error}</div>}
|
||||||
|
{(!settings?.enableProSmartFilesContextMode ||
|
||||||
|
!settings?.enableDyadPro) && (
|
||||||
|
<div className="text-xs text-center text-muted-foreground mt-2">
|
||||||
|
Optimize your tokens with{" "}
|
||||||
|
<a
|
||||||
|
onClick={() =>
|
||||||
|
settings?.enableDyadPro
|
||||||
|
? IpcClient.getInstance().openExternalUrl(
|
||||||
|
"https://www.dyad.sh/docs/guides/ai-models/pro-modes#smart-context",
|
||||||
|
)
|
||||||
|
: IpcClient.getInstance().openExternalUrl(
|
||||||
|
"https://dyad.sh/pro#ai",
|
||||||
|
)
|
||||||
|
}
|
||||||
|
className="text-blue-500 dark:text-blue-400 cursor-pointer hover:underline"
|
||||||
|
>
|
||||||
|
Dyad Pro's Smart Context
|
||||||
|
</a>
|
||||||
|
</div>
|
||||||
|
)}
|
||||||
</div>
|
</div>
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user