Implemented serverside pagination;

Enabled searchspace file mgmt panel to use serverside pagination;
This commit is contained in:
Natsume Ryuhane 2025-10-01 13:05:22 -07:00
parent 54326be56c
commit 797fe26f53
No known key found for this signature in database
7 changed files with 374 additions and 62 deletions

View file

@ -1,11 +1,14 @@
from datetime import datetime
from pydantic import BaseModel, ConfigDict
from typing import Generic, TypeVar
from app.db import DocumentType
from .chunks import ChunkRead
T = TypeVar("T")
class ExtensionDocumentMetadata(BaseModel):
BrowsingSessionId: str
@ -53,3 +56,8 @@ class DocumentWithChunksRead(DocumentRead):
chunks: list[ChunkRead] = []
model_config = ConfigDict(from_attributes=True)
class PaginatedResponse(BaseModel, Generic[T]):
items: list[T]
total: int