mirror of
https://github.com/danswer-ai/danswer.git
synced 2025-03-19 14:22:10 +01:00
fix build
This commit is contained in:
parent
7fd59894c9
commit
8dea0bbbcc
@ -585,8 +585,6 @@ def upsert_persona(
|
||||
existing_persona.user_folders.clear()
|
||||
existing_persona.user_folders = user_folders or []
|
||||
|
||||
print("user_folder_ids", user_folder_ids)
|
||||
print("user_folders", user_folders)
|
||||
# We should only update display priority if it is not already set
|
||||
if existing_persona.display_priority is None:
|
||||
existing_persona.display_priority = display_priority
|
||||
|
@ -7,23 +7,9 @@ import {
|
||||
useSearchParams,
|
||||
} from "next/navigation";
|
||||
import {
|
||||
BackendChatSession,
|
||||
BackendMessage,
|
||||
BUFFER_COUNT,
|
||||
ChatFileType,
|
||||
ChatSession,
|
||||
ChatSessionSharedStatus,
|
||||
FileDescriptor,
|
||||
FileChatDisplay,
|
||||
Message,
|
||||
MessageResponseIDInfo,
|
||||
RetrievalType,
|
||||
StreamingError,
|
||||
ToolCallMetadata,
|
||||
SubQuestionDetail,
|
||||
constructSubQuestions,
|
||||
DocumentsResponse,
|
||||
AgenticMessageResponseIDInfo,
|
||||
} from "@/app/chat/interfaces";
|
||||
|
||||
import Prism from "prismjs";
|
||||
@ -43,29 +29,20 @@ import {
|
||||
import {
|
||||
Dispatch,
|
||||
SetStateAction,
|
||||
use,
|
||||
useCallback,
|
||||
useContext,
|
||||
useEffect,
|
||||
useLayoutEffect,
|
||||
useMemo,
|
||||
useRef,
|
||||
useState,
|
||||
} from "react";
|
||||
import { usePopup } from "@/components/admin/connectors/Popup";
|
||||
import {
|
||||
SEARCH_PARAM_NAMES,
|
||||
shouldSubmitOnLoad,
|
||||
} from "@/app/chat/searchParams";
|
||||
import { LlmDescriptor, useFilters, useLlmManager } from "@/lib/hooks";
|
||||
import { SEARCH_PARAM_NAMES } from "@/app/chat/searchParams";
|
||||
import { useFilters, useLlmManager } from "@/lib/hooks";
|
||||
import { ChatState, FeedbackType, RegenerationState } from "@/app/chat/types";
|
||||
import { OnyxDocument } from "@/lib/search/interfaces";
|
||||
import { SettingsContext } from "@/components/settings/SettingsProvider";
|
||||
import { ChatInputBar } from "@/app/chat/input/ChatInputBar";
|
||||
import { useChatContext } from "@/components/context/ChatContext";
|
||||
import { v4 as uuidv4 } from "uuid";
|
||||
import { ChatPopup } from "@/app/chat/ChatPopup";
|
||||
import FunctionalHeader from "@/components/chat/Header";
|
||||
import { useSidebarVisibility } from "@/components/chat/hooks";
|
||||
import {
|
||||
PRO_SEARCH_TOGGLED_COOKIE_NAME,
|
||||
@ -223,7 +200,7 @@ export default function SearchPage({
|
||||
);
|
||||
toggle(false);
|
||||
}
|
||||
}, [user]);
|
||||
}, [user, sidebarVisible, toggle]);
|
||||
|
||||
const chatSessionIdRef = useRef<string | null>(existingChatSessionId);
|
||||
|
||||
@ -642,7 +619,7 @@ export default function SearchPage({
|
||||
"*"
|
||||
);
|
||||
}
|
||||
}, [submittedMessage, currentSessionChatState]);
|
||||
}, [submittedMessage, currentSessionChatState, messageHistory.length]);
|
||||
// just choose a conservative default, this will be updated in the
|
||||
// background on initial load / on persona change
|
||||
const [maxTokens, setMaxTokens] = useState<number>(4096);
|
||||
@ -985,18 +962,6 @@ export default function SearchPage({
|
||||
|
||||
useSidebarShortcut(router, toggleSidebar);
|
||||
|
||||
if (!user) {
|
||||
redirect("/auth/login");
|
||||
}
|
||||
|
||||
if (noAssistants)
|
||||
return (
|
||||
<>
|
||||
<HealthCheckBanner />
|
||||
<NoAssistantModal isAdmin={isAdmin} />
|
||||
</>
|
||||
);
|
||||
|
||||
// New state for search UI
|
||||
const [searchQuery, setSearchQuery] = useState("");
|
||||
const [isSearching, setIsSearching] = useState(false);
|
||||
@ -1092,6 +1057,17 @@ export default function SearchPage({
|
||||
document.querySelector(".search-results-container")?.scrollTo(0, 0);
|
||||
};
|
||||
|
||||
if (!user) {
|
||||
redirect("/auth/login");
|
||||
}
|
||||
|
||||
if (noAssistants)
|
||||
return (
|
||||
<>
|
||||
<HealthCheckBanner />
|
||||
<NoAssistantModal isAdmin={isAdmin} />
|
||||
</>
|
||||
);
|
||||
return (
|
||||
<>
|
||||
<HealthCheckBanner />
|
||||
|
@ -14,11 +14,7 @@ export default function WrappedSearch({
|
||||
return (
|
||||
<FunctionalWrapper
|
||||
content={(sidebarVisible, toggle) => (
|
||||
<SearchPage
|
||||
// toggle={toggle}
|
||||
// sidebarVisible={sidebarVisible}
|
||||
// firstMessage={firstMessage}
|
||||
/>
|
||||
<SearchPage toggle={toggle} sidebarVisible={sidebarVisible} />
|
||||
)}
|
||||
/>
|
||||
);
|
||||
|
Loading…
x
Reference in New Issue
Block a user