diff --git a/client/src/components/Chat/Input/ChatForm.tsx b/client/src/components/Chat/Input/ChatForm.tsx
index 4f083903b3..751d7eb6d0 100644
--- a/client/src/components/Chat/Input/ChatForm.tsx
+++ b/client/src/components/Chat/Input/ChatForm.tsx
@@ -217,7 +217,7 @@ const ChatForm = memo(({ index = 0 }: { index?: number }) => {
diff --git a/client/src/components/Chat/Landing.tsx b/client/src/components/Chat/Landing.tsx
index cbf51080d9..484a38b904 100644
--- a/client/src/components/Chat/Landing.tsx
+++ b/client/src/components/Chat/Landing.tsx
@@ -56,7 +56,12 @@ export default function Landing({ centerFormOnLanding }: { centerFormOnLanding:
const getGreeting = useCallback(() => {
if (typeof startupConfig?.interface?.customWelcome === 'string') {
- return startupConfig.interface.customWelcome;
+ const customWelcome = startupConfig.interface.customWelcome;
+ // Replace {{user.name}} with actual user name if available
+ if (user?.name && customWelcome.includes('{{user.name}}')) {
+ return customWelcome.replace(/{{user.name}}/g, user.name);
+ }
+ return customWelcome;
}
const now = new Date();
@@ -84,7 +89,7 @@ export default function Landing({ centerFormOnLanding }: { centerFormOnLanding:
else {
return localize('com_ui_good_evening');
}
- }, [localize, startupConfig?.interface?.customWelcome]);
+ }, [localize, startupConfig?.interface?.customWelcome, user?.name]);
const handleLineCountChange = useCallback((count: number) => {
setTextHasMultipleLines(count > 1);
@@ -163,9 +168,13 @@ export default function Landing({ centerFormOnLanding }: { centerFormOnLanding:
) : (
)}
- {(isAgent || isAssistant) && description ? (
+ {(isAgent || isAssistant) && description && (
{description}
- ) : (
- typeof startupConfig?.interface?.customWelcome === 'string' && (
-
- {startupConfig?.interface?.customWelcome}
-
- )
)}
diff --git a/client/src/components/Chat/Messages/MessageParts.tsx b/client/src/components/Chat/Messages/MessageParts.tsx
index 1ce0c19e9d..bf1dd3732c 100644
--- a/client/src/components/Chat/Messages/MessageParts.tsx
+++ b/client/src/components/Chat/Messages/MessageParts.tsx
@@ -109,7 +109,7 @@ export default function Message(props: TMessageProps) {
{name}
-