feat: Add an Ollama-based PDF OCR script and refactor frontend folder tree management with a new FoldersManager and useSyncExternalStore.
This commit is contained in:
@@ -12,7 +12,7 @@ import type {
|
||||
TenantSnippet,
|
||||
TagResponse,
|
||||
CorrespondentResponse,
|
||||
FolderTreeResponseItem,
|
||||
FolderTreeNode,
|
||||
} from './apiTypes';
|
||||
import type { AxiosError, AxiosInstance, InternalAxiosRequestConfig, AxiosRequestConfig } from 'axios';
|
||||
|
||||
@@ -79,8 +79,8 @@ export const listDocuments = async (params: Record<string, unknown> = {}): Promi
|
||||
return Array.isArray(data) ? data : [];
|
||||
};
|
||||
|
||||
export const getFolderTree = async (): Promise<FolderTreeResponseItem[]> => {
|
||||
const { data } = await api.get<FolderTreeResponseItem[]>('/folders/tree');
|
||||
export const getFolderTree = async (): Promise<FolderTreeNode[]> => {
|
||||
const { data } = await api.get<FolderTreeNode[]>('/folders/tree');
|
||||
return Array.isArray(data) ? data : [];
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user