An AI-powered search engine with a generative UI
TypeScript generative-aigenerative-uinextjsollamareactsearxngshadcn-uitailwindcsstavilytypescriptupstashvercel-ai-sdk
Make the share feature optional
Yoshiki Miurada1b162303d0
diff --git a/.env.local.example b/.env.local.exampleindex 482943d6..60112b2a 100644--- a/.env.local.example+++ b/.env.local.example@@ -27,4 +27,8 @@ UPSTASH_REDIS_REST_TOKEN=[YOUR_UPSTASH_REDIS_REST_TOKEN]# USE_SPECIFIC_API_FOR_WRITER=true# SPECIFIC_API_BASE=# SPECIFIC_API_KEY=-# SPECIFIC_API_MODEL=\ No newline at end of file+# SPECIFIC_API_MODEL=++# enable the share feature+# If you enable this feature, separate account management implementation is required.+# ENABLE_SHARE=true\ No newline at end of filediff --git a/components/user-message.tsx b/components/user-message.tsxindex 890e8cc6..fc39ab7a 100644--- a/components/user-message.tsx+++ b/components/user-message.tsx@@ -12,10 +12,11 @@ export const UserMessage: React.FC<UserMessageProps> = ({chatId,showShare = false}) => {+ const enableShare = process.env.ENABLE_SHARE === 'true'return (<div className="flex items-center w-full space-x-1 mt-2 min-h-10"><div className="text-xl flex-1">{message}</div>- {showShare && chatId && <ChatShare chatId={chatId} />}+ {enableShare && showShare && chatId && <ChatShare chatId={chatId} />}</div>)}