Files
ragflow/web/src/pages/memory/memory-message/index.tsx
chanx 2a4627d9a0 Fix: Issues and style fixes related to the 'Memory' page (#12469)
### What problem does this PR solve?

Fix:  Some bugs
- Issues and style fixes related to the 'Memory' page
- Data source icon replacement
- Build optimization

### Type of change

- [x] Bug Fix (non-breaking change which fixes an issue)
2026-01-07 10:03:54 +08:00

54 lines
1.6 KiB
TypeScript

import ListFilterBar from '@/components/list-filter-bar';
import { t } from 'i18next';
import { useFetchMemoryMessageList, useSelectFilters } from './hook';
import { MemoryTable } from './message-table';
export default function MemoryMessage() {
const {
searchString,
// documents,
data,
pagination,
handleInputChange,
setPagination,
filterValue,
handleFilterSubmit,
loading,
} = useFetchMemoryMessageList();
const { filters } = useSelectFilters();
return (
<div className="flex flex-col gap-2">
<ListFilterBar
title="Dataset"
onSearchChange={handleInputChange}
searchString={searchString}
// showFilter={false}
// value={filterValue}
// onChange={handleFilterSubmit}
// onOpenChange={onOpenChange}
// filters={filters}
filters={filters}
onChange={handleFilterSubmit}
value={filterValue}
leftPanel={
<div className="items-start">
<div className="pb-1">{t('memory.sideBar.messages')}</div>
<div className="text-text-secondary text-sm font-normal">
{t('memory.messages.messageDescription')}
</div>
</div>
}
></ListFilterBar>
<MemoryTable
messages={data?.messages?.message_list ?? []}
pagination={pagination}
setPagination={setPagination}
total={data?.messages?.total_count ?? 0}
// rowSelection={rowSelection}
// setRowSelection={setRowSelection}
// loading={loading}
></MemoryTable>
</div>
);
}