mirror of
https://github.com/danswer-ai/danswer.git
synced 2025-03-17 13:22:42 +01:00
misc improvements
This commit is contained in:
parent
2e6487d9de
commit
faf7e4a1ad
@ -36,7 +36,6 @@ import {
|
||||
buildChatUrl,
|
||||
buildLatestMessageChain,
|
||||
createChatSession,
|
||||
deleteAllChatSessions,
|
||||
getCitedDocumentsFromMessage,
|
||||
getHumanAndAIMessageFromMessageNumber,
|
||||
getLastSuccessfulMessageId,
|
||||
@ -157,11 +156,15 @@ export function ChatPage({
|
||||
documentSidebarInitialWidth,
|
||||
sidebarVisible,
|
||||
firstMessage,
|
||||
initialFolders,
|
||||
initialFiles,
|
||||
}: {
|
||||
toggle: (toggled?: boolean) => void;
|
||||
documentSidebarInitialWidth?: number;
|
||||
sidebarVisible: boolean;
|
||||
firstMessage?: string;
|
||||
initialFolders?: any;
|
||||
initialFiles?: any;
|
||||
}) {
|
||||
const router = useRouter();
|
||||
const searchParams = useSearchParams();
|
||||
|
@ -702,18 +702,6 @@ export default function UserFolderContent({ folderId }: { folderId: number }) {
|
||||
<Trash className="h-4 w-4" />
|
||||
Cleanup
|
||||
</Button>
|
||||
{/* <CreateEntityModal
|
||||
title="New Folder"
|
||||
entityName=""
|
||||
open={isCreateFolderOpen}
|
||||
placeholder="Untitled folder"
|
||||
setOpen={setIsCreateFolderOpen}
|
||||
onSubmit={handleCreateFolder}
|
||||
trigger={
|
||||
|
||||
}
|
||||
hideLabel
|
||||
/> */}
|
||||
</div>
|
||||
|
||||
<div className="mb-6">
|
||||
|
@ -165,20 +165,6 @@ export const DocumentList: React.FC<DocumentListProps> = ({
|
||||
startRefreshInterval();
|
||||
};
|
||||
|
||||
// Add a function to update progress for a specific file
|
||||
const updateFileProgress = (fileName: string, progress: number) => {
|
||||
setUploadingFiles((prev) =>
|
||||
prev.map((file) =>
|
||||
file.name === fileName ? { ...file, progress } : file
|
||||
)
|
||||
);
|
||||
|
||||
// If provided, call the onUploadProgress callback
|
||||
if (onUploadProgress) {
|
||||
onUploadProgress(fileName, progress);
|
||||
}
|
||||
};
|
||||
|
||||
// Filter files based on search query
|
||||
const filteredFiles = searchQuery
|
||||
? files.filter((file) =>
|
||||
|
@ -55,7 +55,7 @@ export const FileListItem: React.FC<FileListItemProps> = ({
|
||||
}) => {
|
||||
const [showMoveOptions, setShowMoveOptions] = useState(false);
|
||||
const [indexingStatus, setIndexingStatus] = useState<boolean | null>(null);
|
||||
const { getFilesIndexingStatus } = useDocumentsContext();
|
||||
const { getFilesIndexingStatus, refreshFolders } = useDocumentsContext();
|
||||
|
||||
useEffect(() => {
|
||||
const checkStatus = async () => {
|
||||
@ -65,6 +65,7 @@ export const FileListItem: React.FC<FileListItemProps> = ({
|
||||
|
||||
checkStatus();
|
||||
const interval = setInterval(() => {
|
||||
refreshFolders();
|
||||
if (indexingStatus === false) {
|
||||
checkStatus();
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user