diff --git a/front/components/assistant/AssistantDetails.tsx b/front/components/assistant/AssistantDetails.tsx index 962c58f59e8b..9ba4d706fd6c 100644 --- a/front/components/assistant/AssistantDetails.tsx +++ b/front/components/assistant/AssistantDetails.tsx @@ -105,15 +105,19 @@ export function AssistantDetails({ ); const TabsSection = () => ( - + - + - + @@ -200,7 +204,7 @@ export function AssistantDetails({
No feedbacks.
) : (
- 0 && feedback.agentConfigurationVersion !== sortedFeedbacks[index - 1].agentConfigurationVersion && ( - c.version === feedback.agentConfigurationVersion )} @@ -245,7 +249,7 @@ export function AssistantDetails({ ); } -function ConfigVersionHeader({ +function AgentConfigurationVersionHeader({ agentConfigurationVersion, agentConfiguration, isLatestVersion, @@ -254,20 +258,17 @@ function ConfigVersionHeader({ agentConfiguration: LightAgentConfigurationType | undefined; isLatestVersion: boolean; }) { - const getStringRepresentation = useCallback( + const getAgentConfigurationVersionString = useCallback( (config: LightAgentConfigurationType) => { - const dateFormatter = new Intl.DateTimeFormat(navigator.language, { - year: "numeric", - month: "short", - day: "numeric", - hour: "numeric", - minute: "numeric", - }); return isLatestVersion ? "Latest Version" - : config.versionCreatedAt - ? dateFormatter.format(new Date(config.versionCreatedAt)) - : `v${config.version}`; + : !config.versionCreatedAt + ? `v${config.version}` + : new Date(config.versionCreatedAt).toLocaleDateString("en-US", { + year: "numeric", + month: "long", + day: "numeric", + }); }, [isLatestVersion] ); @@ -276,7 +277,7 @@ function ConfigVersionHeader({
{agentConfiguration - ? getStringRepresentation(agentConfiguration) + ? getAgentConfigurationVersionString(agentConfiguration) : `v${agentConfigurationVersion}`}
@@ -295,12 +296,7 @@ function FeedbackCard({ workspaceId: owner.sId, feedbackId: feedback.id.toString(), }); - - const baseUrl = - process.env.NODE_ENV === "development" - ? "http://localhost:3000" - : "https://dust.tt"; - const conversationUrl = `${baseUrl}/w/${owner.sId}/assistant/${conversationId}`; + const conversationUrl = `${process.env.NEXT_PUBLIC_DUST_CLIENT_FACING_URL}/w/${owner.sId}/assistant/${conversationId}`; return ( @@ -308,7 +304,7 @@ function FeedbackCard({
{userDetails?.firstName} {userDetails?.lastName}