File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -27,8 +27,14 @@ async def list_by_status(self, status: str) -> list[Any]:
2727 raise NotImplementedError
2828
2929 @abstractmethod
30- async def list_by_user (self , user_id : uuid .UUID ) -> list [Any ]:
31- """列出当前用户可见的文档(含全局共享)"""
30+ async def list_by_user (
31+ self ,
32+ user_id : uuid .UUID ,
33+ * ,
34+ limit : int | None = None ,
35+ offset : int = 0 ,
36+ ) -> list [Any ]:
37+ """列出当前用户可见的文档(含全局共享)。limit=None 表示不截断。"""
3238 raise NotImplementedError
3339
3440 @abstractmethod
Original file line number Diff line number Diff line change @@ -911,8 +911,17 @@ export async function deleteCronJob(cronId: string): Promise<{ deleted: boolean
911911
912912// ====== Knowledge APIs ======
913913
914- export async function getDocuments ( ) : Promise < Document [ ] > {
915- const res = await api . get ( '/knowledge/documents' ) ;
914+ export async function getDocuments ( opts ?: {
915+ limit ?: number ;
916+ offset ?: number ;
917+ } ) : Promise < Document [ ] > {
918+ // Backend default is 100; pass max (500) so alpha knowledge center shows full list.
919+ // Callers can still page via { limit, offset } when UI grows a "load more".
920+ const limit = opts ?. limit ?? 500 ;
921+ const offset = opts ?. offset ?? 0 ;
922+ const res = await api . get ( '/knowledge/documents' , {
923+ params : { limit, offset } ,
924+ } ) ;
916925 return res . data ;
917926}
918927
Original file line number Diff line number Diff line change 20432043 "chatDisplay.errorPrefix" : " Error: {msg}" ,
20442044 "settings.deleteProvider" : " Delete provider \" {name}\" ?" ,
20452045 "settings.deleteProviderTitle" : " Delete provider" ,
2046- "desktop.confirmTitle" : " Please confirm" ,
20472046 "api.connectFailed" : " Cannot connect to backend ({base}{path}). Ensure Tevarn has started." ,
20482047 "api.notFound" : " API not found (404)." ,
20492048 "api.badGateway" : " Backend temporarily unavailable (502). Please try again later." ,
Original file line number Diff line number Diff line change 20432043 "chatDisplay.errorPrefix" : " 错误:{msg}" ,
20442044 "settings.deleteProvider" : " 删除供应商「{name}」?" ,
20452045 "settings.deleteProviderTitle" : " 删除供应商" ,
2046- "desktop.confirmTitle" : " 请确认" ,
20472046 "api.connectFailed" : " 无法连接后端({base}{path})。请确认 Tevarn 已启动。" ,
20482047 "api.notFound" : " 接口不存在(404)。" ,
20492048 "api.badGateway" : " 后端暂时不可用(502),请稍后重试。" ,
You can’t perform that action at this time.
0 commit comments