Files
ragflow/web/src/pages/memory/memory-message/index.tsx
chanx 660fa8888b Features: Memory page rendering and other bug fixes (#11784)
### What problem does this PR solve?

Features: Memory page rendering and other bug fixes
- Rendering of the Memory list page
- Rendering of the message list page in Memory
- Fixed an issue where the empty state was incorrectly displayed when
search criteria were applied
- Added a web link for the API-Key
- modifying the index_mode attribute of the Confluence data source.

### Type of change

- [x] Bug Fix (non-breaking change which fixes an issue)
- [x] New Feature (non-breaking change which adds functionality)
2025-12-08 10:17:56 +08:00

52 lines
1.5 KiB
TypeScript

import ListFilterBar from '@/components/list-filter-bar';
import { t } from 'i18next';
import { useFetchMemoryMessageList } from '../hooks/use-memory-messages';
import { MemoryTable } from './message-table';
export default function MemoryMessage() {
const {
searchString,
// documents,
data,
pagination,
handleInputChange,
setPagination,
// filterValue,
// handleFilterSubmit,
loading,
} = useFetchMemoryMessageList();
return (
<div className="flex flex-col gap-2">
<ListFilterBar
title="Dataset"
onSearchChange={handleInputChange}
searchString={searchString}
// value={filterValue}
// onChange={handleFilterSubmit}
// onOpenChange={onOpenChange}
// filters={filters}
leftPanel={
<div className="items-start">
<div className="pb-1">{t('knowledgeDetails.subbarFiles')}</div>
<div className="text-text-secondary text-sm">
{t('knowledgeDetails.datasetDescription')}
</div>
</div>
}
></ListFilterBar>
<MemoryTable
messages={data?.messages?.message_list ?? []}
pagination={pagination}
setPagination={setPagination}
total={data?.messages?.total ?? 0}
// rowSelection={rowSelection}
// setRowSelection={setRowSelection}
// loading={loading}
></MemoryTable>
<div className="flex items-center gap-2">
<div className="h-4 w-4 rounded-full bg-text ">message</div>
</div>
</div>
);
}