mirror of
https://github.com/danswer-ai/danswer.git
synced 2025-09-26 11:58:28 +02:00
cosmetic updates
This commit is contained in:
@@ -17,6 +17,8 @@ import { getSecondsUntilExpiration } from "@/lib/time";
|
||||
import AuthFlowContainer from "@/components/auth/AuthFlowContainer";
|
||||
import CardSection from "@/components/admin/CardSection";
|
||||
import { NEXT_PUBLIC_FORGOT_PASSWORD_ENABLED } from "@/lib/constants";
|
||||
import { SettingsContext } from "@/components/settings/SettingsProvider";
|
||||
import { useContext } from "react";
|
||||
|
||||
const Page = async (props: {
|
||||
searchParams?: Promise<{ [key: string]: string | string[] | undefined }>;
|
||||
@@ -148,6 +150,23 @@ const Page = async (props: {
|
||||
</div>
|
||||
</CardSection>
|
||||
)}
|
||||
{currentUser?.is_anonymous_user && (
|
||||
<div className="mt-4 w-full justify-center">
|
||||
<Text className="mt-4 mx-auto">
|
||||
You are currently logged in as an anonymous user. You can access
|
||||
the chat experience{" "}
|
||||
<Link
|
||||
href={`/auth/login${
|
||||
searchParams?.next ? `?next=${searchParams.next}` : ""
|
||||
}`}
|
||||
className="text-link font-medium"
|
||||
>
|
||||
here
|
||||
</Link>
|
||||
.
|
||||
</Text>
|
||||
</div>
|
||||
)}
|
||||
</div>
|
||||
</AuthFlowContainer>
|
||||
);
|
||||
|
@@ -183,7 +183,15 @@ export function ChatPage({
|
||||
|
||||
const [userSettingsToggled, setUserSettingsToggled] = useState(false);
|
||||
|
||||
const { assistants: availableAssistants, finalAssistants } = useAssistants();
|
||||
const {
|
||||
assistants: availableAssistants,
|
||||
finalAssistants,
|
||||
hiddenAssistants,
|
||||
visibleAssistants,
|
||||
} = useAssistants();
|
||||
console.log("visibleAssistants", visibleAssistants);
|
||||
console.log("availableAssistants", availableAssistants);
|
||||
console.log("hiddenAssistants", hiddenAssistants);
|
||||
|
||||
const [showApiKeyModal, setShowApiKeyModal] = useState(
|
||||
!shouldShowWelcomeModal
|
||||
@@ -243,10 +251,10 @@ export function ChatPage({
|
||||
(assistant) => assistant.id === existingChatSessionAssistantId
|
||||
)
|
||||
: defaultAssistantId !== undefined
|
||||
? availableAssistants.find(
|
||||
(assistant) => assistant.id === defaultAssistantId
|
||||
)
|
||||
: undefined
|
||||
? availableAssistants.find(
|
||||
(assistant) => assistant.id === defaultAssistantId
|
||||
)
|
||||
: undefined
|
||||
);
|
||||
// Gather default temperature settings
|
||||
const search_param_temperature = searchParams.get(
|
||||
@@ -256,12 +264,12 @@ export function ChatPage({
|
||||
const defaultTemperature = search_param_temperature
|
||||
? parseFloat(search_param_temperature)
|
||||
: selectedAssistant?.tools.some(
|
||||
(tool) =>
|
||||
tool.in_code_tool_id === "SearchTool" ||
|
||||
tool.in_code_tool_id === "InternetSearchTool"
|
||||
)
|
||||
? 0
|
||||
: 0.7;
|
||||
(tool) =>
|
||||
tool.in_code_tool_id === "SearchTool" ||
|
||||
tool.in_code_tool_id === "InternetSearchTool"
|
||||
)
|
||||
? 0
|
||||
: 0.7;
|
||||
|
||||
const setSelectedAssistantFromId = (assistantId: number) => {
|
||||
// NOTE: also intentionally look through available assistants here, so that
|
||||
@@ -1177,8 +1185,8 @@ export function ChatPage({
|
||||
const currentAssistantId = alternativeAssistantOverride
|
||||
? alternativeAssistantOverride.id
|
||||
: alternativeAssistant
|
||||
? alternativeAssistant.id
|
||||
: liveAssistant.id;
|
||||
? alternativeAssistant.id
|
||||
: liveAssistant.id;
|
||||
|
||||
resetInputBar();
|
||||
let messageUpdates: Message[] | null = null;
|
||||
|
@@ -63,6 +63,7 @@ export default async function RootLayout({
|
||||
getCurrentUserSS(),
|
||||
]);
|
||||
|
||||
console.log("assistantsData", assistantsData);
|
||||
const productGating =
|
||||
combinedSettings?.settings.product_gating ?? GatingType.NONE;
|
||||
|
||||
|
Reference in New Issue
Block a user