perf(固资): 优化固资查询结果过多分页加载;优化一些查询状态中文显示问题;
This commit is contained in:
1 parent
0a647a0b79
commit
96cc3913fc
5 files changed
+483
-45
No files matched your search
@@ -43,6 +43,16 @@ export interface ChatUploadResult {
|
||||
type?: 'image' | 'document' | 'audio' | 'video' | 'custom';
|
||||
}
|
||||
|
||||
export interface ChatQueryPreviewPage {
|
||||
columns: string[];
|
||||
rows: any[][];
|
||||
page: number;
|
||||
page_size: number;
|
||||
total: number;
|
||||
has_more: boolean;
|
||||
query?: string;
|
||||
}
|
||||
|
||||
export const listChatSessions = (agentId: number) =>
|
||||
requestJson<ChatSessionItem[]>(`/api/chat/sessions?agent_id=${agentId}`, auth());
|
||||
|
||||
@@ -98,3 +108,16 @@ export const uploadChatFile = (agentId: number, file: File) => {
|
||||
headers: getAuthHeaders(),
|
||||
});
|
||||
};
|
||||
|
||||
export const getChatQueryPreviewPage = (
|
||||
agentId: number,
|
||||
chatLogId: number,
|
||||
query: { page?: number; page_size?: number } = {},
|
||||
) => {
|
||||
const qs = new URLSearchParams({
|
||||
agent_id: String(agentId),
|
||||
page: String(query.page ?? 1),
|
||||
page_size: String(query.page_size ?? 100),
|
||||
});
|
||||
return requestJson<ChatQueryPreviewPage>(`/api/chat/query-preview/${chatLogId}?${qs.toString()}`, auth());
|
||||
};
|
||||
Reference in new issue
Block a user