Skip to content

An AI-powered search engine with a generative UI

refactor: rename NEXT_PUBLIC_ENABLE_SAVE_CHAT_HISTORY to ENABLE_SAVE_CHAT_HISTORY

Yoshiki Miura1a0512d2023e
diff --git a/.env.local.example b/.env.local.example
index af3671c7..f5a0d80a 100644
--- a/.env.local.example
+++ b/.env.local.example
@@ -18,9 +18,9 @@ TAVILY_API_KEY=[YOUR_TAVILY_API_KEY] # Get your API key at: https://app.tavily.
# Chat History Storage
# Enable persistent chat history across sessions
#------------------------------------------------------------------------------
-# NEXT_PUBLIC_ENABLE_SAVE_CHAT_HISTORY=true # enable chat history storage
+# ENABLE_SAVE_CHAT_HISTORY=true # enable chat history storage
-# Redis Configuration (Required if NEXT_PUBLIC_ENABLE_SAVE_CHAT_HISTORY=true)
+# Redis Configuration (Required if ENABLE_SAVE_CHAT_HISTORY=true)
# Choose between local Redis or Upstash Redis
# OPTION 1: Local Redis
# USE_LOCAL_REDIS=false # use local Redis
diff --git a/app/layout.tsx b/app/layout.tsx
index be4d8842..2e9cb0a1 100644
--- a/app/layout.tsx
+++ b/app/layout.tsx
@@ -46,7 +46,7 @@ export default function RootLayout({
children: React.ReactNode
}>) {
const enableSaveChatHistory =
- process.env.NEXT_PUBLIC_ENABLE_SAVE_CHAT_HISTORY === 'true'
+ process.env.ENABLE_SAVE_CHAT_HISTORY === 'true'
return (
<html lang="en" suppressHydrationWarning>
<body className={cn('font-sans antialiased', fontSans.variable)}>
diff --git a/components/history-container.tsx b/components/history-container.tsx
index 4765b7ca..ff449f5a 100644
--- a/components/history-container.tsx
+++ b/components/history-container.tsx
@@ -10,7 +10,7 @@ const HistoryContainer: React.FC<HistoryContainerProps> = async ({
location
}) => {
const enableSaveChatHistory =
- process.env.NEXT_PUBLIC_ENABLE_SAVE_CHAT_HISTORY === 'true'
+ process.env.ENABLE_SAVE_CHAT_HISTORY === 'true'
if (!enableSaveChatHistory) {
return null
}