mirror of
https://github.com/meta-llama/llama-stack.git
synced 2025-07-23 04:53:14 +00:00
feat(ui): add infinite scroll pagination to chat completions/responses logs table
## Summary: This commit adds infinite scroll pagination to the chat completions and responses tables. ## Test Plan: 1. Run unit tests: npm run test 2. Manual testing: Navigate to chat completions/responses pages 3. Verify infinite scroll triggers when approaching bottom 4. Added playwright tests: npm run test:e2e
This commit is contained in:
parent
15f630e5da
commit
66e217fea7
20 changed files with 1145 additions and 388 deletions
|
@ -43,6 +43,33 @@ export interface ChatCompletion {
|
|||
input_messages: ChatMessage[];
|
||||
}
|
||||
|
||||
export interface ListChatCompletionsResponse {
|
||||
data: ChatCompletion[];
|
||||
has_more: boolean;
|
||||
first_id: string;
|
||||
last_id: string;
|
||||
object: "list";
|
||||
}
|
||||
|
||||
export type PaginationStatus = "idle" | "loading" | "loading-more" | "error";
|
||||
|
||||
export interface PaginationState {
|
||||
data: ChatCompletion[];
|
||||
status: PaginationStatus;
|
||||
hasMore: boolean;
|
||||
error: Error | null;
|
||||
lastId: string | null;
|
||||
}
|
||||
|
||||
export interface UsePaginationOptions {
|
||||
/** Number of items to load per page (default: 20) */
|
||||
limit?: number;
|
||||
/** Filter by specific model */
|
||||
model?: string;
|
||||
/** Sort order for results (default: "desc") */
|
||||
order?: "asc" | "desc";
|
||||
}
|
||||
|
||||
// Response types for OpenAI Responses API
|
||||
export interface ResponseInputMessageContent {
|
||||
text?: string;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue